/* PrintOnn valdymo sistema.
   Išdėstymas: siaura ikonų juosta kairėje (iPad, kompiuteris), apatinė juosta telefone.
   Ramus pilkai melsvas fonas, vienas akcentas – proceso žydra; būsenų spalvos turi reikšmę. */
:root{
  --bg:#EEF1F5; --surface:#FFFFFF; --surface-2:#F5F7FA; --sunk:#E4E8EE; --line:#D9DFE7; --line-strong:#C3CBD6;
  --fg:#141922; --muted:#5D6877; --faint:#8A94A3;
  --accent:#0B78A8; --accent-ink:#FFFFFF; --accent-soft:#DCEEF6;
  --st-new:#5B6B80; --st-new-soft:#E6EAF0;
  --st-prod:#B86E00; --st-prod-soft:#FBEBD2;
  --st-done:#1D8048; --st-done-soft:#DBF0E2;
  --st-cancel:#B4362F; --st-cancel-soft:#F8DEDC;
  --late:#C2352C; --late-soft:#FCE6E3;
  --c1:#0B78A8; --c2:#C2397A; --c3:#C99A00; --c4:#3B4656; --c5:#2E8A63; --c6:#7559C2; --c7:#D2602A; --c8:#5E8A1E;
  --on-status:#FFFFFF;
  --shadow:0 1px 2px rgba(20,25,34,.06),0 6px 24px rgba(20,25,34,.06);
  --f-display:"Schibsted Grotesk","Segoe UI",system-ui,sans-serif;
  --f-body:"Instrument Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,"SF Mono",Consolas,monospace;
  --r:12px; --r-sm:8px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0E1218; --surface:#161B23; --surface-2:#1B212B; --sunk:#10151C; --line:#29313D; --line-strong:#3A4452;
  --fg:#E6EAF0; --muted:#9AA5B5; --faint:#6E7988;
  --accent:#3DA9DB; --accent-ink:#06131B; --accent-soft:#12303F;
  --st-new:#9AA9BD; --st-new-soft:#252D39; --st-prod:#F0A53A; --st-prod-soft:#3A2B13;
  --st-done:#4CC27F; --st-done-soft:#143021; --st-cancel:#F0716A; --st-cancel-soft:#3A1A19;
  --late:#FF7468; --late-soft:#3B1916;
  --c1:#3DA9DB; --c2:#E66AA6; --c3:#E5BC34; --c4:#9AA9BD; --c5:#4CC28F; --c6:#A08AF0; --c7:#F08A55; --c8:#9CC95A;
  --on-status:#0B0F14;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 28px rgba(0,0,0,.25);
  color-scheme:dark;
}}
:root[data-theme="dark"]{
  --bg:#0E1218; --surface:#161B23; --surface-2:#1B212B; --sunk:#10151C; --line:#29313D; --line-strong:#3A4452;
  --fg:#E6EAF0; --muted:#9AA5B5; --faint:#6E7988;
  --accent:#3DA9DB; --accent-ink:#06131B; --accent-soft:#12303F;
  --st-new:#9AA9BD; --st-new-soft:#252D39; --st-prod:#F0A53A; --st-prod-soft:#3A2B13;
  --st-done:#4CC27F; --st-done-soft:#143021; --st-cancel:#F0716A; --st-cancel-soft:#3A1A19;
  --late:#FF7468; --late-soft:#3B1916;
  --c1:#3DA9DB; --c2:#E66AA6; --c3:#E5BC34; --c4:#9AA9BD; --c5:#4CC28F; --c6:#A08AF0; --c7:#F08A55; --c8:#9CC95A;
  --on-status:#0B0F14;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 28px rgba(0,0,0,.25);
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
[hidden]{display:none!important}
body{background:var(--bg);color:var(--fg);font-family:var(--f-body);font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:var(--bg)}
img{max-width:100%}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
button:disabled{opacity:.5;cursor:default}
a{color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
svg.i{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.num{font-family:var(--f-mono);font-weight:600;letter-spacing:.01em}
.tab{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
h1,h2,h3{font-family:var(--f-display);margin:0;text-wrap:balance;letter-spacing:-.01em}
h1{font-size:26px;font-weight:800}
h2{font-size:19px;font-weight:700}
h3{font-size:15px;font-weight:700}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* shell */
.app{display:grid;grid-template-columns:88px minmax(0,1fr);min-height:100%}
.side{position:sticky;top:env(safe-area-inset-top,0px);height:calc(100vh - env(safe-area-inset-top,0px));display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 0;padding-left:env(safe-area-inset-left,0px);background:var(--surface);border-right:1px solid var(--line)}
.logo{width:48px;height:48px;border-radius:12px;background:var(--fg);color:var(--bg);display:grid;place-items:center;font-family:var(--f-display);font-weight:800;font-size:20px;margin-bottom:14px;position:relative;flex:none}
.logo::after{content:"";position:absolute;right:7px;bottom:7px;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.nav{width:72px;padding:9px 0 8px;border-radius:12px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11.5px;font-weight:600;color:var(--muted);text-decoration:none}
.nav:hover{background:var(--surface-2);color:var(--fg)}
.nav.on{background:var(--accent-soft);color:var(--accent)}
.side .spacer{flex:1}
.me{width:44px;height:44px;border-radius:50%;background:var(--sunk);display:grid;place-items:center;font-weight:700;font-size:14px;color:var(--fg);flex:none}
.main{min-width:0;display:flex;flex-direction:column}
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--bg);display:flex;align-items:center;gap:10px;padding-block:14px;padding-left:max(24px,env(safe-area-inset-left,0px));padding-right:max(24px,env(safe-area-inset-right,0px))}
.search{position:relative;flex:1;min-width:0}
.search input{width:100%;height:50px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);padding:0 16px 0 46px;font-size:16px}
.search input::placeholder{color:var(--faint)}
.search > svg{position:absolute;left:14px;top:14px;color:var(--faint)}
.sres{position:absolute;left:0;right:0;top:56px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);max-height:60vh;overflow:auto;padding:6px}
.sres .grp{padding:8px 10px 4px}
.sres button{display:flex;width:100%;text-align:left;gap:12px;align-items:center;padding:10px;border-radius:var(--r-sm)}
.sres button:hover,.sres button.hi{background:var(--surface-2)}
.sres .num{flex:none;min-width:84px}
.iconbtn{width:50px;height:50px;border-radius:var(--r);display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);color:var(--fg);flex:none}
.iconbtn:hover{border-color:var(--line-strong)}
.iconbtn.sm{width:40px;height:40px}
.only-phone{display:none}
.rolebar{margin-inline:max(24px,env(safe-area-inset-left,0px)) max(24px,env(safe-area-inset-right,0px));margin-bottom:10px;background:var(--late-soft);color:var(--fg);border-radius:var(--r-sm);padding:10px 14px;font-size:14px}
#view{padding-left:max(24px,env(safe-area-inset-left,0px));padding-right:max(24px,env(safe-area-inset-right,0px));padding-block:6px 48px;min-width:0}
.tabbar{display:none}
.loading{padding:60px 0;text-align:center;color:var(--muted)}
.loading::before{content:"";display:block;width:28px;height:28px;margin:0 auto 12px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){.loading::before{animation:none}}

/* buttons */
.btn{height:46px;padding:0 18px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;background:var(--surface);border:1px solid var(--line);white-space:nowrap;text-decoration:none}
.btn:hover{border-color:var(--line-strong)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.primary:hover{filter:brightness(1.06)}
.btn.dark{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.btn.big{height:58px;font-size:16.5px;padding:0 24px;border-radius:12px;width:100%}
.btn.sm{height:36px;padding:0 12px;font-size:14px;border-radius:8px}
.btn.danger{color:var(--st-cancel)}
.btn.go-prod{background:var(--st-prod);border-color:var(--st-prod);color:var(--on-status)}
.btn.go-done{background:var(--st-done);border-color:var(--st-done);color:var(--on-status)}
.btn.busy{pointer-events:none;opacity:.7}
.link{color:var(--accent);font-weight:600}
.link:hover{text-decoration:underline}

/* status */
.st{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:99px;font-size:12.5px;font-weight:700;white-space:nowrap}
.st::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.st.sukurtas{background:var(--st-new-soft);color:var(--st-new)}
.st.gaminamas{background:var(--st-prod-soft);color:var(--st-prod)}
.st.ivykdytas{background:var(--st-done-soft);color:var(--st-done)}
.st.atsauktas,.st.atmestas{background:var(--st-cancel-soft);color:var(--st-cancel)}
.st.laukia{background:var(--accent-soft);color:var(--accent)}
.st.priimtas{background:var(--st-done-soft);color:var(--st-done)}
.tagx{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 8px;border-radius:6px;font-size:12.5px;font-weight:600;background:var(--surface-2);color:var(--muted);border:1px solid var(--line);white-space:nowrap}
.tagx.warn{background:var(--late-soft);color:var(--late);border-color:transparent}
.tagx.rush{background:var(--st-prod-soft);color:var(--st-prod);border-color:transparent}
.tagx.ok{background:var(--st-done-soft);color:var(--st-done);border-color:transparent}
.tagx svg.i{width:14px;height:14px}

/* page */
.phead{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:6px 0 18px}
.phead .sub{color:var(--muted);margin-top:2px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px}
.section-t{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 10px}
.section-t .cnt{font-family:var(--f-mono);font-size:13px;color:var(--muted)}
.empty{border:1.5px dashed var(--line-strong);border-radius:14px;padding:22px;text-align:center;color:var(--muted)}

/* home */
.late{display:flex;flex-direction:column;gap:8px;background:var(--late-soft);border-radius:14px;padding:14px;margin-bottom:22px}
.late .lt{display:flex;align-items:center;gap:8px;color:var(--late);font-weight:700;font-size:14px}
.late .row{display:flex;gap:12px;align-items:center;background:var(--surface);border-radius:10px;padding:12px 14px;text-align:left;width:100%;flex-wrap:wrap}
.duo{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:28px}
.col{display:flex;flex-direction:column;gap:10px;min-width:0}
.oc{display:flex;flex-direction:column;gap:7px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px 16px;width:100%;transition:border-color .15s}
.oc:hover{border-color:var(--line-strong)}
.oc .r1{display:flex;align-items:center;justify-content:space-between;gap:10px}
.oc .who{font-weight:700;font-size:16px;line-height:1.25}
.oc .what{color:var(--muted)}
.oc .r3{display:flex;gap:6px;flex-wrap:wrap}
.oc.done{opacity:.62}
.calwrap{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr);gap:20px;align-items:start}
.cal{padding:16px}
.calhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.calhead .mname{font-family:var(--f-display);font-weight:700;font-size:19px}
.calhead .navs{display:flex;gap:6px}
.calgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.dow{font-size:12px;font-weight:700;color:var(--muted);text-align:center;padding:4px 0 6px;letter-spacing:.04em}
.day{min-height:92px;border-radius:10px;padding:7px 7px 6px;text-align:left;display:flex;flex-direction:column;gap:3px;background:var(--surface-2);border:1.5px solid transparent;min-width:0;overflow:hidden}
.day:hover{border-color:var(--line-strong)}
.day.out{background:transparent;color:var(--faint)}
.day.wknd:not(.out){background:var(--sunk)}
.day .dn{font-family:var(--f-mono);font-size:13px;font-weight:600}
.day.today .dn{background:var(--accent);color:var(--accent-ink);border-radius:6px;padding:0 6px;align-self:flex-start}
.day.sel{border-color:var(--accent);background:var(--accent-soft)}
.mini{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;white-space:nowrap;overflow:hidden;line-height:1.3}
.mini i,.dots i{width:7px;height:7px;border-radius:50%;flex:none;background:var(--st-new)}
.mini i.gaminamas,.dots i.gaminamas{background:var(--st-prod)}
.mini i.ivykdytas,.dots i.ivykdytas{background:var(--st-done)}
.mini i.overdue,.dots i.overdue{background:var(--late)}
.mini span{overflow:hidden;text-overflow:ellipsis}
.more{font-size:11px;color:var(--muted);font-weight:600}
.dots{display:none;gap:3px;flex-wrap:wrap}
.daypanel{padding:16px;display:flex;flex-direction:column;gap:10px;position:sticky;top:calc(env(safe-area-inset-top,0px) + 84px)}
.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:12px;font-size:12.5px;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:8px;height:8px;border-radius:50%}

/* lists */
.tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:14px;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs button{height:40px;padding:0 14px;border-radius:99px;font-weight:600;font-size:14px;color:var(--muted);background:var(--surface);border:1px solid var(--line);white-space:nowrap;display:inline-flex;gap:7px;align-items:center}
.tabs button.on{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.tabs button .c{font-family:var(--f-mono);font-size:12px;opacity:.75}
.olist{display:flex;flex-direction:column}
.orow{display:grid;grid-template-columns:44px 92px minmax(0,1.3fr) minmax(0,1.4fr) 118px 120px 104px;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;width:100%}
.orow:last-child{border-bottom:0}
.orow:hover{background:var(--surface-2)}
.orow .who{font-weight:700}
.orow .what{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.orow .sum{text-align:right;font-weight:600}
.orow.head{font-size:12px;font-weight:700;color:var(--muted);letter-spacing:.05em;text-transform:uppercase;padding-block:10px}
.orow.head:hover{background:none}
.orow .c-st{display:none}
.orow.cor{grid-template-columns:96px minmax(0,1fr) 140px 110px}
.ck{width:24px;height:24px;border-radius:6px;border:1.5px solid var(--line-strong);display:grid;place-items:center;background:var(--surface)}
.ck.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.ck svg.i{width:16px;height:16px;stroke-width:2.6}
.selbar{position:sticky;bottom:16px;margin-top:14px;display:flex;gap:12px;align-items:center;justify-content:space-between;background:var(--fg);color:var(--bg);border-radius:14px;padding:10px 10px 10px 18px;box-shadow:var(--shadow);flex-wrap:wrap}
.selbar .btn{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--sunk);display:grid;place-items:center;font-weight:700;font-size:13px;flex:none;color:var(--muted)}
.morebtn{display:flex;justify-content:center;padding:14px}

/* order */
.od{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,1fr);gap:20px;align-items:start}
.odh{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:4px 0 18px}
.odh .back{height:44px;padding:0 10px 0 4px;display:inline-flex;align-items:center;gap:2px;color:var(--muted);font-weight:600}
.odh .ttl{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex:1;min-width:0}
.odh .ttl .num{font-size:24px}
.odh .acts{display:flex;gap:8px;flex-wrap:wrap}
.blk{padding:18px}
.blk + .blk{border-top:1px solid var(--line)}
.client{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.client .nm{font-family:var(--f-display);font-size:21px;font-weight:700;text-align:left}
.contacts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.contacts a{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 12px;border-radius:9px;background:var(--surface-2);border:1px solid var(--line);font-weight:600;font-size:14px;color:var(--fg);text-decoration:none}
.contacts svg.i{width:17px;height:17px;color:var(--muted)}
table.items{width:100%;border-collapse:collapse}
table.items td,table.items th{padding:9px 6px 9px 0;border-bottom:1px solid var(--line);vertical-align:top}
table.items th{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);text-align:left;font-weight:700}
table.items .r{text-align:right;padding-right:0;padding-left:6px;white-space:nowrap}
table.items .cat{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:8px;vertical-align:1px}
.tot{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.tot .l{display:flex;justify-content:space-between;gap:12px}
.tot .grand{font-family:var(--f-display);font-size:22px;font-weight:800;padding-top:6px}
.tot .grand .tab,.stat .v.tab{font-variant-numeric:normal}
.vatline{font-size:13px;color:var(--muted)}
.profit{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px;padding:10px 12px;background:var(--surface-2);border-radius:10px;font-size:14px}
.kv{display:flex;flex-direction:column;gap:12px}
.kv .r{display:flex;justify-content:space-between;gap:12px;align-items:center}
.kv .k{color:var(--muted);font-size:14px}
.kv .v{font-weight:600;text-align:right;min-width:0}
.toggle-row{display:flex;align-items:center;gap:12px;padding:12px 0;width:100%;text-align:left;font-weight:600}
.toggle-row + .toggle-row{border-top:1px solid var(--line)}
.toggle-row .sub{font-weight:400;font-size:13px;color:var(--muted)}
.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.photos .ph{aspect-ratio:4/3;border-radius:10px;background:var(--sunk) center/cover no-repeat;border:1px solid var(--line);position:relative;max-width:100%;display:block}
.photos .ph .x{position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:50%;background:rgba(10,14,20,.7);color:#fff;display:grid;place-items:center}
.photos .ph .x svg.i{width:14px;height:14px}
.photos .add{aspect-ratio:4/3;border-radius:10px;border:1.5px dashed var(--line-strong);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:var(--muted);font-weight:600;font-size:13px;text-align:center;padding:6px;cursor:pointer}
.photos .ph.up{display:grid;place-items:center;color:var(--muted);font-size:12px;font-weight:600}
.filelist{display:flex;flex-wrap:wrap;gap:8px}
.filechip{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 6px 0 12px;border-radius:9px;background:var(--surface-2);border:1px solid var(--line);font-size:14px;font-weight:600;max-width:100%;text-decoration:none;color:var(--fg)}
.filechip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filechip .x{width:28px;height:28px;border-radius:6px;display:grid;place-items:center;color:var(--muted)}
.filechip .x:hover{background:var(--late-soft);color:var(--late)}
.filechip svg.i{width:16px;height:16px}
.hist{display:flex;flex-direction:column;gap:10px;font-size:14px}
.hist .h{display:grid;grid-template-columns:100px 1fr;gap:10px}
.hist .t{font-family:var(--f-mono);font-size:12.5px;color:var(--muted);padding-top:1px}
.hist .u{color:var(--muted);font-size:12.5px}
.flash{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:var(--st-done-soft);border-radius:12px;padding:12px 14px;margin-bottom:16px;font-weight:600}
.nextbtn{padding:18px;display:flex;flex-direction:column;gap:10px}
.nextbtn .hint{font-size:13px;color:var(--muted);text-align:center}

/* forms */
.form{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
.fsec{padding:18px;display:flex;flex-direction:column;gap:12px}
.fsec + .fsec{border-top:1px solid var(--line)}
.fl{font-size:12px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.fl.b{display:block;margin-bottom:8px}
.inp,select.inp,textarea.inp{width:100%;height:48px;border-radius:10px;border:1px solid var(--line);background:var(--surface);padding:0 14px;font-size:16px}
textarea.inp{height:auto;min-height:84px;padding:12px 14px;resize:vertical}
.inp:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px var(--accent-soft)}
.inp.sm{height:42px;font-size:15px;padding:0 10px}
.inp.r{text-align:right}
.inp.mono{font-family:var(--f-mono)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.seg{display:flex;flex-wrap:wrap;gap:6px}
.seg button{height:44px;padding:0 16px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:14.5px}
.seg button.on{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.seg.kind button.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.sugg{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.sugg button{display:flex;align-items:center;gap:12px;padding:12px 14px;text-align:left;border-bottom:1px solid var(--line);width:100%}
.sugg button:last-child{border-bottom:0}
.sugg button:hover{background:var(--surface-2)}
.sugg .new{color:var(--accent);font-weight:700}
.picked{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.picked .nm{font-weight:700}
.warnbox{background:var(--st-prod-soft);border-radius:10px;padding:12px 14px;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;font-size:14px}
.cats{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.cats::-webkit-scrollbar{display:none}
.cats button{height:46px;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-weight:700;white-space:nowrap;display:inline-flex;gap:8px;align-items:center}
.cats button i{width:10px;height:10px;border-radius:50%}
.cats button.on{border-color:var(--fg);box-shadow:inset 0 0 0 1px var(--fg);background:var(--surface-2)}
.svcs{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.svc{display:flex;flex-direction:column;gap:3px;text-align:left;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface-2);min-height:72px}
.svc:hover{border-color:var(--accent)}
.svc b{font-weight:600;line-height:1.25}
.svc span{font-family:var(--f-mono);font-size:12.5px;color:var(--muted)}
.lines{display:flex;flex-direction:column;gap:10px}
.line{border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;background:var(--surface)}
.line .lt{display:flex;align-items:center;gap:10px}
.line .lt .inp{flex:1}
.line .lt i{width:10px;height:10px;border-radius:50%;flex:none}
.line .lb{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 130px;gap:10px;align-items:end}
.line .dims{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.mini-l{font-size:11.5px;color:var(--muted);font-weight:600;margin-bottom:4px;display:block}
.lsum{font-family:var(--f-display);font-weight:700;font-size:17px;text-align:right;align-self:center;padding-top:16px}
.del{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;color:var(--muted);flex:none}
.del:hover{background:var(--late-soft);color:var(--late)}
.sumcard{position:sticky;top:calc(env(safe-area-inset-top,0px) + 84px)}
.sumcard .l{display:flex;justify-content:space-between;gap:12px;align-items:center}
.ferr{background:var(--late-soft);color:var(--late);border-radius:10px;padding:12px 14px;font-weight:600}
.switch{width:46px;height:28px;border-radius:99px;background:var(--line-strong);position:relative;flex:none;transition:background .15s}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .15s;box-shadow:0 1px 2px rgba(0,0,0,.25)}
.switch.on{background:var(--accent)}
.switch.on::after{transform:translateX(18px)}

/* modal */
.modal{position:fixed;inset:0;z-index:50;background:rgba(9,12,17,.48);display:grid;place-items:center;padding:20px}
.sheet{background:var(--surface);border-radius:18px;width:min(640px,100%);max-height:calc(100vh - 40px);overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.3);overscroll-behavior:contain}
.sheet.wide{width:min(860px,100%)}
.mh{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:2}
.mb{padding:20px;display:flex;flex-direction:column;gap:18px}
.mf{padding:16px 20px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;position:sticky;bottom:0;background:var(--surface)}
.step{display:flex;flex-direction:column;gap:10px}
.step .sh{display:flex;align-items:center;gap:10px}
.step .sh .n{width:26px;height:26px;border-radius:50%;background:var(--fg);color:var(--bg);display:grid;place-items:center;font-weight:700;font-size:13px;font-family:var(--f-mono)}
.matrow{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:8px;align-items:center}
.matrow .after{font-size:12.5px;color:var(--muted);grid-column:1/-1;margin-top:-4px}
.viewfinder{aspect-ratio:4/3;max-width:100%;border-radius:14px;background:#0d1117;position:relative;overflow:hidden;display:grid;place-items:center}
.viewfinder video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.viewfinder .frame{width:52%;aspect-ratio:1;position:relative;z-index:1}
.viewfinder .frame b{position:absolute;width:28px;height:28px;border-color:#3DA9DB;border-style:solid;border-width:0}
.viewfinder .frame b:nth-child(1){top:0;left:0;border-top-width:4px;border-left-width:4px;border-radius:6px 0 0 0}
.viewfinder .frame b:nth-child(2){top:0;right:0;border-top-width:4px;border-right-width:4px;border-radius:0 6px 0 0}
.viewfinder .frame b:nth-child(3){bottom:0;left:0;border-bottom-width:4px;border-left-width:4px;border-radius:0 0 0 6px}
.viewfinder .frame b:nth-child(4){bottom:0;right:0;border-bottom-width:4px;border-right-width:4px;border-radius:0 0 6px 0}
.viewfinder p{position:absolute;bottom:12px;left:0;right:0;text-align:center;color:#C9D3E0;font-size:13px;margin:0;padding:0 16px;z-index:1}

/* label preview */
.labelstage{display:flex;flex-wrap:wrap;gap:20px;justify-content:center;padding:26px 10px;background:var(--sunk);border-radius:14px}
.labelstage svg{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);max-width:100%;height:auto}

/* clients, stock, settings */
.crow{display:grid;grid-template-columns:44px minmax(0,1.4fr) minmax(0,1fr) 90px 140px;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;width:100%}
.crow:last-child{border-bottom:0}
.crow:hover{background:var(--surface-2)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:18px}
.stat{padding:14px 16px}
.stat .v{font-family:var(--f-display);font-size:24px;font-weight:800;margin-top:2px}
.stat .v.warn{color:var(--late)}
.srow{display:grid;grid-template-columns:minmax(0,1.6fr) 130px 120px 200px;gap:12px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}
.srow:last-child{border-bottom:0}
.srow.off{opacity:.55}
.srow .nm{font-weight:700;text-align:left}
.srow .meta{font-size:13px;color:var(--muted)}
.srow .q{font-family:var(--f-mono);font-weight:600;text-align:right}
.srow .q.low{color:var(--late)}
.srow .acts{display:flex;gap:6px;justify-content:flex-end}
.qbtn{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);display:grid;place-items:center;font-weight:700;font-size:18px;background:var(--surface)}
.qbtn:hover{border-color:var(--line-strong)}
.bar{height:5px;border-radius:99px;background:var(--sunk);overflow:hidden;margin-top:6px;max-width:220px}
.bar i{display:block;height:100%;background:var(--st-done);border-radius:99px}
.bar i.low{background:var(--late)}
.setgrid{display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px;align-items:start}
.catlist{padding:8px;display:flex;flex-direction:column;gap:2px}
.catlist button{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;font-weight:600;text-align:left;width:100%}
.catlist button i{width:10px;height:10px;border-radius:50%;flex:none}
.catlist button.on{background:var(--surface-2);box-shadow:inset 3px 0 0 var(--fg)}
.catlist button.off{opacity:.5}
.catlist .c{margin-left:auto;font-family:var(--f-mono);font-size:12px;color:var(--muted)}
.cathead{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:14px;border-bottom:1px solid var(--line)}
.colors{display:flex;gap:6px}
.colors button{width:30px;height:30px;border-radius:50%;border:2px solid transparent}
.colors button.on{border-color:var(--fg)}
.svrow{display:grid;grid-template-columns:minmax(0,1fr) 96px 110px minmax(0,170px) 52px;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line)}
.svrow:last-child{border-bottom:0}
.svrow.off{opacity:.5}
.svrow.head{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.urow{display:flex;align-items:center;gap:14px;padding:14px 16px;border-bottom:1px solid var(--line);flex-wrap:wrap;width:100%;text-align:left}
.urow:last-child{border-bottom:0}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.formgrid .full{grid-column:1/-1}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--fg);color:var(--bg);padding:12px 18px;border-radius:12px;font-weight:600;z-index:60;box-shadow:var(--shadow);max-width:calc(100vw - 32px);text-align:center}
.toast.err{background:var(--late);color:#fff}
.menu{position:fixed;z-index:55;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:6px;min-width:240px}
.menu .who{padding:10px 12px 8px;border-bottom:1px solid var(--line);margin-bottom:4px}
.menu button{display:flex;width:100%;gap:10px;align-items:center;padding:11px 12px;border-radius:9px;text-align:left;font-weight:600}
.menu button:hover{background:var(--surface-2)}

/* login */
.login{min-height:100%;display:grid;place-items:center;padding:24px max(16px,env(safe-area-inset-right,0px)) 24px max(16px,env(safe-area-inset-left,0px))}
.login .box{width:min(420px,100%);display:flex;flex-direction:column;gap:14px}
.login .brand{display:flex;align-items:center;gap:14px;margin-bottom:6px}
.login .brand b{font-family:var(--f-display);font-size:22px;font-weight:800}
.login .panel{padding:22px;display:flex;flex-direction:column;gap:12px}
.users{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
.users button{display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 8px;border-radius:14px;border:1px solid var(--line);background:var(--surface);font-weight:600}
.users button .avatar{width:52px;height:52px;font-size:17px}
.pinpad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.pinpad button{height:64px;border-radius:14px;border:1px solid var(--line);background:var(--surface);font-family:var(--f-display);font-size:24px;font-weight:700}
.pinpad button:active{background:var(--surface-2)}
.pindots{display:flex;justify-content:center;gap:14px;margin:8px 0}
.pindots i{width:16px;height:16px;border-radius:50%;border:2px solid var(--line-strong)}
.pindots i.on{background:var(--fg);border-color:var(--fg)}

/* responsive */
@media (max-width:1100px){
  .calwrap{grid-template-columns:1fr}
  .daypanel{position:static}
  .orow{grid-template-columns:44px 86px minmax(0,1fr) 112px 104px}
  .orow .c-what,.orow .c-pay{display:none}
  .svrow{grid-template-columns:minmax(0,1fr) 90px 104px 52px}
  .svrow .c-mat{display:none}
}
.form > *,.od > *,.calwrap > *,.setgrid > *,.duo > *{min-width:0}
@media (max-width:1000px){
  .od,.form{grid-template-columns:minmax(0,1fr)}
  .sumcard{position:static}
  .setgrid{grid-template-columns:1fr}
}
@media (max-width:760px){
  .app{grid-template-columns:1fr}
  .side{display:none}
  .only-phone{display:grid}
  .top{padding-block:10px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));gap:8px}
  .top .newbtn{display:none}
  .rolebar{margin-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px))}
  #view{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  .tabbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:25;background:var(--surface);border-top:1px solid var(--line);padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))}
  .tabbar .nav{width:auto}
  .tabbar .plus{display:grid;place-items:center}
  .tabbar .plus span{width:52px;height:44px;border-radius:14px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center}
  .duo{grid-template-columns:1fr;gap:22px}
  h1{font-size:23px}
  .day{min-height:52px;padding:5px}
  .mini,.more{display:none}
  .dots{display:flex}
  .orow{grid-template-columns:36px minmax(0,1fr) auto;row-gap:4px}
  .orow.head{display:none}
  .orow .c-num{grid-column:2;grid-row:1}
  .orow .c-who{grid-column:2;grid-row:2}
  .orow .c-st{grid-column:3;grid-row:1;justify-self:end;display:block}
  .orow .c-due{grid-column:3;grid-row:2;justify-self:end}
  .orow .c-ck{grid-row:1/3}
  .orow .c-sum{display:none}
  .orow.cor{grid-template-columns:minmax(0,1fr) auto}
  .orow.cor .cn{grid-column:1;grid-row:1}
  .orow.cor .cs{grid-column:2;grid-row:1;justify-self:end}
  .orow.cor .cw{grid-column:1;grid-row:2}
  .orow.cor .cm{grid-column:2;grid-row:2}
  .crow{grid-template-columns:40px minmax(0,1fr) auto}
  .crow .c-ct,.crow .c-n{display:none}
  .srow{grid-template-columns:minmax(0,1fr) auto}
  .srow .c-cost{display:none}
  .srow .acts{grid-column:1/-1;justify-content:flex-start}
  .line .lb{grid-template-columns:1fr 1fr}
  .line .lb .lsum{grid-column:1/-1;padding-top:0}
  .grid3,.formgrid{grid-template-columns:1fr 1fr}
  .modal{padding:0;align-items:end}
  .sheet,.sheet.wide{width:100%;border-radius:18px 18px 0 0;max-height:92vh}
  .svrow{grid-template-columns:minmax(0,1fr) 92px 44px}
  .svrow .c-unit{display:none}
  .hist .h{grid-template-columns:84px 1fr}
  .toast{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
}
