/* Seller Portal styles (extracted from community/seller.html — RS3-85) */
/* RS4-109: light Material 3 palette sampled from the POS app
   (RetailServices/lib/theme/app_theme.dart — ColorScheme.fromSeed(0xFF1E6FE8, light)).
   Rule: no colour literal outside this :root block. Every previous
   rgba(255,255,255,…) white-alpha overlay is now a surface/border/muted token,
   because those alphas are invisible on a light background. */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  /* brand */
  --primary:#1E6FE8;
  --primary-weak:rgba(30,111,232,.10);
  --primary-line:rgba(30,111,232,.30);
  --on-primary:#FFFFFF;
  /* surfaces */
  --bg:#F6F7FB;
  --surface:#FFFFFF;
  --surface-2:#F1F3F8;
  --surface-3:#E9EDF4;
  --scrim:rgba(16,24,40,.45);
  --drag-shadow:rgba(16,24,40,.28);
  /* lines */
  --border:#E3E6EB;
  --border-strong:#D3D9E2;
  /* text */
  --text:#12161F;
  --text-2:#3A4150;
  --muted:#5B6472;
  --muted-2:#6B7483;
  /* state */
  --ok:#067647;      --ok-bg:#ECFDF3;      --ok-line:rgba(6,118,71,.25);       --ok-solid:#10B981;
  --danger:#B42318;  --danger-bg:#FEF3F2;  --danger-line:rgba(180,35,24,.25);  --danger-solid:#DC2626; --on-danger:#FFFFFF;
  --warn:#B54708;    --warn-bg:#FFFAEB;    --warn-line:rgba(181,71,8,.25);     --warn-solid:#F59E0B;
  --info:#175CD3;    --info-bg:#EFF8FF;    --info-line:rgba(23,92,211,.25);
  /* RS4-113: data-viz + kanban status accents. SVG presentation attributes and
     Google Maps cannot resolve var(), so the scripts read these through
     cssVar() instead of writing their own literals. */
  --chart-sales:#2563EB;
  --chart-cogs:#DC2626;
  --chart-profit:#059669;
  --status-confirmed:#2563EB;
  --status-processing:#B54708;
  --status-ready:#067647;
  --status-closed:#5B6472;
  --accent-teal:#0D9488;
  --accent-indigo:#4F46E5;
  --radius:12px;
}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;display:flex}
/* RS4-110: no sidebar. The dashboard is the only menu, so the topbar carries
   the store identity and a way back to the landing page. */
.topbar-brand{font-size:15px;line-height:1;display:inline-flex;align-items:center}
.topbar-brand .icsvg{width:18px;height:18px;color:var(--primary)}
.topbar-store{display:inline-flex;align-items:center;gap:8px;flex:1;min-width:0}
.topbar-store .topbar-title{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-back{display:inline-flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--border-strong);color:var(--text-2);font:inherit;font-size:13px;font-weight:700;padding:7px 12px;border-radius:10px;cursor:pointer;transition:.15s}
.topbar-back:hover{background:var(--primary-weak);border-color:var(--primary-line);color:var(--primary)}
.topbar-back[hidden]{display:none}
.topbar-crumb{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
/* RS4-123: the two cross-cutting slides get topbar buttons, not menu items. */
.topbar-icon{position:relative;width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border:1px solid var(--border-strong);background:var(--surface);border-radius:10px;cursor:pointer;color:var(--text-2);transition:.15s}
.topbar-icon:hover{background:var(--primary-weak);border-color:var(--primary-line);color:var(--primary)}
.topbar-icon .icsvg{width:19px;height:19px}
.topbar-icon .count{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;line-height:18px;border-radius:9px;background:var(--danger-solid);color:var(--on-danger);font-size:10px;font-weight:800;text-align:center;padding:0 5px}
.topbar-icon .count[hidden]{display:none}
@media(max-width:600px){.topbar-crumb{display:none}}
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:56px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 20px;gap:12px}
.topbar-title{font-size:16px;font-weight:800;flex:1}
.topbar-refresh{background:var(--surface);border:1px solid var(--border-strong);color:var(--muted);font-size:12px;padding:5px 12px;border-radius:8px;cursor:pointer}
.topbar-refresh:hover{background:var(--surface-2);color:var(--text)}
/* RS4-118: the deck shell. Two stacked slides; the front one carries #content,
   so all thirteen load*() functions keep writing into "the page" without
   knowing that slides exist. */
.viewport{flex:1;position:relative;overflow:hidden;background:var(--bg)}
/* A slide layer MUST be opaque: a transparent one leaves both pages legible at
   once, which reads as a cross-dissolve of two screens instead of a push. */
.layer{position:absolute;inset:0;overflow-y:auto;padding:24px;background:var(--bg);will-change:transform,opacity;backface-visibility:hidden}
.layer.front{z-index:2;box-shadow:0 0 0 1px rgba(16,24,40,.04),-12px 0 22px -16px rgba(16,24,40,.22)}
.layer.leaving{z-index:1;pointer-events:none}
.layer.enter-fwd{animation:enterFromRight 240ms cubic-bezier(.16,1,.3,1) both}
.layer.exit-fwd{animation:exitToLeft 180ms cubic-bezier(.4,0,.2,1) both}
.layer.enter-back{animation:enterFromLeft 200ms cubic-bezier(.16,1,.3,1) both}
.layer.exit-back{animation:exitToRight 180ms cubic-bezier(.4,0,.2,1) both}
/* The arriving slide never fades - it is opaque and slides over. Only the leaver fades. */
@keyframes enterFromRight{from{transform:translateX(52px) scale(.997)}to{transform:translateX(0) scale(1)}}
@keyframes exitToLeft{from{transform:translateX(0) scale(1);opacity:1}to{transform:translateX(-32px) scale(.972);opacity:0}}
@keyframes enterFromLeft{from{transform:translateX(-36px) scale(.997)}to{transform:translateX(0) scale(1)}}
@keyframes exitToRight{from{transform:translateX(0) scale(1);opacity:1}to{transform:translateX(52px) scale(.99);opacity:0}}
@media (prefers-reduced-motion:reduce){
  .layer.enter-fwd,.layer.exit-fwd,.layer.enter-back,.layer.exit-back{animation:none}
  .deck-card{animation:none!important}
}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* RS4-120: the deck cards. Icon tile, name, one fact, at most one badge - a
   card is a door, not a dashboard. `soon` cards stay visible so the shape of
   the product is honest, but they are inert. */
.deck-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.deck-title{font-size:17px;font-weight:800}
.deck-sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.deck-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.deck-card{position:relative;display:flex;align-items:center;gap:14px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;font:inherit;color:inherit;cursor:pointer;min-height:96px;transition:transform .12s,border-color .12s,box-shadow .12s;animation:deckRise 200ms cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 22ms)}
.deck-card:hover{transform:translateY(-2px);border-color:var(--primary-line);box-shadow:0 10px 22px rgba(16,24,40,.09)}
.deck-card:active{transform:scale(.985)}
.deck-card.soon{opacity:.62;cursor:default}
.deck-card.soon:hover{transform:none;box-shadow:none;border-color:var(--border)}
.deck-tile{width:44px;height:44px;flex:0 0 44px;border-radius:12px;display:grid;place-items:center}
.deck-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.deck-nm{font-size:15.5px;font-weight:700}
.deck-fact{font-size:12.5px;color:var(--muted)}
.deck-go{color:var(--border-strong);font-size:17px;line-height:1}
.deck-badge{position:absolute;top:12px;right:12px;font-size:11px;font-weight:800;color:var(--on-danger);background:var(--danger-solid);border-radius:999px;min-width:19px;height:19px;line-height:19px;text-align:center;padding:0 6px}
.deck-chip,.deck-pill{font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;border-radius:6px;padding:3px 7px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.deck-pill{background:var(--warn-bg);color:var(--warn)}
@keyframes deckRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
/* RS4-121: report rows (a labelled bar per product) and the two-column
   Top items view. Same surface/border language as the cards. */
.rrow{margin-bottom:14px}
.rrow-top{display:flex;align-items:baseline;gap:12px}
.rrow-line{padding:7px 0;border-bottom:1px solid var(--border);margin-bottom:0}
.rrow-line:last-child{border-bottom:0}
.rrow-nm{flex:1;font-size:13.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rrow-v{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.rrow-meta{font-size:11.5px;color:var(--muted);margin-top:4px}
.rbar{height:8px;border-radius:6px;background:var(--surface-3);overflow:hidden}
.rbar i{display:block;height:100%;border-radius:6px;background:var(--primary)}
.report-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
@media(max-width:820px){.report-cols{grid-template-columns:1fr}}

@media(max-width:900px){.deck-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.deck-grid{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.deck-card{animation:none}}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:16px}
.card-title{font-size:14px;font-weight:700;margin-bottom:12px}
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}
@media(max-width:600px){.stats-grid{grid-template-columns:1fr}}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;text-align:center}
.stat-val{font-size:24px;font-weight:800;color:var(--text)}
.stat-label{font-size:11px;color:var(--muted);margin-top:4px;text-transform:uppercase;letter-spacing:.5px}
/* RS4-119: the board — five doors and one line of numbers, nothing else. The
   department cards it replaces were removed with the dashboard report blocks. */
.today{display:flex;align-items:center;gap:9px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;cursor:pointer;color:var(--text);margin-bottom:14px;transition:.15s}
.today:hover{border-color:var(--primary-line);background:var(--primary-weak)}
.today-k{font-size:10.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-right:2px}
.today-v{font-weight:800;font-variant-numeric:tabular-nums}
.today-l{color:var(--muted);font-size:12.5px;margin-left:-4px}
.today-sep{color:var(--border-strong)}
.today-go{margin-left:auto;color:var(--border-strong);font-size:17px;line-height:1}
.board{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.cat{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;font:inherit;color:inherit;cursor:pointer;min-height:150px;transition:transform .12s,border-color .12s,box-shadow .12s;animation:deckRise 200ms cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 22ms)}
.cat:hover{transform:translateY(-2px);border-color:var(--primary-line);box-shadow:0 10px 22px rgba(16,24,40,.09)}
.cat:active{transform:scale(.985)}
.cat-tile{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;font-size:21px}
.icsvg{width:24px;height:24px;display:block;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
/* the empty state used to carry an emoji; the icon is set by the scripts */
.empty-icon{display:flex;justify-content:center}
.empty-icon .icsvg{width:44px;height:44px;stroke-width:1.4;color:var(--muted)}
.cat-nm{font-size:17px;font-weight:800;letter-spacing:-.01em}
.cat-sub{font-size:12.5px;color:var(--muted);line-height:1.4}
.cat-go{position:absolute;right:14px;bottom:12px;color:var(--border-strong);font-size:17px;line-height:1}
.cat-badge{position:absolute;top:14px;right:14px;font-size:11px;font-weight:800;color:var(--on-danger);background:var(--danger-solid);border-radius:999px;min-width:20px;height:20px;line-height:20px;text-align:center;padding:0 6px}
/* the five group tints; the icon set itself lands in RS4-122 */
.tint-blue{background:var(--primary-weak);color:var(--primary)}
.tint-green{background:var(--ok-bg);color:var(--ok)}
.tint-amber{background:var(--warn-bg);color:var(--warn)}
.tint-purple{background:var(--info-bg);color:var(--accent-indigo)}
.tint-slate{background:var(--surface-3);color:var(--muted)}
@media(max-width:900px){.board{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.board{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.cat{animation:none}}
.an-presets{display:flex;gap:6px;flex-wrap:wrap}
.an-preset{background:var(--surface);border:1px solid var(--border-strong);color:var(--muted);font-size:11px;font-weight:700;padding:5px 10px;border-radius:999px;cursor:pointer}
.an-preset:hover{color:var(--text)}
.an-preset.active{background:var(--primary-weak);border-color:var(--primary-line);color:var(--primary)}
.an-group{display:inline-flex;gap:6px;margin-left:auto}
.an-range{display:flex;align-items:center;gap:8px;margin:12px 0;flex-wrap:wrap}
.an-range .form-label{margin:0}
.an-range .form-input{width:auto;min-width:140px;padding:7px 10px}
.an-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
@media(max-width:600px){.an-totals{grid-template-columns:1fr}}
.an-total{background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:10px;text-align:center}
.an-total-val{font-size:16px;font-weight:800;color:var(--text)}
.an-total-label{font-size:10px;color:var(--muted);margin-top:2px;text-transform:uppercase;letter-spacing:.4px}
.an-chart{overflow-x:auto}
.an-chart svg{display:block;width:100%;height:auto;min-width:560px}
.an-legend{display:flex;gap:14px;flex-wrap:wrap;margin:2px 0 10px;font-size:11px;color:var(--muted)}
.an-leg{display:inline-flex;align-items:center;gap:5px}
.an-leg i{width:10px;height:10px;border-radius:3px;display:inline-block}
.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 24px}
.info-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}
.info-label{color:var(--muted)}
.info-value{color:var(--text);font-weight:600}
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;padding:10px 12px;border-bottom:1px solid var(--border)}
td{padding:10px 12px;font-size:13px;border-bottom:1px solid var(--border)}
.form-group{margin-bottom:14px}
.form-label{display:block;font-size:12px;font-weight:600;color:var(--muted);margin-bottom:4px}
.form-input{width:100%;padding:10px 12px;background:var(--surface);border:1px solid var(--border-strong);border-radius:8px;color:var(--text);font-size:14px;outline:none}
.form-input:focus{border-color:var(--primary)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.btn{padding:8px 16px;border-radius:12px;border:none;font-size:13px;font-weight:700;cursor:pointer;transition:.15s}
.btn-primary{background:var(--primary);color:var(--on-primary)}
.btn-primary:hover{opacity:.85}
.btn-sm{padding:4px 10px;font-size:11px;border-radius:8px}
.btn-ghost{background:var(--surface);color:var(--muted);border:1px solid var(--border-strong)}
.btn-ghost:hover{background:var(--surface-2);color:var(--text)}
.btn-danger{background:var(--danger-bg);color:var(--danger);border:1px solid var(--danger-line)}
.btn-danger:hover{background:var(--danger-solid);color:var(--on-danger);border-color:var(--danger-solid)}
select.form-input{-webkit-appearance:none;appearance:none;cursor:pointer}
select.form-input,select.form-input option{background:var(--surface);color:var(--text)}
select.form-input option:disabled{color:var(--muted-2)}
.badge{font-size:10px;font-weight:700;padding:3px 8px;border-radius:8px;text-transform:uppercase;letter-spacing:.3px}
.badge-blue{background:var(--info-bg);color:var(--info)}
.badge-yellow{background:var(--warn-bg);color:var(--warn)}
.badge-green{background:var(--ok-bg);color:var(--ok)}
.badge-gray{background:var(--surface-2);color:var(--muted)}
.badge-red{background:var(--danger-bg);color:var(--danger)}
.pay-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
@media(max-width:600px){.pay-grid{grid-template-columns:1fr}}
.pay-card{padding:18px;border-radius:var(--radius);text-align:center}
.pay-card-label{font-size:11px;font-weight:700;text-transform:uppercase;margin-bottom:6px;color:var(--muted)}
.pay-card-amount{font-size:20px;font-weight:800}
.pay-card-count{font-size:12px;margin-top:4px;color:var(--muted-2)}
.pay-cash{background:var(--ok-bg);border:1px solid var(--ok-line)}
.pay-ep{background:rgba(20,184,166,.08);border:1px solid rgba(20,184,166,.28)}
.pay-card-cc{background:rgba(99,102,241,.08);border:1px solid rgba(99,102,241,.28)}
.grand-card{background:var(--primary-weak);border:1px solid var(--primary-line);border-radius:var(--radius);padding:20px;text-align:center}
.grand-amount{font-size:28px;font-weight:800;color:var(--text)}
.grand-sub{font-size:13px;color:var(--muted);margin-top:4px}
.modal-overlay{display:none;position:fixed;inset:0;background:var(--scrim);z-index:200;align-items:center;justify-content:center}
.modal-overlay.open{display:flex}
.modal{background:var(--surface);border:1px solid var(--border-strong);border-radius:16px;padding:24px;min-width:360px;max-width:90vw;max-height:80vh;overflow-y:auto}
.modal-wide{min-width:560px;max-width:780px}
.otabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:14px}
.otab{padding:8px 14px;font-size:13px;font-weight:700;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent}
.otab.active{color:var(--text);border-bottom-color:var(--primary)}
.order-map{width:100%;height:380px;border-radius:10px;background:var(--surface-2);border:1px solid var(--border)}
.detail-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.detail-title{font-size:16px;font-weight:800}
.chat-list{height:calc(100vh - 340px);min-height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:6px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px}
.chat-input{display:flex;gap:8px;margin-top:10px}
.chat-input .form-input{flex:1}
.msg{max-width:72%;padding:8px 12px;border-radius:14px;font-size:13px;word-break:break-word}
.msg.mine{align-self:flex-end;background:var(--primary);color:var(--on-primary);border-bottom-right-radius:4px}
.msg.theirs{align-self:flex-start;background:var(--surface-2);color:var(--text);border-bottom-left-radius:4px}
.msg-sender{font-size:10px;font-weight:700;opacity:.6;margin-bottom:2px}
.msg-time{font-size:10px;opacity:.55;margin-top:3px;text-align:right}
.msg img{max-width:200px;max-height:200px;border-radius:8px;display:block}
.msg audio{max-width:220px;height:32px}
.comp-img{width:120px;height:120px;border-radius:12px;background:var(--surface-3) center/cover no-repeat;border:1px solid var(--border-strong)}
.comp-banner{width:100%;max-width:420px;height:140px}
@keyframes riderPulse{0%{box-shadow:0 0 0 0 rgba(245,158,11,.55)}70%{box-shadow:0 0 0 16px rgba(245,158,11,0)}100%{box-shadow:0 0 0 0 rgba(245,158,11,0)}}
.modal-title{font-size:16px;font-weight:800;margin-bottom:16px}
.empty-state{text-align:center;padding:40px;color:var(--muted-2)}
.empty-icon{font-size:40px;margin-bottom:10px}
.spinner{width:24px;height:24px;border:2px solid var(--border-strong);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite;margin:40px auto}
.spinner-sm{width:14px;height:14px;border:2px solid var(--primary-line);border-top-color:var(--on-primary);border-radius:50%;animation:spin .7s linear infinite;display:inline-block;vertical-align:-2px;margin-right:6px}
@keyframes spin{to{transform:rotate(360deg)}}
.flex-between{display:flex;justify-content:space-between;align-items:center}
.text-muted{font-size:11px;color:var(--muted-2)}
.order-row{display:flex;align-items:center;justify-content:space-between;padding:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;margin-bottom:8px;gap:12px;flex-wrap:wrap}
.order-num{font-weight:800;font-size:14px;min-width:60px}
.order-cust{color:var(--muted);font-size:12px;flex:1}
.order-amt{font-weight:700;color:var(--text);white-space:nowrap}
/* Kanban */
/* RS4-128: the board fills the slide instead of guessing a chrome height.
   `height:calc(100vh - 168px)` was tuned for the desktop page and resolved to
   less than its own min-height inside the SPS webview panel, where the panel
   header and the 24px slide padding are not part of that 168px. `100%` is the
   slide's content box, and the slide itself scrolls if min-height overflows. */
.kanban-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;height:100%;min-height:420px}
@media(max-width:900px){.kanban-grid{grid-template-columns:repeat(2,1fr);height:auto;min-height:0}}
@media(max-width:500px){.kanban-grid{grid-template-columns:1fr;height:auto;min-height:0}}
.kanban-col{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden;transition:background .15s}
.kanban-col.drag-over{background:var(--primary-weak);border-color:var(--primary-line)}
.kanban-col-header{padding:10px 14px;display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;background:var(--surface-3)}
.kanban-count{font-size:11px;color:var(--muted);background:var(--surface);padding:2px 8px;border-radius:10px;border:1px solid var(--border)}
.kanban-body{flex:1;overflow-y:auto;padding:8px}
.kanban-card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:10px 12px;margin-bottom:6px;cursor:grab;transition:.15s;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.kanban-card:hover{border-color:var(--border-strong);background:var(--surface-2)}
.kanban-card.dragging{opacity:.4}
/* RS4-128: the card that follows the finger during a long-press drag. */
.kanban-ghost{position:fixed;z-index:9999;margin:0;pointer-events:none;opacity:.95;transform:rotate(1.5deg);box-shadow:0 12px 26px var(--drag-shadow)}
.kanban-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.kanban-order-num{font-weight:800;font-size:13px}
.kanban-amt{font-size:13px;font-weight:700;color:var(--text)}
.kanban-msg-badge{font-size:10px;font-weight:800;color:var(--on-danger);background:var(--danger-solid);border-radius:8px;padding:2px 7px;margin:0 4px;white-space:nowrap;box-shadow:0 0 0 2px rgba(239,68,68,.25)}
.kanban-card-mid{font-size:11px;color:var(--muted);margin-bottom:6px}
.kanban-card-bot{display:flex;justify-content:space-between;align-items:center}
.kanban-empty{padding:24px 8px;text-align:center;font-size:11px;color:var(--muted-2);border:1px dashed var(--border-strong);border-radius:8px}
.rider-icon{font-size:15px;cursor:pointer;opacity:.4;transition:.15s;margin:0 4px}
.rider-icon:hover{opacity:1}
.rider-icon.rider-ask{opacity:.35}
.rider-icon.rider-req{opacity:.8;color:var(--warn-solid)}
.rider-icon.rider-has{opacity:1;color:var(--ok-solid)}
.kanban-items{margin-top:8px;padding-top:8px;border-top:1px solid var(--border)}
.item-row{display:flex;align-items:center;padding:3px 0;font-size:12px;gap:6px}
.item-qty{color:var(--muted);min-width:24px}
.item-name{flex:1;color:var(--text-2)}
.item-price{color:var(--muted-2);white-space:nowrap}
.item-row.item-ready .item-name{color:var(--ok);font-weight:600}
.item-row.item-ready .item-qty{color:var(--ok);font-weight:600}
.item-sort-handle{color:var(--muted-2);cursor:grab;font-size:14px;width:24px;text-align:center}
tr.drag-over-row{background:var(--primary-weak);box-shadow:inset 0 2px 0 var(--primary)}
tr.dragging-row{opacity:.4}
.btn-ghost:disabled{opacity:.35;cursor:not-allowed}

/* RS4 Seller CRM — My Customers + correspondence timeline */
.crm-layout{display:flex;height:calc(100vh - 158px);min-height:420px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--surface)}
.crm-sidebar{width:300px;min-width:230px;display:flex;flex-direction:column;background:var(--surface-2);border-right:1px solid var(--border)}
.crm-sidebar-head{padding:12px;border-bottom:1px solid var(--border)}
.crm-sidebar-title{font-size:12px;font-weight:800;color:var(--muted);margin-bottom:8px}
.crm-search{width:100%}
.crm-customer-list{flex:1;overflow-y:auto}
.crm-customer{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;border-left:2px solid transparent}
.crm-customer:hover{background:var(--surface)}
.crm-customer-active{background:var(--primary-weak);border-left-color:var(--primary)}
.crm-customer-avatar{width:36px;height:36px;border-radius:50%;background:var(--surface-3);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--text-2);flex-shrink:0;font-size:14px}
.crm-customer-meta{min-width:0;flex:1}
.crm-customer-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-customer-count{color:var(--muted-2);font-weight:400}
.crm-customer-preview{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.crm-detail{flex:1;display:flex;flex-direction:column;min-width:0}
.crm-detail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-bottom:1px solid var(--border)}
.crm-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--border-strong);margin-right:6px;vertical-align:middle}
.crm-dot-on{background:var(--ok-solid);box-shadow:0 0 0 3px var(--ok-line)}
.crm-dot-away{background:var(--warn-solid);box-shadow:0 0 0 3px var(--warn-line)}
.crm-thread{display:flex;flex-direction:column;gap:10px;flex:1;min-height:200px;overflow-y:auto;padding:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);margin:12px}
@media(max-width:760px){.crm-layout{flex-direction:column;height:auto}.crm-sidebar{width:100%;border-right:none;border-bottom:1px solid var(--border);max-height:220px}.crm-detail{min-height:420px}}
.crm-row{display:flex;flex-direction:column;max-width:78%}
.crm-row.crm-mine{align-self:flex-end;align-items:flex-end}
.crm-row.crm-theirs{align-self:flex-start;align-items:flex-start}
.crm-bubble{padding:9px 13px;border-radius:14px;font-size:13px;word-break:break-word;background:var(--surface);color:var(--text);border:1px solid var(--border)}
.crm-mine .crm-bubble{background:var(--primary);border-color:var(--primary);color:var(--on-primary);border-bottom-right-radius:4px}
.crm-theirs .crm-bubble{border-bottom-left-radius:4px}
.crm-time{font-size:10px;opacity:.6;margin-top:3px}
.crm-bubble img{max-width:200px;max-height:200px;border-radius:8px;display:block}
.crm-bubble audio{max-width:230px;height:32px}
.crm-sys{display:flex;justify-content:space-between;gap:10px;align-items:center;text-align:center;color:var(--muted);font-size:11px;padding:4px 0}
.crm-sys span:first-child{flex:1;background:var(--surface-3);border-radius:10px;padding:6px 10px}
.crm-composer{display:flex;gap:8px;align-items:center}
.crm-composer .form-input{flex:1}
.btn-danger{background:var(--danger-solid);color:var(--on-danger);border:1px solid var(--danger-solid)}
.btn-danger:hover{opacity:.9}

/* Unread indicators — CRM */
/* RS4-110: this badge used to sit on the sidebar's My Customers row; it now
   rides in the topbar so an unread customer message is still visible from any
   page. RS4-111 may also mirror the count on the dashboard card. */
.nav-badge{font-size:10px;font-weight:800;color:var(--on-danger);background:var(--danger-solid);border-radius:999px;min-width:18px;height:18px;line-height:18px;text-align:center;padding:0 5px;box-shadow:0 0 0 2px rgba(239,68,68,.25)}
.nav-badge[hidden]{display:none}
.crm-unread-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--danger-solid);margin-left:6px;vertical-align:middle;box-shadow:0 0 0 3px var(--danger-line)}
