/* Maitre Slate — dark-first tokens */
:root {
  /* Surfaces */
  --bg-primary: #111316;
  --bg-secondary: #1c1f26;
  --bg-elevated: #2a2d36;
  --bg-hover: #333744;
  --bg-scrim: rgba(17, 19, 22, 0.72);

  /* Borders / dividers */
  --border-subtle: #262932;
  --border-default: #313540;
  --border-strong: #434856;

  /* Text */
  --text-primary: #ECEEF2;
  --text-secondary: #9CA1AD;
  --text-tertiary: #646978;
  --text-disabled: #3F434E;
  --text-on-gold: #1a1606;

  /* Accent */
  --accent-gold: #e9c349;
  --accent-gold-soft: rgba(233, 195, 73, 0.14);
  --accent-gold-ring: rgba(233, 195, 73, 0.35);

  /* Status */
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --success-ring: rgba(74, 222, 128, 0.35);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.14);
  --warning-ring: rgba(251, 191, 36, 0.35);
  --critical: #f87171;
  --critical-soft: rgba(248, 113, 113, 0.14);
  --critical-ring: rgba(248, 113, 113, 0.4);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.12);

  /* Table states (floor plan) */
  --tbl-open: #3d424f;
  --tbl-open-stroke: #4d5260;
  --tbl-held: #2a2d36;
  --tbl-held-stroke: #7a6730;
  --tbl-seated: #2b3a2b;
  --tbl-seated-stroke: #4ade80;
  --tbl-finishing: #3d2f18;
  --tbl-finishing-stroke: #fbbf24;
  --tbl-dirty: #3a2424;
  --tbl-dirty-stroke: #f87171;
  --tbl-blocked: #1c1f26;
  --tbl-blocked-stroke: #434856;

  /* Radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-pill: 999px;

  /* Shadows — subtle */
  --shadow-1: 0 1px 0 rgba(255,255,255,0.02) inset, 0 1px 2px rgba(0,0,0,0.35);
  --shadow-2: 0 2px 8px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.02) inset;
  --shadow-gold: 0 0 0 1px var(--accent-gold-ring), 0 8px 32px rgba(233, 195, 73, 0.14);

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;

  /* Type */
  --font-ui: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-num: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* Density modes */
.density-comfortable {
  --row-h: 72px;
  --card-pad: 14px;
  --gap-row: 8px;
}
.density-compact {
  --row-h: 56px;
  --card-pad: 10px;
  --gap-row: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
button { font-family: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; border-radius: var(--r-sm); }

/* Scrollbar — minimal dark */
.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 999px; border: 2px solid var(--bg-primary); }
.scroll::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Focus ring for tap targets */
.tap { min-height: 44px; min-width: 44px; }

/* A11y helper */
.sr-only { position: absolute; width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* Shimmer for loading */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-elevated) 40%, var(--bg-secondary) 80%);
  background-size: 800px 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--r-sm);
}

/* Pulse for live indicators */
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.pulse-dot { animation: pulseDot 1.8s ease-in-out infinite; }

/* Gentle entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 240ms ease-out both; }

/* Halo ring for suggested tables */
@keyframes halo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6), 0 0 0 2px var(--success); }
  50% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0), 0 0 0 2px var(--success); }
}
.halo { animation: halo 1.8s ease-out infinite; }

/* Amber tint overlay for floor plan when pacing drifts */
.pace-tint-amber::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.06), transparent 70%);
  pointer-events: none;
}
.pace-tint-red::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(248, 113, 113, 0.08), transparent 70%);
  pointer-events: none;
}
