/* =====================================================================
   OneBuzz Food — design system + staff/admin UI
   ===================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ink: #0E1726;
  --ink-2: #27324A;
  --muted: #5F6B80;
  --faint: #98A2B3;
  --line: #E6E9F0;
  --line-2: #EFF1F6;
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #F8F9FC;

  --brand-1: #FF7A2F;
  --brand-2: #FF2E63;
  --brand: #FF4B4B;
  --brand-grad: linear-gradient(135deg, #FF7A2F 0%, #FF2E63 100%);
  --focus: #6D5DFC;

  --waiting: #9A6700;   --waiting-bg: #FFF4D6;   --waiting-dot: #F5B400;
  --preparing: #C2410C; --preparing-bg: #FFEBDD; --preparing-dot: #FB7A1C;
  --ready: #067647;     --ready-bg: #DCF7E7;     --ready-dot: #12B76A;
  --info: #175CD3;      --info-bg: #E6EEFF;
  --danger: #C8261A;    --danger-bg: #FEE7E5;
  --violet: #5B3FD0;    --violet-bg: #EEE9FF;
  --slate: #475467;     --slate-bg: #EEF0F4;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 20px -6px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 56px -16px rgba(16, 24, 40, .30);
  --ring: 0 0 0 3px rgba(109, 93, 252, .28);
  --appbar-h: 64px;
  --tabbar-h: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.in-app .hide-in-app { display: none !important; } /* inside the OneBuzz phone app */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nums { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.stack > * + * { margin-top: 12px; }
:focus-visible { outline: none; box-shadow: var(--ring); }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* ------------------------------------------------------------ brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 36px; height: 36px; display: inline-block; filter: drop-shadow(0 4px 10px rgba(255, 60, 80, .28)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-text span { font-weight: 600; color: var(--brand); margin-left: 4px; }

/* ------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-weight: 650; font-size: 15px; letter-spacing: -.005em; line-height: 1.1;
  text-decoration: none; cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform .12s var(--ease), background-color .15s, box-shadow .15s, border-color .15s, color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-busy { opacity: .72; cursor: default; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 56px; padding: 14px 24px; font-size: 17px; border-radius: 16px; }
.btn-xl { min-height: 64px; padding: 16px 28px; font-size: 18px; border-radius: 18px; }
.btn-primary { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); box-shadow: 0 6px 16px -8px rgba(14, 23, 38, .55); }
.btn-primary:hover { --btn-bg: #1B263B; background: var(--btn-bg); }
.btn-cta {
  --btn-fg: #fff; --btn-bd: transparent; background: var(--brand-grad); color: #fff; border: 0;
  box-shadow: 0 10px 24px -10px rgba(255, 46, 99, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
  font-weight: 750; letter-spacing: .01em;
}
.btn-cta:hover { background: linear-gradient(135deg, #FF6E22 0%, #F4235A 100%); }
.btn-success { --btn-bg: #12B76A; --btn-fg: #fff; --btn-bd: #12B76A; box-shadow: 0 6px 16px -8px rgba(18, 183, 106, .7); }
.btn-success:hover { background: #0FA35E; }
.btn-ready { --btn-bg: var(--ready-bg); --btn-fg: var(--ready); --btn-bd: #B7EBCD; }
.btn-ready:hover { background: #CDF2DD; }
.btn-warn { --btn-bg: #FB7A1C; --btn-fg: #fff; --btn-bd: #FB7A1C; box-shadow: 0 6px 16px -8px rgba(251, 122, 28, .7); }
.btn-warn:hover { background: #F06C0E; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { background: var(--slate-bg); }
.btn-outline { --btn-bg: var(--surface); --btn-bd: var(--line); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn-danger:hover { background: #B42318; }
.btn-danger-ghost { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-danger-ghost:hover { background: var(--danger-bg); }
.btn.is-done { --btn-bg: #12B76A; --btn-fg: #fff; --btn-bd: #12B76A; background: #12B76A; color: #fff; }
.btn.is-error { animation: shake .4s; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  cursor: pointer; transition: background-color .15s, color .15s, transform .12s; -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #F9C9C4; }
.icon-btn .ic { width: 19px; height: 19px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, .55); } 70% { box-shadow: 0 0 0 9px rgba(18, 183, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  background: var(--slate-bg); color: var(--slate);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge-waiting { background: var(--waiting-bg); color: var(--waiting); }
.badge-waiting::before { background: var(--waiting-dot); }
.badge-preparing { background: var(--preparing-bg); color: var(--preparing); }
.badge-preparing::before { background: var(--preparing-dot); }
.badge-ready, .badge-active, .badge-sent { background: var(--ready-bg); color: var(--ready); }
.badge-ready::before, .badge-active::before, .badge-sent::before { background: var(--ready-dot); }
.badge-ready::before { animation: pulse-dot 1.8s infinite; }
.badge-delivered, .badge-closed, .badge-inactive, .badge-pending { background: var(--slate-bg); color: var(--slate); }
.badge-cancelled, .badge-suspended, .badge-disabled, .badge-failed, .badge-expired { background: var(--danger-bg); color: var(--danger); }
.badge-clicked { background: var(--violet-bg); color: var(--violet); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); white-space: nowrap;
}
.chip .ic { width: 15px; height: 15px; }
.chip-violet { background: var(--violet-bg); color: var(--violet); border-color: transparent; }
.chip-green { background: var(--ready-bg); color: var(--ready); border-color: transparent; }
.chip-blue { background: var(--info-bg); color: var(--info); border-color: transparent; }
.chip-muted { color: var(--muted); }
.chip-warn { background: var(--waiting-bg); color: #8A5300; border-color: transparent; }

.role-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); background: var(--violet-bg); padding: 3px 8px; border-radius: 6px; }

/* ------------------------------------------------------------ cards, alerts */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { font-size: 17px; font-weight: 750; }
.card-body { padding: 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); font-weight: 550; margin-bottom: 16px; border: 1px solid transparent; }
.alert .ic { margin-top: 1px; }
.alert-success { background: var(--ready-bg); color: var(--ready); border-color: #B7EBCD; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #F9C9C4; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #C7D8FF; }
.alert-warn { background: var(--waiting-bg); color: var(--waiting); border-color: #F7DD9A; }

.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.empty {
  display: grid; place-items: center; text-align: center; gap: 10px; padding: 40px 20px; color: var(--muted);
  border: 1.5px dashed var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .5);
}
.empty .empty-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-xs); color: var(--faint); }
.empty h3 { color: var(--ink); font-size: 16px; }
.empty-sm { padding: 22px 14px; font-size: 14px; }

/* ------------------------------------------------------------ forms */
.field { display: grid; gap: 6px; }
.field > span, .field-label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field small, .hint { font-size: 12.5px; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
.field textarea { min-height: 92px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6B80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: var(--ring); }
.field input::placeholder, .input::placeholder { color: var(--faint); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 550; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: #FAFBFD; }
.table tr.is-clickable { cursor: pointer; }
.table .num { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.cell-sub { display: block; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------ toasts */
.toasts { position: fixed; z-index: 1000; right: 20px; bottom: calc(20px + var(--tabbar-h) + env(safe-area-inset-bottom)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: #101828; color: #fff; box-shadow: var(--shadow-lg); pointer-events: auto;
  animation: pop-in .25s var(--ease); font-weight: 550; font-size: 14.5px;
}
.toast .toast-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .12); }
.toast .toast-ic .ic { width: 17px; height: 17px; }
.toast strong { display: block; font-size: 14.5px; }
.toast span { display: block; color: rgba(255, 255, 255, .78); font-weight: 500; font-size: 13.5px; }
.toast-success .toast-ic { background: #12B76A; }
.toast-error .toast-ic { background: #F04438; }
.toast-info .toast-ic { background: #6D5DFC; }
.toast-warn .toast-ic { background: #F79009; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.toast-close { margin-left: auto; background: none; border: 0; color: rgba(255, 255, 255, .6); cursor: pointer; padding: 2px; }
@media (max-width: 760px) { .toasts { left: 16px; right: 16px; width: auto; } }

/* ------------------------------------------------------------ dialogs */
dialog.modal {
  border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(94vw, 480px); width: 100%;
  max-height: none; overflow: visible; margin: auto;
}
dialog.modal::backdrop { background: rgba(10, 16, 28, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.modal[open] { animation: pop-in .22s var(--ease); }
.modal-card { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 28px; position: relative; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-title { font-size: 21px; font-weight: 800; margin-bottom: 8px; padding-right: 40px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.confirm-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--danger-bg); color: var(--danger); margin-bottom: 16px; }

/* ================================================================ STAFF APP BAR */
.appbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.appbar-inner { max-width: 1520px; margin: 0 auto; height: var(--appbar-h); padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.appbar-context { min-width: 0; display: flex; align-items: center; }
.loc-static { display: flex; flex-direction: column; line-height: 1.2; padding-left: 18px; border-left: 1px solid var(--line); min-width: 0; }
.loc-static strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-static span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-switch { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); max-width: 340px; }
.loc-switch select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-weight: 650; color: var(--ink); padding-right: 22px; min-width: 0; max-width: 280px; text-overflow: ellipsis; cursor: pointer; font-size: 14px; }
.loc-switch select:focus { outline: none; }
.loc-switch .loc-caret { position: absolute; right: 10px; width: 16px; height: 16px; pointer-events: none; }
.appbar-nav { display: flex; gap: 4px; margin-left: auto; }
.navlink { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--muted); font-weight: 650; text-decoration: none; font-size: 14.5px; transition: background-color .15s, color .15s; }
.navlink .ic { width: 18px; height: 18px; }
.navlink:hover { background: var(--slate-bg); color: var(--ink); }
.navlink.is-active { background: var(--ink); color: #fff; }
.appbar-right { display: flex; align-items: center; gap: 10px; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 13.5px; color: #fff; background: linear-gradient(135deg, #3A4A6B, #0E1726); letter-spacing: .02em; }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; animation: pop-in .18s var(--ease); }
.usermenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; display: grid; gap: 2px; }
.usermenu-head span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.usermenu-head .role-tag { justify-self: start; margin-top: 6px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-weight: 600; text-align: left; color: var(--ink-2); }
.menu-item:hover { background: var(--slate-bg); }

.tabbar { display: none; }

@media (max-width: 900px) {
  :root { --appbar-h: 58px; --tabbar-h: 72px; }
  .appbar-inner { padding: 0 16px; gap: 12px; }
  .appbar-nav { display: none; }
  .appbar-right { margin-left: auto; }
  .appbar .brand-text { display: none; }
  .loc-static { padding-left: 12px; }
  .loc-switch { max-width: 60vw; }
  .loc-switch select { max-width: 48vw; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); justify-content: space-around; align-items: stretch;
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
  .tab .ic { width: 22px; height: 22px; }
  .tab.is-active { color: var(--ink); }
  .tab-create { color: var(--ink); }
  .tab-create-btn { width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--brand-grad); box-shadow: 0 10px 22px -8px rgba(255, 46, 99, .7), 0 0 0 5px #fff; }
  .tab-create-btn .ic { width: 26px; height: 26px; stroke-width: 2.6; }
  body.is-staff { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ================================================================ DASHBOARD */
.page { max-width: 1520px; margin: 0 auto; padding: 28px 24px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.live-status { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); font-weight: 550; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ready-dot); animation: pulse-dot 2s infinite; flex: none; }
.live-label { font-weight: 800; letter-spacing: .1em; color: var(--ready); font-size: 12px; }
.live-status[data-state="reconnecting"] .live-dot { background: #F79009; animation: none; }
.live-status[data-state="reconnecting"] .live-label { color: #B54708; }
.live-status[data-state="offline"] .live-dot { background: #F04438; animation: none; }
.live-status[data-state="offline"] .live-label { color: var(--danger); }
.live-updated { font-variant-numeric: tabular-nums; }

.create-btn { min-width: 220px; }
.create-btn .kbd { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .22); margin-left: 4px; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-xs); }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.stat-value { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.stat.is-active .stat-label i { background: var(--ink); }
.stat.is-waiting .stat-label i { background: var(--waiting-dot); }
.stat.is-preparing .stat-label i { background: var(--preparing-dot); }
.stat.is-ready .stat-label i { background: var(--ready-dot); }
.stat.is-coming .stat-label i { background: #2E90FA; }
.stat.is-done .stat-label i { background: var(--violet); }
.stat.is-ready .stat-value { color: var(--ready); }
.stat-value.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

.filters { display: none; }
.seg { display: inline-flex; background: #E9EBF1; padding: 4px; border-radius: 14px; gap: 2px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button b { font-size: 12px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(14, 23, 38, .08); color: var(--ink-2); }
.seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.col { background: #ECEEF4; border-radius: 22px; padding: 12px; min-height: 240px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 12px; }
.col-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.col-title .ic { width: 18px; height: 18px; }
.col-count { font-size: 13px; font-weight: 800; min-width: 28px; height: 26px; padding: 0 9px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-xs); }
.col[data-col="WAITING"] .col-title { color: var(--waiting); }
.col[data-col="PREPARING"] .col-title { color: var(--preparing); }
.col[data-col="READY"] .col-title { color: var(--ready); }
.col-list { display: grid; gap: 12px; }

.bz-card {
  position: relative; background: var(--surface); border-radius: 18px; padding: 16px 16px 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow-xs);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.bz-card:hover { box-shadow: var(--shadow); }
.bz-card.is-new { animation: fade-up .3s var(--ease), glow-new 2.2s ease-out; }
@keyframes glow-new { 0% { box-shadow: 0 0 0 4px rgba(109, 93, 252, .45); } 100% { box-shadow: var(--shadow-xs); } }
.bz-card.is-ready { border-color: #A6E9C4; background: linear-gradient(180deg, #F4FDF8 0%, #FFFFFF 60%); }
.bz-card.is-alerting::after { content: ""; position: absolute; inset: -1px; border-radius: 18px; border: 2px solid #12B76A; animation: ring-fade 1.6s ease-out infinite; pointer-events: none; }
@keyframes ring-fade { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.035); } }
.bz-card.is-late { border-color: #FDB022; }
.bz-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bz-num { font-family: var(--font-display); font-size: 42px; font-weight: 850; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.bz-meta { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.bz-meta .dot-sep::before { content: "·"; margin-right: 10px; color: var(--faint); }
.bz-name { font-size: 14px; font-weight: 650; color: var(--ink-2); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-name small { font-weight: 500; color: var(--muted); }
.bz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bz-resp { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--ink-2); }
.bz-resp .ic { width: 18px; height: 18px; }
.bz-resp small { margin-left: auto; font-weight: 600; font-size: 12.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.bz-resp.resp-none { color: var(--muted); background: var(--surface-2); }
.bz-resp.resp-connected { color: var(--info); background: var(--info-bg); }
.bz-resp.resp-alerting { color: var(--violet); background: var(--violet-bg); }
.bz-resp.resp-alerting .ic { animation: wiggle 1s ease-in-out infinite; }
.bz-resp.resp-stopped { color: #344054; background: #EAECF0; }
.bz-resp.resp-coming { color: #fff; background: linear-gradient(135deg, #12B76A, #0A9A57); box-shadow: 0 8px 18px -10px rgba(18, 183, 106, .9); }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
.bz-actions { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; margin-top: 14px; }
.bz-actions .btn { min-height: 46px; padding: 10px 12px; font-size: 14.5px; }
.bz-actions .btn-span { grid-column: span 2; }
.bz-timer { font-variant-numeric: tabular-nums; }
.bz-timer.is-warn { color: #B54708; font-weight: 700; }

.board-empty { grid-column: 1 / -1; }

@media (max-width: 1280px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .board { grid-template-columns: 1fr; }
  .filters { display: block; margin-bottom: 16px; position: sticky; top: calc(var(--appbar-h) + 8px); z-index: 20; }
  .col { background: transparent; padding: 0; min-height: 0; }
  .col[data-col="READY"] { order: -2; }
  .col[data-col="PREPARING"] { order: -1; }
  .col-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .board[data-filter="WAITING"] .col:not([data-col="WAITING"]),
  .board[data-filter="PREPARING"] .col:not([data-col="PREPARING"]),
  .board[data-filter="READY"] .col:not([data-col="READY"]) { display: none; }
  .col.is-empty { display: none; }
  .board:not([data-filter=""]) .col.is-empty { display: block; }
}
@media (max-width: 900px) {
  .page { padding: 18px 16px 32px; }
  .page-head { margin-bottom: 16px; align-items: center; }
  .page-head h1 { font-size: 24px; }
  .page-head p { display: none; }
  .create-btn { display: none; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .stat { padding: 12px 12px 10px; border-radius: 16px; }
  .stat-label { font-size: 10.5px; letter-spacing: .06em; gap: 6px; }
  .stat-value { font-size: 26px; }
  .col-list { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .bz-actions { grid-template-columns: 1fr 1fr; }
}

/* ================================================================ QR MODAL */
.qr-dialog { max-width: min(96vw, 460px); }
.qr-sheet { background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-lg); padding: 26px 24px 22px; text-align: center; position: relative; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; }
.qr-sheet .modal-close { top: 16px; right: 16px; }
.qr-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--ready-bg); color: var(--ready); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.qr-number { font-family: var(--font-display); font-size: 76px; font-weight: 900; letter-spacing: -.05em; line-height: 1; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
.qr-lead { color: var(--muted); font-size: 15px; max-width: 330px; margin: 0 auto; }
.qr-lead strong { color: var(--ink); }
/* The QR is always perfectly centred — a dedicated flex wrapper + fixed square box. */
.qr-center { display: flex; justify-content: center; align-items: center; width: 100%; margin: 18px 0 14px; }
.qr-box {
  width: min(80vw, 300px); height: min(80vw, 300px); max-width: 320px; max-height: 320px;
  background: #fff; border-radius: 24px; padding: 14px; flex: none; margin: 0 auto;
  box-shadow: 0 0 0 1px var(--line), 0 12px 30px -12px rgba(16, 24, 40, .25);
  display: flex; align-items: center; justify-content: center;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-flow { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.qr-flow .ic { width: 14px; height: 14px; color: var(--faint); }
.qr-conn { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 650; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.qr-conn[data-state="connected"] { background: var(--ready-bg); color: var(--ready); border-color: #B7EBCD; }
.qr-conn .spinner { width: 14px; height: 14px; border-width: 2px; }
.qr-code-alt { margin-top: 12px; font-size: 13px; color: var(--muted); }
.qr-code-alt b { white-space: nowrap; display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .18em; color: var(--ink); font-size: 14px; background: var(--surface-2); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); }
.qr-note { display: flex; gap: 8px; margin-top: 16px; }
.qr-note input { flex: 1; min-height: 42px; border-radius: 12px; border: 1px solid var(--line); padding: 8px 12px; font-size: 14px; }
.qr-note input:focus { outline: none; border-color: var(--focus); box-shadow: var(--ring); }
.qr-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.qr-tools .btn { min-height: 44px; padding: 8px 10px; font-size: 14px; }
.qr-foot { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin-top: 12px; }

@media (max-width: 520px), (max-height: 860px) {
  .qr-sheet { padding: 18px 16px 16px; border-radius: 26px; }
  .qr-number { font-size: 60px; margin: 8px 0 4px; }
  .qr-lead { font-size: 14px; }
  .qr-lead br, .qr-lead span.more { display: none; }
  .qr-center { margin: 12px 0 10px; }
  .qr-box { width: min(68vw, 250px); height: min(68vw, 250px); padding: 10px; border-radius: 20px; }
  .qr-conn { margin-top: 10px; padding: 7px 12px; font-size: 13px; }
  .qr-code-alt { margin-top: 8px; }
  .qr-note { margin-top: 10px; }
  .qr-tools { margin-top: 10px; gap: 6px; }
  .qr-tools .btn { min-height: 40px; font-size: 13px; padding: 6px 8px; gap: 6px; }
  .qr-foot { margin-top: 8px; }
}
.qr-full {
  position: fixed; inset: 0; z-index: 900; background: radial-gradient(1200px 800px at 50% -10%, #25324E 0%, #0B1220 60%);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 1.6vh, 18px); padding: 20px; text-align: center; overflow: auto;
}
.qr-full .brand { color: #fff; }
.qr-full .brand-text span { color: #FF8F6B; }
.qr-full-num { font-family: var(--font-display); font-size: clamp(48px, 10vh, 130px); font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.qr-full .qr-box { width: min(78vw, 50vh, 520px); height: min(78vw, 50vh, 520px); max-width: none; max-height: none; border-radius: 32px; padding: 22px; }
.qr-full-cta { font-size: clamp(18px, 3vh, 34px); font-weight: 900; letter-spacing: .16em; }
.qr-full-flow { font-size: clamp(14px, 2vh, 17px); color: rgba(255, 255, 255, .75); font-weight: 600; }
.qr-full-close { position: absolute; top: 20px; right: 20px; background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
.qr-full-close:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.qr-full .qr-conn { background: rgba(255, 255, 255, .1); color: #fff; border-color: transparent; }
.qr-full .qr-conn[data-state="connected"] { background: #12B76A; color: #fff; }

/* ================================================================ HISTORY */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input { width: auto; min-height: 44px; }
.toolbar .search { position: relative; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; }
.toolbar .search .input { padding-left: 38px; width: 180px; }
.toolbar .spacer { flex: 1; }
.summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary .stat-value { font-size: 26px; }
.resp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; }
.resp-pill .ic { width: 15px; height: 15px; }
.resp-pill.coming { color: var(--ready); }
.resp-pill.stopped { color: var(--slate); }
.resp-pill.none { color: var(--faint); }
.history-cards { display: none; }
.h-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; cursor: pointer; }
.h-card-top { display: flex; align-items: center; justify-content: space-between; }
.h-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 13px; }
.h-card-grid span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 30px; bottom: -10px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .t-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--slate-bg); color: var(--slate); }
.timeline .t-dot .ic { width: 12px; height: 12px; stroke-width: 3; }
.timeline .t-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline strong { font-size: 14.5px; }
.timeline small { display: block; color: var(--muted); }
.t-READY .t-dot, .t-BUZZ_AGAIN .t-dot, .t-DELIVERED .t-dot, .t-COMING .t-dot { background: var(--ready-bg); color: var(--ready); }
.t-PREPARING .t-dot { background: var(--preparing-bg); color: var(--preparing); }
.t-CANCELLED .t-dot { background: var(--danger-bg); color: var(--danger); }
.t-JOINED .t-dot { background: var(--info-bg); color: var(--info); }
.t-STOPPED .t-dot { background: #EAECF0; color: #344054; }
@media (max-width: 1100px) { .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .history-table { display: none; }
  .history-cards { display: grid; gap: 10px; }
  .toolbar .search .input { width: 100%; }
  .toolbar .search { flex: 1 1 100%; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================================================================ SETTINGS */
.settings-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--appbar-h) + 20px); display: grid; gap: 4px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; text-decoration: none; font-weight: 650; color: var(--muted); }
.settings-nav a:hover { background: var(--surface); color: var(--ink); }
.settings-nav a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.settings-section { scroll-margin-top: calc(var(--appbar-h) + 20px); margin-bottom: 24px; }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.preview-numbers { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.preview-numbers span { font-family: var(--font-display); font-weight: 800; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-preview { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.user-row { display: flex; align-items: center; gap: 12px; }
.user-row .avatar { width: 36px; height: 36px; font-size: 12.5px; }
details.inline-edit > summary { list-style: none; cursor: pointer; }
details.inline-edit > summary::-webkit-details-marker { display: none; }
details.inline-edit[open] { background: var(--surface-2); }
.edit-panel { padding: 18px; border-top: 1px solid var(--line-2); }
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .settings-nav a { white-space: nowrap; background: var(--surface); }
}

/* ================================================================ ADMIN */
.admin-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { background: #0B1220; color: #C8D0E0; padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.sidebar .brand { color: #fff; }
.sidebar .brand-text span { color: #FF8F6B; }
.sidebar-top { display: grid; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar-badge { justify-self: start; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #FFB199; background: rgba(255, 122, 47, .14); padding: 4px 8px; border-radius: 6px; }
.sidebar-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #AEB8CC; text-decoration: none; font-weight: 600; font-size: 14.5px; border: 0; background: none; width: 100%; cursor: pointer; text-align: left; }
.side-link .ic { width: 18px; height: 18px; opacity: .9; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.is-active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 #FF6A3D; }
.sidebar-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot form { margin: 0; }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 14px; padding: 26px 32px 8px; }
.admin-top h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.admin-content { padding: 16px 32px 48px; }
.admin-grid { display: grid; gap: 20px; }
.admin-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.health-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.health-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.health-list li:last-child { border-bottom: 0; }
.ok-tag { color: var(--ready); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.bad-tag { color: var(--danger); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 650; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.tabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.only-mobile { display: none; }
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid.cols-2, .admin-grid.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 200; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 16, 28, .5); z-index: 150; }
  .only-mobile { display: inline-grid; }
  .admin-top { padding: 16px 16px 4px; }
  .admin-content { padding: 12px 16px 40px; }
}

/* ================================================================ LOGIN / SOLO PAGES */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 600px at 20% 10%, #FF7A2F 0%, transparent 60%), radial-gradient(900px 700px at 90% 90%, #FF2E63 0%, transparent 55%), #1A1030;
}
.auth-art .brand { color: #fff; }
.auth-art .brand-text span { color: #FFD2C2; }
.auth-art h1 { font-size: clamp(36px, 4.4vw, 58px); font-weight: 900; letter-spacing: -.035em; line-height: 1.02; max-width: 560px; }
.auth-art p { font-size: 18px; color: rgba(255, 255, 255, .82); max-width: 460px; margin-top: 16px; }
.auth-phone { display: flex; gap: 14px; align-items: center; margin-top: 30px; padding: 14px 18px; border-radius: 20px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); max-width: 360px; border: 1px solid rgba(255, 255, 255, .18); }
.auth-phone .n { font-family: var(--font-display); font-size: 34px; font-weight: 900; letter-spacing: -.04em; }
.auth-phone small { display: block; color: rgba(255, 255, 255, .75); }
.auth-form-side { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: min(400px, 100%); }
.auth-card h2 { font-size: 28px; font-weight: 850; letter-spacing: -.025em; }
.auth-card form { display: grid; gap: 16px; margin-top: 26px; }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 22px 34px; min-height: auto; }
  .auth-art h1 { font-size: 32px; margin-top: 28px; }
  .auth-art p { font-size: 16px; }
  .auth-phone { display: none; }
  .auth-form-side { place-items: start center; padding: 28px 20px 40px; }
}

.center-page { min-height: 100vh; min-height: 100dvh; background: radial-gradient(900px 500px at 50% -10%, #FFE4D6 0%, transparent 70%), var(--bg); }
.solo { max-width: 460px; margin: 0 auto; padding: 32px 18px; display: grid; gap: 24px; justify-items: center; }
.solo-card { width: 100%; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow); padding: 32px 26px; text-align: center; display: grid; gap: 12px; justify-items: center; border: 1px solid var(--line); }
.solo-card h1 { font-size: 24px; font-weight: 850; }
.solo-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--slate-bg); color: var(--slate); }
.solo-icon .ic { width: 30px; height: 30px; }
.solo-actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }

/* ================================================================ PRINT */
.print-sheet { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; padding: 0 !important; }
  body > *:not(.print-sheet) { display: none !important; }
  dialog, .toasts, .tabbar, .appbar { display: none !important; }
  .print-sheet { display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6mm; min-height: 240mm; color: #000; }
  .print-brand { font-size: 20pt; font-weight: 900; letter-spacing: .22em; }
  .print-num { font-size: 64pt; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
  .print-num small { display: block; font-size: 14pt; letter-spacing: .3em; font-weight: 800; margin-bottom: 3mm; }
  .print-qr { width: 110mm; height: 110mm; margin: 0 auto; }
  .print-qr svg { width: 100%; height: 100%; }
  .print-cta { font-size: 26pt; font-weight: 900; letter-spacing: .2em; }
  .print-msg { font-size: 13pt; max-width: 120mm; }
  .print-code { font-size: 11pt; color: #444; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* dashboard extras */
.col:not(.is-empty) .col-empty { display: none; }
.bz-num { cursor: pointer; }
.bz-num:hover { color: var(--ink-2); }

/* progress steps + numbered steps (shared) */
.cx-steps { list-style: none; margin: 22px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.cx-steps::before { content: ""; position: absolute; top: 11px; left: 12.5%; right: 12.5%; height: 3px; background: var(--line); border-radius: 3px; }
.cx-steps li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.cx-steps li::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--line); position: relative; z-index: 1; box-sizing: border-box; }
.cx-steps li.is-done { color: var(--ink-2); }
.cx-steps li.is-done::before { background: var(--ink); border-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 13px; background-position: center; background-repeat: no-repeat; }
.cx-steps li.is-current { color: var(--ink); }
.cx-steps li.is-current::before { border-color: var(--brand); box-shadow: 0 0 0 5px rgba(255, 75, 75, .15); }
.cx-steps::after { content: ""; position: absolute; top: 11px; left: 12.5%; height: 3px; width: calc(75% * var(--p, 0)); background: var(--ink); border-radius: 3px; transition: width .5s var(--ease); }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; font-size: 15.5px; font-weight: 550; }
.steps li::before { counter-increment: s; content: counter(s); width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; }
.steps .ic { display: inline-block; vertical-align: -4px; width: 20px; height: 20px; color: #2E90FA; }

/* form polish */
.field { align-content: start; }
input[type=file] { font-size: 14px; color: var(--muted); }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 650; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px; margin-right: 12px; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--surface-2); }

/* ================================================================ POS */
.food-dot { display: inline-block; flex: none; width: 13px; height: 13px; border: 1.6px solid #12B76A; border-radius: 3px; position: relative; margin-right: 7px; vertical-align: -1px; }
.food-dot::after { content: ""; position: absolute; inset: 2.2px; border-radius: 50%; background: #12B76A; }
.food-dot.food-nonveg { border-color: #B42318; }
.food-dot.food-nonveg::after { background: #B42318; }
.food-dot.food-egg { border-color: #DC6803; }
.food-dot.food-egg::after { background: #DC6803; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px !important; }

.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.pos-top { display: flex; gap: 10px; margin-bottom: 12px; }
.pos-search { position: relative; flex: 1; }
.pos-search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.pos-search .input { width: 100%; padding-left: 40px; min-height: 48px; }
.pos-today { min-height: 48px; }
.pos-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.pos-cat { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 16px; font-weight: 650; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.pos-cat small { color: var(--faint); font-weight: 600; margin-left: 2px; }
.pos-cat.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pos-cat.is-active small { color: rgba(255, 255, 255, .6); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pos-grid > .empty { grid-column: 1 / -1; }
.pos-item { position: relative; display: grid; gap: 6px; align-content: space-between; min-height: 96px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-xs); cursor: pointer; transition: transform .1s var(--ease), border-color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pos-item:hover { border-color: #CBD2DE; box-shadow: var(--shadow); }
.pos-item:active { transform: scale(.97); }
.pos-item.in-cart { border-color: var(--brand-1); box-shadow: 0 0 0 2px rgba(255, 122, 47, .25); }
.pos-item-name { font-weight: 700; font-size: 15px; line-height: 1.25; display: flex; align-items: flex-start; }
.pos-item-name .food-dot { margin-top: 3px; }
.pos-item-cat { font-size: 12px; color: var(--faint); }
.pos-item-price { font-size: 13.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-item-qty { position: absolute; top: -8px; right: -8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 4px 10px -4px rgba(255, 46, 99, .8); }

.pos-cart { position: sticky; top: calc(var(--appbar-h) + 16px); padding: 18px; display: grid; gap: 14px; max-height: calc(100vh - var(--appbar-h) - 32px); max-height: calc(100dvh - var(--appbar-h) - 32px); overflow: auto; }
.pos-cart-head { display: flex; align-items: center; justify-content: space-between; }
.pos-cart-head h2 { font-size: 19px; font-weight: 800; }
.pos-seg button { padding: 8px 6px; font-size: 13.5px; }
.pos-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pos-fields .pos-table { grid-column: 1 / -1; }
.pos-fields .field input { min-height: 42px; }
.pos-lines { display: grid; gap: 2px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px 0; min-height: 80px; align-content: start; }
.pos-lines .empty { padding: 20px 10px; }
.pos-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px 28px; gap: 8px; align-items: center; padding: 8px 0; }
.pos-line + .pos-line { border-top: 1px dashed var(--line); }
.pos-line.is-new { animation: pos-flash .6s var(--ease); }
@keyframes pos-flash { from { background: #FFF1E8; } to { background: transparent; } }
.pos-line-name { font-weight: 650; font-size: 14.5px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 0 4px; }
.pos-line-name .food-dot { margin-top: 3px; margin-right: 3px; }
.pos-line-name small { color: var(--muted); font-weight: 600; }
.pos-line-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-qty { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 2px; }
.pos-qty .icon-btn { width: 32px; height: 32px; min-width: 32px; font-size: 18px; font-weight: 700; }
.pos-qty b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.pos-line-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.pos-line-note { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 4px; border-radius: 8px; }
.pos-line-note:hover { color: var(--ink); background: var(--surface-2); }
.pos-totals { display: grid; gap: 6px; font-size: 14.5px; }
.pos-totals > div, .pos-discount { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pos-totals b { font-variant-numeric: tabular-nums; }
.pos-discount .input { width: 110px; min-height: 36px; padding: 6px 10px; text-align: right; }
.pos-grand { font-size: 20px; font-weight: 800; padding-top: 6px; border-top: 1px solid var(--line-2); }
.pos-grand b { font-weight: 850; }
.pos-cartbar { display: none; }

.pos-size { max-width: 420px; }
.pos-size-list { display: grid; gap: 10px; margin-top: 10px; }
.pos-size-btn { justify-content: space-between; }
.pos-done-total { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin: 6px 0 2px; color: var(--muted); font-weight: 600; }
.pos-done-total b { font-size: 24px; color: var(--ink); font-weight: 850; }
.pos-bills { width: min(94vw, 560px); }
.pos-bills-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.pos-bills-sum div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.pos-bills-sum small { display: block; color: var(--muted); font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.pos-bills-sum b { font-size: 24px; font-weight: 850; }
.pos-bills-list { display: grid; margin-top: 12px; border-top: 1px solid var(--line-2); }
.pos-bill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.pos-bill-row small { display: block; color: var(--muted); font-size: 12.5px; }
.pos-bill-row.is-cancelled { opacity: .55; }
.pos-bill-row.is-cancelled > b { text-decoration: line-through; }

.menu-cat + .menu-cat { border-top: 1px solid var(--line-2); }
.menu-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 4px; flex-wrap: wrap; }
.menu-cat-head h3 { font-size: 16px; font-weight: 800; }
.menu-cat-edit { flex-basis: auto; }
.menu-cat-edit[open] { flex-basis: 100%; }
.menu-cat-edit .inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 10px; }
.menu-name { display: flex; align-items: center; }
.menu-price { text-align: right; white-space: nowrap; color: var(--muted); }
.menu-price b { color: var(--ink); }
.menu-table tr.is-off td:not(.row-actions) { opacity: .5; }
.menu-table .menu-edit-row td { padding-top: 0; border-top: 0; }
.menu-table .menu-edit-row summary { list-style: none; cursor: pointer; }
.menu-table .menu-edit-row summary::-webkit-details-marker { display: none; }

@media (max-width: 1100px) {
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 900px) {
  .pos { grid-template-columns: 1fr; }
  .pos-cart { position: static; max-height: none; overflow: visible; scroll-margin-top: calc(var(--appbar-h) + 10px); }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pos-item { min-height: 84px; padding: 12px; }
  .pos-today span { display: none; }
  .pos-cartbar:not([hidden]) {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 12px; right: 12px; z-index: 60;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); padding: 14px 18px; border: 0; border-radius: 16px;
    background: var(--ink); color: #fff; font: inherit; font-weight: 650; box-shadow: var(--shadow-lg); cursor: pointer;
  }
  .pos-cartbar b { font-size: 17px; }
  .pos-cartbar span:last-child { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
  body.pos-page { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 80px); }
}

/* Receipt / KOT for 80 mm (and 58 mm) thermal printers. */
@media print {
  .print-sheet.is-receipt { display: block !important; min-height: 0; text-align: left; width: 72mm; max-width: 100%; margin: 0; font: 10pt/1.35 ui-monospace, Menlo, Consolas, monospace; }
  .rc { display: grid; gap: 2.5mm; }
  .rc-head { display: grid; text-align: center; gap: .5mm; padding-bottom: 2mm; border-bottom: 1px dashed #000; }
  .rc-head b { font-size: 13pt; }
  .rc-meta { display: flex; justify-content: space-between; gap: 2mm; }
  .rc-items { width: 100%; border-collapse: collapse; }
  .rc-items th { text-align: left; border-bottom: 1px dashed #000; font-weight: 700; padding: 1mm 0; }
  .rc-items td { vertical-align: top; padding: .8mm 0; }
  .rc-items small { display: block; font-size: 8.5pt; }
  .rc-items .r { text-align: right; padding-left: 2mm; white-space: nowrap; }
  .rc-sum { display: flex; justify-content: space-between; }
  .rc-total { font-size: 13pt; font-weight: 900; border-top: 1px dashed #000; border-bottom: 1px dashed #000; padding: 1.5mm 0; }
  .rc-buzz { display: grid; justify-items: center; text-align: center; gap: 1mm; padding-top: 2mm; }
  .rc-buzz small { letter-spacing: .25em; font-weight: 700; }
  .rc-buzz b { font-size: 30pt; line-height: 1; font-weight: 900; }
  .rc-qr { width: 42mm; height: 42mm; }
  .rc-qr svg { width: 100%; height: 100%; }
  .rc-foot { text-align: center; border-top: 1px dashed #000; padding-top: 2mm; }
  .rc-kot { font-size: 12pt; }
  .rc-kot .rc-head b { font-size: 18pt; }
  .rc-kq { width: 10mm; font-weight: 900; }
}

/* ------------------------------------------------------------ sales files & dashboard */
.sales-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; margin-bottom: 18px; }
.sales-drop:hover, .sales-drop.is-over { border-color: var(--brand-1); background: #FFF6F0; }
.sales-drop.is-busy { opacity: .6; pointer-events: none; }
.sales-drop .ic-lg { width: 30px; height: 30px; color: var(--brand); }
.sales-rejected ul { margin: 6px 0 8px; padding-left: 18px; }
.sales-kpis .stat-value { font-size: 28px; }
.sales-chart { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; padding: 4px 0 2px; border-bottom: 1px solid var(--line); }
.sm-col { flex: 1 0 34px; max-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0 2px; cursor: pointer; font: inherit; color: inherit; border-radius: 8px; }
.sm-col:disabled { cursor: default; }
.sm-col:not(:disabled):hover, .sm-col.is-selected { background: var(--surface-2); }
.sm-plot { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 150px; }
.sm-bar { display: block; width: 60%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--brand-1); }
.is-server .sm-bar { background: var(--ink-2); }
.sm-col.is-selected .sm-bar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.sm-missing { position: absolute; inset: 8px 3px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--danger); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--danger-bg); color: var(--danger); font-size: 10.5px; font-weight: 750; }
.sm-missing .ic { width: 15px; height: 15px; }
.sm-none { display: block; width: 60%; max-width: 26px; height: 2px; background: var(--line); }
.sm-label { font-size: 11.5px; font-weight: 650; color: var(--muted); white-space: nowrap; padding-bottom: 6px; }
.sales-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 14px; font-size: 13px; color: var(--muted); }
.sales-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-file { background: var(--brand-1); }
.lg-server { background: var(--ink-2); }
.lg-missing { background: var(--danger-bg); border: 2px dashed var(--danger); }
.sales-table td .cell-sub b { color: var(--ink); }
.sales-detail { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sales-detail h4 { margin: 18px 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sales-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sales-detail-head h3 { margin: 0; font-size: 20px; }
.sales-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.sales-days { display: flex; align-items: flex-end; gap: 2px; height: 130px; overflow-x: auto; }
.sd-col { flex: 1 0 8px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.sd-bar { display: block; width: 100%; max-width: 14px; border-radius: 4px 4px 0 0; background: var(--brand-1); }
.sd-col:hover .sd-bar { background: var(--brand-2); }
.sd-label { font-size: 10px; color: var(--faint); min-height: 12px; }
.sales-pay { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.sales-pay li { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; }
.sp-track { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.sp-track span { display: block; height: 100%; border-radius: 4px; background: var(--ink-2); }
@media (max-width: 760px) {
  .sales-grid { grid-template-columns: 1fr; }
  .sm-plot { height: 120px; }
}

/* ------------------------------------------------------------ subscriptions, first sign-in, setup guide */
.small { font-size: 13px; }
a.menu-item { text-decoration: none; }
.form-section { font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 -2px; }
.input-sm { min-height: 34px; padding: 4px 10px; font-size: 13.5px; border-radius: 10px; }
.table-sm td, .table-sm th { padding: 10px 12px; }
.plan-notice { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; background: var(--waiting-bg); color: var(--waiting); font-weight: 650; font-size: 14px; text-align: center; border-bottom: 1px solid #F7DE9B; }
.plan-notice .ic { width: 16px; height: 16px; flex: none; }
.plan-notice a { color: inherit; font-weight: 800; }
.plan-card .plan-grid { gap: 0; }
.plan-card .plan-grid > * + * { border-left: 1px solid var(--line-2); }
.credentials-card { margin-bottom: 20px; border: 2px solid var(--ready-dot); }
.credentials-card h2 { display: flex; align-items: center; gap: 8px; }
.cred-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.cred-list div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.cred-list dt { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cred-list dd { margin: 4px 0 0; font-weight: 750; word-break: break-all; }
.solo-form { text-align: left; justify-items: stretch; }
.solo-form h1, .solo-form > p, .solo-form .solo-icon { text-align: center; justify-self: center; }

.setup-page { max-width: 920px; }
.setup-progress { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: -6px 0 20px; }
.setup-progress span { display: block; height: 100%; border-radius: 4px; background: var(--brand-grad); }
.setup-step { margin-bottom: 16px; }
.setup-step-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px; }
.setup-step-head > div { flex: 1; min-width: 0; }
.setup-step-head h2 { font-size: 18px; }
.setup-n { width: 34px; height: 34px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: var(--slate-bg); color: var(--slate); }
.setup-n .ic { width: 18px; height: 18px; }
.setup-step.is-done .setup-n { background: var(--ready-bg); color: var(--ready); }
.setup-step.is-current { border: 2px solid var(--brand-1); box-shadow: 0 18px 40px -24px rgba(255, 75, 75, .45); }
.setup-step.is-current .setup-n { background: var(--brand-grad); color: #fff; }
.setup-step .card-body { border-top: 1px solid var(--line-2); }
.setup-step.is-done:not(.is-current) .card-body { display: none; }
.setup-step.is-done:not(.is-current):target .card-body, .setup-step.is-done.is-open .card-body { display: block; }
.setup-finish .card-body { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.setup-finish h2 { font-size: 18px; }

.ai-helper { display: grid; gap: 16px; margin-bottom: 16px; }
.ai-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ai-flow li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ai-flow strong { display: block; font-size: 13.5px; line-height: 1.3; }
.ai-flow small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.ai-flow-n { width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-weight: 850; font-size: 13px; }
.ai-prompt { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.ai-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ai-prompt-head strong { display: inline-flex; align-items: center; gap: 6px; }
.ai-prompt-head .ic { color: var(--brand); }
textarea.ai-prompt-text { display: block; width: 100%; border: 0; border-radius: 0; padding: 14px 16px; font-size: 13px; line-height: 1.5; background: var(--surface); resize: vertical; min-height: 180px; }
textarea.ai-prompt-text:focus { outline: none; box-shadow: none; }
.ai-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ai-details { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #FFF8F3; }
.ai-details > summary { cursor: pointer; padding: 12px 0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ai-details > summary .ic { color: var(--brand); }
.ai-details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ai-details .ai-helper { padding-bottom: 14px; margin-bottom: 0; }
.menu-upload .sales-drop { margin-bottom: 0; }
.sales-drop.is-ready { border-color: var(--ready-dot); background: var(--ready-bg); }
.paste-box > summary { cursor: pointer; color: var(--muted); font-weight: 650; font-size: 14px; padding: 4px 0; }
.paste-box textarea { width: 100%; margin-top: 8px; }
@media (max-width: 900px) {
  .ai-flow { grid-template-columns: 1fr; }
  .cred-list { grid-template-columns: 1fr; }
  .plan-card .plan-grid > * + * { border-left: 0; border-top: 1px solid var(--line-2); }
}

/* ------------------------------------------------------------ billing */
.billing-page { max-width: 920px; }
.billing-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.billing-plan { display: grid; gap: 8px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.billing-plan.is-featured { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--brand-grad) border-box; }
.billing-plan h3 { font-size: 17px; }
.billing-price { font-family: var(--font-display); font-size: 30px; font-weight: 900; letter-spacing: -.03em; }
.billing-secure { color: var(--muted); font-size: 13.5px; }
.billing-secure .ic { width: 16px; height: 16px; color: var(--ready-dot); vertical-align: -3px; margin-right: 4px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; }
.legal-links a { color: var(--muted); }
.check-terms { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); text-align: left; }
.check-terms input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
