:root {
  --font: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Exact Groova Type & Spacing Scale */
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 12.5px;
  --fs-md: 13.5px;
  --fs-base: 14px;
  --fs-lg: 15px;
  --fs-xl: 17px;
  --fs-2xl: 20px;
  --fs-3xl: 22px;
  --fs-4xl: 26px;
  --fs-display: 34px;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;

  --max: 1500px;
  --gap: 16px;
  --pad: 28px;
  --side-w: 244px;
  --side-rail: 76px;
  --side-inset: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Light Theme Surfaces (100% Groova) */
  --bg: #f1f1f0;
  --card: #fbfbfa;
  --side-bg: #fbfbfa;
  --panel: #fdfdfc;
  --card-2: rgba(20, 22, 28, 0.036);
  --card-3: rgba(20, 22, 28, 0.072);

  /* Ink & Hairlines */
  --ink: #16181d;
  --ink-2: #353841;
  --muted: #5d616b;
  --line: rgba(20, 22, 28, 0.08);
  --line-2: rgba(20, 22, 28, 0.16);
  --rim: rgba(20, 22, 28, 0.16);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 22, 28, 0.05);
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.05), 0 10px 26px -18px rgba(20, 24, 40, 0.3);
  --shadow-lg: 0 2px 6px rgba(20, 22, 28, 0.08), 0 30px 64px -26px rgba(20, 24, 40, 0.36);

  /* Default Accent: Groova Royal Blue (#2348d0) */
  --accent: #2348d0;
  --accent-from: #2f56e0;
  --accent-to: #1c3cb8;
  --accent-ink: #ffffff;
  --accent-hi: #1d3fc0;
  --accent-soft: rgba(35, 72, 208, 0.12);
  --accent-soft-solid: #dfe6fa;
  --accent-text: #1d3fbf;
  --accent-glow: rgba(35, 72, 208, 0.4);

  /* Semantic Status */
  --good: #157a46;
  --good-soft: rgba(21, 140, 80, 0.12);
  --warn: #965200;
  --warn-soft: rgba(214, 120, 20, 0.14);
  --bad: #b42f2b;
  --bad-soft: rgba(200, 50, 45, 0.11);
  --now: #d6453a;
  --info: #0b6c7c;
  --info-soft: rgba(14, 130, 150, 0.11);

  /* Channel Colors (Groova Blue + Teal + Ochre) */
  --ch-rb: #2348d0;
  --ch-tp: #17867a;
  --ch-alert: #d9940f;

  /* Pastel KPI Tiles (.kpi--1..4) */
  --tile-1: #dfe6fa;
  --tile-2: #d6ece7;
  --tile-3: #f4e8c8;
  --tile-4: #f5ddd3;
  --tile-ink: #16181d;
  --tile-muted: rgba(22, 24, 29, 0.68);

  /* Avatar Pastels */
  --h0: #d3defb;
  --h1: #f6e2ae;
  --h2: #d1ebd8;
  --h3: #f8d5c7;
  --h4: #f2d2e0;
  --h5: #d4e8ee;
}

/* Optional FowMail Violet Accent selectable in Settings -> Appearance */
[data-accent="violet"] {
  --accent: #5e2bff;
  --accent-from: #6d4aff;
  --accent-to: #4a1ee0;
  --accent-hi: #4b1fe0;
  --accent-soft: rgba(94, 43, 255, 0.12);
  --accent-soft-solid: #e7e1ff;
  --accent-text: #4d22d6;
  --accent-glow: rgba(94, 43, 255, 0.38);
  --ch-rb: #5e2bff;
  --tile-1: #e5dfff;
}

[data-theme="dark"] {
  --bg: #0f1012;
  --card: #18191d;
  --side-bg: #18191d;
  --panel: #1c1d22;
  --card-2: rgba(225, 232, 255, 0.042);
  --card-3: rgba(225, 232, 255, 0.082);

  --ink: #eceef3;
  --ink-2: #c9ccd5;
  --muted: #9a9ea9;
  --line: rgba(225, 232, 255, 0.085);
  --line-2: rgba(225, 232, 255, 0.16);
  --rim: rgba(225, 232, 255, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.42);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.42), 0 14px 32px -20px rgba(0, 0, 0, 0.78);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.55), 0 34px 80px -26px rgba(0, 0, 0, 0.9);

  --accent: #5b82ff;
  --accent-from: #6a8dff;
  --accent-to: #4a72f2;
  --accent-ink: #050c24;
  --accent-hi: #6d90ff;
  --accent-soft: rgba(91, 130, 255, 0.16);
  --accent-soft-solid: #1c2643;
  --accent-text: #8ea8ff;
  --accent-glow: rgba(91, 130, 255, 0.34);

  --good: #66d394;
  --good-soft: rgba(102, 211, 148, 0.14);
  --warn: #f2b05e;
  --warn-soft: rgba(242, 176, 94, 0.15);
  --bad: #ff8d84;
  --bad-soft: rgba(255, 141, 132, 0.15);
  --info: #6fd0e0;
  --info-soft: rgba(111, 208, 224, 0.14);
  --ch-rb: #6b8cff;
  --ch-tp: #3fbfae;
  --ch-alert: #f0b445;

  --tile-1: #1b2440;
  --tile-2: #142b28;
  --tile-3: #33290f;
  --tile-4: #3a231d;
  --tile-ink: #edf0f6;
  --tile-muted: rgba(237, 240, 246, 0.7);
}

[data-theme="dark"][data-accent="violet"] {
  --accent: #7c5cff;
  --accent-from: #8d70ff;
  --accent-to: #5e2bff;
  --accent-ink: #ffffff;
  --accent-text: #a994ff;
  --ch-rb: #8b70ff;
  --tile-1: #231f3b;
}

/* Compact density mode (Settings -> Appearance) */
html.is-compact { --gap: 12px; --pad: 20px; }
html.is-compact .card { padding: 15px 17px; }
html.is-compact td, html.is-compact th { padding: 9px 12px; }

/* View Transitions radial reveal */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 var(--fs-base)/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 600; }
b, strong { font-weight: 700; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.r { text-align: right; }
.muted { color: var(--muted); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.85); opacity: 0.45; }
}
@keyframes breathe-ring {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==============================
   AUTH SCREEN
   ============================== */
.auth-overlay {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(640px circle at 20% 20%, var(--accent-soft), transparent 60%), var(--bg);
}
.auth-card {
  width: 100%; max-width: 410px; background: var(--panel); border-radius: var(--r-xl);
  padding: 32px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  background: linear-gradient(155deg, var(--accent-from), var(--accent-to));
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -6px var(--accent-glow); flex-shrink: 0;
}
.brand-mark svg { width: 17px; height: 21px; }
.brand-pill {
  font-size: var(--fs-2xs); font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.05em;
}
.auth-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 22px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }

input[type="text"], input[type="password"], input[type="search"], input[type="email"], select, textarea {
  width: 100%; padding: 9px 13px; border-radius: 12px; border: none;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font-family: inherit; font-size: var(--fs-md); font-weight: 500; outline: none;
  transition: box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}
input:focus, select:focus, textarea:focus {
  background: var(--panel);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--accent-soft);
}
.select--sm { width: auto; height: 36px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 11px; }
.inwrap { position: relative; min-width: 210px; }
.inwrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.inwrap input { padding-left: 34px; height: 36px; font-size: var(--fs-sm); border-radius: 11px; }

/* ==============================
   BUTTONS & CONTROLS
   ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 12px; border: none;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.btn:hover:not(:disabled) { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.btn--primary {
  background: linear-gradient(155deg, var(--accent-from), var(--accent-to));
  color: var(--accent-ink); box-shadow: 0 8px 20px -6px var(--accent-glow);
}
.btn--primary:hover:not(:disabled) {
  background: linear-gradient(155deg, var(--accent-hi), var(--accent-to));
  color: var(--accent-ink); box-shadow: 0 12px 24px -6px var(--accent-glow);
}
.btn--sm { height: 32px; padding: 0 11px; font-size: var(--fs-xs); border-radius: 10px; }
.btn--danger { color: var(--bad); }
.btn--danger:hover:not(:disabled) { background: var(--bad-soft); color: var(--bad); }
.btn--full { width: 100%; height: 42px; font-size: var(--fs-base); }
.linkbtn { border: none; background: transparent; color: var(--accent-text); font-family: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn:hover { text-decoration: underline; }

.ibtn {
  width: 40px; height: 40px; border-radius: 13px; border: none;
  background: var(--card); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.ibtn:hover { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.ibtn--sm { width: 32px; height: 32px; border-radius: 10px; }
.ibtn svg { width: 17px; height: 17px; }
.ibtn__badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--bad); color: #ffffff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg);
}

.seg {
  display: inline-flex; align-items: center; padding: 3px; border-radius: 12px;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); gap: 2px;
}
.seg__btn {
  border: none; background: transparent; color: var(--muted);
  padding: 5px 12px; border-radius: 9px; font-family: inherit;
  font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 0.18s var(--ease);
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ==============================
   FLOATING DETACHED SIDEBAR (GROOVA)
   ============================== */
.side {
  position: fixed; top: var(--side-inset); bottom: var(--side-inset); left: var(--side-inset);
  width: var(--side-w); background: var(--side-bg); border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 10px;
  z-index: 40; transition: width 0.36s var(--ease), padding 0.36s var(--ease);
}

.side__head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 6px; }
.side__brand { min-width: 0; flex: 1; }
.side__title { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.side__sub { font-size: var(--fs-2xs); color: var(--muted); font-weight: 500; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side__log {
  height: 42px; border-radius: 12px; border: none; padding: 0 12px;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: transform 0.16s var(--ease), opacity 0.16s var(--ease);
}
.side__log:hover { opacity: 0.92; transform: translateY(-1px); }
.side__log kbd {
  font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.16); color: inherit; font-weight: 700;
}

.snav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding: 2px 0; }
.side__group {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 10px 10px 4px;
}

.snav__item {
  width: 100%; border: none; background: transparent; color: var(--ink-2);
  padding: 9px 11px; border-radius: 13px; display: flex; align-items: center; gap: 11px;
  font-family: inherit; font-size: var(--fs-md); font-weight: 600; text-align: left; cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease); position: relative;
}
.snav__item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.78; }
.snav__item:hover { background: var(--card-2); color: var(--ink); }
.snav__item.is-active {
  background: linear-gradient(155deg, var(--accent-from), var(--accent-to));
  color: var(--accent-ink); box-shadow: 0 8px 20px -6px var(--accent-glow);
}
.snav__item.is-active svg { opacity: 1; }
.snav__chev { margin-left: auto; width: 14px !important; height: 14px !important; opacity: 0.5 !important; }

.snav__badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--bad); color: #ffffff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.snav__item.is-active .snav__badge { background: rgba(255, 255, 255, 0.94); color: var(--accent-text); }

/* Expandable Sidebar Submenu (matches Groova Catalogue screenshot!) */
.snav__sub {
  display: flex; flex-direction: column; gap: 2px;
  margin: 3px 0 6px 20px; padding-left: 12px; border-left: 1px solid var(--line);
}
.snav__subbtn {
  border: none; background: transparent; color: var(--muted);
  padding: 6px 10px; border-radius: 10px; text-align: left;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.snav__subbtn:hover { background: var(--card-2); color: var(--ink); }
.snav__subbtn.is-on { background: var(--accent-soft); color: var(--accent-text); }

.side__foot { border-top: 1px solid var(--line); padding-top: 10px; }
.side__me {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line);
}
.av {
  width: 34px; height: 34px; border-radius: 11px; background: var(--h0); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-xs); flex-shrink: 0;
}
.av--lg { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
.av--img { padding: 0; overflow: hidden; background: #ffffff !important; box-shadow: inset 0 0 0 1px var(--line); }
.av--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Brand Platform Logos (Redbubble & TeePublic) */
.plat-svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.plat-corner {
  position: absolute; top: 8px; left: 8px;
  width: 26px; height: 26px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(17, 17, 16, 0.14), inset 0 0 0 1px rgba(17, 17, 16, 0.06);
  display: inline-flex; align-items: center; justify-content: center;
}
.shop-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 16px 20px; border-radius: var(--r-lg);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.shop-hero__left { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
.shop-hero__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-hero__title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.shop-hero__name { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.shop-hero__meta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12.5px; color: var(--muted);
}
.side__me-meta { min-width: 0; flex: 1; }
.side__me-name { font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__me-role { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Rail Collapse Mode */
html.is-rail .side { width: var(--side-rail); padding: 16px 12px 14px; align-items: center; }
html.is-rail .side__brand, html.is-rail .side__group, html.is-rail .snav__label, html.is-rail .snav__chev,
html.is-rail .snav__sub, html.is-rail .side__log span, html.is-rail .side__log kbd,
html.is-rail .side__me-meta, html.is-rail #logoutMiniBtn { display: none !important; }
html.is-rail .side__head { justify-content: center; flex-direction: column; gap: 8px; }
html.is-rail .side__log { width: 42px; padding: 0; justify-content: center; }
html.is-rail .snav__item { justify-content: center; padding: 10px; }
html.is-rail .snav__badge { position: absolute; top: 6px; right: 6px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--side-bg); }
html.is-rail .side__me { padding: 6px; justify-content: center; }

/* ==============================
   MAIN CONTAINER, TOPBAR & SUBTABS
   ============================== */
.main {
  margin-left: calc(var(--side-w) + 24px); min-height: 100vh; display: flex; flex-direction: column;
  transition: margin-left 0.36s var(--ease);
}
html.is-rail .main { margin-left: calc(var(--side-rail) + 24px); }

.top { position: sticky; top: 0; background: var(--bg); z-index: 30; transition: box-shadow 0.16s var(--ease); }
.top.is-stuck { box-shadow: 0 1px 0 var(--line); }

.top__in {
  max-width: var(--max); margin: 0 auto; min-height: 66px; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}

.crumbs { font-size: var(--fs-md); color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--ink); font-weight: 600; }

.tools { display: flex; align-items: center; gap: 8px; }
.openpill {
  height: 40px; padding: 0 12px; border-radius: 13px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
}
.live { width: 8px; height: 8px; border-radius: 99px; background: var(--good); position: relative; flex-shrink: 0; }
.live::after { content: ""; position: absolute; inset: -3px; border-radius: 99px; background: var(--good); animation: breathe 2.1s ease-in-out infinite; }
.openpill__pack { padding: 2px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 700; }

.searchpill {
  height: 40px; min-width: 250px; padding: 0 12px 0 14px; border-radius: 13px; border: none; background: var(--card); color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; font-family: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.searchpill:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.searchpill kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }

/* Subtabs bar directly under topbar (Groova exact) */
.subtabs {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 22px; height: 44px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab-btn {
  height: 44px; border: none; background: transparent; color: var(--muted);
  font-family: inherit; font-size: var(--fs-md); font-weight: 600; cursor: pointer;
  position: relative; padding: 0 2px; white-space: nowrap; flex-shrink: 0;
  transition: color 0.15s var(--ease);
}
.subtab-btn:hover { color: var(--ink); }
.subtab-btn.is-on { color: var(--ink); }
.subtab-btn.is-on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px;
  border-radius: 99px; background: var(--ink);
}

.content { width: 100%; max-width: var(--max); margin: 0 auto; padding: 14px var(--pad) 56px; }

.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.phead h1 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; }
.phead__sub { color: var(--muted); font-size: var(--fs-md); margin-top: 5px; }
.phead__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==============================
   CARDS, STATROW & OVERVIEW GRID
   ============================== */
.card {
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  padding: 20px 22px; min-width: 0;
}
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__title { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.015em; }
.card__sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

/* Groova Statrow (Transactions / Stock / Trade Invoices) */
.statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.statrow--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statbox {
  background: var(--card); border-radius: var(--r-lg); padding: 16px 18px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.statbox__lbl { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.statbox__val { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.statbox__sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; }
.statbox.is-bad .statbox__val { color: var(--bad); }
.statbox.is-good .statbox__val { color: var(--good); }
.statbox.is-warn .statbox__val { color: var(--warn); }

/* Overview 12-Col Bento Grid */
.ov-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap);
  grid-template-areas:
    "hero hero hero hero hero hero hero hero today today today today"
    "pack pack pack pack pack mix mix mix low low low low"
    "orders orders orders orders orders orders top top top top top top";
}
.ov-hero { grid-area: hero; display: flex; flex-direction: column; }
.ov-today { grid-area: today; display: flex; flex-direction: column; }
.ov-pack { grid-area: pack; display: flex; flex-direction: column; }
.ov-mix { grid-area: mix; display: flex; flex-direction: column; }
.ov-low { grid-area: low; display: flex; flex-direction: column; }
.ov-orders { grid-area: orders; }
.ov-top { grid-area: top; }

.ov-hero__figs { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ov-hero__val { font-size: clamp(34px, 3.4vw, 46px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ov-stat { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-md); padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; }
.ov-stat__lbl { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.ov-stat__val { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; margin-top: 3px; }

.legend-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.legend-chip {
  height: 30px; padding: 0 10px; border-radius: 9px; border: none;
  background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2); font-family: inherit; font-size: var(--fs-xs); font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
}
.legend-chip.is-off { opacity: 0.42; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; flex-shrink: 0; }

/* Groova Stacked Column Chart (.stack) */
.stack { position: relative; height: 276px; padding: 20px 4px 26px 48px; display: flex; flex-direction: column; justify-content: flex-end; }
.stack__grid { position: absolute; inset: 20px 4px 26px 48px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.stack__gline { border-top: 1px dashed var(--line); position: relative; height: 0; }
.stack__glbl { position: absolute; left: -48px; top: -7px; width: 42px; text-align: right; font-size: 11px; color: var(--muted); }
.stack__best { position: absolute; left: 48px; right: 4px; border-top: 1.5px dashed var(--line-2); pointer-events: none; z-index: 4; }
.stack__best-pill { position: absolute; right: 6px; bottom: 6px; padding: 3px 9px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; line-height: 1.25; white-space: nowrap; box-shadow: 0 2px 8px rgba(15, 16, 18, 0.16); }
.stack__cols { position: relative; z-index: 3; height: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
.stack__col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; cursor: pointer; }
.stack__track { width: 100%; max-width: 56px; height: 100%; display: flex; flex-direction: column-reverse; position: relative; border-radius: 9px 9px 4px 4px; overflow: hidden; }
.stack__col.is-future .stack__track { background: repeating-linear-gradient(135deg, var(--card-2), var(--card-2) 6px, transparent 6px, transparent 12px); box-shadow: inset 0 0 0 1px var(--line); }
.stack__seg { width: 100%; box-shadow: inset 0 2px 0 var(--card); transform-origin: bottom; }
.stack__lbl { position: absolute; bottom: -22px; font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.stack__col.is-today .stack__lbl { color: var(--ink); font-weight: 700; }
.stack__col.is-today::after { content: ""; position: absolute; bottom: -28px; width: 5px; height: 5px; border-radius: 99px; background: var(--accent); }
.charttip { position: fixed; pointer-events: none; z-index: 90; background: var(--ink); color: var(--bg); padding: 8px 11px; border-radius: 10px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-lg); }

/* Today / Feed / Spotlight / Mix */
.ov-today__val { font-size: var(--fs-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.meter { height: 10px; border-radius: 99px; background: var(--card-3); position: relative; margin: 12px 0 6px; }
.meter__fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-from), var(--accent-to)); transform-origin: left; }
.meter__tick { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--ink); border-radius: 2px; }
.feed-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin: 12px 0 8px; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 12px; transition: background 0.14s var(--ease); cursor: pointer; }
.feed-row:hover { background: var(--card-2); }
.mono-tile { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--ink); overflow: hidden; }
.mono-tile img { width: 100%; height: 100%; object-fit: cover; }

.pack-row { display: flex; align-items: center; gap: 11px; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.pack-row:last-of-type { border-bottom: none; }
.pack-row:hover { background: var(--card-2); }
.pack-tray { margin-top: auto; padding: 11px 13px; border-radius: 16px; background: var(--accent-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.mix-wrap { display: flex; align-items: stretch; gap: 16px; flex: 1; }
.mix-tower { width: 34px; min-height: 150px; display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.mix-seg { width: 100%; border-radius: 8px; transform-origin: bottom; }
.mix-rows { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.mix-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ==============================
   PAYMENTS (PAYOUTS + TRADE INVOICES)
   ============================== */
.pay-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.pay-next {
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--card);
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.pay-next__val { font-size: clamp(34px, 3.4vw, 46px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.pay-stats { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pay-stat-row {
  background: var(--card); border-radius: var(--r-lg); padding: 14px 18px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.steps { display: flex; align-items: center; gap: 14px; list-style: none; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.steps li.is-done { color: var(--ink); }
.steps__dot { width: 10px; height: 10px; border-radius: 99px; background: var(--line-2); position: relative; }
.steps li.is-done .steps__dot { background: var(--good); }
.steps li.is-now .steps__dot { background: var(--accent); }
.steps li.is-now .steps__dot::before {
  content: ""; position: absolute; inset: -4px; border-radius: 99px;
  border: 2px solid var(--accent); animation: breathe-ring 2s ease-in-out infinite;
}

.stamp-paid {
  display: inline-block; padding: 4px 14px; border-radius: 8px;
  border: 3px solid var(--good); color: var(--good); font-weight: 800;
  font-size: 15px; letter-spacing: 0.14em; transform: rotate(-10deg);
}

/* ==============================
   PASTEL KPI TILES (INSIGHTS)
   ============================== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi {
  min-height: 128px; border-radius: var(--r-lg); padding: 18px 20px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between;
}
.kpi--1 { background: var(--tile-1); color: var(--tile-ink); }
.kpi--2 { background: var(--tile-2); color: var(--tile-ink); }
.kpi--3 { background: var(--tile-3); color: var(--tile-ink); }
.kpi--4 { background: var(--tile-4); color: var(--tile-ink); }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--tile-muted); }
.kpi__ico { width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, 0.56); display: flex; align-items: center; justify-content: center; color: var(--tile-ink); font-weight: 700; }
[data-theme="dark"] .kpi__ico { background: rgba(255, 255, 255, 0.1); }
.kpi__bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.kpi__val { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }

/* ==============================
   TABLES, CHIPS, LEVEL BAR & CATALOG WALL
   ============================== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 99px; border: none;
  background: var(--card); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip.is-on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.chip__cnt { padding: 1px 6px; border-radius: 99px; background: var(--card-3); font-size: 11px; font-weight: 700; }
.chip.is-on .chip__cnt { background: rgba(255, 255, 255, 0.22); color: inherit; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.pill--good { background: var(--good-soft); color: var(--good); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--info { background: var(--info-soft); color: var(--info); }
.pill--accent { background: var(--accent-soft); color: var(--accent-text); }
.pill--muted { background: var(--card-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th {
  text-align: left; padding: 12px 16px; font-size: 11.5px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-weight: 500; }
tr:last-child td { border-bottom: none; }
tbody tr.is-click { cursor: pointer; transition: background 0.14s var(--ease); }
tbody tr:hover { background: var(--card-2); }

.tx-ico {
  width: 34px; height: 34px; border-radius: 10px; background: var(--card-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; font-weight: 700; font-size: 12px; color: var(--ink-2);
}
.tx-ico img { width: 100%; height: 100%; object-fit: cover; }

.level { width: 110px; height: 6px; border-radius: 99px; background: var(--card-3); overflow: hidden; display: inline-block; vertical-align: middle; }
.level > i { display: block; height: 100%; border-radius: 99px; background: var(--good); }
.level.is-warn > i { background: var(--warn); }
.level.is-bad > i { background: var(--bad); }

.top-row { display: grid; grid-template-columns: 24px 36px minmax(0, 1fr) 64px minmax(50px, 110px) 32px; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.top-row:last-child { border-bottom: none; }
.hbar { height: 8px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.hbar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transform-origin: left; }

/* Products Wall (Groova Catalogue Records Grid) */
.cat__wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: var(--gap); }
.cat-rec {
  background: var(--card); border-radius: var(--r-lg); padding: 12px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.cat-rec:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-lg); }
.cat-rec__art {
  aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: rgba(255, 255, 255, 0.92);
}
.cat-rec__art.has-img {
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 10px;
}
.cat-rec__art img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }

/* ==============================
   MESSAGES BOX (100% GROOVA .ms-grid)
   ============================== */
.ms-grid {
  display: grid; grid-template-columns: minmax(320px, 385px) minmax(0, 1fr); gap: var(--gap);
  height: calc(100dvh - 200px); min-height: 540px;
}
.ms-list, .ms-pane { display: flex; flex-direction: column; overflow: hidden; }
.ms-list__head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.ms-items { flex: 1; overflow-y: auto; padding: 6px; }
.ms-item {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 10px; border-radius: 14px;
  cursor: pointer; transition: background 0.13s var(--ease); position: relative;
}
.ms-item:hover { background: var(--card-2); }
.ms-item.is-on { background: var(--accent-soft); }
.ms-item.is-unread { background: rgba(35, 72, 208, 0.045); }
.ms-item.is-unread.is-on { background: var(--accent-soft); }
.ms-unread-dot {
  width: 8px; height: 8px; border-radius: 99px; background: var(--accent); flex-shrink: 0;
  display: inline-block; margin-right: 5px;
}
.ms-item__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ms-item__prev {
  font-size: var(--fs-xs); color: var(--muted); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.ms-head { padding: 16px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.ms-ctx { margin: 14px 18px 0; padding: 12px 14px; border-radius: 14px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.ms-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.mail-frame { width: 100%; min-height: 360px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; }

/* ==============================
   SETTINGS (GROOVA .st-grid & .themes)
   ============================== */
.st-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: var(--gap); align-items: start; }
.row-set { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row-set:last-child { border-bottom: none; padding-bottom: 0; }
.st-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--card-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink-2); }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.theme-opt {
  border-radius: 16px; padding: 12px; border: none; background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; text-align: left; font-family: inherit;
  transition: box-shadow 0.15s var(--ease);
}
.theme-opt.is-on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.theme-pic { height: 68px; border-radius: 10px; margin-bottom: 8px; padding: 8px; display: flex; gap: 6px; border: 1px solid var(--line); }

/* ==============================
   DRAWER, FINDER, MODALS & MOBILE TABBAR
   ============================== */
.scrim { position: fixed; inset: 0; background: rgba(15, 16, 18, 0.42); backdrop-filter: blur(4px); z-index: 60; }
.drawer {
  position: fixed; top: 10px; bottom: 10px; right: 10px;
  width: min(500px, calc(100vw - 20px)); background: var(--panel); border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
  z-index: 70; display: flex; flex-direction: column; overflow: hidden; animation: drawerIn 0.34s var(--ease);
}
@keyframes drawerIn { from { transform: translateX(34px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer__head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.drawer__foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.finder {
  position: fixed; top: 14vh; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 28px)); background: var(--panel); border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-lg); z-index: 75; overflow: hidden;
}

/* Centered Groova Modals (Product Sales Analytics & Delete Confirmations) */
.modal-center {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--panel); border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-lg);
  z-index: 80; display: flex; flex-direction: column; overflow: hidden;
  animation: modalPop 0.24s var(--ease);
}
@keyframes modalPop {
  from { transform: translate(-50%, -47%) scale(0.97); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.prod-modal { width: min(820px, calc(100vw - 28px)); max-height: min(88vh, 840px); }
.confirm-modal { width: min(440px, calc(100vw - 28px)); z-index: 86; }
.pm-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
.pm-thumb {
  width: 62px; height: 62px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pm-thumb.has-img { background: #ffffff !important; padding: 6px; }
.pm-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pm-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.pm-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.pm-chart-wrap {
  background: var(--card-2); border-radius: var(--r-md); padding: 16px 16px 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pm-bars {
  height: 156px; display: flex; align-items: flex-end; gap: 6px; padding-top: 12px;
}
.pm-bar-col {
  flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; cursor: default;
}
.pm-bar-track {
  width: 100%; max-width: 34px; flex: 1; background: var(--card-3); border-radius: 8px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.pm-bar-fill {
  width: 100%; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--accent-from), var(--accent-to));
  transition: height 0.3s var(--ease);
}
.pm-bar-lbl { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }

.pm-var-row {
  display: grid; grid-template-columns: minmax(140px, 1.4fr) minmax(80px, 1fr) 74px 86px;
  align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.pm-var-row:last-child { border-bottom: none; }

.shop-pill-wrap {
  display: inline-flex; align-items: center; gap: 5px; margin: 2px 5px 2px 0;
}
.shop-pill-del {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  width: 18px; height: 18px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; line-height: 1; padding: 0;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.shop-pill-del:hover { background: var(--bad-soft); color: var(--bad); }

.btn--danger-solid {
  background: var(--bad); color: #ffffff;
  box-shadow: 0 8px 18px -6px rgba(185, 28, 28, 0.45);
}
.btn--danger-solid:hover:not(:disabled) {
  background: #991b1b; color: #ffffff;
}

.code-block { font-family: var(--mono); font-size: 12px; background: #12141a; color: #e5e7eb; padding: 13px 15px; border-radius: 12px; white-space: pre-wrap; word-break: break-all; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 95; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lg); }

.tabbar {
  display: none; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 45;
  background: var(--panel); border-radius: 22px; padding: 6px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
  grid-template-columns: repeat(6, 1fr); gap: 3px;
}
.tabbar__btn {
  border: none; background: transparent; color: var(--muted); padding: 7px 2px; border-radius: 15px;
  font-family: inherit; font-size: 10.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
}
.tabbar__btn svg { width: 17px; height: 17px; }
.tabbar__btn.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }

/* Responsive Breakpoints */
@media (max-width: 1279px) {
  .side { width: var(--side-rail); padding: 16px 12px 14px; align-items: center; }
  .side__brand, .side__group, .snav__label, .snav__chev, .snav__sub, .side__log span, .side__log kbd, .side__me-meta, #logoutMiniBtn, #collapseSideBtn { display: none !important; }
  .side__log { width: 42px; padding: 0; justify-content: center; }
  .snav__item { justify-content: center; padding: 10px; }
  .snav__badge { position: absolute; top: 6px; right: 6px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; }
  .side__me { padding: 6px; justify-content: center; }
  .main { margin-left: calc(var(--side-rail) + 24px); }
  .ov-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "hero hero hero hero hero hero"
      "today today today pack pack pack"
      "mix mix low low low low"
      "orders orders orders top top top";
  }
  .kpis, .statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-top, .st-grid { grid-template-columns: 1fr; }
}

@media (max-width: 999px) {
  .ov-grid { grid-template-columns: 1fr; grid-template-areas: "hero" "today" "pack" "mix" "low" "orders" "top"; }
  .ov-hero__figs { grid-template-columns: 1fr 1fr; }
  .ms-grid { grid-template-columns: 1fr; height: auto; }
}

@media (max-width: 760px) {
  .side { display: none; }
  .main { margin-left: 0; padding-bottom: 78px; }
  .tabbar { display: grid; }
  .top__in, .subtabs, .content { padding-left: 14px; padding-right: 14px; }
  .openpill { display: none; }
  .searchpill span span, .searchpill kbd { display: none; }
  .searchpill { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .kpis, .statrow, .statrow--3, .themes { grid-template-columns: 1fr; }
  .pm-var-row { grid-template-columns: minmax(100px, 1fr) 60px 76px; }
  .pm-var-row .hbar { display: none; }
}
