:root {
  --bg: #f5f3ee;
  --panel: #ffffff;
  --panel-2: #faf8f4;
  --ink: #1b241f;
  --ink-2: #4c5a52;
  --ink-3: #85918a;
  --line: #e6e1d7;
  --brand: #1f2421;      /* Tapa charcoal */
  --brand-2: #fdf0cf;    /* honey */
  --brand-ink: #ffffff;
  --gold: #f2a900;       /* Tapa gold */
  --accent: #c98a00;
  --accent-2: #fdf0cf;
  --good: #1f7a4d;
  --good-2: #e1f2e7;
  --danger: #b4382f;
  --danger-2: #fbe9e7;
  --info: #2a62a8;
  --info-2: #e8f0fa;
  --chat-bg: #ece6dc;
  --bubble-in: #ffffff;
  --bubble-out: #d9f2dd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 4px 16px rgba(20, 30, 25, .05);
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121714; --panel: #1a211d; --panel-2: #1f2722; --ink: #e9efe9; --ink-2: #b2beb6; --ink-3: #7d8a82;
    --line: #2b352f; --brand: #f2a900; --brand-2: #3a2f14; --brand-ink: #1f2421; --gold: #f2a900; --accent: #f2c14e; --accent-2: #3a2f14;
    --good: #5cc08a; --good-2: #1c3527; --danger: #e0695f; --danger-2: #3a1f1c; --info: #6ea4e8; --info-2: #1b2a3d;
    --chat-bg: #0f1411; --bubble-in: #222b26; --bubble-out: #1f4a33; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121714; --panel: #1a211d; --panel-2: #1f2722; --ink: #e9efe9; --ink-2: #b2beb6; --ink-3: #7d8a82;
  --line: #2b352f; --brand: #f2a900; --brand-2: #3a2f14; --brand-ink: #1f2421; --gold: #f2a900; --accent: #f2c14e; --accent-2: #3a2f14;
  --good: #5cc08a; --good-2: #1c3527; --danger: #e0695f; --danger-2: #3a1f1c; --info: #6ea4e8; --info-2: #1b2a3d;
  --chat-bg: #0f1411; --bubble-in: #222b26; --bubble-out: #1f4a33; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-3); }

/* ── Buttons & inputs ── */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--panel-2); padding: 9px 12px; border-radius: 10px; outline: none; }
.input:focus { border-color: var(--brand); background: var(--panel); }
textarea.input { resize: vertical; min-height: 84px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 160px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--ink); font-size: 14px; margin: 0; }
.switch input { appearance: none; width: 38px; height: 22px; background: var(--line); border-radius: 99px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }

/* ── Auth ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: #1f2421; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; max-width: 14ch; }
.auth-hero p { opacity: .85; max-width: 42ch; font-size: 16px; }
.auth-hero .logo { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.auth-hero ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; opacity: .95; }
.auth-hero li span { width: 28px; height: 28px; display: grid; place-items: center; background: rgba(242,169,0,.18); border-radius: 8px; }
.auth-hero .blob { position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(242,169,0,.22) 1.6px, transparent 2px) 0 0 / 14px 14px; opacity: .6; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.01em; }
.tabs { display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); padding: 4px; border-radius: 12px; margin: 20px 0; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.tabs button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.demo-note { margin-top: 18px; padding: 12px; border-radius: 10px; background: var(--accent-2); font-size: 13px; color: var(--ink-2); }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-hero { padding: 32px 22px; } .auth-hero h1 { font-size: 30px; } .auth-hero ul { display: none; } }

/* ── Shell ── */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 17px; }
.side .brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-style: normal; font-size: 15px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: var(--panel-2); color: var(--ink); }
.nav a.on { background: var(--brand-2); color: var(--brand); }
.nav a .ico { width: 20px; text-align: center; }
.nav a .badge { margin-left: auto; }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.side .foot b { color: var(--ink); display: block; font-size: 14px; }
main { padding: 26px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.015em; }
.page-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--line); z-index: 20; }
  .side .brand, .side .foot { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 10.5px; flex: 1; text-align: center; }
  .nav a .ico { font-size: 18px; }
  .nav a .badge { position: absolute; margin: -4px 0 0 20px; }
  main { padding: 18px 16px 96px; }
}

/* ── Cards, tiles, tables ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.card .sub { color: var(--ink-3); font-size: 13.5px; margin: -8px 0 14px; }
.grid { display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.tile .k { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.tile .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12.5px; color: var(--ink-3); }
.tile.alert { border-color: var(--accent); background: var(--accent-2); }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; font-size: 12px; font-weight: 700; border-radius: 99px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.green { background: var(--good-2, #e1f2e7); color: var(--good, #1f7a4d); border-color: transparent; }
.badge.amber { background: var(--accent-2); color: var(--accent); border-color: transparent; }
.badge.red { background: var(--danger-2); color: var(--danger); border-color: transparent; }
.badge.blue { background: var(--info-2); color: var(--info); border-color: transparent; }
.badge[hidden] { display: none !important; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.empty { text-align: center; color: var(--ink-3); padding: 36px 12px; }
.empty .big { font-size: 34px; }
.segmented { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.segmented button.on { background: var(--brand-2); color: var(--brand); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; border: 2px solid var(--line); flex: none; }
.checklist .done .tick { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.checklist .done .t { color: var(--ink-3); text-decoration: line-through; }
.checklist li .btn { margin-left: auto; }
.checklist .done.keep .t { color: var(--ink); text-decoration: none; }
.checklist .done.keep .tick { background: #1f9d55; border-color: #1f9d55; color: #fff; }

.spark { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 8px; }
.spark div { flex: 1; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 3px; opacity: .85; position: relative; }
.spark-labels { display: flex; gap: 6px; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.spark-labels span { flex: 1; text-align: center; }

/* ── Orders ── */
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.order { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.order.fresh { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.order header { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.order header b { font-size: 16px; }
.order .who { font-size: 13.5px; color: var(--ink-2); }
.order ul { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.order ul li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.order ul li:last-child { border: 0; }
.order ul li em { color: var(--ink-3); font-size: 12.5px; }
.order .tot { display: flex; justify-content: space-between; font-weight: 800; }
.order .addr { font-size: 13px; color: var(--ink-2); background: var(--panel-2); padding: 8px 10px; border-radius: 8px; word-break: break-word; }
.order .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.day-head { font-weight: 800; margin: 18px 0 8px; font-size: 15px; display: flex; gap: 8px; align-items: center; }

/* ── Menu editor ── */
.cat { margin-bottom: 18px; }
.cat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cat-head h3 { margin: 0; font-size: 16px; flex: 1; }
.item-row { display: grid; grid-template-columns: 1fr 120px 90px auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 8px; }
.item-row .nm { font-weight: 600; }
.item-row .ds { font-size: 12.5px; color: var(--ink-3); }
.item-row.off { opacity: .55; }
@media (max-width: 640px) { .item-row { grid-template-columns: 1fr auto; } .item-row .price-col { grid-column: 1; } }

/* ── Inbox ── */
.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: calc(100vh - 140px); min-height: 480px; box-shadow: var(--shadow); }
.threads { border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.thread { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; color: inherit; }
.thread:hover { background: var(--panel-2); }
.thread.on { background: var(--brand-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-2); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; }
.thread .meta { min-width: 0; flex: 1; }
.thread .top { display: flex; justify-content: space-between; gap: 6px; }
.thread .top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.thread .top span { font-size: 11.5px; color: var(--ink-3); flex: none; }
.thread .last { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .tags { display: flex; gap: 4px; margin-top: 3px; }
.convo { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.convo-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.convo-head .meta { flex: 1; min-width: 0; }
.convo-head .meta small { color: var(--ink-3); display: block; }
.convo-banner { padding: 8px 16px; font-size: 13px; background: var(--accent-2); color: var(--ink-2); }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; height: auto; } .inbox.has-thread .threads { display: none; } .inbox:not(.has-thread) .convo { display: none; } .convo .msgs { height: 60vh; } }

/* ── Chat bubbles (inbox + simulator) ── */
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; background: var(--chat-bg); display: flex; flex-direction: column; gap: 6px; }
.bub { max-width: min(78%, 420px); padding: 7px 10px 5px; border-radius: 10px; background: var(--bubble-in); align-self: flex-start; box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: 14px; overflow-wrap: anywhere; position: relative; flex: none; }
.bub.out { background: var(--bubble-out); align-self: flex-end; }
.bub.staff { border-left: 3px solid var(--accent); }
.bub .t { font-size: 10.5px; color: var(--ink-3); text-align: right; margin-top: 2px; display: flex; justify-content: flex-end; gap: 6px; }
.bub .hdr { font-weight: 700; }
.bub .ftr { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.bub .err { color: var(--danger); font-size: 12px; margin-top: 4px; }
.bub-acts { display: grid; gap: 4px; margin-top: 6px; }
.bub-acts button, .bub-acts a { border: 0; border-top: 1px solid rgba(0,0,0,.08); background: transparent; color: var(--info); padding: 8px 6px 4px; font-weight: 600; cursor: pointer; font-size: 14px; text-align: center; text-decoration: none; }
.bub-acts button:disabled { color: var(--ink-3); cursor: default; }
.sys-note { align-self: center; font-size: 12px; background: var(--panel); color: var(--ink-3); padding: 3px 10px; border-radius: 99px; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--panel); }
.composer .input { border-radius: 99px; }
.composer .btn { border-radius: 99px; }
.wa-fmt b { font-weight: 700; }
.wa-fmt i { font-style: italic; }

/* ── Simulator phone ── */
.sim-wrap { display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }
.phone { border-radius: 34px; border: 10px solid #1d211f; background: #1d211f; height: 720px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.phone-top { background: #1f5c41; color: #fff; padding: 14px 14px 10px; display: flex; align-items: center; gap: 10px; border-radius: 24px 24px 0 0; }
.phone-top .avatar { background: rgba(255,255,255,.18); color: #fff; }
.phone-top small { opacity: .8; display: block; font-size: 12px; }
.phone .msgs { border-radius: 0; }
.phone .composer { border-radius: 0 0 24px 24px; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; z-index: 5; }
.sheet { background: var(--panel); width: 100%; border-radius: 16px 16px 0 0; max-height: 75%; overflow-y: auto; padding: 10px 0 14px; }
.sheet h4 { margin: 4px 16px 8px; font-size: 15px; text-align: center; }
.sheet .sec { font-size: 12px; font-weight: 700; color: var(--brand); padding: 10px 16px 4px; text-transform: uppercase; letter-spacing: .03em; }
.sheet button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sheet button:hover { background: var(--panel-2); }
.sheet button small { display: block; color: var(--ink-3); font-size: 12.5px; }
.phone-screen { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--chat-bg); }
.tips li { margin-bottom: 6px; color: var(--ink-2); }
.tips code, .kbd { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
@media (max-width: 1000px) { .sim-wrap { grid-template-columns: 1fr; } .phone { height: 640px; max-width: 420px; margin: 0 auto; width: 100%; } }

/* ── Settings ── */
.settings { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.settings nav { position: sticky; top: 20px; display: grid; gap: 2px; }
.settings nav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.settings nav a:hover { background: var(--panel); }
.hours { display: grid; gap: 8px; }
.hours .d { display: grid; grid-template-columns: 60px auto 1fr 1fr; gap: 10px; align-items: center; }
.hours .d .input { padding: 6px 10px; }
.copy { display: flex; gap: 8px; }
.copy .input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.save-bar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.save-bar .btn { box-shadow: var(--shadow); }
.steps { padding-left: 20px; margin: 0; color: var(--ink-2); font-size: 14px; }
.steps li { margin-bottom: 6px; }
@media (max-width: 900px) { .settings { grid-template-columns: 1fr; } .settings nav { display: none; } .hours .d { grid-template-columns: 48px auto 1fr 1fr; } }

/* ── Modal & toast ── */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 15, 12, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 16px; padding: 22px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: 90vh; overflow-y: auto; }
.modal h3 { margin: 0 0 16px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--danger); color: #fff; }
@media (max-width: 900px) { #toast { bottom: 84px; } }

/* ── Billing ── */
.billbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.billbar.red { background: var(--danger-2); color: var(--danger); }
.billbar.amber { background: var(--accent-2); color: var(--ink); }
.billbar.blue { background: var(--info-2); color: var(--info); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.plan.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-2); }
.plan .pn { font-weight: 800; font-size: 16px; }
.plan .pp { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .pp small { font-size: 14px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.plan ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 4px; }
.plan .pa { margin-top: auto; }
.plan .pa .btn { width: 100%; justify-content: center; }
/* Staff order form: column labels only on the first line */
.co-line + .co-line label { display: none; }
.co-line { flex-wrap: nowrap !important; }
.co-line .field { min-width: 0; }
.convo-head { flex-wrap: wrap; }
.co-line { gap: 8px !important; }
.co-line .co-name { flex: 1 1 auto; }
.co-line .co-qty { flex: 0 0 64px; }
.co-line .co-price { flex: 0 0 96px; }
.co-line .co-rm { margin-bottom: 14px; padding: 6px 8px; }
@media (max-width: 520px) {
  .co-line .co-qty { flex-basis: 48px; }
  .co-line .co-price { flex-basis: 72px; }
  .co-line .co-rm { padding: 6px 4px; }
}
/* Connect WhatsApp */
.wa-btn { display: inline-flex; align-items: center; gap: 8px; background: #1b8f4c; border-color: #1b8f4c; padding: 11px 20px; margin: 4px 0 6px; }
.wa-btn:disabled { opacity: .6; cursor: wait; }
.wa-need { margin: 4px 0 14px; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.wa-on { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wa-on > div:nth-child(2) { flex: 1 1 220px; }
.wa-dot { width: 12px; height: 12px; border-radius: 50%; background: #1b8f4c; box-shadow: 0 0 0 4px rgba(27,143,76,.18); flex: none; }
.wa-adv { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.wa-adv summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
/* Delivery */
.dlv { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 8px; }
.dlv-map { font-weight: 600; }
.dlv-who { flex: 1 1 auto; }
.dlv-addr { background: var(--bg, #f4f6f3); border-radius: 12px; padding: 10px 12px; margin-bottom: 4px; }
.dlv-h { margin: 14px 0 6px; font-weight: 700; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.dlv-riders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dlv-r { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; }
.dlv-r small { display: block; color: var(--ink-3); font-size: 12px; }
.dlv-r.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-2); }
.dlv-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dlv-app { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-decoration: none; color: inherit; }
.dlv-app small { display: block; color: var(--ink-3); font-size: 11.5px; line-height: 1.3; margin-top: 2px; }
.dlv-app:hover, .dlv-r:hover { border-color: var(--brand); }
.dlv-share { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.dlv-share pre { white-space: pre-wrap; word-break: break-word; background: var(--bg, #f4f6f3); border-radius: 8px; padding: 8px; font-size: 12.5px; margin: 0 0 8px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; flex: none; }
.rd { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rd-acts { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 520px) { .dlv-apps { grid-template-columns: 1fr; } }
/* ── Phones and tablets ── */
.settings { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
.settings > div { min-width: 0; }
.more-btn { display: none !important; }
.install-btn { width: 100%; margin-bottom: 10px; justify-content: center; }
.inst-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.inst-ico img { border-radius: 11px; display: block; }
.inst-acts { display: flex; gap: 6px; }
.switch.wake { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.more-sheet h3 { margin-bottom: 8px; }
.more-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.more-item .ico { font-size: 20px; width: 26px; text-align: center; }
.more-item .badge { margin-left: auto; }
.more-foot { padding-top: 14px; font-size: 13px; color: var(--ink-3); display: grid; gap: 2px; }
.more-foot b { color: var(--ink); font-size: 14px; }
.more-foot a { margin-top: 8px; font-weight: 600; }
@media (max-width: 900px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .side { padding-bottom: max(6px, env(safe-area-inset-bottom)); padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .nav a.sec { display: none; }
  .more-btn { display: flex !important; }
  .nav a { font-size: 11px; }
  .modal-bg.sheet-mode { place-items: end center; padding: 0; }
  .modal-bg.sheet-mode .modal { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .page-head .btn { padding: 7px 12px; }
}
@media (hover: none) and (pointer: coarse) {
  .btn.sm { min-height: 38px; }
  .input { font-size: 16px; } /* stops iPhone zooming into fields */
}
@media (max-width: 600px) {
  .hours .d { grid-template-columns: 40px auto minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .hours .d .input { min-width: 0; width: 100%; padding-left: 6px; padding-right: 6px; }
}
.inst-text { flex: 1 1 240px; min-width: 0; }
.inst-acts { margin-left: auto; }
/* Menu photos & catalog */
.item-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--panel-2, var(--bg)); }
.thumb.add { display: grid; place-items: center; font-size: 18px; cursor: pointer; opacity: .7; }
.thumb.add:hover { opacity: 1; border-color: var(--brand); }
.photo-pick { display: flex; gap: 12px; align-items: flex-start; }
.photo-prev { width: 88px; height: 88px; border-radius: 14px; overflow: hidden; border: 1px dashed var(--line); display: grid; place-items: center; font-size: 26px; flex: none; background: var(--bg); }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick label.btn { display: inline-flex; margin: 0 6px 6px 0; cursor: pointer; }
.bub-img { display: block; width: calc(100% + 16px); max-width: none; margin: -6px -8px 6px; border-radius: 8px 8px 0 0; aspect-ratio: 4/3; object-fit: cover; }
.bub-cat { display: flex; flex-direction: column; background: rgba(0,0,0,.05); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
.bub-cat small { color: var(--ink-3); }
.cat-sheet .cat-it { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.cat-sheet .cat-it img, .cat-sheet .ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--bg); }
.cat-sheet .cat-it small { display: block; color: var(--ink-3); font-size: 12px; }
.cat-sheet .qty { display: flex; align-items: center; gap: 6px; }
.cat-sheet .qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-weight: 700; padding: 0; }
.cat-sheet .send-cart { margin: 10px 14px 4px; width: calc(100% - 28px); background: #1b8f4c; color: #fff; border: 0; border-radius: 10px; padding: 11px; font-weight: 700; }
.cat-sheet .send-cart:disabled { opacity: .5; }
@media (max-width: 640px) { .item-row .item-main { grid-column: 1; } }
.cat-sheet .qty button { display: grid; place-items: center; text-align: center; }
.cat-sheet .qty button:hover { background: var(--brand-2); }
.cat-sheet .send-cart { text-align: center; border-bottom: 0; }
.cat-sheet .send-cart:hover { background: #157a40; }
/* Order search & detail */
.osearch { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 12px; }
.osearch #oq { flex: 1 1 260px; }
.osearch input[type=date] { flex: 0 1 150px; }
.osearch select { flex: 0 1 150px; }
.osum { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.osum span { color: var(--ink-3); font-size: 13.5px; }
.tbl-wrap { overflow-x: auto; }
.otable tr[data-od] { cursor: pointer; }
.otable tr[data-od]:hover td { background: var(--panel-2, var(--bg)); }
.otable .ellip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; margin-top: 10px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.link-btn:hover { text-decoration-color: var(--brand); }
.od-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.od-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.od-l { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.od-items { margin-top: 4px; }
.od-items .tot td { border-top: 1px solid var(--line); }
.od-note { background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 14px; margin-top: 8px; }
.tl { list-style: none; margin: 6px 0 0; padding: 0; }
.tl li { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.tl li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 34px; bottom: -4px; width: 2px; background: var(--line); }
.tl-i { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; flex: none; font-size: 14px; }
@media (max-width: 600px) { .osearch input[type=date], .osearch select { flex: 1 1 40%; } .otable th:nth-child(4), .otable td:nth-child(4) { display: none; } }
/* Sales & accounts */
.rng { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rng .segmented { flex-wrap: wrap; }
.rng-c { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rng-c .input { width: auto; }
.exp-dl { display: flex; gap: 8px; flex-wrap: wrap; }
.tile .s { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.tile.hero { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile.hero .k, .tile.hero .s { color: rgba(255,255,255,.82); }
.card.drawer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card.drawer .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sales-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.sales-grid .card + .card { margin-top: 0; }
@media (max-width: 900px) { .sales-grid { grid-template-columns: minmax(0, 1fr); } }
.pay-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pay-row small { grid-column: 2 / 4; color: var(--ink-3); font-size: 12px; margin-top: -6px; }
.pay-row b { font-variant-numeric: tabular-nums; }
.pay-bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.pay-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.chart-wrap { position: relative; }
.schart { width: 100%; height: auto; display: block; }
.cb-bar { fill: var(--brand); }
.cb.on .cb-bar { fill: var(--accent, #e7a34a); }
.cb-grid { stroke: var(--line); stroke-width: 1; }
.cb-x { fill: var(--ink-3); font-size: 11px; font-family: inherit; }
.ctip { position: absolute; top: 4px; background: var(--ink); color: var(--panel); border-radius: 8px; padding: 6px 10px; font-size: 12px; display: grid; pointer-events: none; min-width: 120px; box-shadow: var(--shadow); }
.ctip b { font-size: 14px; }
.tbl-toggle { margin-top: 8px; font-size: 13px; }
.tbl-toggle summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.exp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.exp-form #exn { grid-column: 1 / -1; }
.exp-form .btn { grid-column: 1 / -1; justify-content: center; }
[hidden] { display: none !important; }
.cb-x { font-size: 13px; }
/* Sign-up */
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin: 4px 0 14px; cursor: pointer; }
.agree input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.auth-links { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.setup-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); }
.chip.ok { background: var(--brand-2); color: var(--brand); border-color: transparent; }
.support-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #1f2421; color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.support-bar b { color: #f2a900; }

.help-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid var(--accent, #f2a900); }
.help-card > div:first-child { flex: 1 1 280px; min-width: 0; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.share-link .copy { margin-bottom: 8px; }
.share-link.compact { margin-top: 8px; }
.wa-link-box { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2, var(--bg)); }
.wa-own-h { margin: 20px 0 6px; font-size: 15px; }
.wa-choices { display: grid; gap: 10px; margin: 14px 0 8px; }
.wa-choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); cursor: pointer; font: inherit; color: inherit; }
.wa-choice:hover:not(:disabled) { border-color: var(--brand); }
.wa-choice:disabled { opacity: .6; cursor: default; }
.wa-choice b { display: block; }
.wa-choice small { display: block; color: var(--ink-2); margin-top: 2px; font-size: 13px; line-height: 1.4; }
.wa-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #25d366; color: #fff; font-size: 18px; }
.wa-choice[data-wa-mode="cloud"] .wa-ic { background: var(--brand-2); }
.steps .share-link { font-weight: 400; }

/* Tapa logo */
.brand-logo { display: block; height: 30px; width: auto; color: var(--ink); }
.auth-hero .brand-logo { height: 40px; color: #fff; }
.side .brand .brand-logo { height: 32px; }
.brand-mark { display: block; width: 28px; height: 28px; }
.nav a.on { box-shadow: inset 3px 0 0 var(--gold); }
@media (max-width: 900px) { .nav a.on { box-shadow: inset 0 -3px 0 var(--gold); } }

.auth-hero .logo { margin-bottom: 28px; }

.opt { font-weight: 400; color: var(--ink-3); }
.step-pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--accent); background: var(--accent-2); border-radius: 99px; padding: 2px 10px; margin-bottom: 8px; }
.connect-step .wa-choices { margin-top: 10px; }
.agree + .agree { margin-top: 6px; }

.auth-hero .logo { display: block; }
.auth-hero .say { margin-top: 10px; font-size: 13px; letter-spacing: .02em; color: #c8ccc8; }
.auth-hero .say b { color: #f2a900; }

/* Sign-up: go live on WhatsApp */
.wa-choice.wa-best { border-color: var(--gold, #F2A900); background: #FFF8E6; }
.wa-choice + .wa-choice, .wa-choice + .hint + .wa-choice { margin-top: 10px; }
.btn.wa-green { background: #1FA855; border-color: #1FA855; color: #fff; }
.wa-verify { border: 1px dashed #E5C26B; background: #FFFBF0; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.help-btn { width: 100%; margin-bottom: 8px; justify-content: center; }
.support-btns { margin-top: 10px; }
.wa-stuck { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.wa-stuck .support-btns { margin-top: 0; }
.cat-sync { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bub-doc { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.04); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; text-decoration: none; color: inherit; }
.bub-doc-ic { font-size: 26px; }
.bub-doc small { display: block; color: var(--ink-3, #737872); font-size: 11px; }

.self-form { margin-top: 10px; }
.self-check { display: block; font-size: 13px; line-height: 1.45; margin: 4px 0 12px; }
.self-check input { margin-right: 6px; vertical-align: -2px; }
.self-check .hint { display: block; margin: 4px 0 0 22px; }
.code-input { font-size: 22px; letter-spacing: .3em; text-align: center; max-width: 220px; }

/* Order themes (Settings → Ordering) */
.themes { display: grid; gap: 10px; margin-top: 8px; }
.theme { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; border: 1.5px solid var(--line, #E5E1D8); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; font-weight: 400; }
.theme input { grid-row: span 3; margin-top: 3px; accent-color: #1F2421; }
.theme.on { border-color: #1F2421; box-shadow: 0 0 0 1px #1F2421 inset; }
.theme .tn { font-weight: 700; color: var(--ink, #1F2421); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.theme .tn em { font-style: normal; font-size: 12px; font-weight: 600; color: #6B4A00; background: #FBF0D6; border-radius: 99px; padding: 2px 8px; }
.theme .th { color: var(--ink-3, #5A615C); font-size: 14px; line-height: 1.45; }
.theme.locked { cursor: default; background: #FAF8F4; }
.theme.locked .tn, .theme.locked .th { opacity: .7; }
.theme .tu { font-size: 13px; font-weight: 600; color: #0C7A5B; }

.logo-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.logo-prev { width: 64px; height: 64px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line, #E5E1D8); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; }
.logo-prev span { font-family: Poppins, sans-serif; font-weight: 700; font-size: 24px; color: #6B4A00; }
