/* Layout: app shell — slim sidebar (workspace, views, focus filters, account) + main column (top bar, KPI row, board/list, upcoming + activity). Detail slides in from the right. */
:root{
  --bg:#F6F7F9; --surface:#FFFFFF; --surface-2:#F0F2F5; --side:#FBFBFC; --line:#E4E7EC; --line-2:#D5DAE1;
  --fg:#16181D; --fg-2:#3A3F4A; --muted:#6B7280;
  --accent:#3B5BFD; --accent-2:#2E4BE0; --accent-soft:#ECEFFF; --on-accent:#FFFFFF;
  --client:#C2570C; --client-soft:#FFF1E6; --ok:#16803C; --ok-soft:#E7F6EC; --danger:#D92D20; --danger-soft:#FEECEB;
  --s-requested:#98A2B3; --s-scoped:#8B5CF6; --s-scheduled:#0EA5E9; --s-progress:#3B5BFD; --s-done:#16A34A;
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
  --shadow:0 1px 2px rgba(16,24,40,.04),0 6px 16px -4px rgba(16,24,40,.08);
  --shadow-lg:0 24px 48px -12px rgba(16,24,40,.22);
  --r:12px; --r-sm:8px;
  --f:"Geist",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0A0B0E; --surface:#121419; --surface-2:#191C22; --side:#0D0F12; --line:#22262E; --line-2:#2E333D;
  --fg:#ECEEF2; --fg-2:#C4C8D0; --muted:#8B919C;
  --accent:#7088FF; --accent-2:#8A9DFF; --accent-soft:#1A2147; --on-accent:#0A0E24;
  --client:#FB9A4B; --client-soft:#2F1D0E; --ok:#4ADE80; --ok-soft:#0F2918; --danger:#F87171; --danger-soft:#33130F;
  --s-requested:#6B7280; --s-scoped:#A78BFA; --s-scheduled:#38BDF8; --s-progress:#7088FF; --s-done:#4ADE80;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow:0 1px 2px rgba(0,0,0,.35),0 6px 16px -4px rgba(0,0,0,.45); --shadow-lg:0 24px 48px -12px rgba(0,0,0,.7);
  color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0A0B0E; --surface:#121419; --surface-2:#191C22; --side:#0D0F12; --line:#22262E; --line-2:#2E333D;
  --fg:#ECEEF2; --fg-2:#C4C8D0; --muted:#8B919C;
  --accent:#7088FF; --accent-2:#8A9DFF; --accent-soft:#1A2147; --on-accent:#0A0E24;
  --client:#FB9A4B; --client-soft:#2F1D0E; --ok:#4ADE80; --ok-soft:#0F2918; --danger:#F87171; --danger-soft:#33130F;
  --s-requested:#6B7280; --s-scoped:#A78BFA; --s-scheduled:#38BDF8; --s-progress:#7088FF; --s-done:#4ADE80;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow:0 1px 2px rgba(0,0,0,.35),0 6px 16px -4px rgba(0,0,0,.45); --shadow-lg:0 24px 48px -12px rgba(0,0,0,.7);
  color-scheme:dark}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.5 var(--f);-webkit-font-smoothing:antialiased;letter-spacing:-.003em}
[hidden]{display:none!important}
h1,h2,h3{margin:0;text-wrap:balance;letter-spacing:-.015em}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.mono{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
.muted{color:var(--muted)} .small{font-size:12.5px} .grow{flex:1}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}
.link{color:var(--accent);font-weight:500;font-size:13px}
.link:hover{text-decoration:underline}

/* buttons + inputs */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:var(--r-sm);border:1px solid var(--line-2);background:var(--surface);font-weight:500;font-size:13.5px;box-shadow:var(--shadow-sm);transition:background .15s,border-color .15s,transform .05s;white-space:nowrap}
.btn:hover{background:var(--surface-2)}
.btn:active{transform:translateY(1px)}
.btn.sm{height:30px;padding:0 10px;font-size:13px}
.btn.block{width:100%;height:40px}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);box-shadow:0 1px 2px rgba(59,91,253,.25),inset 0 1px 0 rgba(255,255,255,.15)}
.btn.primary:hover{background:var(--accent-2);border-color:var(--accent-2)}
.btn.ghost{border-color:transparent;background:transparent;box-shadow:none;color:var(--muted)}
.btn.ghost:hover{color:var(--fg);background:var(--surface-2)}
.btn.danger{color:var(--danger);background:transparent;box-shadow:none;border-color:var(--line)}
.btn.danger:hover{background:var(--danger-soft);border-color:var(--danger-soft)}
.btn.danger.armed{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn svg{width:16px;height:16px}
.icon-btn{width:32px;height:32px;display:grid;place-items:center;border-radius:var(--r-sm);color:var(--muted)}
.icon-btn:hover{background:var(--surface-2);color:var(--fg)}
.inp{width:100%;height:36px;padding:0 11px;border:1px solid var(--line-2);border-radius:var(--r-sm);background:var(--surface);color:var(--fg);font-size:14px;transition:border-color .15s,box-shadow .15s}
textarea.inp{height:auto;padding:9px 11px;resize:vertical;line-height:1.5}
.inp:hover{border-color:var(--muted)}
.inp:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.inp:disabled{opacity:.7;cursor:not-allowed}
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500;color:var(--fg-2);min-width:0}
.form-err{margin:0;color:var(--danger);font-size:13px;background:var(--danger-soft);padding:8px 12px;border-radius:var(--r-sm)}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.span3{grid-column:1/-1} .right{display:flex;justify-content:flex-end}
@media (max-width:560px){.grid2,.grid3{grid-template-columns:minmax(0,1fr)}}

/* brand */
.brand-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(140deg,var(--accent),#1E2FA8);color:#fff;display:grid;place-items:center;font-weight:700;font-size:13px;letter-spacing:.02em;flex:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.25)}
.brand-mark.lg{width:48px;height:48px;border-radius:14px;font-size:17px}

/* ============ login ============ */
.login{min-height:100%;display:grid;grid-template-columns:1.1fr 1fr;align-items:stretch}
.login-brand{padding:56px clamp(24px,6vw,80px);display:flex;flex-direction:column;justify-content:center;gap:28px;background:radial-gradient(900px 500px at 0% 0%,var(--accent-soft),transparent 60%),var(--side);border-right:1px solid var(--line)}
.login-h{font-size:clamp(30px,4vw,44px);font-weight:700;letter-spacing:-.03em;line-height:1.05}
.login-sub{color:var(--muted);font-size:16px;margin:10px 0 0;max-width:40ch}
.login-points{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;color:var(--fg-2)}
.login-points li{display:flex;gap:10px;align-items:center}
.pt-dot{width:10px;height:10px;border-radius:3px}
.pt-dot.s-progress{background:var(--accent)} .pt-dot.s-client{background:var(--client)} .pt-dot.s-done{background:var(--ok)}
.login-card{align-self:center;justify-self:center;width:min(380px,calc(100% - 32px));display:flex;flex-direction:column;gap:16px;padding:32px 0}
.login-card h2{font-size:22px}
@media (max-width:820px){.login{grid-template-columns:1fr}.login-brand{padding:36px 20px;border-right:0;border-bottom:1px solid var(--line);gap:18px}.login-points{display:none}}

/* ============ shell ============ */
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100%}
.side{position:sticky;top:0;height:100vh;height:100dvh;background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column;gap:18px;padding:16px 12px;overflow-y:auto}
.side-top{display:flex;gap:10px;align-items:center;padding:4px 6px}
.ws{min-width:0}
.ws-name{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-sub{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav,.side-sec{display:flex;flex-direction:column;gap:2px}
.side-label{font-size:11.5px;font-weight:500;color:var(--muted);padding:0 10px 6px;text-transform:uppercase;letter-spacing:.06em}
.nav-i{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:var(--r-sm);color:var(--fg-2);font-weight:500;text-align:left;width:100%}
.nav-i:hover{background:var(--surface-2);color:var(--fg)}
.nav-i.on{background:var(--surface);color:var(--fg);box-shadow:var(--shadow-sm),0 0 0 1px var(--line)}
.nav-i.on svg{color:var(--accent)}
.nav-i.sm{height:32px;font-size:13.5px}
.nav-i .n{margin-left:auto;font-family:var(--f-mono);font-size:12px;color:var(--muted)}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;position:relative}
.me{display:flex;align-items:center;gap:8px;padding:8px 6px 0;border-top:1px solid var(--line)}
.me-txt{min-width:0;flex:1}
.me-name{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me-role{font-size:12px;color:var(--muted)}
.menu{position:absolute;bottom:52px;right:0;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-lg);padding:4px;display:flex;flex-direction:column;min-width:180px;z-index:5}
.menu button{text-align:left;padding:8px 10px;border-radius:6px;font-size:13.5px}
.menu button:hover{background:var(--surface-2)}

.av{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:11.5px;font-weight:600;color:#fff;flex:none;letter-spacing:0}
.av.sm{width:22px;height:22px;font-size:10px}

.main{min-width:0;padding:0 28px 48px;display:flex;flex-direction:column;gap:20px}
.topbar{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:12px;padding:16px 0 14px;background:linear-gradient(var(--bg) 75%,transparent)}
.tb-title{display:flex;align-items:center;gap:10px;margin-right:auto;min-width:0}
.tb-title h1{font-size:22px;font-weight:650}
.live{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:2px 9px 2px 8px}
.live i{width:7px;height:7px;border-radius:50%;background:var(--muted)}
.live.on i{background:var(--ok);box-shadow:0 0 0 3px var(--ok-soft);animation:pulse 2.4s infinite}
@keyframes pulse{50%{box-shadow:0 0 0 5px transparent}}
.search{position:relative;display:flex;align-items:center;width:min(280px,32vw)}
.search svg{position:absolute;left:10px;color:var(--muted);width:16px;height:16px}
.search input{width:100%;height:36px;border:1px solid var(--line-2);background:var(--surface);border-radius:var(--r-sm);padding:0 34px 0 34px;font-size:13.5px}
.search input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.search kbd{position:absolute;right:8px;font:500 11px var(--f-mono);color:var(--muted);border:1px solid var(--line-2);border-radius:5px;padding:0 5px;background:var(--surface-2)}
.mob-only{display:none}

/* KPIs */
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;display:flex;flex-direction:column;gap:6px;box-shadow:var(--shadow-sm);min-width:0}
.kpi-h{font-size:13px;color:var(--muted);font-weight:500;display:flex;align-items:center;gap:7px;min-width:0}
.kpi-h>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
@media (max-width:560px){.kpi-h>span:last-child{white-space:normal}}
.kpi-v{font-size:30px;font-weight:650;letter-spacing:-.03em;line-height:1.1;font-variant-numeric:tabular-nums}
.kpi-v small{font-size:16px;color:var(--muted);font-weight:500;margin-left:2px}
.kpi-f{font-size:12.5px;color:var(--muted)}
.meter{height:6px;border-radius:6px;background:var(--surface-2);overflow:hidden}
.meter i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,var(--accent),var(--s-scheduled));transition:width .4s ease}
.kpi .meter{margin-top:6px}
.filterbar{display:flex;align-items:center;gap:10px;font-size:13.5px;background:var(--accent-soft);color:var(--fg-2);padding:8px 14px;border-radius:var(--r-sm);margin-top:-6px}

/* board */
.board-scroll{overflow-x:auto;margin:0 -28px;padding:2px 28px 8px;scrollbar-width:thin}
.board{display:grid;grid-template-columns:repeat(5,minmax(212px,1fr));gap:14px;min-width:min-content;align-items:start}
.col{display:flex;flex-direction:column;gap:10px;border-radius:14px;padding:4px;min-height:220px;transition:background .15s}
.col.drop{background:var(--accent-soft);box-shadow:inset 0 0 0 2px var(--accent)}
.col-h{display:flex;align-items:center;gap:8px;padding:4px 6px 2px;min-height:34px;font-weight:600;font-size:13.5px}
.col-h .cnt{font:500 12px var(--f-mono);color:var(--muted);background:var(--surface-2);border-radius:20px;padding:0 7px}
.col-h .add{margin-left:auto;width:26px;height:26px;border-radius:6px;display:grid;place-items:center;color:var(--muted)}
.col-h .add:hover{background:var(--surface-2);color:var(--fg)}
.col-h .add svg{width:15px;height:15px}
.col-empty{border:1.5px dashed var(--line-2);border-radius:var(--r);padding:22px 10px;text-align:center;color:var(--muted);font-size:12.5px}
.card{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px 12px;display:flex;flex-direction:column;gap:10px;cursor:pointer;box-shadow:var(--shadow-sm);transition:box-shadow .15s,border-color .15s,transform .15s;text-align:left;width:100%}
.card:hover{border-color:var(--line-2);box-shadow:var(--shadow);transform:translateY(-1px)}
.card.dragging{opacity:.4}
.card-top{display:flex;align-items:center;gap:8px}
.card .ref{margin-right:auto}
.ref{font:500 11.5px var(--f-mono);color:var(--muted);letter-spacing:.01em}
.card h4{margin:0;font-size:14.5px;font-weight:600;line-height:1.35;letter-spacing:-.01em;overflow-wrap:anywhere}
.card .site{font-size:12.5px;color:var(--muted);margin-top:-6px;display:flex;align-items:center;gap:4px;overflow-wrap:anywhere}
.card .site svg{width:13px;height:13px}
.prog{display:flex;align-items:center;gap:10px;font:500 11.5px var(--f-mono);color:var(--muted)}
.prog .meter{flex:1;height:5px}
.prog.full .meter i{background:var(--ok)}
.card-f{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.card-f .right{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}
.card-f .right svg{width:14px;height:14px}
.pill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:6px;font-size:12px;font-weight:500;white-space:nowrap;background:var(--surface-2);color:var(--fg-2)}
.pill.us{background:var(--accent-soft);color:var(--accent)}
.pill.client{background:var(--client-soft);color:var(--client)}
.pill.ok{background:var(--ok-soft);color:var(--ok)}
.pill.late{background:var(--danger-soft);color:var(--danger)}
.pill.soon{background:var(--client-soft);color:var(--client)}
.pill.date{font-family:var(--f-mono);font-size:11.5px}
.pill .dot{width:6px;height:6px}
.prio{width:18px;height:18px;display:grid;place-items:center;border-radius:5px}
.prio svg{width:13px;height:13px;stroke-width:2.2}
.prio.high{color:var(--client)} .prio.urgent{color:#fff;background:var(--danger)} .prio.low{color:var(--muted)}

/* list */
.table-wrap{overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-sm)}
.tbl{width:100%;border-collapse:collapse;font-size:13.5px;min-width:820px}
.tbl th{text-align:left;font-weight:500;font-size:12.5px;color:var(--muted);padding:10px 14px;border-bottom:1px solid var(--line);white-space:nowrap;cursor:pointer;user-select:none}
.tbl th:hover{color:var(--fg)}
.tbl th.sorted::after{content:" ↓";color:var(--accent)} .tbl th.sorted.asc::after{content:" ↑"}
.tbl td{padding:11px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.tbl tbody tr{cursor:pointer;transition:background .1s}
.tbl tbody tr:hover{background:var(--surface-2)}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl .t{font-weight:600} .tbl .s{font-size:12px;color:var(--muted)}
.tbl .prog{min-width:120px}
.tbl.compact{min-width:520px} .tbl.compact tbody tr{cursor:default}
.stage{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:500;white-space:nowrap}
.empty-row td{text-align:center;color:var(--muted);padding:32px}

/* lower panels */
.lower{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:14px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:8px;min-width:0}
.panel-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.panel-h h2{font-size:15px;font-weight:600}
.upc{display:flex;flex-direction:column}
.upc-i{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:9px 6px;margin:0 -6px;border-radius:8px;cursor:pointer;text-align:left;width:calc(100% + 12px)}
.upc-i:hover{background:var(--surface-2)}
.cal{width:44px;border-radius:9px;border:1px solid var(--line);overflow:hidden;text-align:center;background:var(--surface);line-height:1.15}
.cal small{display:block;font:500 9.5px var(--f-mono);text-transform:uppercase;letter-spacing:.06em;padding:2px 0;background:var(--surface-2);color:var(--muted)}
.cal b{display:block;font-size:17px;font-weight:650;padding:2px 0 4px}
.cal.late small{background:var(--danger);color:#fff}
.upc-i .t{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upc-i .s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feed{display:flex;flex-direction:column}
.ev{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.ev:first-child{border-top:0}
.ev .l{font-size:13.5px;color:var(--fg-2);overflow-wrap:anywhere}
.ev .who{font-weight:600;color:var(--fg)}
.ev .proj{color:var(--fg);font-weight:500;border-bottom:1px solid var(--line-2)}
.ev .proj:hover{color:var(--accent);border-color:var(--accent)}
.ev .when{font-size:12px;color:var(--muted);margin-left:6px}
.ev .bubble{margin-top:6px;background:var(--surface-2);border-radius:4px 12px 12px 12px;padding:9px 12px;white-space:pre-wrap;color:var(--fg);font-size:13.5px}
.ev.mine .bubble{background:var(--accent-soft)}
.ev .del{font-size:12px;color:var(--muted);margin-left:8px;opacity:0}
.ev:hover .del{opacity:1}
.ev .del:hover{color:var(--danger)}
.ev.sys .av{background:var(--surface-2)!important;color:var(--muted)}
.ev.sys .av svg{width:14px;height:14px}
.empty{color:var(--muted);font-size:13.5px;padding:16px 0;text-align:center}
.side-tag{font-size:11px;font-weight:500;border-radius:4px;padding:0 5px;margin-left:4px;vertical-align:1px}
.side-tag.client{background:var(--client-soft);color:var(--client)}
.side-tag.us{background:var(--accent-soft);color:var(--accent)}

/* drawer */
.scrim{position:fixed;inset:0;background:rgba(10,12,18,.32);backdrop-filter:blur(2px);z-index:20;animation:fade .2s}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(600px,100%);background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--shadow-lg);z-index:21;display:flex;flex-direction:column;transform:translateX(102%);transition:transform .28s cubic-bezier(.2,.8,.2,1);visibility:hidden;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.drawer.open{transform:none;visibility:visible}
.d-head{display:flex;align-items:center;gap:10px;padding:12px 16px 12px 24px;border-bottom:1px solid var(--line)}
.d-body{overflow-y:auto;padding:20px 24px 32px;display:flex;flex-direction:column;gap:22px}
.d-title{font-size:24px;font-weight:650;letter-spacing:-.025em;line-height:1.25;border:0;background:transparent;resize:none;padding:4px 8px;margin:-4px -8px;border-radius:8px;width:calc(100% + 16px);overflow:hidden}
.d-title:hover:not(:disabled){background:var(--surface-2)}
.d-title:focus{outline:none;background:var(--surface-2);box-shadow:0 0 0 2px var(--accent-soft)}
.stepper{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.stepper button{display:flex;flex-direction:column;gap:7px;align-items:flex-start;padding:0;font-size:12px;font-weight:500;color:var(--muted);text-align:left;min-width:0}
.stepper button i{height:5px;width:100%;border-radius:4px;background:var(--surface-2);transition:background .2s}
.stepper button.past i{background:var(--accent);opacity:.45}
.stepper button.on i{background:var(--accent)}
.stepper button.on{color:var(--fg);font-weight:600}
.stepper button:hover:not(:disabled){color:var(--fg)}
.stepper.done button i{background:var(--ok)!important;opacity:1}
.stepper span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.props{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
@media (max-width:520px){.props{grid-template-columns:minmax(0,1fr)}}
.prop{display:flex;flex-direction:column;gap:6px;min-width:0}
.prop>span{font-size:12.5px;color:var(--muted);font-weight:500}
.seg{display:grid;grid-template-columns:1fr 1fr;padding:3px;gap:3px;background:var(--surface-2);border-radius:var(--r-sm);height:36px}
.seg button{border-radius:6px;font-size:13px;font-weight:500;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}
.seg button:hover:not(:disabled){color:var(--fg)}
.seg button.on{background:var(--surface);box-shadow:var(--shadow-sm)}
.seg button.on[data-v="us"]{color:var(--accent)} .seg button.on[data-v="client"]{color:var(--client)}
.block{display:flex;flex-direction:column;gap:10px}
.block-h{display:flex;align-items:baseline;justify-content:space-between}
.block-h h3{font-size:14px;font-weight:600}
.checks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.chk{display:flex;align-items:flex-start;gap:10px;padding:7px 8px;margin:0 -8px;border-radius:8px}
.chk:hover{background:var(--surface-2)}
.chk input{appearance:none;width:18px;height:18px;border:1.5px solid var(--line-2);border-radius:5px;margin:1px 0 0;flex:none;display:grid;place-items:center;cursor:pointer;background:var(--surface);transition:all .15s}
.chk input:checked{background:var(--ok);border-color:var(--ok)}
.chk input:checked::after{content:"";width:9px;height:5px;border:2px solid #fff;border-top:0;border-right:0;transform:rotate(-45deg) translate(1px,-1px)}
.chk .txt{flex:1;min-width:0;overflow-wrap:anywhere}
.chk.done .txt{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--line-2)}
.chk .by{font-size:11.5px;color:var(--muted);white-space:nowrap}
.chk .x{opacity:0;color:var(--muted);width:22px;height:22px;border-radius:5px;display:grid;place-items:center}
.chk .x svg{width:14px;height:14px}
.chk:hover .x,.chk .x:focus-visible{opacity:1}
.chk .x:hover{color:var(--danger);background:var(--danger-soft)}
.addrow{display:flex;gap:8px}
.composer{border:1px solid var(--line-2);border-radius:var(--r);overflow:hidden;background:var(--surface);transition:border-color .15s,box-shadow .15s}
.composer:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.composer textarea{border:0;box-shadow:none!important;border-radius:0;resize:none}
.composer-f{display:flex;align-items:center;justify-content:space-between;padding:6px 8px 8px 12px}
.d-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding-top:14px;border-top:1px solid var(--line)}

/* modals */
.modal{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:16px;background:rgba(10,12,18,.4);backdrop-filter:blur(3px);animation:fade .15s}
.dialog{background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-lg);width:min(500px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;padding:20px 22px 22px;display:flex;flex-direction:column;gap:16px;animation:pop .2s cubic-bezier(.2,.8,.2,1)}
.dialog.wide{width:min(760px,100%)}
.dialog-h{display:flex;justify-content:space-between;align-items:center}
.dialog-h h2{font-size:18px;font-weight:650}
.dialog-f{display:flex;justify-content:flex-end;gap:8px}
.userform{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:8px}
.userform .pwgen{grid-column:span 2}
.pwgen{display:flex;gap:6px}
.pwgen .inp{min-width:0}
@media (max-width:760px){.userform{grid-template-columns:minmax(0,1fr)}.userform .pwgen{grid-column:auto}}
.role{font-size:12px;font-weight:500;padding:2px 8px;border-radius:5px;background:var(--surface-2)}
.role.client{background:var(--client-soft);color:var(--client)} .role.admin{background:var(--accent-soft);color:var(--accent)}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--fg);color:var(--bg);padding:10px 16px;border-radius:10px;font-size:13.5px;font-weight:500;z-index:50;box-shadow:var(--shadow-lg);animation:pop .2s;max-width:calc(100% - 32px)}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:translateY(6px) scale(.98)}}
.toast{animation:none}

/* responsive */
@media (max-width:1100px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.lower{grid-template-columns:minmax(0,1fr)}}
@media (max-width:860px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;left:0;top:0;bottom:0;width:260px;z-index:25;transform:translateX(-100%);transition:transform .25s;box-shadow:var(--shadow-lg);padding-top:calc(16px + env(safe-area-inset-top,0px))}
  .side.open{transform:none}
  .mob-only{display:grid}
  .main{padding:0 16px 40px}
  .board-scroll{margin:0 -16px;padding:2px 16px 8px}
  .topbar{flex-wrap:wrap;top:env(safe-area-inset-top,0px)}
  .search{order:5;width:100%}
  .btn#newBtn span,.btn#topUpload span{display:none}
  .btn#topUpload{width:36px;padding:0}
  .btn#newBtn{width:36px;padding:0}
}
@media (max-width:420px){.kpis{gap:8px}.kpi{padding:12px}.kpi-v{font-size:24px}.kpi-f{display:none}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* ============ calendar ============ */
:root{--k-visit:#3B5BFD;--k-window:#C2570C;--k-meeting:#0E9384;--k-deadline:#D92D20;--k-other:#6B7280}
.cal-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.cal-bar h2{font-size:20px;font-weight:650;min-width:9ch}
.cal-nav{display:flex;align-items:center;gap:4px}
.cal-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px;color:var(--muted);margin-right:auto}
.cal-legend span{display:inline-flex;align-items:center;gap:6px}
.cal-legend i{width:9px;height:9px;border-radius:3px;display:inline-block}
.k-visit{background:var(--k-visit)} .k-window{background:var(--k-window)} .k-meeting{background:var(--k-meeting)} .k-deadline{background:var(--k-deadline)} .k-other{background:var(--k-other)}
.k-due{background:transparent;border:1.5px dashed var(--muted)}
.month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:var(--line);gap:1px;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow-sm)}
.month .dow{background:var(--surface-2);font-size:12px;font-weight:500;color:var(--muted);padding:7px 10px;text-transform:uppercase;letter-spacing:.05em}
.day{background:var(--surface);min-height:118px;padding:6px 6px 8px;display:flex;flex-direction:column;gap:3px;cursor:pointer;min-width:0;transition:background .1s}
.day:hover{background:color-mix(in srgb,var(--surface) 92%,var(--accent))}
.day.out{background:var(--bg)} .day.out .dn{color:var(--line-2)}
.day.drop{background:var(--accent-soft)}
.dn{font-size:12.5px;font-weight:500;color:var(--muted);width:24px;height:24px;display:grid;place-items:center;border-radius:50%;font-variant-numeric:tabular-nums}
.day.today .dn{background:var(--accent);color:var(--on-accent);font-weight:600}
.ev-chip{display:flex;align-items:center;gap:5px;font-size:12px;line-height:1.25;padding:3px 6px;border-radius:5px;background:var(--surface-2);color:var(--fg);text-align:left;min-width:0;width:100%;border-left:3px solid var(--k-other)}
.ev-chip:hover{filter:brightness(.97)}
.ev-chip .tm{font-family:var(--f-mono);font-size:11px;color:var(--muted);flex:none}
.ev-chip .tt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ev-chip.visit{border-color:var(--k-visit)} .ev-chip.window{border-color:var(--k-window)} .ev-chip.meeting{border-color:var(--k-meeting)} .ev-chip.deadline{border-color:var(--k-deadline)}
.ev-chip.due{background:transparent;border:1px dashed var(--line-2);border-left:1px dashed var(--line-2);color:var(--fg-2)}
.ev-chip.due.late{border-color:var(--danger);color:var(--danger)}
.more{font-size:11.5px;color:var(--muted);padding:0 6px;text-align:left}
.agenda-panel{margin-top:14px}
.ag-day{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.ag-day:first-child{border-top:0}
.ag-date{font-size:12.5px;color:var(--muted);line-height:1.3}
.ag-date b{display:block;font-size:18px;color:var(--fg);font-weight:650}
.ag-list{display:flex;flex-direction:column;gap:6px;min-width:0}
.ag-list .ev-chip{font-size:13px;padding:6px 9px}
@media (max-width:760px){.day{min-height:64px;padding:4px}.day .ev-chip{font-size:0;padding:0;height:6px;border-left-width:0;border-radius:3px}.day .ev-chip .tm{display:none}.day .ev-chip.visit{background:var(--k-visit)}.day .ev-chip.window{background:var(--k-window)}.day .ev-chip.meeting{background:var(--k-meeting)}.day .ev-chip.deadline{background:var(--k-deadline)}.day .ev-chip.other{background:var(--k-other)}.day .ev-chip.due{background:var(--line-2);border:0}.day .more{display:none}.month .dow{padding:6px 4px;text-align:center;font-size:10.5px}.cal-legend{order:5;width:100%}}

/* drawer: schedule */
.sched{display:flex;flex-direction:column;gap:6px}
.sched .ev-chip{font-size:13px;padding:8px 10px;gap:10px}
.sched .ev-chip .tm{font-size:12px;min-width:92px}
.sched .empty{text-align:left;padding:2px 0}

/* drawer: files */
.drop{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px;border:1.5px dashed var(--line-2);border-radius:var(--r);text-align:center;cursor:pointer;color:var(--fg-2);font-size:13.5px;transition:all .15s}
.drop svg{width:22px;height:22px;color:var(--accent)}
.drop:hover,.drop.over{border-color:var(--accent);background:var(--accent-soft)}
.uploading{display:flex;flex-direction:column;gap:6px}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
.thumb{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--surface-2);border:1px solid var(--line);cursor:zoom-in;max-width:100%}
.thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s}
.thumb:hover img{transform:scale(1.04)}
.thumb .x{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:6px;background:rgba(0,0,0,.55);color:#fff;display:grid;place-items:center;opacity:0}
.thumb:hover .x,.thumb .x:focus-visible{opacity:1}
.thumb .x svg{width:13px;height:13px}
.filelist{display:flex;flex-direction:column}
.file{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px;margin:0 -8px;border-radius:8px}
.file:hover{background:var(--surface-2)}
.ficon{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;font:600 10px var(--f-mono);text-transform:uppercase;background:var(--accent-soft);color:var(--accent)}
.ficon.pdf{background:var(--danger-soft);color:var(--danger)} .ficon.xls,.ficon.csv{background:var(--ok-soft);color:var(--ok)} .ficon.zip{background:var(--client-soft);color:var(--client)}
.file .fn{font-weight:500;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--fg);text-decoration:none}
.file .fn:hover{color:var(--accent)}
.file .fm{font-size:12px;color:var(--muted)}
.file .acts{display:flex;gap:2px}
.file .acts a,.file .acts button{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;color:var(--muted)}
.file .acts a:hover,.file .acts button:hover{background:var(--surface);color:var(--fg)}
.file .acts svg{width:15px;height:15px}

/* composer attachments */
.attach-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px}
.attach-chips:empty{display:none}
.achip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;background:var(--surface-2);border-radius:6px;padding:3px 4px 3px 8px;max-width:220px}
.achip span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.achip button{width:18px;height:18px;display:grid;place-items:center;border-radius:4px;color:var(--muted)}
.achip button:hover{background:var(--line);color:var(--fg)}
.achip svg{width:12px;height:12px}
.composer-f{gap:6px}
.composer-f label.icon-btn{cursor:pointer}
.bubble-files{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;align-items:flex-start}
.bubble-files .thumb{width:92px;height:92px;aspect-ratio:auto}
.bubble-files .fpill{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:5px 9px;color:var(--fg);text-decoration:none;max-width:240px}
.bubble-files .fpill:hover{border-color:var(--accent)}
.bubble-files .fpill span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bubble-files .fpill svg{width:14px;height:14px;color:var(--muted)}

/* lightbox (always dark) */
.lightbox{position:fixed;inset:0;z-index:60;background:rgba(6,8,12,.92);display:grid;grid-template-rows:auto 1fr;animation:fade .15s;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.lb-bar{display:flex;align-items:center;gap:10px;padding:12px 16px;color:#E8EAEE;font-size:13.5px}
.lb-bar .btn{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.15);color:#fff;box-shadow:none;text-decoration:none}
.lb-x{color:#fff}
.lb-x:hover{background:rgba(255,255,255,.1);color:#fff}
.lightbox img{max-width:calc(100vw - 32px);max-height:calc(100dvh - 90px);object-fit:contain;place-self:center;border-radius:6px;grid-row:2}
.lb-nav{position:fixed;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;display:grid;place-items:center}
.lb-nav:hover{background:rgba(255,255,255,.2)}
.lb-nav.prev{left:16px} .lb-nav.next{right:16px}
.dialog-f .grow{flex:1}
.roles-help{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--fg-2);background:var(--surface-2);border-radius:var(--r-sm);padding:10px 12px}
.roles-help .role{display:inline-block;min-width:52px;text-align:center;margin-right:8px}

/* ============ v6: colors, account, event photos ============ */
.seg.mini{height:32px;width:auto;display:inline-grid;grid-template-columns:auto auto}
.seg.mini button{padding:0 10px;font-size:12.5px}
.seg.mini button.on{color:var(--fg)}
.ev-chip[data-person]{background:color-mix(in srgb,var(--pc) 12%,var(--surface))}
.ev-chip .cam{display:inline-flex;align-items:center;gap:3px;margin-left:auto;color:var(--muted);font-size:11px;flex:none}
.ev-chip .cam svg{width:13px;height:13px}
.who-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--fg-2);margin-left:auto;flex:none}
.who-chip + .cam{margin-left:8px}
.av.xs{width:18px;height:18px;font-size:8.5px}
.swatch-inp{appearance:none;-webkit-appearance:none;width:30px;height:30px;padding:0;border:1px solid var(--line-2);border-radius:8px;background:none;cursor:pointer;flex:none}
.swatch-inp::-webkit-color-swatch-wrapper{padding:3px}
.swatch-inp::-webkit-color-swatch{border:0;border-radius:5px}
.swatch-inp::-moz-color-swatch{border:0;border-radius:5px}
.name-color{display:flex;gap:6px;align-items:center}
.name-color .inp{min-width:0}
.userform{grid-template-columns:1.2fr 1.3fr 1fr}
.swatches{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.sw{width:26px;height:26px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);transition:transform .1s}
.sw:hover{transform:scale(1.1)}
.sw.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--fg)}
.acct-sec{display:flex;flex-direction:column;gap:12px;padding-top:16px;border-top:1px solid var(--line)}
.acct-sec:first-of-type{border-top:0;padding-top:0}
.acct-sec h3{font-size:15px;font-weight:600}
.copyrow{display:flex;gap:6px}
.copyrow .inp{font-size:12px;min-width:0}
.steps{margin:0;padding-left:20px;color:var(--fg-2);display:flex;flex-direction:column;gap:4px}
.ev-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px}
.ev-photos .fpill{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;border:1px solid var(--line);border-radius:8px;padding:6px 9px;color:var(--fg);text-decoration:none;grid-column:span 2;min-width:0}
.ev-photos .fpill span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev-photos .fpill svg{width:14px;height:14px;color:var(--muted)}
.ev-add{align-self:flex-start;cursor:pointer}
.field>span{font-size:13px;font-weight:500;color:var(--fg-2)}
div.field{gap:8px}
@media (max-width:760px){.day .ev-chip[data-person]{background:var(--pc)}.day .ev-chip .cam{display:none}}

/* ============ imported calendars ============ */
.ev-chip.ext{background:color-mix(in srgb,var(--pc) 9%,transparent);border:1px solid color-mix(in srgb,var(--pc) 35%,transparent);border-left:3px solid var(--pc);color:var(--fg-2);background-image:repeating-linear-gradient(135deg,transparent 0 6px,color-mix(in srgb,var(--pc) 7%,transparent) 6px 8px)}
.btn.tog{color:var(--muted)}
.btn.tog.on{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}
.ext-list{display:flex;flex-direction:column;gap:6px}
.ext-list:empty{display:none}
.ext-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;flex-wrap:wrap}
.ext-name{font-weight:600;font-size:13.5px}
.ext-item .err{color:var(--danger)}
.ext-form{display:flex;flex-direction:column;gap:10px}
.ext-row{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.check{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--fg-2);white-space:nowrap;height:36px;cursor:pointer}
.check input{width:16px;height:16px;accent-color:var(--accent)}
.howto summary{cursor:pointer;color:var(--accent);font-size:13px;font-weight:500}
.howto[open] summary{margin-bottom:8px}
.ext-detail{display:flex;flex-direction:column;gap:8px;font-size:14px}
.x-notes{white-space:pre-wrap;background:var(--surface-2);border-radius:8px;padding:10px 12px;font-size:13.5px;max-height:240px;overflow:auto}
@media (max-width:760px){.day .ev-chip.ext{background:var(--pc);border:0;opacity:.5}}
.alt-way{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:var(--surface-2);border-radius:10px;padding:10px 12px;font-size:13px}
.alt-way>div{flex:1;min-width:220px}
.push-box{display:flex;flex-direction:column;gap:10px;border:1px solid var(--accent);border-radius:10px;padding:12px;background:var(--accent-soft)}
.push-box .copyrow{align-items:center}
textarea.script{font-size:11.5px;line-height:1.45;white-space:pre;overflow:auto;background:var(--surface);resize:vertical}

/* ============ v10: clients, client page, library, work log ============ */
body.is-client .staff-only{display:none!important}
body:not(.is-client) .client-only{display:none!important}
.client-pick{display:flex;align-items:center;gap:8px;margin:-6px 4px 0;padding:0 8px;height:34px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface)}
.client-pick select{flex:1;min-width:0;border:0;background:transparent;font-weight:500;font-size:13.5px;height:32px;cursor:pointer;color:var(--fg)}
.client-pick select:focus{outline:none}
.card-client{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-top:-6px}
.card-client .dot{width:7px;height:7px}
.clients-bar{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-bottom:12px}
.client-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.client-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:14px;text-align:left;box-shadow:var(--shadow-sm);transition:box-shadow .15s,border-color .15s,transform .15s;min-width:0}
.client-card:hover{border-color:var(--line-2);box-shadow:var(--shadow);transform:translateY(-1px)}
.client-card.arch{opacity:.6}
.cc-top{display:flex;align-items:center;gap:10px;min-width:0}
.cc-top h3{font-size:16px;font-weight:650;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.client-swatch{width:40px;height:40px;border-radius:11px;flex:none;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.client-swatch.sm{width:14px;height:14px;border-radius:4px}
.cc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.cc-stats div{display:flex;flex-direction:column;background:var(--surface-2);border-radius:8px;padding:8px 10px}
.cc-stats b{font-size:20px;font-weight:650;font-variant-numeric:tabular-nums;line-height:1.2}
.cc-stats span{font-size:12px;color:var(--muted)}
.cc-foot{font-size:12.5px;display:flex;flex-direction:column;gap:2px;min-width:0}
.cc-foot>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.client-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.client-head h2{font-size:24px;font-weight:700;letter-spacing:-.02em}
.client-contact{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:13.5px;color:var(--fg-2);margin-top:2px}
.client-contact .sep{color:var(--line-2)}
.client-actions{display:flex;gap:8px;flex-wrap:wrap}
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin-bottom:16px;overflow-x:auto;scrollbar-width:none}
.tabs button{padding:9px 14px;font-size:13.5px;font-weight:500;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs button:hover{color:var(--fg)}
.tabs button.on{color:var(--fg);border-bottom-color:var(--accent)}
.c-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:14px}
.c-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
@media (max-width:980px){.c-grid{grid-template-columns:minmax(0,1fr)}}
.c-notes{white-space:pre-wrap;font-size:13.5px;color:var(--fg-2)}
.erow,.prow{display:grid;align-items:center;gap:12px;padding:9px 6px;margin:0 -6px;border-radius:8px;text-align:left;width:calc(100% + 12px)}
.erow{grid-template-columns:44px minmax(0,1fr) auto}
.prow{grid-template-columns:72px minmax(0,1fr) 130px}
.erow:hover,.prow:hover{background:var(--surface-2)}
.erow .t,.prow .t{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.erow .s,.prow .s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.erow .cam{display:inline-flex;align-items:center;gap:3px;color:var(--muted);font-size:12px}
.erow .cam svg{width:14px;height:14px}
.prow .pill{justify-self:end}
.person{display:flex;align-items:center;gap:10px;padding:6px 0}
.person .t{font-weight:600}
.library{display:flex;flex-direction:column;gap:14px}
.lib-up{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap}
.lib-drop{flex:1;min-width:240px;flex-direction:row;justify-content:center;gap:10px;padding:14px}
.lib-folder{display:flex;flex-direction:column;justify-content:center;gap:4px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{height:30px;padding:0 12px;border-radius:20px;border:1px solid var(--line-2);background:var(--surface);font-size:13px;font-weight:500;color:var(--fg-2)}
.chip:hover{border-color:var(--accent)}
.chip.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.lib-gallery{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.thumb .cap{position:absolute;left:0;right:0;bottom:0;padding:14px 8px 6px;font-size:11px;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.6));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thumb .cap:empty{display:none}
.lib-files{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:6px 14px}
.lib-files .file{margin:0;padding:8px 0;border-radius:0;border-top:1px solid var(--line)}
.lib-files .file:first-child{border-top:0}
.lib-files .file:hover{background:none}
.file .acts select.mv{height:28px;width:auto;max-width:150px;font-size:12px;padding:0 6px;margin-right:4px}
.wl-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.wl-bar h2{font-size:19px;font-weight:650;min-width:0}
.wl-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px;align-items:start}
@media (max-width:980px){.wl-grid{grid-template-columns:minmax(0,1fr)}}
.wl-side{display:flex;flex-direction:column;gap:14px}
.wl-form{display:flex;flex-direction:column;gap:8px;padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:6px}
.wl-row{display:grid;grid-template-columns:1fr 1fr 96px auto;gap:8px}
@media (max-width:640px){.wl-row{grid-template-columns:1fr 1fr}}
.wl-list{display:flex;flex-direction:column}
.wl-group{display:flex;flex-direction:column;padding:8px 0;border-top:1px solid var(--line)}
.wl-group:first-child{border-top:0}
.wl-gh{display:flex;align-items:center;gap:8px;padding:4px 0}
.wl-item{display:flex;align-items:flex-start;gap:10px;padding:8px 0}
.wl-item.grouped{padding-left:30px}
.wl-meta{font-size:12.5px;color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}
.wl-meta b{color:var(--fg);font-weight:600}
.wl-client{display:inline-flex;align-items:center;gap:5px;color:var(--fg-2)}
.wl-text{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:2px}
.pill.hours{background:var(--accent-soft);color:var(--accent);font-family:var(--f-mono);font-size:11.5px}
.icon-btn.sm{width:28px;height:28px}
.icon-btn.sm svg{width:15px;height:15px}
.icon-btn.armed{color:var(--danger);background:var(--danger-soft)}
.wk-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}
.wk-day{display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 0 4px;border-radius:8px;color:var(--muted)}
.wk-day:hover{background:var(--surface-2)}
.wk-day.on{background:var(--accent-soft);color:var(--fg)}
.wk-day small{font-size:10.5px;text-transform:uppercase}
.wk-day b{font-size:14px;font-weight:600;color:var(--fg)}
.wk-day i{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.wk-row{display:flex;align-items:center;gap:8px;padding:8px 6px;margin:0 -6px;border-radius:8px;font-size:13.5px;text-align:left;width:calc(100% + 12px)}
.wk-row:hover{background:var(--surface-2)}
#wlEvents{display:flex;flex-direction:column;gap:6px}
#wlEvents .ev-chip{font-size:13px;padding:6px 9px}

/* ============ logo ============ */
.logo-plate{background:#fff;border-radius:10px;padding:8px 10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1px var(--line);width:100%}
.logo-plate img{display:block;width:100%;height:auto;max-height:56px;object-fit:contain}
.logo-plate.lg{max-width:360px;padding:16px 20px;border-radius:16px;box-shadow:var(--shadow)}
.logo-plate.lg img{max-height:none}
.side-top{flex-direction:column;align-items:stretch;gap:8px}
.side-top.ws-row{flex-direction:row;padding:0 6px;margin-top:-10px}

/* ============ v11: client uploads + requests ============ */
.upload-cta{display:flex;align-items:center;justify-content:center;gap:8px;height:42px;margin:0 2px;border-radius:10px;background:var(--accent);color:var(--on-accent);font-weight:600;font-size:14px;box-shadow:0 2px 8px -2px rgba(59,91,253,.5)}
.upload-cta:hover{background:var(--accent-2)}
.upload-cta svg{width:18px;height:18px}
.nav-i .n.badge:not(:empty){background:var(--danger);color:#fff;border-radius:10px;padding:0 7px;font-weight:600}
.tab-n:not(:empty){margin-left:6px;background:var(--client-soft);color:var(--client);border-radius:10px;padding:0 6px;font-size:11.5px;font-weight:600}
.needed-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:linear-gradient(120deg,var(--accent-soft),var(--surface));border:1px solid var(--line);border-radius:var(--r);padding:20px 22px;margin-bottom:14px}
.needed-hero h2{font-size:20px;font-weight:650}
.needed-hero p{margin:4px 0 0}
.req{border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:10px;margin-top:4px}
.req.open{border-left:3px solid var(--client)}
.req.received{border-left:3px solid var(--ok);opacity:.9}
.req.closed{opacity:.6}
.req-top{display:flex;gap:10px;align-items:flex-start}
.req-t{font-weight:600;font-size:14.5px}
.req-s{font-size:12px;color:var(--muted)}
.req-d{font-size:13.5px;color:var(--fg-2);white-space:pre-wrap}
.req-files{display:flex;flex-wrap:wrap;gap:6px}
.req-files .thumb{width:72px;height:72px;aspect-ratio:auto}
.req-files .fpill{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;border:1px solid var(--line);border-radius:8px;padding:5px 9px;color:var(--fg);text-decoration:none;max-width:220px}
.req-files .fpill span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.req-files .fpill svg{width:14px;height:14px;color:var(--muted)}
.req-drop{flex-direction:row;justify-content:center;gap:8px;padding:12px}
.req-acts{display:flex;gap:6px;flex-wrap:wrap}
.req-form{display:flex;flex-direction:column;gap:8px}
.req-row{display:grid;grid-template-columns:1fr 150px auto;gap:8px}
@media (max-width:560px){.req-row{grid-template-columns:1fr}}
.big-drop{padding:26px 16px}
.big-drop svg{width:28px;height:28px}
.fnote{font-size:12.5px;color:var(--fg-2);margin-top:2px;font-style:italic}
/* uploads-only portal */
body.portal-uploads .full-only{display:none!important}
.portal-pill{background:var(--accent-soft);color:var(--accent);margin-left:10px;vertical-align:4px;font-size:11.5px}
.portal-opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:560px){.portal-opts{grid-template-columns:1fr}}
.popt{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line-2);border-radius:10px;padding:10px 12px;cursor:pointer;font-weight:400}
.popt:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.popt input{margin-top:3px;accent-color:var(--accent)}
.popt b{display:block;font-size:13.5px;color:var(--fg)}
.popt small{display:block;font-size:12px;color:var(--muted);line-height:1.4}
a.file{text-decoration:none;color:inherit}

/* ============ clock + weather, email ============ */
.wx{display:flex;align-items:center;gap:12px;height:36px;padding:0 12px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);font-size:13px;white-space:nowrap;cursor:default}
.wx-time{display:flex;align-items:baseline;gap:7px}
.wx-time b{font-weight:600;font-variant-numeric:tabular-nums}
.wx-time span{color:var(--muted)}
.wx-now{display:flex;align-items:center;gap:5px;padding-left:12px;border-left:1px solid var(--line)}
.wx-icon svg{width:18px;height:18px;color:var(--client)}
.wx-temp{font-weight:600;font-variant-numeric:tabular-nums}
.wx-place{color:var(--muted)}
@media (max-width:1180px){.wx-place,.wx-time span{display:none}}
@media (max-width:860px){.wx{order:4;height:32px}.wx-time span{display:inline}}
@media (max-width:420px){.wx-time span{display:none}}
.req-mail{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:center}
.req-mail .check{height:28px}
.mail-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:10px 14px}

/* ===== v14: sites, job completion, email links, info sheets & vault ===== */
.wl-row{display:flex;flex-wrap:wrap;gap:8px}
.wl-row select{flex:1 1 150px;width:auto;min-width:0}
.wl-row input{width:96px;flex:none}
.site-pick{margin-top:-10px}
.site-pick svg{width:15px;height:15px;color:var(--muted)}
.site-bar{display:flex;flex-direction:column;gap:10px;margin:-4px 0 16px}
.site-chips{align-items:center}
.site-chips>span{display:inline-flex;align-items:center;gap:4px;margin-right:4px}
.site-chips>span svg{width:14px;height:14px}
.site-card{display:flex;align-items:flex-start;gap:12px;background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:var(--r-sm);padding:10px 14px}
.site-card .sc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.sc-notes{white-space:pre-wrap;color:var(--fg-2);margin-top:4px}
.tab-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.site-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px}
.site-tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;min-width:0;transition:border-color .15s,box-shadow .15s}
.site-tile:hover{border-color:var(--line-2);box-shadow:var(--shadow)}
.site-tile.arch{opacity:.6}
.st-open{display:flex;flex-direction:column;gap:8px;padding:14px 16px;text-align:left;min-width:0}
.st-h{display:flex;align-items:center;gap:8px;min-width:0}
.st-h svg{color:var(--accent);width:16px;height:16px}
.st-h h3{font-size:15.5px;font-weight:650;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-acts{display:flex;justify-content:flex-end;gap:4px;border-top:1px solid var(--line);padding:6px 10px}
.comp-cell{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.comp-cell .btn svg{width:14px;height:14px}
.btn.site-limited{border-color:var(--client);color:var(--client)}
.us-list{display:flex;flex-direction:column;gap:2px;max-height:260px;overflow-y:auto;padding:4px 2px}
.us-list .check{height:30px}
.btn.ok{background:var(--ok);border-color:var(--ok);color:#fff}
.btn.ok:hover{filter:brightness(1.06)}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:560px){.grid3{grid-template-columns:1fr 1fr}}
.job{display:flex;flex-direction:column;gap:12px;border:1px solid var(--line);border-radius:var(--r);padding:14px;background:var(--surface-2)}
.job .inp{background:var(--surface)}
.job-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.job-h h3{font-size:14.5px;font-weight:650}
.job-acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.done-ck{display:inline-grid;place-items:center;width:15px;height:15px;border-radius:50%;background:var(--ok);color:#fff;flex:none}
.done-ck svg{width:11px;height:11px;stroke-width:2.6}
.ev-chip.completed .tt{color:var(--fg-2)}
.ev-chip .pill.hours{margin-left:auto;height:18px;font-size:11px}
.sh-files{display:flex;flex-direction:column;max-height:240px;overflow-y:auto;border:1px solid var(--line);border-radius:var(--r-sm);padding:4px}
.sh-file{display:flex;align-items:center;gap:10px;padding:5px 8px;border-radius:6px;cursor:pointer;font-weight:400;color:var(--fg)}
.sh-file:hover{background:var(--surface-2)}
.sh-file img{width:34px;height:34px;object-fit:cover;border-radius:6px;flex:none}
.sh-file .ficon{width:34px;height:34px;flex:none}
.sh-n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-sugg{display:flex;flex-wrap:wrap;gap:6px;margin-top:-8px}
.sh-sugg .chip{height:26px;font-size:12px}
.sh-row{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}
.sh-row select{width:auto}
.share-list{display:flex;flex-direction:column}
.share-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-top:1px solid var(--line)}
.share-row:first-child{border-top:0}
.share-row .t{font-weight:600;font-size:13.5px}
.share-row .muted{overflow:hidden;text-overflow:ellipsis}
.share-row.dead{opacity:.6}
.info-search{position:relative;display:flex;align-items:center;margin-bottom:10px}
.info-search svg{position:absolute;left:12px;color:var(--muted);width:16px;height:16px}
.info-search input{width:100%;height:40px;border:1px solid var(--line-2);background:var(--surface);border-radius:var(--r-sm);padding:0 12px 0 36px;font-size:14px}
.info-search input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.info-results{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:6px;margin-bottom:14px;display:flex;flex-direction:column;max-height:380px;overflow-y:auto}
.ires{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;text-align:left;min-width:0;font-size:13.5px}
.ires:hover{background:var(--surface-2)}
.ires .iv{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg-2);text-align:right}
.info-title{font-size:16px;font-weight:650}
.info-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:14px;align-items:start}
@media (max-width:1180px){.info-layout{grid-template-columns:minmax(0,1fr)}}
.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.info-grid .wide,.info-grid .info-empty{grid-column:1/-1}
.info-grid.info-edit{grid-template-columns:minmax(0,1fr)}
@media (max-width:860px){.info-grid{grid-template-columns:minmax(0,1fr)}}
.info-sec{gap:4px}
.irow{display:grid;grid-template-columns:minmax(90px,38%) minmax(0,1fr) auto;gap:10px;align-items:start;padding:5px 0;border-top:1px solid var(--line);font-size:13.5px}
.panel-h+.irow{border-top:0}
.irow .il{color:var(--muted)}
.irow .iv{white-space:pre-wrap;overflow-wrap:anywhere}
.cp{width:24px;height:24px;display:inline-grid;place-items:center;border-radius:6px;color:var(--muted);opacity:.35;flex:none}
.cp svg{width:14px;height:14px}
.irow:hover .cp,.cell:hover .cp,.cr-f:hover .cp,.cp:focus-visible{opacity:1}
.cp:hover{background:var(--surface-2);color:var(--accent)}
.ilist{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.il-h{font-size:12.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.itbl td,.itbl th{padding:6px 10px;font-size:13px}
.itbl .cell{display:inline-flex;align-items:center;gap:2px}
.itbl.edit td{padding:4px}
.itbl.edit .inp{height:32px;font-size:13px;min-width:90px}
.if-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.if-grid .span2{grid-column:1/-1}
.if-grid textarea{height:auto;padding:8px 11px}
.vault{position:sticky;top:12px;gap:10px}
.vault .panel-h h2{display:flex;align-items:center;gap:8px}
.vault .panel-h svg{width:17px;height:17px;color:var(--accent)}
.v-acts{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.v-acts .btn svg{width:14px;height:14px}
.cred{display:flex;flex-direction:column;gap:6px;padding:10px 0;border-top:1px solid var(--line)}
.cr-top{display:flex;align-items:flex-start;gap:10px}
.cr-ic{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex:none}
.cr-ic svg{width:15px;height:15px}
.cred.note .cr-ic{background:var(--client-soft);color:var(--client)}
.cr-l{font-weight:600;font-size:13.5px;overflow-wrap:anywhere}
.cr-m{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12.5px;align-items:center;margin-top:2px}
.cr-f{display:inline-flex;align-items:center;gap:2px;min-width:0;overflow-wrap:anywhere}
.cr-sec{display:flex;align-items:center;gap:4px;padding-left:38px}
.cr-sec .btn svg{width:14px;height:14px}
.sec{font-size:13px;letter-spacing:.08em;color:var(--muted)}
.sec.shown{letter-spacing:0;color:var(--fg);background:var(--surface-2);padding:2px 6px;border-radius:5px;user-select:all;overflow-wrap:anywhere}
.v-note{margin:0 0 0 38px;padding:10px;background:var(--surface-2);border-radius:8px;font:12.5px/1.5 var(--f-mono);white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow-y:auto}
.v-log{font-size:12.5px;border-top:1px solid var(--line);padding-top:8px}
.v-log summary{cursor:pointer;color:var(--muted);margin-bottom:6px}
.v-log>div{padding:2px 0}
.im-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.im-sum .kpi{padding:10px 12px}
.im-sum .kpi-v{font-size:22px}
.im-preview{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:16px;max-height:340px;overflow-y:auto;border:1px solid var(--line);border-radius:var(--r-sm);padding:12px}
.im-preview h4{font-size:13px;font-weight:650;margin:0 0 4px}
.im-col{display:flex;flex-direction:column;gap:3px;min-width:0}
.im-col .irow{grid-template-columns:minmax(80px,40%) minmax(0,1fr);font-size:12.5px;padding:3px 0}
@media (max-width:640px){.im-sum{grid-template-columns:1fr 1fr}.im-preview{grid-template-columns:1fr}}
.dialog>*{flex-shrink:0}
.site-grid{align-items:start}
/* v15 upload links */
.lib-btns{display:flex;gap:6px;flex-wrap:wrap}
.lib-btns .btn svg{width:14px;height:14px}
.req-acts .btn svg{width:14px;height:14px}
.ul-note{display:flex;align-items:center;gap:6px}
.ul-note svg{width:14px;height:14px;color:var(--accent)}
.ul-step{display:flex;flex-direction:column;gap:14px}
.ul-for{display:flex;flex-direction:column;gap:2px;background:var(--surface-2);border-radius:var(--r-sm);padding:10px 12px}
.ul-ok{margin:0;font-weight:600;color:var(--ok)}
/* v16: Today page, team sticky notes, client notebook */
.today-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:14px;align-items:start}
@media (max-width:1100px){.today-grid{grid-template-columns:minmax(0,1fr)}}
.today-col{display:flex;flex-direction:column;gap:14px;min-width:0}
.panel-h h2{font-size:15px}
.td-list{display:flex;flex-direction:column}
.td-row{display:grid;grid-template-columns:78px 4px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:8px 6px;margin:0 -6px;border-radius:8px;text-align:left;width:calc(100% + 12px)}
.td-row:hover{background:var(--surface-2)}
.td-time{font-size:12px;color:var(--muted);white-space:nowrap}
.td-bar{width:4px;align-self:stretch;border-radius:3px;min-height:30px}
.td-main{display:flex;flex-direction:column;min-width:0}
.td-t{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13.5px;min-width:0}
.td-t span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.td-s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.td-row.completed .td-t{color:var(--fg-2)}
.td-row.ext .td-t{font-weight:500;color:var(--fg-2)}
.td-row .cam{display:inline-flex;align-items:center;gap:3px;color:var(--muted);font-size:12px}
.td-row .cam svg{width:14px;height:14px}
.td-add{align-self:flex-start;margin-top:6px}
#tdJobsP.attn{border-color:color-mix(in srgb,var(--client) 45%,var(--line))}
#tdJobsP.attn .panel-h h2{color:var(--client)}
.who-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--fg-2);white-space:nowrap}
@media (max-width:560px){.td-row{grid-template-columns:62px 4px minmax(0,1fr) auto}.td-row .who-chip{display:none}}
/* sticky colors */
.c-yellow{--sn:#FEF3C7;--sn-b:#F5D565}.c-blue{--sn:#DBEAFE;--sn-b:#93C5FD}.c-green{--sn:#DCFCE7;--sn-b:#86EFAC}
.c-pink{--sn:#FCE7F3;--sn-b:#F9A8D4}.c-purple{--sn:#EDE9FE;--sn-b:#C4B5FD}.c-orange{--sn:#FFEDD5;--sn-b:#FDBA74}
:root[data-theme="dark"] .c-yellow{--sn:#3A3010;--sn-b:#6B5A1C}:root[data-theme="dark"] .c-blue{--sn:#16233F;--sn-b:#2A4374}:root[data-theme="dark"] .c-green{--sn:#122B1C;--sn-b:#22553A}
:root[data-theme="dark"] .c-pink{--sn:#36142A;--sn-b:#6A2A52}:root[data-theme="dark"] .c-purple{--sn:#251C42;--sn-b:#463781}:root[data-theme="dark"] .c-orange{--sn:#3A2210;--sn-b:#70421E}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .c-yellow{--sn:#3A3010;--sn-b:#6B5A1C}:root:not([data-theme="light"]) .c-blue{--sn:#16233F;--sn-b:#2A4374}:root:not([data-theme="light"]) .c-green{--sn:#122B1C;--sn-b:#22553A}:root:not([data-theme="light"]) .c-pink{--sn:#36142A;--sn-b:#6A2A52}:root:not([data-theme="light"]) .c-purple{--sn:#251C42;--sn-b:#463781}:root:not([data-theme="light"]) .c-orange{--sn:#3A2210;--sn-b:#70421E}}
.sn-form{display:flex;flex-direction:column;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.sn-input{background:var(--sn);border-color:var(--sn-b);height:auto;padding:9px 11px;resize:vertical}
.sn-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sn-row select{width:auto;max-width:180px;height:32px;font-size:13px}
.sn-colors{display:flex;gap:5px}
.sn-dot{width:20px;height:20px;border-radius:50%;background:var(--sn);border:1.5px solid var(--sn-b)}
.sn-dot.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--accent)}
.sn-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;align-items:start;margin-top:10px}
.sticky{background:var(--sn);border:1px solid var(--sn-b);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,.05);min-width:0}
.sticky.pinned{box-shadow:0 0 0 2px var(--sn-b),0 4px 10px -4px rgba(0,0,0,.15)}
.sticky.is-done{opacity:.65}
.sticky.is-done .sn-text{text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--fg) 35%,transparent)}
.sn-top{display:flex;align-items:center;gap:6px;min-height:22px}
.sn-tag{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;color:var(--fg-2);background:color-mix(in srgb,var(--surface) 60%,transparent);border-radius:20px;padding:1px 8px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.sn-tag .dot{width:7px;height:7px}
.sn-ic{width:24px;height:24px;display:grid;place-items:center;border-radius:6px;color:var(--muted);opacity:.6}
.sn-ic svg{width:15px;height:15px}
.sn-ic.on{opacity:1;color:var(--fg)}
.sn-ic:hover{opacity:1;background:color-mix(in srgb,var(--surface) 50%,transparent)}
.sn-done{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:var(--fg-2);cursor:pointer}
.sn-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.45}
.sn-edit{background:var(--surface);height:auto;padding:8px 10px}
.sn-meta{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--fg-2);flex-wrap:wrap}
.sn-meta .link{font-size:12px}
.sn-replies{display:flex;flex-direction:column;gap:4px;border-top:1px dashed var(--sn-b);padding-top:6px;font-size:13px}
.sn-reply{overflow-wrap:anywhere}
.sn-rform{display:flex;gap:6px}
.sn-rform .inp{height:30px;font-size:13px;background:var(--surface)}
.sn-done-btn{align-self:flex-start;margin-top:10px}
.panel>.sticky{margin-bottom:6px}
.nb-links{display:flex;gap:14px;flex-wrap:wrap}
.nb-wrap{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:14px;align-items:start}
@media (max-width:1100px){.nb-wrap{grid-template-columns:minmax(0,1fr)}}
.nb-page .panel-h{align-items:flex-start}
.nb-acts{display:flex;gap:6px;flex:none}
.nb-acts .btn svg{width:14px;height:14px}
.nb-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14.5px;line-height:1.6;padding:6px 0}
.nb-ta{height:auto;min-height:360px;padding:12px 14px;font-size:14.5px;line-height:1.6;resize:vertical}
.nb-conflict{background:var(--danger-soft);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;color:var(--fg)}
.nb-conflict pre,.nb-vview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.5 var(--f-mono);background:var(--surface);border-radius:6px;padding:10px;margin:0;max-height:300px;overflow-y:auto}
.nb-versions{border-top:1px solid var(--line);padding-top:8px;font-size:13px}
.nb-versions summary{cursor:pointer;color:var(--muted)}
.nb-v{display:flex;gap:8px;align-items:center;padding:4px 0}
.nb-vview{background:var(--surface-2);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:8px;margin-top:6px}
.nb-v-h{display:flex;align-items:center;gap:8px}
.nb-hform{display:flex;flex-direction:column;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.nb-hform textarea{height:auto;padding:8px 11px}
.nb-hrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nb-entry{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-top:1px solid var(--line)}
.nb-hform+.nb-entry{border-top:0}
.nb-entry textarea{height:auto;padding:8px 11px}
.nb-eh{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--fg-2)}
.nb-eh b{color:var(--fg);font-size:12.5px}
.nb-etext{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
/* v17: photos on sticky notes */
.sn-photo-btn{cursor:pointer}
.sn-photo-btn svg{width:15px;height:15px}
.sn-form.drop .sn-input,.sticky.drop{outline:2px dashed var(--accent);outline-offset:2px}
.sn-pending{display:flex;gap:6px;flex-wrap:wrap}
.sn-pend{position:relative;width:64px;height:64px;border-radius:8px;overflow:hidden;background:var(--surface-2)}
.sn-pend img{width:100%;height:100%;object-fit:cover}
.sn-pend .x,.sn-ph .x{position:absolute;top:3px;right:3px;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;display:grid;place-items:center}
.sn-pend .x svg,.sn-ph .x svg{width:11px;height:11px;stroke-width:2.4}
.sn-photos{display:grid;gap:4px;border-radius:8px;overflow:hidden;margin:2px 0}
.sn-photos.n1{grid-template-columns:1fr}.sn-photos.n2{grid-template-columns:1fr 1fr}.sn-photos.n3{grid-template-columns:repeat(3,1fr)}
.sn-ph{position:relative;cursor:zoom-in;background:color-mix(in srgb,var(--surface) 50%,transparent)}
.sn-photos.n1 .sn-ph img{width:100%;max-height:240px;object-fit:cover;display:block}
.sn-photos.n2 .sn-ph,.sn-photos.n3 .sn-ph{aspect-ratio:1}
.sn-photos.n2 .sn-ph img,.sn-photos.n3 .sn-ph img{width:100%;height:100%;object-fit:cover;display:block}
.sn-addph{cursor:pointer;align-self:flex-start;font-size:12.5px}
