/* Tablecove back office: dark side menu, light grey page, white cards, teal accent (design decision, 18-19 Nov 2026). */
:root {
  --ink: #1d2630;
  --muted: #5b6470;
  --line: #e1e5ea;
  --page: #f3f5f7;
  --card: #ffffff;
  --side: #14202b;
  --side-ink: #c9d3dc;
  --teal: #0e7c74;
  --teal-strong: #0a5f59;
  --teal-soft: #e6f3f1;
  --amber: #b26a00;
  --amber-soft: #fff4e0;
  --blue: #1f5fbf;
  --blue-soft: #e8f0fc;
  --green: #1e7f4f;
  --green-soft: #e8f5ee;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --grey-soft: #eef0f3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 32, 43, 0.06), 0 2px 8px rgba(20, 32, 43, 0.04);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); }
h1, h2, h3 { font-family: "Space Grotesk", Inter, "Segoe UI", system-ui, sans-serif; margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
a { color: var(--teal); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 0; }
.mono { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; }
.hidden { display: none !important; }

/* Focus rings for keyboard users */
:focus-visible { outline: 3px solid #7cc8c0; outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; border-radius: 6px; }

/* Forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; color: var(--ink); font-size: 13px; }
input, select, textarea {
  font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid #cfd6dd; border-radius: 8px; background: #fff; min-height: 38px;
}
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > label { flex: 1 1 140px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-error { color: var(--red); font-size: 13px; margin: 0; min-height: 1em; }

/* Buttons */
.btn {
  font: inherit; font-weight: 600; border: 1px solid #cfd6dd; background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; min-height: 38px; white-space: nowrap;
}
.btn:hover { background: var(--grey-soft); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-strong); }
.btn.danger { color: var(--red); border-color: #e7b9b5; }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: 12.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* Sign-in page */
.auth-page { background: linear-gradient(160deg, #e9f2f1 0%, #f3f5f7 55%); min-height: 100vh; }
.auth-wrap { max-width: 920px; margin: 0 auto; padding: 48px 20px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
.auth-card { padding: 26px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brand-name { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; font-size: 20px; }

/* App shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand-lockup { margin: 0 6px 18px; }
.side .brand-name { color: #fff; }
.nav-link { display: flex; align-items: center; gap: 10px; color: var(--side-ink); text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.active { background: var(--teal); color: #fff; }
.side-foot { margin-top: auto; font-size: 12px; padding: 8px 12px; color: #8b99a6; }
.main { padding: 22px 28px 48px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar .who { display: flex; align-items: center; gap: 10px; color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 2px; font-family: "Space Grotesk", Inter, sans-serif; }
.stat .sub { color: var(--muted); font-size: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: #f7fafa; }
table.data tr.selected td { background: var(--teal-soft); }
td.num, th.num { text-align: right; white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }

/* Status chips: one colour per status everywhere */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--grey-soft); color: var(--muted); }
.chip.new, .chip.booked { background: var(--amber-soft); color: var(--amber); }
.chip.preparing, .chip.seated, .chip.out_for_delivery, .chip.partially_paid { background: var(--blue-soft); color: var(--blue); }
.chip.ready, .chip.confirmed, .chip.completed, .chip.paid { background: var(--green-soft); color: var(--green); }
.chip.at_risk, .chip.cancelled, .chip.rejected, .chip.no_show, .chip.refunded, .chip.partially_refunded { background: var(--red-soft); color: var(--red); }

/* Split view (list + detail) */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.detail { position: sticky; top: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 12.5px; }
.timeline li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline .when { color: var(--muted); font-size: 11.5px; }
.changes { color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-word; }
.section-sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* Banners and toasts */
.banner { padding: 10px 14px; border-radius: 8px; font-weight: 600; margin-bottom: 14px; }
.banner.good { background: var(--green-soft); color: var(--green); }
.banner.bad { background: var(--red-soft); color: var(--red); }
.banner.warn { background: var(--amber-soft); color: var(--amber); }
#toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); max-width: 420px; z-index: 20; }
#toast.error { background: var(--red); }

/* Menu editor */
.price-input { width: 96px; }

/* Guest website (simple default look; each client gets its own look later) */
.guest { background: #f8f1e4; color: #2a1c15; }
.guest .card { border-color: #eadfcb; }
.guest-hero { max-width: 960px; margin: 0 auto; padding: 32px 20px 12px; }
.guest-hero h1 { font-family: Georgia, "Times New Roman", serif; font-size: 34px; }
.guest-main { max-width: 960px; margin: 0 auto; padding: 0 20px 48px; }
.guest .btn.primary { background: #a8322a; border-color: #a8322a; }
.guest .btn.primary:hover { background: #87271f; }
.tabs { display: flex; gap: 8px; margin: 14px 0; }
.tab { border: 1px solid #d9c9ad; background: #fff; padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; }
.tab.active { background: #2a1c15; color: #fff; border-color: #2a1c15; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { border: 1px solid #d9c9ad; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: inherit; }
.slot.picked { background: #a8322a; border-color: #a8322a; color: #fff; }
.slot:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.menu-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eadfcb; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d9c9ad; background: #fff; font-size: 18px; cursor: pointer; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.totals .grand { font-weight: 800; font-size: 16px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .side .brand-lockup, .side-foot { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .auth-grid, .grid2, .grid3 { grid-template-columns: 1fr; }
  .main { padding: 16px; }
}

/* ---------------------------------------------------------------- sign-in role tiles */
.role-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.role-tile { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; font: inherit; text-align: left; min-height: 84px; }
.role-tile:hover { border-color: var(--teal); background: var(--teal-soft); }
.role-tile strong { font-size: 16px; }
.btn.back { margin-bottom: 12px; }

/* ---------------------------------------------------------------- role screens (kitchen, waiter, rider) */
.role-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; background: var(--side); color: #fff; flex-wrap: wrap; }
.role-top .brand-lockup { margin: 0; }
.role-top .brand-name { color: #fff; }
.role-top .who { display: flex; align-items: center; gap: 10px; color: var(--side-ink); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tabs .tab { font-size: 13px; }

/* Kitchen tickets: colour by status, amber when close to the target time, red when late */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ticket { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--grey-soft); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.ticket.new { border-top-color: var(--amber); }
.ticket.preparing { border-top-color: var(--blue); }
.ticket.ready { border-top-color: var(--green); }
.ticket.cancelled, .ticket.rejected { border-top-color: var(--red); opacity: 0.8; }
.ticket.warn .timer { color: var(--amber); }
.ticket.late { border-color: var(--red); }
.ticket.late .timer { color: var(--red); }
.ticket header { display: flex; justify-content: space-between; font-size: 18px; }
.ticket .timer { font-weight: 700; font-family: "JetBrains Mono", Consolas, monospace; }
.ticket-items { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.ticket-items li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ticket .note, .ticket-items .note { color: var(--amber); font-size: 13px; font-weight: 600; }
.allergens { color: var(--red); font-size: 12px; font-weight: 700; }
.ticket footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.ticket footer .btn { flex: 1; min-height: 48px; font-size: 16px; }

/* Waiter: table tiles and tap-to-add menu */
.table-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.table-tile { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 12px; border-radius: var(--radius); border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; min-height: 84px; text-align: left; }
.table-tile strong { font-size: 18px; }
.table-tile.free { border-color: var(--line); }
.table-tile.reserved_soon, .table-tile.seated { border-color: var(--blue); }
.table-tile.ordering { border-color: var(--amber); background: var(--amber-soft); }
.table-tile.waiting_for_kitchen { border-color: var(--blue); background: var(--blue-soft); }
.table-tile.ready_to_serve { border-color: var(--green); background: var(--green-soft); }
.table-tile.picked { outline: 3px solid var(--teal); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-weight: 600; }
.chip-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.item-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.item-tile { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; cursor: pointer; font: inherit; min-height: 64px; text-align: left; }
.item-tile:hover { border-color: var(--teal); background: var(--teal-soft); }
.pos input { width: 100%; margin: 8px 0; }

/* Rider: phone first */
.rider-page .main { max-width: 640px; margin: 0 auto; padding: 12px; }
.rider-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rider-head > div { flex: 1; }
.switch { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.switch input { width: 22px; height: 22px; }
.banner.track { border: 2px solid var(--green); }
.delivery .address { font-weight: 600; margin: 4px 0; }
.collect { color: var(--amber); font-weight: 700; }
.btn-row.big .btn { min-height: 48px; flex: 1; font-size: 16px; }
.rider .tabs { overflow-x: auto; flex-wrap: nowrap; }
.rider .tab { white-space: nowrap; }

/* Delivery route sketch (real GPS points only) */
.route-box { margin: 12px 0; }
svg.route { width: 100%; max-width: 360px; background: #f6f8fa; border: 1px solid var(--line); border-radius: 8px; }
svg.route polyline { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
svg.route circle.start { fill: var(--green); }
svg.route circle.end { fill: var(--red); }

@media (max-width: 700px) {
  .role-tiles { grid-template-columns: 1fr; }
  .tickets { grid-template-columns: 1fr; }
}

/* Forgot password and demo accounts (sign-in page) */
[hidden] { display: none !important; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--teal); text-decoration: underline; cursor: pointer; align-self: flex-start; }
.link-btn:hover { color: var(--teal-strong); }
.auth-wrap.narrow { max-width: 480px; }
.demo-panel { margin-top: 20px; }
.demo-password { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 8px; background: var(--teal-soft); margin-bottom: 14px; }
.demo-password .mono { font-size: 14px; }
.demo-restaurants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.demo-restaurant { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.demo-restaurant .kv dd { text-align: left; }
.demo-group h3 { margin: 18px 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.demo-person { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.demo-person p { margin: 0; font-size: 13px; }
.demo-person .btn { align-self: flex-start; margin-top: auto; }
.demo-person-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.demo-email { color: var(--muted); word-break: break-all; }
.demo-try { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.demo-fill { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border: 1px dashed #cfd6dd; border-radius: 8px; }
.reset-link-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.reset-link-box input { width: 100%; font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; }
@media (max-width: 700px) {
  .demo-restaurants { grid-template-columns: 1fr; }
}

/* In-page question and confirm boxes (replace the browser's prompt() and confirm()) */
.tc-dialog { border: 0; border-radius: 14px; padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(20, 32, 43, 0.25); color: var(--ink); }
.tc-dialog::backdrop { background: rgba(20, 32, 43, 0.45); }
.tc-dialog h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.tc-dialog textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; padding: 8px 10px; border: 1px solid #cfd6dd; border-radius: 8px; }
.btn-row.end { justify-content: flex-end; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { background: #8f1e18; }

/* ================================================================ live demo restaurant: photos, charts, motion */
.r-logo { border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.powered { font-size: 11px; color: var(--side-ink); opacity: 0.75; margin-left: 2px; }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title h1 { margin: 0; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; }
.me-name { font-weight: 600; font-size: 13px; }
.role-top .me-name { color: #fff; }
@media (max-width: 700px) { .me-name, .powered { display: none; } }

/* Layout helpers */
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.today > * + *, .review-list > * + * { margin-top: 16px; }
.today .grid2, .today .grid3 { gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; } }

/* Owner overview hero */
.hero-card { position: relative; border-radius: 14px; overflow: hidden; min-height: 150px; background: var(--side); color: #fff; box-shadow: var(--shadow); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 32, 43, 0.86) 0%, rgba(20, 32, 43, 0.55) 55%, rgba(20, 32, 43, 0.25) 100%); }
.hero-body { position: relative; display: flex; align-items: center; gap: 16px; padding: 26px 24px; flex-wrap: wrap; min-height: 150px; box-sizing: border-box; }
.hero-name { font-family: "Space Grotesk", Inter, sans-serif; font-size: 26px; font-weight: 700; }
.hero-sub { color: #dbe4ea; font-size: 13px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.hero-card .chip { background: rgba(255, 255, 255, 0.16); color: #fff; }
.hero-card .chip.ready { background: var(--green); color: #fff; }
.hero-card .chip.at_risk { background: var(--red); color: #fff; }

/* KPIs and charts */
.kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 10px; }
.kpi-value { font-family: "Space Grotesk", Inter, sans-serif; font-size: 28px; font-weight: 700; }
.kpi-value.small { font-size: 20px; }
.delta { font-size: 12.5px; font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: #9fd1cb; transform-box: fill-box; transform-origin: bottom; animation: tc-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; transition: fill 0.15s; }
.chart .bar.now { fill: var(--teal); }
.chart .bar:hover { fill: var(--teal-strong); }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: Inter, sans-serif; }
.meters { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.meters .track, .track.progress { display: block; height: 8px; border-radius: 999px; background: var(--grey-soft); overflow: hidden; margin-top: 4px; }
.meters .fill { display: block; height: 100%; border-radius: 999px; background: var(--teal); transform-origin: left; animation: tc-grow-x 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.track.progress { width: 220px; }
.track.progress .fill { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 999px; transition: width 0.5s linear; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Lists: best sellers, people, activity, reviews */
.dish-thumb { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; display: inline-grid; place-items: center; background: var(--grey-soft); color: var(--muted); font-size: 13px; flex: none; }
.dish-thumb.empty { font-weight: 700; }
.thumb-cell { width: 60px; }
.best, .people, .feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.best li, .people li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.feed li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.feed-time { color: var(--muted); font-family: "JetBrains Mono", Consolas, monospace; font-size: 11.5px; }
@media (max-width: 700px) { .feed li { grid-template-columns: 1fr; gap: 2px; } }
.stars { color: #e0a100; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #d9dee4; }
.review-score { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-score .big { font-family: "Space Grotesk", Inter, sans-serif; font-size: 34px; font-weight: 700; }
.mini-review { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--teal-soft); background: #fafbfc; border-radius: 0 8px 8px 0; font-size: 13px; }
.mini-review p { margin: 4px 0; }
.mini-review cite { color: var(--muted); font-style: normal; font-size: 12px; }
.review { display: flex; flex-direction: column; gap: 6px; }
.review.rating-1, .review.rating-2 { border-left: 4px solid var(--red); }
.review.rating-3 { border-left: 4px solid var(--amber); }
.review-text { margin: 4px 0; font-size: 14.5px; }
.review .reply { background: var(--teal-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.review .reply p { margin: 4px 0; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; }
.reply-form textarea { flex: 1; font: inherit; padding: 8px 10px; border: 1px solid #cfd6dd; border-radius: 8px; resize: vertical; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.chip-btn:hover { border-color: var(--teal); }
.chip-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

/* Personal strip on kitchen screens */
.my-strip { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.my-strip-name { display: flex; flex-direction: column; }
.my-kpis { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.my-kpis div { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.my-kpis b { font-family: "Space Grotesk", Inter, sans-serif; font-size: 20px; color: var(--ink); }

/* Waiter menu tiles with photos */
.item-tile.has-photo { padding: 0 0 8px; overflow: hidden; }
.item-tile.has-photo img { width: 100%; height: 72px; object-fit: cover; display: block; margin-bottom: 4px; }
.item-tile.has-photo strong, .item-tile.has-photo span { padding: 0 8px; }

/* Notification bell */
.bell-wrap, .switch-wrap { position: relative; }
.bell { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; font-size: 16px; transition: transform 0.15s; }
.role-top .bell { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.bell:hover { transform: translateY(-1px); }
.bell.ring .bell-icon { animation: tc-ring 0.9s ease; display: inline-block; }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-sizing: border-box; animation: tc-pop 0.3s ease; }
.bell-panel, .switch-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(20, 32, 43, 0.18); z-index: 50; padding: 12px; opacity: 0; transform: translateY(-6px) scale(0.98); transition: opacity 0.18s, transform 0.18s; text-align: left; }
.bell-panel.show, .switch-panel.show { opacity: 1; transform: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-list li { display: flex; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: 13px; border-radius: 6px; }
.bell-list li.unread { background: var(--teal-soft); }
.bell-kind { width: 22px; text-align: center; }

/* Demo profile switcher */
.demo-switch-btn { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: tc-pulse 2s infinite; }
.switch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.switch-person { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.switch-person:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); transform: translateY(-1px); }
.switch-person.current { border-color: var(--teal); opacity: 0.7; cursor: default; }
.switch-text { display: flex; flex-direction: column; min-width: 0; }
.switch-text strong { font-size: 13px; }
.switch-more { margin-top: 10px; font-size: 13px; }
.switch-more summary { cursor: pointer; color: var(--teal); margin-bottom: 8px; }
.switch-reset { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 480px) { .switch-grid { grid-template-columns: 1fr; } }

/* Overlay for profile switching and demo reset */
.tc-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(20, 32, 43, 0.45); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s; }
.tc-overlay.show { opacity: 1; }
.tc-overlay-card { background: #fff; border-radius: 16px; padding: 28px 34px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 24px 60px rgba(20, 32, 43, 0.3); transform: scale(0.96); transition: transform 0.25s; text-align: center; max-width: 320px; }
.tc-overlay.show .tc-overlay-card { transform: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--teal-soft); border-top-color: var(--teal); animation: tc-spin 0.8s linear infinite; }

/* Loading skeleton */
.skeleton { display: grid; gap: 14px; }
.skeleton span { display: block; height: 86px; border-radius: var(--radius); background: linear-gradient(90deg, #eceff2 25%, #f6f8f9 50%, #eceff2 75%); background-size: 200% 100%; animation: tc-shimmer 1.2s infinite; }

/* Entrance (only when a screen opens, not on every refresh) */
.tc-enter .card, .tc-enter .stat, .tc-enter .hero-card, .tc-enter .ticket, .tc-enter .my-strip, .tc-enter .table-tile { animation: tc-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.tc-enter .stat:nth-child(2), .tc-enter .card:nth-child(2), .tc-enter .ticket:nth-child(2) { animation-delay: 50ms; }
.tc-enter .stat:nth-child(3), .tc-enter .card:nth-child(3), .tc-enter .ticket:nth-child(3) { animation-delay: 100ms; }
.tc-enter .stat:nth-child(4), .tc-enter .card:nth-child(4), .tc-enter .ticket:nth-child(4) { animation-delay: 150ms; }
.tc-enter .card:nth-child(n + 5), .tc-enter .ticket:nth-child(n + 5) { animation-delay: 200ms; }

/* Something new or changed since the last refresh flashes once */
.is-new { animation: tc-flash-new 1.6s ease; }
.is-changed { animation: tc-flash 1.6s ease; }
.ticket.is-new { box-shadow: 0 0 0 3px var(--amber-soft), var(--shadow); }

/* Buttons feel pressed */
.btn, .chip-btn, .role-tile, .item-tile, .table-tile, .switch-person { transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s; }
.btn:active, .chip-btn:active, .item-tile:active, .table-tile:active, .switch-person:active:not(:disabled) { transform: scale(0.97); }
#toast:not(.hidden) { animation: tc-toast 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes tc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes tc-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tc-flash { 0%, 100% { background-color: transparent; } 20% { background-color: var(--teal-soft); } }
@keyframes tc-flash-new { 0% { opacity: 0; transform: translateY(-6px); } 30% { opacity: 1; transform: none; } 100% { opacity: 1; } }
@keyframes tc-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes tc-pop { from { transform: scale(0.4); } to { transform: scale(1); } }
@keyframes tc-pulse { 0% { box-shadow: 0 0 0 0 rgba(30, 127, 79, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(30, 127, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(30, 127, 79, 0); } }
@keyframes tc-spin { to { transform: rotate(360deg); } }
@keyframes tc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes tc-toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Guest website: cover, logo, dish and area photos, reviews, feedback */
.guest-hero.has-cover { position: relative; max-width: none; padding: 70px 20px 34px; color: #fff; overflow: hidden; }
.guest-hero.has-cover > h1, .guest-hero.has-cover > p { position: relative; max-width: 960px; margin-left: auto; margin-right: auto; }
.guest-hero .guest-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.guest-hero .guest-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 28, 21, 0.25) 0%, rgba(42, 28, 21, 0.78) 100%); }
.guest-hero.has-cover h1 { color: #fff; display: flex; align-items: center; gap: 14px; }
.guest-hero.has-cover .muted { color: #f1e6d6; }
.guest-logo { width: 58px; height: 58px; border-radius: 50%; flex: none; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.menu-item.has-photo { justify-content: flex-start; }
.menu-item.has-photo > div:first-of-type { flex: 1; }
.menu-photo { width: 76px; height: 58px; border-radius: 8px; object-fit: cover; flex: none; }
.guest-extras { max-width: 960px; margin: 0 auto 40px; padding: 0 20px; display: flex; flex-direction: column; gap: 16px; }
.area-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.area-card { margin: 0; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #eadfcb; }
.area-card img { width: 100%; height: 140px; object-fit: cover; display: block; transition: transform 0.4s; }
.area-card:hover img { transform: scale(1.04); }
.area-card figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.guest-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.star-pick { display: flex; gap: 4px; }
.star-pick button { font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; color: #d9dee4; transition: transform 0.1s, color 0.15s; padding: 2px; }
.star-pick button.on { color: #e0a100; }
.star-pick button:hover { transform: scale(1.15); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.demo-face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }

/* Demo notices: the public online demo's sign-in panel, and every demo restaurant's guest page. */
.demo-public-note, .guest-demo-note { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 10px 14px; font-weight: 500; line-height: 1.45; }
.guest-demo-note { margin: 12px auto 0; max-width: 720px; font-size: 0.92rem; text-align: center; }
