/* აღწერა — count.beard.ge · დიზაინი: მაკეტის „3 · ზონების დაფა" (stock-count/todos/stock-count-app-ui-options.html)
   შრიფტი — Noto Sans Georgian, SIL Open Font License 1.1 · ⛔ inline style — CSP (`style-src 'self'`) */
@font-face{font-family:"Noto Sans Georgian";src:url("fonts/NotoSansGeorgian-georgian.woff2") format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0589,U+10A0-10FF,U+1C90-1CBA,U+1CBD-1CBF,U+205A,U+2D00-2D2F,U+2E31}
@font-face{font-family:"Noto Sans Georgian";src:url("fonts/NotoSansGeorgian-latin.woff2") format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{
  --ink:#222222; --gold:#edc969; --ease:cubic-bezier(.2,.8,.2,1);
  --font:"Noto Sans Georgian",-apple-system,system-ui,sans-serif;
  --bg:#f4f2ee; --surface:#ffffff; --surface-2:#fbfaf8; --sunken:#ece8e1;
  --border:rgba(34,30,24,.085); --border-2:rgba(34,30,24,.15);
  --text:#161513; --text-2:#3d3933; --text-3:#5a544b;
  --accent:#8a6810; --accent-tint:#fbf2da;
  --red-tint:#fcecee; --red-text:#b0182c; --green:#23774a; --green-tint:#e4f1e8;
  --btn:#222222; --btn-text:#ffffff;
  --shadow-1:0 1px 1px rgba(26,22,16,.04),0 1px 3px rgba(26,22,16,.06);
  --shadow-2:0 1px 2px rgba(26,22,16,.05),0 10px 28px -8px rgba(26,22,16,.16);
  --scrim:rgba(20,18,15,.38);
  --hatch:var(--surface-2);
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0d0d0d; --surface:#171717; --surface-2:#1c1c1c; --sunken:#262626;
  --border:rgba(255,255,255,.08); --border-2:rgba(255,255,255,.14);
  --text:#f6f3ee; --text-2:#d8d2c9; --text-3:#b3ada3;
  --accent:#edc969; --accent-tint:rgba(237,201,105,.11);
  --red-tint:rgba(207,32,55,.16); --red-text:#ff8495; --green:#62c990; --green-tint:rgba(98,201,144,.13);
  --btn:#edc969; --btn-text:#1a1813; --shadow-1:0 0 0 1px rgba(255,255,255,.02); --shadow-2:0 10px 28px -8px rgba(0,0,0,.65);
  --scrim:rgba(0,0,0,.6); --hatch:#1f1f1f;
}}
:root[data-theme=dark]{
  --bg:#0d0d0d; --surface:#171717; --surface-2:#1c1c1c; --sunken:#262626;
  --border:rgba(255,255,255,.08); --border-2:rgba(255,255,255,.14);
  --text:#f6f3ee; --text-2:#d8d2c9; --text-3:#b3ada3;
  --accent:#edc969; --accent-tint:rgba(237,201,105,.11);
  --red-tint:rgba(207,32,55,.16); --red-text:#ff8495; --green:#62c990; --green-tint:rgba(98,201,144,.13);
  --btn:#edc969; --btn-text:#1a1813; --shadow-1:0 0 0 1px rgba(255,255,255,.02); --shadow-2:0 10px 28px -8px rgba(0,0,0,.65);
  --scrim:rgba(0,0,0,.6); --hatch:#1f1f1f;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:var(--bg)}
body{color:var(--text);font:400 16px/1.5 var(--font);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
button,input{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer}
svg.i{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
svg.i.sm{width:17px;height:17px}
svg.i.lg{width:24px;height:24px}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
[hidden]{display:none!important}
.wrap{max-width:520px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}
.boot{min-height:100dvh;display:grid;place-items:center}
.boot img{width:64px;height:64px;border-radius:50%;opacity:.9}

/* buttons */
.ab{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:56px;padding:0 16px;border-radius:17px;font-weight:600;font-size:16.5px;transition:transform .1s,opacity .2s}
.ab:active{transform:scale(.985)}
.ab.pri{background:var(--btn);color:var(--btn-text);box-shadow:0 1px 2px rgba(0,0,0,.08),0 8px 18px -8px rgba(0,0,0,.35)}
.ab.sec{background:var(--surface);box-shadow:0 0 0 1px var(--border-2),var(--shadow-1)}
.ab.ok{background:var(--green-tint);color:var(--green)}
.ab:disabled{background:var(--sunken);color:var(--text-3);box-shadow:inset 0 0 0 1px var(--border);pointer-events:none}
.ib{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;color:var(--text-2);flex:none}
.ib:active{background:var(--sunken)}

/* top bar */
.top{display:flex;align-items:center;gap:11px;min-height:64px;padding:8px 10px 8px 18px}
.top img{width:40px;height:40px;border-radius:50%;box-shadow:var(--shadow-1);flex:none}
.top .t{display:flex;flex-direction:column;line-height:1.25;flex:1;min-width:0}
.top b{font-size:18px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top span{font-size:14.5px;color:var(--text-2)}
.foot{margin-top:auto;padding:12px 16px 16px;position:sticky;bottom:0;background:linear-gradient(to top,var(--bg) 70%,transparent)}
.foot .note{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:10px;font-size:15px;color:var(--text-2);text-align:center}
.foot .note b{color:var(--text);font-weight:600}

/* login */
.login{flex:1;display:flex;flex-direction:column;justify-content:center;padding:24px 22px 40px}
.login img{width:72px;height:72px;border-radius:50%;box-shadow:var(--shadow-2)}
.login h1{margin:20px 0 6px;font-size:30px;font-weight:700;letter-spacing:-.015em}
.login p{margin:0 0 26px;font-size:16px;color:var(--text-2)}
.fld{display:block;margin-bottom:14px}
.fld span{display:block;margin:0 0 6px 2px;font-size:15px;font-weight:600;color:var(--text-2)}
.fld input{width:100%;height:56px;padding:0 16px;border:0;border-radius:16px;background:var(--surface);box-shadow:0 0 0 1px var(--border-2),var(--shadow-1);font-size:17px;outline:none}
.fld input:focus{box-shadow:0 0 0 2px var(--accent),var(--shadow-1)}
.err{margin:4px 2px 14px;font-size:15px;color:var(--red-text);font-weight:500}

/* stores */
.body{padding:4px 18px 0}
.eye{margin:6px 0 6px;font-size:15px;font-weight:500;color:var(--text-2)}
h2.h{margin:0 0 18px;font-size:29px;font-weight:700;line-height:1.2;letter-spacing:-.015em}
.stores{display:flex;flex-direction:column;gap:10px}
.st-card{display:flex;align-items:center;gap:13px;width:100%;padding:16px;border-radius:18px;background:var(--surface);box-shadow:0 0 0 1px var(--border),var(--shadow-1);text-align:left}
.st-card .tx{flex:1;display:flex;flex-direction:column;min-width:0}
.st-card b{font-size:16.5px;font-weight:600}
.st-card small{font-size:14.5px;color:var(--text-2)}
.st-card .rad{width:24px;height:24px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--border-2);display:grid;place-items:center;flex:none}
.st-card.on{box-shadow:0 0 0 2px var(--text),var(--shadow-2)}
.st-card.on .rad{background:var(--text);color:var(--bg);box-shadow:none}
.st-card .rad svg{width:14px;height:14px;stroke-width:2.6}
:root[data-theme=dark] .st-card.on{box-shadow:0 0 0 2px var(--gold),var(--shadow-2)}
:root[data-theme=dark] .st-card.on .rad{background:var(--gold);color:#1a1813}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .st-card.on{box-shadow:0 0 0 2px var(--gold),var(--shadow-2)}:root:not([data-theme=light]) .st-card.on .rad{background:var(--gold);color:#1a1813}}
.hint{display:flex;align-items:center;gap:8px;margin:16px 2px 0;font-size:15px;color:var(--text-2)}

/* hero */
.hero{display:flex;align-items:center;gap:18px;margin:4px 16px 0;padding:16px 18px;border-radius:22px;background:var(--surface);box-shadow:0 0 0 1px var(--border),var(--shadow-2)}
.ringw{position:relative;width:92px;height:92px;flex:none}
.ringw svg{width:100%;height:100%;transform:rotate(-90deg)}
.ringw circle{fill:none;stroke-width:9;stroke-linecap:round}
.ringw .bg{stroke:var(--sunken)}
.ringw .fg{stroke:var(--green);transition:stroke-dasharray .5s var(--ease)}
.ringw .ct{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1}
.ringw .ct b{font-size:22px;font-weight:700}
.ringw .ct span{font-size:14px;color:var(--text-2);margin-top:2px}
.stats{flex:1;display:flex;flex-direction:column;gap:7px}
.stats div{display:flex;align-items:center;gap:9px;font-size:15.5px}
.stats i{width:9px;height:9px;border-radius:50%;flex:none;background:var(--border-2)}
.stats i.g{background:var(--green)}.stats i.y{background:var(--gold)}
.stats b{font-weight:700;min-width:24px}
.stats span{color:var(--text-2)}
.net{display:flex;align-items:center;gap:10px;margin:12px 16px 0;padding:12px 14px;border-radius:16px;background:var(--accent-tint);font-size:15px;line-height:1.4}
.net svg{color:var(--accent)}
.net.bad{background:var(--red-tint)}
.net.bad svg{color:var(--red-text)}

/* zone cards */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 16px 0}
.cc{position:relative;display:flex;flex-direction:column;min-height:116px;padding:13px;border-radius:20px;background:var(--surface);box-shadow:0 0 0 1px var(--border),var(--shadow-1);text-align:left}
.cc:active{transform:scale(.985)}
.cc .r{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:auto}
.cc .ci{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--sunken);color:var(--text-2)}
.cc b{margin-top:10px;font-size:16px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.cc small{font-size:14.5px;color:var(--text-2);line-height:1.35}
.cc .s{width:27px;height:27px;border-radius:50%;display:grid;place-items:center}
.cc .s svg.i{width:15px;height:15px;stroke-width:2.5}
.cc.done .ci{background:var(--green-tint);color:var(--green)}
.cc.done .s{background:var(--green);color:var(--surface)}
.cc.prog{box-shadow:0 0 0 2px var(--gold),var(--shadow-2)}
.cc.prog .ci{background:var(--accent-tint);color:var(--accent)}
.cc.prog .s svg{width:27px;height:27px;transform:rotate(-90deg)}
.cc.prog .s circle{fill:none;stroke-width:3.4;stroke-linecap:round}
.cc .s .bgc{stroke:var(--sunken)} .cc .s .fgc{stroke:var(--gold)}
.cc.todo .s{box-shadow:inset 0 0 0 2px var(--border-2)}
.cc.todo small{color:var(--text);font-weight:600;display:inline-flex;align-items:center;gap:4px}
.cc.empty{background:repeating-linear-gradient(-45deg,var(--surface) 0 9px,var(--hatch) 9px 18px)}
.cc.empty .s{background:var(--text-3);color:var(--surface)}
.cc.add{align-items:center;justify-content:center;gap:6px;background:transparent;box-shadow:inset 0 0 0 1.5px var(--border-2);color:var(--text-2)}
.cc.add small{color:var(--text-2);font-weight:500;font-size:15px}
.spacer{height:16px}

/* sheet */
.sheet-wrap{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;justify-content:flex-end}
.sheet-wrap .scrim{position:absolute;inset:0;background:var(--scrim)}
.sheet-wrap .scrim.anim{animation:fade .2s var(--ease)}
.sheet{position:relative;max-width:520px;width:100%;margin:0 auto;max-height:92dvh;display:flex;flex-direction:column;border-radius:28px 28px 0 0;background:var(--surface);box-shadow:0 -12px 40px -10px rgba(0,0,0,.35);padding:10px 18px calc(16px + env(safe-area-inset-bottom))}
.sheet.anim{animation:up .28s var(--ease)}
.sheet .scroll{overflow:auto;flex:1;min-height:0;margin:0 -18px;padding:0 18px}
.grab{display:block;width:44px;height:5px;margin:0 auto 14px;border-radius:3px;background:var(--border-2)}
.sh{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.zi{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;flex:none;background:var(--accent-tint);color:var(--accent)}
.sh .t{display:flex;flex-direction:column;flex:1;min-width:0}
.sh b{font-size:20px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.sh span{font-size:15px;color:var(--text-2)}
.rule{border-radius:18px;background:var(--surface-2);box-shadow:0 0 0 1px var(--border)}
.rule summary{display:flex;align-items:center;gap:9px;min-height:50px;padding:0 14px;font-size:16px;font-weight:600;list-style:none;cursor:pointer}
.rule summary::-webkit-details-marker{display:none}
.rule summary svg:first-child{color:var(--accent)}
.rule summary .chev{margin-left:auto;color:var(--text-2);transition:transform .2s}
.rule[open] summary .chev{transform:rotate(180deg)}
.rule ul{margin:0;padding:0 14px 14px;list-style:none;display:flex;flex-direction:column;gap:8px}
.rule li{display:flex;align-items:center;gap:9px;font-size:15.5px;font-weight:500;line-height:1.35}
.rule li svg{color:var(--accent)}
.ph-h{display:flex;align-items:baseline;gap:8px;margin:16px 0 10px}
.ph-h b{font-size:16.5px;font-weight:700}
.ph-h span{font-size:15px;color:var(--text-2)}
.thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.th{position:relative;aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:var(--sunken);box-shadow:0 0 0 1px var(--border)}
.th img{display:block;width:100%;height:100%;object-fit:cover}
.th .no{position:absolute;left:6px;top:6px;min-width:24px;height:22px;padding:0 6px;border-radius:7px;background:rgba(0,0,0,.55);color:#fff;font-size:13px;font-weight:700;line-height:22px;text-align:center}
.st{position:absolute;right:6px;bottom:6px;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.95);color:#23774a;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.st svg.i{width:15px;height:15px;stroke-width:2.4}
.st.up{color:#9a7414}.st.q{color:#5a544b}.st.bad{color:#b0182c}
.st.up svg{animation:spin 1s linear infinite}
.th.more{display:grid;place-items:center;font-size:15px;font-weight:600;color:var(--text-2);text-align:center;padding:6px}
.empty-ph{padding:18px;border-radius:16px;background:var(--surface-2);box-shadow:inset 0 0 0 1.5px var(--border-2);color:var(--text-2);font-size:15.5px;text-align:center}
.sheet .acts{display:grid;grid-template-columns:1.35fr 1fr;gap:10px;margin-top:14px}
.sheet .acts.one{grid-template-columns:1fr}
.sheet .sub-act{display:flex;justify-content:center;margin-top:8px}
.link{min-height:44px;padding:0 12px;font-size:15.5px;font-weight:600;color:var(--text-2);display:inline-flex;align-items:center;gap:7px}

/* dialog */
.dlg h3{margin:4px 0 8px;font-size:21px;font-weight:700}
.dlg p{margin:0 0 16px;font-size:16px;color:var(--text-2);line-height:1.5}
.dlg .acts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.menu{display:flex;flex-direction:column;gap:6px}
.menu button{display:flex;align-items:center;gap:12px;min-height:54px;padding:0 14px;border-radius:14px;background:var(--surface-2);font-size:16.5px;font-weight:500;text-align:left}
.menu button.red{color:var(--red-text)}

/* finish */
.fin{display:flex;flex-direction:column;align-items:center;text-align:center;padding:24px 20px 0}
.fin .ringw{width:120px;height:120px}
.fin .ringw circle{stroke-width:10}
.fin .ringw .ct svg{width:42px;height:42px;stroke:var(--green);stroke-width:2.4;transform:none}
.fin h2{margin:16px 0 4px;font-size:27px;font-weight:700;letter-spacing:-.015em}
.fin p{margin:0;font-size:16px;color:var(--text-2)}
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:20px 16px 0}
.tiles div{display:flex;flex-direction:column;align-items:center;padding:12px 6px;border-radius:18px;background:var(--surface);box-shadow:0 0 0 1px var(--border),var(--shadow-1)}
.tiles b{font-size:24px;font-weight:700;line-height:1.15}
.tiles span{font-size:14.5px;color:var(--text-2)}

/* toast */
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:80;max-width:calc(100% - 32px);padding:13px 16px;border-radius:14px;background:var(--ink);color:#f6f3ee;font-size:15.5px;line-height:1.4;box-shadow:var(--shadow-2);animation:fade .25s var(--ease)}
:root[data-theme=dark] .toast{background:#2b2b2b}

@keyframes up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
