/* ============================================
   LUMIÈRE RESTAURANT OS — DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg: #f6f6f3;
  --color-surface: #fff;
  --color-surface-alt: #fafaf8;
  --color-border: #ececea;
  --color-border-light: #f0f0ee;
  --color-text-primary: #0a0a0a;
  --color-text-secondary: #737373;
  --color-text-muted: #a3a3a3;
  --color-text-tertiary: #525252;
  --color-accent: #f5b15a;
  --color-accent-deep: #e7793a;
  --color-dark: #0f0f10;
  --color-dark-hover: #262626;
  --color-dark-surface: #1a1a1c;
  --color-dark-border: #2a2a2d;
  --color-success: #4ade80;
  --color-success-dark: #15803d;
  --color-success-bg: #dcfce7;
  --color-danger: #b91c1c;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  --color-info: #3b82f6;
  --color-info-bg: #eff6ff;
  --color-warning: #a16207;
  --color-warning-bg: #fef9c3;
  --color-warning-border: #f5b15a;

  /* Typography */
  --font-sans: 'Geist', 'Inter', -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 10px; --sp-4: 12px;
  --sp-5: 14px; --sp-6: 16px; --sp-7: 18px; --sp-8: 20px;
  --sp-9: 22px; --sp-10: 24px; --sp-11: 28px; --sp-12: 32px; --sp-14: 48px;

  /* Radii */
  --radius-pill: 5px; --radius-nav: 8px; --radius-btn: 10px;
  --radius-card-sm: 12px; --radius-card: 14px; --radius-timeline: 16px;

  /* Shadows */
  --shadow-subtle: 0 1px 0 rgba(0,0,0,.02);
  --shadow-card: 0 1px 0 rgba(0,0,0,.02), 0 8px 24px -12px rgba(0,0,0,.08);
  --shadow-list: 0 1px 2px rgba(0,0,0,.03);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* --- Global Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }

/* --- Utility Classes --- */
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-muted { color: var(--color-text-secondary); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.mono { font-family: var(--font-mono); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--color-text-tertiary); }
.req { color: var(--color-danger); }

/* --- Shell Layout --- */
.shell {
  width: 1440px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
  background: var(--color-bg);
}
.login-shell {
  background: var(--color-dark);
}
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* --- Sidebar --- */
.sidebar {
  width: 248px;
  background: var(--color-dark);
  color: #e5e5e5;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: var(--sp-9) var(--sp-6);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 24px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-deep) 100%);
  display: grid; place-items: center; color: #1a1100;
  font-weight: 700; font-family: var(--font-serif); font-size: 20px; font-style: italic;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--color-text-secondary); margin-top: 1px; }
.restaurant-switcher {
  margin: 0 4px 18px; padding: 10px 12px;
  background: var(--color-dark-surface); border: 1px solid var(--color-dark-border);
  border-radius: var(--radius-btn); display: flex; align-items: center; gap: 10px; cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}
.restaurant-switcher:hover { background: #222224; }
.rs-dot { width: 8px; height: 8px; background: var(--color-success); border-radius: 50%; box-shadow: 0 0 0 3px rgba(74,222,128,.15); }
.rs-name { font-size: 13px; font-weight: 500; flex: 1; }
.rs-chev { color: var(--color-text-secondary); }
.nav-group { margin-bottom: 18px; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; color: #525252;
  font-weight: 600; letter-spacing: .08em; padding: 0 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px;
  border-radius: var(--radius-nav); color: #a3a3a3; cursor: pointer;
  font-weight: 450; font-size: 13.5px; margin-bottom: 1px;
  transition: all var(--duration-fast) var(--ease-out);
}
.nav-item:hover { background: var(--color-dark-surface); color: #e5e5e5; }
.nav-item.active {
  background: var(--color-dark-surface); color: #fff;
  box-shadow: inset 0 0 0 1px var(--color-dark-border);
}
.nav-item.active::before {
  content: ''; width: 3px; height: 14px; background: var(--color-accent);
  border-radius: 2px; margin-left: -7px; margin-right: 4px;
}
.nav-item .cnt {
  margin-left: auto; font-size: 11px; color: var(--color-text-secondary);
  font-family: var(--font-mono);
}
.nav-item.active .cnt { color: var(--color-accent); }
.side-footer {
  margin-top: auto; padding: 12px;
  border-top: 1px solid var(--color-dark-surface);
  display: flex; align-items: center; gap: 11px;
}
.side-av {
  width: 34px; height: 34px; border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-deep));
  color: #1a1100; display: grid; place-items: center;
  font-weight: 700; font-size: 12.5px; flex-shrink: 0;
}
.sf-name { font-weight: 500; font-size: 13px; color: #fafafa; }
.sf-role { font-size: 11px; color: var(--color-text-secondary); }
.sidebar-logout {
  color: #737373; cursor: pointer; padding: 4px; border-radius: 6px;
  transition: color var(--duration-fast);
}
.sidebar-logout:hover { color: #e5e5e5; }

/* --- Topbar --- */
.topbar {
  background: rgba(246,246,243,.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 32px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 5;
}
.crumbs { font-size: 12.5px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 8px; }
.crumbs .sep { color: #d4d4d4; }
.crumbs .cur { color: var(--color-text-primary); font-weight: 500; }
.crumbs a { color: var(--color-text-secondary); text-decoration: none; cursor: pointer; transition: color var(--duration-fast); }
.crumbs a:hover { color: var(--color-text-primary); }
.search { flex: 1; max-width: 440px; margin-left: 20px; position: relative; }
.search input {
  width: 100%; padding: 9px 14px 9px 36px; border: 1px solid #e5e5e3;
  border-radius: var(--radius-btn); background: var(--color-surface);
  font-size: 13px; outline: none; font-family: inherit;
  transition: border-color var(--duration-fast);
}
.search input:focus { border-color: var(--color-text-primary); }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--color-text-muted); }
.search .kbd {
  position: absolute; right: 10px; top: 8px; font-size: 10.5px;
  color: var(--color-text-secondary); background: var(--color-bg);
  border: 1px solid #e5e5e3; border-radius: var(--radius-pill);
  padding: 2px 6px; font-family: var(--font-mono);
}
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-btn);
  border: 1px solid #e5e5e3; background: var(--color-surface);
  display: grid; place-items: center; cursor: pointer;
  position: relative; color: #404040;
  transition: background var(--duration-fast);
}
.icon-btn:hover { background: var(--color-surface-alt); }
.bdot {
  position: absolute; top: 7px; right: 8px; width: 6px; height: 6px;
  background: var(--color-accent-deep); border-radius: 50%;
}

/* --- Buttons --- */
.btn {
  padding: 9px 14px; border-radius: var(--radius-btn);
  border: 1px solid #e5e5e3; background: var(--color-surface);
  font-weight: 500; font-size: 13px; cursor: pointer;
  color: var(--color-text-primary); display: inline-flex;
  align-items: center; gap: 7px; font-family: inherit;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { background: var(--color-surface-alt); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-dark { background: var(--color-text-primary); color: #fff; border-color: var(--color-text-primary); }
.btn-dark:hover { background: var(--color-dark-hover); }
.btn-danger { background: var(--color-surface); color: var(--color-danger); border-color: var(--color-danger-border); }
.btn-danger:hover { background: var(--color-danger-bg); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

/* --- Page Layout --- */
.page { padding: 32px 32px 48px; animation: fadeIn var(--duration-normal) var(--ease-out); }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.page-subtitle { color: var(--color-text-secondary); font-size: 13.5px; margin-top: 6px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

/* --- Detail Header --- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.dh-left { display: flex; align-items: flex-start; gap: 18px; }
.back-btn {
  width: 38px; height: 38px; border-radius: var(--radius-btn);
  border: 1px solid #e5e5e3; background: var(--color-surface);
  display: grid; place-items: center; cursor: pointer;
  color: #404040; font-size: 16px; margin-top: 4px;
  transition: background var(--duration-fast);
}
.back-btn:hover { background: var(--color-surface-alt); }
.eyebrow {
  font-size: 12px; color: var(--color-text-secondary); font-weight: 500;
  letter-spacing: .02em; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.live-dot {
  width: 7px; height: 7px; background: var(--color-accent-deep);
  border-radius: 50%; box-shadow: 0 0 0 4px rgba(231,121,58,.15);
  animation: pulse 2s infinite;
}
.h1 {
  font-size: 30px; font-weight: 500; letter-spacing: -.025em;
  color: var(--color-text-primary); line-height: 1.1;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.h1 .id { font-family: var(--font-mono); font-size: 22px; color: var(--color-text-secondary); font-weight: 400; letter-spacing: -.01em; }
.subtitle {
  color: var(--color-text-secondary); font-size: 13.5px; margin-top: 10px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.subtitle .sep-d { color: #d4d4d4; }

/* --- Timeline --- */
.timeline {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-timeline); padding: 22px 26px;
  margin-bottom: 24px; box-shadow: var(--shadow-card);
}
.tl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tl-title { font-size: 12px; color: var(--color-text-secondary); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.tl-time { font-size: 12px; color: var(--color-text-secondary); font-family: var(--font-mono); }
.tl-steps { display: flex; align-items: center; gap: 0; position: relative; }
.tl-step { flex: 1; display: flex; flex-direction: column; align-items: flex-start; position: relative; }
.tl-circle {
  width: 30px; height: 30px; border-radius: 50%; background: var(--color-surface);
  border: 2px solid #e5e5e3; display: grid; place-items: center;
  color: var(--color-text-muted); font-size: 13px; font-weight: 600;
  z-index: 2; position: relative; transition: all var(--duration-normal) var(--ease-out);
}
.tl-step.done .tl-circle { background: var(--color-text-primary); border-color: var(--color-text-primary); color: #fff; }
.tl-step.current .tl-circle {
  background: #fef8f1; border-color: var(--color-accent-deep);
  color: var(--color-accent-deep); box-shadow: 0 0 0 5px rgba(231,121,58,.12);
}
.tl-line { position: absolute; top: 14px; left: 30px; right: 0; height: 2px; background: #e5e5e3; z-index: 1; }
.tl-step.done .tl-line { background: var(--color-text-primary); }
.tl-step:last-child .tl-line { display: none; }
.tl-label { font-size: 13px; font-weight: 500; color: var(--color-text-primary); margin-top: 10px; }
.tl-step:not(.done):not(.current) .tl-label { color: var(--color-text-muted); }
.tl-meta { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 3px; font-family: var(--font-mono); }
.tl-actions {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--color-border-light);
  display: flex; align-items: center; gap: 10px;
}
.tl-actions-label { font-size: 12.5px; color: var(--color-text-secondary); margin-right: 4px; }

/* --- Grid --- */
.grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }
.col-main { display: flex; flex-direction: column; gap: 20px; }
.col-side { display: flex; flex-direction: column; gap: 20px; }

/* --- Cards --- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-subtle);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-card); }
.card-head {
  padding: 18px 22px 14px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--color-border-light);
}
.card-title {
  font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  color: var(--color-text-primary); display: flex; align-items: center; gap: 8px;
}
.card-title .pip {
  font-size: 10.5px; background: var(--color-bg); color: var(--color-text-tertiary);
  padding: 2px 7px; border-radius: var(--radius-pill);
  font-weight: 600; font-family: var(--font-mono);
}
.pip {
  font-size: 10.5px; background: var(--color-bg); color: var(--color-text-tertiary);
  padding: 2px 7px; border-radius: var(--radius-pill);
  font-weight: 600; font-family: var(--font-mono);
}
.card-action { font-size: 12.5px; color: var(--color-text-secondary); cursor: pointer; transition: color var(--duration-fast); }
.card-action:hover { color: var(--color-text-primary); }
.card-body { padding: 18px 22px 22px; }

/* --- Order Items --- */
.items { display: flex; flex-direction: column; }
.item {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px;
  padding: 16px 0; border-bottom: 1px dashed var(--color-border); align-items: flex-start;
}
.item:last-child { border-bottom: none; }
.item-qty {
  width: 38px; height: 38px; background: var(--color-bg); border-radius: var(--radius-btn);
  display: grid; place-items: center; font-weight: 600; font-size: 13.5px;
  color: var(--color-text-primary); font-family: var(--font-mono);
}
.item-name { font-size: 14px; font-weight: 500; color: var(--color-text-primary); }
.item-mods { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 6px; line-height: 1.55; }
.item-mods .mod {
  display: inline-block; background: var(--color-surface-alt); border: 1px solid var(--color-border);
  padding: 2px 7px; border-radius: var(--radius-pill); margin-right: 5px;
  margin-top: 3px; font-size: 11.5px; color: var(--color-text-tertiary);
}
.item-note {
  font-size: 12px; color: var(--color-warning); margin-top: 8px;
  background: var(--color-warning-bg); border-left: 2px solid var(--color-warning-border);
  padding: 6px 10px; border-radius: 0 6px 6px 0; display: inline-flex; align-items: center; gap: 6px;
}
.item-price { font-size: 14px; font-weight: 500; color: var(--color-text-primary); letter-spacing: -.01em; }
.item-base { font-size: 11.5px; color: var(--color-text-muted); text-align: right; margin-top: 3px; }

/* --- Totals --- */
.totals {
  padding: 18px 22px; background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border-light);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.tot-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--color-text-tertiary); padding: 5px 0; }
.tot-row.discount { color: var(--color-success-dark); }
.tot-row.total {
  font-size: 17px; color: var(--color-text-primary); font-weight: 600;
  border-top: 1px solid var(--color-border); margin-top: 8px;
  padding-top: 14px; letter-spacing: -.02em;
}

/* --- Customer Card --- */
.cust-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cust-av {
  width: 48px; height: 48px; border-radius: var(--radius-card-sm);
  background: linear-gradient(135deg, var(--color-info), #1e40af);
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 16px;
}
.cust-name {
  font-size: 15px; font-weight: 500; color: var(--color-text-primary);
  display: flex; align-items: center; gap: 8px;
}
.tag-vip {
  font-size: 9.5px; background: var(--color-text-primary); color: var(--color-accent);
  padding: 2px 6px; border-radius: 4px; font-weight: 600; letter-spacing: .04em;
}
.cust-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 3px; }
.cust-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  background: var(--color-surface-alt); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-btn); padding: 4px; margin-bottom: 16px;
}
.cs { padding: 10px 12px; border-right: 1px solid var(--color-border-light); }
.cs:last-child { border-right: none; }
.cs-lbl { font-size: 10.5px; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.cs-val { font-size: 15px; font-weight: 500; color: var(--color-text-primary); margin-top: 4px; letter-spacing: -.01em; }
.contact-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-top: 1px solid var(--color-border-light); font-size: 13px; color: #404040;
}
.contact-row .ic {
  width: 28px; height: 28px; border-radius: var(--radius-nav);
  background: var(--color-surface-alt); display: grid; place-items: center; font-size: 12px;
}
.contact-row .lbl { font-size: 11px; color: var(--color-text-secondary); }
.contact-row .val { font-weight: 500; color: var(--color-text-primary); }
.contact-row .copy {
  margin-left: auto; font-size: 11.5px; color: var(--color-text-secondary);
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: all var(--duration-fast);
}
.contact-row .copy:hover { background: var(--color-surface-alt); color: var(--color-text-primary); }

/* --- Payment --- */
.pay-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pay-row + .pay-row { border-top: 1px solid var(--color-border-light); }
.pay-card {
  width: 38px; height: 26px; border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1a1a40, #3730a3);
  display: grid; place-items: center; color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
}
.pay-info { flex: 1; }
.pay-lbl { font-size: 11px; color: var(--color-text-secondary); }
.pay-val { font-size: 13px; color: var(--color-text-primary); font-weight: 500; margin-top: 2px; }
.pay-badge {
  font-size: 10.5px; background: var(--color-success-bg); color: var(--color-success-dark);
  padding: 3px 8px; border-radius: var(--radius-pill); font-weight: 600;
  letter-spacing: .04em; display: inline-flex; align-items: center; gap: 4px;
}
.pay-badge-refunded { background: var(--color-danger-bg); color: var(--color-danger); }

/* --- Pickup/Delivery Box --- */
.pickup-box {
  background: linear-gradient(135deg, #fef8f1, #fdf2e6);
  border: 1px solid #f5e6d3; border-radius: var(--radius-card-sm);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px;
}
.pickup-ic {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--color-surface); border: 1px solid #f5e6d3;
  display: grid; place-items: center; font-size: 18px;
}
.pickup-lbl { font-size: 11.5px; color: var(--color-warning); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.pickup-val { font-size: 18px; color: var(--color-text-primary); font-weight: 500; margin-top: 2px; letter-spacing: -.02em; }
.pickup-sub { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

/* --- Notes --- */
.note-input {
  width: 100%; padding: 12px 14px; border: 1px solid #e5e5e3;
  border-radius: var(--radius-btn); font-size: 13px; font-family: inherit;
  resize: none; outline: none; background: var(--color-surface-alt);
  transition: all var(--duration-fast);
}
.note-input:focus { border-color: var(--color-text-primary); background: var(--color-surface); }
.note-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.note-hint { font-size: 11.5px; color: var(--color-text-secondary); }

/* --- Activity Log --- */
.activity { display: flex; flex-direction: column; gap: 0; }
.act {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px;
  padding: 12px 0; position: relative; align-items: flex-start;
}
.act:not(:last-child)::before {
  content: ''; position: absolute; left: 13px; top: 30px; bottom: -2px;
  width: 1.5px; background: var(--color-border);
}
.act-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-surface); border: 1.5px solid #e5e5e3;
  display: grid; place-items: center; font-size: 11px; z-index: 1;
}
.act.done .act-dot { background: var(--color-text-primary); border-color: var(--color-text-primary); color: #fff; }
.act.current .act-dot { background: #fef8f1; border-color: var(--color-accent-deep); color: var(--color-accent-deep); }
.act-text { font-size: 13px; color: var(--color-text-primary); }
.act-text strong { font-weight: 500; }
.act-meta { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 2px; }
.act-time { font-size: 11.5px; color: var(--color-text-muted); font-family: var(--font-mono); white-space: nowrap; }

/* --- Driver Block --- */
.driver-empty {
  background: var(--color-surface-alt); border: 1px dashed #e5e5e3;
  border-radius: var(--radius-btn); padding: 18px; text-align: center;
}
.driver-empty p { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 12px; }

/* --- Footer --- */
.footer {
  padding: 18px 32px; border-top: 1px solid var(--color-border);
  background: transparent; font-size: 12px; color: var(--color-text-secondary);
  display: flex; justify-content: space-between; margin-top: auto;
}
.footer .left { display: flex; align-items: center; gap: 10px; }
.live-dot-g {
  width: 7px; height: 7px; background: var(--color-success); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74,222,128,.15);
}
.live-dot-r {
  width: 7px; height: 7px; background: var(--color-danger); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(185,28,28,.15);
}
.live-dot-neutral {
  width: 7px; height: 7px; background: #d4d4d4; border-radius: 50%;
}

/* --- Status Badges --- */
.status-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-pill);
  letter-spacing: .02em; display: inline-flex; align-items: center; white-space: nowrap;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success-dark); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-warning { background: #fef3c7; color: var(--color-warning); }
.badge-info { background: var(--color-info-bg); color: #1d4ed8; }
.badge-neutral { background: #f5f5f4; color: #525252; }
.badge-pickup { background: #fef8f1; color: var(--color-accent-deep); }
.badge-delivery { background: var(--color-info-bg); color: #1d4ed8; }

/* --- Stat Tiles --- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-tile {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-card); padding: 20px; box-shadow: var(--shadow-subtle);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.stat-tile:hover { box-shadow: var(--shadow-card); }
.stat-tile-icon { margin-bottom: 12px; }
.stat-tile-value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--color-text-primary); }
.stat-tile-label { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }

/* --- Data Tables --- */
.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
  text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 600;
  color: var(--color-text-secondary); text-transform: uppercase;
  letter-spacing: .04em; border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt); white-space: nowrap;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border-light); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.clickable-row { cursor: pointer; transition: background var(--duration-fast); }
.clickable-row:hover { background: var(--color-surface-alt); }
.sortable-col { cursor: pointer; user-select: none; }
.sortable-col:hover { color: var(--color-text-primary); }
.sort-active { color: var(--color-text-primary); }

.mini-table-wrap { overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th {
  text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600;
  color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--color-border); background: var(--color-surface-alt);
}
.mini-table td { padding: 10px 16px; border-bottom: 1px solid var(--color-border-light); }
.mini-table tbody tr:last-child td { border-bottom: none; }

/* --- Filter Bar --- */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; margin-bottom: 16px;
}
.filter-item { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: 11px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.filter-select {
  padding: 6px 10px; border: 1px solid #e5e5e3; border-radius: var(--radius-nav);
  background: var(--color-surface); font-size: 13px; font-family: inherit;
  color: var(--color-text-primary); outline: none; cursor: pointer;
  transition: border-color var(--duration-fast);
}
.filter-select:focus { border-color: var(--color-text-primary); }

/* --- Pagination --- */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 20px; padding: 12px 0;
}
.pagination-info { font-size: 13px; color: var(--color-text-secondary); font-family: var(--font-mono); }

/* --- Kitchen Queue --- */
.queue-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.queue-column {
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-card); padding: 16px; min-height: 300px;
}
.queue-column-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--color-border-light);
}
.queue-column-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.queue-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-card-sm); padding: 16px; margin-bottom: 12px;
  cursor: pointer; transition: all var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-list);
}
.queue-card:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); }
.queue-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.queue-card-id { font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.queue-card-time { margin-left: auto; font-size: 11px; color: var(--color-text-secondary); font-family: var(--font-mono); }
.queue-card-customer { font-weight: 500; margin-bottom: 8px; }
.queue-card-items { font-size: 12.5px; color: var(--color-text-secondary); margin-bottom: 8px; }
.queue-item { padding: 2px 0; }
.queue-card-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border-light); }

/* --- Menu Management --- */
.menu-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.menu-sidebar-cats { display: flex; flex-direction: column; gap: 4px; }
.category-chip {
  padding: 8px 12px; border-radius: var(--radius-nav);
  font-size: 13px; font-weight: 450; cursor: pointer;
  color: var(--color-text-secondary); transition: all var(--duration-fast) var(--ease-out);
}
.category-chip:hover { background: var(--color-surface); color: var(--color-text-primary); }
.category-chip-active {
  background: var(--color-surface); color: var(--color-text-primary);
  font-weight: 500; box-shadow: var(--shadow-list); border: 1px solid var(--color-border);
}
.menu-items-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.menu-item-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-card-sm); padding: 18px;
  transition: all var(--duration-fast) var(--ease-out);
}
.menu-item-card:hover { box-shadow: var(--shadow-card); }
.menu-item-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.menu-item-card-name { font-weight: 500; font-size: 14px; }
.menu-item-card-desc { font-size: 12.5px; color: var(--color-text-secondary); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item-card-price { font-size: 16px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 8px; }
.menu-item-card-allergens { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.allergen-pill {
  font-size: 10px; background: #fef3c7; color: var(--color-warning);
  padding: 2px 6px; border-radius: var(--radius-pill); font-weight: 500;
}
.menu-item-card-mods { font-size: 11px; color: var(--color-text-secondary); margin-bottom: 8px; }
.menu-item-card-actions { display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--color-border-light); flex-wrap: wrap; }

/* --- Empty State --- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.empty-state-icon { color: var(--color-text-muted); margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 500; color: var(--color-text-primary); margin-bottom: 8px; }
.empty-state-subtitle { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 16px; }

/* --- Forms --- */
.form-field { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--color-text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.form-input {
  width: 100%; padding: 9px 12px; border: 1px solid #e5e5e3;
  border-radius: var(--radius-nav); font-size: 13px; background: var(--color-surface);
  outline: none; font-family: inherit; transition: border-color var(--duration-fast);
}
.form-input:focus { border-color: var(--color-text-primary); }
.form-textarea { resize: vertical; min-height: 60px; }
.input-error { border-color: var(--color-danger) !important; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-label { font-size: 13px; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #d4d4d4; border-radius: 20px; transition: var(--duration-fast);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 16px; width: 16px; left: 2px; bottom: 2px;
  background: white; border-radius: 50%; transition: var(--duration-fast);
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* --- Login --- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--color-dark); padding: 40px;
}
.login-container { max-width: 520px; width: 100%; }
.login-brand { text-align: center; margin-bottom: 36px; display: flex; flex-direction: column; align-items: center; }
.login-title {
  font-size: 28px; font-weight: 500; color: #fff; letter-spacing: -.02em;
  margin-top: 16px;
}
.login-subtitle { color: var(--color-text-secondary); font-size: 14px; margin-top: 8px; }
.login-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
.login-card {
  background: var(--color-dark-surface); border: 1px solid var(--color-dark-border);
  border-radius: var(--radius-card-sm); padding: 16px; text-align: center;
  cursor: pointer; transition: all var(--duration-fast) var(--ease-out);
}
.login-card:hover { border-color: var(--color-accent); background: #222224; }
.login-card-selected { border-color: var(--color-accent); background: #222224; box-shadow: 0 0 0 2px rgba(245,177,90,.2); }
.login-card-avatar {
  width: 42px; height: 42px; border-radius: var(--radius-btn);
  display: inline-grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 14px; margin-bottom: 8px;
}
.login-card-name { font-weight: 500; color: #fff; font-size: 14px; }
.login-card-role { font-size: 11px; color: var(--color-text-secondary); margin-top: 4px; }
.login-form { margin-top: 4px; }
.login-field { margin-bottom: 14px; }
.login-field .form-label { color: #a3a3a3; }
.login-field .form-input {
  background: var(--color-dark-surface); border-color: var(--color-dark-border);
  color: #fff;
}
.login-field .form-input:focus { border-color: var(--color-accent); }
.login-field .form-input::placeholder { color: #525252; }
.login-error { color: var(--color-danger); font-size: 12px; margin-bottom: 10px; min-height: 16px; }
.login-submit { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

/* --- Toast --- */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-btn); padding: 12px 16px; min-width: 280px;
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.12);
  transform: translateX(120%); transition: all var(--duration-normal) var(--ease-out);
  pointer-events: auto;
}
.toast-show { transform: translateX(0); }
.toast-hide { opacity: 0; transform: translateX(80px); }
.toast-icon { font-weight: 700; font-size: 14px; flex-shrink: 0; }
.toast-success { border-left: 3px solid var(--color-success); }
.toast-success .toast-icon { color: var(--color-success-dark); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-error .toast-icon { color: var(--color-danger); }
.toast-info { border-left: 3px solid var(--color-info); }
.toast-info .toast-icon { color: var(--color-info); }

/* --- Modal --- */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 9000;
}
.modal-visible { display: flex; animation: fadeIn var(--duration-fast) var(--ease-out); }
.modal-dialog {
  background: var(--color-surface); border-radius: var(--radius-card);
  width: 480px; max-width: 90vw; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,.2);
  animation: scaleIn var(--duration-normal) var(--ease-out);
}
.modal-header {
  padding: 20px 22px 16px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--color-border-light);
}
.modal-title { font-size: 17px; font-weight: 500; }
.modal-close {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: none; color: var(--color-text-secondary); font-size: 16px;
  cursor: pointer; display: grid; place-items: center;
  transition: all var(--duration-fast);
}
.modal-close:hover { background: var(--color-bg); color: var(--color-text-primary); }
.modal-body { padding: 20px 22px; }
.modal-actions { padding: 16px 22px; border-top: 1px solid var(--color-border-light); display: flex; gap: 8px; justify-content: flex-end; }

/* --- Dropdown --- */
.dropdown-panel {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-btn); box-shadow: 0 10px 30px -8px rgba(0,0,0,.12);
  z-index: 8000; overflow: hidden;
  transform: scale(0.95); opacity: 0; transform-origin: top left;
  transition: all var(--duration-fast) var(--ease-out);
}
.dropdown-show { transform: scale(1); opacity: 1; }
.dropdown-right { transform-origin: top right; }
.dropdown-option {
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  transition: background var(--duration-fast);
}
.dropdown-option:hover { background: var(--color-surface-alt); }
.dropdown-active { font-weight: 500; color: var(--color-accent-deep); }

/* --- Integrations --- */
.integrations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.template-row {
  border: 1px solid var(--color-border-light); border-radius: var(--radius-nav);
  margin-bottom: 6px; overflow: hidden; cursor: pointer;
  transition: background var(--duration-fast);
}
.template-row:hover { background: var(--color-surface-alt); }
.template-header { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; }
.template-body { max-height: 0; overflow: hidden; transition: max-height var(--duration-normal) var(--ease-out); }
.template-body.template-expanded { max-height: 200px; }
.template-text { padding: 0 12px 12px; font-size: 12px; color: var(--color-text-secondary); line-height: 1.6; font-family: var(--font-mono); }

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(231,121,58,.15); }
  50% { box-shadow: 0 0 0 7px rgba(231,121,58,.08); }
}

.stagger-in > * {
  animation: slideUp var(--duration-normal) var(--ease-out) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0ms; }
.stagger-in > *:nth-child(2) { animation-delay: 50ms; }
.stagger-in > *:nth-child(3) { animation-delay: 100ms; }
.stagger-in > *:nth-child(4) { animation-delay: 150ms; }
.stagger-in > *:nth-child(5) { animation-delay: 200ms; }
.stagger-in > *:nth-child(6) { animation-delay: 250ms; }
.stagger-in > *:nth-child(7) { animation-delay: 300ms; }
.stagger-in > *:nth-child(8) { animation-delay: 350ms; }

/* Hover lift for cards */
.stat-tile, .queue-card, .menu-item-card, .login-card {
  transition: all var(--duration-fast) var(--ease-out);
}
