@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ══════════════════════════════════════════════════════════════════════════
   Sellerio Design System v2 — calm, borderless-with-elevation, single-accent.
   Rebuilt from the "glass UI" version to match the 2026 SaaS benchmark
   (Linear, Stripe, Notion, Vercel, Mercury): flat neutral surfaces, soft
   shadow-based elevation instead of blur, one restrained accent color,
   generous whitespace, quieter functional color. No backdrop-filter
   anywhere in this file — besides matching that reference set, it also
   permanently removes the Chrome repaint/blinking issue blur caused all
   session, since there is no more blur compositing to recompute on hover.
   Every class name below is unchanged from the old system on purpose —
   every page in the app already calls these selectors; only their values
   changed, so nothing elsewhere needs to be touched for this to take effect.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --accent: #1a6fff;
  --accent2: #0052e0;
  --accent-soft: rgba(26,111,255,0.10);
  --accent-softer: rgba(26,111,255,0.05);
  --green: #16a34a;
  --red: #e5372a;
  --orange: #d97706;
  --purple: #9333ea;
  --teal: #0891b2;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #8f8f97;
  --text-placeholder: #b4b4ba;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-card: #ffffff;
  --surface-input: #ffffff;
  --surface-opaque: #ffffff;
  --surface-sunken: #f6f7f9;
  --border: rgba(24,24,27,0.10);
  --border-strong: rgba(24,24,27,0.15);
  --sidebar-w: 260px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --r-2xl: 18px;
  /* Flat, border-first card system — depth comes from the 1px border above,
     not elevation. shadow-sm is deliberately near-invisible: at-rest cards
     should read as flat panels, not floating tiles. shadow-md gives just
     enough hover feedback to feel interactive without looking heavy.
     shadow-lg/xl stay real — those are reserved for things that actually
     float above the page (toasts, modals, the mobile sidebar drawer), which
     genuinely need a shadow to separate from the backdrop behind them. */
  --shadow-sm: none;
  --shadow-md: 0 2px 6px rgba(20,20,25,0.05);
  --shadow-lg: 0 6px 18px rgba(20,20,25,0.08), 0 2px 5px rgba(20,20,25,0.04);
  --shadow-xl: 0 16px 48px rgba(20,20,25,0.16), 0 4px 12px rgba(20,20,25,0.06);
  --body-bg: #f6f7f9;
  --scrollbar-thumb: rgba(0,0,0,0.16);
  --overlay-bg: rgba(15,15,18,0.44);
  /* Retained only so nothing referencing these old glass tokens breaks —
     all now resolve to plain white/transparent since blur is gone. */
  --glow-1: transparent; --glow-2: transparent; --glow-3: transparent;
  --glass-edge: var(--border); --glass-edge-strong: var(--border-strong);
  --glass-edge-soft: var(--border); --glass-edge-faint: transparent;
  --glass-inset: transparent; --glass-inset-strong: transparent;
}

/* ── Dark theme ──────────────────────────────────────────────────────────────
   True grey base (never pure black — avoids halation/eye fatigue on long
   sessions) with elevation built from stepped lightness: base → surface →
   surface-strong, each a few percent lighter than the last. */
:root[data-theme="dark"] {
  --accent: #4a92ff;
  --accent2: #6ba6ff;
  --accent-soft: rgba(74,146,255,0.18);
  --accent-softer: rgba(74,146,255,0.08);
  --green: #34d399;
  --red: #f87171;
  --orange: #fb923c;
  --purple: #c084fc;
  --teal: #22d3ee;
  --text-primary: #f4f4f5;
  --text-secondary: #c9c9ce;
  --text-muted: #8f8f97;
  --text-placeholder: #6c6c74;
  --surface: #1c1d21;
  --surface-strong: #202126;
  --surface-card: #1c1d21;
  --surface-input: #17181b;
  --surface-opaque: #1c1d21;
  --surface-sunken: #17181b;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --body-bg: #121216;
  --scrollbar-thumb: rgba(255,255,255,0.16);
  --overlay-bg: rgba(0,0,0,0.6);
  --glow-1: transparent; --glow-2: transparent; --glow-3: transparent;
  --glass-edge: var(--border); --glass-edge-strong: var(--border-strong);
  --glass-edge-soft: var(--border); --glass-edge-faint: transparent;
  --glass-inset: transparent; --glass-inset-strong: transparent;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --accent: #4a92ff; --accent2: #6ba6ff;
    --accent-soft: rgba(74,146,255,0.18); --accent-softer: rgba(74,146,255,0.08);
    --green: #34d399; --red: #f87171; --orange: #fb923c; --purple: #c084fc; --teal: #22d3ee;
    --text-primary: #f4f4f5; --text-secondary: #c9c9ce; --text-muted: #8f8f97; --text-placeholder: #6c6c74;
    --surface: #1c1d21; --surface-strong: #202126; --surface-card: #1c1d21; --surface-input: #17181b; --surface-opaque: #1c1d21; --surface-sunken: #17181b;
    --border: rgba(255,255,255,0.10); --border-strong: rgba(255,255,255,0.16);
    --body-bg: #121216;
    --scrollbar-thumb: rgba(255,255,255,0.16); --overlay-bg: rgba(0,0,0,0.6);
    --glow-1: transparent; --glow-2: transparent; --glow-3: transparent;
    --glass-edge: var(--border); --glass-edge-strong: var(--border-strong);
    --glass-edge-soft: var(--border); --glass-edge-faint: transparent;
    --glass-inset: transparent; --glass-inset-strong: transparent;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

/* Consistent, branded focus states — replaces inconsistent browser defaults
   across buttons/links/cards with one deliberate ring, matched to the
   accent color. Form inputs keep their own box-shadow focus style above,
   set separately since they need a tighter, inline ring rather than an
   offset outline. */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--body-bg);
  transition: background-color 0.25s ease;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img, svg { max-width: 100%; }

/* ── Surface system ──
   No blur anywhere. Depth comes from a solid surface + soft shadow, not
   translucency — this is the "borderless card" pattern: the boundary is
   implied by elevation and spacing rather than a heavy visible outline. */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
}
.glass-strong {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--r-xl);
}
.glass-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s;
}
.glass-card:hover { box-shadow: var(--shadow-md); }
.list-card {
  background: var(--surface-opaque);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  transition: box-shadow 0.15s;
}
.list-card:hover { box-shadow: var(--shadow-md); }
.kpi-card-flat {
  position: relative;
  background: var(--surface-opaque);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.kpi-card-flat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-card-flat.clickable { cursor: pointer; }
.kpi-card-flat.clickable.active-filter { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface-opaque)); }
/* Colored top accent bar — Monday.com-style widget treatment. Picks up
   automatically from whichever text-color class the value inside already
   uses, so no HTML changes are needed anywhere this card is used. */
.kpi-card-flat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--border);
}
.kpi-card-flat:has(.text-accent)::before { background: var(--accent); }
.kpi-card-flat:has(.text-red)::before     { background: var(--red); }
.kpi-card-flat:has(.text-green)::before   { background: var(--green); }
.kpi-card-flat:has(.text-orange)::before  { background: var(--orange); }
.kpi-card-flat:has(.text-purple)::before  { background: var(--purple); }
.kpi-card-flat:has(.text-teal)::before    { background: var(--teal); }

/* ── Stat tile — the small colored KPI blocks used in Live Orders / Order
   Counts widgets. Set the accent via style="--tile-color:#hex" (or a CSS
   var like var(--accent)) on the element. ── */
.stat-tile {
  position: relative; overflow: hidden;
  text-align: center; padding: 14px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--tile-color, var(--accent)) 8%, transparent);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--tile-color, var(--accent));
}
.stat-tile.clickable { cursor: pointer; }
.stat-tile.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-tile-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.stat-tile-value { font-size: 26px; font-weight: 800; color: var(--tile-color, var(--text-primary)); }

/* ── Layout ── */
.app-layout { min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 0 10px 16px;
  overflow-y: auto;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-logo-wrap {
  padding: 20px 12px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.sidebar-logo {
  font-size: 20px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.6px; line-height: 1;
}
.sidebar-logo-sub {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.1px; margin-top: 3px;
}

.nav-section-label {
  font-size: 12px; font-weight: 800; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.7px;
  padding: 14px 10px 5px;
}
.nav-section-label-collapsible {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; border-radius: var(--r-md);
  transition: color 0.12s;
}
.nav-section-label-collapsible:hover { color: var(--text-primary); }
.nav-section-chevron {
  display: flex; align-items: center; color: var(--text-muted);
  transition: transform 0.2s ease;
}
.nav-section-label-collapsible.collapsed .nav-section-chevron { transform: rotate(-90deg); }
.nav-section-items {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}
.nav-section-items.collapsed { grid-template-rows: 0fr; opacity: 0; }
.nav-section-items-inner {
  overflow: hidden; min-height: 0;
  display: flex; flex-direction: column; gap: 1px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-family: 'Inter', sans-serif;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.8; }
.nav-item:hover { color: var(--text-primary); background: var(--surface-sunken); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-footer-info { flex: 1; min-width: 0; }
.sidebar-footer-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer-role { font-size: 10px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; }
.sidebar-footer-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sidebar-footer-actions .btn-icon { width: 30px; height: 30px; }

.main-content { margin-left: var(--sidebar-w); padding: 22px 26px; min-height: 100vh; }

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
}
.topbar-title { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; line-height: 1; display: flex; align-items: center; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ── Mobile Header ── */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 56px;
  padding: 0 16px;
  align-items: center; justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-header-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.hamburger { background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 6px; border-radius: var(--r-sm); display: flex; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: var(--overlay-bg); z-index: 99; }

/* ── Persistent App Top Bar ── */
/* Time, theme toggle, notification bell, sign out — always in this order,
   always in the top-right. Lives ONCE as a sibling of every .page div
   (not fixed-position — it's normal in-flow content, so it scrolls away
   naturally with the rest of the page exactly like everything else does,
   rather than floating awkwardly on top of it). */
.app-top-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.app-top-bar-title { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top-bar-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; white-space: nowrap; margin-right: 4px; }
.app-top-bar-time { font-size: 14px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.app-top-bar-date { font-size: 9.5px; font-weight: 600; color: var(--text-muted); }
@media (max-width: 900px) {
  .app-top-bar { display: none; } /* mobile-header covers the same actions on small screens */
}

/* ── KPI Grid ── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-grid-6 { grid-template-columns: repeat(6, 1fr); }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
#orderCountsGrid { grid-template-columns: repeat(3, 1fr); }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; letter-spacing: -0.4px; }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 5px; font-weight: 500; }

/* ── Buttons ──
   One accent, used with restraint — solid primary, everything else quiet.
   No inset gradient/shine; flat fills read calmer and more "serious tool"
   than the glossy highlight the old system had. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; font-family: 'Inter', sans-serif;
  transition: background 0.14s, color 0.14s, border-color 0.14s, transform 0.08s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent2); }
.btn-ghost {
  background: var(--surface-sunken); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-strong); }
.btn-danger { background: rgba(229,55,42,0.08); color: var(--red); border: 1px solid rgba(229,55,42,0.18); }
.btn-danger:hover { background: rgba(229,55,42,0.14); }
.btn-success { background: rgba(22,163,74,0.08); color: var(--green); border: 1px solid rgba(22,163,74,0.18); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--r-sm); }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--r-sm); }
.btn-icon-round { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.w-full { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-input);
  border: 1px solid var(--border-strong);
  color: var(--text-primary); font-size: 13.5px;
  font-family: 'Inter', sans-serif; font-weight: 400;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input::placeholder { color: var(--text-placeholder); font-weight: 400; }
.form-select option { background: var(--surface); color: var(--text-primary); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-textarea.autogrow { resize: none; overflow: hidden; min-height: 60px; }
.char-count { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: none; float: right; }
.char-count.over-limit { color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 400; }

/* ── Card ── */
.card { padding: 20px; margin-bottom: 12px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.card-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.1px; min-width: 0; }

/* ── Table ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px 14px;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 400; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }

/* ── Badges — Monday.com-style status pills ──
   Bold, solid, saturated color fills with white text (readable in both
   light/dark themes without per-theme overrides), slightly rounded
   rectangles rather than full pills — matches the "status column" look
   Monday.com is known for, where color always carries real meaning
   (status/priority), not decoration. */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  color: #fff; letter-spacing: 0.1px;
}
.badge-blue   { background: rgba(87,155,252,0.92); }
.badge-green  { background: rgba(0,200,117,0.92); }
.badge-red    { background: rgba(226,68,92,0.92); }
.badge-orange { background: rgba(253,171,61,0.92); }
.badge-purple { background: rgba(162,93,220,0.92); }
.badge-gray   { background: rgba(128,128,128,0.92); }
.badge-teal   { background: rgba(3,127,76,0.92); }
.badge-gold   { background: rgba(255,203,0,0.92); color: #2b2b2b; }
/* Real marketplace brand colors — used for platform tags (Amazon/Flipkart/
   Meesho) so a platform is recognizable by color at a glance, matching each
   marketplace's own brand identity rather than a generic palette color. */
.badge-amazon   { background: rgba(255,153,0,0.92); }
.badge-flipkart { background: rgba(40,116,240,0.92); }
.badge-meesho   { background: rgba(88,10,70,0.92); }

/* ── Board — grouped rows with a colored left accent bar, Monday.com's
   signature "board view" pattern. Set the bar color per group via
   style="--group-color: #hex" (or one of the .board-group-{color}
   shorthands below) on the .board-group element. ── */
.board-group {
  border-radius: 10px;
  margin-bottom: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-left: 2px solid var(--group-color, var(--accent));
}
.board-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  font-weight: 800; font-size: 13px;
  background: color-mix(in srgb, var(--group-color, var(--accent)) 8%, transparent);
}
.board-group-header .board-group-count {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: var(--surface-strong); padding: 2px 8px; border-radius: 99px;
}
.board-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  transition: background 0.1s;
}
.board-row:hover { background: rgba(0,0,0,0.018); }
:root[data-theme="dark"] .board-row:hover,
:root[data-theme="auto"] .board-row:hover { background: rgba(255,255,255,0.03); }
.board-row-title { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-group-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 12.5px; }

/* Shorthand group-color classes matching the badge palette above */
.board-group-blue   { --group-color: #579bfc; }
.board-group-green  { --group-color: #00c875; }
.board-group-red    { --group-color: #e2445c; }
.board-group-orange { --group-color: #fdab3d; }
.board-group-purple { --group-color: #a25ddc; }
.board-group-gray   { --group-color: #808080; }
.board-group-teal   { --group-color: #037f4c; }
.board-group-gold   { --group-color: #ffcb00; }

/* ── Priority ── */
.priority-urgent { color: var(--red); font-weight: 600; }
.priority-high { color: var(--orange); font-weight: 600; }
.priority-medium { color: #a16207; }
.priority-low { color: var(--text-muted); }

/* ── Avatar ── */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px; color: var(--accent);
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-sm { width: 26px; height: 26px; font-size: 10.5px; }

/* ── Status Dot ── */
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-orange { background: var(--orange); }
.dot-gray { background: var(--text-muted); }
.dot-blue { background: var(--accent); }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface-sunken); border-radius: var(--r-sm);
  width: fit-content; margin-bottom: 18px;
  border: 1px solid var(--border);
}
.tab {
  padding: 6px 14px; border-radius: 5px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); border: none; background: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.14s;
}
.tab.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
/* Colored active-tab variant — for priority/status "swimlane" selectors
   (e.g. Listing Updates' Urgent/High/Medium/Low tabs) where the active tab
   itself should carry that group's color, Monday.com board-style. Set via
   data-color="red|orange|gold|green|blue|gray" on the button. */
.tab[data-color].active { color: #fff; }
.tab[data-color="red"].active    { background: rgba(226,68,92,0.92); }
.tab[data-color="orange"].active { background: rgba(253,171,61,0.92); }
.tab[data-color="gold"].active   { background: rgba(255,203,0,0.92); color: #2b2b2b; }
.tab[data-color="green"].active  { background: rgba(0,200,117,0.92); }
.tab[data-color="blue"].active   { background: rgba(87,155,252,0.92); }
.tab[data-color="gray"].active   { background: rgba(128,128,128,0.92); }

/* ── Priority-colored card accent (Listing Updates) — set via
   data-priority="urgent|high|medium|low" on the card, a precise marker
   rather than guessing from badge colors that might coincidentally repeat
   elsewhere in the same card (e.g. the SKU tag also uses gray). ── */
.listing-tile-grid .list-card,
.listing-tile-grid .glass-card { border-top: 2px solid var(--border); }
.listing-tile-grid .list-card[data-priority="urgent"],
.listing-tile-grid .glass-card[data-priority="urgent"] { border-top-color: #e2445c; }
.listing-tile-grid .list-card[data-priority="high"],
.listing-tile-grid .glass-card[data-priority="high"]   { border-top-color: #fdab3d; }
.listing-tile-grid .list-card[data-priority="medium"],
.listing-tile-grid .glass-card[data-priority="medium"] { border-top-color: #ffcb00; }
.listing-tile-grid .list-card[data-priority="low"],
.listing-tile-grid .glass-card[data-priority="low"]    { border-top-color: #00c875; }

/* ── Checkbox ── */
.task-checkbox-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.task-checkbox {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: transparent; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.16s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  font-family: 'Inter', sans-serif;
}
.task-checkbox:checked {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}
.task-done-label { text-decoration: line-through; color: var(--text-muted); }

/* ── Timer ── */
.timer-display {
  font-size: 38px; font-weight: 700; color: var(--accent);
  letter-spacing: 1px; text-align: center; padding: 16px 0;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.timer-controls { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }

/* ── Modal ──
   Overlay stays a plain semi-transparent scrim (standard, not "glass") —
   no blur on it. Modal surface itself is solid with soft elevation. */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--overlay-bg);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.97) translateY(6px);
  transition: transform 0.18s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-close-x {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--surface-sunken);
  color: var(--text-muted); font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.14s, color 0.14s;
  z-index: 2;
}
.modal-close-x:hover { background: var(--border); color: var(--text-primary); }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); letter-spacing: -0.2px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Clock ── */
.clock-widget { text-align: center; padding: 28px 20px; }
.clock-time { font-size: 48px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── Chart ── */
.chart-container { position: relative; height: 240px; width: 100%; max-width: 100%; overflow: hidden; }

/* ── Notification ── */
.notif-btn { position: relative; }
.notif-badge {
  position: absolute; top: -3px; right: -3px;
  width: 15px; height: 15px;
  background: var(--red); border-radius: 50%;
  font-size: 9px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--surface);
}

/* ── Toast ── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  min-width: 240px;
  animation: toastIn 0.25s cubic-bezier(0.34,1.2,0.64,1);
}
.toast-success { border-left: 2px solid var(--green); }
.toast-error { border-left: 2px solid var(--red); }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.35; }
.empty-state p { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }

/* ── Section divider ── */
.section-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Task Card (staff view) ── */
.task-card {
  background: var(--surface-opaque);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: box-shadow 0.16s;
}
.task-card:hover { box-shadow: var(--shadow-md); }
.task-card.done { opacity: 0.55; }
.task-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.task-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 99px; }

/* ── Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-purple { color: var(--purple); }
.text-teal { color: var(--teal); }

/* ── Soft "chip" action buttons (Listing Updates: Details/AI/Edit/Central) ──
   Tinted background + a darker shade of that color for text, for contrast
   against the near-white tint in light mode. That darker shade was
   hardcoded and never had a dark-mode override, so in dark mode the same
   dark text sat on an equally dark tinted background — nearly invisible.
   Now overridden to the lighter theme-aware color variables in dark mode. */
.chip-btn-blue   { background: rgba(26,111,255,0.12); color: var(--accent); font-weight: 700; border: none; }
.chip-btn-orange { background: rgba(255,159,10,0.12); color: #b36a00; border: none; }
.chip-btn-purple { background: rgba(191,90,242,0.12); color: #8b3fc9; border: none; }
.chip-btn-green  { background: rgba(48,209,88,0.12); color: #1a8c3a; border: none; }
.chip-btn-indigo { background: rgba(99,102,241,0.08); color: #6366f1; }
:root[data-theme="dark"] .chip-btn-orange, :root[data-theme="auto"] .chip-btn-orange { color: var(--orange); }
:root[data-theme="dark"] .chip-btn-purple, :root[data-theme="auto"] .chip-btn-purple { color: var(--purple); }
:root[data-theme="dark"] .chip-btn-green,  :root[data-theme="auto"] .chip-btn-green  { color: var(--green); }
:root[data-theme="dark"] .chip-btn-indigo, :root[data-theme="auto"] .chip-btn-indigo { color: var(--accent2); }
.font-bold { font-weight: 600; }
.font-black { font-weight: 800; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.listing-tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Grid items default to min-width:auto, which uses their content's natural
   size as a floor and blocks shrinking below it — a <canvas> element's
   intrinsic width does exactly this, which is why chart cards (Sales by
   Platform, By Brand) stayed a fixed size while resizing the window
   instead of shrinking smoothly like every other card, then jumped
   abruptly at the 900px breakpoint below. */
.grid-2 > *, .grid-3 > *, .listing-tile-grid > * { min-width: 0; }
/* For side-by-side chart pairs that aren't full grid-2 rows (e.g. two
   donuts inside one card) — same min-width:0 fix as above, since a
   <canvas>'s intrinsic width blocks shrinking otherwise. */
.chart-grid-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chart-grid-pair > div { min-width: 0; }

/* ── Login Page ── */
/* ── PDF drag-and-drop upload zones (Print Labels) ── */
.pl-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.pl-dropzone:hover { border-color: var(--accent); }
.pl-dropzone.dragover { border-color: var(--accent); background: rgba(26,111,255,0.06); }
.pl-dropzone-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; pointer-events: none; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; padding: 40px 36px; }
.login-logo { font-size: 32px; font-weight: 800; color: var(--text-primary); text-align: center; margin-bottom: 2px; letter-spacing: -1px; }
.login-tagline { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 32px; font-weight: 500; }
.login-footer { text-align: center; color: var(--text-muted); font-size: 11px; margin-top: 24px; font-weight: 500; }
.error-msg { background: rgba(229,55,42,0.07); border: 1px solid rgba(229,55,42,0.2); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; color: var(--red); margin-bottom: 14px; display: none; font-weight: 500; }

/* ── Mobile Action Bar ── */
.mobile-page-bar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 8px 0 16px;
}
.mobile-page-bar-title { font-size: 19px; font-weight: 700; color: var(--text-primary); }

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }
  .sidebar { transform: translateX(-100%); box-shadow: none; z-index: 300; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .sidebar-overlay { z-index: 250; }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; padding: 68px 14px 24px; }
  .mobile-header { display: flex; gap: 8px; }
  .mobile-header-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 0 14px; margin-bottom: 14px; }
  .topbar-title { display: none; } /* mobile-header already shows the page title */
  .topbar-actions .notif-btn { display: none; } /* mobile-header already shows the notification bell — this one was an unhidden duplicate */
  #pageSignOutBtn { display: none; } /* mobile-header now has its own Sign Out — this one would otherwise show a second time on mobile */
  .topbar-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .topbar-actions .form-input, .topbar-actions .form-select { flex: 1 1 130px; min-width: 0; width: auto; }
  .kpi-grid, .kpi-grid-4, .kpi-grid-5, .kpi-grid-6, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  #orderCountsGrid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi-value { font-size: 23px; }
  .form-grid, .form-grid-3, .grid-2, .grid-3, .listing-tile-grid { grid-template-columns: 1fr; }
  table { min-width: 560px; }
  .modal { padding: 20px; border-radius: var(--r-xl); width: calc(100% - 8px); }
  .modal-title { font-size: 17px; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 auto; }
  .timer-display { font-size: 30px; }
  .mobile-page-bar { display: flex; }
  .glass-card { padding: 14px 16px; }
  .sidebar-footer { flex-wrap: wrap; }
  .card-header { flex-wrap: wrap; gap: 8px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 480px) {
  #orderCountsGrid, .kpi-grid-3 { grid-template-columns: 1fr 1fr; }
  #orderCountsGrid > div:last-child { grid-column: 1 / -1; }
  .kpi-grid-5, .kpi-grid-6 { grid-template-columns: 1fr 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .btn-sm { padding: 7px 10px; }
}

@media (max-width: 400px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 14px 16px; }
  .kpi-value { font-size: 21px; }
}

/* Priority listing action buttons — tidy group, responsive */
.listing-row { flex-wrap: nowrap; }
.listing-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; min-width: 150px; }
.listing-actions .btn { width: 100%; justify-content: center; white-space: nowrap; }
@media (max-width: 768px) {
  .listing-row { flex-wrap: wrap; }
  .listing-row > input[type="checkbox"] { margin-top: 4px; }
  .listing-row > div:not(.listing-actions) { flex: 1 1 calc(100% - 34px); min-width: 0; }
  .listing-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    flex: 1 1 100%; width: 100%; min-width: 0;
    margin-top: 12px; margin-left: 34px;
    width: calc(100% - 34px);
  }
  .listing-actions .btn { font-size: 12px; padding: 9px 6px; }
}

/* ── Theme toggle button + sun/moon icons ── */
.theme-toggle {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border-radius: 50%;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer; transition: background 0.14s, color 0.14s, transform 0.08s;
}
.theme-toggle:hover { background: var(--border); color: var(--text-primary); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }

.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .theme-toggle .icon-sun  { display: block; }
  :root[data-theme="auto"] .theme-toggle .icon-moon { display: none; }
}

/* Logo — swaps to the white lockup in dark/auto-dark, black in light */
.logo-light { display: block; }
.logo-dark  { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .logo-light { display: none; }
  :root[data-theme="auto"] .logo-dark  { display: block; }
}

/* Password reveal eye */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 42px; }
.input-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; padding: 0; border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
}
.input-eye:hover { color: var(--text-primary); }
.input-eye svg { width: 18px; height: 18px; }
.input-eye .icon-eye-off { display: none; }
.input-eye.revealed .icon-eye { display: none; }
.input-eye.revealed .icon-eye-off { display: block; }

/* ── Sub-tab bar — fixed, always-present sub-navigation for a sidebar
   section with multiple pages (e.g. Inventory: Inventory / Forecasting /
   Restock). Sits right below that section's topbar. No close button, no
   accumulating history — it's a static tab strip, not a browser-tab
   system: same tabs, same order, every time you're in that section. ── */
.sub-tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  margin: 0 0 16px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-tab-bar::-webkit-scrollbar { display: none; }
.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.sub-tab:hover { color: var(--text-primary); background: var(--border); }
.sub-tab.active {
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.sub-tab .sub-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--border-strong);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 700;
}
.sub-tab.active .sub-tab-badge { background: var(--accent-soft); color: var(--accent2); }

/* ── Marketplace switcher — global, persistent (app-top-bar, every page),
   not confined to the Dashboard the way the original account/platform
   selects were. Uses brand-color badges (Amazon #FF9900, Flipkart #2874F0,
   Meesho #580A46 — sampled directly from Sellerio's own logo assets,
   /assets/logos/*.png, rather than guessed) alongside the real logo image
   itself in each badge/switcher option.
   Drives the existing #platformSwitcher select under the hood (kept in
   the DOM, just visually hidden) so every place that already reads
   currentPlatform() keeps working unchanged. ── */
.mp-switcher { position: relative; }
.mp-switcher-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill, 999px);
  background: var(--surface);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.mp-switcher-btn:hover { border-color: var(--border-strong); }
.mp-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 10px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.mp-badge.mp-all { background: var(--text-muted); }
.mp-badge.mp-amazon, .mp-badge.mp-flipkart, .mp-badge.mp-meesho { background: #fff; border: 1px solid var(--border); }
.mp-switcher-chevron { color: var(--text-muted); }
.mp-switcher-panel {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 180px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
  display: none;
}
.mp-switcher-panel.open { display: block; }
.mp-switcher-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.mp-switcher-option:hover { background: var(--border); }
.mp-switcher-option.active { background: var(--accent-soft); color: var(--accent2); }
@media (max-width: 640px) {
  .mp-switcher-btn span.mp-switcher-label { display: none; }
}

/* ── Sellerio AI chat composer ── */
.btn-icon-plain { background: none; border: none; cursor: pointer; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.btn-icon-plain:hover { background: var(--border); }
.sai-attachment-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 11px; }
.sai-attachment-chip button { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; font-size: 12px; }
.sai-msg-markdown p { margin: 0 0 8px; }
.sai-msg-markdown p:last-child { margin-bottom: 0; }
.sai-msg-markdown ul, .sai-msg-markdown ol { margin: 0 0 8px; padding-left: 20px; }
.sai-msg-markdown code { background: rgba(0,0,0,0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.sai-msg-markdown pre { background: rgba(0,0,0,0.08); padding: 10px; border-radius: var(--r-md); overflow-x: auto; margin: 0 0 8px; }
.sai-msg-markdown pre code { background: none; padding: 0; }
.sai-msg-markdown table { border-collapse: collapse; width: 100%; margin-bottom: 8px; font-size: 12px; }
.sai-msg-markdown th, .sai-msg-markdown td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.sai-copy-btn { opacity: 0; transition: opacity 0.15s; }
.sai-msg-wrap:hover .sai-copy-btn { opacity: 1; }

/* ── New Campaign targeting toggle ── */
.ncTargetBtn.active { border-color: var(--accent) !important; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
