:root{--bg:#f3f5f8;--surface:#fff;--text:#1f2937;--muted:#66708a;--line:#e5e8ee;--accent:#2563eb;--accent-soft:#e8effd;--warn:#c2410c;--ok:#15803d;--red:#b91c1c;--nav:64px;--surface2:#eef2f7;--soft:#e8ebf1;--line2:#eef0f4;--line3:#d5dae3;--faint:#9aa4b8;--text2:#4b5563;--t-blue:#dbeafe;--on-blue:#1e3a8a;--t-violet:#ede9fe;--on-violet:#4c1d95;--t-green:#dcfce7;--on-green:#166534;--t-orange:#ffe4cc;--on-orange:#9a3412;--t-red:#fee2e2;--on-red:#991b1b;--t-grey:#e8eaed;--toast:#1f2937;--dim:var(--dim);--busy:rgba(255,255,255,.5);--hl:#fef3c7}
html[data-theme="dark"]{--bg:#0f131a;--surface:#1a202b;--text:#e6e9ef;--muted:#9aa4b8;--line:#2a3140;--accent:#5b8dff;--accent-soft:#1e2a44;--warn:#fb923c;--ok:#4ade80;--red:#f87171;--surface2:#222a37;--soft:#222a37;--line2:#262d3a;--line3:#364052;--faint:#6b7689;--text2:#b6bfcd;--t-blue:#1e3358;--on-blue:#bcd3ff;--t-violet:#33275a;--on-violet:#d6c8ff;--t-green:#173a2a;--on-green:#9ae6b4;--t-orange:#4a2c14;--on-orange:#fdba74;--t-red:#4a1d1d;--on-red:#fca5a5;--t-grey:#2a3140;--toast:#374151;--dim:rgba(0,0,0,.6);--busy:rgba(15,19,26,.55);--hl:#4a3f14;color-scheme:dark}
/* цвета клиентов: --c-* фон блока, --oc-* текст и точки */
:root{--c-red:#fecaca;--oc-red:#991b1b;--c-orange:#fed7aa;--oc-orange:#9a3412;--c-yellow:#fef08a;--oc-yellow:#854d0e;--c-green:#bbf7d0;--oc-green:#166534;--c-teal:#99f6e4;--oc-teal:#115e59;--c-blue:#bfdbfe;--oc-blue:#1e40af;--c-violet:#ddd6fe;--oc-violet:#5b21b6;--c-pink:#fbcfe8;--oc-pink:#9d174d;--c-brown:#e7d3c0;--oc-brown:#6b4423;--c-grey:#e5e7eb;--oc-grey:#4b5563}
html[data-theme="dark"]{--c-red:#5a2323;--oc-red:#fca5a5;--c-orange:#5a3414;--oc-orange:#fdba74;--c-yellow:#4a3f14;--oc-yellow:#fde68a;--c-green:#1b4332;--oc-green:#86efac;--c-teal:#134e4a;--oc-teal:#5eead4;--c-blue:#1e3358;--oc-blue:#bcd3ff;--c-violet:#3b2a63;--oc-violet:#d6c8ff;--c-pink:#5a1f42;--oc-pink:#f9a8d4;--c-brown:#4a3728;--oc-brown:#d9b99b;--c-grey:#2f3745;--oc-grey:#cbd5e1}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:15px;line-height:1.4;-webkit-text-size-adjust:100%}
#app{min-height:100vh;padding-bottom:calc(var(--nav) + 90px)}
.boot{padding:40vh 20px 0;text-align:center;color:var(--muted)}
.spin{width:28px;height:28px;border:3px solid var(--line3);border-top-color:var(--accent);border-radius:50%;margin:0 auto 12px;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
button,input,select,textarea{font:inherit;color:inherit}
button{border:0;background:none;padding:0;cursor:pointer}
a{color:var(--accent)}
.neg{color:var(--warn)}.pos{color:var(--ok)}
.p-head{padding:18px 18px 6px;display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.p-head .d{font-size:20px;font-weight:600;letter-spacing:-.01em}
.p-head .m{font-size:12.5px;color:var(--muted);white-space:nowrap}
.p-title{padding:14px 16px 8px;display:flex;align-items:center;gap:8px;position:sticky;top:0;background:var(--bg);z-index:5}
.p-title .back{width:36px;height:36px;display:grid;place-items:center;color:var(--muted);font-size:28px;line-height:1;margin-left:-8px;border-radius:18px}
.p-title .t{font-size:20px;font-weight:600;flex:1;letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.p-title .sub{font-size:12.5px;color:var(--muted);white-space:nowrap}
.p-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:6px 16px 10px}
.p-tile{border-radius:10px;padding:8px 8px;background:var(--surface2);text-align:left}
.p-tile .v{font-size:17px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p-tile .l{font-size:10px;color:var(--text2);margin-top:2px;line-height:1.15}
.p-tile.orange{background:var(--t-orange)}.p-tile.blue{background:var(--t-blue)}.p-tile.green{background:var(--t-green)}
.p-list{padding:0 16px;display:flex;flex-direction:column;gap:6px}
.p-row{display:flex;align-items:center;gap:10px;background:var(--surface);border-radius:12px;padding:9px 12px;min-height:54px;border:1px solid var(--line);width:100%;text-align:left}
.p-row .tm{width:46px;font-weight:600;font-variant-numeric:tabular-nums;font-size:14px;flex:none}
.p-row .who{flex:1;min-width:0}
.p-row .who .n{font-weight:600}
.p-row .who .i{font-size:11.5px;color:var(--muted);line-height:1.25}
.p-row .st{font-size:11.5px;border-radius:14px;padding:5px 9px;background:var(--t-grey);white-space:nowrap}
.p-row .st.done{background:var(--t-green);color:var(--on-green)}
.p-row .st.off{background:var(--t-red);color:var(--on-red)}
.p-row .st.plan::after{content:" \203A";color:var(--muted)}
.p-row.free{background:transparent;border:1px dashed var(--faint);min-height:40px;padding:5px 12px}
.p-row.free .tm{color:var(--muted);font-weight:500}
.p-row.free .who{color:var(--accent);font-size:12.5px}
.p-row.free .plus{width:28px;height:28px;border-radius:50%;border:1.5px solid var(--accent);color:var(--accent);display:grid;place-items:center;font-size:18px;line-height:1}
.p-row.lunch{background:transparent;border:0;min-height:22px;padding:0 12px;color:var(--faint);font-size:12px}
.p-row.lunch .tm{color:var(--faint);font-weight:500;font-size:12px}
.p-row.past{opacity:.6}
.p-row.pay .who .n{font-weight:500}
.p-row.pay .amt{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
.p-row.pay .amt .s{display:block;font-size:10.5px;color:var(--muted);font-weight:400}
.p-row.cl{min-height:58px}
.next{margin:0;background:var(--surface);border:2px solid var(--accent);border-radius:14px;padding:10px 12px}
.next .top{display:flex;justify-content:space-between;align-items:baseline}
.next .nm{font-size:16px;font-weight:600}
.next .tm{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.next .i{font-size:11.5px;color:var(--muted);margin:2px 0 8px}
.p-nav{position:fixed;left:0;right:0;bottom:0;height:var(--nav);background:var(--surface);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);align-items:center;font-size:10.5px;color:var(--muted);text-align:center;z-index:20;padding-bottom:env(safe-area-inset-bottom)}
.p-nav button{display:flex;flex-direction:column;align-items:center;gap:3px;position:relative;height:100%;justify-content:center;color:inherit;font-size:inherit}
.p-nav svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.p-nav .on{color:var(--accent);font-weight:600}
.p-nav .bdg{position:absolute;top:8px;left:calc(50% + 6px);min-width:16px;height:16px;border-radius:8px;background:#dc2626;color:#fff;font-size:10px;font-weight:600;display:grid;place-items:center;padding:0 4px}
#fab{position:fixed;right:16px;bottom:calc(var(--nav) + 16px);z-index:19}
.fab{height:48px;padding:0 18px 0 14px;border-radius:24px;background:var(--accent);color:#fff;font-weight:600;display:flex;align-items:center;gap:6px;box-shadow:0 6px 16px rgba(37,99,235,.35);font-size:15px}
.fab svg{width:20px;height:20px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round}
#sheet{position:fixed;inset:0;z-index:30}
.dim{position:absolute;inset:0;background:var(--dim)}
.bsheet{position:absolute;left:0;right:0;bottom:0;background:var(--surface);border-radius:22px 22px 0 0;padding:10px 16px calc(16px + env(safe-area-inset-bottom));max-height:88vh;overflow:auto}
.bsheet .grab{width:38px;height:4px;border-radius:2px;background:var(--line3);margin:0 auto 12px}
.bsheet .ttl{font-size:17px;font-weight:600}
.bsheet .sub{font-size:12.5px;color:var(--muted);margin:0 0 12px}
.bsheet .opt{display:flex;align-items:center;gap:12px;min-height:48px;border-top:1px solid var(--line2);font-size:14.5px;width:100%;text-align:left}
.bsheet .opt svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.bsheet .opt.ok{color:var(--ok)}.bsheet .opt.late{color:var(--warn)}.bsheet .opt.no{color:var(--red)}
.bsheet .opt .hint{margin-left:auto;font-size:11.5px;color:var(--muted);text-align:right;max-width:45%}
.bsheet .gap{height:8px;border-top:1px solid var(--line2)}
.days{display:flex;gap:5px;padding:6px 16px 10px}
.day{flex:1;border-radius:10px;padding:6px 0 5px;text-align:center;background:var(--surface);border:1px solid var(--line);min-width:0}
.day .w{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.day .n{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.day .dots{height:6px;display:flex;justify-content:center;gap:2px;margin-top:3px}
.day .dots i{width:5px;height:5px;border-radius:50%;background:var(--accent)}
.day .dots i.p{background:#7c3aed}
.day.sel{background:var(--accent);border-color:var(--accent);color:#fff}.day.sel .w{color:#dbeafe}.day.sel .dots i{background:var(--surface)}
.day.off{background:transparent;border-style:dashed;color:var(--faint)}
.day.today .n{text-decoration:underline;text-underline-offset:3px}
.p-sum{padding:0 16px 8px;font-size:12.5px;color:var(--muted);line-height:1.35}
.p-sum b{color:var(--text);font-weight:600}
.p-sum .link{color:var(--accent)}
.seg{display:flex;gap:3px;margin:4px 16px 10px;background:var(--soft);border-radius:10px;padding:3px}
.seg button{flex:1;text-align:center;font-size:12.5px;padding:7px 2px;border-radius:8px;color:var(--text2);white-space:nowrap;min-height:38px}
.p-title button.sub{min-height:36px;padding:0 6px}
button.mid{min-height:44px}
.tog{position:relative}.tog::before{content:"";position:absolute;inset:-10px -12px}
.field .v button{min-width:44px;min-height:40px}
.seg button.on{background:var(--surface);color:var(--text);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.seg i.n{font-style:normal;display:inline-block;min-width:16px;height:16px;border-radius:8px;background:#dc2626;color:#fff;font-size:10px;font-weight:600;line-height:16px;padding:0 4px;margin-left:3px;vertical-align:1px}
.card{margin:0 16px 10px;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.card .hd{padding:9px 14px 4px;font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.kv{display:flex;justify-content:space-between;gap:12px;padding:8px 14px;border-top:1px solid var(--line2);font-size:13.5px;min-height:46px;align-items:center;width:100%;text-align:left}
.card .kv:first-child,.card .hd + .kv{border-top:0}
.kv .k{color:var(--muted);min-width:0}
.kv .v{font-weight:500;text-align:right;min-width:0;overflow:hidden;text-overflow:ellipsis}
.kv .v.link{color:var(--accent)}
.kv .chev::after{content:"\203A";color:var(--faint);margin-left:6px;font-weight:400}
.kv.col{flex-direction:column;align-items:flex-start;gap:2px}
.kv.col .v{text-align:left;white-space:normal}
.kv .lft{color:var(--text);font-weight:600;width:34px;flex:none}
.kv .mid{flex:1;color:var(--text);font-weight:400}
.kv.act .k{color:var(--text);font-weight:500}
.btnrow{display:flex;gap:8px;padding:0 16px 10px}
.btn{flex:1;min-height:46px;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:600;font-size:14.5px;padding:0 12px}
.btn.pri{background:var(--accent);color:#fff}
.btn.sec{background:var(--surface);border:1px solid var(--line3);color:var(--text)}
.btn.txt{background:transparent;color:var(--red);font-weight:500}
.btn:disabled{opacity:.5}
.btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chips{display:flex;flex-wrap:wrap;gap:7px;padding:6px 14px 12px}
.card .hd + .chips{padding-top:2px}
.chp{border:1px solid var(--line3);border-radius:18px;padding:0 12px;font-size:13.5px;background:var(--surface);min-height:36px;display:flex;align-items:center;color:var(--text)}
.chp.on{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.chp.dis{color:var(--faint);border-style:dashed}
.field{margin:0 16px 10px;background:var(--surface);border:1px solid var(--line3);border-radius:12px;padding:7px 14px;min-height:50px;display:flex;flex-direction:column;justify-content:center;width:calc(100% - 32px);text-align:left}
.field .l{font-size:11px;color:var(--muted)}
.field .v{font-size:15px;font-weight:500;display:flex;justify-content:space-between;align-items:center;gap:8px}
.field .v .chev::after{content:"\203A";color:var(--faint);font-weight:400}
.field input,.field select,.field textarea{border:0;outline:0;padding:2px 0;width:100%;background:transparent;font-size:15px;font-weight:500;min-height:26px}
.field textarea{min-height:60px;resize:vertical}
.field input::placeholder{color:var(--faint);font-weight:400}
.field.err{border-color:var(--warn)}
.tog{width:42px;height:26px;border-radius:13px;background:var(--line3);position:relative;flex:none;transition:background .15s}
.tog::after{content:"";position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px rgba(0,0,0,.2);transition:left .15s}
.tog.on{background:var(--accent)}.tog.on::after{left:18px}
.bal{font-size:11.5px;border-radius:10px;padding:3px 8px;font-weight:600;white-space:nowrap}
.bal.neg{background:var(--t-orange);color:var(--on-orange)}.bal.pos{background:var(--t-green);color:var(--on-green)}.bal.zero{background:var(--surface2);color:var(--text2)}
.stp{display:flex;align-items:center;gap:0;border:1px solid var(--line3);border-radius:10px;overflow:hidden}
.stp button{width:36px;height:34px;display:grid;place-items:center;color:var(--accent);font-size:20px;background:var(--soft)}
.stp b{padding:0 10px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;min-width:64px;text-align:center}
.drop{display:block;margin:4px 16px 10px;border:2px dashed var(--faint);border-radius:14px;padding:22px 16px;text-align:center;color:var(--accent);font-weight:600;background:var(--surface);position:relative;width:calc(100% - 32px)}
.drop span{display:block;font-size:11.5px;color:var(--muted);font-weight:400;margin-top:2px}
.drop input{position:absolute;inset:0;opacity:0;width:100%;height:100%}
.p-note{padding:0 16px 8px;font-size:12px;color:var(--muted);margin:0;line-height:1.35}
.tag{display:inline-block;border-radius:4px;padding:0 5px;font-size:10px;line-height:15px;background:var(--surface2);color:var(--text2);vertical-align:1px}
.tag.p{background:var(--t-violet);color:var(--on-violet)}.tag.l{background:var(--t-blue);color:var(--on-blue)}
.tl{position:relative;margin:4px 16px 0 54px;touch-action:pan-y}
.tl .hr{position:absolute;left:-42px;width:38px;text-align:right;font-size:10.5px;color:var(--faint);transform:translateY(-7px);font-variant-numeric:tabular-nums}
.tl .ln{position:absolute;left:0;right:0;border-top:1px solid var(--line)}
.tl .bk{position:absolute;left:0;right:0;border-radius:7px;padding:2px 8px;font-size:11.5px;line-height:1.2;overflow:hidden;display:flex;align-items:center;text-align:left}
.tl .bk.sess{background:var(--t-blue);color:var(--on-blue)}.tl .bk.sess.p{background:var(--t-violet);color:var(--on-violet)}.tl .bk.sess.off{background:var(--surface2);color:var(--faint);text-decoration:line-through}
.tl .bk.sess b{font-weight:600;margin-right:3px}
.tl .bk.brk{background:repeating-linear-gradient(135deg,var(--soft) 0 4px,var(--surface2) 4px 8px);color:var(--faint);font-size:9.5px;padding:0 8px}
.tl .bk.lunch{background:var(--line2);color:var(--muted)}
.tl .bk.free{border:1px dashed var(--faint);color:var(--accent);justify-content:space-between;background:transparent;font-size:11px}
.tl .bk.free .plus{width:22px;height:22px;border-radius:50%;border:1.5px solid var(--accent);display:grid;place-items:center;font-size:15px;line-height:1;flex:none}
.tl .bk .tx{min-width:0;overflow:hidden;text-overflow:ellipsis}
.tl .bk.sess,.tl .bk.free{z-index:1}
.tl .bk.bz{background:repeating-linear-gradient(135deg,var(--t-grey) 0 6px,var(--surface2) 6px 12px);color:var(--text2);font-size:11px;border:1px solid var(--line3);z-index:0}
.tl.sm .bk{font-size:10px;padding:0 6px;line-height:1.15}
.tl.sm .bk .tx{white-space:nowrap}
.tl.sm .bk.free{font-size:10px}.tl.sm .bk.free .plus{width:18px;height:18px;font-size:13px}
.tl .hr.ex{color:var(--muted)}
.tlhead{display:flex;align-items:flex-end;margin:8px 16px 10px;font-size:10.5px;color:var(--muted);line-height:13px}
.tlhead span{flex:none;width:50px;text-align:right}
/* панель над таймлайном: пояса и масштаб */
.tlbar{display:flex;align-items:center;gap:8px;padding:0 16px 4px}
.tlbar .tzs{display:flex;flex-wrap:wrap;gap:5px;flex:1;min-width:0;padding:2px 0}
.tlbar.zrow{justify-content:flex-end;padding-top:0}
.tlbar .tzs::-webkit-scrollbar{display:none}
.tzc{flex:none;border:1px solid var(--line3);border-radius:14px;padding:0 10px;min-height:32px;font-size:11.5px;color:var(--muted);background:var(--surface);display:flex;align-items:center;white-space:nowrap}
.tzc{border-style:dashed}
.tzc.on{background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent);font-weight:500}
.tzc.on.main{background:var(--accent);color:#fff;border-color:var(--accent);font-weight:600}
.tzc.set{border:0;background:transparent;color:var(--accent);font-weight:600;padding:0 6px}
.zoom{display:flex;background:var(--soft);border-radius:8px;padding:2px;flex:none}
.zoom button{font-size:11px;padding:0 7px;min-height:28px;border-radius:6px;color:var(--text2);white-space:nowrap}
.zoom button.on{background:var(--surface);color:var(--text);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08)}
/* цветные точки клиентов, занятость */
.cdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:0;flex:none}
.p-row .tm.multi{display:flex;gap:4px;align-items:baseline;width:auto}
.p-row .tm.multi .z1{width:44px;flex:none}
.p-row .tm .z2{width:var(--zw,48px);flex:none;font-weight:500;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.tzhead{display:flex;gap:4px;align-items:flex-end;padding:2px 16px 5px 29px;font-size:10.5px;color:var(--muted);line-height:13px}
.tzhead span{width:var(--zw,48px);flex:none;white-space:nowrap}
.tzhead span.m{width:44px;color:var(--text);font-weight:600}
.tlhead span.m{color:var(--text);font-weight:600}
.zrow{display:flex;align-items:center;gap:12px;min-height:52px;border-top:1px solid var(--line2)}
.zrow .zn{flex:1;display:flex;flex-direction:column;min-width:0}
.zrow .zn .small{margin-top:1px}
.zrow .zdel{width:36px;height:36px;border-radius:18px;font-size:22px;line-height:1;color:var(--red);flex:none;display:grid;place-items:center}
.zv{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:2px 14px 8px}
.zv .l{font-size:12px;color:var(--muted);margin-right:2px}
.p-note.picked b{color:var(--text);font-weight:600}
.p-alert.soft{background:var(--t-orange);border-color:var(--on-orange);color:var(--on-orange)}
.p-alert.soft button{color:var(--on-orange);font-weight:600}
.next .tm small{display:block;text-align:right;font-size:11px;color:var(--muted);font-weight:500;white-space:nowrap}
.tlbar.top{padding:8px 16px 2px}
.cdot.big{width:14px;height:14px;vertical-align:-2px}
.swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:6px 0 12px}
.swl{font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600;margin:6px 0 4px}
.pal{display:grid;gap:6px;padding:2px 0 10px}
.pc{aspect-ratio:1;border-radius:8px;border:1px solid var(--line2);min-height:28px}
.pc.on{outline:2px solid var(--accent);outline-offset:1px}
label.kv{position:relative;cursor:pointer}
.sw{height:46px;border-radius:12px;font-size:20px;font-weight:700;display:grid;place-items:center;border:1px solid var(--line2)}
.sw.on{outline:2px solid var(--accent);outline-offset:2px}
.day .dots i.b,.mcell .dots i.b{background:var(--faint)}
.day.sel .dots i{box-shadow:0 0 0 1px rgba(255,255,255,.75)}
.day.allbz .n,.mcell.allbz .n{background:var(--t-grey);border-radius:6px;padding:0 5px;color:var(--text2);display:inline-block;line-height:1.25}
.day.sel.allbz .n,.mcell.sel.allbz .n{background:rgba(255,255,255,.25);color:#fff}
.p-row.bz{background:repeating-linear-gradient(135deg,var(--t-grey) 0 6px,var(--surface) 6px 12px);border-style:dashed;min-height:40px;padding:5px 12px;color:var(--text2);font-size:13px}
.p-row.bz .tm{font-weight:500;color:var(--text2);font-size:13px}
.p-row.bz .who{font-size:12.5px}
.tl .now{position:absolute;left:-6px;right:0;border-top:2px solid #dc2626;z-index:2}
.tl .now::before{content:"";position:absolute;left:0;top:-5px;width:8px;height:8px;border-radius:50%;background:#dc2626}
#toast{position:fixed;left:16px;right:16px;bottom:calc(var(--nav) + 20px);z-index:40;background:var(--toast);color:#fff;border-radius:12px;padding:12px 14px;font-size:14px;box-shadow:0 8px 24px rgba(0,0,0,.25)}
#toast.err{background:#991b1b}
.search{margin:0 16px 8px;background:var(--surface);border:1px solid var(--line3);border-radius:12px;padding:0 14px;min-height:44px;display:flex;align-items:center}
.search input{border:0;outline:0;width:100%;font-size:15px;background:transparent}
.list-h{padding:10px 16px 4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.empty{padding:24px 16px;text-align:center;color:var(--muted);font-size:14px}
.pre{white-space:pre-wrap;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12px;background:var(--surface);border:1px solid var(--line);border-radius:12px;margin:0 16px 10px;padding:12px}
.pick{max-height:60vh;overflow:auto}
.pick .opt{min-height:44px}
.rowbtn{display:flex;gap:8px;padding:0 16px 10px;flex-wrap:wrap}
.busy{position:fixed;inset:0;z-index:50;background:var(--busy);display:grid;place-items:center}
.busy .spin{margin:0}
.mono{font-family:ui-monospace,monospace;font-size:12px}
.small{font-size:12px;color:var(--muted)}
.hl{background:var(--hl)}

.p-alert{margin:8px 16px 4px;padding:10px 12px;border-radius:12px;background:var(--t-red);border:1px solid var(--on-red);color:var(--on-red)}
.p-alert .h{font-weight:700;margin-bottom:4px}
.p-alert button{display:block;width:100%;text-align:left;padding:6px 0;color:var(--on-red);font-size:14px;text-decoration:underline}
.p-alert .more{font-size:12px;opacity:.8}

/* приветствие на «Сегодня» */
.hello{margin:14px 16px 2px;padding:14px 16px;border-radius:16px;background:linear-gradient(135deg,var(--accent-soft),var(--surface));border:1px solid var(--line);width:calc(100% - 32px);text-align:left;display:block}
.hello .hi{font-size:19px;font-weight:600;letter-spacing:-.01em}
.hello .ph{font-size:14px;color:var(--accent);margin-top:3px;font-weight:500}
.hello .ask{font-size:12px;color:var(--muted);margin-top:4px}
/* заметная кнопка действия */
.cta{display:flex;align-items:center;gap:10px;margin:2px 16px 10px;width:calc(100% - 32px);padding:10px 12px;border-radius:12px;background:var(--t-orange);color:var(--on-orange);text-align:left;font-size:13.5px;line-height:1.25}
.cta .ic{width:26px;height:26px;border-radius:50%;background:var(--on-orange);color:var(--t-orange);display:grid;place-items:center;font-weight:700;flex:none}
.cta .tx{flex:1;min-width:0}
.cta .go{flex:none;font-weight:700;white-space:nowrap;background:var(--surface);color:var(--on-orange);border-radius:10px;padding:7px 10px}
/* месяц */
.mhead{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:0 16px 4px;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;text-align:center}
.mgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:0 16px 10px}
.mcell{border-radius:10px;background:var(--surface);border:1px solid var(--line);min-height:50px;padding:5px 2px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;position:relative}
.mcell .n{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.mcell .c{font-size:10px;color:var(--muted);min-height:12px}
.mcell .dots{height:5px;display:flex;gap:2px}
.mcell .dots i{width:4px;height:4px;border-radius:50%;background:var(--accent)}.mcell .dots i.p{background:#7c3aed}
.mcell.out{opacity:.35}.mcell.off{background:transparent;border-style:dashed}
.mcell.today .n{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.mcell.sel{background:var(--accent);border-color:var(--accent);color:#fff}.mcell.sel .c{color:#dbeafe}.mcell.sel .n{color:#fff}.mcell.sel .dots i{background:#fff}
.mcell.bad::after{content:"";position:absolute;top:4px;right:5px;width:7px;height:7px;border-radius:50%;background:#dc2626}
/* сортировка и чипы-вставки */
.sortrow{display:flex;justify-content:flex-end;padding:0 16px 6px}
.sortrow button{font-size:12.5px;color:var(--accent);min-height:32px;padding:0 4px}
.ins{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px}
.ins button{border:1px solid var(--accent);color:var(--accent);border-radius:16px;padding:0 12px;min-height:34px;font-size:13px;font-weight:500;background:var(--surface)}
.preview{margin:0 16px 10px;padding:10px 12px;border-radius:12px;background:var(--surface2);font-size:13.5px;white-space:pre-wrap;line-height:1.35}
.preview .cap{display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:4px;font-weight:600}
.sig{display:flex;flex-wrap:wrap;gap:6px;padding:0 0 10px}
.sig span{background:var(--accent-soft);color:var(--accent);border-radius:14px;padding:4px 6px 4px 10px;font-size:13px;display:flex;align-items:center;gap:4px}
.sig span button{width:22px;height:22px;border-radius:50%;color:var(--accent);font-size:16px;line-height:1}
.num{font-variant-numeric:tabular-nums;color:var(--muted)}
/* Клиенты → Проекты: группы клиентов по проектам и «Личные» */
.p-list.groups{gap:12px}
.grp{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.grp .grph{display:flex;align-items:center;gap:2px;padding-right:6px;background:var(--surface2)}
.grp .gopen{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:10px 6px 10px 12px;text-align:left}
.grp .gtog{flex:none;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:var(--muted);font-size:16px}
.grp.closed .gr{display:none}
.p-list.q .grp.closed .gr{display:flex}
.sortrow.two{justify-content:space-between}
.grow{display:flex;align-items:center;gap:10px;min-height:54px;border-top:1px solid var(--line2);background:var(--surface);position:relative}
.grow .gh{width:34px;height:44px;display:grid;place-items:center;font-size:22px;color:var(--faint);cursor:grab;touch-action:none;flex:none;user-select:none}
.grow .zn{flex:1;display:flex;flex-direction:column;min-width:0}
.grow.drag{z-index:2;box-shadow:0 6px 18px rgba(0,0,0,.18);border-radius:10px}
.grp .who{flex:1;min-width:0}
.grp .grph .n{font-weight:600;font-size:15px}
.grp .i{font-size:11.5px;color:var(--muted);line-height:1.25}
.grp .gr{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border-top:1px solid var(--line2);text-align:left;min-height:50px}
.grp .gr .n{font-weight:500}
.grp .gr.none{color:var(--faint);font-size:12.5px;min-height:40px}
.grp .i.mv,.p-row .i.mv{color:var(--accent)}
/* резерв: время держится за клиентом, но это ещё не сессия — штриховка в цвете клиента, пунктирная рамка */
.tl .bk.sess.res{background:repeating-linear-gradient(135deg,var(--rb,var(--t-blue)) 0 7px,var(--surface) 7px 13px);border:1.5px dashed var(--rd,var(--oc-blue));color:var(--text)}
.tl .bk.sess.res .tx{background:var(--surface);border-radius:5px;padding:1px 6px}
.p-row.res{background:repeating-linear-gradient(135deg,var(--rb,var(--t-blue)) 0 7px,var(--surface) 7px 13px);border:1.5px dashed var(--rd,var(--oc-blue))}
.p-row.res .who{background:var(--surface);border-radius:8px;padding:3px 7px}
.p-row .st.res{background:var(--surface);border:1px dashed var(--rd,var(--oc-blue));color:var(--text2)}
.p-row.res.due{outline:2px solid var(--warn);outline-offset:1px}
.p-row .rbtns{display:flex;flex-direction:column;gap:4px;flex:none}
.p-row .rbtns .btn{min-height:32px;padding:0 10px;font-size:12.5px;flex:none}
.dots i.r{background:transparent!important;border:1.5px solid;box-sizing:border-box}
.cta.res{background:var(--accent-soft);color:var(--accent)}
.cta.res .ic{background:var(--accent);color:#fff}
.cta.res .go{color:var(--accent)}
.vars{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:0 14px 12px}
.vars .l{font-size:12px;color:var(--muted)}
.vars .var{border:1px dashed var(--accent);color:var(--accent);background:var(--accent-soft);border-radius:14px;padding:0 10px;min-height:30px;font-size:12.5px}
