/* Your Store Desk. Calm, Papaya-style: white sidebar, readable tables, one navy action colour,
   green only for WhatsApp. Colours, type and spacing come from the tokens below. */
@font-face { font-family: "Inter"; src: url(/app/fonts/inter-variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(/app/fonts/poppins-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(/app/fonts/poppins-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --page: #f6f7f9; --card: #ffffff; --chrome: #ffffff; --hover: #f1f3f6; --selected: #eef5ee; --sunken: #f3f4f6;
  --line: #e6e8ec; --line-strong: #d4d8de;
  --text: #111827; --text-2: #4b5563; --text-3: #6b7280; --brand-text: #1e293b;
  --primary: #1e293b; --primary-hover: #0f172a; --on-primary: #ffffff;
  --focus: #2f7d4f;
  --wa: #1f9d55; --wa-soft: #e8f6ee; --wa-bubble: #dcf3e4;
  --ok: #166534; --ok-bg: #e9f7ee; --ok-line: #b7e1c4;
  --warn: #92400e; --warn-bg: #fff6e5; --warn-line: #f5d58f; --warn-edge: #e5b443;
  --bad: #9f1d1d; --bad-bg: #fdeeee; --bad-line: #f3c2c2; --bad-edge: #e07a7a;
  --info: #1e4e8c; --info-bg: #eef4fc; --info-line: #c6d9f2;
  --muted-bg: #f1f2f4; --muted-line: #dcdfe4;
  --cod: #b45309; --prepaid: #2563eb;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --display: "Poppins", var(--sans);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05); --shadow-pop: 0 12px 32px rgba(16, 24, 40, .16);
  --sidebar: 232px; --topbar: 60px; --bottombar: 64px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; color: var(--brand-text); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
a { color: var(--info); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--text-3); } .small { font-size: 13px; } .tiny { font-size: 12px; } .strong { font-weight: 600; }
.nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 0; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--chrome); border-right: 1px solid var(--line); padding: var(--s4) var(--s3); display: flex; flex-direction: column; gap: var(--s4); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s1) var(--s2); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { display: block; font-family: var(--display); font-weight: 700; color: var(--brand-text); line-height: 1.15; }
.brand span { color: var(--text-3); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: var(--s3); padding: 9px var(--s3); border-radius: var(--r); color: var(--text); font-weight: 500; text-decoration: none; min-height: 40px; }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--selected); color: var(--brand-text); box-shadow: inset 3px 0 0 var(--focus); }
.nav a svg { color: var(--text-2); flex: none; } .nav a.on svg { color: var(--focus); }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 600; text-align: center; line-height: 20px; }
.nav .sep { height: 1px; background: var(--line); margin: var(--s2) var(--s2); }
.side-foot { display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--s2); }
.sync-pill { display: flex; align-items: center; gap: var(--s2); font-size: 12px; color: var(--text-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); flex: none; } .dot.bad { background: var(--bad-edge); } .dot.warn { background: var(--warn-edge); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: var(--s3); min-height: var(--topbar); padding: var(--s2) var(--s6); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { white-space: nowrap; }
.topbar .search { max-width: 380px; }
.who { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--sunken); color: var(--brand-text); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.avatar.wa { background: var(--wa-soft); color: var(--wa); }
.content { padding: var(--s6); width: 100%; max-width: 1360px; display: flex; flex-direction: column; gap: var(--s5); }
.content.full { max-width: none; padding: 0; }
.bottombar { display: none; }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 38px; padding: 0 var(--s4); border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); } .btn.primary:hover { background: var(--primary-hover); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; } .btn.wa:hover { filter: brightness(.95); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.small { min-height: 30px; padding: 0 var(--s3); font-size: 13px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--text-2); }
.iconbtn:hover { background: var(--hover); }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%; min-height: 38px; padding: 7px var(--s3); border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--card); }
textarea { resize: vertical; }
.search { position: relative; flex: 1; min-width: 160px; }
.search input { padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.field { display: flex; flex-direction: column; gap: var(--s1); } .field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.tight { gap: var(--s2); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.grid { display: grid; gap: var(--s4); }
.grid.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: var(--r); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ---- tabs + chips ---- */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; background: none; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.tabs .on { color: var(--brand-text); border-bottom-color: var(--brand-text); }
.tabs .n { font-size: 12px; padding: 0 7px; border-radius: 10px; background: var(--sunken); color: var(--text-2); line-height: 20px; font-variant-numeric: tabular-nums; }
.tabs .on .n { background: var(--primary); color: #fff; }
.tabs .n.alert { background: var(--bad-bg); color: var(--bad); }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); font-size: 13px; font-weight: 500; color: var(--text-2); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .n { font-variant-numeric: tabular-nums; opacity: .8; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5) 0; }
.card > header .sub { color: var(--text-3); font-size: 13px; }
.card .body { padding: var(--s4) var(--s5) var(--s5); }
.card .body.flush { padding: var(--s3) 0 0; }
.kpi { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
a.kpi:hover { text-decoration: none; background: var(--hover); }
.kpi .label { font-size: 13px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-family: var(--display); font-size: 26px; font-weight: 500; color: var(--brand-text); font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpi .delta { font-size: 12px; color: var(--text-3); } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.empty { padding: var(--s7) var(--s5); text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-weight: 600; }
.note { padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info); font-size: 14px; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.note.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.note.ok { background: var(--ok-bg); border-color: var(--ok-line, var(--ok-bg)); color: var(--ok); }

/* Needs attention (Papaya's Today) */
.attn { display: flex; flex-direction: column; gap: var(--s2); }
.attn a { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid var(--line); background: var(--card); border-left: 4px solid var(--info-line); color: inherit; text-decoration: none; }
.attn a:hover { background: var(--hover); }
.attn a.urgent { background: var(--bad-bg); border-color: var(--bad-line); border-left-color: var(--bad-edge); }
.attn a.warn { border-left-color: var(--warn-edge); }
.attn .t { font-weight: 600; } .attn .d { color: var(--text-2); font-size: 13px; }
.attn .go { margin-left: auto; flex: none; }
.allclear { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r); background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); font-weight: 500; }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.b-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.b-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.b-muted { background: var(--muted-bg); color: var(--text-2); border-color: var(--muted-line); }
.b-wa { background: var(--wa-soft); color: var(--wa); border-color: #bfe6cf; }
.pay { font-size: 12px; font-weight: 600; } .pay.cod { color: var(--cod); } .pay.pre { color: var(--prepaid); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; background: var(--sunken); font-size: 12px; line-height: 22px; color: var(--text-2); }
.tag button { border: 0; background: none; padding: 0; color: var(--text-3); line-height: 1; }

/* ---- tables ---- */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 12.5px; padding: 10px var(--s4); border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 10px var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; } .t tbody tr.click:hover td { background: #fafbfc; }
.t tbody tr.sel td { background: var(--selected); }
.thumbs { display: flex; align-items: center; } .thumbs img { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; border: 2px solid var(--card); background: var(--sunken); }
.thumbs img + img { margin-left: -10px; } .thumbs .more { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.who-cell b { display: block; font-weight: 600; } .who-cell span { font-size: 12.5px; color: var(--text-3); }
.bar { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--bad-edge); border-radius: 4px; }
.bar.good i { background: var(--wa); } .bar.blue i { background: var(--prepaid); }
.list-cards { display: none; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--s4); color: var(--text-3); font-size: 13px; border-top: 1px solid var(--line); }

/* ---- chart ---- */
.chart { width: 100%; height: 190px; display: block; }
.chart .grid-line { stroke: var(--line); } .chart text { fill: var(--text-3); font-size: 11px; font-family: var(--sans); }
.legend { display: flex; gap: var(--s4); font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---- drawer ---- */
.scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .32); z-index: 40; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--page); z-index: 41; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: slide .18s ease-out; }
.drawer > header { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); background: var(--card); border-bottom: 1px solid var(--line); min-height: var(--topbar); }
.drawer .dbody { padding: var(--s5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s4); flex: 1; }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } } @keyframes fade { from { opacity: 0; } }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px var(--s4); font-size: 14px; } .kv dt { color: var(--text-3); } .kv dd { margin: 0; }
.items { display: flex; flex-direction: column; gap: var(--s3); }
.item { display: flex; gap: var(--s3); align-items: center; } .item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--sunken); flex: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 var(--s4) 22px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.wa::before { background: var(--wa); } .timeline li.done::before { background: var(--ok); } .timeline li.bad::before { background: var(--bad-edge); } .timeline li.ship::before { background: var(--prepaid); }
.timeline .when { display: block; font-size: 12px; color: var(--text-3); }
.statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3); }
.stat b { display: block; font-family: var(--display); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; } .stat span { font-size: 12px; color: var(--text-3); }

/* ---- inbox ---- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 340px; height: calc(100vh - var(--topbar)); background: var(--card); }
.inbox .pane { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.inbox .pane:last-child { border-right: 0; background: var(--page); }
.pane-head { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s3); }
.chatlist { overflow-y: auto; flex: 1; }
.chatrow { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; color: inherit; }
.chatrow:hover { background: var(--hover); text-decoration: none; } .chatrow.on { background: var(--selected); }
.chatrow .top { display: flex; justify-content: space-between; gap: var(--s2); }
.chatrow .name { font-weight: 600; } .chatrow .time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.chatrow .last { font-size: 13px; color: var(--text-2); }
.chatrow.waiting { box-shadow: inset 3px 0 0 var(--bad-edge); }
.convo { flex: 1; overflow-y: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); background: #f7f6f2; }
.msg { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow); }
.msg.customer { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.msg.bot, .msg.staff { align-self: flex-end; background: var(--wa-bubble); border-top-right-radius: 4px; }
.msg.staff { background: #e3ecfb; }
.msg .meta { display: block; margin-top: 3px; font-size: 11px; color: var(--text-3); text-align: right; }
.msg img, .msg video { max-width: 240px; border-radius: 8px; display: block; margin-bottom: 4px; }
.msg .cards { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 2px; }
.msg .pcard { width: 150px; flex: none; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); font-size: 12.5px; }
.msg .pcard img { width: 100%; height: 100px; object-fit: cover; max-width: none; border-radius: 0; margin: 0; }
.msg .pcard div { padding: 6px 8px; white-space: normal; }
.msg .btnrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .msg .btnrow span { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--info); }
.daysep { align-self: center; font-size: 12px; color: var(--text-3); background: #fff; padding: 2px 10px; border-radius: 999px; margin: var(--s2) 0; }
.composer { border-top: 1px solid var(--line); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); background: var(--card); }
.composer .row { flex-wrap: nowrap; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; }
.chat-head { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--s3); min-height: 60px; }
.side { overflow-y: auto; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.side .card .body { padding: var(--s3) var(--s4) var(--s4); } .side .card > header { padding: var(--s3) var(--s4) 0; }
.mini-order { display: flex; justify-content: space-between; gap: var(--s2); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mini-order:last-child { border-bottom: 0; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--s5); }
.login .card { width: min(400px, 100%); padding: var(--s7) var(--s6); display: flex; flex-direction: column; gap: var(--s4); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--r); box-shadow: var(--shadow-pop); z-index: 60; font-size: 14px; }
.toast.bad { background: var(--bad); }

/* ---- more sheet (phones) ---- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 18px 18px 0 0; z-index: 41; padding: var(--s4) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); box-shadow: var(--shadow-pop); animation: up .18s ease-out; }
.sheet .nav a { min-height: 48px; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }

/* ---- responsive ---- */
@media (max-width: 1280px) { .inbox { grid-template-columns: 300px minmax(0, 1fr); } .inbox .pane.info { display: none; } .inbox.show-info .pane.info { display: flex; position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); z-index: 41; box-shadow: var(--shadow-pop); } }
@media (max-width: 1100px) { .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.two, .grid.halves { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: var(--s2) var(--s4); }
  .topbar .search, .topbar .who .wname { display: none; }
  .content { padding: var(--s4) var(--s4) calc(var(--bottombar) + var(--s5)); gap: var(--s4); }
  .content.full { padding: 0; }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottombar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); z-index: 30; }
  .bottombar a, .bottombar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--text-3); text-decoration: none; border: 0; background: none; position: relative; }
  .bottombar .on { color: var(--brand-text); } .bottombar .on svg { color: var(--focus); }
  .bottombar .count { position: absolute; top: 6px; left: 54%; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--topbar) - var(--bottombar)); }
  .inbox .pane.list { display: flex; } .inbox .pane.chat { display: none; }
  .inbox.open .pane.list { display: none; } .inbox.open .pane.chat { display: flex; }
  .desk-table { display: none; } .list-cards { display: flex; flex-direction: column; }
  .lc { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; cursor: pointer; }
  .lc:last-child { border-bottom: 0; } .lc:hover { background: var(--hover); text-decoration: none; }
  .lc .thumbs img { width: 44px; height: 44px; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .value { font-size: 22px; }
  .card > header { padding: var(--s3) var(--s4) 0; } .card .body { padding: var(--s3) var(--s4) var(--s4); }
  .drawer { width: 100vw; }
  .kv { grid-template-columns: 100px minmax(0, 1fr); }
}
@media (max-width: 520px) { .grid.kpis { gap: var(--s2); } .kpi { padding: var(--s3); } .hide-phone { display: none !important; } .msg { max-width: 88%; } }
.back-btn { display: none; } .close-info { display: none; }
@media (max-width: 1280px) { .close-info { display: inline-grid; } }
@media (max-width: 900px) { .back-btn { display: inline-grid; } }

.pagebody { display: flex; flex-direction: column; gap: var(--s5); }
.grid.halves, .grid.two { align-items: start; }
.shell { background: linear-gradient(to right, var(--chrome) calc(var(--sidebar) - 1px), var(--line) calc(var(--sidebar) - 1px), var(--line) var(--sidebar), transparent var(--sidebar)); }
@media (max-width: 900px) { .shell { background: none; } }
.mini-order > .grow, .mini-order > span:first-child { min-width: 0; }
.mini-order .ellipsis { display: block; max-width: 100%; }
@media (min-width: 1281px) { #infoBtn { display: none; } }
@media (max-width: 900px) { .lc .thumbs .more { display: none; } }
.delta[title] { cursor: help; }

/* modal */
.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: var(--shadow-pop); animation: fade .15s; }
.modal > header { padding: var(--s4) var(--s5) 0; }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.actions-grid .btn { white-space: normal; text-align: center; line-height: 1.2; padding: 8px; }
.locked { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: flex-start; }
/* global search */
.gsearch { position: relative; width: min(420px, 40vw); }
.gsearch input { padding-left: 36px; padding-right: 44px; background: var(--sunken); border-color: transparent; }
.gsearch input:focus { background: var(--card); border-color: var(--line-strong); }
.gsearch kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--sans); color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; background: var(--card); }
.gsearch > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.gresults { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow-pop); max-height: 70vh; overflow-y: auto; z-index: 35; padding: var(--s2) 0; }
.gresults h4 { margin: var(--s2) var(--s4) 4px; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.gresults a { display: flex; gap: var(--s3); align-items: center; padding: 8px var(--s4); color: inherit; text-decoration: none; font-size: 14px; }
.gresults a:hover, .gresults a.hi { background: var(--hover); }
.gresults .sub { font-size: 12px; color: var(--text-3); }
.search-btn { display: none; }
@media (max-width: 900px) { .gsearch { display: none; position: fixed; inset: 0 0 auto 0; width: auto; padding: var(--s3); background: var(--card); z-index: 36; border-bottom: 1px solid var(--line); } .gsearch.open { display: block; } .gsearch > svg { left: 23px; } .gsearch kbd { display: none; } .gresults { left: var(--s3); right: var(--s3); } .search-btn { display: inline-grid; } }
.thumbpick { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.thumbpick button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; overflow: hidden; text-align: left; font-size: 11px; }
.thumbpick button.on { border-color: var(--focus); }
.thumbpick img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.wa-preview { background: #efeae2; border-radius: var(--r); padding: var(--s4); }
.wa-preview .bubble { background: #fff; border-radius: 10px; padding: 8px 10px; max-width: 320px; box-shadow: var(--shadow); font-size: 14px; white-space: pre-wrap; }
.wa-preview .bubble img { width: 100%; border-radius: 6px; margin-bottom: 6px; }
.wa-preview .bubble .foot { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.wa-preview .bbtn { margin-top: 4px; max-width: 320px; background: #fff; border-radius: 10px; text-align: center; padding: 8px; color: #027eb5; font-size: 14px; box-shadow: var(--shadow); }
.steps { display: flex; gap: var(--s2); flex-wrap: wrap; font-size: 13px; }
.steps span { padding: 4px 10px; border-radius: 999px; background: var(--sunken); color: var(--text-3); }
.steps span.on { background: var(--primary); color: #fff; } .steps span.done { background: var(--ok-bg); color: var(--ok); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sunken); }
.check { display: flex; gap: var(--s2); font-size: 14px; padding: 6px 0; } .check .ok { color: var(--ok); } .check .no { color: var(--bad); }

.skel { display: flex; flex-direction: column; gap: var(--s4); }
.sk-card { height: 104px; } .sk-block { height: 320px; }
.sk-card, .sk-block { background: linear-gradient(90deg, var(--card) 0%, var(--sunken) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* store editor */
.se { display: flex; flex-direction: column; height: calc(100vh - var(--topbar)); max-width: 880px; margin: 0 auto; width: 100%; }
.se-head { display: flex; justify-content: space-between; gap: var(--s3); align-items: flex-start; padding: var(--s4) var(--s5) var(--s3); border-bottom: 1px solid var(--line); }
.se-feed { flex: 1; overflow-y: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.se-msg { display: flex; flex-direction: column; gap: 2px; max-width: 80%; }
.se-msg.me { align-self: flex-end; align-items: flex-end; } .se-msg.bot { align-self: flex-start; }
.se-msg .bubble { padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: var(--card); border: 1px solid var(--line); }
.se-msg.me .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.se-card { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--shadow); }
.se-items { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s3); }
.se-item { border-top: 1px solid var(--line); padding-top: var(--s3); } .se-item:first-child { border-top: 0; padding-top: 0; }
.se-card:not(.open) .se-item.extra { display: none; }
.se-field { margin-top: 6px; }
.se-ba { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.se-ba .txt { font-size: 13px; white-space: pre-wrap; background: var(--sunken); border-radius: 8px; padding: 8px 10px; max-height: 320px; overflow: auto; }
.se-ba del { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.se-ba ins { background: var(--ok-bg); color: var(--ok); text-decoration: none; }
.se-compose { display: flex; gap: var(--s2); padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--line); background: var(--card); align-items: flex-end; }
.se-compose textarea { min-height: 44px; max-height: 160px; }
.se-hello { margin: auto; text-align: center; max-width: 560px; display: flex; flex-direction: column; gap: var(--s3); align-items: center; }
.se-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--selected); color: var(--focus); display: grid; place-items: center; }
.se-hello .chips { justify-content: center; } .se-hello .chip { text-align: left; }
.dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); margin-right: 3px; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (max-width: 900px) { .se { height: calc(100vh - var(--topbar) - var(--bottombar)); } .se-ba { grid-template-columns: 1fr; } .se-msg { max-width: 92%; } .se-head, .se-feed, .se-compose { padding-left: var(--s4); padding-right: var(--s4); } }

.se-risks { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.se-risks div { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.se-risks .warn { background: var(--warn-bg); color: var(--warn); } .se-risks .danger { background: var(--bad-bg); color: var(--bad); }

.se-frame { width: 100%; height: 360px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.se-price { font-size: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; } .se-price s { color: var(--text-3); font-size: 15px; margin-right: 6px; }

/* store editor v2: saved chats + conversation */
.se2 { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: calc(100vh - var(--topbar)); }
.se-side { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4) var(--s3); min-height: 0; }
.se-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.se-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 8px 4px; }
.se-chat { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; position: relative; }
.se-chat:hover { background: var(--hover); text-decoration: none; } .se-chat.on { background: var(--selected); box-shadow: inset 3px 0 0 var(--focus); }
.se-chat .grow { display: flex; flex-direction: column; min-width: 0; } .se-ct { font-size: 13.5px; font-weight: 500; display: block; }
.se-del { width: 28px; height: 28px; opacity: 0; flex: none; } .se-chat:hover .se-del, .se-chat.on .se-del, .se-del:focus { opacity: 1; }
.se-histbtn { justify-content: flex-start; }
.se-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--page); }
.se-top { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s5); border-bottom: 1px solid var(--line); background: var(--card); min-height: 58px; }
.se-chatsbtn { display: none; }
.se-feed { flex: 1; overflow-y: auto; padding: var(--s5); }
.se-col { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s3); }
.se-when { font-size: 12px; color: var(--text-3); margin-top: 10px; }
.se-kind { width: 30px; height: 30px; border-radius: 8px; background: var(--sunken); color: var(--brand-text); display: grid; place-items: center; flex: none; }
.se-compose { padding: 10px var(--s5) 14px; background: linear-gradient(to top, var(--page) 70%, transparent); }
.se-box { max-width: 780px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px 6px 6px 12px; box-shadow: var(--shadow); }
.se-box:focus-within { border-color: var(--focus); }
.se-box textarea { border: 0; padding: 8px 0; min-height: 40px; max-height: 180px; background: transparent; box-shadow: none; }
.se-box textarea:focus { outline: none; }
.se-compose .hint { max-width: 780px; margin: 4px auto 0; text-align: right; }
.se-wait { color: var(--text-2); }
.se-sugg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); width: 100%; text-align: left; margin-top: var(--s2); }
.se-s { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 11px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; line-height: 1.35; }
.se-s:hover { border-color: var(--line-strong); background: var(--hover); color: var(--text); }
.se-hello { max-width: 720px; margin: 6vh auto 0; }
@media (max-width: 1100px) { .se-sugg { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .se2 { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--topbar) - var(--bottombar)); }
  .se-side { display: none; position: fixed; inset: var(--topbar) 0 var(--bottombar) 0; z-index: 25; }
  .se-side.open { display: flex; }
  .se-chatsbtn { display: inline-grid; }
  .se-top .seg { display: none; }
  .se-feed { padding: var(--s4); } .se-compose { padding: 8px var(--s3) 10px; } .se-compose .hint { display: none; }
  .se-del { opacity: 1; }
}
.se-side .search { flex: none; }
.se2 .se-compose { display: block; border-top: 0; }
.se2 .se-box textarea { width: 100%; flex: 1; }
@media (max-width: 900px) { .se-chatsbtn { display: inline-flex; } .se-sub { display: none; } .se-top { min-height: 50px; padding: 8px var(--s4); } }

.se-msg .bubble p { margin: 0 0 6px; } .se-msg .bubble p:last-child { margin-bottom: 0; }
.se-msg .bubble ul, .se-msg .bubble ol { margin: 4px 0 8px; padding-left: 20px; } .se-msg .bubble li { margin-bottom: 2px; }
.se-msg .bubble hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.se-msg .bubble code { background: var(--sunken); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.se-h { font-weight: 600; margin: 8px 0 4px; } .se-h:first-child { margin-top: 0; }
.se-sample { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 6px 0 10px; background: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 14.5px; }
.se-sample .tiny { font-family: var(--sans); margin-bottom: 4px; } .se-sample ul { padding-left: 20px; margin: 0; }
.se-code { background: var(--sunken); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: pre-wrap; margin: 6px 0; }

.updbar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--primary); color: #fff; padding: 8px 10px 8px 16px; border-radius: 999px; display: flex; gap: 10px; align-items: center; font-size: 14px; box-shadow: var(--shadow-pop); }
.updbar .btn { background: #fff; color: var(--primary); border-color: #fff; }

/* Desk vs Shopify reconciliation */
.recon-hero { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; padding: 4px 18px 16px; }
.recon-total { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.recon-total .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.recon-total b { font: 600 26px/1.15 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.recon-mid { display: grid; place-items: center; color: var(--text-3); font-size: 22px; }
.recon-why { padding: 0 18px 8px; }
.recon-why-h { font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.bridge { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.bridge li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line); }
.bridge li:first-child { border-top: 0; }
.bridge .num { white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.bridge-ic { flex: none; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; background: var(--muted-bg); color: var(--text-2); }
.bridge-step.plus .bridge-ic { background: var(--warn-bg); color: var(--warn); }
.bridge-step.minus .bridge-ic { background: var(--info-bg); color: var(--info); }
.bridge-end.total { background: var(--ok-bg); }
.bridge-end.total .bridge-ic { background: #fff; color: var(--ok); }
.bridge-end.total .num { color: var(--ok); }
.bridge-bar { height: 6px; background: var(--muted-bg); border-radius: 999px; margin-top: 8px; max-width: 320px; }
.bridge-bar i { display: block; height: 100%; border-radius: 999px; background: var(--warn-edge); }
.bridge-step.minus .bridge-bar i { background: var(--info-line); }
.recon-more { border-top: 1px solid var(--line); margin-top: 8px; }
.recon-more summary { cursor: pointer; padding: 12px 18px; font-weight: 600; color: var(--text-2); min-height: 44px; display: flex; align-items: center; }
.recon-more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.recon-more > p { padding: 0 18px 14px; margin: 0; }
.recon-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; padding: 0 18px 12px; max-width: 520px; }
.recon-dl dt { color: var(--text-2); } .recon-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .recon-hero { grid-template-columns: 1fr; padding: 4px 14px 14px; }
  .recon-mid { transform: rotate(90deg); font-size: 18px; }
  .recon-total b { font-size: 22px; }
  .recon-why { padding: 0 14px 8px; }
  .bridge li { flex-wrap: wrap; }
  .bridge li .num { margin-left: 38px; }
  .bridge-end .num { margin-left: auto; }
}

.recon-more summary { gap: 8px; list-style: none; } .recon-more summary::-webkit-details-marker { display: none; }
.recon-more summary svg { transition: transform .15s ease; } .recon-more[open] summary svg { transform: rotate(90deg); }
@media (max-width: 640px) {
  .recon-hero { grid-template-columns: 1fr 1fr; gap: 8px; }
  .recon-mid { display: none; }
  .recon-total { padding: 10px 12px; } .recon-total b { font-size: 19px; } .recon-total .label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .recon-more summary svg { transition: none; } }

/* ---------- Studio ---------- */
.studio { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); max-width: 1500px; margin: 0 auto; width: 100%; }
.studio-ask { padding: var(--s3) var(--s4); }
.ask-row { display: flex; gap: var(--s3); align-items: flex-start; }
.ask-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.ask-row textarea { flex: 1; min-height: 38px; resize: none; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 8px 0; line-height: 1.45; color: var(--text); }
.ask-row textarea:focus { outline: none; }
.studio-ask:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--info-bg); }
.ask-out { padding: 6px 0 2px 48px; display: flex; gap: 6px; align-items: center; color: var(--ok); flex-wrap: wrap; }
.studio-cols { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.studio-make { display: flex; flex-direction: column; gap: var(--s3); position: sticky; top: var(--s4); max-height: calc(100vh - var(--topbar) - 120px); overflow-y: auto; padding-bottom: 4px; scrollbar-width: thin; }
.mk > header h3 { display: flex; align-items: center; gap: 10px; }
.step { width: 24px; height: 24px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { min-height: 36px; cursor: pointer; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; border-radius: 10px; padding: 6px 12px; line-height: 1.2; }
.chips .chip:focus-visible, .pick-card:focus-visible, .lib-card:focus-visible, .slot:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip-sub { font-size: 11px; font-weight: 400; opacity: .75; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; width: max-content; }
.stepper button { width: 44px; height: 40px; border: 0; background: var(--card); font-size: 18px; color: var(--text-2); cursor: pointer; }
.stepper button:hover { background: var(--hover); }
.stepper b { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; font-size: 16px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.btn.big { min-height: 46px; font-size: 15px; width: 100%; }
.btn .cost { opacity: .75; font-weight: 400; margin-left: 4px; }
.picked { display: flex; gap: 12px; align-items: center; }
.picked img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--sunken); }
.picked > div { flex: 1; min-width: 0; }
.pick-empty { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-empty .btn { cursor: pointer; }
.bd-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-item { position: relative; width: 76px; height: 76px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.bd-item img { width: 100%; height: 100%; object-fit: cover; }
.bd-words { font-size: 11px; padding: 6px; color: var(--info); line-height: 1.25; height: 100%; overflow: hidden; background: var(--info-bg); }
.bd-x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 999px; border: 0; background: rgba(17, 24, 39, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.linkbtn { border: 0; background: none; color: var(--info); font: inherit; padding: 0; margin-left: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
/* library */
.studio-lib { min-height: 60vh; }
.lib-head { flex-wrap: wrap; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); padding: var(--s4) var(--s5) var(--s5); }
.lib-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 0; overflow: hidden; text-align: left; cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.lib-card:hover { box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.lib-media { position: relative; aspect-ratio: 1; background: var(--sunken); overflow: hidden; }
.lib-card.portrait .lib-media { aspect-ratio: 4/5; } .lib-card.wide .lib-media { aspect-ratio: 16/9; } .lib-card.tall .lib-media { aspect-ratio: 9/16; } .lib-card.banner .lib-media { aspect-ratio: 3/1; }
.lib-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-media .play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 999px; background: rgba(17, 24, 39, .65); color: #fff; display: grid; place-items: center; }
.lib-meta { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; font-size: 13px; font-weight: 500; }
.lib-meta .badge { align-self: flex-start; }
.lib-ph { width: 100%; height: 100%; min-height: 120px; display: grid; place-items: center; color: var(--text-3); background: linear-gradient(110deg, var(--sunken) 30%, var(--hover) 50%, var(--sunken) 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.lib-ph.failed { animation: none; background: var(--bad-bg); color: var(--bad); }
@keyframes shimmer { to { background-position: -200% 0; } }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; animation: spin .8s linear infinite; vertical-align: -2px; }
.spin.big { width: 26px; height: 26px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.lib-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* pickers */
.sheet-wrap .scrim { z-index: 50; }
.sheet { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: fade .15s; }
.sheet > header { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--s5) var(--s2); }
.sheet-body { padding: 0 var(--s5) var(--s4); overflow-y: auto; flex: 1; }
.sheet > footer { display: flex; justify-content: flex-end; gap: 8px; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.sheet-tools { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; position: sticky; top: 0; background: var(--card); z-index: 1; }
.sheet-tools input[type=search] { min-height: 40px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick-card { position: relative; border: 2px solid transparent; border-radius: var(--r); background: var(--sunken); padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; }
.pick-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pick-card span { font-size: 12px; padding: 6px 8px; background: var(--card); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-card.on { border-color: var(--primary); }
.pick-card .tick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 999px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.pick-card.sk { aspect-ratio: 1; animation: shimmer 1.6s linear infinite; background: linear-gradient(110deg, var(--sunken) 30%, var(--hover) 50%, var(--sunken) 70%); background-size: 200% 100%; }
.pick-grid .empty { grid-column: 1 / -1; }
/* viewer */
.viewer { background: #0f1115; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; min-height: 200px; }
.viewer img, .viewer video { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.ok-note { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); display: flex; gap: 8px; align-items: flex-start; }
.note.warn { display: block; }
.pub-row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.tight select { min-height: 38px; max-width: 100%; }
#pubP { flex: 1; min-width: 180px; }
.pub-hist { display: flex; gap: 12px; align-items: center; padding: 10px var(--s5); border-top: 1px solid var(--line); }
.pub-hist:first-child { border-top: 0; }
.pub-hist.undone { opacity: .6; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--text-3); } .facts dd { margin: 0; }
.slot { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; min-height: 56px; }
.slot:hover { background: var(--hover); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; }
@media (max-width: 1000px) {
  .studio-cols { grid-template-columns: 1fr; }
  .studio-make { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .studio { padding: var(--s3); gap: var(--s3); }
  .ask-row { flex-wrap: wrap; } .ask-row .btn { width: 100%; } .ask-ic { display: none; } .ask-out { padding-left: 0; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--s3); gap: 8px; }
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .sheet { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; max-height: 90vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
}
@media (prefers-reduced-motion: reduce) { .lib-ph, .pick-card.sk, .spin { animation: none; } .lib-card:hover { transform: none; } }
.studio-switch { display: none; }
.sticky-tabs { position: sticky; top: 0; background: var(--card); z-index: 2; }
.sheet-tools { top: 44px; }
.ask-row textarea { min-height: 46px; }
@media (max-width: 1000px) {
  .studio-switch { display: flex; width: 100%; } .studio-switch button { flex: 1; min-height: 40px; font-size: 14px; }
  .studio-cols.show-make .studio-lib { display: none; }
  .studio-cols.show-lib .studio-make { display: none; }
}
@media (max-width: 640px) { .ask-row textarea { min-height: 70px; } }

.ban-prev { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 16px; align-items: end; margin: 12px 0 16px; }
.ban-prev figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ban-prev figcaption { font-size: 12px; color: var(--text-3); text-align: center; }
.ban-desk, .ban-phone { background: #111; border-radius: 8px; overflow: hidden; border: 6px solid #1f2430; }
.ban-phone { border-radius: 18px; border-width: 8px; }
.ban-desk video, .ban-phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .ban-prev { grid-template-columns: 1fr; } .ban-phone { max-width: 220px; margin: 0 auto; } }

/* ---------- Studio wizard ---------- */
.sw { max-width: 1240px; margin: 0 auto; padding: var(--s5) var(--s5) 120px; width: 100%; }
.sw-hero { text-align: center; margin: 12px auto 24px; max-width: 640px; }
.sw-hero h2 { font: 600 28px/1.2 var(--display); margin: 0 0 8px; }
.sw-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sw-big { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow .18s, transform .18s; }
.sw-big:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.sw-big:focus-visible, .sw-tpl:focus-visible, .sw-prod:focus-visible, .sw-opt:focus-visible, .sw-frame:focus-visible, .sw-pcard:focus-visible, .sw-shot-media:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sw-big-pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; aspect-ratio: 16/8; background: var(--sunken); position: relative; }
.sw-big-pics.one { grid-template-columns: 1fr; }
.sw-big-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 999px; background: rgba(17, 24, 39, .6); color: #fff; display: grid; place-items: center; }
.sw-big-text { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.sw-big-text b { font: 600 20px/1.25 var(--display); }
.sw-big-text span { color: var(--text-2); font-size: 15px; line-height: 1.5; }
.sw-big-text .sw-go { margin-top: 6px; color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sw-recent { margin-top: 32px; }
.sw-recent h3 { font-size: 16px; margin: 0 0 12px; }
.sw-proj { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sw-pcard { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); text-align: left; cursor: pointer; overflow: hidden; }
.sw-pcard:hover { box-shadow: var(--shadow-pop); }
.sw-pthumbs { display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 4/1; background: var(--sunken); }
.sw-pthumbs.one { grid-template-columns: 1fr; aspect-ratio: 3/1; }
.sw-pthumbs img { width: 100%; height: 100%; object-fit: cover; }
.sw-pmeta { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; font-size: 14px; }
.sw-pmeta span { color: var(--text-3); font-size: 13px; } .sw-pmeta .badge { align-self: flex-start; }
.sw-spend { text-align: center; margin-top: 24px; }
/* step bar */
.sw-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sw-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sw-steps::-webkit-scrollbar { display: none; }
.sw-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; color: var(--text-3); font-size: 14px; white-space: nowrap; }
.sw-steps li .n { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; background: var(--sunken); font-weight: 700; font-size: 13px; color: var(--text-2); }
.sw-steps li.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sw-steps li.on .n { background: var(--primary); color: #fff; }
.sw-steps li.done { color: var(--ok); } .sw-steps li.done .n { background: var(--ok-bg); color: var(--ok); }
.sw-head { margin-bottom: 16px; } .sw-head h2 { font: 600 24px/1.25 var(--display); margin: 0 0 6px; } .sw-head p { margin: 0; font-size: 15px; }
.sw-main { display: flex; flex-direction: column; gap: 16px; }
.sw-tools { display: flex; flex-direction: column; gap: 10px; }
.sw-tools input[type=search] { min-height: 44px; font-size: 15px; max-width: 520px; }
.chips.big .chip { min-height: 42px; font-size: 14px; padding: 8px 14px; cursor: pointer; }
.chips.big .chip svg { margin-right: 2px; }
/* bottom action bar */
.sw-foot { position: fixed; left: var(--sidebar); right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px max(24px, calc((100vw - var(--sidebar) - 1240px) / 2 + 24px)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, .06); }
.sw-foot-text { font-size: 14px; color: var(--text-2); }
.btn.big-inline { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-3); } .btn.ghost:hover { background: var(--hover); }
/* products */
.sw-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sw-prod { position: relative; display: flex; flex-direction: column; padding: 0; border: 2px solid var(--line); border-radius: var(--r); background: var(--card); text-align: left; cursor: pointer; overflow: hidden; }
.sw-prod img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--sunken); }
.sw-prod .nm { padding: 8px 10px 0; font-size: 14px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-prod .ct { padding: 2px 10px 10px; font-size: 12px; color: var(--text-3); }
.sw-prod .box { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 7px; border: 2px solid #fff; background: rgba(255, 255, 255, .85); box-shadow: 0 1px 3px rgba(0,0,0,.2); display: grid; place-items: center; color: #fff; }
.sw-prod.on { border-color: var(--primary); } .sw-prod.on .box { background: var(--primary); border-color: var(--primary); }
/* templates */
.sw-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.sw-tpl, .sw-opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 14px; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--card); text-align: left; cursor: pointer; overflow: hidden; }
.sw-tpl b, .sw-opt b { padding: 10px 14px 0; font-size: 16px; } .sw-tpl span, .sw-opt span { padding: 0 14px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.sw-tpl.on, .sw-opt.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--info-bg); }
.sw-tpl-pics { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; aspect-ratio: 16/9; background: var(--sunken); }
.sw-tpl-pics img { width: 100%; height: 100%; object-fit: cover; }
.sw-tpl .tick, .sw-opt .tick, .sw-frame .tick { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.sw-opt { padding: 14px 0; } .sw-opt b { padding-top: 0; }
.sw-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sw-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.sw-sec h3 { margin: 0 0 4px; font-size: 15px; display: flex; gap: 8px; align-items: center; } .sw-sec > p { margin: 0 0 10px; }
.sw-sec select { min-height: 42px; width: 100%; }
.sw-cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
/* preview shots */
.sw-orig { display: flex; align-items: center; gap: 10px; } .sw-orig img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.sw-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sw-shot { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.sw-shot.flag { border-color: var(--warn-line); box-shadow: 0 0 0 2px var(--warn-bg); }
.sw-shot-media { display: block; padding: 0; border: 0; background: var(--sunken); cursor: zoom-in; aspect-ratio: 1; position: relative; }
.sw-shot.portrait .sw-shot-media { aspect-ratio: 4/5; } .sw-shot.wide .sw-shot-media { aspect-ratio: 16/9; }
.sw-shot-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-shot-media .lib-ph { flex-direction: column; gap: 8px; height: 100%; }
.sw-shot-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px 0; font-size: 14px; flex-wrap: wrap; }
.sw-why { color: var(--warn); margin: 6px 12px 0; }
.sw-shot-act { display: flex; gap: 6px; padding: 10px 12px 12px; flex-wrap: wrap; }
.sw-shot-act .btn { min-height: 36px; }
.sw-shot.compact { border-radius: var(--r-sm); width: 92px; flex: none; }
.sw-shot.compact .sw-shot-media { cursor: pointer; }
.sw-flagdot { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; }
.sw-progress { height: 10px; border-radius: 999px; background: var(--sunken); overflow: hidden; } .sw-progress i { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s; }
.sw-rows { display: flex; flex-direction: column; gap: 10px; }
.sw-row { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.sw-row.live { background: var(--ok-bg); border-color: var(--ok-line); }
.sw-row-p { display: flex; gap: 10px; align-items: center; width: 280px; flex: none; cursor: pointer; }
.sw-row-p > span { display: flex; flex-direction: column; } .sw-row-p input { width: 20px; height: 20px; accent-color: var(--primary); }
.sw-row-p img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-sm); }
.sw-row-shots { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; padding-bottom: 2px; }
.sw-mini { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
/* big view + change */
.sw-view { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; padding-top: 8px; }
.sw-view figure { margin: 0; } .sw-view img { width: 100%; border-radius: var(--r); display: block; } .sw-view figcaption { font-size: 12px; color: var(--text-3); text-align: center; padding-top: 4px; }
.sw-chg { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding-top: 8px; align-items: start; }
.sw-chg > img, .sw-chg > .lib-ph { width: 100%; border-radius: var(--r); }
/* banner */
.sw-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.sw-frame { position: relative; padding: 0; border: 3px solid transparent; border-radius: var(--r-lg); overflow: hidden; background: var(--sunken); aspect-ratio: 16/9; cursor: pointer; }
.sw-frame img { width: 100%; height: 100%; object-fit: cover; display: block; } .sw-frame.on { border-color: var(--primary); } .sw-frame .lib-ph { height: 100%; }
.sw-fbadge { position: absolute; left: 8px; bottom: 8px; }
.sw-vid video { width: 100%; max-height: 60vh; border-radius: var(--r-lg); background: #000; display: block; }
.lib-ph.tall { aspect-ratio: 16/9; border-radius: var(--r-lg); }
.sw-words { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.sw-words input, .sw-words select { min-height: 42px; }
.pv-site { display: flex; align-items: center; gap: 24px; padding: 10px 16px; background: #fbf6f0; border-bottom: 1px solid #eadfd3; font-size: 10px; color: #333; }
.pv-site.phone { justify-content: center; padding: 8px; }
.pv-logo { font: 600 16px/1 Georgia, serif; } .pv-nav { letter-spacing: .06em; }
.pv-banner { position: relative; aspect-ratio: 1440/460; overflow: hidden; background: #111; }
.pv-banner.phone { aspect-ratio: 390/550; }
.pv-banner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.42), rgba(0,0,0,.08) 60%, rgba(0,0,0,0)); pointer-events: none; }
.pv-banner.phone::after { background: linear-gradient(0deg, rgba(0,0,0,.45), rgba(0,0,0,.05) 70%); }
.pv-text { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #fff; padding: 0 6%; }
.pv-text p { margin: 0 0 6px; font-size: clamp(8px, 1.1vw, 13px); letter-spacing: .22em; font-weight: 600; }
.pv-text h2 { margin: 0 0 12px; font: 500 clamp(18px, 3.4vw, 44px)/1.05 Georgia, serif; color: #fff; }
.pv-text span { display: inline-block; background: #fff; color: #222; padding: 6px 14px; font-size: clamp(8px, .9vw, 12px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pv-text.phone { top: auto; bottom: 7%; transform: none; } .pv-text.phone h2 { font-size: 20px; margin-bottom: 8px; } .pv-text.phone p { font-size: 8px; }
.ban-desk { border-radius: 10px; }
@media (max-width: 1000px) {
  .sw-foot { left: 0; padding: 12px 16px calc(12px + var(--bottombar)); flex-wrap: wrap; }
  .sw-words { grid-template-columns: 1fr; }
  .sw-row { flex-wrap: wrap; } .sw-row-p { width: 100%; }
}
@media (max-width: 640px) {
  .sw { padding: var(--s3) var(--s3) 190px; }
  .sw-start, .sw-choice { grid-template-columns: 1fr; }
  .sw-hero h2, .sw-head h2 { font-size: 21px; }
  .sw-steps li .t { display: none; } .sw-steps li.on .t { display: inline; }
  .sw-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sw-shots { grid-template-columns: 1fr; }
  .sw-foot-text { width: 100%; } .sw-foot .btn.big-inline { flex: 1; }
  .sw-view, .sw-chg { grid-template-columns: 1fr; }
  .sw-frames { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sw-big:hover { transform: none; } .sw-progress i { transition: none; } }
.chips.big .chip { flex-direction: row; align-items: center; gap: 6px; }
.chips.big .chip:has(.chip-sub) { flex-direction: column; align-items: flex-start; gap: 0; }
.sw-shot-act { align-items: center; } .sw-shot-act .ghost { margin-left: auto; }
/* Phone: iOS zooms into inputs under 16px and stays zoomed (the Studio looked cut off on both sides). */
@media (max-width: 1000px) { .sw input, .sw select, .sw textarea, .sheet input, .sheet select, .sheet textarea { font-size: 16px; } }
@media (max-width: 640px) {
  .sw-foot { gap: 8px; }
  .sw-foot .sw-foot-text { flex: 1 1 100%; order: -1; font-size: 13px; }
  .sw-foot .btn:not(.big-inline) { flex: 0 0 auto; }
  .sw-top { gap: 10px; } .sw-top .btn { flex: none; }
  .sw-tpls { grid-template-columns: 1fr; }
}
/* Studio v3: uploads, chat, film plan */
.sw-srctabs { margin-bottom: 4px; }
.sw-drop { border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--card); padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--text-2); }
.sw-drop.over { border-color: var(--primary); background: var(--info-bg); }
.sw-drop b { font-size: 17px; color: var(--text); } .sw-drop .muted { max-width: 520px; }
.sw-drop select { min-height: 40px; }
.sw-target { margin-top: 6px; min-height: 38px; max-width: 100%; }
.sw-sec textarea, .sw-say textarea { width: 100%; resize: vertical; min-height: 64px; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--card); color: var(--text); }
.sw-chat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding-top: 8px; align-items: start; }
.sw-chat-pic img, .sw-chat-pic .lib-ph { width: 100%; border-radius: var(--r); display: block; }
.sw-vers { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.sw-ver { position: relative; width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--sunken); }
.sw-ver img { width: 100%; height: 100%; object-fit: cover; } .sw-ver.on { border-color: var(--primary); }
.sw-ver span { position: absolute; left: 3px; bottom: 3px; font-size: 11px; font-weight: 700; background: rgba(17,24,39,.7); color: #fff; border-radius: 4px; padding: 0 4px; }
.sw-chat-side { display: flex; flex-direction: column; gap: 12px; }
.sw-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.msg { padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; max-width: 92%; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--sunken); color: var(--text-2); border-bottom-left-radius: 4px; }
.sw-say { display: flex; gap: 8px; align-items: flex-end; } .sw-say textarea { flex: 1; min-height: 48px; } .sw-say .btn { min-height: 46px; }
.sw-chat-more { align-items: center; justify-content: space-between; }
.sw-frame .tick.num { font-weight: 700; font-size: 14px; }
.sw-plan h3 { font-size: 17px; } .sw-plan > p { margin: 0 0 12px; }
.sw-shotlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sw-shotlist li { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); }
.sw-shotlist img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; flex: none; }
.sw-shotlist li > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
@media (max-width: 640px) {
  .sw-chat { grid-template-columns: 1fr; }
  .sw-say { flex-direction: column; align-items: stretch; }
  .sw-shotlist img { width: 92px; }
}
.sw-orig { flex-wrap: wrap; } @media (max-width: 640px) { .sw-orig img { width: 56px; height: 56px; } .sw-orig span { width: 100%; } }

/* Calls: practise the calling agent */
.call-purposes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s3); }
.call-purpose { text-align: left; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--card); cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--text); min-height: 44px; }
.call-purpose b { font-weight: 600; color: var(--brand-text); } .call-purpose span { font-size: 13px; color: var(--text-2); }
.call-purpose:hover { background: var(--hover); } .call-purpose.on { border-color: var(--focus); background: var(--selected); box-shadow: inset 0 0 0 1px var(--focus); }
.btn.big { padding: 12px 20px; font-size: 16px; min-height: 48px; }
.call-status { display: flex; align-items: center; gap: var(--s2); font-size: 15px; }
.call-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 0 rgba(31, 157, 85, .5); animation: callpulse 1.6s infinite; }
.call-dot.off { background: var(--text-3); animation: none; }
@keyframes callpulse { 70% { box-shadow: 0 0 0 10px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
@media (prefers-reduced-motion: reduce) { .call-dot { animation: none; } }
.call-meter { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; } .call-meter i { display: block; height: 100%; width: 0; background: var(--focus); transition: width .08s linear; }
.call-transcript { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); background: var(--sunken); border-radius: var(--r); }
.call-transcript.tall { max-height: none; }
.call-line { max-width: 85%; } .call-line span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.call-line p { margin: 0; padding: 8px 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; }
.call-line.customer { align-self: flex-end; } .call-line.customer p { background: var(--wa-bubble); border-color: transparent; }
.call-act { display: flex; align-items: flex-start; gap: var(--s2); font-size: 14px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok); }
.call-act svg { flex: none; margin-top: 3px; } .call-act em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-3); white-space: nowrap; }
@media (max-width: 640px) { .call-act { flex-wrap: wrap; } .call-act em { margin-left: 22px; } .call-line { max-width: 95%; } }
.btn.big { width: auto; } @media (max-width: 640px) { .btn.big { width: 100%; justify-content: center; } }

.call-check { display: flex; align-items: flex-start; gap: var(--s2); font-size: 14px; color: var(--text-2); cursor: pointer; } .call-check input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
@media (max-width: 640px) { .call-purposes { grid-template-columns: 1fr 1fr; gap: var(--s2); } .call-purpose { padding: 10px 12px; } .call-purpose span { font-size: 12px; } }
@media (max-width: 640px) { .t .hide-sm { display: none; } }
.sw-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.sw-profile span { width: 100%; } .sw-profile p { margin: 0; flex: 1 1 260px; font-size: 14px; }
.sw-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: 10px; margin-top: 10px; }
.sw-room { position: relative; padding: 0; border: 2px solid transparent; border-radius: var(--r); background: var(--card); cursor: pointer; overflow: hidden; text-align: left; font: inherit; }
.sw-room img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; } .sw-room span { display: block; padding: 6px 8px; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-room.on { border-color: var(--focus); } .sw-room:disabled { opacity: .45; cursor: not-allowed; } .sw-room .tick { position: absolute; top: 8px; right: 8px; }
.sw-radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; } .sw-radio input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.sw-radio > span { display: flex; flex-direction: column; gap: 2px; } .sw-radio:has(input:checked) { border-color: var(--focus); background: var(--selected); }
.sw-shot video { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-shot.same .lib-ph { color: var(--ok); }
.call-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .call-rules li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; } .call-rules li svg { flex: none; margin-top: 3px; color: var(--ok); } .call-rules li.bad svg { color: var(--warn); }
.call-test summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; } .call-test[open] summary { margin-bottom: 4px; }
.call-audio { display: flex; gap: 8px; align-items: center; } .call-audio audio { flex: 1; min-width: 0; }
.pack-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); }
.pack-line div { display: flex; flex-direction: column; gap: 2px; } .pack-line span { font-size: 13px; color: var(--text-2); }
.pack-line.ready { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); } .pack-line.hold { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); } .pack-line.unchecked { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.meta-days { display: flex; align-items: flex-end; gap: 4px; height: 140px; } .meta-days div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.meta-days i { display: block; width: 100%; max-width: 22px; background: var(--wa); border-radius: 3px 3px 0 0; } .meta-days span { font-size: 10px; color: var(--text-3); margin-top: 4px; }
.kpi-inline b { font-family: var(--display); font-size: 22px; color: var(--brand-text); }

/* Short labels on phones (e.g. tabs that would otherwise be cut off). */
.narrow-only { display: none; }
@media (max-width: 640px) { .wide-only { display: none; } .narrow-only { display: inline; } }
/* Studio home with a single choice: one wide card, pictures beside the words. */
.sw-start.one { grid-template-columns: 1fr; max-width: 980px; margin: 0 auto; }
.sw-start.one .sw-big { display: grid; grid-template-columns: 3fr 2fr; }
.sw-start.one .sw-big-pics { aspect-ratio: auto; min-height: 260px; }
.sw-start.one .sw-big-text { justify-content: center; padding: 28px; }
.sw-recent { max-width: 980px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .sw-start.one .sw-big { grid-template-columns: 1fr; } .sw-start.one .sw-big-pics { aspect-ratio: 16/8; min-height: 0; } }
/* Bar charts with a hover/tap tooltip (core.mjs barChart). */
.chartbox { position: relative; }
.chart-tip { position: absolute; top: -6px; transform: translateY(-100%); background: var(--text); color: var(--card); font-size: 12px; padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-pop); z-index: 2; }
.chartbox .hit:hover + rect { opacity: .75; }
.mix { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--sunken); }
.mix i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend b { color: var(--text); font-weight: 600; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.filters select, .filters input { width: auto; min-width: 140px; }
.filters input[type=search] { flex: 1; min-width: 180px; }
/* Call transcript following the recording. */
.call-line.seek { cursor: pointer; border-radius: 10px; transition: background .15s; }
.call-line.seek:hover p { box-shadow: 0 0 0 2px var(--line); }
.call-line.now p { box-shadow: 0 0 0 2px var(--prepaid); }
.call-line.seek:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Studio: before/after slider and sizes for posting. */
.ba { position: relative; border-radius: var(--r); overflow: hidden; background: var(--sunken); user-select: none; }
.ba img { display: block; width: 100%; height: auto; }
.ba-after { position: absolute; inset: 0; }
.ba-after img { width: 100%; height: 100%; object-fit: cover; }
.ba-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); transform: translateX(-1px); pointer-events: none; }
.ba-tag { position: absolute; top: 10px; font-size: 12px; font-weight: 600; background: rgba(0,0,0,.55); color: #fff; padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.ba-tag.l { left: 10px; } .ba-tag.r { right: 10px; }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.sw-sizes h4 { margin: 4px 0 2px; font-size: 15px; } .sw-sizes p { margin: 0 0 10px; }
.sw-size-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.sw-size { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none; background: var(--card); min-height: 44px; }
.sw-size:hover { border-color: var(--text-3); text-decoration: none; }
.sw-size > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sw-size-box { width: 22px; max-height: 34px; border: 2px solid var(--text-3); border-radius: 3px; flex: none; }
@media (max-width: 640px) { .filters select { flex: 1 1 calc(50% - 4px); min-width: 0; } .filters input[type=search] { flex-basis: 100%; } }
/* Phone app notifications: picture in the preview and the history. */
.push-pic { margin-top: 8px; } .push-pic img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; display: block; }
.push-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
fieldset.field { border: 0; padding: 0; margin: 0; } fieldset.field legend { padding: 0; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.push-row > div > span { display: block; }
/* Insights → bot: website text the assistant doesn't know. */
.sf-item { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sf-item:last-child { border-bottom: 0; padding-bottom: 0; }
.sf-prods { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 240px; overflow: auto; }
.sf-prods .check input { flex: none; }

/* Support email (email.mjs) */
.mail-list { display: flex; flex-direction: column; }
.mail-row { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; cursor: pointer; min-height: 64px; }
.mail-row:last-child { border-bottom: 0; } .mail-row:hover { background: var(--sunken); }
.mail-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mail-body { white-space: pre-wrap; background: var(--sunken); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.mail-first { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mail-first-row { display: flex; gap: var(--s3); align-items: flex-start; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; min-height: 52px; }
.mail-first-row:last-child { border-bottom: 0; } .mail-first-row:hover { background: var(--sunken); }
.mail-first-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mail-row .badge:first-child { align-self: flex-start; margin-top: 2px; }
@media (max-width: 640px) { .mail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mail-order { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 3px; }
#dr { font-size: 14px; line-height: 1.55; }
.howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* ---- Home: ranked "Do now" list, numbers, customers, FYI ---- */
.home-head { align-items: flex-start; }
.home-line { margin: 4px 0 0; color: var(--text-2); max-width: 780px; }
.home-line b { color: var(--text); font-weight: 600; } .home-line .bad-text { color: var(--bad); }
.home-alert { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--bad-bg); border: 1px solid var(--bad-line); border-left: 4px solid var(--bad-edge); color: var(--bad); text-decoration: none; }
.home-alert:hover { text-decoration: none; filter: brightness(.98); }
.home-alert div { color: var(--text-2); font-size: 13px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); align-items: start; }
.home-side { display: flex; flex-direction: column; gap: var(--s4); }
.home-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.home-nums .kpi .value { font-size: 24px; }
.spark { display: block; margin-top: 6px; max-width: 100%; }
.dn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dn li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.dn li:last-child { border-bottom: 0; } .dn li.later { display: none; }
.dn-main { flex: 1; min-width: 0; display: flex; gap: var(--s3); color: inherit; text-decoration: none; }
.dn-main:hover { text-decoration: none; } .dn-main:hover .dn-t { text-decoration: underline; }
.dn-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--text-2); }
.dn-now .dn-ic { background: var(--bad-bg); color: var(--bad); }
.dn-waiting .dn-ic { background: var(--warn-bg); color: var(--warn); }
.dn-t { display: block; font-weight: 600; }
.dn-why { display: block; color: var(--text-2); font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.dn-note { display: block; color: var(--warn); font-size: 13px; }
.dn-warn { display: block; color: var(--bad); font-size: 13px; font-weight: 500; }
.dn-meta { display: flex; gap: var(--s2); align-items: center; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.dn-now .dn-meta span:last-child { color: var(--bad); font-weight: 500; }
.dn-tag { padding: 0 7px; border-radius: 9px; background: var(--sunken); color: var(--text-2); line-height: 18px; }
.dn-now .dn-tag { background: var(--bad-bg); color: var(--bad); }
.dn li > .btn { flex: none; min-width: 92px; }
.dn-more { margin-top: var(--s3); }
.sup { display: flex; flex-direction: column; gap: var(--s2); }
.sup-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.sup-row:hover { background: var(--hover); text-decoration: none; }
.sup-row > svg { color: var(--text-2); flex: none; }
.sup-row b { display: block; } .sup-row .grow > span { display: block; font-size: 13px; color: var(--text-2); }
.fyi > summary { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); cursor: pointer; list-style: none; }
.fyi > summary::-webkit-details-marker { display: none; }
.fyi ul.body { margin: 0; padding-top: 0; padding-left: calc(var(--s5) + 18px); display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
@media (max-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr); } .home-side { display: contents; } .home-nums { order: -1; } }
@media (max-width: 900px) {
  .home-head .seg { order: -1; }
  .dn li { flex-wrap: wrap; } .dn li > .btn { margin-left: 46px; min-height: 40px; }
  .fyi > summary { padding: var(--s3) var(--s4); }
}
/* Latest orders on Home: the compact list at every width (a 7-column table doesn't fit half a page). */
.home-orders .desk-table { display: none; }
.home-orders .list-cards { display: flex; flex-direction: column; }
.home-orders .lc { display: flex; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); cursor: pointer; }
.home-orders .lc:last-child { border-bottom: 0; } .home-orders .lc:hover { background: var(--hover); }
.home-orders .lc .thumbs img { width: 44px; height: 44px; }
@media (max-width: 900px) {
  .home-head { flex-direction: column; align-items: stretch; gap: var(--s3); }
  .home-head .seg { align-self: flex-start; }
  .dn-main { flex-basis: 100%; }
  .home-orders .lc { padding: var(--s3) var(--s4); }
}
/* Done / Snooze on each Do now row */
.dn-acts { position: relative; display: flex; gap: 2px; flex: none; }
.dn-acts .iconbtn { width: 36px; height: 36px; color: var(--text-3); }
.dn-acts .iconbtn:hover { color: var(--text); }
.dn-menu { position: absolute; right: 0; top: 40px; z-index: 15; display: flex; flex-direction: column; min-width: 170px; padding: var(--s2); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.dn-menu span { padding: 2px var(--s2) 4px; }
.dn-menu button { text-align: left; border: 0; background: none; padding: 9px var(--s2); border-radius: var(--r-sm); min-height: 40px; }
.dn-menu button:hover, .dn-menu button:focus-visible { background: var(--hover); }
.dn li.dn-gone { color: var(--ok); font-size: 14px; background: var(--ok-bg); border-radius: var(--r); padding: var(--s2) var(--s3); border-bottom: 0; margin: 2px 0; }
.dn li.dn-gone svg { vertical-align: -3px; }
.dn-snoozed { margin-top: var(--s3); font-size: 14px; color: var(--text-2); }
.dn-snoozed summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dn-snoozed ul { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.dn-snoozed li { display: flex; align-items: center; gap: var(--s3); }
@media (max-width: 900px) { .dn-acts { margin-left: auto; } .dn-acts .iconbtn { width: 44px; height: 44px; } }
/* Home: the team's work (progress, who's next) */
.home-main { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.tm { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tm li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.tm li:last-child { border-bottom: 0; }
.tm-n { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-bar { display: block; height: 6px; border-radius: 3px; background: var(--sunken); margin: 6px 0 4px; overflow: hidden; }
.tm-bar i { display: block; height: 100%; background: var(--wa); border-radius: 3px; }
.tm-next { display: block; font-size: 13px; color: var(--text-2); }
.tm-done b, .tm-done .tm-next { color: var(--text-3); } .tm-done .dn-ic { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 1100px) { .home-main { display: contents; } }
/* Home: Summary card (one section per area) */
.summary .body { display: flex; flex-direction: column; gap: 0; padding-top: var(--s2); }
.sm-sec { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.sm-sec:last-child { border-bottom: 0; padding-bottom: 0; }
.sm-sec header { display: flex; align-items: center; gap: var(--s2); margin-bottom: 4px; }
.sm-sec header h3 { flex: 1; font-size: 15px; }
.sm-sec header a { display: inline-flex; align-items: center; gap: 2px; }
.sm-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--text-2); flex: none; }
.sm-sec p { margin: 0 0 4px; font-size: 14px; color: var(--text); }
.sm-sec p b { font-weight: 600; }
.sm-sec .sm-dim { color: var(--text-2); font-size: 13px; }
.sm-sec .sm-sub { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.sm-list { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.sm-list a { color: inherit; } .sm-list a:hover { color: var(--text); }
.sm-list .badge { font-size: 11px; padding: 0 6px; }
/* Home: Summary row (label, big number, chip, one bar, one short line) */
.srow4 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); }
.home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
.scard .spark { width: 100%; height: 30px; }
.scard { display: flex; flex-direction: column; gap: 6px; padding: var(--s4); color: inherit; text-decoration: none; min-width: 0; }
.scard:hover { text-decoration: none; background: var(--hover); }
.slabel { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 500; }
.srow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.sbig { font-family: var(--display); font-size: 28px; font-weight: 500; color: var(--brand-text); line-height: 1.15; font-variant-numeric: tabular-nums; }
.schip { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--text-2); white-space: nowrap; }
.schip.bad { background: var(--bad-bg); color: var(--bad); } .schip.warn { background: var(--warn-bg); color: var(--warn); } .schip.ok { background: var(--ok-bg); color: var(--ok); }
.schip.delta.up { background: var(--ok-bg); color: var(--ok); } .schip.delta.down { background: var(--bad-bg); color: var(--bad); }
.sbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--sunken); }
.sbar i { display: block; min-width: 3px; }
.slegend { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--text-3); }
.slegend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.slegend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.slegend b { color: var(--text-2); font-weight: 600; }
.sfoot { font-size: 13px; color: var(--text-2); margin-top: auto; padding-top: 2px; }
.sfoot b { color: var(--text); font-weight: 600; } .warn-text { color: var(--warn); font-weight: 500; }
.slink { border: 0; background: none; padding: 0; color: var(--info); font-size: 13px; text-decoration: underline; cursor: pointer; min-height: 24px; }
@media (max-width: 1180px) { .srow4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .srow4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-grid { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 520px) { .scard { padding: var(--s3); } .sbig { font-size: 24px; } }
.sbar-none { height: 8px; flex: none; }
@media (max-width: 1100px) { .srow4 > .scard:first-child { grid-column: span 2; } }
/* Home, calm version: one strip of numbers, then folded sections */
.nstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.nstrip-c { display: flex; flex-direction: column; gap: 1px; padding: var(--s3) var(--s4); color: inherit; text-decoration: none; border-left: 1px solid var(--line); min-width: 0; }
.nstrip-c:first-child { border-left: 0; }
.nstrip-c:hover { background: var(--hover); text-decoration: none; }
.nstrip .nl { font-size: 12px; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.nstrip .nv { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--brand-text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.nstrip .ns, .nstrip .delta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); cursor: pointer; list-style: none; min-height: 52px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--hover); border-radius: var(--r-lg); }
.fold-t { display: inline-flex; align-items: center; gap: var(--s2); }
.fold-t svg { transition: transform .15s; color: var(--text-3); }
.fold[open] .fold-t svg { transform: rotate(90deg); }
.fold-b { padding: 0 var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.fold-b .card { box-shadow: none; }
.more-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fyi-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
@media (max-width: 1100px) { .more-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .nstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nstrip-c:nth-child(4) { border-left: 0; } .nstrip-c:nth-child(n+4) { border-top: 1px solid var(--line); }
  .nstrip-c { padding: var(--s3); }
  .fold > summary { padding: var(--s3) var(--s4); } .fold-b { padding: 0 var(--s3) var(--s3); }
}
/* Home, Shopify/Amazon style: your 4 numbers, then today's work as count tiles */
.nrow { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.nrow-c { display: flex; flex-direction: column; gap: 2px; padding: var(--s4) var(--s5); color: inherit; text-decoration: none; border-left: 1px solid var(--line); min-width: 0; }
.nrow-c:first-child { border-left: 0; } .nrow-c:hover { background: var(--hover); text-decoration: none; }
.nrow .nl { font-size: 13px; color: var(--text-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 28px; }
.nrow .nv { font-family: var(--display); font-size: 28px; font-weight: 500; color: var(--brand-text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.nrow .ns, .nrow .ns .delta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow-edit { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; color: var(--text-3); }
.metric-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.metric-pick label { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r); min-height: 44px; cursor: pointer; }
.todo { display: flex; flex-direction: column; gap: var(--s3); }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s3); }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line); border-top: 4px solid var(--line-strong); background: var(--card); box-shadow: var(--shadow); color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; min-width: 0; min-height: 112px; }
.tile:hover { background: var(--hover); text-decoration: none; }
.tile .tv { font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1.1; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.tile .tl { font-weight: 600; font-size: 14px; line-height: 1.3; }
.tile .ts { font-size: 12px; color: var(--text-3); line-height: 1.3; }
.tile.bad { border-top-color: var(--bad-edge); } .tile.bad .tv { color: var(--bad); } .tile.bad .ts { color: var(--bad); }
.tile.warn { border-top-color: var(--warn-edge); }
.tile.zero { border-top-color: var(--ok-line); background: var(--page); box-shadow: none; } .tile.zero .tv { color: var(--ok); } .tile.zero .tl { color: var(--text-2); font-weight: 500; }
.drawer.wide { width: min(640px, 100vw); }
@media (max-width: 1280px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .nrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nrow-c:nth-child(3) { border-left: 0; } .nrow-c:nth-child(n+3) { border-top: 1px solid var(--line); }
  .nrow-c { padding: var(--s3) var(--s4); } .nrow .nv { font-size: 24px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .tile { min-height: 96px; padding: var(--s3); }
}
@media (max-width: 900px) { .nrow .ns, .nrow .ns .delta { white-space: normal; } .nrow .nl { white-space: normal; } }
/* Home: since-last-look line, freshness, two tile groups, insights, tile panels */
.home-line .muted { color: var(--text-3); }
.fresh { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.fresh.old { color: var(--warn); } .fresh .iconbtn { width: 30px; height: 30px; }
.nrow-c .spark { width: 100%; height: 26px; margin-top: 4px; }
.todo2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: var(--s4); }
.todo2 .todo h2 { font-size: 15px; margin-bottom: 2px; }
.todo2 .you .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.todo2 .team .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.insights { display: flex; flex-direction: column; gap: var(--s2); }
.insights h2 { font-size: 15px; }
.insight { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--info-line); }
.insight.warn { border-left-color: var(--warn-edge); } .insight > svg { color: var(--text-3); flex: none; } .insight.warn > svg { color: var(--warn); }
.insight a { color: inherit; text-decoration: none; display: flex; flex-direction: column; } .insight a:hover b { text-decoration: underline; }
.insight a span { font-size: 13px; color: var(--text-2); }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plist li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.plist li a.grow { color: inherit; text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.plist li a.grow span { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist li a.grow:hover b { text-decoration: underline; }
@media (max-width: 1280px) { .todo2 { grid-template-columns: minmax(0, 1fr); } .todo2 .you .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 50%; } }
@media (max-width: 900px) { .todo2 .you .tiles { max-width: none; } .todo2 .team .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Tasks (Linear-style): list on the left, the selected task on the right */
.tasks { display: grid; grid-template-columns: minmax(380px, 520px) minmax(0, 1fr); height: calc(100vh - var(--topbar)); background: var(--card); }
.tk-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.tk-head { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s2); }
.tk-head .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tk-head .chip { white-space: nowrap; cursor: pointer; }
.tk-rows { flex: 1; overflow-y: auto; outline: none; }
.tk-group h3 { position: sticky; top: 0; z-index: 1; background: var(--page); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 6px var(--s4); border-bottom: 1px solid var(--line); }
.tk-group h3 span { font-weight: 500; margin-left: 4px; }
.tk-row { display: grid; grid-template-columns: 4px 20px minmax(0, 1fr) 24px 40px; align-items: center; gap: var(--s3); width: 100%; padding: 9px var(--s4) 9px 0; border: 0; border-bottom: 1px solid var(--line); background: var(--card); text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.tk-row:hover { background: var(--hover); } .tk-row.on { background: var(--selected); }
.tk-pri { align-self: stretch; } .tk-row.urgent .tk-pri { background: var(--bad-edge); } .tk-row.today .tk-pri { background: var(--warn-edge); } .tk-row.later .tk-pri { background: var(--line-strong); }
.tk-ic { color: var(--text-3); display: grid; place-items: center; }
.tk-main { min-width: 0; display: flex; flex-direction: column; }
.tk-t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-s { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-av { width: 24px; height: 24px; font-size: 10px; } .tk-av.none { border: 1px dashed var(--line-strong); border-radius: 50%; display: block; }
.tk-age { font-size: 12px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-keys { padding: 8px var(--s4); border-top: 1px solid var(--line); }
kbd { display: inline-block; min-width: 18px; padding: 0 4px; margin: 0 1px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; font: 11px/16px var(--sans); text-align: center; background: var(--card); color: var(--text-2); }
.tk-detail { min-width: 0; overflow-y: auto; background: var(--page); display: flex; }
.tk-d { padding: var(--s6) var(--s7); display: flex; flex-direction: column; gap: var(--s4); max-width: 720px; width: 100%; }
.tk-dt { font-size: 22px; line-height: 1.3; } .tk-ds { margin: 0; color: var(--text-2); font-size: 15px; }
.tk-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.tk-sec { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
.tk-sec h3 { font-size: 13px; color: var(--text-3); font-weight: 600; }
.tk-sec select { max-width: 260px; }
.tk-row2 { flex-direction: row; align-items: center; gap: var(--s2); }
.tk-snz { position: relative; }
.dn-menu.up { top: auto; bottom: 44px; left: 0; right: auto; }
.tk-back { display: none; }
@media (max-width: 900px) {
  .tasks { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--topbar) - var(--bottombar)); }
  .tasks .tk-detail { display: none; } .tasks.open .tk-list { display: none; } .tasks.open .tk-detail { display: flex; }
  .tk-back { display: inline-grid; } .tk-keys { display: none; } .tk-d { padding: var(--s4); }
}
.tk-head .chip { flex: none; white-space: nowrap; flex-direction: row; } .tk-head .chip .n { margin-left: 2px; }
.tk-sec select { width: auto; min-width: 200px; }
.tk-inline h3 { color: var(--text); font-size: 14px; }
.tk-mail { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); font-size: 14px; max-height: 240px; overflow-y: auto; }
.tk-inline textarea { width: 100%; font: 14px/1.5 var(--sans); padding: var(--s3); border-radius: var(--r); border: 1px solid var(--line-strong); resize: vertical; }
.tk-inline .note ul { margin: 4px 0 0 18px; padding: 0; }
.tk-convo { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3); background: var(--page); }
/* Home: New / Classic switch beside the period buttons */
.home-ctl { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) { .home-ctl { justify-content: flex-start; } }
/* On/off switch (New Home) */
.toggle { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; user-select: none; min-height: 36px; }
.toggle button[role="switch"] { position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: var(--line-strong); transition: background .15s; flex: none; }
.toggle button[role="switch"] .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .25); transition: transform .15s; }
.toggle button[role="switch"][aria-checked="true"] { background: var(--wa); }
.toggle button[role="switch"][aria-checked="true"] .knob { transform: translateX(16px); }
.home-ctl { align-items: center; gap: var(--s3); }
/* Home: date picker */
.period { flex-wrap: wrap; }
.period #period-custom { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.home-ctl { position: relative; }
.period-pop { position: absolute; right: 0; top: 44px; z-index: 30; width: min(380px, calc(100vw - 32px)); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); box-shadow: var(--shadow-pop); }
.period-pop label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-3); font-weight: 500; flex: 1; }
.period-pop input[type=date] { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); font: inherit; }
.period-pop .chips .chip { cursor: pointer; }
@media (max-width: 900px) { .period-pop { left: 0; right: auto; } }
.spark-cap { font-size: 11px; color: var(--text-3); margin-top: 1px; }
/* Tasks table (Orders-style): keep the action column on screen */
.tk-table td:nth-child(2) { min-width: 0; }
.tk-sub { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-act { white-space: nowrap; text-align: right; } .tk-act .iconbtn { width: 32px; height: 32px; vertical-align: middle; }
.tk-table .tk-av { width: 24px; height: 24px; font-size: 10px; display: inline-grid; vertical-align: middle; }
/* Attachments: the customer's files, and files attached to a reply */
.att-grid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.att-thumb img { width: 112px; height: 112px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); display: block; background: var(--sunken); }
.att-video { width: 240px; max-width: 100%; border-radius: var(--r); background: #000; }
.att-file { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.att-pick { display: flex; flex-direction: column; gap: 6px; }
.att-btn { align-self: flex-start; cursor: pointer; }
.att-list { display: flex; flex-wrap: wrap; gap: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 4px 4px 4px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 13px; }
.att-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.att-chip .iconbtn { width: 28px; height: 28px; }
/* WhatsApp photos and videos: tap a photo to see it full size; paperclip to send one */
.msg .msg-media { display: block; padding: 0; margin: 0 0 4px; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.msg .msg-media img { margin: 0; max-height: 320px; object-fit: cover; }
.msg .msg-media:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.msg video { max-height: 320px; background: #000; }
@media (max-width: 520px) { .msg img, .msg video { max-width: min(220px, 100%); } .msg .msg-media img, .msg video { max-height: 260px; } }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 16, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); padding: var(--s4); animation: fade .15s; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 96px); object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox .lb-bar { display: flex; gap: var(--s2); }
.att-btn { flex: none; align-self: flex-end; }
.att-btn:disabled { opacity: .5; }
.att-prev { display: flex; align-items: center; gap: var(--s3); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r); background: var(--page); }
.att-prev[hidden] { display: none; }
.att-prev img, .att-prev video { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.att-prev .att-info { min-width: 0; }
.att-prev .att-err { color: var(--bad); margin-top: 2px; }
.att-prev .note { margin: 0; }
.att-prev.busy { opacity: .6; pointer-events: none; }
.att-prev.busy .att-info::after { content: "Sending…"; display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
/* "Not delivered" line in a chat (WhatsApp refused what the team sent) */
.msg.note { align-self: center; max-width: 90%; background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); font-size: 13px; }

/* call requests in the Inbox */
.call-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: start; padding: var(--s3) var(--s4); background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); color: var(--text); }
.call-strip > .row { grid-column: 2; }
.call-strip .ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card); color: var(--warn); border: 1px solid var(--warn-line); flex: none; }
.call-strip b { color: var(--warn); }
.call-strip .grow > .small { color: var(--text-2); margin-top: 1px; }
.chatrow .badge.b-warn svg { margin-right: -1px; }
.call-strip.slim { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 6px var(--s3); gap: var(--s2); }
.call-strip.slim > .row { grid-column: auto; }
.call-strip.slim .ic { width: 26px; height: 26px; }
.call-strip.slim summary { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; list-style: none; }
.call-strip.slim summary::-webkit-details-marker { display: none; }
.call-strip.slim details[open] summary { white-space: normal; }
.call-strip.slim details .tiny { margin-top: 4px; }
@media (max-width: 520px) { .call-strip > .row { grid-column: 1 / -1; } .call-strip > .row .btn { flex: 1; } }
.tabs .n.warn { background: var(--warn-bg); color: var(--warn); }

/* answers from the owner (Settings) */
.ans-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ans { display: flex; gap: var(--s3); align-items: flex-start; flex-wrap: wrap; padding: var(--s4); border-top: 1px solid var(--line); }
.ans:first-child { border-top: 0; }
.ans p { margin: 4px 0 8px; font-size: 14px; color: var(--text-2); white-space: pre-wrap; max-width: 70ch; }
.ans-photos { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: 6px; }
.ans-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--sunken); }
.ans-pick { display: flex; gap: var(--s2); flex-wrap: wrap; }
.ans-thumb { position: relative; width: 84px; height: 84px; }
.ans-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.ans-thumb .iconbtn { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 1px solid var(--line-strong); font-size: 16px; line-height: 1; }
.ans-add { display: grid; place-items: center; width: 84px; height: 84px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); font-size: 13px; color: var(--text-2); cursor: pointer; text-align: center; }
.ans-add:hover { background: var(--hover); } .ans-add:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.label-like { font-size: 13px; font-weight: 500; color: var(--text-2); }
/* courier choice (order panel card, Settings → Courier choice) */
.cp-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.cp-name { font-family: var(--display); font-weight: 500; font-size: 17px; color: var(--brand-text); line-height: 1.3; }
.cp-meta { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.cp-price { text-align: right; line-height: 1.2; } .cp-price b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; } .cp-price span { font-size: 12px; color: var(--text-3); }
.cp-gain { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 500; }
.cp-gain svg { flex: none; margin-top: 3px; }
.cp-why { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.cp-opts { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 14px; }
.cp-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: 10px var(--s3); border-top: 1px solid var(--line); }
.cp-opt:first-child { border-top: 0; }
.cp-opt > span:nth-child(n+2) { min-width: 64px; }
.cp-opts .cp-opt:has(> span:nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr) auto auto; }
.cp-opts .cp-opt:not(:has(> span:nth-child(3))) { grid-template-columns: minmax(0, 1fr) auto; }
.cp-opt.head { background: var(--sunken); font-size: 12px; font-weight: 600; color: var(--text-3); padding-top: 7px; padding-bottom: 7px; }
.cp-opt.best { background: var(--selected); }
.cp-opt small { display: block; color: var(--text-3); font-size: 12px; margin-top: 1px; }
.cp-opt b { font-weight: 600; }
.cp-good { color: var(--ok); font-weight: 600; } .cp-bad { color: var(--bad); font-weight: 600; }
.cp-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); list-style: none; min-height: 32px; border-radius: var(--r-sm); }
.cp-more > summary::-webkit-details-marker { display: none; }
.cp-more > summary svg { transition: transform .15s ease; } .cp-more[open] > summary svg { transform: rotate(90deg); }
.cp-more > .hint, .cp-more > form { margin-top: var(--s2); line-height: 1.55; }
.cp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); align-items: end; }
.cp-form.wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cp-form .btn { justify-self: start; }
.cp-check { display: flex; align-items: center; gap: var(--s2); font-size: 14px; min-height: 38px; cursor: pointer; }
.cp-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.cp-checks { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.cp-err { padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad); font-size: 14px; }
input[aria-invalid="true"] { border-color: var(--bad-edge); box-shadow: 0 0 0 3px var(--bad-bg); }
.cp-lead { margin: 0; font-size: 14px; color: var(--text-2); max-width: 70ch; }
.cp-sec { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.cp-sec h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--brand-text); }
.cp-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s2); }
.cp-src { display: flex; flex-direction: column; gap: 2px; padding: var(--s3); border-radius: var(--r); border: 1px solid var(--line); background: var(--sunken); font-size: 13px; color: var(--text-3); }
.cp-src b { font-size: 14px; color: var(--text-2); }
.cp-src.on { background: var(--ok-bg); border-color: var(--ok-line); } .cp-src.on b { color: var(--ok); } .cp-src.on span { color: var(--ok); }
.cp-cards { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cp-card { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3); border-top: 1px solid var(--line); }
.cp-card:first-child { border-top: 0; } .cp-card.off { background: var(--sunken); }
.cp-card small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cp-empty { padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r); font-size: 14px; color: var(--text-3); }
.cp-result { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: var(--s3); }
.cp-zones { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cp-zone { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .7fr); gap: var(--s2); align-items: center; padding: 6px var(--s3); border-top: 1px solid var(--line); font-size: 13px; }
.cp-zone:first-child { border-top: 0; } .cp-zone.head { background: var(--sunken); font-size: 12px; font-weight: 600; color: var(--text-3); }
.cp-zone input { min-height: 34px; padding: 5px 8px; }
.cp-sk { display: flex; flex-direction: column; gap: 10px; }
.cp-sk span { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--sunken) 0%, var(--hover) 50%, var(--sunken) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.cp-sk span:first-child { height: 22px; width: 55%; } .cp-sk span:nth-child(2) { width: 85%; } .cp-sk span:nth-child(3) { height: 80px; }
.lc .cp-use, td .cp-use { color: var(--text-3); font-size: 12px; white-space: nowrap; }
@media (max-width: 520px) {
  .cp-price b { font-size: 18px; }
  .cp-zone { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .7fr); padding: 6px var(--s2); }
  .cp-form .btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .cp-more > summary svg { transition: none; } }

/* Instagram (Settings card, Inbox labels) */
.ig-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--s3); font-size: 14px; line-height: 1.5; }
.ig-steps li::marker { font-weight: 600; color: var(--text-2); }
.ig-hook { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.ig-copy { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.ig-copy code { font-size: 13px; padding: 6px 10px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); overflow-wrap: anywhere; min-width: 0; flex: 1 1 220px; }
.ig-switch { align-items: flex-start; } .ig-switch input { margin-top: 3px; }
.badge.b-ig { background: #fdf0f6; color: #a3195b; border-color: #f5c6dc; }
.avatar.ig { background: linear-gradient(135deg, #feda75 0%, #fa7e1e 30%, #d62976 60%, #962fbf 85%); color: #fff; }
/* Inbox tabs: five fit the list pane (Waiting · To call · With team · Bot · All); scroll if a pane is narrower */
.pane.list .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.pane.list .tabs::-webkit-scrollbar { display: none; }
.pane.list .tabs button { padding: 10px 7px; font-size: 14px; gap: 4px; }
@media (max-width: 1360px) and (min-width: 521px) { .pane.list .tabs button { padding: 10px 5px; font-size: 13px; } .pane.list .tabs .n { padding: 0 5px; } }

/* WhatsApp alerts page: three counts on top, then one row per alert: what · who has it / is it done · when. */
.ta-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.ta-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s3) var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: left; box-shadow: var(--shadow); }
.ta-stat:hover { background: var(--hover); }
.ta-stat b { font: 500 26px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.ta-stat span { font-size: 13px; color: var(--text-2); }
.ta-stat.ok b { color: var(--ok); } .ta-stat.warn b { color: var(--warn); } .ta-stat.bad { border-color: var(--bad-line); background: var(--bad-bg); } .ta-stat.bad b { color: var(--bad); }
.ta-key { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; } .ta-key .icon { color: var(--wa); vertical-align: -2px; }
.ta-list { display: flex; flex-direction: column; }
.ta-row { display: grid; grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) 84px; gap: var(--s3); align-items: center; width: 100%; padding: var(--s3) var(--s4);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; border-left: 3px solid transparent; }
.ta-row:last-child { border-bottom: 0; } .ta-row:hover { background: var(--hover); }
.ta-row.bad { border-left-color: var(--bad-edge); } .ta-row.warn { border-left-color: var(--warn-edge); }
.ta-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--muted-bg); color: var(--text-2); }
.ta-row.ok .ta-ico { background: var(--ok-bg); color: var(--ok); } .ta-row.warn .ta-ico { background: var(--warn-bg); color: var(--warn); } .ta-row.bad .ta-ico { background: var(--bad-bg); color: var(--bad); }
.ta-main { display: flex; flex-direction: column; min-width: 0; } .ta-main b { font-weight: 600; }
.ta-who { font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.ta-state { display: flex; flex-direction: column; min-width: 0; }
.ta-head { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; }
.ta-row.ok .ta-head { color: var(--ok); } .ta-row.warn .ta-head { color: var(--warn); } .ta-row.bad .ta-head { color: var(--bad); } .ta-row.closed .ta-head { color: var(--text-2); }
.ta-sub { font-size: 13px; color: var(--text-3); }
.ta-when { font-size: 13px; color: var(--text-2); text-align: right; white-space: nowrap; } .ta-when span { color: var(--text-3); font-size: 12px; }
.ta-convo { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border-radius: var(--r); background: #f7f6f2; }
.ta-msg { align-self: flex-start; max-width: 88%; padding: 8px 12px; border-radius: 12px; border-top-left-radius: 4px; background: #fff; color: var(--text); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.ta-msg.out { align-self: flex-end; background: var(--wa-bubble); border-top-left-radius: 12px; border-top-right-radius: 4px; }
.ta-msg.out.staff { background: #e3ecfb; } .ta-msg.sent { max-width: 100%; }
.ta-msg .meta { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); text-align: right; white-space: normal; }
.ta-earlier { margin-top: var(--s3); } .ta-earlier summary { cursor: pointer; font-size: 13px; color: var(--text-2); min-height: 44px; display: flex; align-items: center; }
.ta-earlier .ta-convo { margin-top: var(--s2); }
.ta-banner { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid var(--muted-line); background: var(--muted-bg); }
.ta-banner > div { display: flex; flex-direction: column; } .ta-banner span { font-size: 13px; color: var(--text-2); }
.ta-banner.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); } .ta-banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); } .ta-banner.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
@media (max-width: 760px) {
  .ta-top { gap: var(--s2); } .ta-stat { padding: var(--s2) var(--s3); } .ta-stat b { font-size: 22px; } .ta-stat span { font-size: 12px; }
  .ta-row { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "ico main when" "ico state state"; row-gap: 6px; }
  .ta-ico { grid-area: ico; align-self: start; } .ta-main { grid-area: main; } .ta-state { grid-area: state; } .ta-when { grid-area: when; align-self: start; }
}

/* The WhatsApp alert line on a task / order: sent to whom, what they did. */
.wa-line { display: flex; align-items: flex-start; gap: 5px; margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.wa-line .icon { flex: none; margin-top: 1px; color: var(--wa); }
.wa-line.ok span { color: var(--ok); } .wa-line.warn span { color: var(--warn); } .wa-line.bad span { color: var(--bad); font-weight: 600; } .wa-line.muted span { color: var(--text-3); }
.tk-wa { padding: var(--s2) var(--s3); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tk-wa .wa-line { margin: 0; }
/* Orders → COD to confirm: who confirmed them, as tappable boxes */
.cod-split { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); padding: var(--s3) var(--s4) var(--s2); }
.cod-split .ta-stat { box-shadow: none; min-height: 44px; cursor: pointer; }
.cod-split .ta-stat.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (max-width: 720px) { .cod-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); padding: var(--s2) var(--s3); } }

/* Inbox: the six kinds of chat as wrapping chips, all visible at once (no hidden sideways scroll). */
.pane.list .tabs.ib-chips { flex-wrap: wrap; overflow: visible; gap: 6px; border: 0; }
.pane.list .tabs.ib-chips button { padding: 0 12px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; margin: 0; font-size: 13px; background: var(--card); }
.pane.list .tabs.ib-chips button:hover { background: var(--hover); }
.pane.list .tabs.ib-chips button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pane.list .tabs.ib-chips button.on .n { background: rgba(255, 255, 255, .22); color: #fff; }
@media (max-width: 520px) { .pane.list .tabs.ib-chips button { min-height: 40px; font-size: 14px; } }

/* A tick or radio with a long label: the text wraps beside the box, never under it. */
label.row.tight { flex-wrap: nowrap; align-items: flex-start; }
label.row.tight > input[type=checkbox], label.row.tight > input[type=radio] { flex: none; margin-top: 3px; }

/* ---- Team board (board.mjs, behind Settings → Team board) ---- */
.bd { display: flex; flex-direction: column; gap: var(--s4); }
.bd-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s3); }
.bd-hi { font-size: 20px; }
#bd-sum { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; }
.bd-pill { font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--muted-bg); color: var(--text-2); border: 1px solid var(--line); }
.bd-pill.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.bd-pill.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.bd-ppl { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s3); padding: var(--s3) var(--s4) var(--s4); }
.bd-p { display: flex; gap: var(--s3); align-items: flex-start; }
.bd-p > div { display: flex; flex-direction: column; min-width: 0; }
.bd-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); }
.bd-cat { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--s2); align-items: center; text-align: left; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.bd-cat:hover { background: var(--hover); }
.bd-cat .icon { grid-row: span 2; color: var(--text-2); }
.bd-cl { font-family: var(--display); font-weight: 600; color: var(--brand-text); }
.bd-cn { font-size: 12.5px; color: var(--text-3); }
.bd-cn em { color: var(--bad); font-style: normal; font-weight: 600; }
.bd-cat.on { border-top-color: var(--wa); background: var(--selected); box-shadow: var(--shadow); }
.bd-cat.on .icon { color: var(--focus); }
.bd-cat.own { border-top-color: var(--warn-edge); }
.bd-hint { margin: 0; }
.bd-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.bd-lane { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.bd-lane h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.bd-lane h3 span { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 0 7px; font-size: 11.5px; }
.bd-lane.working h3 { color: var(--info); } .bd-lane.done h3 { color: var(--ok); }
.bd-cards { display: flex; flex-direction: column; gap: var(--s2); max-height: 64vh; overflow-y: auto; }
.bd-card { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
button.bd-card:hover { border-color: var(--focus); }
.bd-card.late { border-left-color: var(--bad-edge); }
.bd-card.done { cursor: default; border-left-color: var(--ok-line); }
.bd-ct { display: flex; justify-content: space-between; gap: var(--s2); align-items: baseline; }
.bd-ct b { font-size: 13.5px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.bd-due { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.bd-due.late { color: var(--bad); font-weight: 600; }
.bd-cs { font-size: 12.5px; color: var(--text-2); display: flex; gap: 4px; align-items: center; }
.bd-cs.bad { color: var(--bad); }
.bd-cf { display: flex; gap: 6px; align-items: center; }
.bd-cf .iconbtn { margin-left: auto; width: 30px; height: 30px; }
.bd-empty { font-size: 12.5px; color: var(--text-3); padding: 10px 4px; }
.bd-job { display: flex; flex-direction: column; gap: var(--s4); }
.bd-callbox { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.bd-no { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--brand-text); margin-right: auto; }
.bd-say { background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.bd-say b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--info); margin-bottom: 2px; }
.bd-order { display: flex; gap: var(--s3); align-items: flex-start; }
.bd-hist { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); border-left: 2px solid var(--line-strong); padding-left: var(--s3); }
.bd-hist h3 { font-size: 13px; color: var(--text); }
.bd-hist b { color: var(--text); font-weight: 600; }
.bd-pack { display: flex; flex-direction: column; gap: 6px; }
.bd-pack label { display: flex; gap: var(--s3); align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; }
.bd-pack img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.bd-pack input { width: 20px; height: 20px; }
@media (max-width: 900px) { .bd-cols { grid-template-columns: minmax(0, 1fr); } .bd-cards { max-height: none; } }
/* board job panel: why → customer → what to do → timeline; the Tasks panel below keeps assign / Done / reply */
.bd-status { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.bd-why { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--r); padding: 12px 14px; }
.bd-why h3, .bd-do h3, .bd-story h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin-bottom: 4px; display: flex; gap: 8px; align-items: baseline; }
.bd-why p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.bd-cust { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.bd-cust .bad { color: var(--bad); }
.bd-do { display: flex; flex-direction: column; gap: var(--s3); background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--wa); border-radius: var(--r); padding: 12px 14px; }
.bd-do > div { display: flex; flex-direction: column; gap: var(--s3); }
.bd-say summary { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--info); font-weight: 600; cursor: pointer; }
.bd-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s2); }
.bd-r { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.bd-r:hover { border-color: var(--focus); background: var(--hover); }
.bd-r b { font-size: 14px; } .bd-r small { font-size: 12px; color: var(--text-3); }
.bd-r.g b { color: var(--ok); } .bd-r.r b { color: var(--bad); }
.bd-r:disabled { opacity: .5; cursor: wait; }
.bd-story { display: flex; flex-direction: column; gap: var(--s2); }
.bd-tl { list-style: none; margin: 0; padding: 12px 12px 4px; display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.bd-tl li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; }
.bd-tl li::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 0; width: 2px; background: var(--line-strong); }
.bd-tl li.last::before { display: none; }
.bd-tl li.old { display: none; }
.bd-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin: 4px 0 0 5px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--text-3); }
.bd-tb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bd-th { display: flex; gap: 8px; align-items: baseline; }
.bd-tw { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.bd-tt { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.bd-tx { font-size: 13.5px; overflow-wrap: anywhere; color: var(--text); }
.bd-tl li.cu .bd-dot { border-color: var(--wa); background: var(--wa); } .bd-tl li.cu .bd-tw { color: var(--ok); }
.bd-tl li.cu .bd-tx { background: var(--wa-soft); border-radius: 8px; padding: 6px 10px; justify-self: start; }
.bd-tl li.bo .bd-dot { border-color: var(--info); } .bd-tl li.bo .bd-tw { color: var(--info); }
.bd-tl li.al .bd-dot { border-color: var(--warn-edge); background: var(--warn-bg); } .bd-tl li.al .bd-tw { color: var(--warn); }
.bd-tl li.co .bd-dot { border-color: var(--brand-text); } .bd-tl li.co .bd-tw { color: var(--brand-text); }
.bd-tl li.sh .bd-dot { border-color: var(--text-3); background: var(--text-3); }
.bd-tl li.te .bd-dot { border-color: var(--focus); background: var(--focus); } .bd-tl li.te .bd-tw { color: var(--focus); }
.bd-tl li.last .bd-dot { box-shadow: 0 0 0 4px var(--selected); }
.bd-more .tk-d > .row.tight:first-child, .bd-more .tk-ds, .bd-more .tk-wa, .bd-more .tk-actions { display: none; }

/* WhatsApp desk (behind the board switch): drawn like WhatsApp Web so the team knows it on sight */
.wa-desk { --w-green: #00a884; --w-teal: #008069; --w-out: #d9fdd3; --w-wall: #efeae2; --w-panel: #f0f2f5; --w-ink: #111b21; --w-sub: #54656f; --w-line: #e9edef; --w-tick: #53bdeb; color: var(--w-ink); }
.wa-desk .pane { border-right-color: var(--w-line); }
.wa-desk .pane.list { background: #fff; }
.wa-desk .w-lhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px 6px; }
.wa-desk .w-lhead h2 { margin: 0; font-size: 22px; font-weight: 700; }
.wa-desk .w-late { font-size: 12.5px; font-weight: 600; color: #d0312d; }
.wa-desk .w-search { padding: 4px 12px 8px; }
.wa-desk .w-search label { display: flex; align-items: center; gap: 10px; background: var(--w-panel); border-radius: 8px; padding: 0 12px; color: var(--w-sub); }
.wa-desk .w-search input { border: 0; background: transparent; padding: 9px 0; box-shadow: none; font-size: 14px; flex: 1; min-width: 0; outline: none; }
.wa-desk .w-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 8px; } /* wraps: a hidden sideways scroll hid "Bot" (2 Nov 2026) */
.wa-desk .w-chips button { white-space: nowrap; border: 0; background: var(--w-panel); color: var(--w-sub); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; cursor: pointer; }
.wa-desk .w-chips button b { font-weight: 600; margin-left: 2px; }
.wa-desk .w-chips button.on { background: #d9fdd3; color: #005c4b; }
.wa-desk .w-split { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 16px 8px; font-size: 12.5px; color: var(--w-sub); }
.wa-desk .w-split:empty { display: none; }
.wa-desk .w-split span { display: inline-flex; align-items: center; gap: 4px; }
.wa-desk .chatlist { border-top: 1px solid var(--w-line); }
.wa-desk .w-chat { display: flex; gap: 12px; padding: 0 0 0 12px; text-decoration: none; color: inherit; cursor: pointer; }
.wa-desk .w-chat:hover { background: #f5f6f6; text-decoration: none; } .wa-desk .w-chat.on { background: var(--w-panel); }
.wa-desk .w-av { width: 49px; height: 49px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 17px; margin: 9px 0; }
.wa-desk .w-chead .w-av { width: 40px; height: 40px; font-size: 15px; margin: 0; }
.wa-desk .w-body { flex: 1; min-width: 0; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--w-line); display: flex; flex-direction: column; gap: 2px; }
.wa-desk .w-l1, .wa-desk .w-l2 { display: flex; align-items: center; gap: 8px; }
.wa-desk .w-name { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-desk .w-time { font-size: 12px; color: var(--w-sub); white-space: nowrap; } .wa-desk .w-time.un { color: #00785a; font-weight: 600; }
.wa-desk .w-last { flex: 1; min-width: 0; font-size: 14px; color: var(--w-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-desk .w-last .w-ticks { color: var(--w-tick); vertical-align: -1px; margin-right: 3px; }
.wa-desk .w-typing { color: #1daa61; font-style: normal; }
.wa-desk .w-un { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #00785a; color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.wa-desk .w-l3 { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--w-sub); min-width: 0; margin-top: 2px; }
.wa-desk .w-l3 b { color: var(--w-teal); font-weight: 600; white-space: nowrap; }
.wa-desk .w-l3.late b, .wa-desk .w-l3.late .w-wait, .wa-desk .w-l3.late svg { color: #d0312d; }
.wa-desk .w-l3.me b { color: #027eb5; }
.wa-desk .w-whyt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-desk .w-wait { white-space: nowrap; font-weight: 600; }
.wa-desk .w-chead { background: var(--w-panel); border-bottom: 0; min-height: 59px; padding: 8px 16px; }
.wa-desk .w-cname { font-size: 16px; font-weight: 500; } .wa-desk .w-csub { font-size: 13px; color: var(--w-sub); }
.wa-desk .w-wall { background-color: var(--w-wall); background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 18px 18px; padding: 16px 7%; gap: 2px; }
.wa-desk .w-day { align-self: center; background: #fff; color: var(--w-sub); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; margin: 10px 0 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-desk .w-row { display: flex; } .wa-desk .w-row.out { justify-content: flex-end; }
.wa-desk .w-msg { position: relative; max-width: min(65%, 560px); padding: 6px 7px 8px 9px; border-radius: 7.5px; font-size: 14.2px; line-height: 19px; box-shadow: 0 1px .5px rgba(11,20,26,.13); margin-top: 2px; word-wrap: break-word; }
.wa-desk .w-msg.first { margin-top: 10px; }
.wa-desk .w-msg.in { background: #fff; } .wa-desk .w-msg.out { background: var(--w-out); }
.wa-desk .w-msg.in.first { border-top-left-radius: 0; } .wa-desk .w-msg.out.first { border-top-right-radius: 0; }
.wa-desk .w-msg.in.first::before, .wa-desk .w-msg.out.first::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.wa-desk .w-msg.in.first::before { left: -8px; background: #fff; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.wa-desk .w-msg.out.first::before { right: -8px; background: var(--w-out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-desk .w-who { font-size: 12.8px; font-weight: 600; color: var(--w-teal); margin-bottom: 2px; } .wa-desk .w-msg.team .w-who { color: #027eb5; }
.wa-desk .w-tx { white-space: pre-wrap; }
.wa-desk .w-meta { float: right; margin: 6px 0 -5px 10px; font-size: 11px; color: var(--w-sub); display: inline-flex; align-items: center; gap: 3px; position: relative; top: 4px; }
.wa-desk .w-meta .w-ticks { color: var(--w-tick); }
.wa-desk .w-msg img, .wa-desk .w-msg video { max-width: 280px; border-radius: 6px; display: block; margin-bottom: 4px; }
.wa-desk .w-cards { display: flex; gap: 6px; overflow-x: auto; margin: 2px 0; }
.wa-desk .w-card { width: 150px; flex: none; background: #fff; border-radius: 6px; overflow: hidden; font-size: 12.5px; border: 1px solid var(--w-line); }
.wa-desk .w-card img { width: 100%; height: 110px; object-fit: cover; max-width: none; border-radius: 0; margin: 0; }
.wa-desk .w-card div { padding: 6px 8px; display: flex; flex-direction: column; } .wa-desk .w-card span { color: var(--w-sub); }
.wa-desk .w-ph { width: 120px; }
.wa-desk .w-btns { display: flex; flex-wrap: wrap; gap: 3px; max-width: min(65%, 560px); justify-content: flex-end; margin-top: 2px; }
.wa-desk .w-row.in .w-btns { justify-content: flex-start; }
.wa-desk .w-btns span { background: #fff; color: #027eb5; border-radius: 7.5px; padding: 8px 14px; font-size: 14px; flex: 1 1 auto; text-align: center; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-desk .composer { background: var(--w-panel); border-top: 0; padding: 8px 16px 10px; }
.wa-desk .w-bar { display: flex; align-items: flex-end; gap: 8px; }
.wa-desk .w-bar textarea { flex: 1; border: 0; border-radius: 8px; background: #fff; padding: 10px 12px; font-size: 15px; min-height: 42px; max-height: 160px; resize: none; box-shadow: none; }
.wa-desk .w-send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--w-green); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.wa-desk .w-send:disabled { opacity: .6; }
.wa-desk .wa-sorted[hidden] { display: none; }
.wa-desk .wa-sorted { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--w-line); background: #fff; }
.wa-desk .wa-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.wa-desk .wa-quick .chip { white-space: nowrap; cursor: pointer; background: #fff; border-color: var(--w-line); }
.wa-desk .pane.info { background: var(--w-panel); }
.wa-desk .wa-side { display: flex; flex-direction: column; gap: var(--s3); overflow-y: auto; padding: var(--s4); min-height: 0; }
.wa-desk .wa-side .bd-tl { max-height: none; }
.wa-desk .wa-side .bd-story h3 { flex-wrap: wrap; }
.wa-desk .chat-head .btn.small { white-space: nowrap; }
.wa-desk .w-chead .grow { flex: 1; min-width: 0; }
.wa-desk .w-cname, .wa-desk .w-csub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .wa-desk .w-chead { padding: 8px 10px; gap: 8px; }
  .wa-desk .w-chead .w-av { width: 34px; height: 34px; font-size: 13px; }
  .wa-desk .w-long { display: none; } .wa-desk .w-short { display: inline; }
  .wa-desk .w-wall { padding: 12px 4%; }
  .wa-desk .w-msg { max-width: 85%; }
}
.wa-desk .w-short { display: none; }
.wa-desk .w-chips { gap: 6px; } .wa-desk .w-chips button { padding: 6px 11px; }
.wa-desk .w-search { display: flex; gap: 8px; align-items: center; } .wa-desk .w-search label { flex: 1; min-width: 0; }
.wa-desk .w-search select { width: auto; border: 0; background: var(--w-panel); border-radius: 8px; padding: 8px 6px; font-size: 13px; color: var(--w-sub); max-width: 104px; }
.wa-desk .w-chips button.dim { opacity: .45; }
.wa-desk .w-found { padding: 8px 16px; font-size: 12.5px; color: var(--w-teal); background: #f7fdf5; border-bottom: 1px solid var(--w-line); }
.wa-desk .w-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.wa-desk .w-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 5px; white-space: nowrap; }
.wa-desk .w-tag.bad { background: #fde8e8; color: #c62828; } .wa-desk .w-tag.warn { background: #fff3d6; color: #9a6200; }
.wa-desk .w-tag.ok { background: #d9fdd3; color: #0a7b52; } .wa-desk .w-tag.info { background: #e7f3fd; color: #0b6aa2; }
.wa-desk .w-tag.mute { background: var(--w-panel); color: var(--w-sub); } .wa-desk .w-tag.ig { background: #fce7f3; color: #b0237a; }
.wa-desk .w-tag.me { background: #e7f3fd; color: #027eb5; } .wa-desk .w-tag.lane { background: #111b21; color: #fff; }
.wa-desk .w-wait { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--w-sub); margin-left: auto; } .wa-desk .w-wait.late { color: #c62828; }
.wa-desk .w-body > .w-whyt { font-size: 12.5px; color: var(--w-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.bd .bd-search { min-width: 220px; } .bd .bd-urg { align-self: flex-start; margin-top: 2px; } .bd .bd-card .wa-line { margin-top: 2px; }

/* Owner dashboard on Home (dashboard.mjs, with the Team board switch on) */
#dash { display: flex; flex-direction: column; gap: var(--s4); }
.dash-risk .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .dash-risk .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-chips { gap: 6px; margin-bottom: var(--s3); }
.dash-chips .chip { text-decoration: none; } .dash-chips .chip.warn { border-color: var(--warn-edge); } .dash-chips .chip.bad { border-color: var(--bad-edge); color: var(--bad); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th, .dash-table td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.dash-table thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--text-3); }
.dash-table tbody th { font-weight: 600; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fn { display: flex; flex-direction: column; gap: 2px; }
.fn-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 14px; }
.fn-row:hover { background: var(--hover); text-decoration: none; }
.fn-bar { height: 8px; background: var(--sunken); border-radius: 4px; overflow: hidden; }
.fn-bar i { display: block; height: 100%; background: var(--prepaid); border-radius: 4px; }
.fn-n { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; } .fn-n .muted { font-weight: 400; font-size: 12px; }
.dash-sub { margin: var(--s4) 0 var(--s2); }
.dash-rto { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s2); }
.dash-rto a { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none; }
.dash-rto a:hover { background: var(--hover); }
.dash-rto b { font-family: var(--display); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .fn-row { grid-template-columns: minmax(0, 1fr) auto; } .fn-bar { grid-column: 1 / -1; grid-row: 2; } .dash-table th, .dash-table td { padding: 8px 6px; } }
.wk-dlg { max-width: 640px; width: calc(100% - 32px); border: 0; border-radius: var(--r-lg); padding: var(--s4); background: #fff; color: #1d2939; }
.wk-dlg::backdrop { background: rgba(0,0,0,.4); } .wk-body { max-height: 70vh; overflow: auto; margin-top: var(--s3); }
.dash-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dash-scroll .dash-table { min-width: 420px; }
.dash-money { margin: var(--s2) 0 0; font-size: 13px; color: var(--text-2); } .dash-money a { color: var(--bad); font-weight: 600; }
.dash-why { list-style: none; margin: 0; padding: 0; font-size: 14px; } .dash-why li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); } .dash-why li:first-child { border-top: 0; } .dash-why b { font-variant-numeric: tabular-nums; }
.dash-rto a.bad b { color: var(--bad); }
.dash-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); margin-bottom: var(--s4); }
.dash-links a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none; }
.dash-links a:hover { background: var(--hover); }
.dash-sends form { display: flex; flex-direction: column; gap: 6px; } .dash-sends label > b, .dash-sends label > span { display: block; }
.dash-sends input[type=email], .dash-sends input[type=tel] { flex: 1; min-width: 0; }
.dash-pre { white-space: pre-wrap; font: 13px/1.5 system-ui, sans-serif; margin: 0; }
@media (max-width: 900px) { .dash-risk .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.wa-desk .w-ch { padding: 0 12px 6px; } .wa-desk .w-ch .seg { width: 100%; } .wa-desk .w-ch .seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.dash-fresh { margin: 0; font-size: 12px; color: var(--text-3); } .dash-fresh .dash-old { color: var(--warn); font-weight: 600; } .dash-fresh .icon { vertical-align: -2px; }

/* 31 Oct: tighter desk. Tags and why on one line; extra customer detail folds; one-line notes. */
.wa-desk .w-tags { flex-wrap: nowrap; overflow: hidden; }
.wa-desk .w-tags > * { flex: none; }
.wa-desk .w-tags > .w-whyt { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--w-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 0 2px; }
.wa-more { margin-top: var(--s2); }
.wa-more > summary { cursor: pointer; font-size: 13px; color: var(--text-2); padding: 8px 0; }
.wa-more[open] > summary { margin-bottom: var(--s2); }
.wa-more > * + * { margin-top: var(--s3); }
.composer .w-oneline { padding: 8px 12px; }

.bd-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.bd-card > .bd-cs:not(.bad) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bd-cn, .bd-empty { color: var(--text-2); }
/* Phones: buttons big enough for a thumb */
@media (pointer: coarse) {
  .btn.small, .seg button, .wa-desk .w-chips button, .bd-cf .iconbtn { min-height: 44px; }
  .bd-cf .iconbtn { min-width: 44px; }
}
@media (max-width: 900px) { .bd-cols { grid-template-columns: minmax(0, 1fr); } }
.dash-tabs { display: flex; gap: 4px; padding: var(--s2) var(--s3) 0; border-bottom: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.dash-tabs button { white-space: nowrap; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--text-2); padding: 10px 12px; min-height: 44px; cursor: pointer; }
.dash-tabs button.on { border-bottom-color: var(--focus); color: #14532d; font-weight: 600; }
.dash-box { overflow: hidden; }
.dash-body > .card { border: 0; box-shadow: none; margin: 0; border-radius: 0; }
.dash-body > .todo, .dash-body > .grid { padding: var(--s4); }
/* Owner Home with the Team board switch on (31 Oct 2026): decisions beside the team's day */
.ot { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4); align-items: stretch; }
.ot > .card { margin: 0; display: flex; flex-direction: column; }
.ot-you .dn li > .btn { min-width: 112px; }
.ot-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.ot-tiles .tile { min-height: 92px; padding: var(--s3); }
.ot-tiles .tile .tv { font-size: 24px; }
.ot-ppl { width: 100%; margin-top: var(--s3); }
.ot-team .dash-chips { margin-top: var(--s3); }
.ot-team .note { margin-top: var(--s3); display: block; }
.dn li.dn-group { display: block; padding: 0; }
.dn-group > details > summary { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; cursor: pointer; list-style: none; }
.dn-group > details > summary::-webkit-details-marker { display: none; }
.dn-group > details[open] > summary .btn:not(.primary) { display: none; }
.dn-group > details > .dn { margin: 0 0 var(--s2) 46px; border-left: 2px solid var(--line); padding-left: var(--s3); }
@media (max-width: 1100px) { .ot { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .ot-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dn-group > details > .dn { margin-left: 0; } .dn-group summary .btn.primary { display: none; } }
.bd-card:hover { border-color: var(--focus); } .bd-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bd-cf .bd-mv { margin-left: 6px; } .bd-cf .iconbtn + .bd-mv { margin-left: 4px; } .bd-cf > .bd-mv:only-child, .bd-cf .tiny + .bd-mv { margin-left: auto; }
.mail-boxes { margin: 12px 12px 4px; flex-wrap: wrap; }

/* Team board, List layout (31 Oct 2026): one list per kind of job, each job one row */
.bd-list { display: flex; flex-direction: column; gap: var(--s4); }
.bd-sec { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.bd-sec h3 { margin: 0; padding: 10px var(--s4); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); display: flex; gap: 6px; align-items: center; background: var(--page); border-bottom: 1px solid var(--line); }
.bd-sec h3 span { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 0 7px; font-size: 11.5px; }
.bd-donesec > summary { list-style: none; cursor: pointer; } .bd-donesec > summary::-webkit-details-marker { display: none; }
.bd-donesec:not([open]) h3 { border-bottom: 0; }
.bd-list .bd-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t f" "s f" "w f"; column-gap: var(--s4); row-gap: 2px; align-items: center; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px var(--s4); }
.bd-list .bd-card:last-child { border-bottom: 0; }
.bd-list .bd-card.late { border-left-color: var(--bad-edge); }
.bd-list .bd-card:hover { background: var(--hover); border-color: transparent; border-bottom-color: var(--line); }
.bd-list .bd-card > .bd-ct { grid-area: t; justify-content: flex-start; gap: var(--s3); }
.bd-list .bd-card > .bd-ct b { font-size: 15px; }
.bd-list .bd-card > .bd-cs { grid-area: s; font-size: 13.5px; }
.bd-list .bd-card > .wa-line, .bd-list .bd-card > .w-line { grid-area: w; }
.bd-list .bd-card > .bd-cf { grid-area: f; justify-content: flex-end; }
.bd-list .bd-card > .bd-cf .iconbtn { margin-left: 0; }
.bd-list .bd-card.done { grid-template-areas: "t f" "s f"; }
@media (max-width: 700px) { .bd-list .bd-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "s" "w" "f"; } .bd-list .bd-card > .bd-cf { justify-content: flex-start; margin-top: 6px; } }
/* WhatsApp desk tag filter (31 Oct 2026) */
.wa-desk .w-tf { display: flex; gap: 6px; flex-wrap: wrap; }
.wa-desk .w-tf button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--w-line, #e9edef); background: #fff; color: #3b4a54; font: inherit; font-size: 12.5px; font-weight: 500; padding: 0 10px; min-height: 32px; border-radius: 999px; cursor: pointer; }
.wa-desk .w-tf button b { font-weight: 600; }
.wa-desk .w-tf button i { width: 8px; height: 8px; border-radius: 50%; background: #8696a0; }
.wa-desk .w-tf .bad i { background: #e07a7a; } .wa-desk .w-tf .warn i { background: #e5b443; } .wa-desk .w-tf .ok i { background: #1f9d55; } .wa-desk .w-tf .info i { background: #2563eb; } .wa-desk .w-tf .ig i { background: #db2777; }
.wa-desk .w-tf button.on { border-color: #3b4a54; background: #f0f2f5; color: #111b21; }
.wa-desk .w-tf .bad.on { background: #fde8e8; color: #9f1d1d; border-color: #e07a7a; } .wa-desk .w-tf .warn.on { background: #fff3d6; color: #7a4d00; border-color: #e5b443; } .wa-desk .w-tf .ok.on { background: #d9fdd3; color: #0a5c3e; border-color: #1f9d55; } .wa-desk .w-tf .info.on { background: #e7f3fd; color: #0b5a8a; border-color: #2563eb; }
@media (pointer: coarse) { .wa-desk .w-tf button { min-height: 44px; } }

.w-older{display:block;margin:10px auto 16px;min-height:40px}
.bd-give{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:13px;margin-left:auto}.bd-give select,.w-give{min-height:36px;max-width:150px;font:inherit;font-size:13px;border:1px solid var(--line,#e6e8ec);border-radius:8px;background:#fff;padding:0 8px}
.wa-desk .w-search input[type=date]{flex:none;width:118px;border:0;background:var(--w-panel);border-radius:8px;padding:7px 6px;font-size:13px;color:var(--w-sub);min-height:36px}
@media (max-width: 600px){.wa-desk .w-search select{max-width:72px}.wa-desk .w-search input[type=date]{width:40px;padding:7px 4px;color:transparent}.wa-desk .w-search input[type=date]:valid{width:108px;color:var(--w-sub)}}

/* Insights → What to grow */
.grow-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.grow-lever header { gap: 8px; }
.grow-lever h3 { display: flex; align-items: center; gap: 8px; }
.grow-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--info-bg); color: var(--info); font-size: 12px; font-weight: 700; flex: none; }
.grow-lever p { margin: 0; }
.grow-img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.grow-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 600px) { .grow-grid { grid-template-columns: 1fr; } }

/* Insights → Growth lab */
.gl-views { margin-bottom: 4px; max-width: 100%; overflow-x: auto; }
.gl-conf { flex: none; }
.gl-week { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.gl-moves { display: grid; }
.gl-move { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: start; }
.gl-move:first-child { border-top: 0; }
.gl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 18px 12px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.gl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gl-mh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.gl-lbl { display: block; margin-top: 10px; font: 600 11px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.gl-steps { margin: 2px 0 0; padding-left: 18px; }
.gl-steps li { margin: 2px 0; }
.gl-foot { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 10px; }
.gl-move p { margin: 2px 0 0; }
.gl-k { width: 26px; height: 26px; border-radius: 8px; background: var(--sunken); display: grid; place-items: center; font: 600 13px var(--display); color: var(--brand-text); }
.gl-r { display: grid; justify-items: end; gap: 6px; }
.gl-val { font: 600 15px var(--display); color: var(--brand-text); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.gl-val small { display: block; font: 400 12px var(--sans); color: var(--text-3); }
.gl-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.gl-key span { display: inline-flex; gap: 6px; align-items: center; }
.gl-key i, .gl-pair i { display: inline-block; height: 8px; border-radius: 4px; }
.gl-key i { width: 14px; }
.gl-key i.a, .gl-pair i.a { background: var(--line-strong); }
.gl-key i.b, .gl-pair i.b { background: var(--primary); }
.gl-mix { display: grid; grid-template-columns: 120px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 13px; }
.gl-mix small { display: block; color: var(--text-3); font-size: 12px; }
.gl-pair { display: grid; gap: 3px; }
.gl-pair div { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.gl-pair i { display: block; height: 100%; }
.gl-dx { display: flex; gap: 6px; flex-wrap: wrap; }
.gl-dx button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--text-2); display: grid; text-align: left; min-width: 92px; }
.gl-dx button b { font: 600 16px var(--display); color: var(--brand-text); }
.gl-dx button.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.gl-fam { display: flex; gap: 6px; flex-wrap: wrap; }
.gl-fam button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--text-2); }
.gl-fam button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.gl-t tr.click { cursor: pointer; }
.gl-pn { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.gl-pn img, .gl-ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--sunken); }
.gl-pn b { display: block; line-height: 1.3; font-size: 13px; }
.gl-pn small { color: var(--text-3); font-size: 12px; }
.gl-tag { display: inline-flex; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; background: var(--muted-bg); color: var(--text-2); }
.gl-star, .gl-new { background: var(--ok-bg); color: var(--ok); }
.gl-out, .gl-seen { background: var(--bad-bg); color: var(--bad); }
.gl-push { background: var(--info-bg); color: var(--info); }
.gl-warn { background: var(--warn-bg); color: var(--warn); }
.gl-faded { background: #f3eefc; color: #5b3d99; }
.gl-red { color: var(--bad); font-weight: 600; }
.gl-tail { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.gl-tail div { background: var(--sunken); border-radius: 8px; padding: 10px 12px; }
.gl-tail b { display: block; font: 600 18px var(--display); color: var(--brand-text); }
.gl-tail span { font-size: 12px; color: var(--text-3); }
.gl-hero { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.gl-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gl-stats div { background: var(--sunken); border-radius: 8px; padding: 8px 10px; display: grid; }
.gl-stats span { font-size: 12px; color: var(--text-3); }
.gl-stats b { font: 600 16px var(--display); color: var(--brand-text); font-variant-numeric: tabular-nums; }
.gl-act { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.gl-data { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; }
@media (max-width: 1000px) { .gl-week { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .gl-move { padding: 12px 14px; }
  .gl-foot { flex-wrap: wrap; }
  .gl-val small { display: inline; margin-left: 4px; }
  .gl-mix { grid-template-columns: 92px minmax(0, 1fr) 64px; }
  .gl-hs { display: none; }
}

/* Growth lab: Ads */
.ad-head, .ad-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 150px 112px 150px 90px 16px; gap: 14px; align-items: center; padding: 10px 18px; }
.ad-head { border-bottom: 1px solid var(--line); padding-top: 0; }
.ad-row { border-top: 1px solid var(--line); cursor: pointer; min-height: 64px; }
.ad-row:first-child { border-top: 0; }
.ad-row:hover { background: var(--hover); }
.ad-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ad-off { color: var(--text-2); }
.ad-off .ad-bars rect:not([fill]) { fill: var(--line-strong); }
.ad-st { display: grid; gap: 3px; justify-items: start; }
.ad-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.ad-name { min-width: 0; }
.ad-id { font: 500 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-3); }
.ad-copy { width: 28px; height: 28px; vertical-align: middle; }
.ad-to { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-bars { display: block; overflow: visible; }
.ad-bars rect:not([fill]) { fill: var(--primary); }
.ad-bars rect.ad-today { opacity: .45; }
.ad-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.ad-v { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.ad-good { background: var(--ok-bg); color: var(--ok); }
.ad-bad { background: var(--bad-bg); color: var(--bad); }
.ad-same { background: var(--muted-bg); color: var(--text-2); }
.ad-up { color: var(--ok); } .ad-down { color: var(--bad); }
.ad-go { color: var(--text-3); }
.ad-small { padding: 10px 18px; border-top: 1px solid var(--line); } .ad-small summary { cursor: pointer; color: var(--text-2); }
.ad-how { margin: 0 18px 18px; }
.ad-h { margin: 0 0 6px; font: 600 13px var(--sans); }
.ad-table { width: 100%; border-collapse: collapse; }
.ad-table th { text-align: left; font-weight: 600; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ad-table th.num, .ad-table td.num { text-align: right; }
.ad-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 1100px) { .ad-head, .ad-row { grid-template-columns: 120px minmax(0, 1fr) 104px 140px 16px; } .ad-spark, .ad-later, .ad-head span:nth-child(3), .ad-head span:nth-child(6) { display: none; } }
@media (max-width: 600px) {
  .ad-head { display: none; }
  .ad-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px; }
  .ad-st { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; }
  .ad-name { grid-column: 1 / -1; } .ad-to { white-space: normal; }
  .ad-w, .ad-rate { text-align: left; } .ad-go { display: none; }
}

/* Growth lab: one rhythm for every card. 20px card padding, 16px between cards, headers with a rule below. */
.gl-views { margin-bottom: var(--s1); }
.gl-views button { white-space: nowrap; }
.grid.kpis.gl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gl-kpis .kpi { padding: var(--s5); gap: 4px; }
.gl-card > header { display: block; padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.gl-card > header h3 { margin: 0; font: 600 16px/1.35 var(--display); color: var(--brand-text); }
.gl-card > header .sub { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; }
.gl-card > .body, .gl-card > div.body { padding: var(--s5); }
.gl-card > .body.stack { gap: var(--s4); }
.gl-week { gap: var(--s5); }
.gl-legend { padding: var(--s3) var(--s5); gap: 8px 20px; background: var(--sunken); font-size: 12px; }
.gl-move { gap: var(--s4); padding: var(--s5); }
.gl-move b { font-size: 15px; line-height: 1.4; }
.gl-move p { margin: 4px 0 0; line-height: 1.55; color: var(--text-2); }
.gl-mh { gap: var(--s3); }
.gl-lbl { margin-top: var(--s4); margin-bottom: 2px; }
.gl-steps { margin: 4px 0 0; padding-left: 20px; color: var(--text-2); line-height: 1.55; }
.gl-steps li { margin: 3px 0; padding-left: 2px; }
.gl-foot { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px dashed var(--line); align-items: center; }
.gl-k { width: 28px; height: 28px; }
.gl-mix { padding: 6px 0; }
.gl-key { padding-bottom: 4px; }
.gl-dx { gap: 8px; } .gl-dx button { padding: 8px 12px; min-width: 104px; gap: 2px; }
.gl-fam { gap: 8px; }
.ad-head { background: var(--sunken); padding: 10px var(--s5); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ad-row { padding: var(--s4) var(--s5); gap: var(--s4); }
.ad-name b { font-size: 14px; }
.ad-to { margin-top: 4px; }
.ad-w, .ad-rate, .ad-later { line-height: 1.5; }
.ad-small { padding: var(--s3) var(--s5); }
.ad-how { margin: var(--s4) var(--s5) var(--s5); line-height: 1.55; }
.drawer .dbody .stack { gap: var(--s5); }
.ad-h { margin-bottom: var(--s2); }

@media (max-width: 600px) {
  /* phone: the three figures as one tidy list, label left, number right */
  .grid.kpis.gl-kpis { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
  .gl-kpis .kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "d v"; align-items: center; column-gap: var(--s3); padding: var(--s3) var(--s4); border: 0; border-radius: 0; box-shadow: none; }
  .gl-kpis .kpi + .kpi { border-top: 1px solid var(--line); }
  .gl-kpis .kpi .label { grid-area: l; } .gl-kpis .kpi .delta { grid-area: d; } .gl-kpis .kpi .value { grid-area: v; font-size: 22px; }
  .gl-card > header { padding: var(--s4); }
  .gl-legend, .gl-move { padding-left: var(--s4); padding-right: var(--s4); }
  .gl-move { grid-template-columns: minmax(0, 1fr); } .gl-k { display: none; }
  .ad-row { padding: var(--s4); }
  .ad-how { margin: var(--s3) var(--s4) var(--s4); }
}

/* Team board: chats under the Message tile */
.bd-list .bd-chat { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--s4); text-align: left; text-decoration: none; color: inherit; grid-template-areas: none; }
.bd-list .bd-chat .grow { flex: 1 1 0; min-width: 0; overflow: hidden; display: grid; gap: 3px; justify-items: start; text-align: left; }
.bd-ct { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bd-late { color: var(--bad); font-size: 12px; font-weight: 600; }
.bd-who { white-space: nowrap; flex: none; } .bd-chat > .btn { flex: none; }
.w-toboard { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px 0; color: var(--text-2); text-decoration: none; font-weight: 500; }
.w-toboard:hover { color: var(--text); }
@media (max-width: 600px) { .bd-chat { flex-wrap: wrap; } .bd-chat .btn { margin-left: auto; } }

/* Packing camera (pack.mjs): the camera, the scan box, today's clips; Find a video as cards */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s5); align-items: start; }
.pk-main { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.pk-mode { align-self: flex-start; }
.pk-mode button { padding: 8px 16px; font-size: 14px; }
.pk-stage { position: relative; background: #111; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; }
.pk-stage video { display: none; }
.pk-stage canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.pk-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); color: #e5e7eb; text-align: center; padding: var(--s5); background: #111; }
.pk-off[hidden] { display: none; }
.pk-off .muted { color: #cbd5e1; }
.pk-state { font-size: 17px; min-height: 28px; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.pk-rec { width: 12px; height: 12px; border-radius: 50%; background: #d92d20; animation: pk-blink 1.2s infinite; }
@keyframes pk-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pk-rec { animation: none; } }
.pk-scan { display: flex; gap: var(--s2); }
.pk-scan input { flex: 1; min-width: 0; min-height: 48px; font-size: 17px; }
.pk-scan .btn { min-height: 48px; padding: 0 var(--s5); }
.pk-opts { color: var(--text-2); }
.pk-sel { width: auto; min-width: 180px; }
.pk-chk { display: inline-flex; align-items: center; gap: 6px; }
.pk-chk input { width: auto; min-height: 0; }
.pk-today #pklist { max-height: 560px; overflow-y: auto; }
.pk-row { display: flex; align-items: center; gap: var(--s2); padding: 10px var(--s4); border-top: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 44px; }
.pk-row:hover { background: var(--hover); }
.pk-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.pk-clip { overflow: hidden; }
.pk-clip video { width: 100%; aspect-ratio: 16 / 9; background: #111; display: block; }
.pk-clip .body { padding: var(--s3) var(--s4) var(--s4); }
@media (max-width: 900px) {
  .pk-grid { grid-template-columns: 1fr; }
  .pk-scan .btn { padding: 0 var(--s4); }
}
.pk-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-row > .small { flex: none; margin-left: var(--s2); }

/* Shipments (2 Nov 2026): tiles from Shiprocket's status, the needs-action table, couriers' failed pickups */
.sh-late { color: var(--bad); font-weight: 600; } .sh-warnt { color: var(--warn); font-weight: 600; }
.sh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.sh-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: inherit; cursor: pointer; min-height: 96px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.sh-tile .lbl { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.sh-tile .val { font-family: var(--display); font-size: 28px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sh-tile .sub { font-size: 12px; color: var(--text-3); }
.sh-tile.sh-bad { background: var(--bad-bg); border-color: var(--bad-line); } .sh-tile.sh-bad .lbl, .sh-tile.sh-bad .val { color: var(--bad); }
.sh-tile.sh-warn { background: var(--warn-bg); border-color: var(--warn-line); } .sh-tile.sh-warn .lbl, .sh-tile.sh-warn .val { color: var(--warn); }
.sh-tile.sh-ok { background: var(--ok-bg); border-color: var(--ok-line); } .sh-tile.sh-ok .lbl, .sh-tile.sh-ok .val { color: var(--ok); }
.sh-tile.on { outline: 2px solid var(--primary); outline-offset: 1px; }
.sh-tile:hover { box-shadow: var(--shadow-pop); }
.sh-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s4); }
.sh-bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; gap: 10px; align-items: center; width: 100%; padding: 6px 0; border: 0; background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: var(--text); min-height: 32px; }
.sh-bar .track { height: 10px; background: var(--muted-bg); border-radius: 4px; overflow: hidden; } .sh-bar .track i { display: block; height: 10px; background: var(--cod); border-radius: 0 4px 4px 0; }
.sh-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.sh-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s3); }
.sh-today b { display: block; font-family: var(--display); font-size: 22px; font-weight: 500; } .sh-today span { font-size: 12px; color: var(--text-3); }
#sh-filters select { min-height: 34px; margin-left: 4px; }
.sh-tabs { flex-wrap: wrap; overflow: visible; } /* all five lists visible on a phone, no hidden sideways scroll */
/* WhatsApp desk top (3 Nov 2026): search gets the whole row (it was squeezed to one letter by Sort and
   the date); Sort + date sit under it; lanes are one even row of tabs incl. All; tags wrap under. */
.wa-desk .w-search { flex-wrap: wrap; row-gap: 8px; }
.wa-desk .w-search label { flex: 1 1 100%; }
.wa-desk .w-search select, .wa-desk .w-search input[type=date] { flex: 1 1 0; max-width: none; width: auto; min-height: 36px; }
.wa-desk .w-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--w-line, #e9edef); }
.wa-desk .w-chips button { background: none; border-radius: 0; padding: 8px 2px 9px; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 1px; border-bottom: 3px solid transparent; margin-bottom: -1px; min-width: 0; }
.wa-desk .w-chips button b { margin: 0; font-size: 15px; color: #111b21; font-variant-numeric: tabular-nums; }
.wa-desk .w-chips button.on { background: none; color: #005c4b; border-bottom-color: #00a884; }
.wa-desk .w-chips button.on b { color: #005c4b; }
.wa-desk .w-chips button:hover { background: #f5f6f6; }
.wa-desk .w-tag.lane { background: #f0f2f5; color: #3b4a54; }
@media (max-width: 600px) { .wa-desk .w-search select { max-width: none; } .wa-desk .w-search input[type=date] { width: auto; } }
/* To call (3 Nov 2026): label + what to do + what they said, and a count per label on top. */
.tc-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.tc-sum .badge b { margin-left: 4px; }
.tc-what .badge { margin-bottom: 4px; }
.tc-do { font-weight: 600; color: var(--text); line-height: 1.4; }
.tc-said { color: var(--text-2); font-size: 13px; margin-top: 2px; line-height: 1.4; max-width: 60ch; }
table.tc td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
/* Page tabs wrap to a second line instead of hiding the last ones off the edge (Orders hid Delivered, Cancelled). */
.tabs { flex-wrap: wrap; overflow-x: visible; }
.wa-desk .w-mark { align-self: center; display: inline-flex; align-items: center; gap: 6px; background: #d9fdd3; color: #0a5c3e; font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 8px; margin: 8px 0; box-shadow: 0 1px .5px rgba(11,20,26,.13); max-width: 90%; }
/* Chat-list tags wrap instead of being cut off at the edge (3 Nov 2026); the "why" line keeps its ellipsis on its own line. */
.wa-desk .w-tags { flex-wrap: wrap; overflow: visible; }
.wa-desk .w-tags > .w-whyt { flex: 1 1 100%; margin: 0; }
.wa-desk .w-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Under the chat header: call done or not, and the team's last action (who, when). */
.wa-desk .w-status { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 8px; background: var(--w-panel); border-bottom: 1px solid rgba(11,20,26,.08); }
.wa-desk .w-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; max-width: 100%; overflow-wrap: anywhere; }
.wa-desk .w-st.ok { background: #d9fdd3; color: #0a5c3e; }
.wa-desk .w-st.warn { background: #fff0c2; color: #7a5200; }
.wa-desk .w-mark.warn { background: #fff0c2; color: #7a5200; }

/* 4 Nov 2026: tag row stays one line until "+N more" is tapped. */
.wa-desk .w-tf:not(.open) { flex-wrap: nowrap; overflow: hidden; }
.wa-desk .w-tf:not(.open) > button { flex: none; }
.wa-desk .w-tf button { white-space: nowrap; }
.wa-desk .w-tf button[hidden] { display: none; }
/* "All tags" when on = clearly picked (dark); More = a clear green button, not another tag. */
.wa-desk .w-tf .w-tf-all.on { background: #111b21; border-color: #111b21; color: #fff; }
.wa-desk .w-tf .w-tf-more { background: #e7f8f3; border-color: #b6e6d6; color: #005c4b; font-weight: 600; margin-left: auto; }
.wa-desk .w-tf .w-tf-more:hover { background: #d3f2e8; }
.wa-desk .w-tf.open .w-tf-more { margin-left: 0; }
/* Chat status: the "waiting for" chip leads and is bigger. */
.wa-desk .w-st.bad { background: #fde8e8; color: #9f1d1d; }
.wa-desk .w-st.mute { background: #f0f2f5; color: #54656f; }
.wa-desk .w-st-main { font-size: 13.5px; font-weight: 600; padding: 6px 12px; }

/* Shipments "Not shipped yet" tile (4 Nov 2026): the number opens Orders → To ship; each part opens its Orders tab. */
.sh-tile.sh-tile-split { cursor: default; }
.sh-tile-split .sh-tile-main { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.sh-tile-split .sub a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.sh-tile-split .sub a:hover, .sh-tile-split .sh-tile-main:hover .val { color: #005c4b; }

/* Return risk next to the name in the chat header (4 Nov 2026). */
.wa-desk .w-cname .w-risk { vertical-align: 2px; margin-left: 6px; font-size: 11.5px; }
.call-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .call-note { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); } .call-note > div { min-width: 0; } .call-note p { white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* Insights → What people say */
.cv-head { margin-bottom: var(--s3); gap: var(--s3); flex-wrap: wrap; }
.moodbar { position: relative; height: 8px; border-radius: 999px; background: var(--muted-bg); overflow: hidden; display: flex; justify-content: space-between; min-width: 60px; }
.moodbar i { display: block; height: 100%; }
.moodbar i.h { background: var(--ok); }
.moodbar i.u { background: var(--bad); }
.moodbar i.m { background: var(--line-strong); }
.cv-list { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.cv-q { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); min-width: 0; }
.cv-q:last-child { border-bottom: 0; }
.cv-text { margin-top: 4px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.kpi .small-value { font-size: 18px; line-height: 1.3; }
.cv-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.cv-chhead h2 { margin: 2px 0 4px; }
.cv-chhead .body { gap: var(--s3); flex-wrap: wrap; }
.cv-group { text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.cv-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
@media (max-width: 520px) { .cv-chs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cv-ch { padding: 10px; } }
.cv-switch { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s3); }
.cv-ch { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.cv-ch:hover { border-color: var(--line-strong); background: var(--hover); }
.cv-ch.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.cv-ch.quiet { background: var(--sunken); }
.cv-ch.quiet b { color: var(--text-2); }
.cv-n { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cv-n small { font-size: 12px; font-weight: 400; color: var(--text-2); }
.cv-how { line-height: 1.35; }
.cv-ch .dot, .cv-chhead .dot { display: inline-block; background: var(--line-strong); }
.cv-ch .dot.ok, .cv-chhead .dot.ok { background: var(--ok); }
.cv-ch .dot.off, .cv-chhead .dot.off { background: var(--warn-edge); }
.cv-t tr.click { cursor: pointer; }
.cv-t tr.click:hover td { background: var(--hover); }
.cv-t tr.click.on td { background: var(--selected); }
.cv-t tr.click .icon { opacity: .45; vertical-align: -1px; }
.cv-q .row.wrap { flex-wrap: wrap; }
.cv-open { margin-left: auto; }
.cv-notes { margin-top: var(--s3); }
.cv-notes div { margin-top: 4px; }
.cv-ch > .row { flex-wrap: nowrap; align-items: flex-start; gap: 8px; } .cv-ch > .row .dot { margin-top: 6px; }

.cv-t { table-layout: fixed; }
.cv-t th.num, .cv-t td.num { text-align: right; padding-right: var(--s5, 24px); }
.cv-t col.c-name { width: 24%; } .cv-t col.c-n { width: 10%; } .cv-t col.c-mood { width: 24%; } .cv-t col.c-worst { width: 22%; }
.cv-t td { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .cv-t { table-layout: auto; min-width: 560px; } }
.cv-switch .chip { white-space: nowrap; }
.cv-busy { opacity: .55; pointer-events: none; transition: opacity .15s; }
#cvSaid, .cv-crumbs { scroll-margin-top: 76px; }
#cvSaid { min-height: calc(100vh - 96px); } /* a short list (one mood picked) mustn't pull the page back up */
.wa-orders { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: var(--r); }
.wa-orders .chip { white-space: nowrap; }
.wa-orders .bad-text { color: var(--bad); font-weight: 600; } .wa-orders .chip.on .bad-text { color: #fff; }

/* Home: Refill soon */
.low-stock .ls-list li { gap: var(--s3); }
.low-stock .ls-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--line); }
.low-stock .ls-t { display: flex; flex-direction: column; min-width: 0; }
.low-stock .ls-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.low-stock .ls-t span { font-size: 13px; color: var(--text-2); }
.low-stock .badge { flex: none; }
.low-stock .ls-more summary { cursor: pointer; color: var(--text-2); font-size: 13px; padding: var(--s2) 0; }
@media (max-width: 560px) {
  .low-stock > header { flex-direction: column; align-items: flex-start; gap: var(--s1); }
  .low-stock .ls-list li { display: grid; grid-template-columns: 40px 1fr auto; column-gap: var(--s3); row-gap: var(--s2); align-items: center; }
  .low-stock .ls-img { grid-row: span 2; align-self: start; }
  .low-stock .ls-t { grid-column: 2 / 4; }
  .low-stock .ls-list li .badge { justify-self: start; }
}
