
:root {
  color-scheme: dark;
  --bg-canvas: linear-gradient(165deg, #060C1E 0%, #091128 52%, #050916 100%);
  --bg-solid: #060C1E;
  --aurora-blue: rgba(37, 99, 235, 0.22);
  --aurora-gold: rgba(245, 184, 46, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.065);
  --glass-bg-hover: rgba(255, 255, 255, 0.095);
  --glass-bg-elevated: rgba(11, 20, 48, 0.88);
  --glass-border: rgba(147, 197, 253, 0.16);
  --glass-border-strong: rgba(245, 184, 46, 0.34);
  --input-bg: rgba(7, 15, 38, 0.72);
  --input-border: rgba(147, 197, 253, 0.22);
  --sidebar-bg: rgba(7, 13, 34, 0.88);
  --topbar-bg: rgba(6, 12, 30, 0.76);
  --table-head-bg: rgba(15, 37, 99, 0.32);
  --row-border: rgba(147, 197, 253, 0.1);
  --row-hover: rgba(37, 99, 235, 0.12);
  --hero-surface: linear-gradient(135deg, #091438 0%, #0F2563 55%, #193B8E 100%);
  --gold-gradient: linear-gradient(135deg, #FFE074 0%, #FFD24C 50%, #F5B82E 100%);
  --gold-ink: #060C1E;
  --gold-accent: #F5B82E;
  --ink: #F8FAFF;
  --ink-muted: #A4B4D8;
  --ink-subtle: #7B8DB5;
  --emerald: #34D399;
  --emerald-bg: rgba(52, 211, 153, 0.14);
  --warning: #FBBF24;
  --warning-bg: rgba(251, 191, 36, 0.14);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.14);
  --sapphire: #60A5FA;
  --sapphire-bg: rgba(96, 165, 250, 0.14);
  --shadow-card: 0 18px 42px rgba(2, 6, 20, 0.42);
  --shadow-gold: 0 10px 26px rgba(245, 184, 46, 0.25);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: linear-gradient(165deg, #F2F6FF 0%, #F4F5FA 52%, #EDF1FA 100%);
  --bg-solid: #F2F6FF;
  --aurora-blue: rgba(37, 99, 235, 0.09);
  --aurora-gold: rgba(245, 184, 46, 0.09);
  --glass-bg: rgba(255, 255, 255, 0.86);
  --glass-bg-hover: rgba(255, 255, 255, 0.96);
  --glass-bg-elevated: rgba(255, 255, 255, 0.96);
  --glass-border: rgba(10, 19, 44, 0.09);
  --glass-border-strong: rgba(217, 155, 22, 0.35);
  --input-bg: rgba(255, 255, 255, 0.94);
  --input-border: rgba(15, 37, 99, 0.18);
  --sidebar-bg: rgba(255, 255, 255, 0.88);
  --topbar-bg: rgba(242, 246, 255, 0.84);
  --table-head-bg: rgba(15, 37, 99, 0.05);
  --row-border: rgba(10, 19, 44, 0.07);
  --row-hover: rgba(15, 37, 99, 0.04);
  --hero-surface: linear-gradient(135deg, #091438 0%, #0F2563 55%, #193B8E 100%);
  --gold-accent: #C7890A;
  --ink: #0A132C;
  --ink-muted: #4A5775;
  --ink-subtle: #64748B;
  --emerald: #059669;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --warning: #B45309;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #DC2626;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --sapphire: #1D4ED8;
  --sapphire-bg: rgba(37, 99, 235, 0.12);
  --shadow-card: 0 14px 34px rgba(10, 19, 44, 0.08);
  --shadow-gold: 0 10px 24px rgba(245, 184, 46, 0.24);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-canvas);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body::before, body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, var(--aurora-blue) 0%, transparent 72%);
}
body::after {
  top: -120px;
  right: -140px;
  background: radial-gradient(circle, var(--aurora-gold) 0%, transparent 72%);
}

a { color: var(--sapphire); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

.tabular, .kpi-value, .mono, td.num, th.num {
  font-variant-numeric: tabular-nums;
}
.mono {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* ── Login View ───────────────────────────────────────────────────────────── */
.login-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  position: relative;
  overflow: hidden;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--hero-surface);
  border: 1px solid rgba(255, 224, 116, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(15, 37, 99, 0.35);
}

.brand-mark-sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-card p.lead {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 15px;
  background: var(--gold-gradient);
  color: var(--gold-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.14s ease, filter 0.14s ease;
  text-decoration: none !important;
}
.btn-google:hover { transform: translateY(-1px); filter: brightness(1.03); }

.login-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--row-border);
  font-size: 12.5px;
  color: var(--ink-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ── App Shell ────────────────────────────────────────────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-section-label {
  padding: 6px 12px 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

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

.nav-btn.active {
  background: linear-gradient(135deg, rgba(255, 210, 76, 0.18) 0%, rgba(37, 99, 235, 0.22) 100%);
  border-color: var(--glass-border-strong);
  color: var(--ink);
  font-weight: 700;
}

.nav-btn.active svg {
  color: var(--gold-accent);
  opacity: 1;
}

.nav-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 184, 46, 0.2);
  color: var(--gold-accent);
  font-variant-numeric: tabular-nums;
}

.sidebar-foot {
  padding: 12px 10px 4px;
  border-top: 1px solid var(--row-border);
  font-size: 12px;
  color: var(--ink-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rate-ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  font-weight: 700;
}

.content-body {
  padding: 22px 26px 40px;
  max-width: 1460px;
  width: 100%;
  margin: 0 auto;
}

/* ── Glass Cards, Hero & KPI Grids ────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  margin-bottom: 18px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.hero-navy {
  background: var(--hero-surface);
  border: 1px solid rgba(255, 224, 116, 0.28);
  color: #F8FAFF;
  position: relative;
  overflow: hidden;
}

.hero-navy .kpi-label,
.hero-navy .card-subtitle,
.hero-navy .muted-on-hero {
  color: #C7D7F6;
}

.hero-watermark {
  position: absolute;
  right: 14px;
  top: -8px;
  width: 140px;
  height: 140px;
  opacity: 0.08;
  pointer-events: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-card.kpi-gold {
  border-color: var(--glass-border-strong);
  background: linear-gradient(155deg, rgba(245, 184, 46, 0.14) 0%, var(--glass-bg) 72%);
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.kpi-sub {
  font-size: 12px;
  color: var(--ink-subtle);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.split-pos {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

/* ── Buttons, Sub-tabs, Inputs ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.14s ease, border-color 0.14s ease;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }

.btn-gold {
  background: var(--gold-gradient);
  color: var(--gold-ink);
  box-shadow: var(--shadow-gold);
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
}

.btn-ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { background: var(--glass-bg-hover); }

.btn-emerald {
  background: var(--emerald-bg);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--emerald);
}

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }

.subtabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.subtab-btn {
  padding: 9px 15px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.subtab-btn.active {
  background: var(--gold-gradient);
  color: var(--gold-ink);
  box-shadow: 0 4px 12px rgba(245, 184, 46, 0.25);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.span-full { grid-column: 1 / -1; }

.field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}

.input, .select, .textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(245, 184, 46, 0.16);
}

.select option {
  background: var(--bg-solid);
  color: var(--ink);
}

.input-sm, .select-sm {
  padding: 7px 10px;
  font-size: 12.5px;
  border-radius: 10px;
  width: auto;
  min-width: 120px;
}

/* ── Tables & Badges ──────────────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--row-border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data-table th {
  background: var(--table-head-bg);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: 11px 12px;
  white-space: nowrap;
}

table.data-table td {
  padding: 11px 12px;
  border-top: 1px solid var(--row-border);
  vertical-align: middle;
}

table.data-table tbody tr:hover {
  background: var(--row-hover);
}

table.data-table th.num,
table.data-table td.num {
  text-align: right;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-emerald { background: var(--emerald-bg); color: var(--emerald); }
.badge-amber { background: var(--warning-bg); color: var(--warning); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-sapphire { background: var(--sapphire-bg); color: var(--sapphire); }
.badge-gold { background: rgba(245, 184, 46, 0.22); color: var(--gold-accent); }
.badge-neutral { background: rgba(148, 163, 184, 0.16); color: var(--ink-muted); }

/* ── Reserve Coverage Meter ───────────────────────────────────────────────── */
.meter-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin: 10px 0 6px;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34D399 0%, #60A5FA 100%);
  transition: width 0.35s ease;
}
.meter-fill.deficit {
  background: linear-gradient(90deg, #F87171 0%, #FBBF24 100%);
}

/* ── Queue Cards ──────────────────────────────────────────────────────────── */
.outlet-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.outlet-stat-chip {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.12s ease;
}
.outlet-stat-chip:hover { border-color: var(--glass-border-strong); transform: translateY(-1px); }
.outlet-stat-chip.active {
  border-color: var(--gold-accent);
  background: linear-gradient(145deg, rgba(245, 184, 46, 0.14), var(--glass-bg));
}

/* ── Modals & Slide-Over Detail Drawer ────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 22, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--glass-bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.modal-card.modal-wide { max-width: 800px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--row-border);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 22, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: flex-end;
  z-index: 90;
}

.drawer-panel {
  width: min(500px, 100vw);
  height: 100%;
  overflow-y: auto;
  background: var(--glass-bg-elevated);
  border-left: 1px solid var(--glass-border);
  padding: 24px;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  font-size: 13px;
  padding: 14px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--row-border);
}
.detail-kv .k { color: var(--ink-muted); font-weight: 600; }
.detail-kv .v { color: var(--ink); font-weight: 700; word-break: break-word; }

.wa-preview {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  border-radius: 14px;
  background: var(--input-bg);
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 12.5px;
  line-height: 1.55;
  max-height: 290px;
  overflow-y: auto;
}

.error-msg {
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.info-banner {
  background: var(--sapphire-bg);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 13px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--hero-surface);
  color: #F8FAFF;
  border: 1px solid rgba(255, 224, 116, 0.45);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(2, 6, 20, 0.55);
}

.loading-strip {
  height: 3px;
  width: 100%;
  background: rgba(96, 165, 250, 0.14);
  overflow: hidden;
  border-radius: 999px;
}
.loading-strip > div {
  height: 100%;
  width: 36%;
  background: var(--gold-gradient);
  border-radius: 999px;
  animation: amaniBar 1.1s ease-in-out infinite;
}
@keyframes amaniBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(300%); }
}

.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

.docs-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.docs-chip:hover {
  border-color: var(--glass-border-strong);
  background: var(--glass-bg-hover);
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.perm-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--input-bg);
  border: 1px solid var(--row-border);
  font-size: 12.5px;
  cursor: pointer;
}
.perm-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold-accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.perm-check .perm-grp {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sapphire);
}

.field-hint {
  font-size: 11.5px;
  color: var(--ink-subtle);
}

@media (max-width: 1080px) {
  .split-pos { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .mobile-menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 22, 0.6);
    z-index: 35;
  }
  .content-body { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

@media print {
  body::before, body::after, .sidebar, .topbar, .toast, #modalBackdrop, #drawerBackdrop {
    display: none !important;
  }
  html, body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .card, .hero-navy {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: none !important;
  }
  body.print-receipt #appShell { display: none !important; }
  body.print-receipt #waModalBackdrop {
    position: static !important;
    display: block !important;
    background: #FFFFFF !important;
    padding: 0 !important;
  }
  body.print-receipt #waModalBackdrop .modal-card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    max-width: 100% !important;
  }
  body.print-receipt #waModalBackdrop .btn,
  body.print-receipt #waModalBackdrop .form-grid {
    display: none !important;
  }
  body.print-receipt .wa-preview {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1px solid #94A3B8 !important;
    max-height: none !important;
  }
}
