/* SECTION FURNITURE — design system */
@font-face{font-family:Cairo;font-weight:400;font-display:swap;src:url('../fonts/cairo-arabic-400-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Cairo;font-weight:600;font-display:swap;src:url('../fonts/cairo-arabic-600-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Cairo;font-weight:700;font-display:swap;src:url('../fonts/cairo-arabic-700-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Cairo;font-weight:800;font-display:swap;src:url('../fonts/cairo-arabic-800-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Cairo;font-weight:400;font-display:swap;src:url('../fonts/cairo-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:Cairo;font-weight:600;font-display:swap;src:url('../fonts/cairo-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:Cairo;font-weight:700;font-display:swap;src:url('../fonts/cairo-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:Cairo;font-weight:800;font-display:swap;src:url('../fonts/cairo-latin-800-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}

:root{
  --grid-line:color-mix(in srgb,var(--text) 19%,var(--surface));
  --fs:1;--r:10px;--r-sm:7px;--r-lg:14px;
  --sh-1:0 1px 2px rgba(20,16,10,.06),0 1px 3px rgba(20,16,10,.06);
  --sh-2:0 6px 18px rgba(20,16,10,.10),0 2px 6px rgba(20,16,10,.06);
  --sh-3:0 18px 50px rgba(10,8,5,.22),0 4px 14px rgba(10,8,5,.12);
  --side-w:232px;--top-h:56px;--row-h:34px;--pad:16px;
  --ease:cubic-bezier(.2,.7,.2,1);
}
html[data-tone="dark"],html[data-tone="mid-dark"]{--sh-1:0 1px 2px rgba(0,0,0,.35);--sh-2:0 8px 22px rgba(0,0,0,.35);--sh-3:0 20px 60px rgba(0,0,0,.55)}
html[data-density="compact"]{--row-h:29px;--pad:12px}
*{box-sizing:border-box}
html{font-size:calc(14px * var(--fs));-webkit-text-size-adjust:100%}
html,body{margin:0;height:100%;overflow:hidden}
body{font-family:Cairo,'Segoe UI',Tahoma,sans-serif;background:var(--bg);color:var(--text);line-height:1.55;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--primary)}
::selection{background:var(--primary-soft)}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:10px;border:2px solid transparent;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:content-box;border:2px solid transparent}
*::-webkit-scrollbar-track{background:transparent}
.hidden{display:none!important}
.muted{color:var(--muted)}
.t2{color:var(--text-2)}
.num{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:plaintext}
.row{display:flex;align-items:center;gap:8px}
.col{display:flex;flex-direction:column;gap:8px}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.spacer{flex:1}
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.svg{width:1.15em;height:1.15em;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.18em}

/* ---------- shell ---------- */
#app{display:grid;grid-template-columns:var(--side-w) 1fr;height:100vh;height:100dvh}
html.side-mini #app{grid-template-columns:68px 1fr}
.side{background:var(--side);color:var(--side-text);display:flex;flex-direction:column;min-height:0;position:relative;z-index:5}
.side .brand{display:flex;align-items:center;gap:10px;padding:16px 16px 12px}
.side .brand img{width:38px;height:38px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.side .brand .bt{font-weight:800;letter-spacing:.4px;font-size:.98rem;line-height:1.1}
.side .brand .bs{font-size:.74rem;color:var(--side-muted)}
.nav{flex:1;overflow:auto;padding:6px 10px;display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:10px;color:var(--side-text);text-decoration:none;font-weight:600;font-size:.93rem;opacity:.9;transition:background .15s,opacity .15s;position:relative;white-space:nowrap}
.nav a .svg{width:1.3em;height:1.3em;opacity:.85}
.nav a:hover{background:var(--side-active);opacity:1}
.nav a.on{background:var(--side-active);opacity:1}
.nav a.on::before{content:'';position:absolute;inset-inline-start:-10px;top:8px;bottom:8px;width:4px;border-radius:0 4px 4px 0;background:var(--side-accent)}
.nav .sep{height:1px;background:rgba(255,255,255,.09);margin:8px 6px}
html[data-theme="paper"] .nav .sep{background:var(--border)}
.side .foot{padding:10px;display:flex;gap:6px;align-items:center;border-top:1px solid rgba(255,255,255,.08)}
html[data-theme="paper"] .side .foot{border-color:var(--border)}
.side .who{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:10px;cursor:pointer}
.side .who:hover{background:var(--side-active)}
.side .who .av{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--side-accent);color:#1b1208;font-weight:800;font-size:.85rem;flex:none}
.side .who .nm{font-size:.84rem;font-weight:700;line-height:1.15}
.side .who .rl{font-size:.72rem;color:var(--side-muted)}
.side .sbtn{width:34px;height:34px;border-radius:9px;border:0;background:transparent;color:var(--side-text);display:grid;place-items:center;cursor:pointer;opacity:.85}
.side .sbtn:hover{background:var(--side-active);opacity:1}
html.side-mini .side .brand .bt,html.side-mini .side .brand .bs,html.side-mini .nav a span,html.side-mini .side .who .txt{display:none}
html.side-mini .nav a{justify-content:center;padding:10px}
html.side-mini .side .foot{flex-direction:column}

.main{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}
.top{height:var(--top-h);display:flex;align-items:center;gap:10px;padding:0 var(--pad);background:var(--top);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);position:relative;z-index:4;flex:none}
.top h1{margin:0;font-size:1.08rem;font-weight:800;white-space:nowrap}
.crumbs{display:flex;align-items:center;gap:6px;min-width:0;color:var(--muted);font-size:.9rem}
.crumbs a{color:var(--text-2);text-decoration:none;font-weight:600}
.crumbs a:hover{color:var(--primary)}
.crumbs .svg{width:.9em;height:.9em;opacity:.6}
.top .search{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:0 10px;height:36px;width:min(340px,30vw);color:var(--muted);cursor:text}
.top .search span{flex:1;font-size:.88rem}
.top .search kbd{font-family:inherit;font-size:.72rem;border:1px solid var(--border-2);border-radius:5px;padding:0 5px;color:var(--muted)}
.page{flex:1;overflow:auto;padding:var(--pad);min-height:0;position:relative}
.page.full{padding:0;display:flex;flex-direction:column;overflow:hidden}
.bnav{display:none}

/* ---------- controls ---------- */
.btn{--bc:var(--border);height:36px;padding:0 13px;border-radius:9px;border:1px solid var(--bc);background:var(--surface);color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:600;font-size:.9rem;cursor:pointer;white-space:nowrap;transition:background .12s,border-color .12s,box-shadow .12s,transform .05s;user-select:none}
.btn:hover{background:var(--surface-2);border-color:var(--border-2)}
.btn:active{transform:translateY(1px)}
.btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus)}
.btn[disabled]{opacity:.5;pointer-events:none}
.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}
.btn.primary:hover{background:var(--primary-2);border-color:var(--primary-2)}
.btn.accent{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.ghost{background:transparent;border-color:transparent}
.btn.ghost:hover{background:var(--surface-2)}
.btn.soft{background:var(--primary-soft);border-color:transparent;color:var(--primary)}
html[data-tone="dark"] .btn.soft,html[data-tone="mid-dark"] .btn.soft{color:var(--text)}
.btn.danger{color:var(--bad)}
.btn.danger.solid{background:var(--bad);border-color:var(--bad);color:#fff}
.btn.icon{width:36px;padding:0}
.btn.sm{height:30px;padding:0 10px;font-size:.84rem;border-radius:8px}
.btn.sm.icon{width:30px;padding:0}
.btn.lg{height:44px;padding:0 18px;font-size:1rem;border-radius:11px}
.btn .svg{width:1.15em;height:1.15em}
.btns{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bgroup{display:inline-flex;border:1px solid var(--border);border-radius:9px;overflow:hidden;background:var(--surface)}
.bgroup .btn{border:0;border-radius:0;height:34px}
.bgroup .btn+.btn{border-inline-start:1px solid var(--border)}
.seg{display:inline-flex;background:var(--surface-3);border-radius:10px;padding:3px;gap:2px}
.seg button{border:0;background:transparent;padding:5px 12px;border-radius:8px;font-weight:600;font-size:.86rem;cursor:pointer;color:var(--text-2)}
.seg button.on{background:var(--surface);color:var(--text);box-shadow:var(--sh-1)}
.inp,select.inp,textarea.inp{height:36px;border:1px solid var(--border);background:var(--surface);border-radius:9px;padding:0 11px;outline:none;width:100%;transition:border-color .12s,box-shadow .12s;font-size:.92rem}
textarea.inp{height:auto;min-height:80px;padding:8px 11px;resize:vertical}
.inp:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--focus)}
.inp.sm{height:30px;font-size:.86rem}
.searchbox{position:relative;display:flex;align-items:center}
.searchbox .svg{position:absolute;inset-inline-start:10px;color:var(--muted);pointer-events:none}
.searchbox .inp{padding-inline-start:34px}
.field{display:flex;flex-direction:column;gap:5px}
.field>label{font-size:.82rem;font-weight:700;color:var(--text-2)}
.fgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.check{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-weight:600;font-size:.9rem}
.check input{width:17px;height:17px;accent-color:var(--primary)}
.switch{position:relative;width:40px;height:23px;flex:none}
.switch input{opacity:0;width:0;height:0}
.switch i{position:absolute;inset:0;background:var(--border-2);border-radius:20px;transition:.2s;cursor:pointer}
.switch i::after{content:'';position:absolute;width:17px;height:17px;top:3px;inset-inline-start:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.switch input:checked+i{background:var(--primary)}
.switch input:checked+i::after{inset-inline-start:20px}

/* chips, badges */
.chip{--c:var(--primary);display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border-radius:30px;border:1px solid var(--border);background:var(--surface);font-weight:600;font-size:.84rem;cursor:pointer;white-space:nowrap;color:var(--text-2);transition:.12s}
.chip i{width:8px;height:8px;border-radius:50%;background:var(--c);flex:none}
.chip:hover{border-color:var(--c)}
.chip.on{background:color-mix(in srgb,var(--c) 14%,var(--surface));border-color:var(--c);color:var(--text)}
.chip b{font-weight:700;color:var(--muted);font-size:.78rem}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 6px;border-radius:20px;font-size:.74rem;font-weight:800;background:var(--surface-3);color:var(--text-2)}
.tag{display:inline-flex;align-items:center;height:19px;padding:0 7px;border-radius:5px;font-size:.72rem;font-weight:700;background:var(--expense-soft);color:var(--expense);margin-inline-start:6px;vertical-align:1px}
.dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex:none}


/* cards */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--sh-1)}
.card>.hd{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--border)}
.card>.hd h3{margin:0;font-size:.98rem;font-weight:800}
.card>.bd{padding:14px}
.empty{padding:40px 20px;text-align:center;color:var(--muted)}
.empty .svg{width:42px;height:42px;opacity:.35;margin-bottom:6px}

/* ---------- toolbar (one row) ---------- */
.bar{display:flex;align-items:center;gap:8px;padding:10px var(--pad);border-bottom:1px solid var(--border);background:var(--surface);flex-wrap:wrap;flex:none}
.bar .ttl{font-weight:800;font-size:1.05rem;white-space:nowrap}
.bar .sub{color:var(--muted);font-size:.85rem}

/* ---------- tabs ---------- */
.tabs{display:flex;gap:4px;padding:0 var(--pad);background:var(--surface);border-bottom:1px solid var(--border);overflow-x:auto;flex:none;align-items:flex-end}
.tab{--tc:var(--primary);position:relative;display:flex;align-items:center;gap:7px;padding:11px 14px 10px;border:0;background:transparent;cursor:pointer;font-weight:700;color:var(--text-2);white-space:nowrap;font-size:.94rem}
.tab .badge{background:var(--surface-3)}
.tab:hover{color:var(--text)}
.tab.on{color:var(--tc)}
.tab.on::after{content:'';position:absolute;bottom:-1px;inset-inline:8px;height:3px;border-radius:3px 3px 0 0;background:var(--tc)}
.tab.on .badge{background:var(--tcs);color:var(--tc)}
.tab .tdot{width:8px;height:8px;border-radius:50%;background:var(--tc);opacity:.85}
.vchips{display:flex;gap:6px;align-items:center;padding:8px var(--pad);background:var(--surface-2);border-bottom:1px solid var(--border);flex:none}
.vchip{height:28px;padding:0 12px;border-radius:20px;border:1px solid var(--border);background:var(--surface);font-weight:700;font-size:.82rem;cursor:pointer;color:var(--text-2)}
.vchip.on{background:var(--tcs);border-color:var(--tc);color:var(--tc)}

/* ---------- grid ---------- */
.gwrap{flex:1;overflow:auto;position:relative;outline:none;background:var(--surface);min-height:0}
.gwrap.framed{border:1px solid var(--border);border-radius:var(--r);flex:none}
table.grid{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;table-layout:fixed;font-size:.92rem}
table.grid th,table.grid td{height:var(--row-h);padding:0 9px;border-bottom:1px solid var(--grid-line);border-inline-start:1px solid var(--grid-line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;position:relative}
table.grid th:first-child,table.grid td:first-child{border-inline-start:0}
table.grid thead th{position:sticky;top:0;z-index:2;background:var(--surface-2);font-weight:700;color:var(--text-2);font-size:.82rem;height:34px;user-select:none}
table.grid thead th.sort{cursor:pointer}
table.grid thead th.sort:hover{color:var(--text)}
table.grid thead th .ar{opacity:.6;margin-inline-start:4px}
table.grid td.rn,table.grid th.rn{width:44px;text-align:center;color:var(--muted);font-size:.78rem;background:var(--surface-2);cursor:pointer;padding:0}
table.grid td.rn:hover{color:var(--text)}
table.grid td.c-num{text-align:center;font-weight:700;font-variant-numeric:tabular-nums}
table.grid td.c-center{text-align:center}
table.grid td.ro{color:var(--text-2)}
table.grid td.strong{font-weight:700}
table.grid tbody tr:hover td{background:color-mix(in srgb,var(--surface-2) 70%,transparent)}
table.grid tbody tr.sel td{background:var(--sel)}
table.grid td.cur{box-shadow:inset 0 0 0 2px var(--primary);z-index:1}
table.grid td.rng{background:var(--sel)!important}
table.grid td.busy{opacity:.55}
table.grid td.err{box-shadow:inset 0 0 0 2px var(--bad)}
table.grid td.warn{background:var(--warn-soft)!important}
table.grid td.unreg{color:var(--warn)}
table.grid tr.grp td{background:var(--surface-3);font-weight:800;color:var(--text);height:32px;border-bottom-color:var(--grid-line)}
table.grid tr.grp td .dot{margin-inline-end:7px}
table.grid tr.newrow td{background:color-mix(in srgb,var(--primary-soft) 30%,var(--surface))}
table.grid tr.newrow td.ph{color:var(--muted);font-style:italic}
table.grid tr.flash td{animation:flash 1.2s var(--ease)}
@keyframes flash{0%{background:var(--primary-soft)}100%{background:transparent}}
table.grid td .edit{position:absolute;inset:0;width:100%;height:100%;border:0;outline:none;padding:0 9px;background:var(--surface);box-shadow:inset 0 0 0 2px var(--primary);font:inherit;text-align:inherit;color:var(--text)}
table.grid td.c-num .edit{text-align:center;font-weight:700}
table.grid td.act{width:40px;padding:0;text-align:center}
table.grid td.act button{opacity:.35;border:0;background:transparent;width:30px;height:28px;border-radius:7px;cursor:pointer;color:var(--text)}
table.grid tr:hover td.act button,table.grid td.act button:focus{opacity:1}
table.grid td.act button:hover{background:var(--surface-3)}
.bal-0{color:var(--bad)!important;font-weight:800}
.bal-low{color:var(--warn)!important;font-weight:800}
.bal-ok{color:var(--good)}
.sugg{position:fixed;z-index:60;background:var(--surface);border:1px solid var(--border-2);border-radius:11px;box-shadow:var(--sh-3);max-height:330px;overflow:auto;min-width:260px;padding:4px}
.sugg .it{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:8px;cursor:pointer}
.sugg .it.on{background:var(--sel)}
.sugg .it .l{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.sugg .it .s{font-size:.78rem;color:var(--muted)}
.sugg .it .h{font-weight:800;font-size:.84rem;font-variant-numeric:tabular-nums}
.sugg .it.new .l{color:var(--primary)}

/* ---------- modal / sheet ---------- */
.modal-bg{position:fixed;inset:0;background:rgba(15,12,8,.42);backdrop-filter:blur(2px);z-index:50;display:flex;align-items:center;justify-content:center;padding:18px;animation:fade .14s ease}
html[data-tone="dark"] .modal-bg{background:rgba(0,0,0,.6)}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.985)}}
.modal{background:var(--surface);border-radius:16px;box-shadow:var(--sh-3);width:min(560px,100%);max-height:calc(100vh - 36px);display:flex;flex-direction:column;animation:pop .18s var(--ease);border:1px solid var(--border)}
.modal.lg{width:min(980px,100%)}
.modal.xl{width:min(1200px,100%)}
.modal.md{width:min(720px,100%)}
.modal.sm{width:min(420px,100%)}
.modal>.hd{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border)}
.modal>.hd h3{margin:0;font-size:1.04rem;font-weight:800}
.modal>.bd{padding:16px;overflow:auto;min-height:0}
.modal>.ft{display:flex;gap:8px;justify-content:flex-start;padding:12px 16px;border-top:1px solid var(--border);background:var(--surface-2);border-radius:0 0 16px 16px;flex-wrap:wrap}

/* shortage card */
.short .item{font-weight:800;font-size:1.05rem}
.short .nums{display:flex;gap:10px;margin:10px 0 14px}
.short .nums div{flex:1;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:8px;text-align:center}
.short .nums b{display:block;font-size:1.25rem;font-variant-numeric:tabular-nums}
.short .nums .gap{background:var(--bad-soft);border-color:var(--bad-line);color:var(--bad)}
.short .choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.short .choice{border:1.5px solid var(--tc);background:var(--tcs);border-radius:12px;padding:12px 8px;cursor:pointer;text-align:center;color:var(--text);transition:.12s}
.short .choice:hover{transform:translateY(-1px);box-shadow:var(--sh-2)}
.short .choice b{display:block;color:var(--tc);font-size:1.05rem}
.short .choice span{font-size:.78rem;color:var(--text-2)}

/* toast */
.toasts{position:fixed;bottom:18px;inset-inline-start:50%;transform:translateX(50%);z-index:100;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{pointer-events:auto;display:flex;align-items:center;gap:10px;background:var(--text);color:var(--bg);padding:10px 14px;border-radius:12px;box-shadow:var(--sh-3);font-weight:600;font-size:.9rem;max-width:min(560px,92vw);animation:pop .18s var(--ease)}
.toast.err{background:var(--bad);color:#fff}
.toast.ok .svg{color:var(--good)}
.toast button{background:transparent;border:1px solid currentColor;color:inherit;border-radius:7px;padding:2px 9px;font-weight:700;cursor:pointer;opacity:.9}

/* menu */
.menu{position:fixed;z-index:70;min-width:200px;background:var(--surface);border:1px solid var(--border-2);border-radius:12px;box-shadow:var(--sh-3);padding:5px;animation:pop .12s var(--ease)}
.menu .mi{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer;font-weight:600;font-size:.9rem;white-space:nowrap}
.menu .mi:hover,.menu .mi.on{background:var(--sel)}
.menu .mi .svg{opacity:.75}
.menu .mi.danger{color:var(--bad)}
.menu .mi .k{margin-inline-start:auto;color:var(--muted);font-size:.76rem}
.menu .ms{height:1px;background:var(--border);margin:4px 6px}
.menu .mh{padding:6px 10px 3px;font-size:.74rem;font-weight:800;color:var(--muted)}

/* ---------- home ---------- */
.home{max-width:1180px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.hero{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.hero h2{margin:0;font-size:1.5rem;font-weight:800}
.hero .d{color:var(--muted);font-weight:600}
.tiles{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.tile{position:relative;overflow:hidden;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:14px;cursor:pointer;transition:.15s;box-shadow:var(--sh-1)}
.tile::before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,var(--tcs),transparent 70%);pointer-events:none}
.tile:hover{transform:translateY(-2px);box-shadow:var(--sh-2);border-color:var(--tc)}
.tile .ic{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--tc);color:#fff;position:relative}
.tile .n{font-size:1.9rem;font-weight:800;line-height:1;margin-top:12px;position:relative;font-variant-numeric:tabular-nums}
.tile .l{font-weight:700;color:var(--text-2);position:relative}
.ask{padding:14px;display:flex;flex-direction:column;gap:10px}
.ask .inp{height:46px;font-size:1.05rem;border-radius:12px}
.ask-res{display:flex;flex-direction:column;gap:2px;max-height:340px;overflow:auto}
.ask-res .r{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;cursor:pointer}
.ask-res .r:hover{background:var(--surface-2)}
.ask-res .r .b{font-weight:800;font-size:1.05rem;min-width:56px;text-align:center;padding:2px 8px;border-radius:8px;background:var(--surface-2)}
.cols2{display:grid;grid-template-columns:1.25fr 1fr;gap:16px;align-items:start}
.list .li{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid var(--border)}
.list .li:last-child{border-bottom:0}

/* ---------- calendar ---------- */
.days{display:grid;grid-template-columns:230px 1fr;gap:16px;max-width:1240px;margin:0 auto;align-items:start}
.months{display:flex;flex-direction:column;gap:4px}
.months .y{font-weight:800;color:var(--muted);font-size:.8rem;padding:6px 6px 2px 10px;display:flex;align-items:center;gap:6px}
.months .y .btn{height:26px;font-size:.76rem;padding:0 8px}
.months a{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:10px;text-decoration:none;color:var(--text);font-weight:700;cursor:pointer}
.months a:hover{background:var(--surface-2)}
.months a.on{background:var(--primary-soft);color:var(--primary)}
html[data-tone="dark"] .months a.on,html[data-tone="mid-dark"] .months a.on{color:var(--text)}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.cal .wd{text-align:center;font-weight:800;color:var(--muted);font-size:.8rem;padding:2px}
.cal .d{min-height:104px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:8px 9px;cursor:pointer;display:flex;flex-direction:column;gap:5px;transition:.12s;position:relative}
.cal .d:hover{border-color:var(--primary);box-shadow:var(--sh-2);transform:translateY(-1px)}
.cal .d.fri{background:var(--surface-2)}
.cal .d.today{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-glow)}
.cal .d.future{opacity:.55}
.cal .d .dn{display:flex;align-items:baseline;gap:6px}
.cal .d .dn b{font-size:1.25rem;font-weight:800;font-variant-numeric:tabular-nums}
.cal .d .dn span{font-size:.75rem;color:var(--muted);font-weight:700}
.cal .d .ty{display:flex;flex-wrap:wrap;gap:4px}
.cal .d .ty span{display:inline-flex;align-items:center;gap:4px;font-size:.74rem;font-weight:800;padding:1px 7px;border-radius:20px;background:var(--tcs);color:var(--tc)}
.cal .d .ty span i{font-style:normal}
.cal .pad{visibility:hidden}

/* ---------- items & balances ---------- */
.pagebar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px var(--pad);background:var(--surface);border-bottom:1px solid var(--border);flex:none}
.pagebar .searchbox{width:min(330px,100%)}
.catbar{padding:8px var(--pad);background:var(--surface-2);border-bottom:1px solid var(--border);flex:none}
.foot-sum{display:flex;align-items:center;gap:14px;padding:7px var(--pad);border-top:1px solid var(--border);background:var(--surface-2);font-size:.84rem;color:var(--text-2);flex:none}
.foot-sum b{color:var(--text)}
.statement-sel{position:sticky;bottom:0}
.bl-list{flex:1;overflow:auto;background:var(--surface)}
.bl-list>*{max-width:1000px;margin-inline:auto}
.bl-row{display:grid;grid-template-columns:40px 1fr 90px 110px;align-items:center;gap:8px;padding:0 var(--pad);height:44px;border-bottom:1px solid var(--border);cursor:pointer}
.bl-row:hover{background:var(--surface-2)}
.bl-row.on{background:var(--sel)}
.bl-row .nm{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bl-row .u{color:var(--text-2);text-align:center}
.bl-row .b{text-align:center;font-weight:800;font-size:1.05rem;font-variant-numeric:tabular-nums}
.bl-row.hd{height:36px;background:var(--surface-2);font-weight:800;font-size:.82rem;color:var(--text-2);position:sticky;top:0;z-index:1;cursor:default}
.bl-grp{padding:7px var(--pad);background:var(--surface-3);font-weight:800;display:flex;align-items:center;gap:8px;position:sticky;top:36px;z-index:1}
.selbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px var(--pad);border-top:1px solid var(--border);background:var(--surface);flex:none}

/* settings */
.set{display:grid;grid-template-columns:220px 1fr;gap:18px;max-width:1150px;margin:0 auto}
.set nav{display:flex;flex-direction:column;gap:3px}
.set nav a{padding:9px 12px;border-radius:10px;cursor:pointer;font-weight:700;color:var(--text-2);display:flex;gap:9px;align-items:center;text-decoration:none}
.set nav a:hover{background:var(--surface-2)}
.set nav a.on{background:var(--primary-soft);color:var(--primary)}
html[data-tone="dark"] .set nav a.on,html[data-tone="mid-dark"] .set nav a.on{color:var(--text)}
.themes{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}
.th{border:2px solid var(--border);border-radius:14px;overflow:hidden;cursor:pointer;background:var(--surface);transition:.12s}
.th:hover{transform:translateY(-2px);box-shadow:var(--sh-2)}
.th.on{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow)}
.th .pv{height:86px;display:grid;grid-template-columns:30% 1fr}
.th .pv .s{height:100%}
.th .pv .m{padding:8px;display:flex;flex-direction:column;gap:5px}
.th .pv .m i{display:block;height:9px;border-radius:5px}
.th .pv .m .sw{display:flex;gap:4px}
.th .pv .m .sw i{width:16px;height:16px;border-radius:5px}
.th .nm{padding:7px 10px;font-weight:800;font-size:.86rem;display:flex;align-items:center;gap:6px;border-top:1px solid var(--border)}
.kv{display:grid;grid-template-columns:160px 1fr;gap:10px 14px;align-items:center}
.kv>label{font-weight:700;color:var(--text-2);font-size:.88rem}
.sect{display:flex;flex-direction:column;gap:14px}
.sect h3{margin:0 0 2px;font-size:1.02rem;font-weight:800}
.sect .seg,.sect .btns,.sect>div>.btn{align-self:flex-start}

/* login */
.login{position:fixed;inset:0;display:grid;place-items:center;background:var(--side);z-index:90;padding:20px}
.login .box{width:min(380px,100%);background:var(--surface);border-radius:20px;box-shadow:var(--sh-3);padding:26px;display:flex;flex-direction:column;gap:14px}
.login .box img{width:74px;height:74px;border-radius:18px;align-self:center;box-shadow:var(--sh-2)}
.login .box h2{margin:0;text-align:center;font-weight:800}
.login .lk{width:68px;height:68px;border-radius:20px;display:grid;place-items:center;align-self:center;background:var(--primary-soft);color:var(--primary)}
.login .lk .svg{width:34px;height:34px}
.audit-row{display:grid;grid-template-columns:70px 120px 1fr;gap:10px;padding:9px 14px;border-bottom:1px solid var(--border);align-items:start}
.audit-row .tm{font-variant-numeric:tabular-nums;color:var(--text-2);font-weight:700;direction:ltr;text-align:right}
.audit-row .us{font-weight:700;color:var(--text-2)}
.audit-row .ac{font-weight:800}
.audit-row .dt{white-space:pre-line;color:var(--text-2);font-size:.88rem;margin-top:2px}
.audit-row.k-auth .ac{color:var(--warn)}
.audit-row.go{cursor:pointer}
.audit-row.go:hover{background:var(--surface-2)}
.audit-day{padding:7px 14px;background:var(--surface-3);font-weight:800;position:sticky;top:0;z-index:1}
@media (max-width:860px){.audit-row{grid-template-columns:56px 1fr}.audit-row .us{grid-column:2}.audit-row>div:last-child{grid-column:1/-1}}

/* preview */
.pv-frame{width:100%;height:min(75vh,1000px);border:0;background:#fff;border-radius:10px;box-shadow:inset 0 0 0 1px var(--border)}
.spin{width:18px;height:18px;border:2.5px solid var(--border-2);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.sync-btn{position:relative}
.sync-btn .sdot{position:absolute;top:6px;inset-inline-end:6px;width:8px;height:8px;border-radius:50%;background:var(--muted);box-shadow:0 0 0 2px var(--top)}
.sync-btn.ok .sdot{background:var(--good)}
.sync-btn.error .sdot{background:var(--bad)}
.sync-btn.busy .si{animation:spin 1s linear infinite}
.sync-btn .sk{display:none;color:var(--good)}
.sync-btn.done .si{display:none}
.sync-btn.done .sk{display:block;animation:tick .35s cubic-bezier(.2,1.6,.4,1)}
.sync-btn.done .sdot{background:var(--good)}
.sync-btn.fail{animation:shake .4s}
.sync-btn.got .sdot{animation:pulseok 1.2s ease-out}
@keyframes tick{from{transform:scale(.3);opacity:0}}
@keyframes shake{25%{transform:translateX(-3px)}50%{transform:translateX(3px)}75%{transform:translateX(-2px)}}
@keyframes pulseok{0%{box-shadow:0 0 0 2px var(--top),0 0 0 2px color-mix(in srgb,var(--good) 70%,transparent)}100%{box-shadow:0 0 0 2px var(--top),0 0 0 10px transparent}}
.dev-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border)}
.dev-row:last-child{border-bottom:0}
.dev-row .dot{width:9px;height:9px;border-radius:50%;background:var(--muted);flex:none}
.dev-row .dot.on{background:var(--good)}
.saved{font-size:.8rem;color:var(--muted);display:inline-flex;align-items:center;gap:5px}
.saved.ok{color:var(--good)}

/* ---------- mobile ---------- */
@media (max-width:860px){
  :root{--top-h:52px;--pad:12px}
  #app{grid-template-columns:1fr!important;grid-template-rows:1fr auto}
  .side{display:none}
  .top .search{display:none}
  .top .crumbs .hide-m{display:none}
  .bnav{display:flex;justify-content:space-around;background:var(--surface);border-top:1px solid var(--border);padding:4px 4px calc(4px + env(safe-area-inset-bottom));grid-column:1;z-index:6}
  .bnav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:1px;padding:5px 2px;border-radius:10px;color:var(--muted);text-decoration:none;font-size:.7rem;font-weight:700;cursor:pointer}
  .bnav a .svg{width:1.45em;height:1.45em}
  .bnav a.on{color:var(--primary)}
  .tiles{grid-template-columns:repeat(3,1fr)}
  .cols2{grid-template-columns:1fr}
  .days{grid-template-columns:1fr}
  .months{flex-direction:row;overflow-x:auto}
  .months .y{flex:none;padding:0 4px 0 8px;white-space:nowrap}
  .months a{flex:none}
  .cal .d .ty span i{display:none}
  .cal{gap:4px}
  .cal .d{min-height:72px;padding:5px;border-radius:9px}
  .cal .d .dn span{display:none}
  .cal .d .ty span{padding:0 5px;font-size:.68rem}
  .set{grid-template-columns:1fr}
  .set nav{flex-direction:row;overflow-x:auto}
  .set nav a{white-space:nowrap}
  .modal-bg{align-items:flex-end;padding:0}
  .modal,.modal.lg,.modal.md,.modal.sm{width:100%;max-height:92vh;border-radius:18px 18px 0 0}
  .modal>.ft{border-radius:0}
  .short .choices{grid-template-columns:1fr}
  .kv{grid-template-columns:1fr}
  .hide-m{display:none!important}
  .bar .btn .lbl{display:none}
  .bl-row{grid-template-columns:32px 1fr 64px 76px}
  table.grid{font-size:.9rem}
}
@media (min-width:861px){ .only-m{display:none!important} }

/* mobile line cards */
.lcards{flex:1;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}
.lcards::after{content:'';flex:0 0 84px}
.lcard{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px 12px;display:grid;grid-template-columns:28px 1fr auto;gap:2px 10px;align-items:center;border-inline-start:4px solid var(--tc)}
.lcard .n{color:var(--muted);font-size:.8rem;grid-row:span 2;text-align:center}
.lcard .nm{font-weight:800;min-width:0}
.lcard .q{font-weight:800;font-size:1.1rem;text-align:center;grid-row:span 2;min-width:52px}
.lcard .q small{display:block;font-size:.72rem;color:var(--muted);font-weight:600}
.lcard .mt{font-size:.8rem;color:var(--text-2);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fab{position:absolute;inset-inline-end:16px;bottom:16px;width:56px;height:56px;border-radius:18px;border:0;background:var(--primary);color:var(--primary-ink);box-shadow:var(--sh-3);display:grid;place-items:center;cursor:pointer;z-index:5}
.fab .svg{width:26px;height:26px}


@media print{ body{background:#fff} }

/* type colors */
.t-issue{--tc:var(--issue);--tcs:var(--issue-soft)}
.t-receipt{--tc:var(--receipt);--tcs:var(--receipt-soft)}
.t-return{--tc:var(--return);--tcs:var(--return-soft)}
.t-damage{--tc:var(--damage);--tcs:var(--damage-soft)}
.t-expense{--tc:var(--expense);--tcs:var(--expense-soft)}

/* mobile refinements */
@media (max-width:860px){
  .crumbs>*:not(:last-child){display:none}
  .vchips{overflow-x:auto}
  .vchip{white-space:nowrap;flex:none}
  .bar .btns{width:100%;justify-content:flex-end}
}

/* print dialog */
.pd{display:grid;grid-template-columns:1fr 290px;gap:16px;min-height:0}
.pd-pv{min-width:0}
.pd-pv .pv-frame{height:min(68vh,900px)}
.pd-op{display:flex;flex-direction:column;gap:12px;min-width:0}
.pd-op .seg{align-self:flex-start}
.printdlg>.bd{overflow:hidden}
@media (max-width:860px){.pd{grid-template-columns:1fr}.pd-pv .pv-frame{height:52vh}.printdlg>.bd{overflow:auto}}
/* share dialog */
.sh-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.sh-t{display:flex;flex-direction:column;align-items:center;gap:7px;padding:14px 6px;border-radius:14px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font-weight:700;font-size:.86rem;color:var(--text);transition:.12s}
.sh-t:hover{border-color:var(--c);transform:translateY(-1px);box-shadow:var(--sh-2)}
.sh-t .ic{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:color-mix(in srgb,var(--c) 16%,transparent);color:var(--c)}
.sh-t .ic .svg{width:24px;height:24px}
/* phones: never wider than the screen */
.home>*,.cols2>*,.tiles>*,.days>*,.set>*,.col>*{min-width:0}
@media (max-width:860px){
  .page{overflow-x:hidden}
  .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
  .tile{padding:10px}
  .tile .n{font-size:1.5rem}
  .chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .chips::-webkit-scrollbar{display:none}
  .chip{flex:none}
}

/* ---------- item photos ---------- */
table.grid td.c-photo{padding:2px;cursor:pointer;text-align:center}
.ithumb{width:calc(var(--row-h) - 4px);height:calc(var(--row-h) - 4px);border-radius:7px;object-fit:cover;display:block;margin:0 auto;background:#fff;box-shadow:0 0 0 1px var(--border)}
.iph{display:inline-grid;place-items:center;width:calc(var(--row-h) - 4px);height:calc(var(--row-h) - 4px);border-radius:7px;border:1px dashed var(--border-2);color:var(--muted)}
.iph .svg{width:16px;height:16px}
table.grid td.c-photo:hover .iph{border-color:var(--primary);color:var(--primary)}
.ic-photo{width:76px;height:76px;border-radius:14px;border:1px solid var(--border);background:#fff;padding:0;overflow:hidden;cursor:pointer;flex:none;display:grid;place-items:center;color:var(--muted)}
.ic-photo img{width:100%;height:100%;object-fit:cover}
.ic-photo.empty{border-style:dashed;background:var(--surface-2)}
.ic-photo .svg{width:26px;height:26px}
.cam{position:fixed;inset:0;z-index:96;background:#000;display:flex;align-items:center;justify-content:center;overflow:hidden}
.cam video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cam.doc .cam-frame{width:min(80vw,58vh);height:min(113vw,82vh)}
.cam-frame{position:relative;width:min(78vw,62vh);height:min(78vw,62vh);border-radius:18px;box-shadow:0 0 0 200vmax rgba(0,0,0,.58);pointer-events:none}
.cam-frame i{position:absolute;width:34px;height:34px;border:4px solid #fff;border-radius:6px}
.cam-frame i:nth-child(1){top:-2px;left:-2px;border-right:0;border-bottom:0}
.cam-frame i:nth-child(2){top:-2px;right:-2px;border-left:0;border-bottom:0}
.cam-frame i:nth-child(3){bottom:-2px;left:-2px;border-right:0;border-top:0}
.cam-frame i:nth-child(4){bottom:-2px;right:-2px;border-left:0;border-top:0}
.cam-hint{position:absolute;top:max(18px,env(safe-area-inset-top));left:0;right:0;text-align:center;color:#fff;font-weight:700;text-shadow:0 1px 3px #000}
.cam-bar{position:absolute;left:0;right:0;bottom:calc(22px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-around}
.cam-b{width:52px;height:52px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:#fff;display:grid;place-items:center;cursor:pointer}
.cam-shot{width:74px;height:74px;border-radius:50%;border:5px solid #fff;background:rgba(255,255,255,.35);cursor:pointer}
.cam-shot:active{background:#fff}
.ped{display:flex;flex-direction:column;align-items:center;gap:12px}
.ped-v{position:relative;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 0 0 1px var(--border);touch-action:none}
.ped-v canvas{width:100%;height:100%;display:block;cursor:grab}
.ped-frame{position:absolute;inset:0;border:2px solid var(--primary);border-radius:14px;pointer-events:none;opacity:.55}
.ped-c{display:flex;align-items:center;gap:8px;width:100%;max-width:440px}
.ped-c input[type=range]{flex:1;accent-color:var(--primary)}
.lightbox{position:fixed;inset:0;z-index:96;background:rgba(10,8,6,.84);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;cursor:zoom-out;animation:fade .14s ease}
.lightbox img{max-width:min(92vw,900px);max-height:74vh;border-radius:16px;background:#fff;box-shadow:0 18px 60px rgba(0,0,0,.5)}
.lb-bar{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;cursor:default}

/* ---------- accounts ---------- */
.set.acc{max-width:1320px;grid-template-columns:200px 1fr}
.acc-body{gap:14px;min-width:0}
.acc-body h3{margin:6px 0 0;font-size:1rem;font-weight:800;display:flex;align-items:center;gap:8px}
.fgrid .field.full{grid-column:1/-1}
.in{color:var(--good)}
.out{color:var(--bad)}
.warn{color:var(--warn)}
.badge.warn{background:color-mix(in srgb,var(--warn) 18%,transparent);color:var(--warn)}
.acc-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.acc-card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:12px 14px;cursor:pointer;display:flex;flex-direction:column;gap:2px;text-align:start;font:inherit;color:inherit}
.acc-card:hover{border-color:var(--primary)}
.acc-card.on{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-glow)}
.acc-card .t{font-weight:800}
.acc-card .v{font-size:1.35rem;font-weight:800;margin-top:4px}
.acc-card [data-edit]{position:absolute;top:6px;inset-inline-end:6px}
.acc-card.add{align-items:center;justify-content:center;border-style:dashed;color:var(--muted);flex-direction:row;gap:6px;font-weight:700;min-height:86px}
.acc-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.acc-stat{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px 12px}
.acc-stat .l{color:var(--text-2);font-size:.82rem;font-weight:700}
.acc-stat .v{font-size:1.15rem;font-weight:800;margin-top:3px}
.acc-stat.in .v{color:var(--good)}
.acc-stat.out .v{color:var(--bad)}
.acc-t td{white-space:normal}
.acc-office .hd{padding:10px 14px}
.acc-office .gwrap{border-radius:0 0 14px 14px}
.acc-raw{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:10px}
.acc-raw .card .hd{padding:8px 12px}
.acc-rn{display:flex;align-items:center;gap:8px;padding:7px 12px;border-top:1px solid var(--border);cursor:pointer}
.acc-rn:hover{background:var(--surface-2)}
.acc-rn input{width:18px;height:18px;accent-color:var(--primary)}
.acc-people{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.acc-person{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:10px 12px;cursor:pointer}
.acc-person:hover{border-color:var(--primary)}
.acc-person.off{opacity:.55}
.acc-person img,.acc-att-r .who img{width:46px;height:46px;border-radius:12px;object-fit:cover;flex:none}
.acc-person .av,.acc-att-r .who .av{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-weight:800;font-size:1.2rem;flex:none}
.acc-att{display:flex;flex-direction:column;gap:8px}
.acc-att-r{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:8px 12px}
.acc-att-r .who{display:flex;align-items:center;gap:10px;min-width:190px;flex:1}
.acc-att-r label{display:flex;align-items:center;gap:6px;color:var(--text-2);font-size:.85rem;font-weight:700}
.acc-att-r input[type=time]{width:auto}
.acc-photos{display:flex;flex-wrap:wrap;gap:8px}
.acc-ph{width:74px;height:74px;border-radius:12px;border:1px solid var(--border);background:#fff;padding:0;overflow:hidden;cursor:pointer;display:grid;place-items:center}
.acc-ph img{width:100%;height:100%;object-fit:cover}
.acc-ph.add{width:auto;min-width:74px;padding:0 12px;border-style:dashed;background:var(--surface-2);color:var(--text-2);display:flex;gap:6px;font-weight:700;font:inherit}
.acc-link{font-size:.78rem;margin-top:2px;cursor:pointer}
@media (max-width:860px){.set.acc{grid-template-columns:1fr}.acc-raw{grid-template-columns:1fr}.acc-att-r .who{min-width:100%}}

/* slips: long item names wrap instead of widening the column */
table.grid td.wrap{white-space:normal;line-height:1.3;padding-top:5px;padding-bottom:5px;text-overflow:clip;overflow-wrap:anywhere}
/* ▲▼ next to the quantity */
table.grid td .stp{position:absolute;inset-inline-end:3px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:1px;opacity:0;transition:opacity .12s;z-index:1}
table.grid tr:hover td .stp,table.grid td.cur .stp{opacity:1}
@media (hover:none){table.grid td .stp{opacity:1}}
table.grid td .stp button{width:20px;height:13px;padding:0;border:1px solid var(--border-2);border-radius:4px;background:var(--surface);color:var(--text-2);display:grid;place-items:center;cursor:pointer}
table.grid td .stp button:hover{background:var(--primary-soft);color:var(--primary);border-color:var(--primary)}
table.grid td .stp svg{width:11px;height:11px}
/* camera button at the end of the slip names row */
.tabs .tab-cam{position:sticky;inset-inline-end:0;margin-inline-start:auto;align-self:center;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid var(--border-2);border-radius:20px;background:var(--surface);color:var(--text);font-weight:700;font-size:.86rem;cursor:pointer;white-space:nowrap;flex:none;box-shadow:-10px 0 10px var(--surface)}
.tabs .tab-cam:hover{border-color:var(--primary);color:var(--primary)}
.tabs .tab-cam .badge{background:var(--primary);color:#fff}
.tabs .tab-cam .svg,.tabs .tab-cam svg{width:17px;height:17px}
.ai-wait{display:flex;align-items:center;gap:12px;padding:6px 2px}
.ai-wait b{flex:1}
/* review of lines read from a photo / WhatsApp */
.rv tr.off td{opacity:.45}
.rv select.chk{border-color:var(--warn);box-shadow:0 0 0 2px color-mix(in srgb,var(--warn) 22%,transparent)}
.rv td{height:auto;padding-top:4px;padding-bottom:4px}
.qstep{display:flex;align-items:center;gap:4px}
.qstep .inp{text-align:center;font-weight:800;min-width:0}
.qstep .btn{flex:none;width:30px;padding:0;font-weight:800;font-size:1.05rem}
/* balances statement: optional item photos */
.bl-row.ph{grid-template-columns:40px 52px 1fr 90px 110px;height:56px}
.bl-row .pic{width:46px;height:46px;border-radius:9px;object-fit:cover;background:var(--surface-2);border:1px solid var(--border);display:block}
.bl-row .pic.none{display:grid;place-items:center;color:var(--muted)}
label.sw{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:.88rem;cursor:pointer;white-space:nowrap}
/* attendance: quick buttons */
.acc-att-r .tbtn{height:36px;padding:0 10px}
.acc-att-r .x{color:var(--muted)}
@media (max-width:860px){.bl-row.ph{grid-template-columns:32px 46px 1fr 64px 76px}.bl-row .pic{width:40px;height:40px}.tabs .tab-cam{padding:0 10px;font-size:.8rem;gap:4px}}

/* settings → reading photos: models + test box */
.ai-models{display:flex;flex-direction:column;border:1px solid var(--grid-line);border-radius:var(--r);max-height:46vh;overflow:auto;background:var(--surface)}
.ai-m{display:grid;grid-template-columns:22px minmax(140px,auto) 1fr auto;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--grid-line);cursor:pointer}
.ai-m:last-child{border-bottom:0}
.ai-m:hover{background:var(--surface-2)}
.ai-m:has(input:checked){background:var(--sel)}
.ai-m .id{font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-m .st{font-weight:700;font-size:.84rem;white-space:nowrap}
.ai-m.s-ok .st{color:var(--ok,#2e8b57)}
.ai-m.s-no{opacity:.6}
.ai-m.s-no .st{color:var(--bad)}
.ai-m.s-wait .st{color:var(--warn)}
.ai-chat{border:1px solid var(--grid-line);border-radius:var(--r);background:var(--surface);display:flex;flex-direction:column}
.ai-chat .msgs{max-height:44vh;min-height:110px;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}
.ai-chat .hint{margin:auto;text-align:center}
.ai-chat .bub{max-width:82%;padding:8px 12px;border-radius:14px;white-space:pre-wrap;line-height:1.55;font-size:.92rem}
.ai-chat .bub.me{align-self:flex-start;background:var(--primary-soft)}
.ai-chat .bub.ai{align-self:flex-end;background:var(--surface-2);border:1px solid var(--border)}
.ai-chat .bub.err{border-color:var(--bad);color:var(--bad)}
.ai-chat .bub img{display:block;max-width:180px;max-height:140px;border-radius:9px;margin-bottom:6px}
.ai-chat .bub .mt{font-size:.72rem;color:var(--muted);margin-top:4px}
.ai-chat .ai-in{display:flex;align-items:flex-end;gap:6px;padding:8px;border-top:1px solid var(--grid-line)}
.ai-chat .ai-in textarea{min-height:36px;max-height:120px;resize:vertical}
.ai-chat .att img{width:36px;height:36px;object-fit:cover;border-radius:8px;border:1px solid var(--border)}
@media (max-width:860px){.ai-m{grid-template-columns:22px 1fr auto}.ai-m .id{display:none}.ai-chat .bub{max-width:92%}}

/* ---------- 2.5: assistant, voice, box codes, stock count, bots ---------- */
.good{color:var(--good)}
.bad{color:var(--bad)}
.asst-btn .svg{color:var(--primary)}
/* 2.6: the chat head — a round bubble that floats over the app */
.chead{-webkit-touch-callout:none;position:fixed;left:0;top:0;z-index:47;width:58px;height:58px;border-radius:50%;border:0;padding:0;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;background:linear-gradient(145deg,var(--primary),var(--primary-2,var(--primary)));color:var(--primary-ink,#fff);box-shadow:0 8px 24px color-mix(in srgb,var(--primary) 40%,transparent),0 2px 6px rgba(0,0,0,.18);display:grid;place-items:center;will-change:transform}
.chead .ch-in{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;transition:transform .18s var(--ease)}
.chead .ch-in .svg{width:28px;height:28px;stroke-width:1.9}
.chead:active .ch-in{transform:scale(.92)}
.chead.drag{cursor:grabbing;box-shadow:0 16px 36px rgba(0,0,0,.3)}
.chead.drag .ch-in{transform:scale(1.07)}
.chead.gone{display:none}
.chead.opened{box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 26%,transparent),0 8px 24px color-mix(in srgb,var(--primary) 30%,transparent)}
.chead .ch-badge{position:absolute;top:-3px;inset-inline-end:-3px;min-width:21px;height:21px;padding:0 5px;border-radius:11px;background:var(--bad);color:#fff;font-size:.72rem;font-weight:800;line-height:21px;text-align:center;box-shadow:0 0 0 2px var(--bg);display:none}
.chead.unread .ch-badge{display:block;animation:tick .3s cubic-bezier(.2,1.6,.4,1)}
.chead.typing::after{content:'';position:absolute;inset:-5px;border-radius:50%;border:2.5px solid transparent;border-top-color:var(--primary);border-inline-start-color:var(--primary);animation:spin .9s linear infinite}
.chead-x{position:fixed;left:50%;bottom:calc(34px + env(safe-area-inset-bottom));z-index:46;width:60px;height:60px;margin-left:-30px;border-radius:50%;display:grid;place-items:center;background:rgba(20,16,12,.6);color:#fff;border:2px solid rgba(255,255,255,.7);opacity:0;transform:translateY(40px) scale(.7);transition:opacity .18s,transform .24s cubic-bezier(.2,1.4,.4,1),background .15s;pointer-events:none}
.chead-x.on{opacity:1;transform:none}
.chead-x.hot{background:var(--bad);transform:scale(1.22);border-color:#fff}
.chead-x .svg{width:26px;height:26px}
/* the chat window: beside the head on a PC, a sheet from the bottom on the phone */
.asst-bg{position:fixed;inset:0;z-index:44;display:none;pointer-events:none}
.asst-bg.on{display:block}
.asst{position:fixed;z-index:45;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 18px 50px rgba(0,0,0,.22),0 4px 12px rgba(0,0,0,.1);overflow:hidden;opacity:0;visibility:hidden;pointer-events:none;transform:scale(.5);transition:transform .22s cubic-bezier(.4,0,.2,1),opacity .16s,visibility 0s linear .22s}
.asst.on{opacity:1;visibility:visible;pointer-events:auto;transform:none;transition:transform .3s cubic-bezier(.2,1.25,.35,1),opacity .14s,visibility 0s}
.asst.sheet{left:0;right:0;bottom:0;top:auto;width:100%;height:min(90vh,calc(var(--vvh,100vh) - 8px));border-radius:22px 22px 0 0;border-bottom:0;transform:translateY(100%);padding-bottom:env(safe-area-inset-bottom)}
.asst.sheet.on{transform:none}
.asst-hd{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 12px;border-bottom:1px solid var(--border);background:var(--surface);position:relative}
.asst-hd .grip{display:none}
.asst.sheet .asst-hd{padding-top:17px;touch-action:none}
.asst.sheet .asst-hd .grip{display:block;position:absolute;top:6px;left:50%;width:42px;height:5px;margin-left:-21px;border-radius:5px;background:var(--border-2)}
.asst-av{position:relative;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--primary),var(--primary-2,var(--primary)));color:var(--primary-ink,#fff);flex:none}
.asst-av .svg{width:21px;height:21px}
.asst-av::after{content:'';position:absolute;bottom:0;inset-inline-end:0;width:10px;height:10px;border-radius:50%;background:var(--good);box-shadow:0 0 0 2px var(--surface)}
.asst-tt{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.asst-tt b{font-size:.98rem;white-space:nowrap}
.asst-tt small{font-size:.74rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}
.asst.busy .asst-tt small{color:var(--primary);font-weight:700}
.asst-msgs{flex:1;overflow:auto;padding:12px 12px 8px;display:flex;flex-direction:column;gap:4px;background:var(--bg);overscroll-behavior:contain}
.tsep{align-self:center;font-size:.72rem;color:var(--muted);margin:10px 0 4px;font-weight:600}
.asst-hint{margin:auto;text-align:center;color:var(--muted);line-height:1.9;display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px}
.asst-hint>.svg{width:34px;height:34px;color:var(--primary)}
.asst-hint .hi-av{width:66px;height:66px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--primary),var(--primary-2,var(--primary)));color:var(--primary-ink,#fff);margin-bottom:2px;box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 30%,transparent)}
.asst-hint .hi-av .svg{width:32px;height:32px}
.asst-hint .hi-t{font-size:1.1rem;color:var(--text)}
.asst-hint b{color:var(--text-2);font-weight:700}
.asst .bub{position:relative;max-width:86%;padding:8px 12px;border-radius:18px;line-height:1.6;font-size:.93rem;display:flex;flex-direction:column;gap:6px;margin-top:2px;animation:pop .16s var(--ease);transition:transform .15s}
.asst .bub .tx{white-space:pre-wrap;word-break:break-word}
.asst .bub.me{align-self:flex-start;background:var(--primary);color:var(--primary-ink,#fff);border-end-start-radius:6px}
.asst .bub.ai{align-self:flex-end;background:var(--surface);border:1px solid var(--border);border-end-end-radius:6px}
.asst .bub.ai.wide{min-width:min(280px,80%)}
.asst .bub.ai.wait{min-width:0;padding:10px 14px}
.asst .bub.err{border-color:color-mix(in srgb,var(--bad) 55%,var(--border));background:color-mix(in srgb,var(--bad) 6%,var(--surface))}
.asst .bub.err .tx{color:var(--bad)}
.asst .bub.stopped .tx{color:var(--muted)}
.asst .bub.held{transform:scale(.97)}
.asst .bub .bimg{max-width:190px;max-height:160px;border-radius:12px;cursor:zoom-in;display:block;object-fit:cover}
.asst .bub .bfile{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:10px;background:rgba(255,255,255,.2);font-size:.84rem;font-weight:700;max-width:100%}
.asst .bub .bfile span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.asst .bub .vic{width:15px;height:15px;vertical-align:-2px;margin-inline-end:4px;opacity:.85}
.asst .bub .mt{font-size:.7rem;color:var(--muted)}
.asst .bub .mt .lk{width:12px;height:12px;vertical-align:-2px}
.asst .bub .cards{display:flex;flex-direction:column;gap:6px;color:var(--text)}
.bmore{position:absolute;top:50%;margin-top:-13px;width:26px;height:26px;border-radius:50%;border:0;background:var(--surface-2);color:var(--muted);display:grid;place-items:center;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s;padding:0}
.bmore .svg{width:16px;height:16px}
.bub.me .bmore{inset-inline-end:-32px}
.bub.ai .bmore{inset-inline-start:-32px}
@media (hover:hover){.asst .bub:hover .bmore{opacity:1;pointer-events:auto}}
.btools{align-self:flex-end;display:flex;gap:2px;margin:0 4px 4px}
.btools button{width:30px;height:26px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;display:grid;place-items:center;padding:0}
.btools button:hover{background:var(--surface-2);color:var(--text)}
.btools .svg{width:15px;height:15px}
.dots{display:inline-flex;gap:4px;padding:4px 2px}
.dots i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:blink 1s infinite}
.dots i:nth-child(2){animation-delay:.18s}.dots i:nth-child(3){animation-delay:.36s}
@keyframes blink{0%,100%{opacity:.25}50%{opacity:1}}
.ac{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:12px;background:var(--surface-2);border:1px solid var(--border);font-size:.86rem}
.ac.col{flex-direction:column;align-items:stretch}
.ac>.svg{flex:none;width:18px;height:18px}
.ac.done>.svg{color:var(--good)}
.ac.done.undone,.ac.memo.undone{opacity:.6}
.ac.done.undone>.svg{color:var(--muted)}
.ac.bad{border-color:var(--bad);color:var(--bad)}
.ac.ask{border-color:color-mix(in srgb,var(--warn) 55%,var(--border))}
.ac.note{border-color:color-mix(in srgb,var(--warn) 45%,var(--border));background:color-mix(in srgb,var(--warn) 8%,var(--surface))}
.ac.note>.svg{color:var(--warn)}
.ac.memo{border-color:color-mix(in srgb,var(--primary) 35%,var(--border));background:var(--primary-soft)}
.ac.memo>.svg{color:var(--primary)}
.ac.memo small{display:block;font-size:.72rem;font-weight:700}
.ac .opts{display:flex;flex-wrap:wrap;gap:6px}
.ac .opt{height:auto;min-height:30px;padding:4px 10px;flex-direction:column;align-items:flex-start;gap:0;text-align:start}
.ac .opt small{font-size:.72rem}
.ac.file{gap:8px;background:var(--surface)}
.fic{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;flex:none;color:#fff;background:#d64541}
.fic.xls{background:#1f7a46}
.fic.mny{background:#2f6fb3}
.ac.money{background:var(--surface)}
.ac.money small{display:block;font-size:.74rem}
.fic .svg{width:22px;height:22px}
.ac.file small{display:block;font-size:.74rem}
.fbtns{display:flex;flex-wrap:wrap;gap:6px}
.fbtns .btn{flex:1 1 auto;justify-content:center;gap:5px}
.lnk{display:flex;align-items:center;gap:8px;width:100%;padding:9px 12px;border-radius:12px;border:1px solid color-mix(in srgb,var(--primary) 40%,var(--border));background:var(--primary-soft);color:var(--primary);font:inherit;font-weight:800;font-size:.88rem;cursor:pointer;text-align:start}
.lnk span{flex:1}
.lnk .svg{width:18px;height:18px;flex:none}
.lnk .arr{opacity:.65}
.lnk:hover{filter:brightness(.97)}
.ai-rows{display:flex;flex-direction:column;max-height:240px;overflow:auto;border-radius:8px;background:var(--surface)}
.ai-row{display:flex;align-items:center;gap:8px;padding:6px 8px;border-bottom:1px solid var(--grid-line);cursor:pointer}
.ai-row:last-child{border-bottom:0}
.ai-row:hover{background:var(--sel)}
.ai-row .ithumb{width:30px;height:30px;margin:0}
.ai-row .num{min-width:42px;text-align:center}
.asst-chips{display:none;gap:6px;padding:6px 12px 4px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;background:var(--bg)}
.asst-chips.on{display:flex}
.asst-chips::-webkit-scrollbar{display:none}
.chip-q{flex:none;height:32px;padding:0 13px;border-radius:16px;border:1px solid color-mix(in srgb,var(--primary) 45%,var(--border));background:var(--surface);color:var(--primary);font:inherit;font-size:.84rem;font-weight:700;cursor:pointer;white-space:nowrap}
.chip-q:hover{background:var(--primary-soft)}
.asst-edit{display:none;align-items:center;gap:8px;padding:6px 12px;background:var(--primary-soft);color:var(--primary);font-size:.82rem;font-weight:700;border-top:1px solid var(--border)}
.asst-edit.on{display:flex}
.asst-edit .svg{width:16px;height:16px}
.asst-att{display:none;padding:10px 12px 0;background:var(--surface);border-top:1px solid var(--border)}
.asst-att.on{display:flex}
.asst-att .att{position:relative;display:inline-flex;align-items:center;gap:6px;max-width:100%}
.asst-att .att img{width:56px;height:56px;object-fit:cover;border-radius:12px;border:1px solid var(--border);display:block}
.asst-att .att.file{padding:8px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--border);font-size:.84rem;font-weight:700}
.asst-att .att.file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:250px}
.asst-att .att.file .svg{width:20px;height:20px;color:var(--primary);flex:none}
.asst-att .att button{position:absolute;top:-7px;inset-inline-end:-7px;width:20px;height:20px;border-radius:50%;border:0;background:var(--text);color:var(--bg);font-size:13px;line-height:20px;padding:0;cursor:pointer}
.asst-in{display:flex;align-items:flex-end;gap:6px;padding:8px 8px 10px;border-top:1px solid var(--border);background:var(--surface)}
.asst-att.on+.asst-in{border-top:0}
.asst-in textarea{flex:1;min-height:40px;max-height:120px;resize:none;line-height:1.5;padding:8px 14px;border-radius:20px;background:var(--surface-2)}
.asst-in .btn.icon{width:40px;height:40px;border-radius:50%;flex:none}
.asst-in .plus .svg{color:var(--primary)}
.asst-in .send,.asst-in .stop,.asst-in .rec-bar,.asst-in .rec-x{display:none}
.asst-in.has .send{display:inline-flex}
.asst-in.has .mic{display:none}
.asst-in.busy .send,.asst-in.busy .mic{display:none}
.asst-in.busy .stop{display:inline-flex}
.asst-in.rec textarea,.asst-in.rec .plus{display:none}
.asst-in.rec .rec-bar,.asst-in.rec .mic{display:flex}
.asst-in.rec.tap .mic{display:none}
.asst-in.rec.tap .send,.asst-in.rec.tap .rec-x{display:inline-flex}
.asst-in .stop{background:var(--text);color:var(--surface);border-color:var(--text)}
.btn.mic{color:var(--primary);touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.btn.mic.off{opacity:.55}
.btn.mic.on,.btn.mic.on:hover{background:var(--bad);border-color:var(--bad);color:#fff;animation:pulse 1.2s infinite;transform:scale(1.15)}
.asst-in.cancel .btn.mic.on{background:var(--muted);border-color:var(--muted);animation:none}
@keyframes pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--bad) 55%,transparent)}100%{box-shadow:0 0 0 12px transparent}}
.rec-stop{background:var(--bad)!important;border-color:var(--bad)!important;color:#fff!important;animation:pulse 1.2s infinite}
.rec-bar{flex:1;display:flex;align-items:center;gap:10px;height:40px;padding:0 14px;border-radius:20px;background:var(--surface-2);font-weight:800;font-variant-numeric:tabular-nums;min-width:0}
.rec-dot{width:10px;height:10px;border-radius:50%;background:var(--bad);animation:blink 1s infinite;flex:none}
.rec-bar .lvl{flex:1;height:6px;border-radius:6px;background:var(--surface-3);overflow:hidden;min-width:30px}
.rec-bar .lvl b{display:block;height:100%;width:0;background:var(--primary);transition:width .1s}
.rec-hint{font-size:.72rem;color:var(--muted);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46%}
.asst-in.cancel .rec-hint{color:var(--bad)}
.mem-list{max-height:52vh;overflow:auto;border:1px solid var(--grid-line);border-radius:var(--r)}
.mem-row{align-items:flex-start!important;gap:8px}
.mem-row>.svg{color:var(--primary);margin-top:4px;flex:none;width:16px;height:16px}
.mem-row .grow{display:flex;flex-direction:column;gap:2px}
.mem-row small{font-size:.72rem}
@media (max-width:860px){
  .chead{width:54px;height:54px}
  .chead .ch-in .svg{width:26px;height:26px}
  html.asst-on .chead{visibility:hidden}
  .asst-bg.on{pointer-events:auto;background:rgba(15,12,8,.32);animation:fade .2s}
  .asst .bub{max-width:88%}
  .asst-tt small{max-width:150px}
}
.scan .scan-frame{width:min(76vw,52vh);height:min(52vw,34vh)}
.scan-line{position:absolute;left:8%;right:8%;top:50%;height:2px;background:#ff4d4d;box-shadow:0 0 10px #ff4d4d;animation:scanline 1.6s ease-in-out infinite}
@keyframes scanline{0%,100%{top:18%}50%{top:82%}}
.cam-b.wide{width:auto;border-radius:26px;padding:0 16px;display:flex;align-items:center;gap:6px;font:inherit;font-weight:700}
.scan-in{display:flex;align-items:center;gap:8px}
.scan-in>.svg{width:26px;height:26px;color:var(--muted);flex:none}
.scan-in .inp{height:44px;font-size:1.05rem}
.bc-row{gap:6px;font-size:.84rem}
.bc-row>.svg{color:var(--muted)}
.chip.bc{height:26px;font-size:.78rem;gap:4px;padding:0 8px;cursor:default}
.chip.bc button{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:15px;line-height:1;padding:0 0 0 2px}
.cnt-add{display:flex;gap:8px;align-items:center}
table.grid.cnt td .inp{text-align:center}
.acc-ph.tg{width:92px;height:auto;padding:0 0 4px;display:flex;flex-direction:column;gap:2px}
.acc-ph.tg img{width:92px;height:76px;object-fit:cover}
.acc-ph.tg small{font-size:.7rem;color:var(--muted);max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dup-warn{display:flex;gap:8px;align-items:flex-start;padding:9px 11px;border-radius:10px;background:color-mix(in srgb,var(--warn) 14%,var(--surface));border:1px solid color-mix(in srgb,var(--warn) 45%,var(--border));font-size:.86rem}
.dup-warn>.svg{color:var(--warn);flex:none;margin-top:2px}
.dup-warn a{cursor:pointer}
.bot-steps{margin:0;padding-inline-start:20px;line-height:1.9;color:var(--text-2)}
.prof-row{display:grid;grid-template-columns:28px 92px minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--grid-line)}
.prof-row:last-child{border-bottom:0}
.prof-row .pv{font-size:.74rem;font-weight:800;border-radius:6px;padding:2px 6px;background:var(--surface-3);text-align:center}
.prof-row .pv.gemini{background:color-mix(in srgb,#4285f4 16%,transparent);color:#3b6fd8}
.prof-row .pv.claude{background:color-mix(in srgb,#d97757 18%,transparent);color:#c0623f}
.prof-row .pv.openrouter{background:color-mix(in srgb,#6a5acd 16%,transparent);color:#6a5acd}
.prof-row .md{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prof-row .n1{font-size:.72rem;color:var(--primary);font-weight:800}
.profs{border:1px solid var(--grid-line);border-radius:var(--r);background:var(--surface)}
.keys{display:grid;grid-template-columns:120px minmax(0,1fr) auto auto;gap:8px;align-items:center}
.keys .st{font-size:.8rem;white-space:nowrap}
@media (max-width:860px){.keys{grid-template-columns:1fr auto}.keys>b{grid-column:1/-1}.prof-row{grid-template-columns:24px 70px minmax(0,1fr) auto}.prof-row .ord{display:none}}
.rcpt{display:grid;grid-template-columns:minmax(0,1fr) repeat(4,auto) auto;gap:6px 12px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--grid-line)}
.rcpt:last-child{border-bottom:0}
.rcpt label{font-size:.82rem;display:flex;align-items:center;gap:4px;white-space:nowrap}
@media (max-width:860px){.rcpt{grid-template-columns:1fr 1fr}.rcpt>b{grid-column:1/-1}}
.st-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--muted);margin-inline-end:6px}
.st-dot.ok{background:var(--good)}.st-dot.offline,.st-dot.conflict{background:var(--warn)}.st-dot.error{background:var(--bad)}
.ai-m.b{grid-template-columns:minmax(150px,auto) 1fr auto auto auto;cursor:default}
.ai-m.b b .svg{width:14px;height:14px;vertical-align:-2px;color:var(--muted)}
@media (max-width:860px){.ai-m.b{grid-template-columns:1fr auto auto auto}}

/* 2.7 — phone line marks, approvals button */
.lcard .n{position:relative}
.lcard .sst{display:block;font-style:normal;font-size:.72rem;line-height:1;margin-top:3px;text-align:center}
.lcard .sst.ok::after{content:'✓';color:var(--good,#2e9d5b);font-weight:800}
.lcard .sst.send::after{content:'●';color:var(--warn,#d99a1e)}
.lcard .sst.wait::after{content:'⏳'}
.lcard .sst.no::after{content:'✕';color:var(--bad,#d64545);font-weight:800}
.appr-btn{position:relative;color:var(--warn,#d99a1e)}
.appr-btn .appr-n{position:absolute;top:2px;inset-inline-end:2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--bad,#d64545);color:#fff;font-size:.68rem;font-weight:800;line-height:17px;text-align:center}
.usual{margin-top:-4px}
.usual .u-t{font-size:.78rem;color:var(--muted);margin-bottom:5px}
.usual .u-l{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.usual .u-c{flex:0 0 auto;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:16px;padding:5px 11px;font:inherit;font-size:.82rem;cursor:pointer;white-space:nowrap}
.usual .u-c:active{transform:scale(.97)}
.audit-row .rv-btn{float:left;margin-inline-start:8px;opacity:.75}
.audit-row .rv-btn:hover{opacity:1}

/* cloud */
.cl-row{display:flex;gap:10px;align-items:center;padding:6px 0;border-bottom:1px dashed var(--border)}
.cl-row>span:first-child{width:104px;flex:none;color:var(--muted)}
.cloud-block{z-index:95}
.ltr{direction:ltr;unicode-bidi:plaintext}
body:has(.cloud-block) .modal-bg{z-index:97}
