/* ============================================================
   Urban Air Operator Portal · Quiet Modern (Option C)
   Vanilla CSS, no build step. All tokens at :root.
   ============================================================ */

:root {
  --paper:        #f5f6f8;   /* page canvas, cool gray */
  --surface:      #ffffff;
  --ink:          #0e1014;   /* primary text, key cells, brand mark */
  --ink-2:        #2c303a;   /* body, secondary text */
  --mute:         #5b6270;   /* meta */
  --mute-2:       #8d96a4;   /* placeholder, disabled */
  --rule:         #e3e6ec;   /* hairline borders */
  --rule-soft:    #eef0f4;   /* row separators */
  --accent:       #1d5258;   /* deep teal — used ONLY for active state ledge + brand dot */
  --accent-soft:  #d3e1e2;   /* tinted fills for active rows */
  --pos:          #2f6c4a;   /* positive trend (KPI / status) */
  --pos-strong:   #1f7a3f;   /* positive trend (dense data table cells) */
  --pos-bg:       #e6f0e9;
  --neg:          #963c30;   /* negative trend (KPI / status) */
  --neg-strong:   #b8341d;   /* negative trend (dense data table cells) */
  --neg-bg:       #f5e3df;

  --font:    'DM Sans', system-ui, sans-serif;
  --mono:    'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm:    6px;
  --r:       8px;
  --r-card:  12px;
}

/* RESET ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* LAYOUT ---------------------------------------------------- */
.portal-root { display: flex; height: 100vh; }
.sidebar {
  width: 248px; min-width: 248px;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; min-height: 56px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center;
  padding: 0 32px; gap: 18px;
}
.page-content { flex: 1; overflow-y: auto; padding: 32px; }

/* SIDEBAR --------------------------------------------------- */
.sb-logo { padding: 20px 22px 14px; display: flex; align-items: center; gap: 12px; }
.sb-logo-icon {
  width: 34px; height: 34px;
  background: var(--ink); color: var(--surface);
  border-radius: var(--r);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: -0.01em;
  flex-shrink: 0;
  position: relative;
}
.sb-logo-icon::after {
  content: ""; position: absolute;
  bottom: -2px; right: -2px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.sb-logo-text { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; }
.sb-logo-text small {
  display: block; margin-top: 3px;
  font-family: var(--mono); font-size: 10px; font-weight: 400;
  color: var(--mute);
  letter-spacing: 0.06em;
}

.sb-park-switcher { margin: 4px 14px 14px; position: relative; }
.sb-park-btn {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  color: var(--ink-2);
  padding: 9px 12px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-family: inherit;
}
.sb-park-btn:hover { border-color: var(--mute-2); }
.sb-park-btn::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  margin-right: 9px;
  box-shadow: 0 0 0 2px rgba(29, 82, 88, 0.18);
}
.sb-park-btn .arrow { color: var(--mute); font-size: 11px; margin-left: auto; }
.sb-park-dropdown {
  display: none; position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(14, 16, 20, 0.10);
  z-index: 100; overflow: hidden;
}
.sb-park-dropdown.open { display: block; }
.sb-park-option {
  padding: 9px 14px;
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.sb-park-option:hover { background: var(--paper); color: var(--ink); }
.sb-park-option .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.sb-park-option .dot.inactive { background: var(--rule); }

.sb-divider { height: 1px; background: var(--rule); margin: 8px 14px; }

.sb-section-label {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--mute-2);
  padding: 12px 22px 4px;
}

.sb-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 22px;
  color: var(--ink-2);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: background 0.1s, color 0.1s;
}
.sb-nav-item .icon {
  width: 16px; text-align: center;
  font-size: 13px; opacity: 0.6;
  flex-shrink: 0;
}
.sb-nav-item:hover { background: var(--paper); color: var(--ink); }
.sb-nav-item:hover .icon { opacity: 1; }
.sb-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sb-nav-item.active .icon { opacity: 1; color: var(--accent); }

.sb-footer {
  margin-top: auto;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--rule);
}
.sb-user { display: flex; align-items: center; gap: 10px; }
.sb-avatar {
  width: 30px; height: 30px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600; font-size: 14px;
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role {
  font-family: var(--mono); font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.sb-logout {
  font-size: 13px; color: var(--mute);
  cursor: pointer; padding: 3px 7px;
  border-radius: var(--r-sm);
  text-decoration: none;
}
.sb-logout:hover { color: var(--ink); background: var(--paper); }

/* TOPBAR ---------------------------------------------------- */
.tb-park-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.tb-subtitle { font-size: 13px; color: var(--mute); margin-top: 1px; }
.tb-spacer { flex: 1; }
.tb-badge {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 5px 10px;
  display: inline-flex; align-items: center; gap: 8px;
}
.tb-badge::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: var(--pos);
  box-shadow: 0 0 0 3px rgba(47, 108, 74, 0.16);
}
.tb-date {
  font-family: var(--mono); font-size: 12px;
  color: var(--mute);
}

/* PAGE SECTIONS / HEADERS ----------------------------------- */
.page-section { display: none; }
.page-section.active { display: block; }

.section-hdr {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 16px; gap: 14px;
}
.section-title { font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.section-sub { font-size: 14px; color: var(--mute); margin-top: 4px; }

/* KPI / METRIC GRID ---------------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--surface);
  padding: 18px 20px;
  display: grid; gap: 7px;
  border: none;
  border-radius: 0;
  min-width: 0;
}
.kpi-label {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--mute);
}
.kpi-value {
  font-family: var(--mono);
  font-size: 27px; font-weight: 500;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.kpi-sub { font-size: 12.5px; color: var(--mute); line-height: 1.45; }

/* Semantic KPI variants (used for trend coloring; never decorative).
   .green = positive trend (e.g. cumulative sends, growing ZIPs).
   No .orange / .purple — color is reserved for status, not emphasis. */
.kpi-card.green .kpi-value { color: var(--pos); }

/* TABS ------------------------------------------------------ */
.tab-bar {
  display: flex; gap: 2px;
  background: var(--paper);
  padding: 3px;
  border-radius: var(--r);
  border: 1px solid var(--rule);
  margin-bottom: 22px;
  width: fit-content;
}
.tab-btn {
  padding: 7px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--mute);
  cursor: pointer;
  border-radius: var(--r-sm);
  border: none; background: none;
  font-family: inherit;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(14,16,20,0.05); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* EXPORT CARDS ---------------------------------------------- */
.export-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.export-card-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.export-card-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.export-card-meta { font-family: var(--mono); font-size: 12px; color: var(--mute); margin-top: 4px; letter-spacing: 0.04em; }
.export-card-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: var(--r-sm);
  white-space: nowrap; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink-2);
}
.badge-blue, .badge-green, .badge-orange, .badge-purple {
  /* All variants → neutral hairline by default; override with semantic when needed */
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink-2);
}
.badge-green { background: var(--pos-bg); color: var(--pos); border-color: transparent; }
.badge-orange { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* FILTERS --------------------------------------------------- */
.filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-label { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.filter-select {
  font-family: var(--mono); font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-check { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.filter-check input { accent-color: var(--accent); }

/* DATA TABLE ------------------------------------------------ */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-card);
  border: 1px solid var(--rule);
  background: var(--surface);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th {
  background: var(--paper);
  padding: 11px 16px;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--mute);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--rule-soft); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--paper); }
.data-table tbody td {
  padding: 11px 16px;
  font-family: var(--mono); font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data-table tbody td.name { font-family: var(--font); font-weight: 500; color: var(--ink); }
.data-table tbody td.muted { color: var(--mute-2); }
.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-radius: 0 0 var(--r-card) var(--r-card);
  font-family: var(--mono); font-size: 12px; color: var(--mute);
}
.row-count strong { color: var(--ink); font-weight: 500; }

/* BUTTONS --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 14px; font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.btn-primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-accent { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.btn-accent:hover { background: #14393d; border-color: #14393d; }
.btn-outline { background: var(--surface); color: var(--ink-2); border-color: var(--rule); }
.btn-outline:hover { color: var(--ink); border-color: var(--mute-2); box-shadow: 0 1px 2px rgba(14,16,20,0.04); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* REPORTS --------------------------------------------------- */
.reports-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.report-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 22px 24px;
  display: grid; gap: 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.report-card:hover { border-color: var(--mute-2); box-shadow: 0 4px 16px rgba(14,16,20,0.06); }
.report-type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  color: var(--accent);
  background: var(--accent-soft);
  width: fit-content;
}
.badge-pdf { color: var(--neg); background: var(--neg-bg); }
.badge-html { color: var(--accent); background: var(--accent-soft); }
.badge-map { color: var(--pos); background: var(--pos-bg); }
.report-title { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.25; }
.report-desc { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.report-meta { font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: 0.04em; }
.report-actions { display: flex; gap: 8px; margin-top: 6px; }

/* MAP PAGE -------------------------------------------------- */
#map-container {
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--rule);
  height: calc(100vh - 200px);
  min-height: 480px;
  background: var(--surface);
}
#portal-map { width: 100%; height: 100%; }
.map-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.map-layer-btn {
  font-family: var(--font);
  font-size: 13px; font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  background: var(--surface);
  cursor: pointer;
  color: var(--ink-2);
}
.map-layer-btn:hover { border-color: var(--mute-2); color: var(--ink); }
.map-layer-btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ADMIN ----------------------------------------------------- */
.admin-section {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  margin-bottom: 22px;
  overflow: hidden;
}
.admin-section-hdr {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
}
.admin-section-title { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }

/* SMS PLAYS (panel chrome only — content styles in template) */
.sms-play-editor {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  overflow: hidden;
}
.sms-play-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 18px; align-items: start;
  background: var(--surface);
}
.sms-play-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.sms-play-title { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.sms-play-desc { font-size: 14px; color: var(--ink-2); margin-top: 5px; line-height: 1.5; max-width: 620px; }
.sms-play-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sms-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.sms-toggle input { display: none; }
.sms-toggle span {
  width: 38px; height: 22px;
  border-radius: 999px;
  background: var(--rule);
  position: relative;
  transition: background 0.14s;
}
.sms-toggle span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface);
  box-shadow: 0 1px 2px rgba(14,16,20,0.18);
  transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}
.sms-toggle input:checked + span { background: var(--ink); }
.sms-toggle input:checked + span::after { transform: translateX(16px); }
.sms-toggle.small span { width: 32px; height: 18px; }
.sms-toggle.small span::after { width: 12px; height: 12px; }
.sms-toggle.small input:checked + span::after { transform: translateX(14px); }

.sms-config-row { padding: 16px 22px; border-bottom: 1px solid var(--rule-soft); display: flex; align-items: start; gap: 22px; }
.sms-field { display: block; max-width: 280px; }
.sms-field span { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); margin-bottom: 6px; }
.sms-field small { display: block; font-size: 12.5px; color: var(--mute); margin-top: 6px; line-height: 1.45; }
.sms-budget-meter { flex: 1; padding-top: 24px; }
.sms-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 20px 22px; }
.sms-budget-track { height: 6px; background: var(--rule); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.sms-budget-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.sms-forecast-panel { padding: 18px 22px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.sms-forecast-summary { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 14px; }
.sms-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px 22px 24px; }
.sms-step-card { border: 1px solid var(--rule); border-radius: var(--r-card); padding: 16px; background: var(--surface); }
.sms-step-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.sms-step-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.sms-step-meta { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-top: 3px; }
.sms-textarea-label { display: block; font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mute); margin-bottom: 7px; }
.sms-template {
  width: 100%; resize: vertical; min-height: 110px;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  padding: 10px 12px;
  font-family: var(--mono); font-size: 13px; line-height: 1.5;
  color: var(--ink); background: var(--paper);
}
.sms-template:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.sms-template-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: 0.04em; }
.sms-token-hint {
  margin-top: 8px;
  font-size: 12.5px; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 8px 10px; line-height: 1.45;
}
.sms-warning { color: var(--neg) !important; font-weight: 500; }
.sms-ok { color: var(--pos); font-weight: 500; }
.sms-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--rule); background: var(--paper); }
.sms-save-note { font-size: 13px; color: var(--mute); }
.sms-coming-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sms-coming-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 18px; opacity: 0.78; }
.sms-coming-top { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.sms-coming-steps { border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); margin: 14px 0; }
.sms-coming-card button:disabled { cursor: not-allowed; opacity: 0.55; }

/* LOGIN ----------------------------------------------------- */
/* Split-layout product login. Left: form. Right: brand panel.
   Collapses to single column under 860px so it works on phones too. */

.login-body { background: var(--paper); min-height: 100vh; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 5fr) minmax(0, 6fr);
}

.login-form-side {
  display: flex; flex-direction: column;
  padding: 36px 56px 32px;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  min-width: 0;
}

.login-brand {
  display: flex; align-items: center; gap: 12px;
}
.login-form-side .sb-logo-icon {
  width: 36px; height: 36px;
  background: var(--ink); color: var(--surface);
  border-radius: var(--r);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: -0.01em;
  position: relative;
}
.login-form-side .sb-logo-icon::after {
  content: ""; position: absolute;
  bottom: -2px; right: -2px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.login-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.login-brand-name { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.login-brand-sub  { font-family: var(--mono); font-size: 10px; color: var(--mute); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

.login-form-wrap {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 380px;
  width: 100%;
  margin: 32px 0;
}

.login-h1 {
  font-size: 28px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 10px;
}
.login-lede {
  font-size: 14px; line-height: 1.55;
  color: var(--mute); margin-bottom: 28px;
}

.login-form { margin-top: 4px; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px;
  font-family: var(--mono); font-weight: 500;
  color: var(--mute); margin-bottom: 7px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.form-input {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  font-size: 14px; font-family: inherit;
  color: var(--ink); background: var(--surface);
  transition: border-color 0.1s, box-shadow 0.1s;
}
.form-input::placeholder { color: var(--mute-2); }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.login-signin-wrap {
  font-size: 12px; line-height: 1.5;
  color: var(--mute);
  margin: 16px 0 4px;
}
.login-signin-wrap a { color: var(--accent); text-decoration: none; }
.login-signin-wrap a:hover { text-decoration: underline; }

.login-btn {
  width: 100%; padding: 12px;
  background: var(--ink); color: var(--surface);
  border: none; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  margin-top: 12px;
  transition: background 0.12s, transform 0.05s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.login-btn:hover { background: var(--accent); }
.login-btn:active { transform: translateY(1px); }

.login-error {
  background: var(--neg-bg); border: 1px solid var(--neg);
  color: var(--neg);
  font-size: 13px; padding: 10px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 18px;
}

.login-footnote {
  font-size: 13px; color: var(--mute);
  margin-top: 22px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.login-footnote a { color: var(--accent); text-decoration: none; font-weight: 500; }
.login-footnote a:hover { text-decoration: underline; }

.login-legal {
  font-family: var(--mono);
  font-size: 10.5px; line-height: 1.5;
  color: var(--mute);
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.login-legal-tag {
  display: inline-block;
  padding: 3px 7px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 9.5px;
}

/* RIGHT BRAND PANEL ----------------------------------------- */
.login-brand-side {
  position: relative;
  background: var(--ink);
  color: var(--surface);
  padding: 56px 56px 40px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* subtle, low-contrast geometric pattern in deep teal */
.login-brand-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(29, 82, 88, 0.55), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(29, 82, 88, 0.30), transparent 50%);
  pointer-events: none;
}
.login-brand-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 100% 28px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
}

.login-brand-content {
  position: relative;
  display: flex; flex-direction: column; gap: 28px;
  max-width: 480px;
}

.login-brand-tag {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-soft);
  opacity: 0.85;
}

.login-brand-h2 {
  font-size: 30px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.18;
  color: #f7f9fa;
  max-width: 18ch;
}

.login-pillars { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.login-pillars li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  backdrop-filter: blur(2px);
}
.login-pillar-icon {
  font-size: 18px; line-height: 1; color: var(--accent-soft);
  width: 24px; flex: 0 0 auto;
  padding-top: 2px;
}
.login-pillar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.login-pillar-name {
  font-size: 14px; font-weight: 600; color: #f7f9fa;
  letter-spacing: -0.005em;
}
.login-pillar-desc {
  font-size: 12.5px; line-height: 1.45;
  color: rgba(247,249,250,0.65);
}

.login-brand-foot {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  color: rgba(247,249,250,0.55);
  letter-spacing: 0.04em;
  margin-top: auto;
}
.login-brand-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 82, 88, 0.35);
  animation: login-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes login-dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-form-side { padding: 28px 24px 24px; border-right: none; border-bottom: 1px solid var(--rule); }
  .login-brand-side { padding: 36px 24px 32px; min-height: 280px; }
  .login-brand-h2 { font-size: 22px; }
  .login-form-wrap { margin: 20px 0 28px; max-width: 100%; }
}

/* DASHBOARD EXTRAS ----------------------------------------- */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 28px; }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 22px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 14px; letter-spacing: -0.005em; }
.mini-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mini-bar-label { font-family: var(--mono); font-size: 11px; color: var(--mute); width: 60px; flex-shrink: 0; text-align: right; }
.mini-bar-track { flex: 1; height: 5px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 3px; background: var(--ink); }
.mini-bar-val { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); width: 36px; text-align: right; }
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.stat-row:last-child { border-bottom: none; }
.stat-row-label { font-size: 14px; color: var(--mute); }
.stat-row-val { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink); }
.stat-row-val.up { color: var(--pos); }
.stat-row-val.down { color: var(--neg); }

/* EMPTY / UTILITY ------------------------------------------ */
.empty-state { padding: 48px 20px; text-align: center; color: var(--mute-2); font-size: 14px; }
.empty-state div:first-child { color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }

/* RESPONSIVE GUARD ----------------------------------------- */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .reports-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
}

/* ARIA LANDING ---------------------------------------------- */
/* Public marketing page at /. Dark, brand-forward, distinct from the
   light operator interior. Reuses the same color tokens + brand mark. */
.aria-body {
  background: var(--ink);
  color: #f7f9fa;
  min-height: 100vh;
  /* Override the base `html, body { height: 100% }` from the top of this file —
     without this, body is fixed at viewport height and content beyond 100vh
     scrolls over the light html background, producing a dark→light split. */
  height: auto;
}
.aria-shell { max-width: 1200px; margin: 0 auto; padding: 0 56px; }

.aria-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 0;
}
.aria-mark { display: flex; align-items: center; gap: 12px; }
.aria-mark-text { display: flex; flex-direction: column; line-height: 1.1; }
.aria-name {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  color: #f7f9fa;
}
.aria-tag {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent-soft); opacity: 0.75;
  margin-top: 2px;
}
.aria-body .sb-logo-icon {
  width: 36px; height: 36px;
  background: #f7f9fa; color: var(--ink);
  border-radius: var(--r);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: -0.01em;
  position: relative;
  flex-shrink: 0;
}
.aria-body .sb-logo-icon::after {
  content: ""; position: absolute;
  bottom: -2px; right: -2px;
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.aria-nav-actions { display: flex; align-items: center; gap: 28px; }
.aria-link {
  font-size: 13.5px; color: rgba(247,249,250,0.65);
  text-decoration: none; transition: color 0.12s;
}
.aria-link:hover { color: #f7f9fa; }
.aria-signin {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--accent);
  color: #f7f9fa;
  font-size: 13.5px; font-weight: 500;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background 0.12s, transform 0.05s;
}
.aria-signin:hover { background: #245f66; }
.aria-signin:active { transform: translateY(1px); }

.aria-hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.aria-hero-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 30%, rgba(29, 82, 88, 0.55), transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(29, 82, 88, 0.30), transparent 55%);
  pointer-events: none;
}
.aria-hero-pattern::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 100% 32px;
  mask-image: linear-gradient(to bottom, black 20%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 95%);
}
.aria-hero-content {
  position: relative;
  max-width: 760px;
}

.aria-eyebrow {
  display: inline-block;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-soft); opacity: 0.85;
  margin-bottom: 22px;
}
.aria-h1 {
  font-size: 56px; font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.05;
  color: #f7f9fa;
  margin-bottom: 24px;
}
.aria-lede {
  font-size: 18px; line-height: 1.55;
  color: rgba(247,249,250,0.72);
  max-width: 600px;
  margin-bottom: 36px;
}

.aria-cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.aria-cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  background: #f7f9fa;
  color: var(--ink);
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: transform 0.05s, box-shadow 0.12s;
}
.aria-cta-primary:hover { box-shadow: 0 6px 20px rgba(247,249,250,0.15); }
.aria-cta-primary:active { transform: translateY(1px); }
.aria-cta-ghost {
  display: inline-flex; align-items: center;
  padding: 14px 18px;
  color: rgba(247,249,250,0.85);
  font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}
.aria-cta-ghost:hover { color: #f7f9fa; border-color: rgba(255,255,255,0.4); }

.aria-pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 720px;
  margin: 0 0 36px;
}
.aria-pillar {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 18px 16px 24px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm);
  transition: background 0.15s, border-color 0.15s;
}
.aria-pillar:hover {
  background: rgba(29,82,88,0.18);
  border-color: var(--accent);
}
.aria-pillar-letter {
  font-family: var(--mono);
  font-size: 20px; font-weight: 500;
  color: var(--accent-soft);
  line-height: 1; padding-top: 1px;
  flex-shrink: 0;
  width: 16px; text-align: center;
}
.aria-pillar-body { display: flex; flex-direction: column; gap: 3px; }
.aria-pillar-word {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  color: #f7f9fa;
}
.aria-pillar-sub {
  font-size: 12px; line-height: 1.45;
  color: rgba(247,249,250,0.58);
}

.aria-section {
  padding: 80px 0 72px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.aria-section-quiet { background: rgba(255,255,255,0.025); }
.aria-section-head { margin-bottom: 44px; max-width: 720px; }
.aria-h2 {
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.018em; line-height: 1.2;
  color: #f7f9fa;
  margin-top: 6px;
}

.aria-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.aria-feature {
  padding: 28px 26px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-card);
  transition: border-color 0.15s, background 0.15s;
}
.aria-feature:hover {
  border-color: var(--accent);
  background: rgba(29,82,88,0.16);
}
.aria-feature-icon {
  font-size: 24px; line-height: 1;
  color: var(--accent-soft);
  margin-bottom: 18px;
}
.aria-feature h3 {
  font-size: 16.5px; font-weight: 600;
  color: #f7f9fa;
  letter-spacing: -0.005em;
  margin-bottom: 10px;
}
.aria-feature p {
  font-size: 13.5px; line-height: 1.6;
  color: rgba(247,249,250,0.65);
}

.aria-who {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.aria-who-card {
  padding: 24px 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  background: rgba(255,255,255,0.02);
}
.aria-who-tag {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-soft);
  margin-bottom: 10px;
}
.aria-who-card p {
  font-size: 13.5px; line-height: 1.55;
  color: rgba(247,249,250,0.7);
}

.aria-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 12px;
}
.aria-footer-left { display: flex; align-items: center; gap: 12px; }
.aria-footer-text { display: flex; flex-direction: column; line-height: 1.2; }
.aria-foot-meta {
  font-family: var(--mono); font-size: 10.5px;
  color: rgba(247,249,250,0.5);
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.aria-foot-meta a { color: var(--accent-soft); text-decoration: none; }
.aria-foot-meta a:hover { color: #f7f9fa; }
.aria-footer-right { display: flex; gap: 22px; }

@media (max-width: 900px) {
  .aria-shell { padding: 0 22px; }
  .aria-nav-actions .aria-link { display: none; }
  .aria-h1 { font-size: 36px; }
  .aria-h2 { font-size: 24px; }
  .aria-lede { font-size: 15.5px; }
  .aria-features, .aria-who, .aria-pillars { grid-template-columns: 1fr; }
  .aria-hero { padding: 56px 0 64px; }
  .aria-section { padding: 56px 0; }
}
