/* ============================================================
   Grilzo · Operator Console
   Premium SaaS dashboard: dark sidebar, light content, data-dense.
   ============================================================ */

:root {
  /* Surfaces — white content, dark-grey sidebar */
  --bg:           #F7F8FA;
  --bg-2:         #ECEFF3;
  --surface:      #FFFFFF;
  --surface-2:    #FAFBFC;
  --sidebar:      #1F2127;          /* dark grey (lighter than pure black) */
  --sidebar-2:    #2A2D35;
  --sidebar-line: rgba(255, 255, 255, .08);
  --sidebar-text: #C5C8CE;
  --sidebar-text-strong: #FFFFFF;
  --sidebar-text-muted:  #6E737B;

  /* Ink (light black) */
  --ink:          #0F1115;
  --ink-2:        #1A1D24;
  --ink-3:        #2A2F38;
  --text:         #1A1D24;
  --text-2:       #4A5160;
  --muted:        #6B7280;
  --muted-2:      #9AA1AE;

  /* Borders / dividers */
  --line:         #E5E8EE;
  --line-2:       #EFF2F6;
  --line-strong:  #CFD4DC;

  /* Brand accent — YELLOW. Variable names kept (--gold/--ember) for stability; values changed. */
  --gold:         #F5C518;          /* primary yellow */
  --gold-2:       #D4A50E;          /* darker yellow (hover / pressed) */
  --gold-soft:    #FCE789;          /* soft yellow */
  --gold-bg:      #FFF8DD;          /* yellow tint background */
  --ember:        #6B7280;          /* re-cast as neutral grey — no more red */
  --ember-2:      #4A5160;
  --olive:        #4A5160;          /* re-cast as dark slate */

  /* Functional status colors */
  --success:      #0F8F5B;
  --success-bg:   #E3F5EC;
  --warning:      #B26A00;
  --warning-bg:   #FFF1D6;
  --danger:       #C0322B;
  --danger-bg:    #FBE3E1;
  --info:         #1F5BB8;
  --info-bg:      #E0EBFA;
  --neutral-bg:   #EEF0F4;

  /* Chart palette — yellow + greyscale + functional colors */
  --chart-1:      #F5C518;  /* yellow */
  --chart-2:      #1F2127;  /* dark grey */
  --chart-3:      #0F8F5B;  /* green */
  --chart-4:      #1F5BB8;  /* blue */
  --chart-5:      #9AA1AE;  /* light grey */
  --chart-6:      #D4A50E;  /* darker yellow */

  /* Type */
  --f-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-mono:    'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Geometry */
  --sidebar-w:    248px;
  --topbar-h:     64px;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadow */
  --sh-xs: 0 1px 2px rgba(11, 13, 18, .04);
  --sh-sm: 0 1px 3px rgba(11, 13, 18, .06), 0 1px 2px rgba(11, 13, 18, .04);
  --sh-md: 0 6px 16px -6px rgba(11, 13, 18, .10), 0 2px 6px rgba(11, 13, 18, .06);
  --sh-lg: 0 24px 40px -16px rgba(11, 13, 18, .18), 0 8px 16px -8px rgba(11, 13, 18, .08);
  --sh-focus: 0 0 0 3px rgba(194, 135, 41, .25);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.25;
}
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-1 { flex: 1; }
.space-between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

::selection { background: var(--gold-soft); color: var(--ink); }

code {
  font-family: var(--f-mono);
  font-size: 12px;
  background: var(--neutral-bg);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  color: var(--ink-2);
}

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ----- Sidebar ----- */
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--sidebar-line);
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sidebar-line); border-radius: 3px; }
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sidebar-line);
  color: var(--sidebar-text-strong);
}
.sidebar-brand .mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: grid; place-items: center;
  color: white;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 6px 14px -4px rgba(194, 135, 41, .5);
}
.sidebar-brand .word {
  font-family: var(--f-display);
  font-size: 18px;
  letter-spacing: -.02em;
}
.sidebar-brand .word small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  margin-top: 1px;
}

.sidebar-section { padding: 18px 12px 6px; }
.sidebar-section-title {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  padding: 0 12px 8px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover {
  background: var(--sidebar-2);
  color: var(--sidebar-text-strong);
}
.nav a.active {
  background: var(--sidebar-2);
  color: var(--sidebar-text-strong);
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav a .icon { width: 18px; height: 18px; flex-shrink: 0; color: currentColor; opacity: .85; }
.nav a .badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-pill);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 14px;
  border-top: 1px solid var(--sidebar-line);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.sidebar-foot .who { display: flex; flex-direction: column; min-width: 0; }
.sidebar-foot .who strong { color: var(--sidebar-text-strong); font-size: 13px; font-weight: 600; }
.sidebar-foot .who small { font-size: 11px; color: var(--sidebar-text-muted); }
.sidebar-foot .logout-btn {
  margin-left: auto;
  color: var(--sidebar-text-muted);
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.sidebar-foot .logout-btn:hover { background: var(--sidebar-2); color: var(--sidebar-text-strong); }

/* ----- Main column ----- */
.main {
  display: flex; flex-direction: column;
  min-width: 0;     /* lets tables scroll */
  background: var(--bg);
}
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.topbar .crumbs {
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.topbar .crumbs .sep { color: var(--line-strong); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  min-width: 240px;
  color: var(--muted);
}
.searchbox input {
  border: 0; background: transparent; outline: none;
  flex: 1; font-size: 13px; color: var(--ink);
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }

.page {
  padding: 28px;
  display: flex; flex-direction: column; gap: 24px;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.page-head h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Flash messages ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13.5px;
  box-shadow: var(--sh-xs);
}
.flash-info { border-left-color: var(--info); }
.flash-error { border-left-color: var(--danger); background: var(--danger-bg); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h2 { font-size: 14px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }
.card-flush { padding: 0; }
.card-flush .data-table { border: 0; border-radius: 0; box-shadow: none; }
.card-flush .data-table thead th:first-child,
.card-flush .data-table tbody td:first-child { padding-left: 20px; }
.card-flush .data-table thead th:last-child,
.card-flush .data-table tbody td:last-child { padding-right: 20px; }

/* ---------- Metric cards ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--sh-xs);
  position: relative;
  overflow: hidden;
}
.metric .metric-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.metric .metric-label .icon {
  width: 16px; height: 16px;
  padding: 4px;
  background: var(--neutral-bg);
  border-radius: var(--r-xs);
  color: var(--ink-2);
  box-sizing: content-box;
}
.metric .metric-label .icon.gold  { background: var(--gold-bg);    color: var(--gold-2); }
.metric .metric-label .icon.green { background: var(--success-bg); color: var(--success); }
.metric .metric-label .icon.blue  { background: var(--info-bg);    color: var(--info); }
.metric .metric-label .icon.red   { background: var(--danger-bg);  color: var(--danger); }
.metric .metric-value {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -.02em;
  margin-top: 10px;
  line-height: 1.1;
}
.metric .metric-foot {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.trend-up   { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--muted); }

/* ---------- Grid helpers ---------- */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
@media (max-width: 1100px) { .col-8, .col-6, .col-4, .col-3 { grid-column: span 12; } }

/* ---------- Tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 13.5px;
  box-shadow: var(--sh-xs);
}
.data-table thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
}
.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table tfoot td { padding: 12px 14px; font-weight: 500; background: var(--surface-2); border-top: 1px solid var(--line); }
.data-table .cell-strong { font-weight: 600; color: var(--ink); }
.data-table .cell-money { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.actions-cell { display: flex; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, transform .08s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-2); color: white; }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-2); color: var(--ink); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--line);
}
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-bg); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  padding: 8px;
  width: 34px; height: 34px;
}
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--info);
  font-weight: 500;
  font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.field-hint  { font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select,
input.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus,
input.input:focus, select.input:focus, textarea.input:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: var(--sh-focus);
}
.field textarea { resize: vertical; min-height: 80px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.radio-row, .check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.radio-row:hover, .check-row:hover { background: var(--bg); }
.radio-row input, .check-row input { accent-color: var(--gold); }
.qty-input { width: 76px; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--neutral-bg);
  color: var(--ink-2);
  border: 1px solid transparent;
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.pill-success      { color: var(--success); background: var(--success-bg); }
.pill-warning      { color: var(--warning); background: var(--warning-bg); }
.pill-danger       { color: var(--danger);  background: var(--danger-bg); }
.pill-info         { color: var(--info);    background: var(--info-bg); }
.pill-gold         { color: var(--gold-2);  background: var(--gold-bg); }
.pill-ember        { color: var(--warning); background: var(--warning-bg); }
.pill-ink          { color: white; background: var(--ink); }

/* status -> pill mapping */
.status-DRAFT             { color: var(--muted);   background: var(--neutral-bg); }
.status-PLACED            { color: var(--gold-2);  background: var(--gold-bg); }
.status-ACCEPTED          { color: var(--info);    background: var(--info-bg); }
.status-PREPARING         { color: var(--warning); background: var(--warning-bg); }
.status-READY             { color: var(--success); background: var(--success-bg); }
.status-OUT_FOR_DELIVERY  { color: var(--gold-2);  background: var(--gold-bg); }
.status-DELIVERED         { color: white;          background: var(--ink); }
.status-CANCELLED         { color: var(--danger);  background: var(--danger-bg); }
.status-active            { color: var(--success); background: var(--success-bg); }
.status-inactive          { color: var(--muted);   background: var(--neutral-bg); }
.status-OPEN              { color: var(--success); background: var(--success-bg); }
.status-CLOSED            { color: var(--muted);   background: var(--neutral-bg); }
.status-MAINTENANCE       { color: var(--warning); background: var(--warning-bg); }
.status-ONLINE            { color: var(--success); background: var(--success-bg); }
.status-OFFLINE           { color: var(--muted);   background: var(--neutral-bg); }
.status-ON_TRIP           { color: var(--gold-2);  background: var(--gold-bg); }
.status-REQUESTED         { color: var(--gold-2);  background: var(--gold-bg); }
.status-ACKNOWLEDGED      { color: var(--info);    background: var(--info-bg); }
.status-IN_TRANSIT        { color: var(--warning); background: var(--warning-bg); }
.status-DISPATCHED        { color: var(--warning); background: var(--warning-bg); }
.status-FULFILLED         { color: white;          background: var(--ink); }
.status-CREATED           { color: var(--info);    background: var(--info-bg); }
.status-CAPTURED          { color: var(--success); background: var(--success-bg); }
.status-FAILED            { color: var(--danger);  background: var(--danger-bg); }
.status-REFUNDED          { color: var(--muted);   background: var(--neutral-bg); }

/* ---------- Pipeline (the 7-step order lifecycle) ---------- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 16px 20px;
}
@media (max-width: 900px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
.pipe-step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  position: relative;
}
.pipe-step .pipe-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pipe-step .pipe-count {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: 4px;
}
.pipe-step .pipe-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; border-radius: 0 0 var(--r-md) var(--r-md);
}
.pipe-PLACED   .pipe-bar { background: var(--gold); }
.pipe-ACCEPTED .pipe-bar { background: var(--info); }
.pipe-PREPARING .pipe-bar { background: var(--warning); }
.pipe-READY    .pipe-bar { background: var(--success); }
.pipe-OUT_FOR_DELIVERY .pipe-bar { background: var(--gold-2); }
.pipe-DELIVERED .pipe-bar { background: var(--ink); }

/* Step rail for order detail */
.step-rail {
  display: flex; gap: 0;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 4px;
  overflow-x: auto;
}
.step-rail .step {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  min-width: 110px;
}
.step-rail .step strong {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: inherit;
}
.step-rail .step small { font-size: 12px; }
.step-rail .step.done    { background: var(--surface); color: var(--ink); box-shadow: var(--sh-xs); }
.step-rail .step.current { background: var(--ink); color: white; box-shadow: var(--sh-md); }
.step-rail .step.current strong { color: var(--gold-soft); }

/* ---------- Chart container ---------- */
.chart {
  width: 100%;
  min-height: 280px;
}
.chart-sm { min-height: 200px; }

/* ---------- Misc ---------- */
.kpi-strip {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.kpi-strip .item { display: inline-flex; gap: 6px; }
.kpi-strip .item strong { color: var(--ink); font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.timeline li strong { font-weight: 500; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger  { background: var(--danger); }
.dot-info    { background: var(--info); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .icon {
  width: 40px; height: 40px;
  margin: 0 auto 12px;
  color: var(--muted-2);
}

/* ---------- Auth screens (centered card on plain bg) ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(194, 135, 41, .14), transparent 60%),
    radial-gradient(700px 360px at 0% 100%, rgba(184, 58, 27, .10), transparent 60%),
    var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 40px;
  max-width: 440px;
  width: 100%;
}
.auth-card .brand-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.auth-card .brand-head .mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: grid; place-items: center;
  color: white;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 18px;
}
.auth-card h1 {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.auth-card .step {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.seed-hint {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  font-size: 12.5px;
}
.seed-hint summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.seed-hint ul { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; padding-left: 0; }
.seed-hint code { font-size: 11px; }

/* ---------- Customer storefront (uses same chrome but warmer) ---------- */
.storefront .hero-stall {
  background: linear-gradient(135deg, #1F2127 0%, #0F1115 100%);
  color: white;
  padding: 28px 32px;
  border-radius: var(--r-lg);
  display: flex; gap: 24px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.storefront .hero-stall h1 {
  font-family: var(--f-display);
  font-size: 28px;
  color: white;
  letter-spacing: -.02em;
}
.storefront .hero-stall .stall-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.storefront .hero-stall .stall-meta .dot { background: var(--success); margin-right: 6px; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.menu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  box-shadow: var(--sh-xs);
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.menu-card .cat {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.menu-card h3 { margin: 4px 0; }
.menu-card .desc { font-size: 13px; color: var(--muted); flex: 1; }
.menu-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.menu-card .price {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}

/* ---------- Mobile sidebar collapse ---------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    width: 248px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
}
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  color: var(--ink);
}
@media (max-width: 900px) { .menu-toggle { display: inline-flex; } }

/* ============================================================
   Landing pages (marketing chrome for the 8 subdomains)
   ============================================================ */

.land-shell { background: var(--surface); color: var(--ink); }
.land-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center;
  padding: 16px clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.land-nav .brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.land-nav .brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: grid; place-items: center; color: white;
  font-family: var(--f-display); font-weight: 600; font-size: 16px;
}
.land-nav .brand .word {
  font-family: var(--f-display); font-size: 18px;
  letter-spacing: -.02em; font-weight: 500;
}
.land-nav .brand small {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); display: block; margin-top: 1px;
}
.land-nav-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* Hero with palette-based gradient */
.land-hero {
  padding: clamp(60px, 9vw, 110px) clamp(20px, 4vw, 48px) clamp(50px, 8vw, 90px);
  position: relative; overflow: hidden;
}
.land-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 28px;
  position: relative; z-index: 2;
}
.land-hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600;
}
.land-hero .kicker::before {
  content: ""; width: 24px; height: 1px; background: currentColor;
}
.land-hero h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--ink);
  max-width: 860px;
}
.land-hero p.lede {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.55;
}
.land-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero ambient gradient — yellow accents on white, with one dark variant.
   All palette- classes kept (template references them); colors all map to yellow/grey/white. */
.land-hero.palette-ember     { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .18), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(31, 33, 39, .04), transparent 60%); }
.land-hero.palette-gold      { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .25), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(252, 231, 137, .22), transparent 60%); }
.land-hero.palette-olive     { background: radial-gradient(900px 500px at 100% 0%, rgba(74, 81, 96, .07), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(245, 197, 24, .16), transparent 60%); }
.land-hero.palette-ink       { color: white; background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .30), transparent 50%), linear-gradient(135deg, #1F2127 0%, #0F1115 100%); }
.land-hero.palette-ink h1    { color: white; }
.land-hero.palette-ink .lede { color: rgba(255,255,255,.85); }
.land-hero.palette-ink .kicker { color: var(--gold-soft); }
.land-hero.palette-embergold { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .25), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(31, 33, 39, .04), transparent 60%); }
.land-hero.palette-warm      { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .18), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(255, 248, 221, 1), rgba(255, 248, 221, .2) 60%, transparent 80%); }

/* Decorative icon in hero corner */
.land-hero .hero-icon {
  position: absolute; right: -40px; bottom: -40px;
  width: 280px; height: 280px;
  opacity: .06; color: var(--ink);
  z-index: 1;
}
.land-hero.palette-ink .hero-icon { color: white; opacity: .12; }

/* Hero stat strip */
.hero-stats {
  display: flex; gap: 36px; flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.land-hero.palette-ink .hero-stats { border-top-color: rgba(255,255,255,.12); }
.hero-stat .num {
  font-family: var(--f-display); font-weight: 500;
  font-size: 32px; letter-spacing: -.02em; line-height: 1;
}
.hero-stat .lbl {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}
.land-hero.palette-ink .hero-stat .lbl { color: rgba(255,255,255,.6); }

/* Sections */
.land-section {
  padding: clamp(50px, 7vw, 90px) clamp(20px, 4vw, 48px);
}
.land-section-inner {
  max-width: 1100px; margin: 0 auto;
}
.land-section .eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600;
  margin-bottom: 12px;
}
.land-section h2 {
  font-family: var(--f-display);
  font-weight: 500; font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.02em; color: var(--ink);
  max-width: 780px; line-height: 1.1;
}
.land-section .sub {
  color: var(--muted); margin-top: 12px;
  font-size: 16px; max-width: 620px;
}

.land-section.alt { background: var(--surface-2); }

/* Feature grid */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 36px;
}
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 22px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.feature .ficon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gold-bg);
  color: var(--gold-2);
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Steps */
.step-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 36px;
}
.step-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  position: relative;
}
.step-card .n {
  font-family: var(--f-display); font-weight: 500;
  font-size: 40px; line-height: 1; color: var(--gold);
  letter-spacing: -.02em;
}
.step-card h3 { font-size: 16px; font-weight: 600; margin: 12px 0 6px; }
.step-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* CTA banner */
.land-cta {
  margin: 0;
  padding: clamp(50px, 7vw, 90px) clamp(20px, 4vw, 48px);
  background: var(--ink); color: white;
  text-align: center;
}
.land-cta h2 {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -.02em; color: white;
  max-width: 720px; margin: 0 auto;
  line-height: 1.1;
}
.land-cta p { color: rgba(255,255,255,.7); margin-top: 12px; }
.land-cta .btn-gold { margin-top: 24px; }

/* Footer */
.land-foot {
  padding: 24px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--muted); flex-wrap: wrap;
}
.land-foot a { color: var(--muted); }
.land-foot a:hover { color: var(--ink); }

/* App-landing role grid (for app.grilzo.com main page) */
.role-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 36px;
}
.role-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.role-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.role-card .ricon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-bg), var(--gold-soft));
  color: var(--gold-2);
  display: grid; place-items: center;
}
.role-card h3 { font-size: 16px; font-weight: 600; }
.role-card .sub { font-size: 13px; color: var(--muted); flex: 1; }
.role-card .domain {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--gold-2); letter-spacing: .04em;
}

/* Rentals: variant cards */
.variant-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-top: 36px;
}
.variant-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.variant-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.variant-card .vbadge {
  align-self: flex-start;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase;
  background: var(--gold-bg); color: var(--gold-2);
  padding: 4px 10px; border-radius: var(--r-pill);
}
.variant-card h3 {
  font-family: var(--f-display); font-size: 22px;
  font-weight: 500; letter-spacing: -.02em;
}
.variant-card .price {
  font-family: var(--f-display);
  font-size: 28px; color: var(--ink); font-weight: 500;
  letter-spacing: -.02em;
}
.variant-card .price small {
  font-family: var(--f-body); font-size: 13px;
  color: var(--muted); font-weight: 400;
}
.variant-card ul {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.variant-card li {
  font-size: 13px; color: var(--text-2);
  display: flex; align-items: flex-start; gap: 8px;
}
.variant-card li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin-top: 7px; flex-shrink: 0;
}

/* Inquiry form */
.inquiry-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 32px;
  box-shadow: var(--sh-md);
  max-width: 620px; margin: 36px auto 0;
}

