/* ============================================================
   SAMSUN KAHVALTI · CORE DESIGN SYSTEM (v3)
   Premium modern professional — Roboto + Open Sans.
   Editorial restraint, dashboard precision, copper brand accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Inter+Tight:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Open+Sans:wght@400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
  /* ── Surface (deep espresso, refined) ── */
  --bg:        #161310;
  --bg-2:      #1d1916;
  --bg-3:      #25201c;
  --surface:   #2a2521;
  --surface-2: #322c27;
  --surface-3: #3d362f;
  --line:      rgba(212, 154, 82, .12);
  --line-2:    rgba(245, 236, 215, .06);

  /* ── Ink ── */
  --text:      #f7f0df;
  --text-2:    #d5c7a8;
  --muted:     #9d9079;
  --muted-2:   #6b6053;

  /* ── Brand ── */
  --copper:     #d49a52;
  --copper-2:   #b07634;
  --copper-3:   #8c5a25;
  --gold:       #e3b75d;
  --gold-soft:  #f4d894;
  --paper:      #fbf6ea;

  /* ── Semantic ── */
  --success:   #6ec88a;
  --success-2: rgba(110, 200, 138, .14);
  --danger:    #e76060;
  --danger-2:  rgba(231, 96, 96, .14);
  --warning:   #f3b455;
  --warning-2: rgba(243, 180, 85, .14);
  --info:      #6ba8e8;
  --info-2:    rgba(107, 168, 232, .14);

  /* ── Type (Inter for body, Inter Tight for display, JetBrains Mono for figures) ── */
  --serif: 'Inter Tight', 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:  'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ── Rhythm ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ── Radius ── */
  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ── Elevation ── */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 0, 0, .12);
  --shadow:    0 4px 16px rgba(0, 0, 0, .28), 0 1px 4px rgba(0, 0, 0, .14);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, .42), 0 4px 12px rgba(0, 0, 0, .22);
  --ring-copper: 0 0 0 3px rgba(212, 154, 82, .28);

  /* ── Motion ── */
  --ease:      cubic-bezier(.4, 0, .2, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --dur-1: 150ms;
  --dur-2: 220ms;
  --dur-3: 360ms;
}

[data-theme="light"] {
  --bg:        #f7f4ee;
  --bg-2:      #ffffff;
  --bg-3:      #f0eadd;
  --surface:   #ffffff;
  --surface-2: #faf5e9;
  --surface-3: #f0eadd;
  --line:      rgba(26, 19, 12, .1);
  --line-2:    rgba(26, 19, 12, .05);
  --text:      #1a1812;
  --text-2:    #3a2f23;
  --muted:     #6b5d48;
  --muted-2:   #94866c;
  --copper:    #b07634;
  --gold:      #c8893f;
  --paper:     #ffffff;
}

/* ============================================================
   OPS — Industrial slate + amber (admin / waiter / cashier)
   Graphite surfaces, chrome text, amber accent, sharp 6px radii,
   JetBrains Mono numerics, subtle grid overlay. Kitchen-grade.
   ============================================================ */
[data-theme="ops"] {
  --bg:        #1c1f23;
  --bg-2:      #20242a;
  --bg-3:      #262b30;
  --surface:   #262b30;
  --surface-2: #2d3239;
  --surface-3: #353a42;
  --line:      rgba(244, 246, 248, .09);
  --line-2:    rgba(244, 246, 248, .045);

  --text:      #f4f6f8;
  --text-2:    #c5cad1;
  --muted:     #8a8f97;
  --muted-2:   #5e636b;

  --copper:    #f59e0b;
  --copper-2:  #d97706;
  --copper-3:  #b45309;
  --gold:      #fbbf24;
  --gold-soft: #fde68a;

  --success:   #34d399;
  --success-2: rgba(52, 211, 153, .13);
  --danger:    #f87171;
  --danger-2:  rgba(248, 113, 113, .13);
  --warning:   #fbbf24;
  --warning-2: rgba(251, 191, 36, .13);
  --info:      #60a5fa;
  --info-2:    rgba(96, 165, 250, .13);

  --r-xs: 3px;
  --r-sm: 5px;
  --r:    6px;
  --r-lg: 10px;
  --r-xl: 14px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 2px 8px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6), 0 4px 8px rgba(0, 0, 0, .4);
  --ring-copper: 0 0 0 2px rgba(245, 158, 11, .35);
}

[data-theme="ops"] body {
  background: var(--bg);
  position: relative;
}
[data-theme="ops"] body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244, 246, 248, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 246, 248, .022) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 110% 90% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 110% 90% at 50% 30%, #000 40%, transparent 100%);
}
/* Stack content above grid pattern except elements that own their fixed/absolute positioning */
[data-theme="ops"] .w-head,
[data-theme="ops"] .c-head,
[data-theme="ops"] .admin-shell,
[data-theme="ops"] .admin-main,
[data-theme="ops"] .w-main,
[data-theme="ops"] .c-main,
[data-theme="ops"] .w-statbar { position: relative; z-index: 1; }

/* Mono numerics for high-density figures */
[data-theme="ops"] .stat-card .value,
[data-theme="ops"] .c-stats strong,
[data-theme="ops"] .w-table-total,
[data-theme="ops"] .c-table-total,
[data-theme="ops"] .money,
[data-theme="ops"] .num {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  letter-spacing: -.02em;
}

/* Headers — solid graphite, no glass */
[data-theme="ops"] .w-head,
[data-theme="ops"] .c-head,
[data-theme="ops"] .admin-topbar {
  background: rgba(28, 31, 35, .96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

/* Brand mono badge — square sharp */
[data-theme="ops"] .brand-mono { border-radius: var(--r); }

/* Cards — flat with line emphasis */
[data-theme="ops"] .stat-card,
[data-theme="ops"] .card,
[data-theme="ops"] .w-table,
[data-theme="ops"] .c-table,
[data-theme="ops"] .product-card,
[data-theme="ops"] .chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* Accent ring stripe for status emphasis */
[data-theme="ops"] .w-table[data-status="occupied"],
[data-theme="ops"] .c-table {
  border-color: rgba(245, 158, 11, .25);
}
[data-theme="ops"] .w-table[data-status="waiting_bill"] {
  border-color: rgba(251, 191, 36, .55);
  background: linear-gradient(180deg, rgba(251, 191, 36, .12), var(--surface) 60%);
}

/* Hero KPI rework for ops */
[data-theme="ops"] .stat-card.hero {
  background:
    radial-gradient(ellipse 320px 220px at 100% -40%, rgba(245, 158, 11, .18), transparent 70%),
    var(--surface);
  border-color: rgba(245, 158, 11, .35);
  border-radius: var(--r-lg);
}
[data-theme="ops"] .stat-card.hero .value {
  background: linear-gradient(180deg, #f4f6f8 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="ops"] .stat-card.hero .label,
[data-theme="ops"] .stat-card .label,
[data-theme="ops"] .w-area-title,
[data-theme="ops"] .c-main h2 {
  color: var(--copper);
}

/* Buttons — sharp */
[data-theme="ops"] .btn { border-radius: var(--r); }
[data-theme="ops"] .btn.primary {
  background: linear-gradient(180deg, var(--copper), var(--copper-2));
  color: #1c1208;
  border: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.2) inset, 0 -1px 0 rgba(255,255,255,.15) inset;
}

/* Sidebar — admin */
[data-theme="ops"] .admin-shell aside,
[data-theme="ops"] .admin-side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
}
[data-theme="ops"] .admin-side a.active,
[data-theme="ops"] .w-menu-link.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, .18), transparent);
  color: var(--copper);
  border-left: 2px solid var(--copper);
  padding-left: calc(14px - 2px);
}

/* Tables — admin order list */
[data-theme="ops"] table { border-collapse: separate; border-spacing: 0; }
[data-theme="ops"] table th {
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
}
[data-theme="ops"] table td { border-bottom: 1px solid var(--line); }

/* Cashier pill — sharp + amber */
[data-theme="ops"] .c-pill { border-radius: var(--r); background: var(--bg-2); }
[data-theme="ops"] .c-pill[data-status="waiting_bill"] .c-pill-dot { background: var(--warning); }

/* ============================================================
   OPS — PREMIUM REFINEMENT
   Typography refinement, surface elevation, breathing room.
   Stripe / Linear / Vercel aesthetic level.
   ============================================================ */
[data-theme="ops"] {
  font-family: var(--sans);
  font-feature-settings: 'cv11' 1, 'ss01' 1, 'ss03' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[data-theme="ops"] h1,
[data-theme="ops"] h2,
[data-theme="ops"] h3,
[data-theme="ops"] h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.15;
}

/* Page head — generous breathing room, refined hierarchy */
[data-theme="ops"] .page-head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom-color: var(--line-2);
}
[data-theme="ops"] .page-head h1 {
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -.03em;
  font-weight: 700;
}
[data-theme="ops"] .page-head .sub {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* Stat cards — elevation system with gradient border */
[data-theme="ops"] .stats-grid { gap: 16px; margin-bottom: 32px; }
[data-theme="ops"] .stats-grid.with-hero { gap: 16px; }

[data-theme="ops"] .stat-card {
  padding: 24px 24px 22px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  position: relative;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .03) inset,
    0 1px 2px rgba(0, 0, 0, .35);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
[data-theme="ops"] .stat-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(245, 158, 11, .22) 0%, rgba(245, 158, 11, .04) 35%, var(--line-2) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
[data-theme="ops"] .stat-card::after { display: none; }
[data-theme="ops"] .stat-card:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .05) inset,
    0 8px 22px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(245, 158, 11, .18);
}
[data-theme="ops"] .stat-card .label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
[data-theme="ops"] .stat-card .value {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  font-weight: 500;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--text);
}
[data-theme="ops"] .stat-card .sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: .1px;
}

/* Hero KPI — flagship metric with mesh background */
[data-theme="ops"] .stat-card.hero {
  padding: 32px 32px 28px;
  background:
    radial-gradient(ellipse 380px 280px at 105% -30%, rgba(245, 158, 11, .22), transparent 65%),
    radial-gradient(ellipse 280px 200px at -5% 130%, rgba(245, 158, 11, .12), transparent 60%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
[data-theme="ops"] .stat-card.hero::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, .55) 0%, rgba(245, 158, 11, .12) 40%, rgba(245, 158, 11, .04) 100%);
}
[data-theme="ops"] .stat-card.hero .value {
  font-size: clamp(46px, 5.4vw, 68px);
  font-weight: 400;
  letter-spacing: -.045em;
  background: linear-gradient(180deg, #fef3c7 0%, #f59e0b 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(245, 158, 11, .25));
}
[data-theme="ops"] .stat-card.hero .label {
  font-size: 11.5px;
  letter-spacing: 2.4px;
}

/* Section headings — minimal typography, hairline divider only */
[data-theme="ops"] .w-area-title,
[data-theme="ops"] .c-main h2 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}
[data-theme="ops"] .w-area-title::before,
[data-theme="ops"] .c-main h2::before { display: none; }
[data-theme="ops"] .w-area-title::after,
[data-theme="ops"] .c-main h2::after {
  background: var(--line);
  height: 1px;
}
[data-theme="ops"] .w-area { margin-bottom: 22px; }

/* Sidebar — refined typography + hairline */
[data-theme="ops"] .admin-side {
  padding: 22px 14px;
  background: var(--bg);
  border-right: 1px solid var(--line);
}
[data-theme="ops"] .admin-side .brand,
[data-theme="ops"] .admin-side .brand-mono {
  font-family: var(--serif);
  letter-spacing: -.015em;
}
[data-theme="ops"] .admin-side .nav-group {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 22px 14px 8px;
}
[data-theme="ops"] .admin-side a {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  padding: 9px 14px;
  border-radius: var(--r);
  color: var(--text-2);
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
[data-theme="ops"] .admin-side a:hover { background: var(--surface); color: var(--text); }
[data-theme="ops"] .admin-side a.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, .14) 0%, rgba(245, 158, 11, .02) 100%);
  color: var(--copper);
  border-left: 2px solid var(--copper);
  padding-left: 12px;
  font-weight: 600;
}

/* Cards — premium surface */
[data-theme="ops"] .card {
  padding: 22px 24px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .3);
}
[data-theme="ops"] .card h3 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 0 0 14px;
}

/* Tables — refined */
[data-theme="ops"] table {
  width: 100%;
  font-family: var(--sans);
  font-size: 13.5px;
}
[data-theme="ops"] table th {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
[data-theme="ops"] table td {
  padding: 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--text-2);
}
[data-theme="ops"] table tr:hover td { background: rgba(245, 158, 11, .025); color: var(--text); }
[data-theme="ops"] table td .money,
[data-theme="ops"] table td:has(.money) {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1;
  color: var(--text);
}

/* Status chips — kbd style mono */
[data-theme="ops"] .chip,
[data-theme="ops"] .badge,
[data-theme="ops"] .status,
[data-theme="ops"] td .badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text-2);
}

/* Floor tiles — minimal flat surface, single hairline, status via left stripe */
[data-theme="ops"] .w-table,
[data-theme="ops"] .c-table {
  padding: 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: none;
  position: relative;
  text-align: left;
  align-items: flex-start;
  gap: 4px;
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
[data-theme="ops"] .w-table::before,
[data-theme="ops"] .c-table::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--muted-2);
  opacity: .35;
  transition: opacity var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
[data-theme="ops"] .w-table:hover,
[data-theme="ops"] .c-table:hover {
  border-color: rgba(245, 158, 11, .35);
  background: var(--surface-2);
  transform: none;
  box-shadow: none;
}
[data-theme="ops"] .w-table[data-status="empty"]::before { background: var(--success); }
[data-theme="ops"] .w-table[data-status="occupied"]::before { background: var(--copper); opacity: 1; }
[data-theme="ops"] .w-table[data-status="waiting_bill"]::before { background: var(--warning); opacity: 1; }
[data-theme="ops"] .w-table[data-status="reserved"]::before { background: var(--info); }
[data-theme="ops"] .w-table[data-status="cleaning"]::before { background: #b07cff; }

[data-theme="ops"] .w-table-name,
[data-theme="ops"] .c-table-name {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.022em;
  font-size: 17px;
  line-height: 1.1;
  color: var(--text);
}
[data-theme="ops"] .w-table-cap,
[data-theme="ops"] .c-table-area {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 0;
}
[data-theme="ops"] .w-table-status,
[data-theme="ops"] .c-table .status {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 4px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
[data-theme="ops"] .w-table[data-status="empty"] .w-table-status { color: var(--success); }
[data-theme="ops"] .w-table[data-status="occupied"] .w-table-status { color: var(--copper); }
[data-theme="ops"] .w-table[data-status="waiting_bill"] .w-table-status { color: var(--warning); }
[data-theme="ops"] .w-table[data-status="reserved"] .w-table-status { color: var(--info); }

[data-theme="ops"] .w-table-total,
[data-theme="ops"] .c-table-total {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.025em;
  color: var(--text);
  margin-top: 6px;
}

/* Empty-status cards stay very subdued */
[data-theme="ops"] .w-table[data-status="empty"] {
  background: transparent;
  border-color: var(--line-2);
}
[data-theme="ops"] .w-table[data-status="empty"] .w-table-name { color: var(--text-2); font-weight: 600; }
[data-theme="ops"] .w-table[data-status="empty"] .w-table-cap { color: var(--muted-2); }

/* Active states quietly amber-tinted */
[data-theme="ops"] .w-table[data-status="occupied"] {
  border-color: rgba(245, 158, 11, .22);
  background: linear-gradient(180deg, rgba(245, 158, 11, .03) 0%, var(--surface) 60%);
  animation: none;
  box-shadow: none;
}
[data-theme="ops"] .w-table[data-status="waiting_bill"] {
  border-color: rgba(251, 191, 36, .35);
  background: linear-gradient(180deg, rgba(251, 191, 36, .04) 0%, var(--surface) 60%);
  animation: none;
  box-shadow: none;
}

/* Tighter mobile grid */
@media (max-width: 480px) {
  [data-theme="ops"] .w-tables { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  [data-theme="ops"] .w-table { padding: 14px 12px; }
  [data-theme="ops"] .w-table-name { font-size: 16px; }
  [data-theme="ops"] .w-table-total { font-size: 16px; }
}

/* Stat chips (waiter statbar) — refined pill */
[data-theme="ops"] .chip-stat {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  padding: 7px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text-2);
}
[data-theme="ops"] .chip-stat strong { color: var(--text); margin-left: 4px; font-weight: 700; }
[data-theme="ops"] .chip-stat .dot { width: 6px; height: 6px; border-radius: 1px; }

/* Cashier pill — refined */
[data-theme="ops"] .c-pill {
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
[data-theme="ops"] .c-pill:hover {
  border-color: rgba(245, 158, 11, .3);
  background: var(--surface);
}
[data-theme="ops"] .c-pill-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -.005em;
}
[data-theme="ops"] .c-pill-status {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
}
[data-theme="ops"] .c-pill-dot { width: 6px; height: 6px; border-radius: 1px; }

/* Cashier header refined */
[data-theme="ops"] .c-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.025em;
  font-size: 20px;
}
[data-theme="ops"] .c-stats { gap: 24px; padding-left: 24px; }
[data-theme="ops"] .c-stats strong {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1;
  font-weight: 500;
  font-size: 17px;
  color: var(--gold);
  letter-spacing: -.025em;
}
[data-theme="ops"] .c-stats span .lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--muted-2);
}

/* Waiter header refined */
[data-theme="ops"] .w-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.025em;
  font-size: 18px;
}
[data-theme="ops"] .w-head .small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px; color: var(--muted); }

/* Buttons — premium */
[data-theme="ops"] .btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  padding: 9px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transition: all var(--dur-2) var(--ease);
}
[data-theme="ops"] .btn:hover { border-color: var(--copper); background: var(--surface-2); }
[data-theme="ops"] .btn.primary {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  color: #1c1208;
  border: 0;
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, .4) inset,
    0 1px 0 rgba(255, 255, 255, .25) inset,
    0 -1px 0 rgba(0, 0, 0, .15) inset,
    0 4px 12px rgba(245, 158, 11, .25);
}
[data-theme="ops"] .btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
[data-theme="ops"] .btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
}
[data-theme="ops"] .btn.sm { padding: 6px 12px; font-size: 12px; }

/* Minimal: no ambient glow (was disruptive on small screens) */

/* Detail-grid — generous gap */
[data-theme="ops"] .detail-grid { gap: 20px; }

/* Page content wrappers — more breathing room */
[data-theme="ops"] .admin-main,
[data-theme="ops"] .c-main,
[data-theme="ops"] .w-main {
  padding: 28px 32px 80px;
}
@media (max-width: 720px) {
  [data-theme="ops"] .admin-main,
  [data-theme="ops"] .c-main,
  [data-theme="ops"] .w-main {
    padding: 18px 16px 80px;
  }
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -.005em;
}

a { color: inherit; text-decoration: none; transition: color var(--dur-1) var(--ease); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--copper); color: var(--bg); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212, 154, 82, .22); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(212, 154, 82, .4); }

/* ============================================================
   BRAND
   ============================================================ */
.brand-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--copper), var(--copper-2));
  color: #1a1208;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.02em;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18), 0 3px 10px rgba(212, 154, 82, .25);
  flex-shrink: 0;
}
.brand-mono.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.brand-mono.xl { width: 88px; height: 88px; font-size: 32px; border-radius: 24px; }

.brand-wordmark {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.1;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--copper);
  text-transform: uppercase;
}
.numeric { font-feature-settings: 'tnum' on; font-variant-numeric: tabular-nums; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--text);
}
h1 { font-size: clamp(26px, 3.6vw, 32px); }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 600; }

.muted   { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small   { font-size: 12px; }
.tiny    { font-size: 11px; }
.text-c  { text-align: center; }
.text-r  { text-align: right; }
[dir="rtl"] .text-r { text-align: left; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: .1px;
  line-height: 1.2;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease),
              background var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease);
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: rgba(212, 154, 82, .3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-copper); }
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }

.btn.primary {
  --btn-bg: linear-gradient(180deg, var(--copper), var(--copper-2));
  --btn-fg: #1a1208;
  --btn-bd: var(--copper-2);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 4px 12px rgba(212, 154, 82, .22);
}
.btn.primary:hover { filter: brightness(1.06); border-color: var(--copper); }
.btn.success { --btn-bg: var(--success); --btn-fg: #0c2415; --btn-bd: var(--success); font-weight: 600; }
.btn.danger  { --btn-bg: var(--danger);  --btn-fg: #ffffff; --btn-bd: var(--danger);  font-weight: 600; }
.btn.ghost   { --btn-bg: transparent; --btn-bd: var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.link    { --btn-bg: transparent; --btn-bd: transparent; color: var(--copper); padding-inline: 6px; }
.btn.link:hover { background: transparent; color: var(--gold); }

.btn.block { width: 100%; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 12px 20px; font-size: 14px; border-radius: var(--r); }
.btn.xl { padding: 15px 24px; font-size: 15px; border-radius: var(--r); font-weight: 600; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: rgba(212, 154, 82, .3); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring-copper); }

/* ============================================================
   FORMS
   ============================================================ */
.form { display: grid; gap: 14px; }
.form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--muted);
}
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color var(--dur-2) var(--ease),
              background var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease);
}
.form textarea { min-height: 80px; resize: vertical; }
.form input:hover,
.form select:hover,
.form textarea:hover { border-color: rgba(212, 154, 82, .25); }
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--copper);
  background: var(--bg-3);
  box-shadow: var(--ring-copper);
}
.form input[type="checkbox"] { width: auto; accent-color: var(--copper); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  position: relative;
}
.card h2, .card h3 { margin: 0 0 14px; }
.card.glass {
  background: rgba(42, 37, 33, .65);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-color: rgba(245, 236, 215, .08);
}
.card.feature {
  background:
    radial-gradient(ellipse 180px 100px at 100% 0, rgba(212, 154, 82, .14), transparent 65%),
    var(--surface);
  border-color: rgba(212, 154, 82, .25);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  margin-bottom: 18px;
}
.tab {
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
}
.tab.active {
  background: var(--copper);
  color: #1a1208;
  box-shadow: 0 3px 10px rgba(212, 154, 82, .25);
}

/* ============================================================
   STATUS
   ============================================================ */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-family: var(--sans);
}
.status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status.empty        { color: var(--success); background: var(--success-2); }
.status.occupied     { color: var(--copper);  background: rgba(212, 154, 82, .14); }
.status.waiting_bill { color: var(--warning); background: var(--warning-2); }
.status.reserved     { color: var(--info);    background: var(--info-2); }
.status.cleaning     { color: #b07cff;        background: rgba(176, 124, 255, .14); }
.status.new          { color: var(--info);    background: var(--info-2); }
.status.sent,
.status.preparing    { color: var(--warning); background: var(--warning-2); }
.status.ready        { color: var(--success); background: var(--success-2); }
.status.served       { color: var(--muted);   background: rgba(157, 144, 121, .14); }
.status.paid         { color: var(--success); background: var(--success-2); }
.status.delivered    { color: var(--muted);   background: rgba(157, 144, 121, .14); }
.status.cancelled    { color: var(--danger);  background: var(--danger-2); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  font-family: var(--sans);
}
.badge.primary  { background: rgba(212, 154, 82, .15); color: var(--copper); border-color: rgba(212, 154, 82, .3); }
.badge.success  { background: var(--success-2); color: var(--success); border-color: rgba(110, 200, 138, .3); }
.badge.danger   { background: var(--danger-2);  color: var(--danger);  border-color: rgba(231, 96, 96, .3); }
.badge.warning  { background: var(--warning-2); color: var(--warning); border-color: rgba(243, 180, 85, .3); }
.badge.info     { background: var(--info-2);    color: var(--info);    border-color: rgba(107, 168, 232, .3); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid;
  display: flex; align-items: center; gap: 10px;
  font-weight: 500;
}
.alert.err, .alert.error { background: var(--danger-2);  color: #ffb0b0; border-color: rgba(231, 96, 96, .3); }
.alert.ok, .alert.success{ background: var(--success-2); color: #a4dfb6; border-color: rgba(110, 200, 138, .3); }
.alert.info             { background: var(--info-2);    color: #b3d3f3; border-color: rgba(107, 168, 232, .3); }
.alert.warn             { background: var(--warning-2); color: #f6cf95; border-color: rgba(243, 180, 85, .3); }

/* ============================================================
   DATA TABLE
   ============================================================ */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data thead { background: var(--bg-2); }
table.data th {
  text-align: start;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
table.data td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.data tbody tr {
  transition: background var(--dur-1) var(--ease);
}
table.data tbody tr:hover { background: rgba(212, 154, 82, .04); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.actions { display: flex; gap: 6px; align-items: center; }
table.data code { font-family: var(--mono); font-size: 12px; color: var(--copper); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 6px 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.sidebar .brand .brand-wordmark { font-size: 17px; font-weight: 700; }
.sidebar .brand .brand-sub { font-size: 10px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; margin-top: 2px; }

.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar nav .nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted-2);
  padding: 18px 14px 6px;
  font-weight: 700;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 500;
  font-size: 13.5px;
  position: relative;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.sidebar nav a span:first-child {
  width: 18px; text-align: center;
  font-size: 14px;
  opacity: .7;
}
.sidebar nav a:hover { background: var(--surface); color: var(--text); }
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(212, 154, 82, .18), rgba(212, 154, 82, .04));
  color: var(--gold);
  font-weight: 600;
}
.sidebar nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--copper);
}
[dir="rtl"] .sidebar nav a.active::before { left: auto; right: 0; border-radius: 2px 0 0 2px; }
.sidebar nav a.active span:first-child { opacity: 1; }

.sidebar .user {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sidebar .user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 10px;
}
.sidebar .user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--copper), var(--copper-2));
  color: #1a1208;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 15px;
}
.sidebar .user-name { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.sidebar .user-role { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(22, 19, 16, .82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }

.content { padding: 28px; flex: 1; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 280px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform var(--dur-2) var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55; backdrop-filter: blur(2px); }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px; }
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -.02em;
}
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; font-weight: 400; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.stat-card:hover { border-color: rgba(212, 154, 82, .3); transform: translateY(-1px); }
.stat-card::after {
  content: '';
  position: absolute; top: 0; right: 0; width: 100px; height: 100px;
  background: radial-gradient(circle at top right, rgba(212, 154, 82, .1), transparent 60%);
  pointer-events: none;
}
.stat-card .label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat-card .value {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--text);
  font-feature-settings: 'tnum' on;
  font-variant-numeric: tabular-nums;
}
.stat-card .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stat-card.accent {
  background: linear-gradient(135deg, rgba(212, 154, 82, .14), var(--surface) 60%);
  border-color: rgba(212, 154, 82, .25);
}
.stat-card.accent .value { color: var(--gold); }

/* Hero KPI variant — primary metric, double weight */
.stats-grid.with-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .stats-grid.with-hero { grid-template-columns: 1fr 1fr; }
  .stats-grid.with-hero .stat-card.hero { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .stats-grid.with-hero { grid-template-columns: 1fr; }
  .stats-grid.with-hero .stat-card.hero { grid-column: auto; }
}
.stat-card.hero {
  padding: 28px 28px 24px;
  background:
    radial-gradient(ellipse 320px 220px at 110% -40%, rgba(227, 183, 93, .22), transparent 70%),
    linear-gradient(135deg, rgba(212, 154, 82, .18), var(--surface) 55%);
  border-color: rgba(227, 183, 93, .35);
}
.stat-card.hero::after {
  width: 220px; height: 180px;
  background: radial-gradient(circle at top right, rgba(227, 183, 93, .15), transparent 65%);
}
.stat-card.hero .label {
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--copper);
  margin-bottom: 14px;
}
.stat-card.hero .value {
  font-size: clamp(38px, 5vw, 56px);
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #f7f0df 0%, #e3b75d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card.hero .sub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-2);
}

/* Live-pulse indicator — real-time data sync */
.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 7px;
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .35);
  border-radius: var(--r-xs);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--success);
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.live-pulse .live-pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
  animation: live-pulse-anim 1.6s ease-in-out infinite;
}
@keyframes live-pulse-anim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); transform: scale(1); }
  50%      { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); transform: scale(1.15); }
}
.live-pulse.is-ok { background: rgba(52, 211, 153, .22); }
.live-pulse.is-down {
  background: rgba(248, 113, 113, .14);
  border-color: rgba(248, 113, 113, .35);
  color: var(--danger);
}
.live-pulse.is-down .live-pulse-dot { background: var(--danger); animation: none; }

/* Empty state utility — for charts, lists, tables with no data */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
}
.empty-state-glyph {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--muted-2);
  font-size: 20px;
  border: 1px dashed var(--line);
}
.empty-state-title {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text-2);
  font-size: 14.5px;
}
.empty-state-sub { font-size: 12.5px; max-width: 320px; line-height: 1.5; }

/* ============================================================
   TOAST + MODAL
   ============================================================ */
.toast-host {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}
.toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  color: var(--text);
  animation: toast-in .35s var(--ease-out);
  min-width: 220px;
  font-weight: 500;
}
.toast.success { border-color: rgba(110, 200, 138, .4); background: linear-gradient(135deg, rgba(110, 200, 138, .12), var(--surface)); }
.toast.error   { border-color: rgba(231, 96, 96, .4);  background: linear-gradient(135deg, rgba(231, 96, 96, .12), var(--surface)); }
.toast.info    { border-color: rgba(107, 168, 232, .4);background: linear-gradient(135deg, rgba(107, 168, 232, .12), var(--surface)); }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.modal-back {
  position: fixed; inset: 0;
  background: rgba(10, 6, 2, .65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  animation: fade-in var(--dur-2) var(--ease);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: pop-in var(--dur-3) var(--ease-out);
}
.modal h3 { margin: 0 0 14px; font-weight: 700; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   AUTH (LOGIN)
   ============================================================ */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  background:
    radial-gradient(ellipse 800px 500px at 20% 20%, rgba(212, 154, 82, .18), transparent 60%),
    radial-gradient(ellipse 700px 400px at 80% 80%, rgba(176, 118, 52, .15), transparent 60%),
    linear-gradient(135deg, #161310 0%, #1d1916 50%, #161310 100%);
  overflow: hidden;
}
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid rgba(212, 154, 82, .16);
  border-radius: var(--r-xl);
  padding: 40px 36px 32px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(245, 236, 215, .06);
}
.auth-brand {
  text-align: center;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.auth-brand .brand-wordmark { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand .eyebrow { letter-spacing: 3.5px; }
.auth-divider {
  width: 36px; height: 2px;
  margin: 4px auto 6px;
  background: var(--copper);
  border-radius: 1px;
}

.demo-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  background: var(--bg-2);
}
.demo-hint summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: .3px;
  text-transform: uppercase;
  font-size: 11px;
}
.demo-hint ul { margin: 10px 0 0; padding: 0; list-style: none; }
.demo-hint li {
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.demo-hint li:nth-child(even) { background: rgba(245, 236, 215, .04); }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
}
.fade-in { animation: fade-in var(--dur-3) var(--ease); }

/* ============================================================
   GTRANSLATE WIDGET
   ============================================================ */
.gt_float_switcher {
  border-radius: 999px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25) !important;
  font-family: var(--sans) !important;
  font-weight: 500 !important;
  font-size: 12.5px !important;
}
.skiptranslate > iframe.skiptranslate { display: none !important; visibility: hidden !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* Print */
@media print {
  body { background: white; color: black; }
  .sidebar, .topbar, .btn, .icon-btn, .toast-host, .gtranslate_wrapper { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}
