/* ════════════════════════════════════════════════════════════════════
   Order Status Mapper — design tokens + global styles
   Dark-by-default with light option (toggle planned for Phase D).
   ════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Light theme tokens (default — dark via [data-theme="dark"]) */
  --bg-page:      #f7f8fb;
  --bg-canvas:    #ffffff;
  --bg-subtle:    #f3f4f8;
  --bg-muted:     #eef0f4;

  --border:       #e5e7eb;
  --border-soft:  #eef0f4;
  --border-strong:#cbd1da;

  --text:         #0f172a;
  --text-2:       #334155;
  --text-muted:   #64748b;
  --text-soft:    #94a3b8;

  --brand:        #4f46e5;
  --brand-hover:  #4338ca;
  --brand-soft:   #eef2ff;
  --brand-glow:   rgba(79, 70, 229, 0.15);

  --success:      #10b981;
  --success-soft: #d1fae5;
  --warning:      #f59e0b;
  --warning-soft: #fef3c7;
  --danger:       #e11d48;
  --danger-soft:  #ffe4e6;

  --shadow-xs:    0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:    0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md:    0 10px 24px rgba(15, 23, 42, 0.08);

  --radius-sm:    6px;
  --radius:       10px;
  --radius-md:    12px;
  --radius-lg:    16px;

  --t-fast:       0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* ════════════════════════════════════════════════════════════════
     Linear/Vercel + Stripe-inspired dark theme.
     - 4 background layers (page → canvas → elevated → highest)
     - Subtle 1px borders that catch light without being heavy
     - Emerald accent used sparingly — only for positive/active/CTA
     - Premium typography rhythm (Inter UI, JetBrains Mono numbers)
     ════════════════════════════════════════════════════════════════ */

  /* Backgrounds: layered slate */
  --bg-page:        #08090b;   /* deepest — body */
  --bg-canvas:      #0f1115;   /* cards on page */
  --bg-elevated:    #161a20;   /* nested cards / hover targets */
  --bg-highest:     #1c2128;   /* tooltips, popovers, dropdowns */
  --bg-subtle:      #11141a;   /* table headers, filter bar */
  --bg-muted:       #1d2128;   /* chips, badges, pills */

  /* Borders: faint at rest, slightly stronger on hover */
  --border:         #1f242c;   /* default — catches light subtly */
  --border-soft:    #161a20;   /* almost invisible — for inner divisions */
  --border-strong:  #2a3038;   /* hover/active state */
  --border-accent:  rgba(16, 185, 129, 0.32);  /* emerald edge */

  /* Text: high contrast hierarchy */
  --text:           #f4f6f8;   /* primary — pure-ish white */
  --text-2:         #d4d9e0;   /* secondary headings */
  --text-muted:     #8a93a1;   /* labels, captions */
  --text-soft:      #5d6573;   /* hints, footnotes */

  /* Brand accent — emerald, used sparingly */
  --brand:          #10b981;   /* primary accent */
  --brand-hover:    #34d399;   /* slightly brighter on hover */
  --brand-soft:     rgba(16, 185, 129, 0.10);   /* fill on active nav, button bg */
  --brand-softer:   rgba(16, 185, 129, 0.06);   /* subtle hover wash */
  --brand-glow:     rgba(16, 185, 129, 0.22);   /* focus ring, glow under buttons */
  --brand-line:     rgba(16, 185, 129, 0.55);   /* solid accent line / underline */

  /* Semantic — Stripe-style soft tints */
  --success:        #10b981;
  --success-soft:   rgba(16, 185, 129, 0.14);
  --warning:        #f59e0b;
  --warning-soft:   rgba(245, 158, 11, 0.13);
  --danger:         #ef4444;
  --danger-soft:    rgba(239, 68, 68, 0.13);
  --info:           #60a5fa;
  --info-soft:      rgba(96, 165, 250, 0.13);

  /* Premium shadows — layered for depth without heaviness */
  --shadow-xs:      0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-sm:      0 2px 4px rgba(0, 0, 0, 0.4),  0 0 0 1px rgba(255, 255, 255, 0.025);
  --shadow-md:      0 8px 24px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg:      0 18px 48px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-glow:    0 0 0 1px var(--border-accent), 0 0 28px var(--brand-glow);

  /* Subtle gradients overlaid on cards — Stripe-style */
  --gradient-card:    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 100%);
  --gradient-hero:    linear-gradient(135deg, rgba(16,185,129,0.05) 0%, transparent 60%);
  --gradient-success: linear-gradient(180deg, rgba(16,185,129,0.08) 0%, rgba(16,185,129,0.02) 100%);
  --gradient-warning: linear-gradient(180deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.02) 100%);
  --gradient-danger:  linear-gradient(180deg, rgba(239,68,68,0.08) 0%, rgba(239,68,68,0.02) 100%);

  /* Radii — Linear uses slightly tighter corners than the previous theme */
  --radius-sm:      6px;
  --radius:         8px;
  --radius-md:      10px;
  --radius-lg:      14px;

  /* Motion — gentle easing, fast enough to feel snappy */
  --t-fast:         140ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:         220ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:         340ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Ambient background — Stripe-style emerald glow mesh ────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px circle at 12% -10%, rgba(16, 185, 129, 0.10), transparent 55%),
    radial-gradient(800px circle at 88% 110%, rgba(16, 185, 129, 0.06), transparent 50%),
    radial-gradient(600px circle at 50% 50%, rgba(34, 197, 94, 0.025), transparent 70%);
  pointer-events: none;
}

h1, h2, h3 {
  margin: 0; line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: "Inter", -apple-system, sans-serif;
}
h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 0%, #b8c1cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }

a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-hover); }

code, .mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-2);
}

.muted { color: var(--text-muted); }
.soft  { color: var(--text-soft); }
.tabular { font-variant-numeric: tabular-nums; }

/* ── Top nav ─────────────────────────────────────────────────────── */
.topnav {
  background: rgba(15, 17, 21, 0.85);          /* translucent canvas */
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}
.topnav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 20px;
}
.topnav-brand a { display: flex; align-items: center; gap: 10px; color: var(--text); }
.topnav-brand a:hover { text-decoration: none; }
.topnav-logo { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.topnav-title { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }

.topnav-links { display: flex; gap: 0; flex: 1; flex-wrap: nowrap; }
.topnav-links a {
  position: relative;
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  padding: 8px 10px; border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.topnav-links a:hover { background: var(--bg-elevated); color: var(--text); text-decoration: none; }
.topnav-links a.active {
  background: transparent;
  color: var(--text);
  font-weight: 600;
}
/* Linear-style underline accent on active tab — bold + glowing */
.topnav-links a.active::after {
  content: ""; position: absolute;
  left: 10px; right: 10px; bottom: -11px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 24px var(--brand-glow), 0 0 8px var(--brand);
}
.topnav-links a.active {
  text-shadow: 0 0 24px rgba(16, 185, 129, 0.4);
}

.topnav-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.user-name { color: var(--text); font-weight: 500; }
.role-pill {
  font-size: 9.5px; background: var(--bg-muted); padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600;
}
.role-pill.primary { background: var(--brand-soft); color: var(--brand); }
.signout-link {
  color: var(--text-muted); font-size: 12.5px;
  padding-left: 16px; margin-left: 4px; border-left: 1px solid var(--border);
}
.signout-link:hover { color: var(--text); }

.container { max-width: 1400px; margin: 0 auto; padding: 28px 32px; }

/* ── Flash ──────────────────────────────────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13.5px;
  border: 1px solid;
}
.flash.success { background: var(--success-soft); color: #047857; border-color: rgba(110,231,183,0.5); }
.flash.error   { background: var(--danger-soft);  color: #be123c; border-color: rgba(253,164,175,0.5); }
.flash.info    { background: var(--brand-soft);   color: var(--brand-hover); border-color: rgba(199,210,254,0.5); }
[data-theme="dark"] .flash.success { color: #6ee7b7; }
[data-theme="dark"] .flash.error   { color: #fda4af; }
[data-theme="dark"] .flash.info    { color: #c7d2fe; }

/* ── Form elements ─────────────────────────────────────────────── */
input[type=text], input[type=password], input[type=date], input[type=file],
select, textarea {
  font: inherit; font-size: 13.5px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
label { display: block; font-size: 12px; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  background: var(--brand); color: #06281d;
  padding: 9px 16px;
  border: 0; border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: -0.005em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset,
              0 0 0 1px rgba(16, 185, 129, 0.32),
              0 4px 12px rgba(16, 185, 129, 0.18);
  transition: transform var(--t-fast), box-shadow var(--t-fast),
              background var(--t-fast);
}
button:hover, .btn:hover {
  background: var(--brand-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset,
              0 0 0 1px rgba(16, 185, 129, 0.42),
              0 6px 20px rgba(16, 185, 129, 0.28);
}
button:active, .btn:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible {
  outline: 0; box-shadow: 0 0 0 3px var(--brand-glow),
                          0 4px 12px rgba(16, 185, 129, 0.2);
}

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--bg-canvas);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 22px;
  transition: border-color var(--t-base), box-shadow var(--t-base),
              transform var(--t-base);
}

/* ── Login (split-free, centered) ─────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(16,185,129,0.12), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(5,150,105,0.08), transparent 50%),
    var(--bg-page);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
}
.login-logo {
  width: 60px; height: 60px;
  display: block; margin: 0 auto 18px;
}
.pin-input {
  width: 100%; font-family: "Inter", sans-serif !important;
  font-size: 22px !important; letter-spacing: 6px !important;
  text-align: center; padding: 12px !important; font-weight: 600;
}

/* ── Upload cards (Phase B) ───────────────────────────────────── */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .upload-grid { grid-template-columns: 1fr; } }


.upload-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
}
.upload-card-head { border-bottom: 1px solid var(--border-soft); padding-bottom: 12px; }
.upload-card label { margin-top: 12px; }
.upload-card input[type=file], .upload-card select { width: 100%; }

.src-pill {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
}
.src-pill.src-shopify {
  background: rgba(14,165,233,0.12); color: #0369a1; border-color: #7dd3fc;
}
.src-pill.src-fship {
  background: rgba(245,158,11,0.12); color: #b45309; border-color: #fcd34d;
}
.src-pill.src-calling {
  background: rgba(16,185,129,0.12); color: #047857; border-color: #6ee7b7;
}
[data-theme="dark"] .src-pill.src-shopify { color: #7dd3fc; }
[data-theme="dark"] .src-pill.src-fship   { color: #fcd34d; }
[data-theme="dark"] .src-pill.src-calling { color: #6ee7b7; }

/* ── Data table (Compact density — packs data) ────────────────── */
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}
table.data th, table.data td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
table.data thead th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
table.data tbody tr {
  transition: background var(--t-fast);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--bg-elevated); }
table.data tbody tr:hover td { background: transparent; }    /* row-level hover, not cell */
table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
table.data .tabular { font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace; }

/* ── Status badges ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
}
.badge.ok    { background: var(--success-soft); color: #047857; border-color: rgba(110,231,183,0.6); }
.badge.warn  { background: var(--warning-soft); color: #b45309; border-color: rgba(252,211,77,0.6); }
.badge.bad   { background: var(--danger-soft);  color: #be123c; border-color: rgba(253,164,175,0.6); }
.badge.muted-badge { background: var(--bg-muted); color: var(--text-muted); border-color: var(--border); }
[data-theme="dark"] .badge.ok   { color: #6ee7b7; }
[data-theme="dark"] .badge.warn { color: #fcd34d; }
[data-theme="dark"] .badge.bad  { color: #fda4af; }

/* ── Users page ────────────────────────────────────────────── */
.users-add-form {
  display: grid;
  grid-template-columns: 1.5fr 1fr 2fr auto;
  gap: 12px;
  align-items: end;
}
.users-add-form input,
.users-add-form select { width: 100%; }
.users-add-form button { white-space: nowrap; height: 36px; }
@media (max-width: 760px) {
  .users-add-form { grid-template-columns: 1fr; }
}

.btn-link {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}
.btn-link:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}

/* ── Undo button ────────────────────────────────────────────── */
.btn-undo {
  background: var(--bg-canvas);
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 4px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.btn-undo:hover { background: var(--danger); color: white; }

/* ── Rebuild button ────────────────────────────────────────── */
.btn-rebuild {
  background: var(--bg-canvas);
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
}
.btn-rebuild:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}

/* ════════════════════════════════════════════════════════════════════
   DASHBOARD (Phase D)
   ════════════════════════════════════════════════════════════════════ */

.page-hero { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 14px; align-items: end; flex-wrap: wrap;
  background: var(--bg-canvas);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 18px;
}
.filter-bar select, .filter-bar input[type=date], .filter-bar input[type=text] { padding: 7px 10px; font-size: 13px; }
.filter-bar label {
  margin-bottom: 5px; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); font-weight: 600;
}
.btn-clear {
  font-size: 12px; padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-weight: 500;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.btn-clear:hover {
  color: var(--text); border-color: var(--border-strong);
  background: var(--bg-elevated); text-decoration: none;
  transform: none; box-shadow: none;
}

.btn-export {
  background: transparent !important;
  background-image: var(--gradient-card) !important;
  color: var(--text-2) !important;
  border: 1px solid var(--border) !important;
  font-weight: 500;
  box-shadow: none !important;
}
.btn-export:hover {
  background: var(--brand-softer) !important;
  color: var(--brand-hover) !important;
  border-color: var(--border-accent) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12) !important;
}

/* ── KPI strip (Comfortable density — executive headline) ───────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

/* Dashboard variant: 9 cards laid out as 5 + 4 across two clean rows.
   Wide screens get exactly 5 columns; on narrower screens it gracefully
   degrades to 4+4+1 → 3+3+3 → 2+2+2+2+1. Numbers stay readable. */
.kpi-strip--dashboard {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1180px) {
  .kpi-strip--dashboard { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .kpi-strip--dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .kpi-strip--dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi-cell {
  position: relative;
  background: var(--bg-canvas);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px 14px;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              border-color var(--t-base),
              box-shadow var(--t-base);
  animation: kpi-rise 420ms var(--ease-out) both;
}
.kpi-cell::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: var(--border);
  transition: background var(--t-base);
}
.kpi-cell:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.65),       /* main dramatic drop */
    0 8px 16px rgba(0, 0, 0, 0.4),         /* close-in shadow */
    0 0 0 1px var(--border-accent),         /* emerald edge */
    0 0 40px rgba(16, 185, 129, 0.14);      /* outer emerald glow */
  cursor: default;
}
/* Card content lifts slightly faster than the border for a "popping" feel */
.kpi-cell:hover .kpi-value {
  text-shadow: 0 2px 12px rgba(16, 185, 129, 0.18);
}
.kpi-cell.kpi-link { display: block; text-decoration: none; color: inherit; }
.kpi-cell.kpi-link:hover { cursor: pointer; }
.kpi-cell.flag::before    { height: 2px; background: linear-gradient(90deg, var(--warning), transparent); }
.kpi-cell.warn::before    { height: 2px; background: linear-gradient(90deg, var(--danger),  transparent); }
.kpi-cell.success::before { height: 2px; background: linear-gradient(90deg, var(--success), transparent); }
.kpi-cell.flag    { background-image: var(--gradient-warning); }
.kpi-cell.warn    { background-image: var(--gradient-danger); }
.kpi-cell.success { background-image: var(--gradient-success); }

.kpi-label {
  font-size: 10.5px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.55px;
  font-weight: 600;
}
.kpi-value {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 32px; font-weight: 600;
  margin-top: 8px; color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

/* Staggered entry — feels premium without delaying read */
.kpi-strip .kpi-cell:nth-child(1) { animation-delay: 0ms; }
.kpi-strip .kpi-cell:nth-child(2) { animation-delay: 40ms; }
.kpi-strip .kpi-cell:nth-child(3) { animation-delay: 80ms; }
.kpi-strip .kpi-cell:nth-child(4) { animation-delay: 120ms; }
.kpi-strip .kpi-cell:nth-child(5) { animation-delay: 160ms; }
.kpi-strip .kpi-cell:nth-child(6) { animation-delay: 200ms; }

/* ── Dashboard table ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.dashboard-table { font-size: 13px; }
.dashboard-table .mono { background: transparent; padding: 0; }
.dashboard-table tbody tr.row-flagged { background: rgba(245, 158, 11, 0.04); }
.dashboard-table tbody tr.row-flagged:hover td { background: rgba(245, 158, 11, 0.08); }
[data-theme="dark"] .dashboard-table tbody tr.row-flagged { background: rgba(245, 158, 11, 0.06); }

.flag-mark { color: var(--warning); font-weight: 700; margin-right: 4px; }
.link-detail { font-size: 12px; color: var(--brand); }

.store-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-muted);
  color: var(--text-2);
  text-transform: uppercase;
}

/* Per-row alert-membership chips on the home dashboard (Shrey 2026-07-09). */
.alert-cell {
  min-width: 160px;
  max-width: 220px;
  vertical-align: middle;
}
.alert-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 220px;
}
.alert-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.alert-chip:hover { filter: brightness(1.1); text-decoration: none; }
.alert-chip--warn {
  background: rgba(245,158,11,0.12);
  color: #b45309;
  border-color: rgba(245,158,11,0.35);
}
.alert-chip--ok {
  background: rgba(16,185,129,0.12);
  color: #047857;
  border-color: rgba(16,185,129,0.35);
}
[data-theme="dark"] .alert-chip--warn { color: #fbbf24; }
[data-theme="dark"] .alert-chip--ok   { color: #6ee7b7; }
.store-tag.store-i { background: rgba(14,165,233,0.15); color: #0369a1; }
.store-tag.store-m { background: rgba(99,102,241,0.15); color: #4f46e5; }
.store-tag.store-p { background: rgba(16,185,129,0.15); color: #047857; }
.store-tag.store-g { background: rgba(245,158,11,0.15); color: #b45309; }
.store-tag.store-custom { background: var(--bg-muted); color: var(--text-muted); }
[data-theme="dark"] .store-tag.store-i { color: #7dd3fc; }
[data-theme="dark"] .store-tag.store-m { color: #a5b4fc; }
[data-theme="dark"] .store-tag.store-p { color: #6ee7b7; }
[data-theme="dark"] .store-tag.store-g { color: #fcd34d; }

.pay-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
}
.pay-tag.pay-cod { background: rgba(245,158,11,0.18); color: #b45309; }
.pay-tag.pay-pre { background: rgba(99,102,241,0.15); color: #4338ca; }
[data-theme="dark"] .pay-tag.pay-cod { color: #fcd34d; }
[data-theme="dark"] .pay-tag.pay-pre { color: #a5b4fc; }

/* ── Status pills (colours from PDF §5.5) ────────────────────── */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
/* Confirmed family */
.status-pill.st-confirmed-picked-up        { background: #B7E1CD; color: #054a2c; }
.status-pill.st-confirmed-shipped          { background: #D9EAD3; color: #1f5a2e; }
.status-pill.st-confirmed-pending-dispatch { background: #FCE5CD; color: #7a3a07; }
/* Auto confirmed family */
.status-pill.st-auto-confirmed-picked-up        { background: #C9D3EA; color: #1c2c5b; }
.status-pill.st-auto-confirmed-shipped          { background: #D9D2E9; color: #38216b; }
.status-pill.st-auto-confirmed-pending-dispatch { background: #EAD1DC; color: #5a1e3a; }
/* In calling */
.status-pill.st-in-calling { background: #FFF2CC; color: #6f4e00; }
/* Cancelled */
.status-pill.st-cancelled-synced          { background: #EFEFEF; color: #444; }
.status-pill.st-cancelled-caller          { background: #F4CCCC; color: #6b1414; }
.status-pill.st-cancelled-fship-mismatch  { background: #E06666; color: #fff; }
.status-pill.st-auto-cancelled-aged       { background: #E4E4E4; color: #444; }
.status-pill.st-fship-cancelled-post-confirm { background: #EA9999; color: #6b0000; }
.status-pill.st-fship-cancelled-prepaid      { background: #EA9999; color: #6b0000; }
/* Prepaid */
.status-pill.st-prepaid-picked-up         { background: #6FA8DC; color: #fff; }
.status-pill.st-prepaid-shipped           { background: #9FC5E8; color: #0e2e58; }
.status-pill.st-prepaid-pending-dispatch  { background: #CFE2F3; color: #0e2e58; }
/* New + Unknown */
.status-pill.st-new-pending-distribution  { background: var(--bg-muted); color: var(--text-2); }
.status-pill.st-unknown                   { background: #FFB199; color: #6b1414; border: 1px dashed #6b1414; }

[data-theme="dark"] .status-pill {
  /* Dark theme: keep same hues but raise saturation, dim brightness */
  filter: brightness(0.88) saturate(1.15);
}

/* ── Pager ───────────────────────────────────────────────────── */
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 20px; }
.pager a { font-size: 13px; padding: 6px 12px; background: var(--bg-canvas); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pager-info { color: var(--text-muted); font-size: 12.5px; }

/* ── Drilldown ───────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.detail-grid .dl { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.detail-grid .dv { font-size: 13px; margin-top: 3px; color: var(--text); font-weight: 500; }
.detail-grid .dv.muted { color: var(--text-muted); font-weight: 400; }

.raw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.raw-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.raw-head { padding: 10px 14px; background: var(--bg-subtle); border-bottom: 1px solid var(--border-soft); }
.raw-dl { margin: 0; padding: 12px 16px; display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 12px; }
.raw-dl dt { color: var(--text-muted); font-weight: 500; }
.raw-dl dd { margin: 0; color: var(--text); word-break: break-word; }

/* ════════════════════════════════════════════════════════════════════
   ALERTS (Phase E)
   ════════════════════════════════════════════════════════════════════ */

/* ── /alerts hero (title + store picker) ─────────────────────── */
.alerts-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 22px; flex-wrap: wrap;
}
.alerts-store-picker {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.alerts-store-picker label {
  margin-bottom: 0; font-size: 11.5px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.alerts-store-picker select {
  min-width: 190px; padding: 8px 12px; font-size: 13.5px;
}
.store-filter-active {
  display: inline-block; margin-left: 4px;
  font-size: 12.5px; color: var(--brand);
}
.store-filter-active strong { font-weight: 600; }

/* ── /alerts index grid ──────────────────────────────────────── */
.alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.alert-card {
  display: block;
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  box-shadow: var(--shadow-xs);
}
.alert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.alert-card.alert-warn   { border-left-color: var(--warning); }
.alert-card.alert-danger { border-left-color: var(--danger); }

.alert-card-icon  { font-size: 28px; line-height: 1; margin-bottom: 14px; }
.alert-card-count {
  font-size: 32px; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.alert-card-title {
  font-size: 14px; font-weight: 600;
  margin-top: 4px;
  color: var(--text);
}
.alert-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* Tint count colour by tone */
.alert-card.alert-warn   .alert-card-count { color: var(--warning); }
.alert-card.alert-danger .alert-card-count { color: var(--danger); }

/* Delta chip (below the count) — Class-1 rolling delta + Class-2 yday ref */
.alert-card-delta {
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
}
.alert-card-delta.delta-up   { color: #fca5a5; background: rgba(220,38,38,0.10);  }
.alert-card-delta.delta-down { color: #6ee7b7; background: rgba(16,185,129,0.10); }
.alert-card-delta.delta-flat { color: var(--text-muted); background: rgba(148,163,184,0.10); }
.alert-card-delta.delta-none { color: var(--text-muted); background: transparent; font-weight: 500; font-style: italic; }
.alert-card-delta.delta-ref  { color: #93c5fd; background: rgba(59,130,246,0.10); }

/* ── Alert hero (top of /alerts/<slug>) ──────────────────────── */
.alert-hero {
  display: flex; align-items: center; gap: 22px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.alert-hero.alert-warn   { border-left-color: var(--warning); }
.alert-hero.alert-danger { border-left-color: var(--danger); }

.alert-hero-icon { font-size: 36px; line-height: 1; flex-shrink: 0; }
.alert-hero-text { flex: 1; min-width: 0; }
.alert-hero-text h1 { font-size: 22px; }
.alert-hero-text p  { color: var(--text-muted); font-size: 13.5px; margin-top: 6px; }

.alert-hero-count { text-align: right; flex-shrink: 0; }
.alert-hero-count .kpi-value { font-size: 30px; }
.alert-hero.alert-warn   .alert-hero-count .kpi-value { color: var(--warning); }
.alert-hero.alert-danger .alert-hero-count .kpi-value { color: var(--danger); }

/* ── Placeholder page (Phase A only) ──────────────────────────── */
.placeholder {
  text-align: center; padding: 72px 32px;
  max-width: 560px; margin: 48px auto;
}
.placeholder-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 18px;
}
.placeholder h1 { font-size: 28px; margin-bottom: 12px; }
.placeholder p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* ─── Sync Manager ────────────────────────────────────────────────── */
.sync-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}
.sync-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.sync-card-head h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sync-card-head code {
  font-size: 11.5px;
  padding: 1px 5px;
  background: var(--bg-subtle);
  border-radius: 3px;
}

.sync-form { margin-bottom: 14px; }
.sync-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 720px) {
  .sync-row { grid-template-columns: 1fr; }
}
.sync-field { display: flex; flex-direction: column; gap: 5px; }
.sync-field label {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.sync-field input[type=date] {
  width: 100%;
  font-family: 'JetBrains Mono', monospace;
}
.btn-run {
  background: var(--success);
  color: white;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t-fast);
  height: 39px;
  min-width: 120px;
}
.btn-run:hover:not(:disabled) { background: #047857; }
.btn-run:disabled { opacity: 0.45; cursor: not-allowed; }

.sync-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 10px;
}
.sync-meta strong { font-weight: 600; }

.sync-params {
  font-size: 12px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sync-params code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  word-break: break-all;
}

.sync-result-card {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.sync-result-card.sync-result-error {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08), rgba(225, 29, 72, 0.02));
  border-color: rgba(225, 29, 72, 0.3);
}
.sync-result-headline {
  font-size: 15px;
  margin-bottom: 4px;
}
.sync-result-detail {
  font-size: 12.5px;
  color: var(--text-2);
}

.sync-no-runs {
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
}

.sync-raw {
  margin-top: 8px;
  font-size: 12.5px;
}
.sync-raw summary {
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 0;
}
.sync-raw pre {
  margin-top: 6px;
  padding: 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.5;
}

/* ─── Reconciliation heatmap ───────────────────────────────────── */
.reconciliation {
  margin: 24px 0;
}
.reconciliation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.reconciliation-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.reconciliation-head p {
  margin: 0;
  font-size: 12.5px;
  max-width: 720px;
  line-height: 1.5;
}
.reconciliation-ref {
  font-size: 12.5px;
  white-space: nowrap;
  padding-top: 2px;
}
.reconciliation-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.reconciliation-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.reconciliation-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.reconciliation-grid-wrap {
  overflow-x: auto;
}
.reconciliation-grid {
  border-collapse: separate;
  border-spacing: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  width: 100%;
}
.reconciliation-grid thead th {
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  padding-bottom: 4px;
  white-space: nowrap;
}
.reconciliation-grid thead th.rg-store-col {
  text-align: left;
  padding-left: 4px;
}
.reconciliation-grid thead th.rg-day-col span {
  display: inline-block;
  transform: rotate(-45deg);
  transform-origin: center;
  font-size: 9px;
}
.reconciliation-grid .rg-store-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 4px;
  white-space: nowrap;
  min-width: 180px;
}
.reconciliation-grid .rg-store-label {
  font-family: var(--font-sans, system-ui);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text);
}
.reconciliation-grid .rg-cell {
  /* Light mode: dark text on pale → saturated emerald. Readable. */
  background: rgba(16, 185, 129, calc(0.15 + var(--rg-intensity, 0) * 0.55));
  color: #064e3b;
  padding: 6px 4px;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  font-size: 11.5px;
  min-width: 38px;
  vertical-align: middle;
  transition: transform 0.1s ease;
}
/* Dark mode: white text + subtle shadow so legible across all intensities.
   Dark text was previously unreadable on saturated emerald bg. */
[data-theme="dark"] .reconciliation-grid .rg-cell {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .reconciliation-grid .rg-cell.rg-zero {
  color: var(--text-muted);
  text-shadow: none;
}

/* ─── Combined table (single wide view, 9 source-store columns) ──── */
.reconciliation-combined {
  font-size: 11px;
}
.reconciliation-combined th.rg-store-group {
  text-align: center;
  font-size: 11px;
  padding: 6px 6px 4px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.reconciliation-combined th.rg-source-col {
  font-size: 9.5px;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 4px 4px;
  text-align: center;
  color: var(--text-muted);
  background: transparent;
}
.reconciliation-combined .rg-cell {
  padding: 5px 3px;
  font-size: 10.5px;
  min-width: 42px;
}
/* Source-tint hints — barely-there tint so eye can group cols by source.
   The main bg comes from --rg-intensity emerald, this is a low-alpha overlay. */
.reconciliation-combined .rg-src-shopify {
  /* SHOPIFY = emerald (matches default) */
}
.reconciliation-combined .rg-src-fship {
  /* FShip = subtle amber tint when zero, otherwise emerald */
}
.reconciliation-combined .rg-src-calling {
  /* Calling = subtle blue tint when zero, otherwise emerald */
}
/* Divider after each store group (right border on the CALL column) */
.reconciliation-combined .rg-store-divider {
  border-right: 2px solid var(--border, rgba(255,255,255,0.18));
}
.reconciliation-combined th.rg-store-divider {
  border-right: 2px solid var(--border, rgba(255,255,255,0.18));
}
.reconciliation-combined tbody tr:hover td {
  background-color: rgba(255,255,255,0.02);
}
.reconciliation-grid .rg-cell:hover {
  transform: scale(1.05);
  cursor: default;
}
.reconciliation-grid .rg-zero {
  background: var(--bg-muted);
  color: var(--text-muted);
}
.reconciliation-grid .rg-dash {
  opacity: 0.4;
}
.reconciliation-grid .rg-total-col {
  text-align: right;
  padding-right: 4px;
}
.reconciliation-grid .rg-total-cell {
  text-align: right;
  font-weight: 600;
  padding: 6px 4px 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

/* Reconciliation page — window selector + stats strip */
.reconciliation-window {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 14px;
  font-size: 13px;
}
.reconciliation-window label {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.reconciliation-window select {
  padding: 6px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.reconciliation-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

/* ─── Reconciliation grid — PORTRAIT orientation ────────────────── */
/* Dates down the left; stores across the top. Overrides the
   landscape-style header rotations + tight cell widths. */
.reconciliation-grid--portrait {
  width: auto;
  min-width: 480px;
  border-spacing: 4px;
}
.reconciliation-grid--portrait thead th {
  text-align: center;
  padding: 8px 12px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.reconciliation-grid--portrait thead th.rg-date-col {
  text-align: left;
  padding-left: 4px;
  min-width: 110px;
}
.reconciliation-grid--portrait thead th.rg-store-col {
  display: table-cell;
  align-items: unset;
  gap: 0;
  padding: 8px 16px;
  min-width: 110px;
  white-space: nowrap;
}
.reconciliation-grid--portrait thead .rg-store-col .store-tag {
  margin-right: 6px;
  vertical-align: middle;
}
.reconciliation-grid--portrait thead .rg-store-col .rg-store-label {
  font-family: var(--font-sans, system-ui);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: var(--text);
  text-transform: none;
  vertical-align: middle;
}
.reconciliation-grid--portrait .rg-date-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  padding: 7px 8px 7px 4px;
  white-space: nowrap;
  text-align: left;
  min-width: 110px;
}
.reconciliation-grid--portrait .rg-cell {
  min-width: 100px;
  padding: 8px 12px;
  font-size: 12.5px;
}
.reconciliation-grid--portrait .rg-total-cell {
  padding: 7px 12px 7px 14px;
  font-size: 12.5px;
  min-width: 90px;
  border-left: 1px solid var(--border);
  text-align: right;
}
.reconciliation-grid--portrait tfoot td {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-weight: 600;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  text-align: right;
}
.reconciliation-grid--portrait tfoot .rg-foot-label {
  text-align: left;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-size: 11px;
}
.reconciliation-grid--portrait tfoot .rg-grand-total {
  color: var(--brand);
  border-left: 1px solid var(--border);
}

/* Reconciliation — custom date range */
.reconciliation-custom-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.reconciliation-custom-range[hidden] { display: none; }
.reconciliation-custom-range label {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.reconciliation-custom-range input[type="date"] {
  padding: 6px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}
.reconciliation-custom-range .btn-run-small {
  padding: 6px 14px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  margin-left: 4px;
}
.reconciliation-custom-range .btn-run-small:hover {
  background: var(--brand-hover);
}

/* ────────────────────────────────────────────────────────────────
   Lifecycle funnel
   ──────────────────────────────────────────────────────────────── */
.lifecycle-wrap {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-top: 18px;
  overflow-x: auto;
}
.lifecycle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.lifecycle-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}
.lifecycle-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.lifecycle-table tbody tr:last-child td { border-bottom: none; }
.lifecycle-table tbody tr:hover td { background: var(--bg-subtle); }

.lifecycle-bucket-col {
  width: 38%;
  min-width: 280px;
}
.lifecycle-num-col {
  text-align: right;
  width: 14%;
  font-variant-numeric: tabular-nums;
}
.lifecycle-total-col {
  border-left: 1px solid var(--border);
  background: var(--bg-subtle);
}
.lifecycle-store-code {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.lifecycle-store-name {
  font-size: 11px;
  font-weight: 400;
}
.lifecycle-bucket-num {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  margin-right: 10px;
  background: var(--bg-muted);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}
.lifecycle-bucket-label {
  font-weight: 500;
}
.lifecycle-cell-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.lifecycle-cell-link:hover {
  text-decoration: underline;
}
.lifecycle-cell-zero {
  color: var(--text-muted);
  opacity: 0.5;
}
.lifecycle-anomaly-row .lifecycle-bucket-num {
  background: #fde68a;
  color: #78350f;
}
html[data-theme="dark"] .lifecycle-anomaly-row .lifecycle-bucket-num {
  background: #78350f;
  color: #fde68a;
}
.lifecycle-anomaly-row td {
  background: rgba(253, 230, 138, 0.08);
}
.lifecycle-custom-row .lifecycle-bucket-label {
  font-size: 12.5px;
}
.lifecycle-footnote {
  font-size: 11px;
  font-style: italic;
}
.lifecycle-total-row td {
  background: var(--bg-muted);
  font-size: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.lifecycle-refresh {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.lifecycle-refresh-status {
  white-space: nowrap;
}
.lifecycle-refresh-auto {
  margin-left: 4px;
}
.lifecycle-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.lifecycle-refresh-btn:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════════════════
   ▸▸▸  PHASE D — MOTION + POLISH  ◂◂◂
   Premium micro-interactions, scoped tight. Respects reduced-motion.
   ════════════════════════════════════════════════════════════════════ */

/* Page hero — prominent emerald accent left-bar (Linear/Vercel hallmark) */
.page-hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(16,185,129,0.06) 0%, transparent 45%),
    var(--bg-canvas);
  background-image:
    linear-gradient(135deg, rgba(16,185,129,0.06) 0%, transparent 45%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 22px;
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand) 0%, transparent 100%);
  box-shadow: 0 0 24px var(--brand-glow);
}
.page-hero h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

/* Live-data pulse on the brand mark — premium "this is real-time" cue */
.topnav-brand a::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--brand);
  border-radius: 50%;
  margin-left: 10px;
  box-shadow: 0 0 0 0 var(--brand-glow);
  animation: live-pulse 2.4s var(--ease-out) infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Premium scrollbars (dark, slim) */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 8px;
  border: 2px solid var(--bg-page);
}
*::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Selection highlight — emerald, premium */
::selection {
  background: var(--brand-soft);
  color: var(--brand-hover);
}

/* Focus ring — emerald glow on every interactive element */
a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--brand-glow);
  border-color: var(--brand) !important;
}

/* Subtle link underline — left-to-right grow on hover */
a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--brand-hover); }

/* Card hover lift — applies to .card and any .upload-card */
.card:hover, .upload-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.6),
    0 10px 18px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--border-accent),
    0 0 36px rgba(16, 185, 129, 0.10);
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes kpi-rise {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes slide-up {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--brand-glow); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

/* Apply slide-up to main page content for smooth route entry */
.container > * { animation: fade-in 320ms var(--ease-out) both; }
.container > h1, .container > .page-hero { animation: slide-up 380ms var(--ease-out) both; }

/* Pulse the active alert badges to draw attention */
.kpi-cell.warn .kpi-value,
.kpi-cell.flag .kpi-value {
  position: relative;
}

/* Numeric values get a tabular monospace look across the board */
.tabular, .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* Hairline divider — Linear-style */
.hairline {
  height: 1px; width: 100%;
  background: var(--border);
  margin: 18px 0;
}

/* Pill / tag base — used by store-tag, pay-tag, etc. */
.store-tag, .pay-tag {
  display: inline-block;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Reduced motion — kill all animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print: strip backgrounds for legibility */
@media print {
  body { background: white; color: black; }
  .topnav, .filter-bar, button, .btn, .btn-export, .btn-clear { display: none !important; }
  .card, .kpi-cell, table.data { box-shadow: none; border-color: #ddd; }
}

/* ════════════════════════════════════════════════════════════════════
   ▸▸▸  OVERVIEW PAGE — Mega-KPIs + chart sections  ◂◂◂
   ════════════════════════════════════════════════════════════════════ */

.mega-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 1180px) {
  .mega-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .mega-kpi-grid { grid-template-columns: 1fr; }
}

.mega-kpi {
  position: relative;
  background: var(--bg-canvas);
  background-image:
    radial-gradient(120% 80% at 100% 0%, rgba(16, 185, 129, 0.07) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px 20px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.025) inset,
    0 8px 22px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.20);
  transition: transform 320ms var(--ease-out),
              border-color var(--t-base),
              box-shadow 320ms var(--ease-out),
              background-image var(--t-base);
  animation: kpi-rise 520ms var(--ease-out) both;
  will-change: transform;
}
/* Animated top accent line — emerald sweep on hover */
.mega-kpi::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg,
              transparent 0%,
              rgba(16, 185, 129, 0.55) 40%,
              rgba(16, 185, 129, 0.85) 50%,
              rgba(16, 185, 129, 0.55) 60%,
              transparent 100%);
  background-size: 220% 100%;
  background-position: 100% 0;
  opacity: 0.45;
  transition: opacity var(--t-base), background-position 900ms var(--ease-out);
  z-index: 2;
}
/* Decorative corner gloss — deepens the glassy feel */
.mega-kpi::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: 180px; height: 180px;
  background: radial-gradient(circle at top right,
              rgba(16, 185, 129, 0.10) 0%,
              transparent 70%);
  pointer-events: none;
  opacity: 0.6;
  transition: opacity var(--t-base), transform 600ms var(--ease-out);
  z-index: 1;
}
.mega-kpi > * { position: relative; z-index: 3; }
.mega-kpi:hover {
  border-color: var(--border-accent);
  transform: translateY(-5px);
  background-image:
    radial-gradient(120% 80% at 100% 0%, rgba(16, 185, 129, 0.13) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 26px 60px rgba(0, 0, 0, 0.55),
    0 10px 22px rgba(0, 0, 0, 0.42),
    0 0 0 1px var(--border-accent),
    0 0 48px rgba(16, 185, 129, 0.16);
}
.mega-kpi:hover::before {
  opacity: 1;
  background-position: 0% 0;
}
.mega-kpi:hover::after {
  opacity: 1;
  transform: scale(1.08);
}
.mega-kpi:hover .mega-kpi-label { color: var(--text-2); letter-spacing: 0.8px; }
.mega-kpi:hover .mega-kpi-value { transform: translateY(-1px); }
.mega-kpi-grid .mega-kpi:nth-child(1) { animation-delay:   0ms; }
.mega-kpi-grid .mega-kpi:nth-child(2) { animation-delay:  60ms; }
.mega-kpi-grid .mega-kpi:nth-child(3) { animation-delay: 120ms; }
.mega-kpi-grid .mega-kpi:nth-child(4) { animation-delay: 180ms; }
.mega-kpi-grid .mega-kpi:nth-child(5) { animation-delay: 240ms; }
.mega-kpi-grid .mega-kpi:nth-child(6) { animation-delay: 300ms; }
.mega-kpi-grid .mega-kpi:nth-child(7) { animation-delay: 360ms; }
.mega-kpi-grid .mega-kpi:nth-child(8) { animation-delay: 420ms; }

.mega-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.65px;
  font-weight: 600;
  margin-bottom: 10px;
  transition: color var(--t-base), letter-spacing var(--t-base);
}

.mega-kpi-value {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--text) 0%, rgba(241, 245, 249, 0.78) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 280ms var(--ease-out);
}
.mega-kpi-value .kpi-unit {
  font-size: 22px;
  color: var(--text-muted);
  margin-left: 2px;
  font-weight: 500;
}

.mega-kpi-sub {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 8px;
  letter-spacing: 0.1px;
}
/* Two-line "label : value" sub for Confirmation / Cancel cards. */
.kpi-two-line { display: flex; flex-direction: column; gap: 3px; }
.kpi-two-line .kpi-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kpi-two-line .kpi-line-lbl { color: var(--text-muted); }
.kpi-two-line .kpi-line-val { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Delta pill — colored chip showing Δ vs prior period ──────── */
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  letter-spacing: -0.01em;
}
.delta-pill .delta-prev {
  font-weight: 400;
  opacity: 0.65;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0;
}
.delta-good {
  background: var(--success-soft);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.22);
}
.delta-bad {
  background: var(--danger-soft);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.22);
}
.delta-neutral {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Chart cards ────────────────────────────────────────────── */
.chart-card {
  padding: 18px 20px;
  margin-top: 16px;
}
.chart-card .chart-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px;
}
.chart-card .chart-header h3,
.chart-card .chart-header h4 {
  margin: 0 0 4px 0;
}

/* 4-up mini-chart grid (lifecycle lag) */
.lifecycle-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 6px;
}
@media (max-width: 1180px) {
  .lifecycle-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .lifecycle-mini-grid { grid-template-columns: 1fr; }
}
.chart-card-mini { padding: 14px 16px; margin-top: 0; }

/* ── Order funnel ───────────────────────────────────────────── */
.funnel {
  display: flex; flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}
.funnel-row {
  display: grid;
  grid-template-columns: 170px 1fr 140px;
  gap: 18px;
  align-items: center;
}
@media (max-width: 800px) {
  .funnel-row { grid-template-columns: 1fr; gap: 6px; }
  .funnel-row-stats { text-align: left !important; }
}

.funnel-row-meta {
  text-align: right;
}
.funnel-stage {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.funnel-drop {
  font-size: 11px;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  margin-top: 4px;
}

.funnel-bar-wrap {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 38px;
  overflow: hidden;
}
.funnel-bar {
  position: relative;
  height: 100%;
  min-width: 6%;
  background: linear-gradient(90deg,
              rgba(16, 185, 129, 0.40) 0%,
              rgba(16, 185, 129, 0.18) 100%);
  border-right: 2px solid var(--brand);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.12) inset,
              0 0 32px rgba(16, 185, 129, 0.08);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 12px;
  animation: funnel-fill 700ms var(--ease-out) both;
  transform-origin: left center;
}
.funnel-bar-count {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.funnel-row-stats {
  text-align: left;
}
.funnel-pct-of-top {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.funnel-pct-of-prev {
  font-size: 11px;
  margin-top: 2px;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

/* Staggered funnel-row entrance */
.funnel-row:nth-child(1) .funnel-bar { animation-delay:  20ms; }
.funnel-row:nth-child(2) .funnel-bar { animation-delay: 120ms; }
.funnel-row:nth-child(3) .funnel-bar { animation-delay: 220ms; }
.funnel-row:nth-child(4) .funnel-bar { animation-delay: 320ms; }
.funnel-row:nth-child(5) .funnel-bar { animation-delay: 420ms; }

@keyframes funnel-fill {
  0%   { transform: scaleX(0); opacity: 0.4; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* ── Sparklines inside mega-KPI cards ────────────────────────── */
.sparkline {
  display: block;
  width: 100%;
  height: 30px;
  margin: 6px 0 10px;
  overflow: visible;
  opacity: 0.95;
  animation: fade-in 600ms var(--ease-out) both;
  animation-delay: 320ms;
}
.sparkline-empty {
  height: 30px;
  margin: 6px 0 10px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 6px,
      var(--border-soft) 6px 7px);
  border-radius: 4px;
  opacity: 0.4;
}

/* ── Overview meta chip ("Updated 2 min ago" + refresh) ──────── */
.overview-meta {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.overview-meta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.overview-meta-chip .meta-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 var(--brand-glow);
  animation: live-pulse 2.4s var(--ease-out) infinite;
}

/* ── Zone small-multiples grid (Zone TAT + RTO per-zone) ──────── */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1280px) { .zone-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px)  { .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .zone-grid { grid-template-columns: 1fr; } }

.zone-card {
  position: relative;
  background: var(--bg-canvas);
  background-image: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              border-color var(--t-base), box-shadow var(--t-base);
  animation: kpi-rise 460ms var(--ease-out) both;
}
.zone-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.5),
    0 6px 14px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--border-strong);
}
.zone-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
}
.zone-card-good::before { background: linear-gradient(90deg, #10b981, transparent); }
.zone-card-warn::before { background: linear-gradient(90deg, #f59e0b, transparent); }
.zone-card-bad::before  { background: linear-gradient(90deg, #ef4444, transparent); }

.zone-card-good { background-image: var(--gradient-success); }
.zone-card-warn { background-image: var(--gradient-warning); }
.zone-card-bad  { background-image: var(--gradient-danger);  }

.zone-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.zone-card-name {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: -0.005em; color: var(--text);
}
.zone-card-sla {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.4px;
}
.zone-card-value {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.1;
  color: var(--text);
  margin: 4px 0 0;
}
.zone-card-value .kpi-unit { font-size: 16px; color: var(--text-muted); margin-left: 2px; font-weight: 500; }
.zone-card-sub {
  font-size: 10.5px; letter-spacing: 0.1px;
}
.zone-card-foot {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 5px;
  font-size: 11px;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  border-top: 1px solid var(--border-soft);
  padding-top: 8px; margin-top: 4px;
}
.zone-stat-good { color: #34d399; font-weight: 600; }
.zone-stat-bad  { color: #fb7185; font-weight: 600; }

/* Stagger entry */
.zone-grid .zone-card:nth-child(1) { animation-delay:   0ms; }
.zone-grid .zone-card:nth-child(2) { animation-delay:  60ms; }
.zone-grid .zone-card:nth-child(3) { animation-delay: 120ms; }
.zone-grid .zone-card:nth-child(4) { animation-delay: 180ms; }
.zone-grid .zone-card:nth-child(5) { animation-delay: 240ms; }

/* ── Courier × Zone TAT breach matrix (in-flight TAT alerts) ── */
.tat-matrix-wrap { margin: 16px 0 22px; }
.tat-matrix-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.tat-matrix-head h2 { font-size: 15px; margin: 0; color: var(--text, #e7ecf3); }
.tat-matrix-head .muted { font-size: 12px; }
.tat-matrix { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tat-matrix th, .tat-matrix td { border: 1px solid rgba(255,255,255,0.08); padding: 7px 12px; text-align: center; }
.tat-matrix thead th { background: rgba(255,255,255,0.04); color: var(--text-muted, #9aa3ad); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.3px; }
.tat-matrix .tm-corner, .tat-matrix .tm-courier { text-align: left; font-weight: 600; color: var(--text, #e7ecf3); background: rgba(255,255,255,0.02); }
.tat-matrix .tm-cell { color: var(--text, #e7ecf3); }
.tat-matrix .tm-zero { color: rgba(255,255,255,0.18); }
.tat-matrix .tm-hot  { background: rgba(239, 68, 68, 0.12); color: #fca5a5; font-weight: 600; }
.tat-matrix .tm-total { font-weight: 700; background: rgba(255,255,255,0.04); }
.tat-matrix tfoot .tm-total, .tat-matrix tfoot .tm-courier { background: rgba(255,255,255,0.06); }
.tat-matrix .tm-grand { font-weight: 800; background: rgba(239, 68, 68, 0.18); color: #fecaca; }

/* TAT matrix action buttons */
.tat-matrix .tm-actions { text-align: center; white-space: nowrap; }
.tm-btn { display: inline-block; padding: 4px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; text-decoration: none; margin: 0 2px; transition: filter 0.12s ease; }
.tm-btn:hover { filter: brightness(1.15); }
.tm-btn-view { background: #10b981; color: #04231a; }
.tm-btn-csv  { background: rgba(255,255,255,0.08); color: var(--text, #e7ecf3); border: 1px solid rgba(255,255,255,0.14); }

/* Per-zone action buttons in the TAT matrix footer */
.tm-zone-num { margin-bottom: 5px; }
.tm-zone-actions { display: flex; gap: 3px; justify-content: center; }
.tm-btn-sm { padding: 2px 7px; font-size: 11px; margin: 0; }

/* Clickable Overview KPI cards */
.mega-kpi-link { text-decoration: none; color: inherit; cursor: pointer; display: block; position: relative; }
.mega-kpi-link:hover { border-color: rgba(16,185,129,0.45); transform: translateY(-2px); transition: transform 0.12s ease, border-color 0.12s ease; }
.kpi-open-hint { font-size: 11px; opacity: 0; color: #10b981; transition: opacity 0.12s ease; margin-left: 2px; }
.mega-kpi-link:hover .kpi-open-hint { opacity: 1; }

/* TAT matrix zone SLA in header */
.tat-matrix thead .tm-sla { font-weight: 400; opacity: 0.6; font-size: 10px; }

/* Zone / courier filter badges in the alert hero (matrix View drill-in) */
.alert-hero-filters { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-filter-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.10); color: var(--text, #e7ecf3);
  border: 1px solid rgba(255,255,255,0.18);
}
.hero-filter-badge.hero-filter-zone { background: rgba(16,185,129,0.16); color: #6ee7b7; border-color: rgba(16,185,129,0.4); }

/* Overview order-search panel */
.ov-search {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 18px; padding: 8px 12px;
  background: var(--bg-canvas, #14161a); border: 1px solid var(--border-soft, rgba(255,255,255,0.08));
  border-radius: 10px;
}
.ov-search-icon { font-size: 14px; opacity: 0.7; }
.ov-search input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text, #e7ecf3); font-size: 14px; padding: 6px 4px;
}
.ov-search input::placeholder { color: var(--text-muted, #6b7280); }
.ov-search button {
  padding: 7px 18px; border-radius: 7px; border: none; cursor: pointer;
  background: #10b981; color: #04231a; font-weight: 600; font-size: 13px;
  transition: filter 0.12s ease;
}
.ov-search button:hover { filter: brightness(1.1); }

/* ════ TRENDS — lifecycle lead-time ════ */
.lt-section-title { margin: 26px 0 12px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.chart-window-note {
  margin: -8px 0 12px; padding: 8px 12px;
  background: rgba(255,255,255,0.02); border-left: 3px solid var(--border-accent);
  border-radius: 4px; font-size: 12px; line-height: 1.5;
}
.chart-window-note strong { color: var(--text); font-weight: 600; margin-right: 4px; }
.chart-window-note code   { background: rgba(255,255,255,0.05); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.lt-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 20px 24px; border-radius: 14px; margin-bottom: 20px; border: 1px solid var(--border-soft); background: var(--bg-canvas); position: relative; overflow: hidden; }
.lt-hero::before { content:""; position:absolute; top:0; left:0; right:0; height:4px; }
.lt-hero.good::before { background: linear-gradient(90deg,#10b981,#34d399); }
.lt-hero.bad::before  { background: linear-gradient(90deg,#ef4444,#f87171); }
.lt-hero.flat::before { background: linear-gradient(90deg,#64748b,#94a3b8); }
.lt-hero-main { min-width: 200px; }
.lt-hero-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); font-weight: 600; }
.lt-hero-value { font-size: 52px; font-weight: 800; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.lt-unit { font-size: 20px; font-weight: 600; color: var(--text-muted); margin-left: 6px; }
.lt-hero-delta { font-size: 14px; font-weight: 600; margin-top: 4px; }
.lt-hero-delta.down { color: #34d399; }
.lt-hero-delta.up   { color: #f87171; }
.lt-hero-delta.flat { color: var(--text-muted); }
.lt-hero-verdict { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.lt-verdict-line { font-size: 14px; color: var(--text); }
.lt-verdict-sub  { font-size: 12px; margin: -4px 0 6px 66px; letter-spacing: 0.02em; }
.lt-verdict-sub strong { color: var(--text); font-weight: 700; margin-right: 3px; }
.lt-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-right: 6px; letter-spacing: 0.3px; }
.lt-pill.warn { background: rgba(245,158,11,0.16); color: #fbbf24; }
.lt-pill.bad  { background: rgba(239,68,68,0.14); color: #f87171; }
.lt-pill.good { background: rgba(16,185,129,0.16); color: #34d399; }

.pipeline-strip { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pipe-stage { flex: 1; min-width: 160px; text-decoration: none; color: inherit; background: var(--bg-canvas); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; transition: transform .12s ease, border-color .12s ease; }
.pipe-stage:hover { transform: translateY(-2px); border-color: rgba(16,185,129,0.4); }
.pipe-stage.bottleneck { border-color: rgba(245,158,11,0.55); background: rgba(245,158,11,0.06); }
.pipe-stage-key { font-size: 12px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-muted); display:flex; align-items:center; gap:6px; }
.pipe-flag { font-size: 9px; font-weight: 700; background: rgba(245,158,11,0.2); color: #fbbf24; padding: 1px 6px; border-radius: 4px; letter-spacing: 0.3px; }
.pipe-stage-label { font-size: 12.5px; color: var(--text); margin: 3px 0 6px; }
.pipe-stage-val { font-size: 30px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.pipe-unit { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.pipe-stage-delta { font-size: 12px; font-weight: 600; margin-top: 4px; }
.pipe-stage-delta.down { color: #34d399; } .pipe-stage-delta.up { color: #f87171; } .pipe-stage-delta.flat { color: var(--text-muted); }
.pipe-stage-owner { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.pipe-arrow { display: flex; align-items: center; color: var(--text-muted); font-size: 20px; opacity: 0.5; }

.pipe-zone-split { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-soft); }
.pipe-zone-cap { font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.pipe-zone-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; padding: 2px 0; }
.pz-name { color: var(--text-muted); }
.pz-days { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pz-unit { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-left: 1px; }

.stage-chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stage-chart-card { padding: 14px 16px; }
.stage-chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stage-read { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.3px; }
.stage-read.good { background: rgba(16,185,129,0.16); color: #34d399; }
.stage-read.bad  { background: rgba(239,68,68,0.14); color: #f87171; }
.stage-read.flat { background: rgba(120,120,120,0.14); color: var(--text-muted); }
@media (max-width: 760px) { .stage-chart-grid { grid-template-columns: 1fr; } }

/* ════ TRENDS — delivery performance ════ */
.pipe-p2d { flex: 1.4; min-width: 200px; }
.p2d-zone-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed var(--border-soft); }
.p2d-zone-row:last-child { border-bottom: none; }
.p2d-zone-name { color: var(--text-muted); }
.p2d-zone-days { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.delperf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.delperf-grid > .delperf-card:first-child { grid-column: 1 / -1; }  /* zone full width */
.delperf-card { padding: 14px 16px; }
.delperf-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.delperf-head h4 { margin: 0; font-size: 14px; }
.delperf-head .muted { font-size: 11px; }
.delperf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.delperf-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); font-weight: 600; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border-soft); }
.delperf-table th.num, .delperf-table td.num { text-align: right; }
.delperf-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
.delperf-table tr:last-child td { border-bottom: none; }
.delperf-table tr.low-sample { opacity: 0.55; }
.ls-tag { font-size: 9px; background: rgba(120,120,120,0.2); color: var(--text-muted); padding: 1px 5px; border-radius: 4px; }
.del-bar-wrap { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; width: 150px; height: 18px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.del-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.del-bar.hi  { background: rgba(16,185,129,0.45); }
.del-bar.mid { background: rgba(245,158,11,0.45); }
.del-bar.lo  { background: rgba(239,68,68,0.45); }
.del-bar-val { position: relative; z-index: 1; padding-right: 7px; font-weight: 700; font-size: 12px; color: var(--text); }
@media (max-width: 760px) { .delperf-grid { grid-template-columns: 1fr; } }

/* TRENDS — delivery trend chart grid */
.trend-chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trend-chart-card { padding: 14px 16px; }
.trend-chart-card.span-2 { grid-column: 1 / -1; }
.trend-chart-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.trend-chart-head h4 { margin: 0; font-size: 14px; }
.trend-chart-head .muted { font-size: 11px; }
@media (max-width: 760px) { .trend-chart-grid { grid-template-columns: 1fr; } }

/* TRENDS — chart isolation chips */
.chart-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.tc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid var(--border-soft); background: transparent; color: var(--text-muted); transition: all 0.12s ease; }
.tc-chip:hover { border-color: rgba(16,185,129,0.4); }
.tc-chip.active { background: rgba(255,255,255,0.08); color: var(--text); border-color: rgba(255,255,255,0.2); }

/* O2P COD/Prepaid segmented toggle */
.o2p-pay-toggle { display: inline-flex; border: 1px solid var(--border-soft); border-radius: 999px; overflow: hidden; margin-left: auto; }
.o2p-pay-btn { padding: 3px 12px; font-size: 11px; font-weight: 700; cursor: pointer; border: 0; background: transparent; color: var(--text-muted); transition: all 0.12s ease; }
.o2p-pay-btn:not(:last-child) { border-right: 1px solid var(--border-soft); }
.o2p-pay-btn.active { background: rgba(16,185,129,0.16); color: #34d399; }
.o2p-pay-toggle.locked { opacity: 0.65; }
.o2p-pay-toggle.locked .o2p-pay-btn { cursor: not-allowed; }

/* Trends page-level scope toggle: Shopify / Abandoned / Both */
.scope-toggle { display: inline-flex; border: 1px solid var(--border-soft); border-radius: 999px; overflow: hidden; }
.scope-btn { padding: 6px 16px; font-size: 12px; font-weight: 700; cursor: pointer; border: 0; background: transparent; color: var(--text-muted); transition: all 0.12s ease; letter-spacing: 0.02em; }
.scope-btn:not(:last-child) { border-right: 1px solid var(--border-soft); }
.scope-btn.active { background: rgba(16,185,129,0.16); color: #34d399; }
.scope-btn:hover:not(.active) { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.tc-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* TRENDS — payment donuts */
.pay-donuts { display: flex; gap: 18px; justify-content: space-around; align-items: center; padding: 14px 0; flex-wrap: wrap; }
.pay-donut { text-align: center; }
.pay-donut canvas { display: block; margin: 0 auto; }
.pay-donut-label { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 8px; }
.pay-donut-sub { font-size: 11px; margin-top: 2px; }

/* ═══ Bulk cancel — dashboard admin action ═══════════════════════════════ */
.cancel-col { text-align: center; padding: 6px !important; }
.cancel-col input[type="checkbox"] { cursor: pointer; }

.btn-danger {
  background: #dc2626; color: #fff; border: 1px solid #b91c1c;
  border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background 0.12s;
}
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { background: rgba(220,38,38,0.35); cursor: not-allowed; }
.btn-warn {
  background: #d97706; color: #fff; border: 1px solid #b45309;
  border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background 0.12s; padding: 6px 12px;
}
.btn-warn:hover { background: #b45309; }
.btn-warn:disabled { background: rgba(217,119,6,0.35); cursor: not-allowed; }

/* Inline header controls — sits in the last column of the table header,
 * so the action is right next to the "Select all" checkbox and disappears
 * cleanly when nothing is selected. Buttons hidden until at least 1 row picked. */
.cancel-head-controls {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
}
.cancel-select-all-label {
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer; user-select: none;
}
.cancel-head-btn {
  padding: 3px 10px; font-size: 11px; font-weight: 700;
  border-radius: 5px; cursor: pointer; line-height: 1.4;
}
.cancel-head-btn[hidden] { display: none !important; }

/* Modal */
.cancel-modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
/* CSS `display: flex` above overrides the browser's built-in style for
 * `hidden`, which is why the close/backdrop clicks looked like no-ops even
 * though `modal.hidden = true` was firing. This restores the hide-behavior. */
.cancel-modal-backdrop[hidden] { display: none !important; }
.cancel-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  background: var(--bg-canvas); border: 1px solid var(--border);
  border-radius: 12px; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.cancel-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.cancel-modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.cancel-modal-close {
  background: transparent; border: 0; color: var(--text-muted);
  font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px;
}
.cancel-modal-body { padding: 16px 20px; overflow-y: auto; }
.cancel-modal-note {
  padding: 10px 12px; background: rgba(245,158,11,0.08);
  border-left: 3px solid #f59e0b; border-radius: 4px;
  font-size: 12.5px; margin-bottom: 14px; line-height: 1.5;
}
.cancel-modal-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  max-height: 180px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; background: rgba(255,255,255,0.02);
}
.cancel-modal-list li { padding: 3px 0; font-size: 12.5px; }
.cancel-modal-list code {
  background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: 3px;
}
.cancel-modal-label { display: block; margin: 10px 0 4px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.cancel-modal-label code { background: rgba(255,255,255,0.05); padding: 1px 5px; border-radius: 3px; }
.cancel-modal-input {
  width: 100%; padding: 8px 10px; font-size: 13px;
  background: rgba(255,255,255,0.03); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
}
.cancel-modal-input:focus { outline: none; border-color: var(--border-accent); }
.cancel-modal-error {
  margin-top: 10px; padding: 8px 10px; background: rgba(239,68,68,0.14);
  border: 1px solid rgba(239,68,68,0.35); border-radius: 6px;
  font-size: 12.5px; color: #f87171;
}
.cancel-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--border);
}

/* Per-row Cancel button — small red text-button on every non-terminal order */
.btn-cancel-row {
  background: rgba(220,38,38,0.10); color: #f87171;
  border: 1px solid rgba(220,38,38,0.35);
  border-radius: 4px; padding: 2px 8px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all 0.12s ease;
}
.btn-cancel-row:hover { background: rgba(220,38,38,0.22); color: #fca5a5; }

/* ── Bad Pincodes ─────────────────────────────────────────────────── */
.zone-baseline-row { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.zone-baseline-cell {
  flex:1 1 120px; padding:12px 16px; border-radius:8px;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.14);
}
.zbl-zone { font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:#64748b; }
.zbl-pct  { font-size:24px; font-weight:600; font-variant-numeric:tabular-nums; margin-top:4px; }
.chip--warn { background: rgba(217,119,6,0.14); color:#d97706; border-color: rgba(217,119,6,0.3); }

/* ── Per-row [NC] button (Move to No Courier Found) ─────────────────── */
.nc-row-btn {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(217,119,6,0.5);
  background: rgba(217,119,6,0.14);
  color: #fbbf24;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  letter-spacing: 0.02em;
}
.nc-row-btn:hover {
  background: rgba(217,119,6,0.28);
  color: #fde68a;
  border-color: rgba(217,119,6,0.8);
}
