/* Inter font loaded via inter.css */

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f5;
  --panel: #ffffff;
  --ink: #09090b;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --primary: #18181b;
  --primary-dark: #09090b;
  --primary-light: #f4f4f5;
  --primary-fg: #ffffff;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warn: #f59e0b;
  --warn-bg: #fffbeb;
  --ok: #16a34a;
  --ok-bg: #f0fdf4;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --navy: #09090b;
  --navy2: #18181b;
  --shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.03);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.07);
  --radius: 8px;
  --radius-sm: 6px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #18181b;
  --ink: #fafafa;
  --muted: #a1a1aa;
  --line: #27272a;
  --line-strong: #3f3f46;
  --primary: #ffffff;
  --primary-dark: #f4f4f5;
  --primary-light: #27272a;
  --primary-fg: #09090b;
  --danger: #ef4444;
  --danger-bg: #450a0a;
  --warn: #f59e0b;
  --warn-bg: #451a03;
  --ok: #22c55e;
  --ok-bg: #052e16;
  --info: #3b82f6;
  --info-bg: #172554;
  --navy: #fafafa;
  --navy2: #27272a;
  --shadow: 0 4px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.7);
  --radius: 8px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

/* ── SHELL ── */
.admin-shell {
  display: grid;
  grid-template-columns: 228px 1fr;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns .25s ease;
}

.admin-shell.collapsed {
  grid-template-columns: 0px 1fr;
}

.admin-shell.collapsed .sidebar {
  overflow: hidden;
  border-right: none;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

/* hamburger toggle */
.sidebar-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 7px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: absolute;
  top: 18px;
  right: 18px;
  transition: background .15s;
}
.sidebar-toggle:hover { background: var(--primary-light); border-color: rgba(15,118,110,.25); }
.sidebar-toggle span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: background .15s;
}
.sidebar-toggle:hover span { background: var(--primary); }

/* floating re-open button when collapsed */
.sidebar-open-btn {
  display: none;
  position: fixed;
  top: 18px;
  left: 16px;
  z-index: 200;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 8px 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.admin-shell.collapsed ~ .sidebar-open-btn,
.admin-shell.collapsed + .sidebar-open-btn { display: flex; }
.sidebar-open-btn span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
}

.sidebar-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.logo-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}

.logo-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.4px;
}

.sidebar-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 2px 9px;
  border-radius: 99px;
}

.sidebar-nav {
  padding: 14px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: all .15s;
  user-select: none;
  border: 1px solid transparent;
}

.nav-item:hover { background: var(--bg); color: var(--ink); }

.nav-item.active {
  background: var(--primary);
  color: var(--primary-fg) !important;
  font-weight: 700;
  border-color: var(--primary);
}

.nav-icon { display: none; }
.nav-label { flex: 1; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--line);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.user-avatar {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.user-role { font-size: 11px; color: var(--muted); }

.logout-btn {
  display: block;
  width: 100%;
  padding: 9px;
  text-align: center;
  background: rgba(185,28,28,.12);
  border: 1px solid rgba(185,28,28,.25);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.logout-btn:hover { background: rgba(185,28,28,.22); }

/* ── MAIN ── */
.main-content {
  overflow-y: auto;
  background: var(--bg);
}

.content-section { display: none; padding: 28px; animation: fadeUp .22s ease; }
.content-section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--ink);
}

.page-header p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.primary::after { background: var(--primary); }
.stat-card.success::after { background: var(--ok); }
.stat-card.warn::after    { background: var(--warn); }
.stat-card.info::after    { background: var(--info); }
.stat-card.danger::after  { background: var(--danger); }

.stat-icon  { font-size: 22px; margin-bottom: 12px; display: block; }
.stat-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 900; letter-spacing: -.8px; color: var(--ink); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ── LAYOUT ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

/* ── PANEL ── */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title    { font-size: 14px; font-weight: 800; color: var(--ink); }
.panel-subtitle { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.panel-body     { padding: 18px 20px; }

/* ── BAR CHART ── */
.chart-area {
  height: 190px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 4px;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.chart-bar {
  width: 100%;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(to top, var(--primary-dark), var(--primary));
  transition: height .7s cubic-bezier(.34,1.56,.64,1);
  min-height: 4px;
}

.chart-bar:hover { filter: brightness(1.1); transform: scaleY(1.02); transform-origin: bottom; }
.chart-bar-label { font-size: 10px; color: var(--muted); white-space: nowrap; }

.chart-val {
  position: absolute;
  bottom: 100%;
  margin-bottom: 5px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  font-size: 11px;
  font-weight: 800;
  background: var(--navy);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.chart-val::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--navy) transparent transparent transparent;
}
.chart-bar-wrap.show-val .chart-val {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── LEADERBOARD ── */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.leaderboard-row:last-child { border-bottom: none; }

.leaderboard-rank {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.leaderboard-rank.gold { background: #fef9c3; color: #a16207; }
.leaderboard-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.leaderboard-sub  { font-size: 11px; color: var(--muted); }
.leaderboard-val  { font-size: 13px; font-weight: 700; color: var(--primary); }

/* ── METHOD BARS ── */
.method-grid { display: grid; gap: 12px; }

.method-row { display: flex; align-items: center; gap: 12px; }
.method-label { width: 76px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: capitalize; }

.method-bar-track {
  flex: 1; height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.method-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width .8s cubic-bezier(.34,1.56,.64,1);
}

.method-val { font-size: 12px; font-weight: 700; color: var(--ink); width: 90px; text-align: right; }

/* ── DATA TABLE ── */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.data-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.badge-manager  { background: var(--primary-light); color: var(--primary-dark); }
.badge-cashier  { background: var(--warn-bg); color: var(--warn); }
.badge-waiter   { background: var(--ok-bg); color: var(--ok); }
.badge-active   { background: var(--ok-bg); color: var(--ok); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg); color: var(--ink); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── TOOLBAR ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

/* ── FORM ELEMENTS ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-input, .form-select {
  padding: 10px 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  transition: all .15s;
  outline: none;
  width: 100%;
}

.form-input::placeholder { color: var(--muted); }
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}

.search-wrap .form-input { padding-left: 34px; }

.form-grid { display: grid; gap: 14px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeUp .18s ease;
}

.modal-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  width: min(500px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-title { font-size: 16px; font-weight: 800; color: var(--ink); }

.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: all .15s;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ── COLOR SWATCH ── */
.color-swatch {
  display: inline-block;
  width: 13px; height: 13px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 7px;
  border: 1px solid rgba(0,0,0,.1);
}

/* ── EMPTY STATE ── */
.empty-state { padding: 56px 32px; text-align: center; color: var(--muted); }
.empty-state-icon { font-size: 36px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* ── LOADING ── */
.loading-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 22px; right: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .28s cubic-bezier(.34,1.56,.64,1);
}

.toast.success { background: var(--ok-bg); border: 1px solid #bbf7d0; color: var(--ok); }
.toast.error   { background: var(--danger-bg); border: 1px solid #fecaca; color: var(--danger); }
.toast.info    { background: var(--info-bg); border: 1px solid #bae6fd; color: var(--info); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .admin-shell {
    display: block;
    height: 100vh;
    overflow: hidden;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 250px;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    border-right: none;
  }
  .admin-shell.collapsed .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar-open-btn {
    display: flex;
    z-index: 900;
  }
  .admin-shell:not(.collapsed) .sidebar-open-btn {
    display: none;
  }

  .main-content { 
    height: 100vh;
    overflow: auto;
    padding-top: 60px;
  }
  
  .content-section { padding: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  
  .data-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}


/* ── WhatsApp Promotions ─────────────────────────────────────────────────── */
.promo-consent-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #854d0e;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.promo-message-editor { min-height: 230px; resize: vertical; line-height: 1.55; white-space: pre-wrap; }
.promo-hint { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.promo-hint code { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.promo-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.promo-customer-toolbar { display: grid; gap: 10px; margin-bottom: 12px; }
.promo-select-all { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.promo-customer-list { max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.promo-customer-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.promo-customer-row:last-child { border-bottom: 0; }
.promo-customer-row:hover { background: var(--bg); }
.promo-customer-row.invalid { opacity: .55; cursor: not-allowed; }
.promo-customer-row input { width: 16px; height: 16px; }
.promo-customer-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.promo-customer-info strong { font-size: 13px; }
.promo-customer-info span { color: var(--muted); font-size: 12px; }
.promo-queue-panel { margin-bottom: 24px; }
.promo-queue-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.promo-queue-row:last-child { border-bottom: 0; }
.promo-queue-phone { color: var(--muted); font-size: 12px; margin-top: 3px; }
@media (max-width: 900px) { .promo-grid { grid-template-columns: 1fr; } }


/* ── APK admin mobile hardening ──────────────────────────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }
.admin-shell, .main-content, .content-section { min-width: 0; max-width: 100%; }
@media (max-width: 860px) {
  .sidebar { width: min(86vw, 320px); max-width: 320px; }
  .main-content { width: 100%; max-width: 100vw; }
  .content-section { width: 100%; max-width: 100%; overflow-x: hidden; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .page-header { gap: 12px; align-items: flex-start; }
  .page-header, .panel, .two-col, .promo-grid { min-width: 0; max-width: 100%; }
  .panel-body { min-width: 0; overflow-x: auto; }
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; }
}

/* Mobile records, marketing actions, and dialogs. */
@media (max-width: 860px) {
  .page-header, .panel-header, .promo-queue-row { flex-wrap: wrap; gap: 12px; }
  .page-header > div, .panel-header > div, .panel-body > div { min-width: 0; }
  .page-header > div:last-child { flex-wrap: wrap; }
  .data-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .promo-sms-layout { grid-template-columns: minmax(0, 1fr) !important; }
  #promoSmsSendBtn { width: 100%; white-space: normal; }
  .promo-hint, #promoSmsStatus, .promo-customer-info { overflow-wrap: anywhere; }
  .promo-actions > button { flex: 1 1 180px; white-space: normal; }
  .modal-box { max-width: 100%; max-height: 90dvh; overflow-y: auto; }
  .form-input, .form-select, .form-textarea { min-width: 0; max-width: 100%; }
}

/* Reserve space inside the chart panel for tapped price labels. */
.chart-area { box-sizing:border-box;padding-top:42px; }
.chart-bar-wrap { min-width:0; }
.chart-val { max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;text-align:center; }
