/* SAVbridge - layout: fixed green sidebar (desktop) / bottom tab bar (phone) + one view at a time.
   Views: .vhead page header, .vbody scrolling content. Inbox is a 2-pane split that collapses to one pane on phones. */
:root {
  --brand: #075E54; --brand-2: #128C7E; --wa: #25D366; --brand-ink: #ffffff; --brand-soft: #e7f4f1;
  --bg: #f4f6f5; --surface: #ffffff; --sunk: #eef1f0; --fg: #111b21; --muted: #5f6b70; --line: #dde3e1;
  --chat-bg: #efeae2; --bub-in: #ffffff; --bub-out: #d9fdd3; --bub-agent: #d9fdd3; --bub-camp: #fff3c4;
  --ok: #128C7E; --ok-bg: #dcf3ee; --warn: #8a5a00; --warn-bg: #fdf0d2; --bad: #b3261e; --bad-bg: #fbe3e1; --info: #1f5fbf; --info-bg: #e1ebfa;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 10px; --side: 232px; --tabbar: 62px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #0b4a43; --brand-2: #1fa18f; --wa: #25D366; --brand-soft: #12332e;
    --bg: #0b1418; --surface: #111b21; --sunk: #182329; --fg: #e9edef; --muted: #9aa8ae; --line: #25333a;
    --chat-bg: #0b141a; --bub-in: #202c33; --bub-out: #005c4b; --bub-agent: #005c4b; --bub-camp: #4a3d12;
    --ok: #4fd1b8; --ok-bg: #11332d; --warn: #f0c060; --warn-bg: #3a2f12; --bad: #f2a29b; --bad-bg: #3d1d1b; --info: #8ab4f8; --info-bg: #1b2a40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #0b4a43; --brand-2: #1fa18f; --wa: #25D366; --brand-soft: #12332e;
  --bg: #0b1418; --surface: #111b21; --sunk: #182329; --fg: #e9edef; --muted: #9aa8ae; --line: #25333a;
  --chat-bg: #0b141a; --bub-in: #202c33; --bub-out: #005c4b; --bub-agent: #005c4b; --bub-camp: #4a3d12;
  --ok: #4fd1b8; --ok-bg: #11332d; --warn: #f0c060; --warn-bg: #3a2f12; --bad: #f2a29b; --bad-bg: #3d1d1b; --info: #8ab4f8; --info-bg: #1b2a40;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--brand-2); }
.muted { color: var(--muted); } .small { font-size: .82rem; } .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; } .gap { gap: 8px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 8px 13px; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--fg); white-space: nowrap; min-height: 38px; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--bad); }
.btn.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: .82rem; }
.btn.block { width: 100%; }
.btn.icon { padding: 6px; min-width: 38px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg, .nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.linkbtn { border: none; background: none; color: var(--brand-2); font-weight: 600; padding: 4px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .input { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 9px 11px; width: 100%; min-height: 40px; }
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: .78rem; color: var(--muted); }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.err { color: var(--bad); font-size: .88rem; min-height: 1.2em; }
.codebox { display: block; font-family: var(--mono); font-size: .8rem; background: var(--sunk); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; user-select: all; }
.pill { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--sunk); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.tag { display: inline-block; font-size: .74rem; padding: 1px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: .84rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }

/* ---------- splash / auth ---------- */
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--wa); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 8px 7px 7px 8px; border-radius: 50% 50% 50% 0; background: var(--brand); }
.splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; font-weight: 700; color: var(--muted); }
.auth { height: 100%; overflow: auto; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, var(--brand) 0 220px, var(--bg) 220px); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.auth-brand { display: flex; gap: 10px; align-items: center; font-size: 1.15rem; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100%; }
.side { background: var(--brand); color: var(--brand-ink); display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.2rem; padding: 4px 8px 14px; }
.side-brand .logo-mark::after { background: var(--brand); }
.hotel-pick { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; background: rgba(255,255,255,.1); border-radius: 8px; padding: 2px 10px 2px 2px; }
.hotel-pick select { flex: 1; min-width: 0; background: transparent; border: none; color: #fff; font-weight: 600; padding: 8px; }
.hotel-pick select option { color: #111; }
.bot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wa); flex: none; }
.bot-dot.paused { background: #f28b82; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; position: relative; }
.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
.badge { margin-left: auto; background: var(--wa); color: #06221d; font-size: .72rem; font-family: var(--mono); border-radius: 99px; padding: 0 7px; line-height: 1.6; font-weight: 700; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.14); }
.muted-inv { color: rgba(255,255,255,.7); overflow-wrap: anywhere; }
.btn.inv { color: #fff; justify-content: flex-start; padding-left: 4px; }
.btn.inv:hover { background: rgba(255,255,255,.08); }

.view { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.vhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 62px; }
.vhead h1 { flex: 1; min-width: 0; }
.vbody { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 40px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 180px; max-width: 360px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
  .side { grid-row: 2; flex-direction: row; padding: 4px 4px env(safe-area-inset-bottom, 0px); gap: 0; overflow: visible; }
  .side-brand, .hotel-pick, .side-foot { display: none; }
  .nav { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .68rem; justify-content: center; border-radius: 8px; }
  .nav .badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  .view { grid-row: 1; }
  .vhead { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top, 0px)); min-height: 56px; }
  .vbody { padding: 14px 16px 28px; }
  body.thread-open .side { display: none; }
  body.thread-open .app { grid-template-rows: minmax(0, 1fr); }
}

/* ---------- inbox ---------- */
.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.ilist { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.ilist-head { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.ilist-head .top { display: flex; align-items: center; gap: 8px; }
.ilist-head h1 { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on::before { background: var(--wa); box-shadow: 0 0 0 3px rgba(37,211,102,.2); }
.ilist-items { flex: 1; overflow-y: auto; }
.citem { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--line); background: none; padding: 11px 14px; align-items: center; }
.citem:hover { background: var(--sunk); }
.citem[aria-current="true"] { background: var(--brand-soft); }
.avatar { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--brand-2); font-size: .95rem; }
.citem .nm { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.citem .tm { font-size: .74rem; color: var(--muted); justify-self: end; }
.citem .pv { font-size: .85rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.citem.unread .tm { color: var(--wa); font-weight: 700; }
.citem.unread .nm { font-weight: 700; }
.ucount { justify-self: end; background: var(--wa); color: #06221d; border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 0 7px; line-height: 1.6; font-family: var(--mono); }
.ilist-more { padding: 12px; text-align: center; }

.ithread { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--chat-bg); position: relative; }
.ithread-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 60px; }
.ithread-head .who { flex: 1; min-width: 0; }
.ithread-head .who b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ithread-head .avatar { grid-row: auto; width: 38px; height: 38px; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 6% 10px; display: flex; flex-direction: column; gap: 4px; }
.daysep { align-self: center; background: var(--surface); color: var(--muted); font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; margin: 10px 0 6px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.bub { max-width: min(78%, 560px); padding: 6px 9px 4px; border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; }
.bub.in { align-self: flex-start; background: var(--bub-in); border-top-left-radius: 2px; }
.bub.out { align-self: flex-end; background: var(--bub-out); border-top-right-radius: 2px; }
.bub.campaign { background: var(--bub-camp); }
.bub .by { display: block; font-size: .7rem; font-weight: 700; color: var(--brand-2); margin-bottom: 1px; }
.bub.campaign .by { color: var(--warn); }
.bub time { display: block; text-align: right; font-size: .68rem; color: var(--muted); margin-top: 2px; }
.bub.pending { opacity: .6; }
.bub.failed { outline: 1px solid var(--bad); }
.fresh-in { animation: pop .25s ease-out; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); background: var(--sunk); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 10px 14px; max-height: 140px; min-height: 42px; line-height: 1.35; }
.composer .send { border-radius: 50%; width: 42px; height: 42px; padding: 0; }
.wclosed { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); background: var(--warn-bg); color: var(--warn); font-size: .88rem; border-top: 1px solid var(--line); }
.wclosed span { flex: 1; min-width: 200px; }
.ithread-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); text-align: center; padding: 20px; }
.newmsg { position: absolute; left: 50%; transform: translateX(-50%); bottom: 76px; z-index: 3; }
.back { display: none; }

.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 100%); background: var(--surface); border-left: 1px solid var(--line); z-index: 5; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.mini { display: flex; flex-direction: column; gap: 6px; }
.mini h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mini .it { font-size: .86rem; background: var(--sunk); border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; gap: 8px; }

@media (max-width: 900px) { .inbox { grid-template-columns: 290px minmax(0, 1fr); } }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.open .ilist { display: none; }
  .inbox:not(.open) .ithread { display: none; }
  .back { display: inline-flex; }
  .msgs { padding: 12px 10px; }
  .bub { max-width: 86%; }
  .ilist-head { padding-top: max(12px, env(safe-area-inset-top, 0px)); }
  .ithread-head { padding-top: max(8px, env(safe-area-inset-top, 0px)); }
}

/* ---------- tables (contacts) -> cards on phones ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sunk); font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.table .acts { display: flex; gap: 4px; justify-content: flex-end; }
.table .tags { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table { border: none; background: none; }
  .table tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 8px 4px; }
  .table td { border: none; padding: 4px 10px; }
  .table td[data-l]::before { content: attr(data-l); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
  .table .acts { justify-content: flex-start; }
}

/* ---------- campaigns / templates ---------- */
.ccard { display: flex; flex-direction: column; gap: 10px; }
.ccard .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ccard .meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.progress { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; background: var(--wa); transition: width .4s; }
.progress i.f { background: var(--bad); }
.nums { display: flex; gap: 14px; font-size: .84rem; } .nums b { font-family: var(--mono); }
.tpl-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; background: var(--sunk); border-radius: 8px; padding: 10px; max-height: 160px; overflow: auto; }
.phone-prev { background: var(--chat-bg); border-radius: 12px; padding: 16px 12px; min-height: 160px; display: flex; flex-direction: column; }
.phone-prev .bub { max-width: 92%; }
.phone-prev .qr { align-self: flex-start; max-width: 92%; width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.phone-prev .qr span { background: var(--bub-in); border-radius: 8px; text-align: center; padding: 7px; color: var(--brand-2); font-weight: 600; font-size: .88rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.section { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 18px; }
.section h2 { display: flex; align-items: center; gap: 8px; }

/* ---------- modal + toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 880px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 760px) {
  .modal-back { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { max-width: none; border-radius: 14px 14px 0 0; max-height: 92dvh; }
  .modal-foot { padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
}
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
@media (max-width: 760px) { .toast { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- orders / bookings / menu (ported from the old dashboard) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat b { font-size: 1.45rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.items { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 3px; }
.items li, .total { display: flex; justify-content: space-between; gap: 10px; }
.total { font-weight: 700; border-top: 1px dashed var(--line); padding-top: 8px; }
.fresh { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--wa); } 100% { box-shadow: 0 0 0 0 transparent; } }
.day { font-size: 1.05rem; margin: 20px 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.day:first-child, .menu-cat:first-child .day { margin-top: 0; }
.day small { font-size: .82rem; font-weight: 500; }
.menu-cat { margin-bottom: 8px; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mrow { display: grid; grid-template-columns: 18px minmax(0, 1fr) 110px 46px 40px; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: none; }
.mrow.off .mname { opacity: .5; text-decoration: line-through; }
.mname { min-width: 0; } .mname b { display: block; font-weight: 600; overflow-wrap: anywhere; } .mname i { font-size: .82rem; color: var(--muted); }
.price { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; background: var(--bg); }
.price input { width: 100%; border: none; background: transparent; font-family: var(--mono); text-align: right; padding: 0; min-width: 0; }
.vg { width: 14px; height: 14px; border: 1.5px solid #1d8a3e; border-radius: 2px; display: grid; place-items: center; }
.vg::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1d8a3e; }
.vg.nv { border-color: #a5361f; }
.vg.nv::after { border-radius: 0; width: 0; height: 0; background: none; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #a5361f; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 99px; border: none; background: var(--line); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--brand-2); }
.switch[aria-checked="true"]::after { left: 21px; }
@media (max-width: 520px) { .mrow { grid-template-columns: 16px minmax(0, 1fr) 88px 46px; } .mrow .del { grid-column: 2; justify-self: start; padding-left: 0; } }
.addform { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; }
.addform .wide { grid-column: 1 / -2; }
@media (max-width: 640px) { .addform { grid-template-columns: 1fr 1fr; } .addform .wide { grid-column: 1 / -1; } }

/* "More" tab: phones only; the extra sections live in a sheet */
.nav.more { display: none; border: none; background: none; font: inherit; }
@media (max-width: 760px) { .nav.more { display: flex; } .nav.x { display: none; } }
.morelist { display: flex; flex-direction: column; gap: 4px; }
.morelist a, .morelist button { border: none; background: none; font: inherit; text-align: left; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font-weight: 600; }
.morelist a:hover, .morelist button:hover { background: var(--sunk); }
.morelist svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Settings: Connect WhatsApp (Meta Embedded Signup) */
.connect-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--brand-soft); border-radius: var(--r); padding: 14px 16px; }
.connect-box p { margin-top: 4px; max-width: 60ch; }
