:root {
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --panel: #ffffff;
  --panel2: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #4f46e5;
  --brand2: #6366f1;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadowLg: 0 10px 30px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: "JetBrains Mono", Consolas, "Courier New", monospace; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.right { text-align: right; }
.center { text-align: center; }

/* Layout */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 1px 0 0 rgba(0,0,0,.02);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brandMark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  color: #fff;
  display: grid; place-items: center; font-weight: 800; letter-spacing: .5px;
}
.brandTitle { font-weight: 700; }
.brandSub { font-size: 12px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.navItem {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text); border: 1px solid transparent; background: none;
  font-size: 14px; cursor: pointer; text-align: left; width: 100%;
}
.navItem:hover { background: var(--bg2); text-decoration: none; }
.navItem.active { background: rgba(99,102,241,.10); border-color: rgba(99,102,241,.2); color: var(--brand); }
.navItem.locked { opacity: .45; }
.sidebarFooter { margin-top: auto; font-size: 12px; color: var(--muted); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.pageTitle { font-size: 18px; font-weight: 700; }
.pageSubtitle { font-size: 12px; color: var(--muted); }
.topbarRight { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg2); font-size: 12px; color: var(--muted);
}
.pill strong { color: var(--text); }
.content { padding: 18px 20px 40px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.cardHeader { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cardTitle { font-weight: 700; }
.cardSub { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gridSell { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.stackH { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stackV { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px;
  font-family: inherit; transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid rgba(99,102,241,.25); border-color: var(--brand2); }
.inputSm { max-width: 120px; }
.hint { font-size: 12px; color: var(--muted); }

.btn, .btnPrimary, .btnGhost, .btnDanger, .btnOk {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  transition: filter .15s, border-color .15s;
}
.btn:hover, .btnPrimary:hover, .btnDanger:hover, .btnOk:hover { filter: brightness(.97); text-decoration: none; }
.btnPrimary { background: linear-gradient(135deg, var(--brand), #4f46e5); border-color: transparent; color: #fff; }
.btnDanger { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.3); color: #dc2626; }
.btnOk { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.3); color: #16a34a; }
.btnGhost { background: transparent; }
.btnSm { padding: 6px 10px; font-size: 12px; }
.btnBlock { width: 100%; }

/* Tables */
.tableWrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
table.data tr:hover td { background: var(--bg2); }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.statLabel { font-size: 12px; color: var(--muted); }
.statValue { font-size: 20px; font-weight: 700; margin-top: 4px; }

/* Catalog */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.tile {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel);
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; color: var(--text);
  min-height: 96px; box-shadow: var(--shadow); transition: border-color .15s;
}
.tile:hover { border-color: var(--brand2); text-decoration: none; }
.tileName { font-weight: 600; font-size: 13px; line-height: 1.25; }
.tilePrice { font-weight: 700; }
.tileMeta { font-size: 11px; color: var(--muted); margin-top: auto; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: #16a34a; border-color: rgba(22,163,74,.3); background: rgba(22,163,74,.08); }
.badge.warn { color: #d97706; border-color: rgba(217,119,6,.3); background: rgba(217,119,6,.08); }
.badge.bad { color: #dc2626; border-color: rgba(220,38,38,.3); background: rgba(220,38,38,.08); }

/* Cart */
.cartList { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow: auto; }
.cartRow { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.cartName { font-size: 13px; font-weight: 600; }
.cartMeta { font-size: 11px; color: var(--muted); }
.qtyBox { display: flex; align-items: center; gap: 6px; }
.qtyInput { width: 62px; text-align: center; padding: 6px; }
.totals { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row.total { font-size: 19px; font-weight: 800; }

/* Flash */
.flashWrap { position: fixed; right: 18px; top: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.flash { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; box-shadow: var(--shadowLg); }
.flash.success { border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.05); }
.flash.error { border-color: rgba(220,38,38,.4); background: rgba(220,38,38,.05); }

/* Public / auth */
.public { max-width: 1120px; margin: 0 auto; padding: 0 24px 60px; position: relative; }

/* Animated background orbs */
.public::before {
  content: ''; position: fixed; top: -200px; right: -150px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,.06) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.public::after {
  content: ''; position: fixed; bottom: -200px; left: -150px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.public > * { position: relative; z-index: 1; }

.publicNav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; position: sticky; top: 0; z-index: 50;
  background: rgba(248,250,252,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

/* Hero */
.hero {
  text-align: center; padding: 72px 0 48px; position: relative;
}
.heroBadge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 18px; border-radius: 999px;
  background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2);
  font-size: 13px; color: var(--brand); margin-bottom: 28px;
  animation: fadeUp .6s ease-out;
}
.hero h1 {
  font-size: 52px; margin: 0 0 18px; line-height: 1.06; letter-spacing: -1px;
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 50%, #7c3aed 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: fadeUp .7s ease-out .05s both;
}
.hero p {
  color: var(--muted); font-size: 19px; max-width: 600px; margin: 0 auto 30px;
  line-height: 1.6; animation: fadeUp .7s ease-out .1s both;
}
.heroCtas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: fadeUp .7s ease-out .15s both; }
.heroCtas .btnPrimary { padding: 15px 32px; font-size: 16px; border-radius: 12px; }
.heroCtas .btn { padding: 15px 32px; font-size: 16px; border-radius: 12px; }

/* Hero preview card */
.heroPreview {
  margin: 48px auto 0; max-width: 680px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 0;
  box-shadow: var(--shadowLg);
  overflow: hidden; animation: fadeUp .8s ease-out .25s both;
}
.heroPreviewBar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--bg2);
}
.heroPreviewDot { width: 11px; height: 11px; border-radius: 50%; }
.heroPreviewBody { padding: 20px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.heroPreviewLeft { display: flex; flex-direction: column; gap: 8px; }
.heroPreviewTile {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; background: var(--bg2); border: 1px solid var(--line);
  font-size: 13px; transition: border-color .15s;
}
.heroPreviewTile:hover { border-color: var(--brand2); }
.heroPreviewTileIcon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; background: rgba(99,102,241,.10); }
.heroPreviewTileName { font-weight: 600; }
.heroPreviewTilePrice { margin-left: auto; font-weight: 700; color: var(--brand); }
.heroPreviewRight {
  border-radius: 12px; background: var(--bg2); border: 1px solid var(--line);
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.heroPreviewTotal { display: flex; justify-content: space-between; font-size: 22px; font-weight: 800; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.heroPreviewRow { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.heroPreviewBtn { text-align: center; padding: 10px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #4f46e5); font-weight: 700; font-size: 14px; color: #fff; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Trust stats bar */
.trustBar {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  padding: 36px 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.trustStat { text-align: center; }
.trustStatNum { font-size: 30px; font-weight: 800; color: var(--text); }
.trustStatLabel { font-size: 12px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* Section headers */
.sectionHead { text-align: center; margin: 64px 0 32px; }
.sectionHead h2 { font-size: 34px; margin: 0 0 8px; letter-spacing: -.5px; }
.sectionHead p { color: var(--muted); font-size: 16px; margin: 0; }

/* Feature cards */
.featureCard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 22px; transition: border-color .25s, transform .2s, box-shadow .25s;
  box-shadow: var(--shadow);
}
.featureCard:hover {
  border-color: rgba(99,102,241,.3); transform: translateY(-4px);
  box-shadow: var(--shadowLg);
}
.featureIcon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(79,70,229,.10), rgba(124,58,237,.10));
  border: 1px solid rgba(99,102,241,.15);
}
.featureCard .cardTitle { font-size: 17px; margin-bottom: 6px; }
.featureCard p { font-size: 13px; line-height: 1.65; margin: 0; color: var(--muted); }

/* CTA banner */
.ctaBanner {
  text-align: center; padding: 56px 36px; margin: 64px 0 0;
  background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(124,58,237,.06));
  border: 1px solid rgba(99,102,241,.12); border-radius: 24px;
  position: relative; overflow: hidden;
}
.ctaBanner::before {
  content: ''; position: absolute; top: -50%; left: -10%; width: 120%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.05) 0%, transparent 60%);
  pointer-events: none;
}
.ctaBanner h2 { font-size: 30px; margin: 0 0 10px; position: relative; }
.ctaBanner p { color: var(--muted); margin: 0 0 24px; font-size: 16px; position: relative; }
.ctaBanner .btnPrimary { padding: 15px 36px; font-size: 16px; border-radius: 12px; position: relative; }

/* Footer */
.publicFooter {
  margin-top: 64px; padding: 28px 0; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.publicFooter .muted { font-size: 13px; }
.publicFooterLinks { display: flex; gap: 20px; }
.publicFooterLinks a { font-size: 13px; color: var(--muted); }
.publicFooterLinks a:hover { color: var(--text); text-decoration: none; }
.planGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; background: var(--panel); transition: border-color .2s, transform .15s, box-shadow .2s; box-shadow: var(--shadow); }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadowLg); }
.plan.featured { border-color: var(--brand2); box-shadow: 0 0 0 1px rgba(99,102,241,.3), var(--shadowLg); position: relative; }
.plan.featured::before {
  content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.planPrice { font-size: 32px; font-weight: 800; margin: 10px 0 4px; }
.plan ul { padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; margin: 12px 0 16px; }
.plan ul li::marker { color: var(--brand2); }
.authWrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.authCard { width: 100%; max-width: 430px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadowLg); }
.authTitle { font-size: 22px; font-weight: 700; }
.authSub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* Business type picker */
.typeGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.typeCard {
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel);
  transition: border-color .15s, box-shadow .15s;
}
.typeCard:hover { border-color: var(--brand2); box-shadow: var(--shadow); }
.typeCard.selected { border-color: var(--brand2); background: rgba(99,102,241,.06); box-shadow: 0 0 0 1px rgba(99,102,241,.2); }
.typeCard input { position: absolute; opacity: 0; pointer-events: none; }
.typeIcon { font-size: 22px; }
.typeName { font-weight: 700; font-size: 13px; }
.typeTag { font-size: 11px; color: var(--muted); line-height: 1.35; }

/* Receipt */
.receipt { background: #fff; color: #111; padding: 18px; border-radius: 10px; font-family: Consolas, monospace; font-size: 13px; max-width: 380px; }
.receipt.r58 { max-width: 220px; font-size: 11px; padding: 10px; }
.receipt.r80 { max-width: 300px; font-size: 13px; padding: 14px; }
.receipt.rA5 { max-width: 480px; font-size: 14px; padding: 24px; }
.receipt h3 { margin: 0 0 4px; text-align: center; }
.receipt .rRow { display: flex; justify-content: space-between; gap: 8px; }
.receipt hr { border: none; border-top: 1px dashed #999; margin: 8px 0; }
.receipt img { max-height: 70px; display: block; margin: 0 auto 8px; }

@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt { position: absolute; left: 0; top: 0; box-shadow: none; }
  .receipt.r58 { width: 58mm; max-width: 58mm; }
  .receipt.r80 { width: 80mm; max-width: 80mm; }
  .receipt.rA5 { width: 148mm; max-width: 148mm; }
}

@media (max-width: 1080px) {
  .gridSell, .grid2, .grid3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .heroPreviewBody { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; align-items: center; position: sticky; top: 0; z-index: 30; padding: 10px 12px; gap: 10px; }
  .nav { flex-direction: row; }
  .navItem { white-space: nowrap; padding: 8px 10px; }
  .sidebarFooter, .brandSub { display: none; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .sectionHead h2 { font-size: 26px; }
  .trustBar { gap: 24px; }
  .trustStatNum { font-size: 22px; }
  .ctaBanner { padding: 36px 20px; }
  .ctaBanner h2 { font-size: 22px; }

  /* Topbar: stack vertically, hide non-essential pills */
  .topbar { padding: 10px 14px; }
  .topbarRight { gap: 6px; }
  .topbarRight .pill { font-size: 11px; padding: 5px 8px; }
  .topbarRight .btnSm { padding: 5px 8px; font-size: 11px; }

  /* Content padding */
  .content { padding: 12px 14px 30px; }

  /* Cards */
  .card { padding: 12px; }
  .cardHeader { margin-bottom: 8px; }

  /* Forms: stack horizontally tight fields */
  .form { gap: 10px; }
  .field { gap: 4px; }

  /* Sell page search form */
  .gridSell .card .stackH form { flex-wrap: wrap; }
  .gridSell .card .stackH input, .gridSell .card .stackH select { max-width: 100% !important; flex: 1 1 140px; }

  /* Catalog tiles: 2 columns on phone */
  .catalog { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 50vh; }
  .tile { padding: 10px; min-height: 80px; }
  .tileName { font-size: 12px; }

  /* Cart rows */
  .cartList { max-height: 35vh; }
  .cartRow { padding: 8px; }

  /* Checkout split rows stack */
  .splitRow { flex-direction: column !important; gap: 6px !important; }
  .splitRow .field { width: 100%; }

  /* Stats: 2 columns on phone */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 10px; }
  .statValue { font-size: 17px; }

  /* Tables: make scrollable, reduce font */
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 8px 6px; }

  /* Reports filter form wraps */
  .cardHeader form { flex-wrap: wrap; gap: 6px; }
  .cardHeader form select, .cardHeader form input { max-width: 100% !important; flex: 1 1 120px; }

  /* Chart bars smaller */
  .chartBars { height: 120px; gap: 4px; }
  .chartBarLabel { font-size: 9px; }

  /* Hourly heatmap: hide labels on narrow */
  .heroPreviewBody { grid-template-columns: 1fr; }

  /* Modal: full width */
  .modalCard { max-width: 95vw; padding: 16px; }

  /* Auth card */
  .authCard { padding: 20px; }

  /* Plan grid: 1 column */
  .planGrid { grid-template-columns: 1fr; }

  /* Feature grid: 1 column */
  .grid3 > .featureCard, .grid2 > .featureCard { grid-column: 1; }
}

@media (max-width: 480px) {
  /* Very small phones */
  .hero h1 { font-size: 26px; }
  .hero { padding: 40px 0 30px; }
  .heroPreview { margin: 30px auto 0; }
  .heroPreviewBody { padding: 14px; }
  .sectionHead { margin: 40px 0 20px; }
  .sectionHead h2 { font-size: 22px; }
  .stats { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: repeat(2, 1fr); }
  .topbarRight .pill:nth-child(n+3) { display: none; }
  .brandTitle { font-size: 14px; }
  .brandMark { width: 34px; height: 34px; font-size: 14px; }
  .public { padding: 0 16px 40px; }
  .featureCard { padding: 20px 16px; }
  .ctaBanner { padding: 28px 16px; }
  .ctaBanner h2 { font-size: 20px; }
}

/* Modal */
.modalOverlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.40);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modalCard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; width: 100%; max-width: 420px; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadowLg);
}
.modalHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* Kitchen board */
.kitchenGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.kitchenCard {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel);
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.kitchenNew { border-color: rgba(217,119,6,.4); }
.kitchenPrep { border-color: rgba(99,102,241,.4); }
.kitchenReady { border-color: rgba(22,163,74,.4); }

/* Table floor grid */
.tableGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tableCell {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel);
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.tableCell.ok { border-color: rgba(22,163,74,.4); }
.tableCell.bad { border-color: rgba(220,38,38,.4); }
.tableCell.warn { border-color: rgba(217,119,6,.4); }
.tableCellName { font-weight: 600; font-size: 15px; }
.tableCellMeta { font-size: 11px; color: var(--muted); }

/* Chart bars */
.chartBars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 10px 0; }
.chartBar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; height: 100%; }
.chartBarFill { width: 100%; max-width: 48px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, rgba(99,102,241,.7), rgba(99,102,241,.3)); min-height: 2px; transition: height .3s; }
.chartBarLabel { font-size: 11px; color: var(--muted); }
.chartBarValue { font-size: 11px; color: var(--text); font-weight: 600; }

/* Loyalty badge */
.loyaltyPts { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(99,102,241,.10); color: var(--brand); border: 1px solid rgba(99,102,241,.2); }
.creditBal { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(22,163,74,.10); color: #16a34a; border: 1px solid rgba(22,163,74,.2); }

/* Payment toggle */
.paymentToggle { font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.paymentToggle input { accent-color: var(--brand); }
.paymentToggle:has(input:checked) { border-color: var(--brand2); background: rgba(99,102,241,.06); }

/* Clock-in screen */
.clockinWrap { padding: 10px 0 40px; }
.clockinHeader { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.clockinGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.clockinCard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 16px; text-align: center; transition: border-color .15s, transform .1s, box-shadow .15s;
  display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--shadow);
}
.clockinCard:hover { border-color: var(--brand2); transform: translateY(-2px); box-shadow: var(--shadowLg); }
.clockinAvatar {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .5px;
  margin-bottom: 6px;
}
.clockinName { font-weight: 700; font-size: 16px; color: var(--text); }
.clockinRole { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.clockinPinWrap { width: 100%; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.clockinPinWrap .input { width: 100%; text-align: center; font-size: 18px; letter-spacing: 6px; }
.clockinBtn { width: 100%; margin-top: 8px; justify-content: center; }
.clockinHint { font-size: 11px; color: var(--muted); margin-top: 4px; }
