:root{
  --navy:#1f3a5f; --navy-2:#2b4f7e; --bg:#f3f5f8; --card:#fff; --ink:#18212b; --muted:#5d6b7a; --line:#dde3ea;
  --red:#d23c3c; --red-bg:#fdecec; --amber:#b77900; --amber-strong:#f0b429; --amber-bg:#fff6dc; --green:#23864f; --green-bg:#e3f5ea;
  --grey-bg:#eef1f4; --radius:14px; --tap:52px;
  --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-tap-highlight-color:transparent;overflow-x:hidden}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--navy-2)}
:focus-visible{outline:3px solid #6aa3ff;outline-offset:2px}
[hidden]{display:none!important}
.pad{padding:16px}
.muted{color:var(--muted)}
.small{font-size:14px}
.center{text-align:center}

/* top bar */
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:6px;min-height:58px;padding:calc(var(--safe-top) + 6px) 8px 6px;background:var(--navy);color:#fff;box-shadow:0 1px 0 rgba(0,0,0,.08)}
.topbar .titles{flex:1;min-width:0;padding:0 6px}
.topbar h1{margin:0;font-size:19px;font-weight:700;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.subtitle{font-size:13px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iconbtn{flex:none;width:46px;height:46px;border:0;border-radius:12px;background:transparent;color:inherit;display:grid;place-items:center;cursor:pointer}
.iconbtn:active{background:rgba(255,255,255,.15)}
.iconbtn svg{width:24px;height:24px}

main{max-width:760px;margin:0 auto;padding-bottom:calc(40px + var(--safe-bottom))}
main:focus{outline:none}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--tap);padding:10px 18px;border-radius:12px;border:1.5px solid var(--line);background:#fff;font-weight:600;font-size:17px;cursor:pointer;text-decoration:none;color:var(--ink);touch-action:manipulation}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--navy);border-color:var(--navy);color:#fff}
.btn.danger{color:var(--red);border-color:#f0c4c4}
.btn.ghost{background:transparent;border-color:transparent;color:var(--navy-2)}
.btn.block{display:flex;width:100%}
.btn.big{min-height:60px;font-size:19px}
.btn[disabled]{opacity:.45;pointer-events:none}
.row{display:flex;gap:10px;align-items:center}
.row > *{flex:1}
.stack > * + *{margin-top:12px}

/* cards */
.card{background:var(--card);border-radius:var(--radius);box-shadow:0 1px 2px rgba(16,24,40,.06),0 0 0 1px rgba(16,24,40,.04)}
.section-title{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:22px 16px 8px}

/* building list */
.blist{list-style:none;margin:0;padding:0 16px;display:grid;gap:12px}
.bcard{display:block;padding:16px 16px 14px;text-decoration:none;color:var(--ink);position:relative}
.bcard:active{background:#f7f9fb}
.bcard .addr{font-size:21px;font-weight:700;line-height:1.25;padding-right:26px;overflow-wrap:anywhere}
.bcard .bname{color:var(--muted);font-size:15px;margin-top:2px;overflow-wrap:anywhere}
.bcard .chev{position:absolute;right:14px;top:18px;color:#9aa7b4}
.counts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;font-size:14px;font-weight:700;background:var(--grey-bg);color:var(--muted);white-space:nowrap}
.pill.open{background:var(--red-bg);color:var(--red)}
.pill.fixed{background:var(--amber-bg);color:var(--amber)}
.pill.checked{background:var(--green-bg);color:var(--green)}
.tag{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:2px 7px;border-radius:6px;background:#e6ecf5;color:var(--navy-2);vertical-align:3px;margin-left:6px}
.hint{margin:12px 16px 0;padding:12px 14px;background:#e9f1fb;border-radius:12px;font-size:15px;display:flex;gap:10px;align-items:flex-start}
.hint p{margin:0;flex:1}
.hint .x{border:0;background:transparent;font-size:22px;line-height:1;color:var(--muted);padding:0 4px;min-height:32px;cursor:pointer}
.empty{padding:28px 20px;text-align:center;color:var(--muted)}
.empty strong{display:block;color:var(--ink);font-size:19px;margin-bottom:6px}

/* summary + controls */
.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px 16px 4px}
.sumbox{border:0;border-radius:12px;padding:10px 6px;text-align:center;cursor:pointer;background:#fff;box-shadow:0 0 0 1px rgba(16,24,40,.06)}
.sumbox b{display:block;font-size:26px;line-height:1.1}
.sumbox span{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.sumbox.open b,.sumbox.open span{color:var(--red)}
.sumbox.fixed b,.sumbox.fixed span{color:var(--amber)}
.sumbox.checked b,.sumbox.checked span{color:var(--green)}
.sumbox.on{box-shadow:0 0 0 3px currentColor}
.sumbox.open.on{box-shadow:0 0 0 3px var(--red)}
.sumbox.fixed.on{box-shadow:0 0 0 3px var(--amber-strong)}
.sumbox.checked.on{box-shadow:0 0 0 3px var(--green)}
.seg{display:flex;margin:12px 16px 0;background:#e3e8ee;border-radius:12px;padding:3px}
.seg button{flex:1;min-height:44px;border:0;border-radius:10px;background:transparent;font-weight:600;font-size:16px;cursor:pointer;color:var(--muted)}
.seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 16px 0}
select,.input,textarea{width:100%;min-height:48px;padding:10px 12px;border:1.5px solid var(--line);border-radius:12px;background:#fff;font-size:17px}
select{appearance:none;-webkit-appearance:none;padding-right:28px;background-image:linear-gradient(45deg,transparent 50%,#5d6b7a 50%),linear-gradient(135deg,#5d6b7a 50%,transparent 50%);background-position:calc(100% - 15px) 21px,calc(100% - 10px) 21px;background-size:5px 5px;background-repeat:no-repeat;text-overflow:ellipsis}
.filters select{font-size:15px;padding-left:10px}
select.active{border-color:var(--navy-2);background-color:#eaf1fb;font-weight:600}
textarea{min-height:96px;resize:vertical}
.search{margin:10px 16px 0;position:relative}
.search input{padding-left:40px}
.search svg{position:absolute;left:12px;top:14px;width:20px;height:20px;color:#8a97a5}
.clearf{margin:8px 16px 0;font-size:15px;display:flex;justify-content:space-between;align-items:center;color:var(--muted)}
.clearf button{border:0;background:transparent;color:var(--navy-2);font-weight:600;min-height:40px;cursor:pointer}
label.lbl{display:block;font-weight:600;font-size:15px;margin:0 0 6px}

/* floors & tiles */
.floor{margin:14px 16px 0;overflow:hidden}
.floorhead{display:flex;width:100%;align-items:center;gap:10px;min-height:56px;padding:10px 14px;border:0;background:transparent;text-align:left;cursor:pointer}
.floorhead .fname{font-weight:700;font-size:18px;flex:1}
.floorhead .chev{transition:transform .15s;color:#8a97a5}
.floor.closed .chev{transform:rotate(-90deg)}
.floor.closed .tiles{display:none}
.mini{display:flex;gap:4px}
.mini .pill{font-size:13px;padding:2px 8px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:8px;padding:2px 12px 14px}
.tiles.flat{padding:14px 16px}
.tile{display:flex;flex-direction:column;justify-content:center;min-height:78px;padding:10px 8px;border-radius:12px;text-decoration:none;color:var(--ink);background:var(--grey-bg);border:2px solid transparent;text-align:center}
.tile:active{transform:scale(.97)}
.tile .un{font-size:21px;font-weight:800;line-height:1.1;overflow-wrap:anywhere}
.tile .uc{font-size:13px;font-weight:700;margin-top:4px;color:var(--muted)}
.tile.s-open{background:var(--red-bg);border-color:#f3b9b9}
.tile.s-open .uc{color:var(--red)}
.tile.s-fixed{background:var(--amber-bg);border-color:#f2d58a}
.tile.s-fixed .uc{color:var(--amber)}
.tile.s-done{background:var(--green-bg);border-color:#a9dcbd}
.tile.s-done .uc{color:var(--green)}
.legend{display:flex;flex-wrap:wrap;gap:12px;margin:14px 16px 0;font-size:13px;color:var(--muted)}
.legend i{display:inline-block;width:12px;height:12px;border-radius:4px;vertical-align:-1px;margin-right:4px}
.bottom-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 16px 0}

/* items */
.quick{margin:14px 16px 0;padding:14px}
.quick .input{font-size:18px}
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;margin:8px -2px 0;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chips.wrap{flex-wrap:wrap;overflow:visible}
.chip{flex:none;min-height:40px;padding:6px 14px;border-radius:999px;border:1.5px solid var(--line);background:#fff;font-size:15px;font-weight:600;cursor:pointer;white-space:nowrap}
.chip.on{background:var(--navy);border-color:var(--navy);color:#fff}
.chip.auto{border-style:dashed;border-color:var(--navy-2);color:var(--navy-2);background:#eef4fc}
.chiplabel{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-top:10px}
.quickrow{display:grid;grid-template-columns:auto 1fr;gap:10px;margin-top:12px}
.photobtn{min-width:var(--tap)}
.photobtn svg{width:24px;height:24px}
.pending{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.pending img,.thumbs img{width:64px;height:64px;object-fit:cover;border-radius:10px;background:#e3e8ee;display:block}
.ilist{list-style:none;margin:0;padding:0 16px;display:grid;gap:10px}
.item{display:flex;gap:12px;padding:12px;align-items:flex-start}
.item.st-checked{opacity:.78}
.item.st-checked .idesc{text-decoration:line-through;text-decoration-color:rgba(0,0,0,.35)}
.status{flex:none;min-width:92px;min-height:48px;padding:6px 10px;border-radius:12px;border:2px solid;font-weight:800;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:4px;touch-action:manipulation}
.status.open{color:var(--red);border-color:var(--red);background:var(--red-bg)}
.status.fixed{color:var(--amber);border-color:var(--amber-strong);background:var(--amber-bg)}
.status.checked{color:#fff;border-color:var(--green);background:var(--green)}
.ibody{flex:1;min-width:0;cursor:pointer}
.idesc{font-size:17px;font-weight:600;overflow-wrap:anywhere}
.imeta{font-size:14px;color:var(--muted);margin-top:2px}
.thumbs{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.thumbs img{width:56px;height:56px;cursor:zoom-in}
.unitnav{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 16px 0}
.unitgroup{margin:16px 16px 6px;font-weight:800;font-size:16px;display:flex;justify-content:space-between;align-items:center}
.unitgroup a{font-size:15px;font-weight:600}
.status-help{font-size:13px;color:var(--muted);margin:10px 16px 0}

/* setup */
.tabs{display:flex;gap:6px;margin:14px 16px 0}
.tabs button{flex:1;min-height:48px;border:1.5px solid var(--line);background:#fff;border-radius:12px;font-weight:700;cursor:pointer;font-size:15px}
.tabs button.on{background:var(--navy);border-color:var(--navy);color:#fff}
.form{margin:14px 16px 0;padding:16px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.radios{display:grid;gap:8px}
.radio{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 12px;border:1.5px solid var(--line);border-radius:12px;cursor:pointer;background:#fff}
.radio input{width:22px;height:22px;accent-color:var(--navy);flex:none}
.radio .ex{color:var(--muted);font-size:14px;margin-left:auto;white-space:nowrap}
.checks{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.check{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 10px;border:1.5px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;font-size:15px}
.check input{width:22px;height:22px;accent-color:var(--navy);flex:none}
.preview{margin-top:12px;padding:12px;background:var(--grey-bg);border-radius:12px;font-size:15px;overflow-wrap:anywhere}
.ptable{width:100%;border-collapse:collapse;margin-top:10px}
.ptable td{padding:4px 4px;vertical-align:middle}
.ptable input{min-height:44px;padding:6px 10px}
.ptable .rm{width:44px}
.ulist{list-style:none;margin:0;padding:0}
.urow{display:flex;align-items:center;gap:8px;padding:8px 14px;border-top:1px solid var(--line);min-height:56px}
.urow:first-child{border-top:0}
.urow .nm{font-weight:700;font-size:17px;flex:1;min-width:0;overflow-wrap:anywhere}
.urow .ct{font-size:13px;color:var(--muted)}
.urow .btn{min-height:44px;padding:6px 12px;font-size:15px}

/* sheets */
.sheet-back{position:fixed;inset:0;background:rgba(10,18,30,.45);z-index:40;display:flex;align-items:flex-end;justify-content:center;animation:fade .15s}
.sheet{width:100%;max-width:640px;max-height:85vh;max-height:85dvh;overscroll-behavior:contain;overflow:auto;background:#fff;border-radius:18px 18px 0 0;padding:10px 16px calc(18px + var(--safe-bottom));animation:up .18s ease-out;-webkit-overflow-scrolling:touch}
.sheet .grab{width:44px;height:5px;border-radius:3px;background:#cfd6de;margin:2px auto 10px}
.sheet h2{margin:4px 0 14px;font-size:20px}
.sheet .menu{display:grid;gap:8px}
.sheet .menu .btn{justify-content:flex-start}
@keyframes up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
.viewer{position:fixed;inset:0;z-index:60;background:#000;display:flex;align-items:center;justify-content:center}
.viewer img{max-width:100%;max-height:100%;object-fit:contain}
.viewer button{position:absolute;top:calc(10px + var(--safe-top));right:10px;width:48px;height:48px;border-radius:24px;border:0;background:rgba(255,255,255,.2);color:#fff;font-size:26px;cursor:pointer}
.editphotos{display:flex;gap:8px;flex-wrap:wrap}
.editphotos .ph{position:relative}
.editphotos img{width:76px;height:76px;object-fit:cover;border-radius:10px;display:block}
.editphotos .del{position:absolute;top:-8px;right:-8px;width:30px;height:30px;border-radius:15px;border:2px solid #fff;background:var(--red);color:#fff;font-weight:800;cursor:pointer;line-height:1}
.segstatus{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.segstatus button{min-height:50px;border-radius:12px;border:2px solid var(--line);background:#fff;font-weight:800;cursor:pointer}
.segstatus button.on.open{border-color:var(--red);background:var(--red-bg);color:var(--red)}
.segstatus button.on.fixed{border-color:var(--amber-strong);background:var(--amber-bg);color:var(--amber)}
.segstatus button.on.checked{border-color:var(--green);background:var(--green);color:#fff}

/* toast */
.toast{position:fixed;left:50%;bottom:calc(18px + var(--safe-bottom));transform:translateX(-50%);z-index:70;background:#18212b;color:#fff;border-radius:14px;padding:10px 10px 10px 16px;display:flex;align-items:center;gap:12px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.25);max-width:calc(100% - 24px)}
.toast button{border:0;background:#2f3f52;color:#9fd0ff;font-weight:800;border-radius:10px;min-height:40px;padding:0 14px;cursor:pointer}

/* report */
.rtools{display:flex;gap:8px;flex-wrap:wrap;margin:14px 16px 0}
.rtools .btn{flex:1 1 140px}
.report{margin:14px 16px 0;padding:20px;background:#fff;border-radius:var(--radius)}
.report .rh{border-bottom:3px solid var(--navy);padding-bottom:10px;margin-bottom:12px}
.report .rkicker{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--navy-2);text-transform:uppercase}
.report h2{margin:2px 0 2px;font-size:24px;line-height:1.2}
.report .rmeta{font-size:14px;color:var(--muted)}
.report .rsum{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.report h3{margin:18px 0 6px;font-size:17px;background:#eef2f7;padding:6px 10px;border-radius:8px;break-after:avoid;page-break-after:avoid}
.report h3.trade{background:var(--navy);color:#fff}
.report h4{margin:12px 0 4px;font-size:15px}
.rtable{width:100%;border-collapse:collapse;font-size:14px}
.rtable th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);border-bottom:1px solid var(--line);padding:4px 6px}
.rtable td{border-bottom:1px solid #edf0f3;padding:6px;vertical-align:top}
.rtable tr{break-inside:avoid;page-break-inside:avoid}
.rtable .box{width:14px;height:14px;border:1.5px solid #6b7785;border-radius:3px;display:inline-block}
.rtable .box.done{background:var(--green);border-color:var(--green)}
.rst{font-weight:800;font-size:12px;text-transform:uppercase}
.rst.open{color:var(--red)} .rst.fixed{color:var(--amber)} .rst.checked{color:var(--green)}
.rphotos{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.rphotos img{width:84px;height:84px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.rsig{margin-top:28px;display:grid;grid-template-columns:1fr 1fr;gap:24px;font-size:13px;color:var(--muted)}
.rsig div{border-top:1px solid #8a97a5;padding-top:4px}
.rfoot{margin-top:16px;font-size:12px;color:var(--muted)}
.hide-sm{}
@media (max-width:420px){
  .rtable .col-room,.rtable .col-date{display:none}
  .report{padding:14px}
}
@media (min-width:700px){
  .tiles{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}
}
@media print{
  @page{margin:12mm}
  body{background:#fff;font-size:12pt}
  .topbar,.rtools,.noprint,.toast,#sheetRoot{display:none!important}
  main{max-width:none;padding:0}
  .report{margin:0;padding:0;border-radius:0;box-shadow:none}
  .rtable .col-room,.rtable .col-date{display:table-cell!important}
  .report h3{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .report h3.trade.pb{break-before:page;page-break-before:always}
  .report h3.trade.pb:first-of-type{break-before:auto;page-break-before:auto}
  .pill,.rtable .box.done{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* trade picker */
.tgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px}
.tbtn{display:flex;align-items:center;gap:6px;min-height:46px;padding:6px 8px;border:1.5px solid var(--line);border-radius:11px;background:#fff;cursor:pointer;text-align:left;touch-action:manipulation}
.tbtn .tc{flex:none;min-width:26px;height:26px;padding:0 4px;border-radius:7px;background:#e6ecf5;color:var(--navy);font-weight:800;font-size:13px;display:grid;place-items:center}
.tbtn .tn{font-size:14px;font-weight:600;line-height:1.15;overflow-wrap:anywhere}
.tbtn.on{background:var(--navy);border-color:var(--navy);color:#fff}
.tbtn.on .tc{background:#fff;color:var(--navy)}
.tbtn.auto{border-style:dashed;border-color:var(--navy-2);background:#eef4fc}
.qhint{font-size:14px;color:var(--muted);margin-top:8px;min-height:20px}
.tcode{display:inline-block;min-width:22px;padding:1px 5px;margin-right:3px;border-radius:6px;background:#e6ecf5;color:var(--navy);font-weight:800;font-size:13px;text-align:center;vertical-align:1px}
.tcode.big{min-width:40px;font-size:16px;padding:6px}
.ulist .input{min-height:44px}
details.notes{margin:12px 16px 0;padding:0 14px}
details.notes summary{min-height:48px;display:flex;align-items:center;font-weight:700;cursor:pointer}
details.notes ul{margin:0 0 12px;padding-left:20px;font-size:15px}
.tile.common .un{font-size:14px;font-weight:800}
.tsec-tools{display:flex;gap:8px;margin:0 0 6px}
.tsec-tools .btn{min-height:44px;font-size:15px;padding:6px 12px}
.rnotes{font-size:14px;background:#fff8e1;padding:8px 10px;border-radius:8px;margin-bottom:6px}
@media (max-width:420px){ .tiles{grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:6px;padding:2px 10px 12px} .tile{min-height:62px;padding:8px 4px;border-radius:10px} .tile .un{font-size:18px} .tile .uc{font-size:11px;margin-top:2px} .tiles.flat{padding:12px} }
@media print{ .tcode{-webkit-print-color-adjust:exact;print-color-adjust:exact} .rnotes{-webkit-print-color-adjust:exact;print-color-adjust:exact} }

.rtable tr.uhead td{background:#f3f6fa;font-weight:800;font-size:14px;padding:7px 6px;border-bottom:1px solid var(--line);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.rtable tr.uhead td .muted{font-weight:500;font-size:12px}
.tile.common .un{font-size:12px;overflow-wrap:normal;word-break:keep-all;letter-spacing:-.01em}
.toast span{line-height:1.25}

.tbtn{flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:52px;padding:5px 4px;text-align:center}
.tbtn .tc{min-width:0;height:auto;padding:0 6px;font-size:12px;line-height:18px;border-radius:6px}
.tbtn .tn{font-size:13.5px;overflow-wrap:normal;word-break:normal;line-height:1.15}

.lbl{display:block;font-weight:600;font-size:15px;margin:0 0 6px}

.sheet-top{position:sticky;top:-10px;z-index:5;background:#fff;margin:-10px -16px 6px;padding:10px 16px 4px;display:flex;justify-content:center;align-items:center}
.sheet-top .grab{margin:2px auto 6px}
.sheet-x{position:absolute;right:10px;top:6px;width:40px;height:40px;border-radius:20px;border:0;background:#eef1f4;font-size:20px;line-height:40px;color:#223;cursor:pointer}

/* v3 item rows: trade code first, status light last, whole row tinted */
.item{align-items:center;gap:10px;padding:10px 10px 10px 12px;border-left:6px solid transparent}
.item.st-open{background:#fff3f3;border-left-color:var(--red)}
.item.st-fixed{background:#fff8e6;border-left-color:var(--amber-strong)}
.item.st-checked{background:#eefaf1;border-left-color:var(--green);opacity:1}
.ilead{flex:none}
.ilead .tcode{min-width:34px;font-size:16px;padding:5px 6px;margin:0}
.ibody{flex:1;min-width:0}
.idesc{font-size:16px}
.light{flex:none;display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:0;padding:2px 0 0;min-width:52px;cursor:pointer;touch-action:manipulation}
.light .dot{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:900;font-size:16px;box-shadow:0 0 0 3px rgba(0,0,0,.06)}
.light.open .dot{background:var(--red)}
.light.fixed .dot{background:var(--amber-strong)}
.light.checked .dot{background:var(--green)}
.light .lt{font-size:11px;font-weight:700;color:var(--muted)}
.quick{padding:10px 12px;margin-top:16px}
.quick .input{font-size:16px}
.quick .lbl{font-size:13px}


/* v4 online: admin + subs */
.syncdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-left:8px;vertical-align:2px;background:#5fd38d}
.syncdot.busy{background:#f0b429}
.syncdot.off{background:#ff7a7a}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.row2 > :only-child{grid-column:1 / -1}
.hometop .btn{font-size:17px;padding:8px 10px;line-height:1.2;text-align:center}
.btn.wait.has{border-color:var(--amber-strong);background:var(--amber-bg)}
.badge{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 7px;border-radius:13px;background:var(--amber-strong);color:#3d2a00;font-size:15px;font-weight:800}
.bsubs{margin:10px 16px 0}
.bsubs .btn{min-height:46px;font-size:16px}
.subdone{margin-top:8px;padding:8px 10px;border-radius:10px;background:rgba(240,180,41,.18);font-size:15px}
.subdone .snote{margin-top:3px;font-style:italic}
.subdone .thumbs img{width:76px;height:76px}
.okrow{display:flex;gap:8px;margin-top:8px}
.okrow .btn{flex:1;min-height:46px;font-size:16px;padding:6px 10px}
.btn.okbtn{background:var(--green);border-color:var(--green);color:#fff}
.rejnote{margin-top:6px;padding:6px 10px;border-radius:10px;background:rgba(210,60,60,.12);color:#9d1f1f;font-size:15px;font-weight:600}
.okline{margin-top:6px;color:var(--green);font-weight:700;font-size:14px}
.subrow a{display:block;padding:12px 14px;color:var(--ink);text-decoration:none}
.srhead{display:flex;align-items:center;gap:10px}
.srhead .tcode{min-width:34px;font-size:16px;padding:5px 6px;margin:0;text-align:center}
.srname{flex:1;min-width:0;font-weight:700;font-size:18px;overflow-wrap:anywhere}
.srname small{font-weight:600;color:var(--muted);font-size:15px}
.srdone{font-weight:800;font-size:16px;color:var(--muted)}
.pbar{display:flex;height:8px;border-radius:4px;background:#f3c9c9;overflow:hidden;margin-top:10px}
.pbar.big{height:14px;border-radius:7px;margin:10px 0 6px}
.pbar i{display:block;height:100%}
.pbar i.g{background:var(--green)}
.pbar i.y{background:var(--amber-strong)}
.pill.nolink{background:#e9f1fb;color:var(--navy-2)}
.actline{margin-top:8px;font-size:14px;font-weight:600;color:var(--green)}
.actlist{list-style:none;margin:0 16px;padding:4px 14px}
.actlist li{padding:10px 0;border-top:1px solid var(--line);font-size:15px}
.actlist li:first-child{border-top:0}
.linkrow{padding:12px 14px}
.linkrow.revoked{opacity:.55}
.linkrow .row .btn{min-height:46px;font-size:15px;padding:6px 8px}
.btn.wa{background:#1fa855;border-color:#1fa855;color:#fff}
.linkbox{padding:12px;border-radius:12px;background:var(--grey-bg);font-size:14px;overflow-wrap:anywhere;user-select:all;-webkit-user-select:all}
.tn small{font-weight:600;opacity:.7}
.mergecard{margin:12px 16px 0;padding:14px;border:2px solid var(--amber-strong)}
.mergecard p{margin:6px 0 12px;font-size:15px}
.mergelist{margin:0 0 12px;padding-left:20px;font-size:15px}
.mergelist li{margin:3px 0}
.login{margin-top:22px}
.errmsg{margin:0;color:var(--red);font-weight:700}
img.missing{background:#eee;outline:1px dashed #ccc}
/* sub page */
.subpage .progcard{margin:14px 16px 0;padding:14px}
.pnum{font-size:20px}
.pnum b{font-size:28px}
.aptgroup{margin:18px 16px 8px;font-weight:800;font-size:17px;display:flex;justify-content:space-between;align-items:baseline;padding-bottom:4px;border-bottom:2px solid var(--line)}
.aptgroup span{font-size:13px;font-weight:600;color:var(--muted)}
.subacts{margin-top:8px}
.subacts:empty{display:none}
.btn.donebtn{min-height:48px;min-width:120px;background:var(--navy);border-color:var(--navy);color:#fff;font-size:18px}
.camerabtn{min-height:76px}
.subpage .light{cursor:default}

/* All apts: each floor on its own row */
.flatcard{padding:4px 0 2px}
.flatcard .flabel{margin:10px 16px 0;font-size:13px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.flatcard .tiles.flat{padding:6px 16px 8px}
.flatcard .flabel + .tiles.flat{border-bottom:1px solid var(--line)}
.flatcard .tiles.flat:last-child{border-bottom:0}

/* ================= v5 look: calm, clean rows; colour only on the trade badge and the status dot ================= */
:root{
  --navy:#16283f; --navy-2:#2f5d93; --bg:#f4f5f7; --card:#fff; --ink:#151b26; --muted:#6b7480; --line:#e6e8ec; --line-2:#eef0f3;
  --s-open:#e5484d; --s-prog:#f2b200; --s-sub:#7fd19a; --s-done:#16794a;
  --red:#d93f44; --red-bg:#fdeeee; --green:#16794a; --green-bg:#e7f6ed; --amber:#9a6a00; --amber-strong:#f2b200; --amber-bg:#fff7de;
  --radius:16px; --tap:48px;
}
body{font-size:16px;line-height:1.38;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;letter-spacing:-.005em}
.topbar{min-height:56px;background:linear-gradient(180deg,#1b3150,#15273e);box-shadow:0 1px 0 rgba(0,0,0,.12),0 6px 18px -12px rgba(10,20,40,.6)}
.topbar h1{font-size:18px;font-weight:650;letter-spacing:-.01em}
.subtitle{font-size:12.5px;opacity:.72;margin-top:1px}
.card{border-radius:var(--radius);box-shadow:0 1px 2px rgba(16,24,40,.05),0 0 0 1px rgba(16,24,40,.05)}
.section-title{font-size:12px;letter-spacing:.07em;font-weight:700;color:#7a838f;margin:20px 18px 8px}
.btn{min-height:46px;border-radius:12px;border:1px solid #dde1e6;font-size:16px;font-weight:600;box-shadow:0 1px 1px rgba(16,24,40,.04);padding:8px 16px}
.btn.big{min-height:54px;font-size:17px}
.btn.primary{background:var(--navy);border-color:var(--navy);box-shadow:0 2px 6px -2px rgba(22,40,63,.5)}
.btn.ghost{box-shadow:none}
.btn.small{min-height:40px;font-size:14.5px}
.btn.danger{border-color:#f1d0d1}
select,.input,textarea{border:1px solid #dadee4;border-radius:12px;min-height:46px;font-size:16px}
.input:focus,select:focus,textarea:focus{border-color:#8fb0d8;box-shadow:0 0 0 3px rgba(47,93,147,.14);outline:none}
.seg{background:#e8ebef;border-radius:12px;margin:12px 16px 0}
.seg button{min-height:38px;font-size:15px;border-radius:9px}
.filters select{font-size:14px;min-height:42px}
.search input{min-height:44px}
.search svg{top:12px}

/* status dots */
.sdot{display:inline-block;flex:none;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:0;background:#c7ccd3;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sdot.open{background:var(--s-open)} .sdot.progress{background:var(--s-prog)} .sdot.fixed{background:var(--s-sub)} .sdot.checked{background:var(--s-done)}
.pill{background:#f1f3f6;color:#3b4350;font-weight:600;font-size:13px;padding:3px 9px;gap:0}
.pill.dp{background:#f3f4f6}
.pill.nolink{color:var(--muted)}
.mini .pill{font-size:12.5px;padding:2px 8px;background:#f4f5f7}
.counts{gap:6px;margin-top:8px}
.legend{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;margin:18px 16px 0;font-size:12px;color:#7a838f}
.legend span{display:inline-flex;align-items:center}
.legend .sdot{width:8px;height:8px;margin-right:5px}

/* home */
.blist{gap:10px}
.bcard{padding:15px 16px 13px}
.bcard .addr{font-size:19px;font-weight:700;letter-spacing:-.01em}
.bcard .chev{top:17px;color:#b4bcc6}
.hometop .btn{font-size:15.5px}
.btn.wait.has{border-color:#bfe6cc;background:#f0faf3;color:#0f5132}
.badge{background:var(--s-sub);color:#0b3d22;min-width:24px;height:24px;font-size:14px}

/* building summary */
.summary{grid-template-columns:repeat(4,1fr);gap:8px;padding:12px 16px 2px}
.sumbox{background:#fff;border-radius:14px;padding:9px 4px 8px;box-shadow:0 1px 2px rgba(16,24,40,.05),0 0 0 1px rgba(16,24,40,.05)}
.sumbox b{font-size:21px;font-weight:700;color:var(--ink)!important;letter-spacing:-.02em}
.sumbox span{display:inline-flex;align-items:center;font-size:11.5px;font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted)!important;white-space:nowrap}
.sumbox span .sdot{width:8px;height:8px;margin-right:4px}
.sumbox.on,.sumbox.open.on,.sumbox.fixed.on,.sumbox.checked.on,.sumbox.progress.on{box-shadow:0 0 0 2px var(--navy-2)}
.bsubs .btn{min-height:44px;font-size:15px}

/* building notes */
.bnotes{margin:12px 16px 0;padding:10px 14px 10px;background:#fffbea;box-shadow:0 0 0 1px #f3e3a6}
.bnotes .nhead{display:flex;align-items:center;gap:8px;min-height:30px;font-weight:700;font-size:15px;list-style:none;cursor:pointer}
.bnotes summary::-webkit-details-marker{display:none}
.bnotes .ntitle{flex:1}
.bnotes .ncount{font-size:12px;font-weight:700;color:#8a6d00;background:#fdf0c2;border-radius:10px;padding:1px 8px}
.bnotes .nedit{border:0;background:transparent;color:var(--navy-2);font-weight:600;font-size:14px;min-height:32px;padding:0 4px;cursor:pointer}
.bnotes ul{margin:4px 0 2px;padding-left:20px;font-size:15px;color:#3a3220}
.bnotes li + li{margin-top:3px}
.bnotes a,.linknote a,.lnote a{color:var(--navy-2);font-weight:700;text-decoration:none;border-bottom:1px dashed currentColor}
details.bnotes:not([open]) ul{display:none}
.notesadd{margin:8px 12px -4px;text-align:right}
.notesadd .btn{min-height:34px;font-size:14px;padding:4px 8px;color:var(--navy-2)}

/* floors & tiles: neutral tiles, a small dot says the state */
.floor{margin:12px 16px 0}
.floorhead{min-height:50px;padding:8px 14px}
.floorhead .fname{font-size:16px;font-weight:700}
.tiles{grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:7px;padding:2px 12px 12px}
.tile,.tile.s-open,.tile.s-fixed,.tile.s-done{position:relative;min-height:60px;padding:8px 6px 7px;border-radius:12px;background:#fff;border:1px solid var(--line);box-shadow:0 1px 1px rgba(16,24,40,.03)}
.tile.s-empty{background:#f7f8fa;border-color:#eceef1}
.tile.s-empty .un{color:#8a929c}
.tile .un{font-size:17px;font-weight:700;letter-spacing:-.01em}
.tile .uc,.tile.s-open .uc,.tile.s-fixed .uc,.tile.s-done .uc{font-size:11.5px;font-weight:600;color:var(--muted);margin-top:2px}
.tile .tdot{position:absolute;top:7px;right:7px;width:9px;height:9px;margin:0}
.tile.common .un{font-size:14px}
.flatcard .flabel{font-size:12px;letter-spacing:.06em;color:#7a838f}

/* item rows: white, compact, one clean list */
.ilist{display:block;background:#fff;margin:0 16px;padding:0;border-radius:var(--radius);box-shadow:0 1px 2px rgba(16,24,40,.05),0 0 0 1px rgba(16,24,40,.05);overflow:hidden}
.ilist > li + li{border-top:1px solid var(--line-2)}
.item,.item.st-open,.item.st-progress,.item.st-fixed,.item.st-checked{display:flex;align-items:center;gap:10px;padding:9px 6px 9px 12px;background:#fff;border-left:0;border-radius:0;box-shadow:none;opacity:1}
.item.st-checked .idesc{text-decoration:none}
.ilead{flex:none;display:flex;flex-direction:column;gap:3px}
.ilead .tcode{min-width:30px;height:26px;line-height:26px;padding:0 6px;font-size:13px;font-weight:700;border-radius:8px;margin:0}
.tcode{border-radius:6px;font-weight:700;font-size:12px;padding:1px 5px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.idesc{font-size:15.5px;font-weight:500;line-height:1.3;color:var(--ink)}
.imeta{font-size:12.5px;color:#8a929c;margin-top:2px}
.thumbs img{width:48px;height:48px;border-radius:8px}
.light{min-width:46px;min-height:44px;gap:3px;padding:0;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.light .dot{width:20px;height:20px;font-size:11px;box-shadow:none}
.light.open .dot{background:var(--s-open)}
.light.progress .dot{background:var(--s-prog)}
.light.fixed .dot{background:var(--s-sub)}
.light.checked .dot{background:var(--s-done)}
.light .lt{font-size:10px;font-weight:600;color:#8a929c;letter-spacing:.01em}
.light:active .dot{transform:scale(.88)}
.unitgroup{margin:16px 18px 6px;font-size:14.5px;font-weight:700}
.unitgroup a{font-size:14px}
.unithead{display:flex;align-items:center;justify-content:space-between;gap:8px;text-transform:none;letter-spacing:0;font-size:13px;color:var(--muted)}
.unithead .mini{display:flex;gap:4px}
.status-help{font-size:12px;color:#8a929c;margin:8px 18px 0}
.subdone{background:#eefaf2;box-shadow:0 0 0 1px #cdeed8;font-size:14px;margin-top:6px}
.rejnote{font-size:14px}
.okrow .btn{min-height:42px;font-size:15px}
.btn.okbtn{background:var(--s-done);border-color:var(--s-done)}
.quick{margin-top:16px}
.quick .input{font-size:16px}

/* status menu (hold the dot) */
.stmenu{display:grid;gap:8px}
.stopt{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:8px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;cursor:pointer}
.stopt .sdot{width:16px;height:16px;margin:0}
.stopt span{flex:1;display:flex;flex-direction:column}
.stopt b{font-size:16px}
.stopt small{font-size:13px;color:var(--muted)}
.stopt em{font-style:normal;font-size:12px;font-weight:700;color:var(--navy-2)}
.stopt.on{border-color:var(--navy-2);box-shadow:0 0 0 1px var(--navy-2)}
.segstatus{grid-template-columns:1fr 1fr}
.segstatus button{display:flex;align-items:center;justify-content:center;min-height:46px;font-weight:700;font-size:15px;border-width:1px}
.segstatus button.on,.segstatus button.on.open,.segstatus button.on.fixed,.segstatus button.on.checked,.segstatus button.on.progress{background:#f2f6fb;border-color:var(--navy-2);color:var(--ink);box-shadow:0 0 0 1px var(--navy-2)}
.checks .check .sdot{margin-right:0}

/* by subs / links */
.subrow,.linkrow{margin:0}
ul.ilist > li.subrow,ul.ilist > li.linkrow{border-radius:0;box-shadow:none}
.srhead .tcode{min-width:32px;height:28px;line-height:28px;padding:0 6px;font-size:14px;border-radius:8px}
.srname{font-size:16.5px}
.pbar{height:7px;background:#f6d4d5}
.pbar i.lg{background:var(--s-sub)}
.pbar i.y{background:var(--s-prog)}
.pbar i.g{background:var(--s-done)}
.lnote{margin-top:10px;padding:9px 12px;border-radius:12px;background:#fffbea;box-shadow:0 0 0 1px #f3e3a6;font-size:14.5px;overflow-wrap:anywhere}
.actline{color:var(--s-done)}

/* sub page */
.subpage .linknote{margin:14px 16px 0;padding:12px 14px;background:#fffbea;box-shadow:0 0 0 1px #f0dc94}
.linknote .lnhead{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#8a6d00;margin-bottom:4px}
.linknote .lnbody{font-size:17px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.subpage .progcard{padding:12px 14px}
.subpage .pnum{font-size:15px}
.subpage .pnum b{font-size:22px}
.aptgroup{margin:18px 18px 6px;font-size:14.5px;border-bottom:0;padding-bottom:0}
.subacts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.subacts .btn{min-height:42px;font-size:15px;padding:6px 14px}
.btn.donebtn{min-width:96px;font-size:15.5px;background:var(--navy)}
.btn.startbtn{background:#fff}
.btn.undobtn{color:var(--muted)}
.startline{margin-top:5px;font-size:13.5px;font-weight:600;color:#8a6300;display:flex;align-items:center}
.okline{color:var(--s-done);font-size:13.5px}
.sublegend{margin-top:20px}

/* reports */
.rst{display:inline-flex;align-items:center;font-size:11.5px;font-weight:700;text-transform:none;color:var(--ink)!important}
.rst .sdot{width:8px;height:8px;margin-right:5px}
.rtable .box.done{background:var(--s-done);border-color:var(--s-done)}
.report .legend.rlegend{justify-content:flex-start;margin:6px 0 10px}
.report .rsum .pill{font-size:12.5px}
@media print{ .sdot,.pbar i{-webkit-print-color-adjust:exact;print-color-adjust:exact} }

.pill.dp,.pill.dp.open,.pill.dp.fixed,.pill.dp.checked,.pill.dp.progress{background:#f3f4f6;color:#3b4350}
.subpage .item{align-items:flex-start}
.subpage .item .light{padding-top:4px}
.subpage .ilead{padding-top:1px}

.item,.item.st-open,.item.st-progress,.item.st-fixed,.item.st-checked{align-items:flex-start}
.ilead{padding-top:1px}
.light{margin:-6px 0 -6px}
.ibody{padding-top:2px}

/* v6: the sub's in-progress note + who/when history */
.startline{display:block}
.startline .slrow{display:flex;align-items:center}
.startline .snote{margin-top:3px;font-style:italic;font-weight:500;color:#5c4500}
.progbox{margin-top:6px;padding:7px 10px;border-radius:10px;background:#fff8e1;box-shadow:0 0 0 1px #f3e2a8;font-size:14px;color:#5c4500}
.progbox .snote{font-style:italic;margin-top:2px}
.progbox .thumbs img{width:64px;height:64px}
.btn.progbtn{background:#fff7d6;border-color:#e9c445;color:#5c4500}
.btn.notebtn{color:#8a6300}
.hline{font-size:11.5px;color:#9aa1a9;margin-top:3px;line-height:1.3}
.histwrap summary{cursor:pointer;list-style:none;font-weight:700;font-size:14px;color:var(--muted)}
.histwrap summary::-webkit-details-marker{display:none}
.hist{list-style:none;margin:6px 0 0;padding:0}
.hist li{display:flex;gap:6px;padding:8px 0;border-top:1px solid var(--line);font-size:14px;line-height:1.35}
.hist li:first-child{border-top:0}
.hist li .sdot{margin-top:5px}
.hist .hw{color:#8a929c;font-size:12.5px}
.hist .hn{font-style:italic;margin-top:2px}
.hist .thumbs{margin-top:5px}
.hist .thumbs img{width:56px;height:56px}
.phcap{font-size:10.5px;color:#9aa1a9;text-align:center;margin-top:3px;width:76px;line-height:1.2}
.actlist .anote{font-style:italic;color:#5c4500}

/* v6 home: Waiting = a bell in the header; Add building = a small box at the bottom */
.waitbtn{position:relative}
.waitbtn.on{background:rgba(255,255,255,.14)}
.wbadge{position:absolute;top:5px;right:4px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e5484d;color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center;box-shadow:0 0 0 2px #182c46}
.addbld{padding:4px 16px 0}
.addbox{display:block;width:100%;min-height:46px;border:1.5px dashed #c4ccd6;border-radius:14px;background:transparent;color:#5b6573;font-size:15px;font-weight:600;cursor:pointer}
.addbox:active{background:#eef1f5}

/* v6: every item is its own small card, with a little gap between */
.ilist{display:grid;gap:6px;background:transparent;box-shadow:none;border-radius:0;overflow:visible;margin:0 16px;padding:0}
.ilist > li + li{border-top:0}
.ilist > li,ul.ilist > li.subrow,ul.ilist > li.linkrow{background:#fff;border-radius:12px;box-shadow:0 1px 2px rgba(16,24,40,.06),0 0 0 1px rgba(16,24,40,.07)}
.item,.item.st-open,.item.st-progress,.item.st-fixed,.item.st-checked{border-radius:12px;background:#fff}
#blist{margin-top:14px}
.subacts .btn.ghost{padding:6px 10px;min-width:0}
.subacts{gap:6px}
.subacts .btn.ghost{padding:6px 8px;font-size:14.5px}
.btn.startbtn{font-weight:600;color:#5b6573}

.hero{margin:14px 0 16px;padding:18px 18px 16px;border-radius:18px;color:#fff;background:linear-gradient(135deg,#1f3a5f 0%,#2f6690 60%,#3a86a8 100%);box-shadow:0 6px 18px rgba(31,58,95,.18)}
.hero-date{font-size:12px;opacity:.8;letter-spacing:.3px;text-transform:uppercase}
.hero-hi{font-size:22px;font-weight:700;margin:4px 0 14px}
.hero-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.hero-stats div{background:rgba(255,255,255,.14);border-radius:12px;padding:8px 4px;text-align:center}
.hero-stats b{display:block;font-size:17px}
.hero-stats span{font-size:10.5px;opacity:.85}

/* ---- v8: calm building screen ---- */
.nstrip{margin:8px 16px 0;background:#fffbea;border:1px solid #f3e3a6;border-radius:12px;overflow:hidden}
.nstrip .nline{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:6px 12px;border:0;background:transparent;text-align:left;font-size:15px;color:#5c4a12;cursor:pointer}
.nstrip .nicon{font-size:14px;flex:none}
.nstrip .ntext{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.nstrip .ncount{flex:none;font-size:12px;font-weight:700;color:#8a6d12;background:#fbefc2;border-radius:999px;padding:1px 7px}
.nstrip .chev{flex:none;color:#a88a2a;transition:transform .15s}
.nstrip.open .chev{transform:rotate(180deg)}
.nstrip ul{margin:0;padding:0 14px 4px 32px;font-size:15px;color:#3d3210}
.nstrip li{margin:3px 0;overflow-wrap:anywhere}
.nstrip .nfoot{display:flex;justify-content:flex-end;padding:0 10px 8px}
.nstrip .nedit{border:0;background:transparent;color:var(--navy-2);font-weight:700;font-size:14px;padding:6px 6px;cursor:pointer}
.bsearchrow{display:flex;gap:8px;margin:10px 16px 0;align-items:center}
.bsearchrow .search{margin:0;flex:1}
.bsearchrow .search input{min-height:44px;font-size:16px}
.bsearchrow .search svg{top:12px}
.fbtn{position:relative;flex:none;width:44px;height:44px;border-radius:12px;border:1.5px solid var(--line);background:#fff;color:var(--muted);display:flex;align-items:center;justify-content:center;cursor:pointer}
.fbtn.on{border-color:var(--navy);color:var(--navy);background:#eef3fa}
.fbtn .fn{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;border-radius:9px;background:var(--navy);color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 4px}
.bstat{display:flex;flex-wrap:nowrap;gap:2px;margin:6px 12px 0;overflow-x:auto;scrollbar-width:none}
.bstat::-webkit-scrollbar{display:none}
.bstat .bs{flex:none;display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;padding:4px 5px;min-height:30px;font-size:13px;color:var(--muted);cursor:pointer;white-space:nowrap}
.bstat .bs b{color:var(--ink);font-weight:700}
.bstat .bs .sdot{width:9px;height:9px}
.bstat.filt{justify-content:space-between;align-items:center;margin:6px 16px 0;font-size:13px;color:var(--muted)}
.bstat.filt span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bstat.filt button{flex:none;border:0;background:transparent;color:var(--navy-2);font-weight:700;font-size:14px;padding:4px 2px;min-height:30px;cursor:pointer}
.fl{margin:12px 16px 0;padding-top:8px;border-top:1px solid var(--line)}
#bbody .fl:first-child{border-top:0;padding-top:2px;margin-top:6px}
.fl .flh{display:flex;align-items:center;gap:8px;margin:0 2px 7px}
.fl .fname{font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.fl .mini{display:flex;gap:4px;margin-left:auto}
.fl .mini .pill{font-size:12px;padding:1px 7px;background:transparent}
.fl .tiles{padding:0}
.fsheet .fsec{margin-top:14px}
.fsheet .fsec .lbl{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.fsheet .chips{flex-wrap:wrap;overflow:visible;margin-top:6px}
.fsheet .chip{min-height:38px;font-size:14px;padding:5px 12px;display:inline-flex;align-items:center;gap:6px}
.fsheet .chip small{color:inherit;opacity:.65;font-weight:600}
.fsheet .chip .tcode{font-size:11px;min-width:0}
.fsheet .chip .sdot{width:9px;height:9px}

/* apt tile status = small square (Yoely Nov 2) */
.tile .tdot{border-radius:2.5px!important;width:10px;height:10px}

/* apt tiles: status = colored box outline, no dot (Yoely Nov 2 8:03) */
.tile .tdot{display:none!important}
.tile.tb-open{border:2px solid var(--s-open)!important}
.tile.tb-progress{border:2px solid var(--s-prog)!important}
.tile.tb-fixed{border:2px solid var(--s-sub)!important}
.tile.tb-checked{border:2px solid var(--s-done)!important}

/* compact welcome (Yoely Nov 2 8:06: blue box too much) */
.hero{display:none}
.hero2{margin:14px 4px 12px}
.hero2-hi{font-size:22px;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.hero2-sub{font-size:13px;color:var(--muted);margin-top:2px}
.hero2-sub b{color:var(--s-sub, #3a9d5d)}

/* blue welcome card, compact (Yoely 8:07: liked it, just too big) */
.hero2{box-sizing:border-box;max-width:100%;margin:12px 0 12px;padding:12px 14px;border-radius:14px;color:#fff;background:linear-gradient(135deg,#1f3a5f 0%,#2f6690 65%,#3a86a8 100%);box-shadow:0 3px 10px rgba(31,58,95,.15);overflow:hidden}
.hero2-hi{font-size:18px;font-weight:700;color:#fff}
.hero2-sub{font-size:12px;color:rgba(255,255,255,.85);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hero2-sub b{color:#b9f5cf}

.hero2-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px}
.hero2-stats div{min-width:0;background:rgba(255,255,255,.15);border-radius:10px;padding:6px 2px;text-align:center}
.hero2-stats b{display:block;font-size:15px;line-height:1.2;color:#fff}
.hero2-stats span{display:block;font-size:10px;color:rgba(255,255,255,.85);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* home: header + welcome as one piece (Yoely 8:11) */
body.home .topbar{box-shadow:none;background:#15273e}
body.home .hero2{margin:0 0 14px;border-radius:0 0 22px 22px;padding:2px 18px 16px;background:linear-gradient(180deg,#15273e 0%,#1f3a5f 45%,#2f6690 100%);box-shadow:0 8px 18px -10px rgba(16,30,55,.55)}
body.home .hero2-hi{font-size:19px}

.hero2-top{display:flex;align-items:center;gap:12px}
.plogo{width:40px;height:40px;flex:none;filter:drop-shadow(0 2px 4px rgba(0,0,0,.25))}

/* home: header+welcome as one floating card, rounded top and bottom (Yoely 8:14) */
body.home::before{content:"";position:fixed;left:0;right:0;top:0;height:var(--safe-top,0px);background:#15273e;z-index:30}
body.home .topbar{margin:calc(var(--safe-top,0px) + 10px) 12px 0;padding-top:8px;top:var(--safe-top,0px);border-radius:22px 22px 0 0;background:#15273e;box-shadow:none}
body.home .hero2{margin:0 12px 14px;border-radius:0 0 22px 22px}
body.home .topbar{position:relative;top:0}

/* ---- v17 sub page: status = colored card border (Yoely Nov 2 8:20 PM) ---- */
.subpage .ilist{gap:8px}
.subpage .ilist > li.item.sc{border:2px solid var(--s-open);border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.05);padding:10px 12px 10px 10px;align-items:flex-start}
.subpage .ilist > li.item.sc-progress{border-color:var(--s-prog);background:#fffdf5}
.subpage .ilist > li.item.sc-fixed{border-color:var(--s-sub);background:#f8fdf9}
.subpage .ilist > li.item.sc-checked{border-color:var(--s-done);background:#f4faf6}
.subpage .item.sc .ibody{flex:1;min-width:0}
.subpage .item.sc .idesc{font-size:16px;line-height:1.3}
.subpage .wholine{margin-top:5px;font-size:12.5px;color:#7a828c;line-height:1.35}
.subpage .wholine b{font-weight:700}
.subpage .wl-prog{color:#946c00}
.subpage .wl-sub{color:#2f8f52}
.subpage .wl-ok{color:var(--s-done)}
.subpage .item.sc .snote{margin-top:3px;font-size:13.5px;font-style:italic;color:#4b5563}
.subpage .item.sc .thumbs{margin-top:6px}
.subpage .item.sc .thumbs img{width:64px;height:64px}
.subacts2{display:flex;align-items:center;gap:8px;margin-top:9px}
.sbtn{flex:0 0 auto;min-height:34px;padding:0 14px;border-radius:9px;border:1px solid #d5dae0;background:#fff;color:var(--ink);font-size:14px;font-weight:600;cursor:pointer;touch-action:manipulation;font-family:inherit}
.sbtn:active{transform:scale(.97)}
.sbtn.sb-done{border-color:#9fdcb3;color:#17703f;background:#f3fbf6}
.sbtn.sb-prog{border-color:#f0d78a;color:#8a6300;background:#fffbea}
.undolink{margin-left:auto;background:none;border:0;padding:6px 2px;color:#7a828c;font-size:13px;text-decoration:underline;cursor:pointer;font-family:inherit}
.subacts2 .undolink:only-child{margin-left:0}
.ssq{display:inline-block;width:12px;height:12px;border-radius:3px;border:2px solid var(--s-open);background:#fff;margin-right:5px;vertical-align:-1px}
.ssq.progress{border-color:var(--s-prog)} .ssq.fixed{border-color:var(--s-sub)} .ssq.checked{border-color:var(--s-done)}

/* approve celebration (Yoely 8:35) */
.celeb{position:fixed;inset:0;z-index:9999;pointer-events:none;display:flex;align-items:center;justify-content:center;transition:opacity .35s}
.celeb.out{opacity:0}
.celeb-badge{display:flex;flex-direction:column;align-items:center;gap:10px;animation:celPop .5s cubic-bezier(.2,1.6,.4,1) both}
.celeb-badge svg{width:92px;height:92px;filter:drop-shadow(0 8px 18px rgba(22,163,74,.45))}
.celeb-badge circle{fill:#16a34a}
.celeb-badge path{fill:none;stroke:#fff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:40;stroke-dashoffset:40;animation:celDraw .35s .22s ease-out forwards}
.celeb-t{background:#fff;color:#166534;font-weight:700;font-size:15px;padding:7px 14px;border-radius:999px;box-shadow:0 6px 18px rgba(0,0,0,.15)}
.celeb i{position:absolute;left:50%;top:46%;width:8px;height:12px;border-radius:2px;opacity:0;animation:celBurst .95s ease-out forwards}
@keyframes celPop{0%{transform:scale(.3);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes celDraw{to{stroke-dashoffset:0}}
@keyframes celBurst{0%{transform:translate(-50%,-50%) rotate(0);opacity:1}100%{transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y) + 60px)) rotate(var(--r));opacity:0}}

.okpill{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:3px 10px 3px 4px;border-radius:999px;background:#dcfce7;color:#166534;font-weight:700;font-size:12.5px}
.okpill span{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#16a34a;color:#fff;font-size:11px}

/* Reminders-style quick add (Yoely Nov 8) */
.qadd{margin:10px 16px 0;padding:10px 12px 8px;background:#fff;border-radius:14px;box-shadow:0 1px 2px rgba(16,24,40,.06)}
.qrow{display:flex;align-items:center;gap:10px}
.qcirc{flex:none;width:26px;height:26px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:19px;line-height:1}
.qinput{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:17px;padding:8px 0;color:inherit}
.qinput::placeholder{color:#9aa4b2}
.qbar{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin-top:6px;padding:2px 0 2px 36px}
.qbar::-webkit-scrollbar{display:none}
.qchip{flex:none;display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:4px 11px;border-radius:999px;border:1px solid var(--line);background:#f4f6f9;font-size:14px;font-weight:600;color:var(--navy);cursor:pointer;white-space:nowrap;touch-action:manipulation}
.qchip svg{width:18px;height:18px}
.qchip .tcode{margin-right:2px}
.qchip.on{background:var(--navy);border-color:var(--navy);color:#fff}
.qchip.on .tcode{background:rgba(255,255,255,.2);color:#fff}
.qchip.set{background:#e6ecf5;border-color:#c9d4e5}
.qchip.qgo{margin-left:auto;background:var(--navy);border-color:var(--navy);color:#fff}
.qpanel{padding-left:36px}
.qpanel .tgrid{margin-top:8px}
.qadd .pending{padding-left:36px}
.qadd .qhint{font-size:12.5px;padding-left:36px;margin-top:4px;min-height:16px}

.chip .tcode{margin-right:4px}
.chip.on .tcode{background:rgba(255,255,255,.2);color:#fff}
