/* SATIVERSE app additions on top of the approved design system (sativerse.css). */

/* platform console + landing use SATIVERSE's own colours, never a restaurant's */
html.console { --brand: #1f3b2d; --brand-ink: #fff; --brand-soft: #e4ece6; --accent: #d9a441; --accent-soft: #f8efdc; }
html.console[data-mode="dark"] { --brand: #7fc29b; --brand-ink: #0c1a12; --brand-soft: #1c2e24; }
html.console[data-mode="dark"] .side a.nav.on { color: var(--brand); }

.h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.alert { padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.banner { padding: 10px 20px; font-weight: 700; font-size: 14px; text-align: center; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.side a.nav { white-space: nowrap; }
.side .soon { font-size: 9px; padding: 1px 6px; }
.soon { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.side .nav.disabled { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--muted); font-weight: 650; font-size: 14.5px; }
.side .nav.disabled svg { width: 19px; height: 19px; opacity: .6; }
.btn svg, .badge svg, .alert svg, .small svg, .grow > svg, .row > span > svg { width: 16px; height: 16px; vertical-align: -3px; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: #1f1a17; font-weight: 800; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.strong-link { font-weight: 800; text-decoration: none; }
.strong-link:hover { text-decoration: underline; }
code.secret { display: inline-block; font-size: 20px; font-weight: 800; letter-spacing: .06em; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-strong); cursor: copy; user-select: all; }
.content .stack > * + * { margin-top: 18px; }
form.stack > * + *, .card.stack > * + * { margin-top: 14px; }
.content .grid-2 > .stack > * + * { margin-top: 18px; }

/* auth pages */
.auth-body { display: grid; place-items: center; padding: 24px 16px; }
.auth-wrap { width: min(420px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.auth-brand .logo-mark { width: 46px; height: 46px; margin: 0; border-radius: 14px; font-size: 18px; background: var(--brand); color: var(--brand-ink); }
.auth-card { padding: 26px; box-shadow: var(--shadow); }
.auth-foot { text-align: center; margin-top: 16px; }

/* PIN */
.pin-card { width: min(420px, 100%); }
.pin-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.pin-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; text-align: center; background: var(--surface); transition: transform .15s, box-shadow .2s; }
.pin-person:hover { box-shadow: var(--shadow); }
.pin-person:active { transform: scale(.97); }
.pin-person b { font-size: 14px; line-height: 1.2; }
.pin-input { text-align: center; font-size: 28px; letter-spacing: .5em; font-weight: 800; }
.keypad button.ok { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-size: 16px; }

/* forms */
.suffix-in { display: flex; align-items: stretch; }
.suffix-in .input { border-radius: 12px 0 0 12px; }
.suffix-in span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 12px 12px 0; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.role-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.role-pick legend { grid-column: 1 / -1; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.role-opt input { margin-top: 3px; accent-color: var(--brand); }
.role-opt small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.role-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.module-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.module-row:last-child { border-bottom: 0; }
.seg-sm { padding: 3px; border-radius: 10px; }
.seg-sm button { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.log-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }

/* dashboard */
.hello { background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); border-color: transparent; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.checklist li:last-child { border-bottom: 0; }
.checklist .b { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: transparent; flex: none; }
.checklist .b svg { width: 14px; height: 14px; }
.checklist li.done .b { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.done { color: var(--muted); }
.checklist .soon { margin-left: 0; }

@media (max-width: 600px) {
  .module-row { flex-direction: column; align-items: flex-start; }
}

/* ---- storefront (Phase 2) ---- */
.hero.has-cover { background: #222; }
.hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.promo-plate { width: 140px; height: 140px; margin-right: -30px; }
.cats-bar { position: sticky; top: 0; z-index: 15; background: var(--bg); padding-bottom: 10px; }
.dish .thumb img, .pop-card .thumb img, .cart-item .thumb img, .sheet .media img, .ing .sw img { width: 100%; height: 100%; object-fit: cover; }
.pop-card .thumb { overflow: hidden; }
.dish-ph { width: 100%; height: 100%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, var(--accent-soft), transparent 60%), linear-gradient(135deg, var(--brand-soft), var(--surface-2)); }
.dish-ph span { font-family: var(--font-display); font-size: 38px; font-weight: 600; color: var(--brand); opacity: .55; }
.cart-item .dish-ph span { font-size: 22px; }
.ing .sw { overflow: hidden; display: block; }
.fixed-actions { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(448px, calc(100% - 32px)); z-index: 40; display: flex; gap: 10px; }
.fixed-actions .btn:not(.primary) { background: var(--surface); }
.qty-sm { transform: scale(.85); transform-origin: left; }
.store-foot { text-align: center; padding-top: 28px; }
.store-foot a { color: inherit; }
.cart-item.problem { opacity: .8; }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.seg button svg { width: 20px; height: 20px; }
.hero-top .icon-btn svg { width: 20px; height: 20px; }

/* ---- staff menu (Phase 2) ---- */
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; flex: none; }
.tabs a { padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); }
.menu-cat { margin-bottom: 22px; }
.menu-cat > .row { margin-bottom: 8px; }
.mrow { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; }
.mrow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mrow.is-out { background: var(--bad-soft); }
.mrow.is-hidden { opacity: .55; }
.mini-actions { display: flex; gap: 4px; align-items: center; }
.mini-actions form { display: inline; }
.icon-sm { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; font-size: 13px; color: var(--ink-2); }
.icon-sm:disabled { opacity: .3; }
.opt-table { width: 100%; border-collapse: collapse; }
.opt-table td { padding: 6px 6px 6px 0; vertical-align: middle; }
.opt-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 0 6px 6px 0; }
.opt-table .input, .opt-table .select { min-height: 40px; padding: 8px 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.check-card:has(input[type=checkbox]:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check-card .sw { width: 34px; height: 34px; border-radius: 9px; flex: none; overflow: hidden; }
.check-card .grow small { display: block; color: var(--muted); }
.check-card .input { min-height: 34px; width: 92px; padding: 6px 8px; font-size: 13px; }
.photo-field { display: flex; gap: 14px; align-items: center; }
.photo-field .prev { width: 96px; height: 96px; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--line-strong); flex: none; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.photo-field .prev img { width: 100%; height: 100%; object-fit: cover; }
.label-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.label-pick label { cursor: pointer; }
.label-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.label-pick input:checked + .badge { outline: 2px solid currentColor; outline-offset: 1px; }
.label-pick input:focus-visible + .badge { box-shadow: 0 0 0 3px var(--brand-soft); }
.hours-grid { display: grid; grid-template-columns: 110px 1fr 1fr auto; gap: 8px 10px; align-items: center; }
.hours-grid .input { min-height: 40px; }
.swatch-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; vertical-align: -4px; border: 1px solid rgba(0,0,0,.1); }
@media (max-width: 700px) {
  .mrow { grid-template-columns: 48px 1fr; }
  .mrow .mini-actions, .mrow > .num { grid-column: 2; }
  .hours-grid { grid-template-columns: 90px 1fr 1fr; }
  .hours-grid label.row { grid-column: 2 / 4; }
}
.hero-text { bottom: 34px; }
.label-pick input:not(:checked) + .badge { opacity: .45; filter: grayscale(.6); }
.grid-2 > *, .grid-3 > * { min-width: 0; }
input[type=file] { max-width: 100%; font-size: 13px; }
.check-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.btn.disabled { opacity: .45; pointer-events: none; }
.hide { display: none !important; }
.order-no { word-break: break-all; }
.zone.hide { display: none; }

/* ---- Phase 3 ---- */
.seg-opt { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg-opt:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-opt input { accent-color: var(--brand); }
.print-sheet { background: #fff; color: #111; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 16px; }
.qr-card { border: 2px solid var(--brand); border-radius: 18px; padding: 18px; text-align: center; break-inside: avoid; }
.qr-brand { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--brand); }
.qr-img { width: 170px; height: 170px; margin: 12px auto; display: grid; place-items: center; background: #fff; }
.qr-img:empty::before { content: "QR"; font-weight: 800; color: #ccc; font-size: 40px; border: 2px dashed #ddd; width: 100%; height: 100%; display: grid; place-items: center; border-radius: 12px; }
.qr-img svg { width: 100%; height: 100%; }
.qr-table { font-size: 26px; font-weight: 800; }
.qr-area { color: #666; font-weight: 700; }
.qr-help { margin-top: 6px; font-size: 14px; }
.qr-url { margin-top: 6px; font-size: 9px; color: #888; word-break: break-all; }
@media print { .no-print { display: none !important; } .qr-sheet { padding: 0; } }
.row > svg, .panel .row > svg { width: 20px; height: 20px; flex: none; }

/* ---- Phase 4 ---- */
.rider-pick { min-height: 34px; padding: 4px 8px; font-size: 13px; width: auto; }
.board { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kitchen .board { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.kitchen .oc { font-size: 16px; }
.pos-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pos-item .thumb { overflow: hidden; }
.ticket .tline { grid-template-columns: auto 1fr auto; }
.oc { animation: none; }
.oc.fresh { animation: popin .4s var(--ease); }

/* ---- Phase 5 ---- */
.rbar { margin: 8px 0; }
.rbar-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; }
.rbar-t { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-top: 4px; }
.rbar-t i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
a.mrow:hover { background: var(--surface-2); }
@media print { .side, .mainbar, .no-print { display: none !important; } .staff { display: block; } }

/* ---- Phase 6 ---- */
[hidden] { display: none !important; }
.install-row .btn svg { width: 18px; height: 18px; }
.ios-hint { font-size: 14px; display: flex; gap: 10px; align-items: center; }

/* ---- landing page ---- */
.landing { background: radial-gradient(900px 500px at 90% -10%, var(--accent-soft), transparent 60%), radial-gradient(900px 600px at -10% 10%, var(--brand-soft), transparent 60%), var(--bg); }
.l-nav { max-width: 1160px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.l-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; text-decoration: none; font-size: 17px; }
.l-brand .logo-mark { width: 38px; height: 38px; margin: 0; border-radius: 12px; font-size: 17px; background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.l-nav nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.l-nav nav a:not(.btn) { text-decoration: none; font-weight: 700; color: var(--ink-2); font-size: 14.5px; }
.l-hero { max-width: 1160px; margin: 0 auto; padding: 40px 20px 30px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.l-hero h1 { font-family: var(--font-display); font-size: clamp(36px, 5.4vw, 62px); font-weight: 600; letter-spacing: -.02em; margin: 14px 0 0; }
.l-hero h1 em { font-style: italic; color: var(--brand); }
.l-hero p { font-size: 18px; color: var(--ink-2); max-width: 560px; }
.l-phone { position: relative; justify-self: center; width: 290px; height: 560px; border-radius: 44px; background: #111; padding: 12px; box-shadow: var(--shadow-lg); }
.l-screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #f7f3ee; position: relative; font-size: 12px; color: #1f1a17; }
.l-s-hero { background: linear-gradient(140deg, #5d1527, #7a1f35); color: #fff; padding: 26px 16px 18px; display: grid; gap: 2px; }
.l-s-hero b { font-family: var(--font-display); font-size: 24px; }
.l-s-logo { width: 38px; height: 38px; border-radius: 12px; background: #fff; color: #7a1f35; display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.l-s-card { margin: 10px 12px 0; background: #fff; border-radius: 14px; padding: 10px; display: flex; gap: 8px; justify-content: space-between; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.l-s-card small { display: block; color: #857a70; }
.l-s-card i { font-style: normal; font-weight: 800; }
.l-s-plate { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 40% 45%, #d9572b 0 38%, #b8682d 39% 52%, #fff 53% 70%, #e9e3da 71%); flex: none; }
.l-s-plate.g { background: radial-gradient(circle at 45% 50%, #f3ecd6 0 34%, #d7b54a 35% 55%, #fff 56% 70%, #e9e3da 71%); }
.l-s-build { margin: 12px; padding: 14px; border-radius: 14px; background: #7a1f35; color: #fff; font-weight: 800; }
.l-s-bar { position: absolute; left: 12px; right: 12px; bottom: 14px; background: #1f1a17; color: #fff; border-radius: 99px; padding: 8px 8px 8px 12px; display: flex; align-items: center; gap: 8px; font-weight: 800; }
.l-s-bar span { width: 22px; height: 22px; border-radius: 50%; background: #c8963e; color: #1f1a17; display: grid; place-items: center; }
.l-s-bar b { margin-left: auto; background: #7a1f35; padding: 6px 12px; border-radius: 99px; }
.l-paid { position: absolute; right: -40px; top: 120px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 14px 18px; display: grid; border-left: 5px solid var(--ok); }
.l-paid b { color: var(--ok); font-size: 18px; }
.l-paid span { color: var(--muted); font-size: 13px; font-weight: 600; }
.l-sec { max-width: 1160px; margin: 0 auto; padding: 50px 20px 10px; }
.l-sec > h2 { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; text-align: center; margin-bottom: 10px; }
.l-lead { text-align: center; color: var(--ink-2); font-size: 17px; margin: 0 auto 24px; max-width: 620px; }
.l-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.l-feature h3 { font-size: 18px; font-weight: 800; margin: 12px 0 6px; }
.l-feature p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.l-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.l-ic svg { width: 22px; height: 22px; }
.l-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.l-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 6px; }
.l-steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #1f1a17; font-weight: 800; display: grid; place-items: center; }
.l-steps b { font-size: 17px; }
.l-steps span { color: var(--ink-2); font-size: 14.5px; }
.l-plan h3 { font-size: 20px; font-weight: 800; margin-top: 8px; }
.l-plan.hot { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.l-price { font-size: 32px; font-weight: 800; margin: 8px 0 12px; letter-spacing: -.02em; }
.l-price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.l-plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.l-plan li { display: flex; gap: 8px; align-items: flex-start; }
.l-plan li svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 1px; }
.l-bands { max-width: 520px; margin: 18px auto 0; }
.l-demo { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: start; padding: 28px; }
.l-demo h2 { font-family: var(--font-display); font-size: 32px; font-weight: 600; }
.l-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.l-foot { max-width: 1160px; margin: 40px auto 0; padding: 24px 20px 40px; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.l-foot a { color: inherit; }
@media (max-width: 900px) {
  .l-hero, .l-demo { grid-template-columns: 1fr; }
  .l-grid, .l-steps { grid-template-columns: 1fr; }
  .l-paid { right: -6px; }
  .l-nav nav a:not(.btn) { display: none; }
}

/* ---- Phase 7: console settings, messages, finance ---- */
.icon-btn.bell { position: relative; text-decoration: none; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 640px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--brand-soft); border-color: transparent; }
.msg .meta { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.ann { border-left: 4px solid var(--line-strong); }
.ann.important { border-left-color: var(--brand); }
.ann.unread { background: var(--brand-soft); }
.ann .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.mchart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; padding-top: 10px; }
.mchart .mcol { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.mchart .stack-bar { display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px; overflow: hidden; min-height: 2px; max-height: calc(100% - 20px); }
.mchart .stack-bar i { display: block; }
.mchart .c { background: var(--brand); }
.mchart .s { background: var(--accent, #c8963e); }
.mchart .lbl { font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mail-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #f4efe9; }
.tbl-wrap { overflow-x: auto; }
.tbl-wrap .tbl td, .tbl-wrap .tbl th { white-space: nowrap; }
.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); margin-right: 6px; vertical-align: 0; }
.light.ok { background: #2e9d5b; } .light.warn { background: #d9a21b; } .light.bad { background: #c8473b; }
.ph { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
/* row actions in menu lists */
.row-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-acts form { margin: 0; }
.btn.xs { min-height: 30px; padding: 4px 10px; font-size: 12.5px; border-radius: 9px; }
.btn.danger { color: var(--bad, #c8473b); border-color: color-mix(in srgb, var(--bad, #c8473b) 35%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad, #c8473b) 10%, transparent); }
.mrow { grid-template-columns: 56px minmax(0, 1fr) auto auto auto; }
.mini-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .mrow { grid-template-columns: 48px minmax(0, 1fr) auto; } .mrow .mini-actions, .mrow > .row-acts { grid-column: 1 / -1; justify-content: flex-start; } }
/* theme picker */
.theme-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.theme-pick legend { margin-bottom: 6px; }
.theme-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.theme-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-sw { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
/* staff dashboard */
.dash-hello { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 22px 24px; background: linear-gradient(120deg, var(--brand-soft), var(--accent-soft)); border-color: transparent; }
.dash-hello h2 { font-size: 30px; margin: 10px 0 2px; }
.dash-hello p { margin: 0; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-kpis { margin: 18px 0; }
.kpi .d.up { color: var(--ok); font-weight: 700; } .kpi .d.down { color: var(--bad); font-weight: 700; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; }

/* ---- 0.8.1 UI polish ---- */
/* a text + buttons header row: the text keeps a sensible width and the buttons wrap under it on phones */
.row > p.grow, .row > div.grow > p:only-child { flex: 1 1 260px; }
.show-sm { display: none; }
@media (max-width: 600px) {
  .mainbar { gap: 8px; }
  .mainbar h1 { flex: 1 1 0; min-width: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mainbar > .grow { display: none; }
  .mainbar .btn.sm.ghost { padding-inline: 8px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .dash-hello { padding: 18px; }
  .dash-hello h2 { font-size: 25px; }
  .dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .dash-actions .btn { justify-content: center; }
  .dash-actions .btn:first-child { grid-column: 1 / -1; }
}

/* theme picker: roomy cards, colour names on one line */
.theme-pick { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.theme-card .small { min-width: 0; line-height: 1.25; }
.theme-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-sw { flex: none; }
.theme-pick > a { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }

/* photo upload rows: button, then the help text under it */
.photo-field { align-items: flex-start; min-width: 0; }
.photo-field > .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.photo-field > .stack > * + * { margin-top: 0; }
.photo-field small { line-height: 1.45; }
input[type=file] { color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--surface-2); }
@media (max-width: 480px) { .photo-field { flex-direction: column; } .photo-field .prev { width: 100% !important; height: 140px; } }

/* POS tiles: photo on top, same size on every tile */
.pos-item { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.pos-item .thumb { flex: none; height: 96px; width: 100%; }
.pos-item .b { flex: 1; }

/* build-your-own plate on laptops: plate on the left, choices on the right */
@media (min-width: 1024px) {
  .app:has(.plate-stage) { max-width: 1160px; display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); column-gap: 36px; align-content: start; padding-inline: 24px; }
  .app:has(.plate-stage) > .topbar, .app:has(.plate-stage) > .steps { grid-column: 1 / -1; }
  .app:has(.plate-stage) > .plate-stage { grid-column: 1; grid-row: 3 / span 4; align-self: start; position: sticky; top: calc(var(--top-h, 64px) + 24px); padding: 40px 20px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; margin-top: 18px; }
  .app:has(.plate-stage) > .plate-stage .total-float { position: static; text-align: center; margin-top: 14px; }
  .app:has(.plate-stage) > .step-tabs, .app:has(.plate-stage) > .section { grid-column: 2; padding-inline: 0; }
  .app:has(.plate-stage) > .fixed-actions { grid-column: 2; position: sticky; left: auto; transform: none; width: auto; bottom: 20px; margin-top: 18px; }
  .app:has(.plate-stage) .ing-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.btn.sm, .dash-actions .btn, .badge, .mini-actions .btn, .row-acts .btn { white-space: nowrap; }
.mini-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 480px) { .dash-actions .btn { padding-inline: 12px; } }

/* 0.8.2 orders board: equal-height columns that scroll inside, so one long column doesn't run down the page */
@media (min-width: 961px) {
  .board { align-items: stretch; }
  .board > .col { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .board > .col > .col-head { position: sticky; top: -10px; z-index: 1; background: var(--surface-2); margin: -10px -10px 0; padding: 16px 16px 12px; border-radius: 18px 18px 0 0; }
}

/* 0.8.3 display sweep */
.hours-grid { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto; }
.hours-grid .input { min-width: 0; width: 100%; }
:has(> .hours-grid) { container-type: inline-size; }
/* narrow card (phones, or the two-column settings page on smaller laptops): day name on its own line above the two times */
@container (max-width: 520px) {
  .hours-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; }
  .hours-grid > b { grid-column: 1 / -1; margin-top: 8px; }
  .hours-grid label.row { grid-column: 1 / -1; }
}
/* long addresses (webhook URL, table links) wrap inside their box instead of sticking out */
code.secret { max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
.mrow > * { min-width: 0; }
.mrow a { overflow-wrap: anywhere; }
.mrow > .mini-actions { flex-wrap: nowrap; }
@media (max-width: 700px) { .mrow > .mini-actions { flex-wrap: wrap; } }
/* counter pay buttons and form buttons keep their words on one line */
#payCash, #payTerminal, .row > .btn.primary { white-space: nowrap; }
@media (max-width: 400px) { #payCash, #payTerminal { padding-left: 10px; padding-right: 10px; gap: 6px; } }
/* choice-group options on phones: one small card per option instead of a squeezed table */
@media (max-width: 600px) {
  .opt-cards thead { display: none; }
  .opt-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .opt-cards td { padding: 0; }
  .opt-cards td:nth-child(1), .opt-cards td:nth-child(2) { grid-column: 1 / -1; }
  .opt-cards td:nth-child(4) { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
  .opt-cards td:nth-child(4)::before { content: "On"; order: 2; }
  .opt-cards .select, .opt-cards .input { width: 100%; }
}
.tbl-link a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow.tbl-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.mrow.tbl-row > div { flex: 1 1 240px; }
.mrow.tbl-row > .mini-actions { flex: none; flex-wrap: wrap; }
/* console padlocks: the details column keeps a readable width (the table scrolls sideways on phones) */
.tbl td.pad-note { white-space: normal; min-width: 220px; max-width: 360px; }
/* staff Today: latest orders keep the order number on one line */
.recent-tbl td:first-child { min-width: 118px; }
.recent-tbl td:first-child b { white-space: nowrap; }
/* orders board on laptops/desktops: all five columns in one row; scrolls sideways inside the board if the screen is too narrow */
@media (min-width: 961px) {
  #boardWrap:not(.kitchen) .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 480px) {
  .recent-tbl td:first-child { min-width: 92px; }
  .recent-tbl td:nth-child(2) .badge { white-space: normal; text-align: center; line-height: 1.25; }
}
