/* Storeoptic app shell (v40): left sidebar, Today home, compact page headers. Loaded last in /app and /live-demo. */
:root{--side:236px;--sidebg:#F2F2F4}

/* signed out: the simple public header; signed in: the sidebar */
.side,.mtop,.scrim{display:none}
body.authed .pubnav{display:none}
body.authed .side{display:flex}
body.authed .ag{margin:0 0 0 var(--side);max-width:none;width:auto;box-sizing:border-box;padding:32px max(40px,calc((100vw - var(--side) - 1140px)/2)) 96px}

.side{position:fixed;inset:0 auto 0 0;width:var(--side);z-index:60;flex-direction:column;gap:2px;padding:14px 10px 12px;background:var(--sidebg) var(--grain) repeat;background-size:220px;border-right:1px solid var(--line);box-sizing:border-box;overflow-y:auto;scrollbar-width:none}
.side::-webkit-scrollbar{display:none}
.ws{display:flex;align-items:center;gap:10px;padding:6px 8px 14px;border-radius:9px;color:var(--text);min-width:0}
.ws-logo{width:26px;height:26px;flex:none}
.ws-txt{display:grid;min-width:0;line-height:1.2}
.ws-txt b{font-size:14px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-txt small{font:10.5px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.side-nav{display:flex;flex-direction:column;gap:1px}
.side-nav[hidden]{display:none}
.side a[data-r]{display:flex;align-items:center;gap:10px;height:32px;padding:0 9px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--soft);letter-spacing:-.005em;transition:background .12s,color .12s}
.side a[data-r]:hover{background:rgba(0,0,0,.045);color:var(--text)}
.side a[data-r].on{background:#fff;color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.06),0 0 0 1px var(--line)}
.side a[data-r][hidden]{display:none}
.side a[data-r] svg,.mbtn svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.side a[data-r] span:not(.cnt){flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side .cnt{margin-left:auto;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--ink);color:#fff;font:600 10.5px/18px var(--sans);text-align:center;box-sizing:border-box}
.side .cnt[hidden]{display:none}
.side-h{font:10.5px var(--mono);letter-spacing:.07em;text-transform:uppercase;color:var(--dim);padding:16px 9px 6px}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:1px;padding-top:14px}
.me{display:flex;align-items:center;gap:9px;margin-top:8px;padding:10px 6px 2px 8px;border-top:1px solid var(--line)}
.me-av{width:28px;height:28px;border-radius:50%;flex:none;display:grid;place-items:center;background:#fff;border:1px solid var(--line2);font-size:11px;font-weight:600;color:var(--soft)}
.me-txt{display:grid;min-width:0;flex:1;line-height:1.25}
.me-txt b{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me-txt .note{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mbtn{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--soft);cursor:pointer;flex:none}
.mbtn:hover{background:rgba(0,0,0,.05);color:var(--text)}
.mbtn.sm{width:30px;height:30px}
.mbtn[hidden]{display:none}

/* page headers: compact, like Linear/Attio */
body.authed .ag{gap:20px}
body.authed .ag>.head,body.authed .ag .asst-main>.head{padding-bottom:18px;border-bottom:1px solid var(--line);align-items:flex-end}
body.authed .ag h1{font-size:26px;line-height:1.15;letter-spacing:-.035em}
body.authed .ag .head .lead,body.authed .ag .head p.hint{font-size:14.5px!important;max-width:62ch;line-height:1.55}
body.authed .ag .eyebrow{font-size:10.5px}
body.authed .ag>.btabs{margin-top:-8px}
.mnav{display:none!important}

/* Today */
.t-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap;padding-bottom:4px}
.t-head h1{font-size:30px!important}
.t-ask{display:flex;align-items:center;gap:8px;width:min(420px,100%);height:42px;padding:0 5px 0 12px;border:1px solid var(--line2);border-radius:11px;background:#fff;box-shadow:var(--shadow)}
.t-ask:focus-within{border-color:var(--text);box-shadow:0 0 0 3px rgba(0,0,0,.06)}
.t-ask svg{width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:1.6;stroke-linejoin:round;flex:none}
.t-ask input{flex:1;min-width:0;border:0;outline:0;font:inherit;font-size:14px;background:transparent}
.t-sec{display:grid;gap:10px}
.t-lbl{display:flex;justify-content:space-between;gap:12px;font:10.5px var(--mono);letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.t-lbl .hint{font:12.5px var(--sans);letter-spacing:0;text-transform:none}
.t-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow);overflow:hidden}
.t-kpi{display:grid;gap:3px;align-content:start;padding:16px 18px;border-left:1px solid var(--line);color:inherit;transition:background .12s}
.t-kpi:first-child{border-left:0}
.t-kpi:hover{background:var(--panel2)}
.t-kpi b{font:600 26px/1.1 var(--display);letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.t-kpi span{font-size:13px;color:var(--muted)}
.t-kpi small{font-size:12px;color:var(--soft)}
.t-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;align-items:start}
.t-ch{display:flex;justify-content:space-between;align-items:center;padding:16px 18px 10px}
.t-needs{overflow:hidden}
.t-need{display:grid;grid-template-columns:32px minmax(0,1fr) auto 16px;gap:12px;align-items:center;padding:12px 18px;border-top:1px solid var(--line);color:inherit;transition:background .12s}
.t-need:hover{background:var(--panel2)}
.t-need .t-nt{display:grid;gap:2px;min-width:0}
.t-need b{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-need small{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-when{font-size:12px;color:var(--muted);white-space:nowrap}
.t-go svg{width:14px;height:14px;fill:none;stroke:var(--dim);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.t-ic{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:var(--bg2);border:1px solid var(--line);color:var(--soft)}
.t-ic svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.t-ic.sm{width:24px;height:24px;border-radius:7px}.t-ic.sm svg{width:13px;height:13px}
.t-ic.k-chat,.t-ic.k-refund{background:#FFF6EC;border-color:#F6DDBF;color:#B5651D}
.t-ic.k-pay,.t-ic.k-paid{background:var(--goodbg);border-color:#CBE9D6;color:var(--good)}
.t-empty{display:grid;justify-items:center;gap:8px;text-align:center;padding:36px 22px 40px;border-top:1px solid var(--line)}
.t-empty p{max-width:44ch}
.t-bar{height:6px;border-radius:999px;background:var(--bg2);overflow:hidden;margin:10px 0 8px}
.t-bar i{display:block;height:100%;background:var(--ink);border-radius:inherit}
.t-step{display:flex;align-items:center;gap:10px;padding:7px 0;font-size:14px;color:var(--text)}
.t-step:hover span:last-child{text-decoration:underline}
.t-step.done{color:var(--muted)}.t-step.done span:last-child{text-decoration:line-through}
.t-dot{width:18px;height:18px;border-radius:50%;border:1.5px solid var(--line3);display:grid;place-items:center;flex:none}
.t-step.done .t-dot{background:var(--ink);border-color:var(--ink)}
.t-dot svg{width:11px;height:11px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.t-act{display:grid}
.t-act a{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 0;border-top:1px solid var(--line);font-size:13.5px;color:inherit}
.t-act a:first-child{border-top:0}
.t-act a:hover span:nth-child(2){text-decoration:underline}
.t-act a span:nth-child(2){min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-q{margin:0;font-size:14px;color:var(--soft)}

/* existing screens, tightened for the sidebar layout */
body.authed .bconv{grid-template-columns:330px minmax(0,1fr)}
body.authed .asst{gap:20px}
body.authed .cu-detail{gap:16px}

/* phones + small laptops: sidebar becomes a drawer */
@media (max-width:980px){
  body.authed .mtop{display:flex;position:sticky;top:0;z-index:50;align-items:center;gap:8px;height:52px;padding:0 10px;background:rgba(247,247,248,.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
  .mtitle{font-weight:600;font-size:15px;letter-spacing:-.01em}
  body.authed .side{transform:translateX(-102%);transition:transform .22s cubic-bezier(.3,.7,.2,1);box-shadow:var(--shadow3);width:min(280px,84vw)}
  body.side-open .side{transform:none}
  body.authed .scrim{display:block;position:fixed;inset:0;z-index:55;background:rgba(10,10,12,.28);opacity:0;pointer-events:none;transition:opacity .2s}
  body.side-open .scrim{opacity:1;pointer-events:auto}
  body.authed .ag{margin-left:0;padding:20px 16px 80px;max-width:none}
  body.authed .ag h1{font-size:23px}
  .t-head h1{font-size:25px!important}
  .t-kpis{grid-template-columns:1fr 1fr}
  .t-kpi:nth-child(3){border-left:0}
  .t-kpi:nth-child(n+3){border-top:1px solid var(--line)}
  .t-grid{grid-template-columns:1fr}
  .t-need{grid-template-columns:32px minmax(0,1fr) 14px;padding:12px 14px}
  .t-need .t-when{display:none}
  body.authed .bconv{grid-template-columns:1fr}
}

/* channel icons (Customer Chat, Customers) */
.chs{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;display:block}
.chi .chs{margin:auto}.chi.lg .chs{width:19px;height:19px}
.cu-ch span .chs{width:13px;height:13px}
.cu-tl .ic .chs{width:13px;height:13px}
.chi.lg{background:var(--bg2);color:var(--text);border:1px solid var(--line)}
body.authed .aempty h2{font-size:26px;line-height:1.2;letter-spacing:-.035em}
body.authed .aempty{padding-top:28px}
@media (max-width:980px){.t-lbl .hint{display:none}}
/* monochrome: selected rows and AI bubbles without the old indigo tint */
.citem2.on{background:var(--bg2)}
.tm.b .tb{background:#fff;border:1px solid var(--line2);color:var(--text)}
