@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* Breakpoint ladder — literals, because custom properties are invalid inside
   @media preludes:
     900px — chrome: nav drawer, dashboard grid collapse, modal padding
   Touch treatment keys off (hover: none) and (pointer: coarse), never width —
   a narrow desktop window keeps its hover affordances and shortcut hints. */
:root {
  --bg: #0e0f11;
  --bg-card: #16181c;
  --bg-input: #1c1f24;
  --border: #2a2d35;
  --border-focus: #4a8eff;
  --text: #e4e6ea;
  --text-muted: #8b8f98;
  --text-dim: #5c5f68;
  --accent: #4a8eff;
  --accent-hover: #6ba0ff;
  --accent-subtle: rgba(74, 142, 255, 0.12);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --radius: 8px;
  --radius-sm: 5px;
  --nav-h: 52px;
  /* Resolve to 0px unless the viewport meta carries viewport-fit=cover. */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  font-size: 15px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── NAV ─────────────────────────────────────────────────────────────── */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-t);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 max(1.5rem, env(safe-area-inset-right, 0px)) 0 max(1.5rem, env(safe-area-inset-left, 0px));
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-subtle);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-username {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav-menu-btn {
  display: none;
}

@media (max-width: 900px) {
  .nav-links,
  .nav-username,
  #nav-logout {
    display: none;
  }

  .nav-right {
    flex: 1;
    justify-content: flex-end;
  }

  .nav-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -0.5rem;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
  }

  .nav-menu-icon,
  .nav-menu-icon::before,
  .nav-menu-icon::after {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
  }

  .nav-menu-icon {
    position: relative;
  }

  .nav-menu-icon::before { position: absolute; top: -6px; }
  .nav-menu-icon::after  { position: absolute; top:  6px; }
}

/* ── NAV DRAWER ───────────────────────────────────────────────────────── */
.nav-scrim {
  position: fixed;
  inset: calc(var(--nav-h) + var(--safe-t)) 0 0 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
}

.nav-drawer {
  position: fixed;
  top: calc(var(--nav-h) + var(--safe-t));
  right: 0;
  bottom: 0;
  width: min(280px, 78vw);
  z-index: 101;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 0.75rem max(0.75rem, env(safe-area-inset-right, 0px)) calc(0.75rem + var(--safe-b)) 0.75rem;
  overflow-y: auto;
}

.nav-drawer[hidden],
.nav-scrim[hidden] {
  display: none;
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-drawer-user {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav-drawer-close {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-drawer-link:hover {
  text-decoration: none;
}

.nav-drawer-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

.nav-drawer-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

@media (min-width: 901px) {
  .nav-drawer,
  .nav-scrim {
    display: none !important;
  }
}

/* ── BUTTONS ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-focus);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--accent-subtle);
  color: var(--text);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }

  .btn-sm {
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* ── INPUTS ───────────────────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  color-scheme: dark;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
}

select option {
  background: var(--bg-card);
}

/* Anything under 16px triggers iOS's zoom-on-focus. Keyed to the pointer, not
   the width — a narrow desktop window keeps the tighter 0.9rem type. */
@media (hover: none) and (pointer: coarse) {
  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px;
  }
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.form-group {
  margin-bottom: 1rem;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checkbox-row label {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 400;
}

@media (hover: none) and (pointer: coarse) {
  .checkbox-row {
    min-height: 44px;
  }
  .checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

/* ── TOGGLE SWITCH ────────────────────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.toggle input:checked + .toggle-track {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-track::before {
  transform: translateX(16px);
  background: var(--accent);
}

@media (hover: none) and (pointer: coarse) {
  .toggle {
    width: 44px;
    height: 26px;
  }
  .toggle-track::before {
    width: 20px;
    height: 20px;
  }
  .toggle input:checked + .toggle-track::before {
    transform: translateX(18px);
  }
}

/* ── CARDS ────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ── CHIPS / TAGS ─────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.15s;
  user-select: none;
}

.chip-code {
  background: var(--accent-subtle);
  border-color: rgba(74, 142, 255, 0.35);
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.chip-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.chip-remove:hover {
  opacity: 1;
}

@media (hover: none) and (pointer: coarse) {
  .chip {
    min-height: 32px;
    padding: 0.35rem 0.75rem;
  }
  .chip-remove {
    min-width: 28px;
    min-height: 28px;
    justify-content: center;
  }
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── CHIP INPUT (origins / destinations) ─────────────────────────────── */
.chip-input-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  transition: border-color 0.15s;
}

.chip-input-wrap:focus-within {
  border-color: var(--border-focus);
}

.chip-input-wrap input {
  background: none;
  border: none;
  padding: 0.2rem 0.25rem;
  width: auto;
  flex: 1;
  min-width: 90px;
}

.chip-input-wrap input:focus {
  border: none;
}

/* ── ROUTE SUMMARY ────────────────────────────────────────────────────── */
.route-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.route-arrow {
  color: var(--text-dim);
}

.route-codes {
  color: var(--text);
}

/* ── PROGRESS BAR ─────────────────────────────────────────────────────── */
.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ── MODALS ───────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  padding-bottom: calc(1rem + var(--safe-b));
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  line-height: 1;
}

@media (hover: none) and (pointer: coarse) {
  .modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
}

.modal-close:hover {
  background: var(--accent-subtle);
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .modal {
    padding: 1.25rem;
  }
}

/* ── SPINNER ──────────────────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

.spinner-sm {
  width: 13px;
  height: 13px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── TABLES ───────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

td.mono {
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

@media (hover: hover) {
  tr:hover td {
    background: rgba(255, 255, 255, 0.02);
  }
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── UTILITY ──────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.hidden { display: none !important; }

.btn-block {
  width: 100%;
  justify-content: center;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-muted   { background: var(--bg-input); color: var(--text-muted); }
.badge-accent  { background: var(--accent-subtle); color: var(--accent); }
.badge-danger  { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* ── PAGE WRAPPER ─────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem max(1.5rem, env(safe-area-inset-right, 0px))
           2rem max(1.5rem, env(safe-area-inset-left, 0px));
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.page-head .page-title {
  margin-bottom: 0;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

/* ── EMPTY STATE ──────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ── LOGIN PAGE ───────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
}

@media (max-width: 900px) {
  .login-card {
    padding: 1.75rem 1.25rem;
  }
}

.login-title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 0.35rem;
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── DASHBOARD: SEARCH CARDS ─────────────────────────────────────────── */
.searches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.search-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.search-card-name {
  font-weight: 600;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.search-card-dates {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.search-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.search-card-stats {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.search-card-stats .count {
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text);
}

.search-card-stats .count.has-findings {
  color: var(--success);
}

.search-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.search-card.disabled {
  opacity: 0.6;
}

/* ── DASHBOARD: STAT STRIP ───────────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.stat-tile .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-tile .stat-value {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}

/* ── FLIGHT MARKERS ───────────────────────────────────────────────────── */
.next-day-marker {
  color: var(--warning);
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* ── SETTINGS ─────────────────────────────────────────────────────────── */
.settings-form {
  max-width: 560px;
}

.ntfy-hint {
  background: var(--accent-subtle);
  border: 1px solid rgba(74, 142, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.ntfy-hint code {
  font-family: var(--font-mono);
  background: var(--bg-input);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  color: var(--text);
}

.settings-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.save-status {
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.budget-card {
  max-width: 560px;
}

/* ── PROMPT CARD (natural-language alert) ────────────────────────────── */
.prompt-card textarea {
  resize: vertical;
  min-height: 3.2rem;
  font-family: var(--font);
}

/* ── HISTORY PAGE ─────────────────────────────────────────────────────── */
.chart-head {
  margin-bottom: 0.5rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
}

#fare-chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.route-row:hover td {
  background: var(--accent-subtle);
}
