:root {
  --ink: #1f2430;
  --ink-soft: #6b7280;
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e3e5ea;
  --accent: #fe6603;
  --admin-topbar-bg: #0d0a07;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok-bg: #eaf7ee;
  --ok: #1e7a3d;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: 'Manrope', system-ui, -apple-system, sans-serif; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }

/* ── Auth pages (login/signup/checkout) ── */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--accent) 7%, var(--bg)) 0%, var(--bg) 60%);
}
/* Dark variant matching the actual Gostico brand mark (white wordmark + orange dot, the
   same palette used on the marketing site's dark bands and admin topbar) - used on every
   platform-branded auth page (signup, the single shared admin login, owner login). Tenant
   admin pages past login show that tenant's own admin_color_accent/admin_color_topbar
   instead - see tenant_admin_theme() in inc/tenant.php. */
.auth-gostico {
  --bg: #0d0a07; --card: #1a150f; --border: #372e23; --ink: #f8f2e9; --ink-soft: #c3b6a4; --accent: #fe6603;
  background: #0d0a07; font-family: 'Manrope', system-ui, sans-serif;
}
.auth-gostico h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
.auth-gostico .auth-brand-logo { max-height: 60px; }
.auth-gostico .auth-card { border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); }
.auth-gostico .auth-card button, .auth-gostico .btn {
  border-radius: 10px; text-transform: none; letter-spacing: normal; font-size: 14px; font-weight: 700; color: #fff;
  background: var(--accent);
}
.auth-gostico .auth-card button:hover, .auth-gostico .btn:hover { background: color-mix(in srgb, var(--accent) 85%, black); }

.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand-logo { max-height: 52px; max-width: 200px; width: auto; object-fit: contain; }
.auth-brand-mark {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center; letter-spacing: .02em;
}
.auth-brand-name { font-weight: 800; font-size: 16px; color: var(--ink); }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px 26px; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.auth-card.wide { max-width: 560px; }
.auth-card.wide .form-grid { margin-bottom: 16px; }
.auth-card .skip-link {
  all: unset; display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--ink-soft);
  cursor: pointer; width: 100%;
}
.auth-card .skip-link:hover { color: var(--ink); text-decoration: underline; }
.auth-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; line-height: 1.5; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.auth-card input, .auth-card select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; }
.auth-card button, .btn {
  appearance: none; border: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 8px; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block;
}
.auth-card button:hover, .btn:hover { background: color-mix(in srgb, var(--accent) 82%, black); }
.auth-card button { width: 100%; margin-top: 4px; }

.alert { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.notice { background: var(--ok-bg); color: var(--ok); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

/* ── Onboarding: a "here's how this works" walkthrough shown once, before the branding
   form, the first time a tenant opens the admin panel (see admin/_boot.php's redirect). ── */
.onboarding-wrap { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 22px; }
.onboarding-kicker {
  display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
}
.onboarding-welcome {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 30px 30px 26px;
  text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.06); animation: onboardFadeUp .5s ease both;
}
.onboarding-welcome h1 { font-size: 23px; margin: 8px 0 8px; }
.onboarding-lead { color: var(--ink-soft); font-size: 14px; margin: 0 0 26px; }
.onboarding-steps { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.onboarding-step {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 12px;
  animation: onboardFadeUp .5s ease both;
}
.onboarding-step:nth-child(1) { animation-delay: 60ms; }
.onboarding-step:nth-child(2) { animation-delay: 130ms; }
.onboarding-step:nth-child(3) { animation-delay: 200ms; }
.onboarding-step:nth-child(4) { animation-delay: 270ms; }
.onboarding-step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.onboarding-step h3 { margin: 0 0 3px; font-size: 14.5px; }
.onboarding-step p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.onboarding-wrap .auth-card.wide { max-width: none; width: 100%; animation: onboardFadeUp .5s ease .34s both; }
.onboarding-wrap .auth-card .onboarding-kicker { margin-bottom: 6px; }
.onboarding-wrap .auth-card h1 { font-size: 20px; margin: 0 0 6px; }
@keyframes onboardFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .onboarding-welcome, .onboarding-step, .onboarding-wrap .auth-card.wide { animation: none; } }
@media (max-width: 560px) { .onboarding-welcome { padding: 26px 20px 22px; } }

/* ── Admin shell (logged-in pages) ── */
.admin-topbar {
  background: var(--admin-topbar-bg); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px; box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 14px rgba(0,0,0,.12);
  position: sticky; top: 0; z-index: 20;
  gap: 12px;
}
.admin-topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; flex: none; min-width: 0; }
.admin-brand-logo { height: 24px; width: auto; max-width: 130px; object-fit: contain; flex: none; }
/* The Gostico wordmark PNG is white-on-transparent (made for our own dark marketing hero) -
   a tenant's own uploaded logo can be any color/background, so it's left untouched. */
.admin-brand-logo-default { height: 20px; }
.brand-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-collapse { display: flex; align-items: center; justify-content: space-between; flex: 1; min-width: 0; gap: 12px; }
.admin-topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-topbar nav a {
  color: #ffffff; text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 7px; white-space: nowrap;
}
.admin-topbar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-topbar nav a.active { background: var(--accent); color: #fff; }
.admin-topbar .user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #c7cbd4; flex: none; }
.admin-topbar .user a { color: #c7cbd4; text-decoration: underline; }
.admin-lang-switch { display: inline-flex; gap: 2px; background: rgba(255,255,255,.08); border-radius: 20px; padding: 2px; }
.admin-lang-btn { appearance: none; border: none; background: transparent; color: #ffffff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 16px; cursor: pointer; font-family: inherit; }
.admin-lang-btn.active { background: var(--accent); color: #fff; }
.topbar-toggle {
  display: none; appearance: none; border: none; background: none; color: #fff; cursor: pointer; padding: 6px; flex: none;
  align-items: center; justify-content: center; border-radius: 7px;
}
.topbar-toggle:hover { background: rgba(255,255,255,.08); }

/* ── Waiter-call bell ── */
/* Distinct from .bell-btn (waiter calls) even though both are bell glyphs - accent-tinted
   with its own small dot, rather than gray like the waiter bell, so the two never read as
   the same icon shown twice. Only visible pre-permission (see admin/_header.php's JS) so a
   returning admin who already granted notifications never sees it at all. */
.push-btn { position: relative; appearance: none; border: none; background: none; cursor: pointer; padding: 4px 6px; line-height: 1; color: var(--accent); display: flex; align-items: center; }
.push-btn:hover { color: color-mix(in srgb, var(--accent) 80%, white); }
.push-btn-dot { position: absolute; top: 2px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--admin-topbar-bg); }

.waiter-bell { position: relative; }
.bell-btn { position: relative; appearance: none; border: none; background: none; cursor: pointer; padding: 4px 6px; line-height: 1; color: #c7cbd4; display: flex; align-items: center; }
.bell-btn:hover { color: #fff; }
.bell-btn.ringing { animation: bellShake .6s ease; }
@keyframes bellShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-15deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
.bell-badge {
  position: absolute; top: -2px; right: -2px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px; display: none; align-items: center; justify-content: center; padding: 0 3px;
}
.bell-badge.show { display: flex; }
.bell-btn.ringing .bell-badge { animation: bellBadgePulse .6s ease; }
@keyframes bellBadgePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--danger) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .bell-btn.ringing, .bell-btn.ringing .bell-badge { animation: none; } }
.bell-panel {
  position: absolute; top: 100%; right: 0; margin-top: 8px; width: 260px; background: var(--card); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 12px;
  display: none; z-index: 200; text-align: left;
}
.bell-panel.show { display: block; }
.bell-panel-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 8px; }
.bell-panel-empty { font-size: 13px; color: var(--ink-soft); }
.bell-call-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.bell-call-row:last-child { border-bottom: none; }
.bell-call-table { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.bell-call-time { font-size: 11.5px; color: var(--ink-soft); }

.admin-main { max-width: 980px; margin: 0 auto; padding: 26px 20px 60px; }
/* margin-top here is deliberately redundant with .page-head-row's margin-bottom below -
   adjacent block margins collapse to whichever is larger rather than adding up, so this
   doesn't create a double gap, it just guarantees a gap even on a page where nothing sits
   above the card at all (or that other margin ever gets removed). */
.admin-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin: 20px 0 20px;
  box-shadow: 0 1px 2px rgba(16,20,30,.04), 0 8px 20px -14px rgba(16,20,30,.12);
}
.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.admin-card h2 { display: flex; align-items: center; gap: 9px; }
.admin-card h2 svg { color: var(--accent); flex: none; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.admin-table th { color: var(--ink-soft); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tbody tr { transition: background .12s; }
table.admin-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--ink) 2%, transparent); }
table.admin-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.thumb { display: inline-block; width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.logo-thumb { display: block; max-width: 120px; max-height: 48px; width: auto; height: auto; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); background: #fff; padding: 4px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .03em; }
.field input[type=text], .field input[type=password], .field input[type=email], .field input[type=number],
.field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input[type=color] { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; }
.field-row { display: flex; align-items: center; gap: 10px; }
.field small { display: block; color: var(--ink-soft); font-size: 11.5px; margin-top: 4px; }

.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker-btn {
  appearance: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
}
.icon-picker-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-picker-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }

.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn.secondary { background: #eceef1; color: var(--ink); }
.btn.secondary:hover { background: #e0e3e8; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #8f1e18; }
.btn.small { padding: 6px 10px; font-size: 12.5px; }
.btn.copied { background: var(--ok) !important; color: #fff !important; animation: btnCopiedPop .3s ease; }
@keyframes btnCopiedPop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .btn.copied { animation: none; } }

/* ── Submit-in-flight state: full-page POST/redirect forms get a spinner instead of
   sitting there looking unresponsive until the next page arrives ── */
.btn.btn-loading { color: transparent !important; pointer-events: none; position: relative; cursor: default; }
.btn.btn-loading::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: btnSpin .6s linear infinite;
}
.btn.secondary.btn-loading::after { border-color: color-mix(in srgb, var(--ink) 20%, transparent); border-top-color: var(--ink); }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.btn-loading::after { animation-duration: 1.1s; } }
.icon-btn { border: none; background: #eceef1; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 12px; line-height: 1; }
.icon-btn:hover { background: #e0e3e8; }

.section-tag { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 20px; background: #f0f1f4; color: var(--ink-soft); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.dash-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 2px rgba(16,20,30,.04), 0 8px 20px -14px rgba(16,20,30,.12);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.dash-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(16,20,30,.22); }
.dash-tile .icon {
  width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.dash-tile .num { font-size: 24px; font-weight: 800; display: block; line-height: 1.2; }
.dash-tile .label { font-size: 12.5px; color: var(--ink-soft); }

.empty-state { color: var(--ink-soft); font-size: 13.5px; padding: 28px 16px; text-align: center; }
.empty-state .empty-icon {
  width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.empty-state p { margin: 0 0 4px; }
.empty-state .btn { margin-top: 12px; }

/* ── Dashboard checklist ── */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink); }
.checklist-item:last-child { border-bottom: none; }
.checklist-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); color: transparent; font-size: 12px;
}
.checklist-item.done .checklist-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist-item.done .checklist-label { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--border); }
.checklist-label { font-size: 13.5px; font-weight: 600; flex: 1; }
.checklist-item:not(.done):hover { color: var(--accent); }
.checklist-item:not(.done) .checklist-label:hover { color: var(--accent); }
.checklist-arrow { color: var(--ink-soft); font-size: 13px; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

/* ── Currency chooser (Settings) ── */
.currency-choices { display: flex; gap: 10px; flex-wrap: wrap; }
.currency-choice {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; cursor: pointer; flex: 1; min-width: 140px; transition: border-color .15s, background .15s;
}
.currency-choice:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.currency-choice input[type=radio] { width: auto; margin: 0; accent-color: var(--accent); }
.currency-choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.currency-choice:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.currency-choices { max-height: 320px; overflow-y: auto; }
.currency-symbol { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 16px; color: var(--accent); width: 30px; text-align: center; flex: none; }
.currency-info { display: flex; flex-direction: column; line-height: 1.3; }
.currency-info strong { font-size: 13px; }
.currency-info small { font-size: 11px; color: var(--ink-soft); }

/* ── Inline price input with a currency suffix badge ── */
.price-input-group { display: flex; align-items: stretch; }
.price-input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.price-input-suffix {
  display: flex; align-items: center; padding: 0 12px; background: #eceef1; color: var(--ink-soft); font-size: 12.5px;
  font-weight: 700; border: 1px solid var(--border); border-left: none; border-top-right-radius: 8px; border-bottom-right-radius: 8px;
  white-space: nowrap;
}

/* ── Per-language translation field groups ── */
.i18n-group { display: flex; flex-direction: column; }
.i18n-row input, .i18n-row textarea { width: 100%; }

/* Shared by every render_i18n_fields() field below it in the same form (see
   render_i18n_lang_tabs()/admin.js) - one tab bar controls every translatable field at once,
   so switching to HR shows every field's Croatian input together instead of tab-per-field. */
.i18n-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; grid-column: 1 / -1; }
.i18n-tab-btn {
  appearance: none; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--ink-soft);
  padding: 6px 14px 6px 12px; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: border-color .15s, color .15s, background .15s;
}
.i18n-tab-btn .i18n-tab-name { font-weight: 500; color: var(--ink-soft); }
.i18n-tab-btn:hover { border-color: var(--accent); }
.i18n-tab-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); }
.i18n-tab-btn.active .i18n-tab-name { color: var(--accent); }

/* ── Modals (add/edit forms on Sections/Categories/Items) ── */
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,17,23,.55); display: flex; align-items: flex-start;
  justify-content: center; padding: 48px 16px; z-index: 500; overflow-y: auto;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, visibility 0s linear .18s, background .18s ease;
}
.modal-overlay.show {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .18s ease, background .18s ease;
}
.modal {
  background: var(--card); border-radius: var(--radius); width: 100%; max-width: 640px; padding: 22px 24px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.4);
  transform: scale(.96) translateY(10px); transition: transform .22s cubic-bezier(.16,1,.3,1);
}
.modal-overlay.show .modal { transform: scale(1) translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal { transition: none; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; }
.modal-close {
  appearance: none; border: none; background: #eceef1; width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink-soft); flex: none;
}
.modal-close:hover { background: #e0e3e8; color: var(--ink); }

/* ── Confirm modal (replaces native window.confirm on destructive actions) ── */
.confirm-modal .modal { max-width: 380px; text-align: center; padding: 26px 26px 22px; }
.confirm-modal-icon {
  width: 46px; height: 46px; border-radius: 50%; background: var(--danger-bg); color: var(--danger);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.confirm-modal-text { font-size: 14px; color: var(--ink); margin: 0 0 20px; line-height: 1.5; }
.confirm-modal .btn-row { justify-content: center; margin-top: 0; }

/* ── Toast-style dismissible notices ── */
.notice, .alert { position: relative; padding-right: 34px; }
.notice-close {
  position: absolute; top: 6px; right: 6px; appearance: none; border: none; background: none; cursor: pointer;
  width: 22px; height: 22px; border-radius: 6px; color: inherit; opacity: .6; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.notice-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
.notice.fading, .alert.fading { animation: mvFadeOut .4s ease forwards; }
@keyframes mvFadeOut { from { opacity: 1; max-height: 60px; margin-bottom: 14px; } to { opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; } }

/* ── Table horizontal-scroll safety net (never lets buttons/columns collide) ── */
.table-responsive { width: 100%; }
.dataTables_wrapper .dataTables_scrollHead, .dataTables_wrapper .dataTables_scrollBody {
  border-radius: 8px;
}
.dataTables_wrapper .dataTables_scrollBody { border-bottom: 1px solid transparent; }
.actions-cell, .order-cell { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.dataTables_wrapper .dataTables_length { font-size: 13px; color: var(--ink-soft); }
.dataTables_wrapper .dataTables_length select {
  padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; margin: 0 4px; background: #fff;
}

/* ── QR table-card generator (Dashboard) ── */
.qr-modal .modal { max-width: 460px; }
.qr-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.qr-controls .field { flex: 1; min-width: 110px; margin: 0; }
.qr-preview {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; background: var(--bg);
  border: 1px dashed var(--border); border-radius: 12px;
}
.qr-preview canvas, .qr-preview img { max-width: 100%; height: auto; }
.qr-preview-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.qr-preview-url { font-size: 11px; color: var(--ink-soft); word-break: break-all; text-align: center; }
.qr-nav { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 4px; }
.qr-nav .icon-btn { width: 30px; height: 30px; }

.qr-batch-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.qr-batch-section h3 { font-size: 14px; margin: 0 0 4px; }

@media print {
  body * { visibility: hidden; }
  .qr-print-area, .qr-print-area * { visibility: visible; }
  .qr-print-area {
    position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff; border: none;
  }
  .modal-overlay { background: none !important; position: static !important; padding: 0 !important; }
  .modal { box-shadow: none !important; padding: 0 !important; max-width: none !important; }
}

/* ── DataTables overrides (search + pagination on admin tables) ── */
.dt-top, .dt-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dt-top { margin-bottom: 12px; }
.dt-bottom { margin-top: 12px; }
.dataTables_wrapper .dataTables_filter { margin: 0; }
.dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: 0; }
.dataTables_wrapper .dataTables_filter input {
  padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit;
  width: 200px; background: #fff; color: var(--ink);
}
.dataTables_wrapper .dataTables_info { font-size: 12.5px; color: var(--ink-soft); }
.dataTables_wrapper .dataTables_paginate { display: flex; gap: 4px; align-items: center; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 11px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--ink); border: 1px solid transparent;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--accent); color: #fff; }
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { color: var(--ink-soft); opacity: .4; cursor: default; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) { background: #eceef1; }
table.admin-table.dataTable { margin-top: 0 !important; }
table.admin-table.dataTable thead th.sorting_disabled { cursor: default; }

/* ── Dashboard: active waiter-call countdowns ── */
.active-calls-list { display: flex; flex-direction: column; gap: 4px; }
.active-call-row { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.active-call-row:last-child { border-bottom: none; }
.active-call-info { flex: none; width: 150px; display: flex; flex-direction: column; }
.active-call-table { font-weight: 800; font-size: 13.5px; }
.active-call-reason { font-size: 11.5px; color: var(--ink-soft); }
.active-call-time { font-size: 11px; color: var(--ink-soft); }
.active-call-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.active-call-bar-fill { height: 100%; width: 100%; background: var(--ok); border-radius: 6px; }
@keyframes mvCountdown { from { width: 100%; } to { width: 0%; } }
@media (prefers-reduced-motion: reduce) {
  .active-call-bar-fill { animation: none !important; }
}

/* ── Settings page tabs ── */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tab-btn {
  appearance: none; border: none; background: none; color: var(--ink-soft); font-family: inherit; font-weight: 700;
  font-size: 13.5px; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panels { position: relative; overflow: hidden; transition: height .25s ease; }
.tab-panel { display: none; }
.tab-panel.active { display: block; transition: opacity .2s ease; }
@media (prefers-reduced-motion: reduce) {
  .tab-panels, .tab-panel.active { transition: none; }
}

/* ── Opening-hours clock dials ── */
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.hours-day { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.hours-day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; text-align: left; }
.hours-day-name { font-size: 13px; font-weight: 800; color: var(--ink); }
.hours-closed-toggle { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-soft); text-transform: none; margin: 0; cursor: pointer; }
.hours-dial-wrap { position: relative; opacity: 1; transition: opacity .15s; }
.hours-day.is-closed .hours-dial-wrap { opacity: .35; pointer-events: none; }
.hours-dial { width: 100%; max-width: 168px; height: auto; touch-action: none; user-select: none; }
.dial-bg { fill: var(--card); stroke: var(--border); stroke-width: 1; }
.dial-tick { stroke: var(--border); stroke-width: 1; }
.dial-tick.major { stroke: var(--ink-soft); stroke-width: 1.5; }
.dial-hour-label { fill: var(--ink-soft); font-size: 9px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.dial-arc { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; opacity: .55; }
.dial-handle { fill: var(--accent); stroke: var(--card); stroke-width: 2.5; cursor: grab; }
.dial-handle:active { cursor: grabbing; }
.dial-handle-close { fill: var(--ink); }
.hours-dial-readout { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--ink); }
.dial-time-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dial-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dial-dot-close { background: var(--ink); }

/* ── Marketing page: warm restaurant palette - a serif display face for headings, orange
   accent, alternating light/dark bands (see .dark-band) instead of one flat background ── */
body.marketing-page {
  --bg: #ffffff;
  --bg-soft: #faf6f0;
  --card: #ffffff;
  --border: #e8e1d6;
  --ink: #241c14;
  --ink-soft: #776a5c;
  --accent: #e9581f;
  --accent-2: #5b8c3e;
  background: var(--bg);
  font-family: 'Manrope', system-ui, sans-serif;
}
/* Serif display face is reserved for the big marketing headlines (h1/h2) - card- and
   list-level headings (h3) stay in the sans-serif body face, same as the reference. */
body.marketing-page h1, body.marketing-page h2 { font-family: 'Playfair Display', Georgia, serif; }

/* Scopes a section to the dark palette - everything inside that already reads var(--ink) /
   var(--ink-soft) / var(--card) / var(--border) flips automatically, no rule duplication. */
.dark-band {
  --card: #1a150f;
  --border: #372e23;
  --ink: #f8f2e9;
  --ink-soft: #c3b6a4;
  background: #0d0a07;
  color: var(--ink);
}

.marketing-page .btn {
  border-radius: 999px; text-transform: none; letter-spacing: .01em; font-size: 15px; font-weight: 700;
  color: #fff; padding: 14px 28px; transition: background .15s, color .15s, border-color .15s;
  font-family: 'Manrope', sans-serif;
}
.marketing-page .btn:not(.secondary) { background: var(--accent); }
.marketing-page .btn:not(.secondary):hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.marketing-page .btn.secondary {
  background: transparent; border: 1.5px solid var(--border); color: var(--ink);
}
.marketing-page .btn.secondary:hover { border-color: var(--ink); }

/* ── Nav: always dark, regardless of which band it's sitting on top of ── */
.marketing-nav {
  position: sticky; top: 0; z-index: 40; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
  background: #0d0a07;
}
.marketing-nav-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-mark { display: inline-flex; align-items: center; text-decoration: none; }
.brand-mark-logo { height: 30px; width: auto; display: block; }
.marketing-nav-links { display: flex; align-items: center; gap: 26px; }
.marketing-nav-links a { color: #e4dbcd; text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color .15s; }
.marketing-nav-links a:hover { color: #fff; }
.marketing-nav-right { gap: 18px; }
.marketing-nav-login { color: #e4dbcd; text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color .15s; }
.marketing-nav-login:hover { color: #fff; }
.marketing-nav-cta {
  appearance: none; border: none; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 13px; text-transform: none; letter-spacing: .01em; padding: 10px 20px; border-radius: 999px;
  text-decoration: none; font-family: 'Manrope', sans-serif; transition: background .15s;
}
.marketing-nav-cta:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
@media (max-width: 760px) { .marketing-nav-links { display: none; } }
@media (max-width: 480px) { .marketing-nav-login { display: none; } }

/* ── Hero: dark band, a real - and *alive* - dining-room photo. The scrim is a directional
   gradient (dark behind the text, opening up toward the right) rather than a flat wash, so
   the photo's own color and motion carry the section instead of hiding behind it. ── */
.hero { position: relative; padding: 128px 20px 80px; overflow: hidden; min-height: 70vh; display: flex; align-items: center; }
.hero-bg {
  position: absolute; inset: -20px; z-index: 0;
  background-image: url('/assets/restaurant.jpg');
  background-size: cover; background-position: center 38%;
  animation: heroZoom 26s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 75% at 50% 45%, rgba(9,7,5,.94) 0%, rgba(9,7,5,.68) 65%, rgba(9,7,5,.5) 100%),
    linear-gradient(0deg, #0d0a07 0%, transparent 25%);
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero-inner {
  position: relative; z-index: 1; width: 100%; max-width: 760px; margin: 0 auto; text-align: center;
}
.marketing-kicker {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero-copy { animation: heroRise .8s cubic-bezier(.16,1,.3,1) both; }
.hero-copy h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; line-height: 1.08; margin: 0 0 22px; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 24px rgba(0,0,0,.4); }
.hero-copy p { font-size: 17.5px; color: #cbbfae; line-height: 1.65; margin: 0 auto 30px; max-width: 540px; }
.hero-checks { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; }
.hero-checks li {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #e4dbcd; font-weight: 500;
  opacity: 0; animation: heroRise .6s ease both; animation-delay: calc(.5s + var(--i, 0) * .1s);
}
.hero-checks li:nth-child(1) { --i: 1; } .hero-checks li:nth-child(2) { --i: 2; } .hero-checks li:nth-child(3) { --i: 3; }
.hero-checks li::before { content: '\2713'; flex: none; color: var(--accent); font-weight: 800; font-size: 13px; }
.marketing-hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.marketing-cta { display: inline-block; margin-top: 0; text-decoration: none; }
.marketing-page .btn:not(.secondary):hover { transform: translateY(-1px); }
@keyframes heroRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  .hero-copy, .hero-checks li { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Scroll reveal: below-the-fold sections fade + rise once as they enter the viewport
   (see the IntersectionObserver in _marketing.php). Short travel, quick, no bounce - a nudge
   of life on scroll, not a slideshow. ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.features-grid .feature-card:nth-child(1) { transition-delay: 0ms; }
.features-grid .feature-card:nth-child(2) { transition-delay: 60ms; }
.features-grid .feature-card:nth-child(3) { transition-delay: 120ms; }
.features-grid .feature-card:nth-child(4) { transition-delay: 180ms; }
.features-grid .feature-card:nth-child(5) { transition-delay: 240ms; }
.marketing-steps-grid .step:nth-child(1) { transition-delay: 0ms; }
.marketing-steps-grid .step:nth-child(2) { transition-delay: 80ms; }
.marketing-steps-grid .step:nth-child(3) { transition-delay: 160ms; }
.blog-teaser-grid .blog-card:nth-child(1) { transition-delay: 0ms; }
.blog-teaser-grid .blog-card:nth-child(2) { transition-delay: 80ms; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }

.photo-band-inner {
  max-width: 1120px; margin: 0 auto; padding: 90px 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.photo-band-media { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.photo-band-media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.16,1,.3,1); }
@media (hover: hover) { .photo-band-media:hover img { transform: scale(1.06); } }
.photo-band-text h2 { font-weight: 800; font-size: 32px; margin: 0 0 16px; line-height: 1.25; letter-spacing: -.01em; }
.photo-band-text p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; margin: 0; max-width: 420px; }

.marketing-features { scroll-margin-top: 90px; }
.features-inner { max-width: 1120px; margin: 0 auto; padding: 90px 20px; }
.features-head { max-width: 620px; margin: 0 0 50px; }
.features-head h2 { font-size: 34px; font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; border: none; color: var(--accent); display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.steps-inner { max-width: 1120px; margin: 0 auto; padding: 90px 20px; }
.marketing-steps-title { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 48px; }
.marketing-steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.step { text-align: center; padding: 0 8px; }
.step-num {
  width: 36px; height: 36px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 15px; color: #fff;
  background: var(--accent); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
@media (hover: hover) { .step:hover .step-num { transform: scale(1.15); } }
.step h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; }
.step p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── Closing CTA: one more dark, flat, full-width panel before the footer ── */
.cta-band { padding: 72px 20px; text-align: center; }
.cta-band-inner { max-width: 620px; margin: 0 auto; }
.cta-band h2 { color: #fff; font-size: 32px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
.cta-band p { color: rgba(255,255,255,.72); font-size: 15.5px; margin: 0 0 30px; }
.cta-band-btn { background: var(--accent); color: #fff; font-weight: 700; }
.cta-band-btn:hover { background: color-mix(in srgb, var(--accent) 88%, white); }

.marketing-footer { padding: 56px 20px 40px; }
.marketing-footer-inner {
  max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--border); margin-bottom: 22px;
}
.footer-brand-col { max-width: 320px; }
.footer-brand-mark { margin-bottom: 12px; }
.footer-brand-mark .brand-mark-logo { height: 26px; }
.footer-tagline { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: 13px; font-weight: 600; transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { max-width: 1000px; margin: 20px auto 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.marketing-footer p { font-size: 12.5px; color: var(--ink-soft); margin: 0; }
.marketing-footer code { background: var(--card); color: var(--ink-soft); padding: 2px 6px; border-radius: 4px; }
.footer-copyright { font-size: 12px; color: var(--ink-soft); margin: 0; }

/* ── Cookie consent banner: shared across marketing/blog/signup/verify pages (see
   public/_cookie_banner.php) - hidden until JS decides there's no stored consent yet,
   then slides up from the bottom. Uses the same --card/--border/--ink tokens as
   everything else, so it's themed correctly whether it lands on a marketing-page or an
   auth-page background. ── */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: -200px; z-index: 200;
  max-width: 640px; margin: 0 auto; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 20px 44px -20px rgba(19,18,26,.35);
  padding: 18px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  transition: bottom .35s ease;
}
.cookie-banner.show { bottom: 16px; }
.cookie-banner-text { flex: 1; min-width: 220px; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.cookie-banner-text a { color: var(--accent); font-weight: 600; }
.cookie-banner-actions { display: flex; gap: 10px; flex: none; }

@media (max-width: 860px) {
  .photo-band-inner { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .photo-band-text p { margin-left: auto; margin-right: auto; }
  .features-head { text-align: center; margin-left: auto; margin-right: auto; }
}
@media (max-width: 480px) {
  .cta-band { padding: 48px 20px; }
  .cta-band h2 { font-size: 26px; }
}

/* ══════════════════════════════════════════════════════════════
   Admin panel responsiveness (topbar, forms, modals, tables, buttons)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .topbar-toggle { display: flex; }
  .topbar-collapse {
    display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--admin-topbar-bg);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 16px 18px;
    box-shadow: 0 16px 30px rgba(0,0,0,.28); z-index: 100; max-height: calc(100vh - 56px); overflow-y: auto;
  }
  .topbar-collapse.show { display: flex; }
  .admin-topbar nav { flex-direction: column; gap: 2px; }
  .admin-topbar nav a { padding: 10px 10px; }
  .admin-topbar .user {
    flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 8px; padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.12); width: 100%;
  }
  .admin-topbar .user .waiter-bell { align-self: flex-start; }
}

@media (max-width: 700px) {
  .admin-main { padding: 18px 14px 48px; }
  .settings-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .settings-tabs .tab-btn { flex: none; }
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .admin-card { padding: 16px 16px; }
  h1 { font-size: 19px; }
  .admin-card-head { flex-wrap: wrap; gap: 10px; }
  .page-head-row .btn { width: 100%; justify-content: center; }
  .page-head-row { align-items: stretch; }
  .page-head-row > div { width: 100%; }
}

/* Buttons: stack cleanly (full-width, evenly spaced) instead of cramming/wrapping mid-row */
@media (max-width: 480px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; text-align: center; justify-content: center; display: flex; align-items: center; }
  .quick-actions { flex-direction: column; align-items: stretch; }
  .quick-actions .btn { width: 100%; justify-content: center; }
  .modal-overlay { padding: 12px; align-items: flex-start; }
  .modal { padding: 18px 16px; border-radius: 12px; margin-top: 10px; }
  .modal-head h2 { font-size: 16px; }
  .currency-choice { min-width: 100%; }
  .dataTables_wrapper .dataTables_filter label { justify-content: flex-start; width: 100%; }
  .dataTables_wrapper .dataTables_filter input { flex: 1; width: auto; }
  .dt-top, .dt-bottom { justify-content: flex-start; }
  .active-call-row { flex-wrap: wrap; }
  .active-call-bar { order: 3; flex-basis: 100%; }
}

/* Tables: always horizontally scrollable, never collapse buttons onto their own lines */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.table-responsive table.admin-table,
table.admin-table.dataTable {
  min-width: 560px;
}
table.admin-table td, table.admin-table th { white-space: nowrap; }
table.admin-table td.wrap-cell { white-space: normal; }

/* ── First-login guided tour (see public/assets/tour.js) ── */
.mv-tour-highlight {
  position: relative !important;
  z-index: 10000 !important;
  border-radius: 8px;
  box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(15, 15, 20, .55);
}
.mv-tour-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(15, 15, 20, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mv-tour-bubble {
  position: fixed; z-index: 10001; background: #fff; border-radius: 12px; padding: 18px 20px;
  width: 300px; max-width: calc(100vw - 28px); box-shadow: 0 12px 32px rgba(0,0,0,.3);
  font-size: 13.5px; line-height: 1.55;
}
.mv-tour-bubble.mv-tour-centered { position: static; width: 380px; max-width: calc(100vw - 40px); text-align: center; }
.mv-tour-count { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.mv-tour-bubble h3 { margin: 0 0 6px; font-size: 16px; }
.mv-tour-bubble p { margin: 0 0 16px; color: var(--ink-soft); }
.mv-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mv-tour-bubble.mv-tour-centered .mv-tour-actions { justify-content: center; }
.mv-tour-nav { display: flex; gap: 8px; }
