/* Flow design system: deli paper + ink + one red, with glass, glow and motion.
   Every page links this file; page files only add their own layout. */
@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans+Condensed:wght@600;700;800;900&family=Sofia+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --red: #DC0032; --red-2: #FF2D55; --ink: #161412; --grey: #6B655C; --line: #E2DACB;
  --bg: #F7F3EB; --surface: #FFFDF9; --cream: #F1EBDF; --ok: #1E8A4C; --warn: #E09A1B; --blue: #1F4E79;
  --soft-red: #FBE7EC; --soft-green: #E6F3EA; --soft-warn: #FCF0D9;
  --glass: rgba(255, 253, 249, .72); --glass-line: rgba(22, 20, 18, .08);
  --shadow: 0 1px 2px rgba(22, 20, 18, .06), 0 4px 14px rgba(22, 20, 18, .06);
  --shadow-lg: 0 20px 50px -12px rgba(22, 20, 18, .25);
  --glow: 0 10px 30px -6px rgba(220, 0, 50, .45);
  --r: 16px; --r-sm: 10px;
  --display: 'Sofia Sans Condensed', 'Arial Narrow', sans-serif;
  --sans: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
html[data-theme="dark"] {
  --ink: #F3EEE6; --grey: #A69E92; --line: #332E29; --bg: #0F0E0D; --surface: #1B1816; --cream: #221E1B;
  --red: #F0224E; --ok: #4CC27A; --warn: #F2B547; --blue: #8DB4E2;
  --soft-red: #3A1A22; --soft-green: #17301F; --soft-warn: #3A2C14;
  --glass: rgba(27, 24, 22, .72); --glass-line: rgba(243, 238, 230, .08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.4; color: var(--ink); background: var(--bg); overflow-x: hidden; transition: background .4s var(--ease), color .4s var(--ease); }
/* film grain over everything: keeps flat colour from looking cheap */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
html[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: .035; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: .005em; }
h1 { font-size: 32px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--grey); }
[hidden] { display: none !important; }
::selection { background: var(--red); color: #fff; }

/* ── top bar: ink glass with a red hairline ─────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 56px;
  background: rgba(22, 20, 18, .92); color: #F7F3EB; backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 2px solid var(--red); box-shadow: 0 6px 24px -10px rgba(220, 0, 50, .55); }
html[data-theme="dark"] .topbar { background: rgba(0, 0, 0, .85); }
.topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.topbar .logo { width: 32px; height: 32px; border-radius: 10px; background: var(--red); display: grid; place-items: center; font: 900 18px var(--display); color: #fff; box-shadow: var(--glow); flex: none; overflow: hidden; }
.topbar .logo img { width: 100%; height: 100%; display: block; }
.topbar h1 { font-size: 21px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar small { display: block; font-size: 12px; color: rgba(247, 243, 235, .62); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 18px; border: 1px solid rgba(247, 243, 235, .18); color: inherit; transition: transform .2s var(--spring), background .2s; }
.icon-btn:hover { background: rgba(247, 243, 235, .08); }
.icon-btn:active { transform: scale(.88); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: rgba(247, 243, 235, .7); }
.live i { width: 9px; height: 9px; border-radius: 50%; background: #4CC27A; box-shadow: 0 0 0 0 rgba(76, 194, 122, .6); animation: beat 2s infinite; }
.live.off i { background: var(--red); animation: none; }
@keyframes beat { 70% { box-shadow: 0 0 0 9px rgba(76, 194, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 194, 122, 0); } }

/* the one-line "what to do here" bar under the top bar */
.hintbar { display: flex; gap: 10px; align-items: center; padding: 9px 16px; font-size: 13px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--grey); }
.hintbar b { color: var(--ink); }
.hintbar button { margin-left: auto; color: var(--grey); font-size: 18px; line-height: 1; }

/* ── layout ─────────────────────────────────────────────────────────── */
.page { max-width: 680px; margin: 0 auto; padding: 16px 16px calc(96px + var(--safe-b)); }
.page.wide { max-width: 1180px; }
.eyebrow { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--grey); }
.title { font-size: 34px; margin: 4px 0 14px; }

/* ── cards and rows ─────────────────────────────────────────────────── */
.group, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.card { padding: 16px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.group-head h2, .form-title { font: 800 15px var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
.form-title { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.form-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--red); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 64px; text-decoration: none; color: inherit; transition: background .2s; }
.row:last-child { border-bottom: 0; }
a.row:hover, button.row:hover { background: var(--cream); }
.row .main { flex: 1; min-width: 0; text-align: left; }
.row .main b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .main small { color: var(--grey); font-size: 13px; }
.row.out .main b { text-decoration: line-through; color: var(--grey); }
.thumb { width: 48px; height: 48px; border-radius: 12px; background: var(--cream); display: grid; place-items: center; font-size: 24px; overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.tag { display: inline-block; font: 700 11px var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--cream); color: var(--grey); margin-left: 6px; vertical-align: 2px; }
.tag.red { background: var(--soft-red); color: var(--red); }
.tag.ok { background: var(--soft-green); color: var(--ok); }
.hint { color: var(--grey); font-size: 13.5px; line-height: 1.5; padding: 2px 2px 12px; }
.notice { background: var(--soft-warn); color: var(--ink); border-left: 4px solid var(--warn); border-radius: var(--r-sm); padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.45; }
.notice.ok { background: var(--soft-green); border-color: var(--ok); }
.notice.red { background: var(--soft-red); border-color: var(--red); }

/* ── buttons ────────────────────────────────────────────────────────── */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--spring), box-shadow .2s, filter .2s, background .2s; box-shadow: var(--shadow); }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.96); }
.btn:disabled, .btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--red), var(--red-2)); color: #fff; box-shadow: var(--glow); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--soft-red); color: var(--red); box-shadow: none; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; margin-bottom: 12px; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .25; animation: ripple .6s var(--ease); pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.link { font-weight: 700; color: var(--red); text-decoration: none; }
.add { display: block; width: 100%; padding: 15px; text-align: center; color: var(--red); font-weight: 800; transition: background .2s; }
.add:hover { background: var(--soft-red); }

/* ── forms ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field > label, label.lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--grey); margin-bottom: 6px; letter-spacing: .02em; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=url], input[type=tel], select, textarea, .input {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(220, 0, 50, .14); }
input[type=color] { width: 64px; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 4px; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--red); }
.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checks label { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.checks input { width: 20px; height: 20px; accent-color: var(--red); }
.img-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.img-field .thumb { width: 68px; height: 68px; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }

.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .25s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch.danger input:checked + span { background: var(--red); }

/* segmented control */
.seg { display: flex; gap: 4px; background: var(--cream); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; min-height: 40px; padding: 0 10px; border-radius: 9px; font-weight: 800; font-size: 14px; color: var(--grey); transition: background .25s var(--ease), color .25s; }
.seg button.on, .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }

/* ── bottom tab bar ─────────────────────────────────────────────────── */
.tabbar { position: fixed; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); z-index: 20; display: flex; gap: 2px; padding: 6px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border: 1px solid var(--glass-line);
  border-radius: 22px; box-shadow: var(--shadow-lg); max-width: calc(100% - 20px); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 48px; padding: 7px 5px; border-radius: 16px; font: 700 10px var(--sans); color: var(--grey); transition: color .2s, background .3s var(--ease); }
.tabbar button i { font-style: normal; font-size: 20px; transition: transform .35s var(--spring); filter: grayscale(.8); }
.tabbar button.on { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.tabbar button.on i { transform: translateY(-2px) scale(1.12); filter: none; }

/* ── sheets (bottom on phones, centred card on desktop) ─────────────── */
.sheet-bg { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 14, 13, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s var(--ease); }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 22px 18px calc(20px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: rise .45s var(--spring); }
.sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: -8px auto 14px; }
.sheet h3 { font-size: 26px; margin-bottom: 14px; }
@media (min-width: 720px) { .sheet-bg { align-items: center; } .sheet { border-radius: 26px; } .sheet::before { display: none; } }
@keyframes rise { from { transform: translateY(60px) scale(.98); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ── toast ──────────────────────────────────────────────────────────── */
.toast { position: fixed !important; left: 50% !important; bottom: calc(96px + var(--safe-b)) !important; transform: translateX(-50%); z-index: 100 !important;
  background: var(--ink) !important; color: var(--bg) !important; padding: 13px 18px !important; border-radius: 14px !important; font-weight: 700; box-shadow: var(--shadow-lg);
  animation: toast .4s var(--spring); max-width: calc(100% - 32px); }
@keyframes toast { from { transform: translate(-50%, 20px); opacity: 0; } }

/* ── motion helpers ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { animation: up .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s } .stagger > *:nth-child(2) { animation-delay: .06s } .stagger > *:nth-child(3) { animation-delay: .1s }
.stagger > *:nth-child(4) { animation-delay: .14s } .stagger > *:nth-child(5) { animation-delay: .18s } .stagger > *:nth-child(6) { animation-delay: .22s }
.stagger > *:nth-child(7) { animation-delay: .26s } .stagger > *:nth-child(n+8) { animation-delay: .3s }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }
.skel-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.skel-screen .skeleton { background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 9%, transparent) 25%, color-mix(in srgb, var(--ink) 16%, transparent) 50%, color-mix(in srgb, var(--ink) 9%, transparent) 75%); background-size: 200% 100%; }
.skel-screen .topbar .skeleton { background: linear-gradient(90deg, rgb(255 255 255 / 10%) 25%, rgb(255 255 255 / 18%) 50%, rgb(255 255 255 / 10%) 75%); background-size: 200% 100%; }
.skel-tabs span { display: block; width: 52px; height: 44px; border-radius: 16px; }
.skeleton { background: linear-gradient(90deg, var(--cream) 25%, var(--surface) 50%, var(--cream) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.pop { animation: pop .45s var(--spring); }
@keyframes pop { 40% { transform: scale(1.15); } }

/* soft red/amber glow blobs behind hero areas */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.floaters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 420px; height: 420px; background: #FF2D55; top: -140px; right: -120px; }
.aurora i:nth-child(2) { width: 360px; height: 360px; background: #FFB547; bottom: -160px; left: -120px; animation-duration: 22s; opacity: .4; }
.aurora i:nth-child(3) { width: 260px; height: 260px; background: #DC0032; top: 40%; left: 45%; animation-duration: 26s; opacity: .25; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.15); } }

.food-3d { position: relative; width: 100%; aspect-ratio: 1; }
.food-3d canvas, .food-3d img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.food-3d img { object-fit: contain; animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- line icons (icons.js) instead of emoji ---------- */
.tabbar button i { filter: none; display: grid; place-items: center; height: 22px; }
.tabbar button i .i { width: 21px; height: 21px; }
.tabbar button.on i { color: var(--red); }
.thumb { color: var(--grey); }
.thumb .i { width: 22px; height: 22px; }
.img-field .thumb .i { width: 26px; height: 26px; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .i { width: 15px; height: 15px; }
.avg .stars .i { width: 20px; height: 20px; }
.btn .i { width: 18px; height: 18px; }

/* ---------- POS-style menu: category tiles + product cards (photo bottom-right, name and price top-left) ---------- */
.pos-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; margin: 4px 0 20px; }
.pos-cat { position: relative; height: 74px; border-radius: 14px; padding: 12px 14px; text-align: left; display: flex; align-items: flex-end;
  font: 800 15px var(--sans); color: #fff; background: var(--tint); box-shadow: var(--shadow); transition: transform .25s var(--spring), box-shadow .25s; }
html[data-theme="dark"] .pos-cat[data-cat="all"] { color: var(--bg); }
.pos-cat small { position: absolute; right: 11px; top: 8px; font-size: 12px; opacity: .8; }
.pos-cat:hover { transform: translateY(-2px); }
.pos-cat.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--tint); }
.pos-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 10px; }
.pos-head h2 { font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.pcard { position: relative; height: 158px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  padding: 12px 14px; text-align: left; box-shadow: var(--shadow); transition: transform .25s var(--spring), box-shadow .25s; }
.pcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tint); }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pcard .hit { position: absolute; inset: 0; z-index: 1; }
.pcard b { position: relative; display: block; max-width: 62%; font-weight: 800; font-size: 15px; line-height: 1.2; }
.pcard .price { position: relative; display: block; margin-top: 3px; color: var(--ok); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.pcard .tag { position: relative; margin: 6px 4px 0 0; }
.pcard .num { position: absolute; left: 14px; bottom: 8px; font: 500 26px var(--display); color: var(--grey); opacity: .8; }
.pcard img { position: absolute; right: 2px; bottom: 2px; width: 60%; height: 74%; object-fit: contain; object-position: right bottom;
  filter: drop-shadow(0 6px 10px rgba(22, 20, 18, .12)); transition: transform .35s var(--spring); }
.pcard:hover img { transform: scale(1.05) rotate(-2deg); }
.pcard .mono { position: absolute; right: 14px; bottom: 14px; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  font: 900 30px var(--display); color: #fff; background: var(--tint); opacity: .9; }
.pcard .sw-at { position: absolute; right: 10px; top: 10px; z-index: 2; }
.pcard .sw-at .switch { display: block; transform: scale(.82); transform-origin: top right; }
.pcard.out img, .pcard.out .mono { filter: grayscale(1); opacity: .45; }
.pcard.out b { text-decoration: line-through; color: var(--grey); }
.pcard.add-card { display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--red); font-weight: 800; background: transparent; border: 2px dashed var(--line); box-shadow: none; }
.pcard.add-card::before { display: none; }
.pcard.add-card .i { width: 26px; height: 26px; }
@media (max-width: 520px) { .pos-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .pcard { height: 142px; padding: 10px 11px; } .pcard b { font-size: 14px; } }

/* product photo library in the item sheet */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; max-height: 214px; overflow-y: auto; padding: 2px; }
.lib button { aspect-ratio: 1; border-radius: 12px; background: #fff; border: 2px solid var(--line); padding: 4px; transition: border-color .2s, transform .2s var(--spring); }
.lib button img { width: 100%; height: 100%; object-fit: contain; }
.lib button:hover { transform: scale(1.05); }
.lib button.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--soft-red); }

/* ---------- scrollbars in the Flow theme (thin, rounded, red on hover) ---------- */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 22%, transparent) transparent; } }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; background-clip: padding-box; border-radius: 99px; background-color: color-mix(in srgb, var(--ink) 22%, transparent); }
::-webkit-scrollbar-thumb:hover { background-color: var(--red); }
::-webkit-scrollbar-corner { background: transparent; }
.icon-btn .i { width: 18px; height: 18px; }

/* ===================================================================================
   Admin (owner panel) — step 10: settings with sub-tabs + live phone preview,
   statistics, promotions, template thumbnails, room. Scoped to <body class="adm">.
   =================================================================================== */
.adm .tabbar.many { width: max-content; max-width: calc(100% - 16px); }
.adm .tabbar.many button { min-width: 0; flex: 1 1 0; padding: 7px 8px; }
.adm .tabbar.many button span { white-space: nowrap; }
@media (max-width: 560px) {
  .adm .tabbar.many { width: calc(100% - 12px); gap: 0; padding: 5px; }
  .adm .tabbar.many button { padding: 7px 1px; font-size: 9px; letter-spacing: -.01em; }
  .adm .tabbar.many button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .adm .tabbar.many button:not(.on) span { display: none; }
  .adm .tabbar.many button:not(.on) { flex: 0 1 40px; padding: 10px 1px; }
  .adm .tabbar.many button.on { flex: 1 0 auto; padding: 7px 8px; font-size: 10px; }
  .adm .tabbar.many button i .i { width: 20px; height: 20px; }
}
.adm .tab-head .btn { flex: none; }
.adm .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .adm .two { grid-template-columns: 1fr; } }
.adm .btn.dis { opacity: .4; pointer-events: none; }

/* ── settings: side tabs (desktop) / scrolling chips (phone) ───────────── */
.adm .set-wrap { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 22px; align-items: start; }
.adm .set-wrap.with-pv { grid-template-columns: 252px minmax(0, 1fr) 336px; }
.adm .set-nav { position: sticky; top: 76px; display: grid; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.adm .set-nav button { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; color: var(--ink);
  transition: background .25s var(--ease), transform .2s var(--spring); }
.adm .set-nav button:hover { background: var(--cream); }
.adm .set-nav button:active { transform: scale(.98); }
.adm .set-nav i { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--cream); color: var(--grey); transition: background .25s, color .25s; }
.adm .set-nav i .i { width: 19px; height: 19px; }
.adm .set-nav span { min-width: 0; display: grid; }
.adm .set-nav b { font-weight: 800; font-size: 14.5px; }
.adm .set-nav small { font-size: 12px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .set-nav button.on { background: var(--ink); color: var(--bg); }
.adm .set-nav button.on small { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.adm .set-nav button.on i { background: var(--red); color: #fff; box-shadow: var(--glow); }
.adm .set-body { min-width: 0; animation: up .45s var(--ease) both; }
.adm .set-body > .group { padding: 20px 20px !important; }
.adm .set-body .group.rv-flow, .adm .set-body #payouts { padding: 20px !important; }
@media (max-width: 1159px) { .adm .set-wrap.with-pv { grid-template-columns: 252px minmax(0, 1fr); } }
@media (max-width: 899px) {
  .adm .set-wrap, .adm .set-wrap.with-pv { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .adm .set-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -16px; padding: 2px 16px 4px;
    background: none; border: 0; box-shadow: none; border-radius: 0; scroll-snap-type: x proximity; }
  .adm .set-nav::-webkit-scrollbar { display: none; }
  .adm .set-nav button { flex: none; padding: 6px 14px 6px 6px; gap: 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); scroll-snap-align: center; }
  .adm .set-nav i { width: 30px; height: 30px; border-radius: 50%; }
  .adm .set-nav i .i { width: 16px; height: 16px; }
  .adm .set-nav small { display: none; }
  .adm .set-nav b { font-size: 14px; white-space: nowrap; }
  .adm .set-nav button.on { border-color: var(--ink); }
  .adm .set-body > .group { padding: 18px 16px !important; }
}

/* ── look & guest app ─────────────────────────────────────────────────── */
.adm .set-body > .look-form { padding: 6px 20px 0 !important; overflow: visible; }
.adm .lk-sec { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.adm .lk-sec:last-of-type { border-bottom: 0; }
.adm .lk-h { font: 800 14px var(--display); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.adm .lk-h::before { content: ''; width: 4px; height: 15px; border-radius: 2px; background: var(--red); }
.adm .lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--grey); margin: 14px 0 7px; }
.adm .lk-sec > .lbl:first-of-type { margin-top: 0; }
.adm .opt { position: relative; cursor: pointer; }
.adm .opt > input { position: absolute; opacity: 0; pointer-events: none; }
.adm .opts { display: grid; gap: 10px; }
.adm .opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm .opt.card { display: grid; gap: 2px; padding: 10px 10px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface);
  transition: border-color .2s, box-shadow .25s, transform .25s var(--spring); }
.adm .opt.card:hover { transform: translateY(-2px); }
.adm .opt.card b { font-weight: 800; font-size: 14px; margin-top: 8px; }
.adm .opt.card small { font-size: 12px; color: var(--grey); line-height: 1.3; }
.adm .opt.card:has(input:checked), .adm .opt.font:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.adm .opt:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.adm .wire { display: grid; gap: 4px; align-content: start; height: 104px; padding: 7px; border-radius: 11px; background: var(--t-bg); overflow: hidden; border: 1px solid color-mix(in srgb, var(--t-ink) 10%, transparent); }
.adm .wire i { display: block; background: var(--t-surface); border-radius: calc(var(--t-r) / 3); box-shadow: 0 1px 2px color-mix(in srgb, var(--t-ink) 14%, transparent); }
.adm .w-cover { height: 34px; border-radius: calc(var(--t-r) / 2.5); background: linear-gradient(135deg, var(--t-acc), var(--t-acc2)); }
.adm .w-head { height: 12px; width: 60%; border-radius: 4px; background: var(--t-ink); opacity: .8; }
.adm .w-row { display: grid; grid-template-columns: 1.3fr 1.3fr .5fr; gap: 4px; }
.adm .w-row i { height: 24px; }
.adm .w-row i:first-child { background: linear-gradient(var(--t-surface) 55%, color-mix(in srgb, var(--t-acc) 25%, var(--t-surface)) 0); }
.adm .w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.adm .w-grid i { height: 36px; background: linear-gradient(color-mix(in srgb, var(--t-acc2) 35%, var(--t-surface)) 58%, var(--t-surface) 0); }
.adm .w-list { display: grid; gap: 4px; }
.adm .w-list i { height: 15px; background: linear-gradient(90deg, color-mix(in srgb, var(--t-acc) 40%, var(--t-surface)) 15px, var(--t-surface) 0); }
.adm .palettes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.adm .pal { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13px;
  transition: transform .2s var(--spring), border-color .2s; }
.adm .pal:hover { transform: translateY(-1px); }
.adm .pal.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.adm .pal span { display: flex; }
.adm .pal span i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -6px; box-shadow: 0 0 0 1px var(--line); }
.adm .pal span i:first-child { margin-left: 0; }
.adm .cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.adm .cfield { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .2s; min-width: 0; }
.adm .cfield:hover { border-color: var(--grey); }
.adm .cfield input[type=color] { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; flex: none; background: none; overflow: hidden; }
.adm .cfield input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.adm .cfield input[type=color]::-webkit-color-swatch { border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); border-radius: 10px; }
.adm .cfield span { display: grid; min-width: 0; }
.adm .cfield b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .cfield code { font: 600 11.5px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--grey); }
.adm .opts.fonts { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); margin-bottom: 14px; }
.adm .opt.font { display: grid; justify-items: center; gap: 2px; padding: 10px 6px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, box-shadow .25s; }
.adm .opt.font .aa { font-size: 28px; font-weight: 600; line-height: 1.1; }
.adm .opt.font small { font-size: 11.5px; color: var(--grey); white-space: nowrap; }
.adm .rseg { display: flex; }
.adm .rseg .opt { flex: 1; }
.adm .rseg .opt span { display: grid; place-items: center; min-height: 40px; padding: 0 10px; border-radius: 9px; font-weight: 800; font-size: 14px; color: var(--grey); transition: background .25s var(--ease), color .25s; }
.adm .rseg .opt:has(input:checked) span { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.adm .room-sw { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 46px; border-radius: 10px; overflow: hidden; }
.adm .room-sw i:nth-child(1) { background: var(--a); } .adm .room-sw i:nth-child(2) { background: var(--b); } .adm .room-sw i:nth-child(3) { background: var(--c); }
.adm .opt.room b { margin-top: 6px; }
.adm .fx-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.adm .fx-row > div { display: grid; gap: 2px; } .adm .fx-row small { font-size: 13px; }
.adm .fx-try { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.adm .fx-try .btn img { width: 26px; height: 26px; object-fit: contain; margin-left: -4px; }
.adm .save-bar { position: sticky; bottom: calc(84px + var(--safe-b)); z-index: 5; margin: 0 -20px; padding: 12px 20px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.adm .save-bar .btn { width: 100%; }
@media (max-width: 899px) {
  .adm .set-body > .look-form { padding: 4px 16px 0 !important; } .adm .save-bar { margin: 0 -16px; padding: 12px 16px; }
  .adm .opts.three { gap: 7px; } .adm .opt.card { padding: 8px 8px 10px; } .adm .opt.card small { display: none; }
}

/* live phone preview */
.adm .set-preview { position: sticky; top: 76px; }
.adm .pv-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 10px; min-height: 40px; }
.adm .pv-head b { display: inline-flex; align-items: center; gap: 8px; font: 800 14px var(--display); text-transform: uppercase; letter-spacing: .12em; }
.adm .pv-head b .i { width: 18px; height: 18px; color: var(--red); }
.adm .pv-close { display: none; color: var(--ink); border-color: var(--line); }
.adm .phone { width: 332px; margin: 0 auto; padding: 10px; border-radius: 52px; background: linear-gradient(145deg, #2B2826, #0B0A09); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, var(--shadow-lg); position: relative; }
.adm .phone::before { content: ''; position: absolute; z-index: 2; top: 20px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #000; }
.adm .phone-screen { width: 312px; height: 675px; border-radius: 42px; overflow: hidden; background: var(--bg); position: relative; }
.adm .phone-screen iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; transform: scale(.8); transform-origin: 0 0; background: var(--bg); }
.adm .phone .hint { color: #bbb; }
.adm .pv-fab { display: none; position: fixed; right: 16px; bottom: calc(90px + var(--safe-b)); z-index: 25; border-radius: 99px; box-shadow: var(--shadow-lg); }
@media (max-width: 1159px) {
  .adm .set-wrap.with-pv .pv-fab { display: inline-flex; }
  .adm .set-preview { display: none; }
  .adm.pv-open .set-preview { display: grid; place-content: center; position: fixed; inset: 0; z-index: 45; background: rgba(15, 14, 13, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .25s var(--ease); }
  .adm.pv-open .set-preview > * { animation: rise .45s var(--spring); }
  .adm.pv-open .pv-head b, .adm.pv-open .set-preview > .hint { color: #F7F3EB; }
  .adm.pv-open .pv-close { display: grid; color: #F7F3EB; border-color: rgba(247, 243, 235, .3); }
  .adm.pv-open .pv-fab { display: none !important; }
}
@media (max-height: 860px) and (max-width: 1159px) { .adm.pv-open .phone { zoom: .8; } }

/* features / reviews */
.adm .feat-list { margin: 0 -4px 6px; }
.adm .feat { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.adm .feat:last-child { border-bottom: 0; }
.adm .feat .thumb { width: 42px; height: 42px; }
.adm .feat .main { flex: 1; min-width: 0; display: grid; }
.adm .feat .main b { font-weight: 700; } .adm .feat .main small { color: var(--grey); font-size: 13px; }
.adm .url-row { display: flex; gap: 8px; }
.adm .url-row input { flex: 1; min-width: 0; }
.adm .url-row .btn { flex: none; }
.adm .howto { background: var(--cream); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; font-size: 13.5px; }
.adm .howto ol { padding-left: 20px; margin-top: 6px; display: grid; gap: 5px; color: var(--grey); }
.adm .howto li::marker { color: var(--red); font-weight: 800; }
.adm .lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.adm .lane { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 16px; border: 1px solid var(--line); }
.adm .lane.good { background: var(--soft-green); } .adm .lane.bad { background: var(--soft-warn); }
.adm .lane b { font-weight: 800; } .adm .lane small { color: var(--grey); font-size: 12.5px; line-height: 1.4; }
.adm .lane .stars { color: #E8A317; }
.adm .lane-btns { display: grid; gap: 6px; margin-top: 6px; }
.adm .fake { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 12.5px; text-align: center; }
.adm .fake.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.adm .fake.link { background: none; border: 0; min-height: 22px; font-size: 12px; text-decoration: underline; color: var(--grey); }
.adm .fake .i { width: 15px; height: 15px; }
@media (max-width: 520px) { .adm .lanes { grid-template-columns: 1fr; } .adm .url-row { flex-wrap: wrap; } .adm .url-row .btn { width: 100%; } }

/* ── statistics ───────────────────────────────────────────────────────── */
.adm .stats { margin: 34px 0 20px; padding-top: 26px; border-top: 1px solid var(--line); }
.adm .stats-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adm .stats-head .title { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; font-size: 34px; text-transform: uppercase; }
.adm .stats-head .title .i { width: 28px; height: 28px; color: var(--red); }
.adm .seg.days { flex: none; }
.adm .seg.days button { min-width: 72px; }
.adm .kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.adm .kpi { display: grid; align-content: start; gap: 4px; min-height: 124px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }
.adm .kpi.skeleton { border: 0; }
.adm .kpi-l { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--grey); }
.adm .kpi-l .i { width: 16px; height: 16px; }
.adm .kpi-v { display: flex; align-items: baseline; gap: 6px; font: 800 29px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .kpi-v .stars .i { width: 20px; height: 20px; color: #E8A317; }
.adm .delta { display: block; font-size: 12px; color: var(--grey); line-height: 1.35; }
.adm .delta b { font-weight: 800; }
.adm .delta.up b { color: var(--ok); } .adm .delta.down b { color: var(--red); }
.adm .spark { display: block; width: 100%; height: 30px; margin-top: 6px; overflow: visible; }
.adm .spark polyline { fill: none; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.adm .spark circle { fill: var(--red); stroke: var(--surface); stroke-width: 2; }
@media (max-width: 1100px) { .adm .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .adm .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .adm .kpi { padding: 12px 13px; min-height: 112px; } .adm .kpi-v { font-size: 24px; } }
.adm .charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.adm .chart-card { min-width: 0; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.adm .charts { grid-template-areas: 'days days' 'hours top' 'rate top'; align-items: start; }
.adm .chart-card.wide { grid-area: days; } .adm .c-hours { grid-area: hours; } .adm .c-top { grid-area: top; } .adm .c-rate { grid-area: rate; }
.adm .chart-card.skeleton { border: 0; }
@media (max-width: 760px) { .adm .charts { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'days' 'hours' 'top' 'rate'; } }
.adm .cc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.adm .cc-head h3 { font-size: 17px; text-transform: uppercase; letter-spacing: .04em; }
.adm .cc-head small { font-size: 12.5px; }
.adm .cc-empty { padding: 26px 0; text-align: center; }
.adm .chart { position: relative; }
.adm .chart svg { display: block; max-width: 100%; touch-action: pan-y; }
.adm .chart .b { fill: var(--red); transition: opacity .2s; }
.adm .chart svg.hov .b:not(.on) { opacity: .4; }
.adm .chart .g { stroke: var(--line); stroke-width: 1; }
.adm .chart .axis { stroke: color-mix(in srgb, var(--ink) 30%, transparent); stroke-width: 1; }
.adm .chart text { font: 600 11px var(--sans); fill: var(--grey); font-variant-numeric: tabular-nums; }
.adm .chart .ty { text-anchor: end; } .adm .chart .tx { text-anchor: middle; }
.adm .chart .tv { text-anchor: middle; fill: var(--ink); font-weight: 800; }
.adm .chart .tip { position: absolute; z-index: 3; display: grid; gap: 1px; padding: 8px 11px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 12.5px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-lg); }
.adm .chart .tip small { opacity: .7; }
.adm .cc-table { margin-top: 8px; font-size: 13px; }
.adm .cc-table summary { cursor: pointer; color: var(--grey); font-weight: 700; width: max-content; }
.adm .cc-table .tw { max-height: 240px; overflow: auto; margin-top: 8px; }
.adm .cc-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.adm .cc-table th, .adm .cc-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.adm .cc-table th:first-child, .adm .cc-table td:first-child { text-align: left; }
.adm .cc-table th { position: sticky; top: 0; background: var(--surface); color: var(--grey); font-size: 12px; }
.adm .top { list-style: none; display: grid; }
.adm .top li { display: grid; grid-template-columns: 18px 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.adm .top li:last-child { border-bottom: 0; }
.adm .top .rk { font: 800 16px var(--display); color: var(--grey); text-align: center; }
.adm .top .ph { width: 46px; height: 46px; border-radius: 12px; background: var(--cream); display: grid; place-items: center; overflow: hidden; }
.adm .top .ph img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.adm .top .mono { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font: 900 20px var(--display); }
.adm .top .nm { display: grid; gap: 5px; min-width: 0; }
.adm .top .nm b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .bar { display: block; height: 6px; border-radius: 3px; background: var(--cream); overflow: hidden; }
.adm .bar i { display: block; height: 100%; border-radius: 3px; background: var(--red); }
.adm .top .qv { display: grid; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm .top .qv small { color: var(--grey); font-size: 12px; }
.adm .sbars { display: grid; gap: 9px; padding-top: 4px; }
.adm .sb { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.adm .sb .sl { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.adm .sb .sl .i { width: 14px; height: 14px; color: #E8A317; }
.adm .sb .bar { height: 10px; border-radius: 5px; }
.adm .sb .bar i { background: #E8A317; opacity: .5; border-radius: 5px; }
.adm .sb.hi .bar i { opacity: 1; }
.adm .sb b { text-align: right; font-weight: 700; }

/* ── promotions ───────────────────────────────────────────────────────── */
.adm .promo-strip { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 16px; padding: 12px 16px 12px 12px; border-radius: 18px; color: #fff; text-align: left;
  background: radial-gradient(120% 140% at 0% 0%, #C2410C 0%, #8E2A1E 55%, #4A1510 100%); box-shadow: 0 12px 30px -14px rgba(142, 42, 30, .8); transition: transform .25s var(--spring); }
.adm .promo-strip:hover { transform: translateY(-2px); }
.adm .promo-strip > span:nth-child(2) { flex: 1; display: grid; }
.adm .promo-strip b { font: 900 18px var(--display); text-transform: uppercase; letter-spacing: .06em; }
.adm .promo-strip small { opacity: .8; font-size: 12.5px; }
.adm .promo-strip > .i { width: 20px; height: 20px; }
.adm .ps-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); }
.adm .ps-ic .i { width: 22px; height: 22px; color: #FFB86B; }
.adm .promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.adm .promo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--spring), box-shadow .3s; }
.adm .promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.adm .promo-card.is-off .apm, .adm .promo-card.is-ended .apm { filter: saturate(.25) brightness(.85); }
.adm .promo-hit { display: block; width: 100%; text-align: left; }
.adm .promo-meta { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.adm .promo-meta .main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.adm .promo-meta b { font-weight: 800; display: flex; align-items: center; gap: 8px; min-width: 0; }
.adm .promo-meta small { color: var(--grey); font-size: 12.5px; }
.adm .pill { flex: none; font: 800 10.5px var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 99px; background: var(--cream); color: var(--grey); }
.adm .pill.live { background: var(--soft-green); color: var(--ok); } .adm .pill.soon { background: var(--soft-warn); color: #9A6406; } .adm .pill.ended { background: var(--soft-red); color: var(--red); }
html[data-theme="dark"] .adm .pill.soon { color: var(--warn); }
.adm .promo-actions { display: flex; gap: 8px; padding: 4px 14px 14px; }
.adm .promo-actions .btn { flex: 1; }
.adm .empty-promo { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 34px 20px 28px; background: var(--surface); border: 1px dashed var(--line); border-radius: 24px; }
.adm .empty-promo img { width: 120px; height: 120px; object-fit: contain; animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 14px 22px rgba(255, 90, 20, .35)); }
.adm .empty-promo h3 { font-size: 24px; text-transform: uppercase; }
.adm .empty-promo .btn { margin-top: 6px; }
/* mini live copy of the guest's full-screen deal */
.adm .apm > * { flex-shrink: 0; }
.adm .apm { position: relative; overflow: hidden; height: 336px; padding: 14px 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate;
  background: radial-gradient(90% 70% at 50% 18%, color-mix(in srgb, var(--pbg) 82%, #fff), var(--pbg) 70%); color: var(--ptext); }
.adm .apm-sp { position: absolute; z-index: -1; object-fit: contain; pointer-events: none; will-change: transform; animation: pmfloat 7s ease-in-out infinite alternate; }
.adm .apm-sp.a { width: 78px; left: -14px; top: 18px; filter: blur(1.5px); opacity: .9; }
.adm .apm-sp.b { width: 110px; right: -26px; top: 64px; filter: blur(7px); opacity: .55; animation-duration: 9s; animation-delay: -3s; }
.adm .apm-sp.c { width: 40px; right: 30%; top: 6px; filter: blur(3px); opacity: .7; animation-duration: 6s; animation-delay: -1s; }
@keyframes pmfloat { from { transform: translateY(8px) rotate(-6deg); } to { transform: translateY(-14px) rotate(6deg); } }
.adm .apm-img { position: absolute; z-index: -1; right: 6px; top: 8px; width: 46%; height: 34%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); }
.adm .apm-word { margin: auto 0 12px; text-align: center; font: 900 38px/.86 var(--display); text-transform: uppercase; letter-spacing: .01em; color: #FFF1D6;
  text-shadow: 0 1px 0 #F3D3A6, 0 2px 0 #E2B680, 0 3px 0 #C99A62, 0 4px 0 #A97A46, 0 10px 16px rgba(0, 0, 0, .35); }
.adm .apm-word span { display: block; }
.adm .apm-card { background: var(--pcard); border-radius: 16px; padding: 10px; color: #fff; box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .5); }
.adm .apm-badge { font: italic 900 34px/1 var(--display); background: linear-gradient(90deg, var(--pacc), #FFD23F); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 4px; width: max-content; }
.adm .apm-sub { font-size: 11.5px; font-weight: 700; opacity: .85; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .apm-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.adm .apm-it { position: relative; aspect-ratio: 1; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.adm .apm-it img { position: absolute; inset: 4px 4px 14px; width: calc(100% - 8px); height: calc(100% - 18px); object-fit: contain; }
.adm .apm-it span { position: absolute; left: 3px; bottom: 3px; display: flex; gap: 3px; align-items: baseline; padding: 1px 5px; border-radius: 6px; background: #fff; color: #111; font-size: 9.5px; white-space: nowrap; }
.adm .apm-it s { color: #888; font-size: 8.5px; }
.adm .apm-btn { padding: 7px; border-radius: 99px; background: #000; color: #fff; font-weight: 800; font-size: 11px; text-align: center; }
.adm .apm-note { margin-top: 6px; font-size: 10px; opacity: .78; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* promotion editor sheet */
.adm .sheet.promo-sheet { max-width: 1000px; }
.adm .ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.adm .ps-prev { position: sticky; top: 0; }
.adm .ps-live { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); }
.adm .ps-live .apm { height: 440px; }
@media (max-width: 819px) { .adm .ps-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .adm .ps-prev { order: -1; position: static; margin-bottom: 16px; } .adm .ps-live { width: 260px; margin: 0 auto; } .adm .ps-live .apm { height: 330px; } }
.adm .styles { display: flex; flex-wrap: wrap; gap: 10px; }
.adm .sty { display: grid; justify-items: center; gap: 4px; cursor: pointer; position: relative; }
.adm .sty input { position: absolute; opacity: 0; pointer-events: none; }
.adm .sty span { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, var(--b), var(--a) 70%); transition: transform .25s var(--spring), box-shadow .25s; }
.adm .sty span img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.adm .sty small { font-size: 12px; font-weight: 700; color: var(--grey); }
.adm .sty:has(input:checked) span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); transform: scale(1.04); }
.adm .sty:has(input:checked) small { color: var(--ink); }
.adm .cgrid.four { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.adm .field.whole { padding: 8px 0 10px; margin: 0; font-weight: 700; }
.adm .ipick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }
.adm .ip { position: relative; display: grid; justify-items: center; gap: 1px; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: 14px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.adm .ip input { position: absolute; opacity: 0; pointer-events: none; }
.adm .ip-ph { width: 60px; height: 60px; display: grid; place-items: center; }
.adm .ip-ph img { width: 100%; height: 100%; object-fit: contain; }
.adm .ip-ph i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 900 20px var(--display); font-style: normal; }
.adm .ip b { font-size: 12.5px; font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .ip small { font-size: 11.5px; color: var(--grey); }
.adm .ip:has(input:checked) { border-color: var(--red); background: var(--soft-red); }
.adm .ip:has(input:checked)::after { content: ''; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpolyline points='72 132 112 172 188 92' fill='none' stroke='%23fff' stroke-width='28' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.adm .sheet input[type=datetime-local] { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (max-width: 520px) { .adm .sheet .two { gap: 8px; } }

/* ── screens: TV thumbnails ───────────────────────────────────────────── */
.adm .scr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .adm .scr-grid { grid-template-columns: minmax(0, 1fr); } }
.adm .scr-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.adm .scr-tv { display: block; padding: 18px 18px 22px; background: radial-gradient(120% 90% at 50% 0%, #3A332D, #141210 70%); position: relative; }
.adm .scr-tv::after { content: ''; position: absolute; left: 50%; bottom: 10px; width: 70px; height: 5px; margin-left: -35px; border-radius: 3px; background: #0A0908; }
.adm .scr-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 5px solid #0A0908; background: #000; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .7); transition: transform .35s var(--spring); }
.adm .scr-tv:hover .scr-thumb { transform: translateY(-3px) scale(1.015); }
.adm .ct { height: 100%; padding: 5% 5% 4%; background: #12100E; color: #F7F3EB; overflow: hidden; }
.adm .ct.light { background: #F7F3EB; color: #161412; }
.adm .ct-h { font: 900 17px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--acc); margin-bottom: 8px; }
.adm .ct-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.adm .ct-cols img { display: block; width: 100%; height: 52px; object-fit: contain; margin-bottom: 4px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.adm .ct-cols b { display: block; font: 800 10px var(--display); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.adm .ct-cols p { display: flex; justify-content: space-between; gap: 4px; font-size: 8.5px; line-height: 1.75; opacity: .85; }
.adm .ct-cols p span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .ct-cols p i { font-style: normal; color: var(--acc); font-weight: 700; flex: none; }
.adm .scr-body { padding: 14px 16px 16px; }
.adm .scr-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm .scr-title b { font: 800 19px var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .scr-title .tag { margin: 0; flex: none; }
.adm .scr-body > small { display: block; margin-top: 2px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .scr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.adm .scr-actions .btn.primary { flex: 1 1 100%; }
.adm .scr-actions .btn.ghost { flex: 1; }
.adm .scr-url { display: flex; align-items: center; gap: 6px; padding: 3px 3px 3px 12px; border-radius: 12px; background: var(--cream); }
.adm .scr-url code { flex: 1; min-width: 0; font: 600 12px ui-monospace, Consolas, monospace; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .scr-url .btn { min-height: 32px; padding: 0 10px; }
.adm .scr-add { display: grid; place-content: center; justify-items: center; gap: 8px; min-height: 260px; border: 2px dashed var(--line); border-radius: 22px; color: var(--red); font-weight: 800; transition: background .2s; }
.adm .scr-add:hover { background: var(--soft-red); }
.adm .scr-add .i { width: 30px; height: 30px; }

/* ── tables: the room ─────────────────────────────────────────────────── */
.adm .room-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.adm .room-box { position: relative; aspect-ratio: 16 / 10; min-height: 260px; max-height: min(52vh, 520px); width: 100%; margin: 0 auto; background: var(--cream); }
.adm .tbl-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.adm .tbl-actions .btn { flex: 1; }

/* ── owner dashboard: numbered sections, big numbers, live "right now" row ── */
.adm .page { counter-reset: sec; }
.adm .sec-h, .adm .stats.dash .cc-head h3 { display: flex; align-items: center; gap: 10px; }
.adm .sec-h { margin: 0 0 12px; font: 800 17px var(--display); text-transform: uppercase; letter-spacing: .04em; }
.adm .sec-h::before, .adm .stats.dash .cc-head h3::before { counter-increment: sec; content: counter(sec, decimal-leading-zero); display: grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px;
  border-radius: 8px; background: var(--red); color: #fff; font: 900 14px var(--display); letter-spacing: .02em; }
.adm .stats.dash-now { margin: 4px 0 0; padding-top: 0; border-top: 0; }
.adm .stats.dash { margin-top: 26px; }
.adm .stats.dash .stats-head .title { font-size: 26px; }
.adm .kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm .kpi.now { min-height: 104px; }
.adm .kpi.now .kpi-v { font-size: 44px; }
.adm .kpi.now .kpi-v small.kpi-cam { display: flex; align-items: center; gap: 5px; margin-top: 4px; font: 700 13px 'Sofia Sans', sans-serif; color: #8E6CFF; letter-spacing: 0; }
.adm .kpi.now .kpi-v small { font-size: 18px; color: var(--grey); font-weight: 700; }
.adm .kpi.now.alert { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent), var(--shadow); }
.adm .kpi.now.alert .kpi-v { color: var(--red); }
.adm .kpi.now.warn .kpi-v { color: #E09A1B; }
.adm .stats.dash .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm .kpi.big { min-height: 150px; }
.adm .kpi.big .kpi-l { font-size: 14px; }
.adm .kpi.big .kpi-v { font-size: 52px; letter-spacing: -.01em; }
.adm .stats.dash .seg.days button { min-width: 56px; font-weight: 800; }
@media (max-width: 760px) { .adm .kpis.four { grid-template-columns: 1fr 1fr; } .adm .kpi.big .kpi-v { font-size: 38px; } }
@media (max-width: 560px) { .adm .stats.dash .kpis { grid-template-columns: 1fr 1fr; } .adm .stats.dash .kpi.big:first-child { grid-column: 1 / -1; } .adm .kpi.now .kpi-v { font-size: 34px; } }
.adm .topbar .flow-roles { margin-left: auto; }
@media (max-width: 560px) {
  .adm .topbar .brand { flex: 1 1 auto; min-width: 0; }
  .adm .topbar .brand > div:last-child { min-width: 0; overflow: hidden; }
  .adm .topbar .brand h1, .adm .topbar .brand small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adm .topbar .flow-roles { margin-left: 0; flex: none; }
  .adm .topbar .flow-roles a span { display: none; }
  .adm .topbar .live { font-size: 0; gap: 0; }
  .adm .kpi.now { min-height: 84px; }
}

/* ---------- subscription (Admin → Subscription) ---------- */
.bill-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); font-weight: 700; font-size: 14px; }
.bill-strip.bad { background: color-mix(in srgb, var(--red) 10%, var(--surface)); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.bill-strip .btn { min-height: 38px; }
.bill-now { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px; margin-bottom: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.bill-now b { display: block; font: 800 20px var(--display); }
.bill-now small { display: block; color: var(--grey); margin-top: 4px; max-width: 60ch; line-height: 1.45; }
.bill-now.bad { border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.bill-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 12px; }
.bill-plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bill-plan.hot { border: 2px solid var(--red); }
.bill-plan.on { outline: 3px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.bill-plan.pickable { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.bill-plan.pickable:hover { transform: translateY(-2px); }
.bill-plan.pick { outline: 3px solid var(--red); outline-offset: 2px; }
.bill-plan .tag { align-self: flex-start; }
.lic-step { font: 800 15px var(--sans); letter-spacing: .02em; margin: 18px 0 10px; }
.pay-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 12px; }
.pay-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; text-align: left; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.pay-opt:hover { transform: translateY(-2px); border-color: var(--red); }
.pay-opt > .i { width: 28px; height: 28px; color: var(--red); }
.pay-opt b { font: 900 20px var(--display); text-transform: uppercase; letter-spacing: .05em; }
.pay-opt small { color: var(--grey); line-height: 1.45; flex: 1; }
.pay-opt .btn { margin-top: 8px; pointer-events: none; }
.lic-box { padding: 18px; margin-bottom: 16px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--red); display: grid; gap: 12px; }
.lic-box h3 { display: flex; align-items: center; gap: 8px; font: 800 16px var(--sans); }
.lic-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.lic-box .lic-row { margin: 0; }
.lic-row > span { font-weight: 800; color: var(--grey); }
.lic-key { font: 800 20px ui-monospace, Consolas, monospace; letter-spacing: .08em; padding: 8px 12px; border-radius: 10px; background: var(--cream); word-break: break-all; }
.lic-key.sm { font-size: 14px; padding: 4px 8px; }
.lic-form { display: flex; gap: 10px; flex-wrap: wrap; }
.lic-form input { flex: 1 1 240px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: 700 16px ui-monospace, Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.bank-rows { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: center; }
.bank-rows dt { color: var(--grey); font-weight: 700; font-size: 14px; }
.bank-rows dd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.bank-rows code, .lic-box .hint code { font: 700 15px ui-monospace, Consolas, monospace; }
.bill-plan h3 { font: 900 22px var(--display); text-transform: uppercase; letter-spacing: .06em; }
.bill-price b { font: 900 34px var(--display); } .bill-price span { color: var(--grey); font-weight: 700; margin-left: 4px; }
.bill-plan ul { list-style: none; display: grid; gap: 8px; flex: 1; }
.bill-plan li { display: flex; gap: 8px; font-size: 14px; line-height: 1.35; } .bill-plan li .i { flex: none; color: var(--ok); margin-top: 2px; }
.bill-pop { position: absolute; top: -11px; left: 18px; padding: 3px 10px; border-radius: 99px; background: var(--red); color: #fff; font: 800 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.tabbar .plan-tag { position: absolute; top: 4px; right: 6px; font: 800 9px var(--sans); font-style: normal; letter-spacing: .04em; padding: 1px 5px; border-radius: 5px; background: var(--cream); color: var(--grey); }
