/* =====================================================================
   Performance AI — Premium Dark Aerospace theme
   live.pancodex.com
   ===================================================================== */

:root {
  color-scheme: dark;

  /* Deep space background */
  --bg-base:        #06080f;
  --bg-deep:        #0a0e1a;
  --bg-elev-1:      #0e1424;
  --bg-elev-2:      #131a2c;
  --bg-elev-3:      #1a2138;

  /* Borders */
  --line:           rgba(148, 163, 184, 0.08);
  --line-strong:    rgba(148, 163, 184, 0.16);
  --line-glow:      rgba(56, 189, 248, 0.30);

  /* Text */
  --text:           #f1f5fb;
  --text-soft:      #c7d0e0;
  --muted:          #8893a8;
  --muted-2:        #5b6478;

  /* Accents — aviation spectrum */
  --sky:            #38bdf8;        /* primary electric blue */
  --sky-soft:       rgba(56, 189, 248, 0.12);
  --sky-glow:       rgba(56, 189, 248, 0.30);
  --indigo:         #818cf8;
  --cyan:           #22d3ee;

  --emerald:        #10b981;
  --emerald-soft:   rgba(16, 185, 129, 0.14);
  --amber:          #f59e0b;
  --amber-soft:     rgba(245, 158, 11, 0.14);
  --rose:           #f43f5e;
  --rose-soft:      rgba(244, 63, 94, 0.14);

  /* Radii */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-2xl:  28px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow:    0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow-sky:  0 0 0 1px rgba(56, 189, 248, 0.20), 0 8px 24px rgba(56, 189, 248, 0.12);

  /* Fonts */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* =====================================================================
   Reset & base
   ===================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 700px at 0% -10%, rgba(56, 189, 248, 0.10), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(129, 140, 248, 0.08), transparent 60%),
    radial-gradient(700px 500px at 50% 100%, rgba(56, 189, 248, 0.04), transparent 60%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  letter-spacing: -0.005em;
}
a { color: var(--sky); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--cyan); }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
code, pre { font-family: var(--font-mono); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
::selection { background: var(--sky-glow); color: var(--text); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.30); }

/* =====================================================================
   Shell
   ===================================================================== */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

/* =====================================================================
   Sidebar
   ===================================================================== */
.sidebar {
  background:
    linear-gradient(180deg, rgba(14, 20, 36, 0.85) 0%, rgba(6, 8, 15, 0.92) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, #7dd3fc 0%, #38bdf8 40%, #0284c7 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #051022;
  font-weight: 800; font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 4px 14px rgba(56, 189, 248, 0.35);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.18) 100%);
  pointer-events: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { color: var(--text); font-weight: 800; font-size: 13.5px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nav a, .nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  text-align: left;
  font: 500 12.5px var(--font-sans);
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
}
.nav a::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 999px;
  background: var(--muted-2);
  flex-shrink: 0;
  transition: all .15s ease;
}
.nav a:hover, .nav button:hover {
  background: rgba(148, 163, 184, 0.06);
  color: var(--text);
}
.nav a:hover::before { background: var(--text-soft); }
.nav a.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0.04) 100%);
  color: var(--text);
  font-weight: 600;
}
.nav a.active::before {
  background: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-foot strong { color: var(--text-soft); font-weight: 600; }

/* =====================================================================
   Main + Topbar
   ===================================================================== */
.main { min-width: 0; }
.topbar {
  min-height: 54px;
  background: rgba(10, 14, 26, 0.60);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: flex; align-items: center; gap: 10px;
}
.topbar .crumbs {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}
.topbar-meta {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-soft);
  font-size: 13px;
}
.topbar-meta .avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #051022;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.30);
}
.content { padding: 20px 24px 40px; max-width: none; }

/* =====================================================================
   Panels / Cards
   ===================================================================== */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel, .data-panel, .card {
  background:
    linear-gradient(180deg, rgba(26, 33, 56, 0.55) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
}
.panel-header, .card-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-header h2, .card-head h2 {
  margin: 0; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.panel-body, .card-body { padding: 14px 16px; }
.section-gap { margin-top: 16px; }

/* =====================================================================
   Hero (viewer dashboard banner) — distinctive glassmorphism
   ===================================================================== */
.viewer-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 12px 22px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.20), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.18), transparent 50%),
    linear-gradient(135deg, #0e1424 0%, #131a2c 50%, #0e1424 100%);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.viewer-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 80%);
  opacity: 0.6;
}
.viewer-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.20) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(20px);
}
.viewer-hero-info { z-index: 2; max-width: 600px; }
.viewer-hero h2 {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 3px 0 2px;
  background: linear-gradient(180deg, #ffffff 0%, #c7d0e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.viewer-hero p { margin: 0; color: var(--text-soft); font-size: 12.5px; }
.eyebrow {
  color: var(--sky);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex; align-items: center; gap: 6px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--sky);
  box-shadow: 0 0 8px var(--sky);
}

/* OAT widget kaldirildi */

/* =====================================================================
   Toolbar (week picker + legend)
   ===================================================================== */
.viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.week-picker {
  display: flex; align-items: center; gap: 8px;
  background: rgba(26, 33, 56, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 4px 4px 4px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.week-picker label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.week-picker select {
  border: 0;
  background: transparent;
  color: var(--text);
  font: 600 13.5px var(--font-sans);
  font-variant-numeric: tabular-nums;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  min-width: 320px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2338bdf8' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.week-picker select option { background: #0e1424; color: var(--text); }
.week-picker select:focus { outline: 0; box-shadow: 0 0 0 2px var(--sky-soft); }
.week-picker .pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font: 600 11.5px var(--font-sans);
  letter-spacing: 0.02em;
}
.week-picker .pill.is-active {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.30);
}
.week-picker .pill.is-completed {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.30);
}

/* STAS: data revision badges */
.stas-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.stas-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 10px;
  background: rgba(129, 140, 248, 0.10);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: help;
  transition: border-color .15s ease, background .15s ease;
}
.stas-badge:hover {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.45);
}
.stas-badge .stas-label {
  color: var(--indigo);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.stas-badge .stas-date {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.week-picker .pill .live-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px currentColor;
  filter: blur(0.4px);
  opacity: 0.6;
}

.legend {
  display: inline-flex; gap: 16px; align-items: center;
  color: var(--muted); font-size: 11.5px;
  flex-wrap: wrap;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i.dot {
  width: 8px; height: 8px; border-radius: 999px;
  display: inline-block;
}
.legend i.dot.green { background: var(--emerald); box-shadow: 0 0 8px var(--emerald-soft); }
.legend i.dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber-soft); }
.legend i.dot.red   { background: var(--rose);  box-shadow: 0 0 8px var(--rose-soft); }
.legend i.dot.gray  { background: var(--muted-2); }

/* =====================================================================
   Metrics (stat cards) — distinctive with accent borders
   ===================================================================== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.metric-card {
  background: linear-gradient(180deg, rgba(26, 33, 56, 0.55) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.metric-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.40), transparent);
  opacity: 0;
  transition: opacity .2s ease;
}
.metric-card:hover { border-color: var(--line-strong); }
.metric-card:hover::before { opacity: 1; }
.metric-card .metric-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  display: block;
}
.metric-card strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
  font-family: var(--font-mono);
}
.metric-card .metric-sub { color: var(--muted-2); font-size: 11px; margin-top: 2px; }

.stat {
  background: linear-gradient(180deg, rgba(26, 33, 56, 0.55) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
}
.stat strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-family: var(--font-mono);
}
.stat span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

/* =====================================================================
   Tables — modern
   ===================================================================== */
.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 320px);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1080px; }
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 12.5px;
  color: var(--text-soft);
}
th { padding: 8px 10px; }
th:first-child, td:first-child { padding-left: 14px; }
th:last-child, td:last-child { padding-right: 14px; }
th {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  background: rgba(14, 20, 36, 0.65);
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
tbody tr { transition: background-color .12s ease; }
tbody tr:hover td { background: rgba(56, 189, 248, 0.04); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
td.center { text-align: center; }

tr.row-ok td { background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 40%); }
tr.row-warn td { background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 40%); }

/* =====================================================================
   Status lights
   ===================================================================== */
.light {
  width: 8px; height: 8px;
  display: inline-block;
  border-radius: 999px;
  vertical-align: middle;
  flex-shrink: 0;
}
.light.green { background: var(--emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.20), 0 0 8px rgba(16, 185, 129, 0.40); }
.light.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.20), 0 0 8px rgba(245, 158, 11, 0.40); }
.light.red   { background: var(--rose); box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.20), 0 0 8px rgba(244, 63, 94, 0.40); }
.light.gray  { background: var(--muted-2); }

.status-cell {
  display: inline-flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
}
.status-cell.ok    { color: var(--emerald); }
.status-cell.warn  { color: var(--amber); }
.status-cell.error { color: var(--rose); }

/* =====================================================================
   Chips / Badges / Pills
   ===================================================================== */
.badge, .rev-pill, .type-chip, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-soft);
  white-space: nowrap;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
}
.rev-pill {
  background: rgba(56, 189, 248, 0.10);
  color: var(--sky);
  border-color: rgba(56, 189, 248, 0.20);
  font-family: var(--font-mono);
  font-weight: 700;
}
.type-chip {
  background: rgba(129, 140, 248, 0.10);
  color: var(--indigo);
  border-color: rgba(129, 140, 248, 0.20);
  font-family: var(--font-mono);
  font-weight: 700;
}
.badge.ok { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(16, 185, 129, 0.25); }
.badge.warn { background: var(--amber-soft); color: var(--amber); border-color: rgba(245, 158, 11, 0.25); }
.badge.error { background: var(--rose-soft); color: var(--rose); border-color: rgba(244, 63, 94, 0.25); }
.badge.muted { background: rgba(148, 163, 184, 0.08); color: var(--muted); }

/* =====================================================================
   Forms
   ===================================================================== */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row { display: grid; gap: 6px; margin-bottom: 12px; }
label { color: var(--text-soft); font-weight: 600; font-size: 12.5px; letter-spacing: 0.01em; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 12px;
  background: rgba(6, 8, 15, 0.55);
  color: var(--text);
  font: 14px var(--font-sans);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
  background: rgba(6, 8, 15, 0.85);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 120px; resize: vertical; }
.split { display: flex; gap: 10px; align-items: end; }
.split > * { flex: 1; }

.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 10px 14px;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #051022;
  font: 600 13.5px var(--font-sans);
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.btn:hover { background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 100%); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn.secondary:hover { background: rgba(148, 163, 184, 0.14); }
.btn.danger { background: linear-gradient(180deg, #f43f5e 0%, #be123c 100%); color: #fff; box-shadow: 0 2px 8px rgba(244, 63, 94, 0.30); }
.btn.ghost { background: transparent; color: var(--sky); box-shadow: none; }
.btn.ghost:hover { background: var(--sky-soft); }

/* =====================================================================
   Flash messages
   ===================================================================== */
.flash {
  margin: 14px 0;
  border-radius: var(--r);
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(26, 33, 56, 0.55);
  color: var(--text-soft);
  font-size: 13.5px;
}
.flash.ok { border-color: rgba(16, 185, 129, 0.30); color: var(--emerald); background: var(--emerald-soft); }
.flash.error { border-color: rgba(244, 63, 94, 0.30); color: var(--rose); background: var(--rose-soft); }
.flash.warn { border-color: rgba(245, 158, 11, 0.30); color: var(--amber); background: var(--amber-soft); }

/* =====================================================================
   Login — striking dark
   ===================================================================== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(900px 500px at 80% 90%, rgba(129, 140, 248, 0.18), transparent 60%),
    linear-gradient(180deg, #06080f 0%, #0a0e1a 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 80%);
  opacity: 0.5;
  pointer-events: none;
}
.login-box { width: min(420px, 100%); position: relative; z-index: 1; }
.login-box .brand {
  background: transparent;
  border: 0;
  padding: 6px 8px 24px;
  margin: 0 0 18px;
  justify-content: center;
}
.login-box .panel {
  background: rgba(14, 20, 36, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.login-box .panel-header { background: transparent; border-bottom: 1px solid var(--line); }
.login-box .panel-header h1 { color: var(--text); font-size: 18px; }
.login-box .btn { width: 100%; padding: 12px 16px; font-size: 14px; }

/* =====================================================================
   Misc
   ===================================================================== */
.muted { color: var(--muted); }
.code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-soft);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(56, 189, 248, 0.15);
}
.code.compact { color: var(--muted); background: transparent; padding: 0; border: 0; }
details summary { color: var(--sky); cursor: pointer; font-weight: 600; padding: 4px 0; }
details[open] summary { margin-bottom: 4px; }
.weather-cell, .estimate-cell { display: grid; gap: 4px; min-width: 150px; }
.weather-cell .code { font-size: 11px; }
.estimate-cell .mtow-line { display: flex; align-items: center; gap: 8px; }
.estimate-cell strong { font-size: 15px; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-weight: 700; }
.estimate-cell .weight-unit {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--muted);
  font-family: var(--font-mono);
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 2px;
  letter-spacing: 0.02em;
}
.estimate-cell-runways {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 280px;
  max-width: 360px;
}
.runway-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--line);
}
.runway-mini:last-child { border-bottom: 0; }
.runway-mini .runway-line {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.flight-cell { display: flex; flex-direction: column; line-height: 1.2; }
.flight-cell strong { font-weight: 700; color: var(--text); }
.flight-cell small { color: var(--muted); font-size: 11px; }

/* Old scope tabs — kept for compat */
.scope-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.scope-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(26, 33, 56, 0.55);
  color: var(--text-soft);
  font: 600 12.5px var(--font-sans);
  cursor: pointer;
}
.scope-chip:hover { background: rgba(56, 189, 248, 0.08); color: var(--text); }
.scope-chip.active {
  background: var(--sky-soft);
  border-color: rgba(56, 189, 248, 0.30);
  color: var(--sky);
}

/* =====================================================================
   Analytics cards
   ===================================================================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.analytics-card {
  background: linear-gradient(180deg, rgba(26, 33, 56, 0.65) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  overflow: hidden;
}
.analytics-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: currentColor;
  opacity: 0.7;
}
.analytics-card.success { color: var(--emerald); }
.analytics-card.warn    { color: var(--amber); }
.analytics-card.danger  { color: var(--rose); }
.analytics-card.info    { color: var(--sky); }
.analytics-card .label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 2px;
}
.analytics-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.analytics-card .delta { font-size: 11.5px; color: var(--muted); }
.analytics-card .delta.up { color: var(--emerald); }
.analytics-card .delta.down { color: var(--rose); }

.success-bar {
  height: 6px;
  background: rgba(148, 163, 184, 0.10);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin-top: 8px;
}
.success-bar .fill-ok { background: var(--emerald); box-shadow: 0 0 8px rgba(16, 185, 129, 0.40); }
.success-bar .fill-warn { background: var(--amber); box-shadow: 0 0 8px rgba(245, 158, 11, 0.40); }
.success-bar .fill-bad { background: var(--rose); box-shadow: 0 0 8px rgba(244, 63, 94, 0.40); }

/* OAT calculator result table kaldirildi */

/* =====================================================================
   Filter form (dashboard: donem + meydan)
   ===================================================================== */
.filter-form {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(26, 33, 56, 0.55) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}
.period-chips {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: rgba(6, 8, 15, 0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.period-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  border-radius: 999px;
  font: 600 12.5px var(--font-sans);
  cursor: pointer;
  transition: all .12s ease;
}
.period-chip:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.06);
}
.period-chip.active {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #051022;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.30);
}
.filter-airport {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.filter-airport label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.filter-airport select {
  background: rgba(6, 8, 15, 0.55);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 7px 30px 7px 12px;
  color: var(--text);
  font: 600 13px var(--font-sans);
  min-width: 200px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2338bdf8' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.filter-airport select option { background: #0e1424; }
.filter-airport select:focus {
  outline: 0;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
}

/* =====================================================================
   History page
   ===================================================================== */
.history-toolbar {
  margin-top: 20px;
  background: linear-gradient(180deg, rgba(26, 33, 56, 0.65) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.history-toolbar-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 16px;
  align-items: end;
}
.history-search label, .history-pick label {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 6px;
}
.history-search input {
  background: rgba(6, 8, 15, 0.55);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 12px;
  color: var(--text);
  font: 600 14px var(--font-sans);
  letter-spacing: 0.02em;
  width: 100%;
  transition: all .15s ease;
}
.history-search input:focus {
  outline: 0;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
  background: rgba(6, 8, 15, 0.85);
}
.history-pickers {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 10px;
  align-items: end;
}
.history-pick select {
  background: rgba(6, 8, 15, 0.55);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 9px 30px 9px 12px;
  color: var(--text);
  font: 600 13.5px var(--font-sans);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2338bdf8' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.history-pick select option { background: #0e1424; }
.history-pick select:focus {
  outline: 0;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
}
.history-vs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 0 4px;
}

.history-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.history-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.10), transparent 50%),
    linear-gradient(180deg, rgba(26, 33, 56, 0.65) 0%, rgba(19, 26, 44, 0.55) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  position: relative;
}
.history-card.history-card-a { border-top: 2px solid var(--emerald); }
.history-card.history-card-b { border-top: 2px solid var(--sky); }
.history-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.history-card-head .label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.history-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.history-card-stats > div {
  display: flex; flex-direction: column; gap: 2px;
}
.history-card-stats .muted {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.history-card-stats strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

td.num.up { color: var(--emerald); }
td.num.down { color: var(--rose); }

/* =====================================================================
   Footer (all pages)
   ===================================================================== */

/* Runway MTOW list (analytics) */
.runway-mtow-list {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}
.runway-airport {
  background: rgba(26, 33, 56, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 18px;
}
.runway-airport-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.runway-airport-head .airport-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.02em;
}
.runway-airport-head .airport-meta {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-sans);
}
.runway-airport-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.runway-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 6px 0;
  border-radius: var(--r);
}
.runway-row .runway-mtow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.runway-row .runway-mtow strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.runway-row .rank-badge {
  display: inline-block;
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.30);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 4px;
}
.runway-row .runway-detail {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

.app-footer {
  margin-top: 40px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}
.app-footer .footer-copy {
  display: inline-flex; align-items: center; gap: 6px;
}
.app-footer .footer-author {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 12.5px;
}
.app-footer .footer-author strong {
  color: var(--text);
  font-weight: 700;
}
.app-footer .footer-author .avatar-mark {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #051022;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.30);
}
.app-footer a { color: var(--sky); }
.app-footer .heart {
  color: #ef4444;
  font-size: 13px;
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.15); }
  40% { transform: scale(1); }
  60% { transform: scale(1.1); }
  80% { transform: scale(1); }
}

/* =====================================================================
   Airport Card page
   ===================================================================== */
.airports-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  background: rgba(14, 20, 36, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.airports-search { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.airports-search label, .airports-toggles label { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.airports-search input {
  background: rgba(20, 28, 50, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font: 500 13px var(--font-sans);
  outline: none;
  transition: border-color .15s ease;
}
.airports-search input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
.airports-toggles { display: flex; align-items: center; gap: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-soft); }
.toggle input { accent-color: var(--sky); width: 15px; height: 15px; }
.airports-custom-oat { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.airports-custom-oat input {
  background: rgba(20, 28, 50, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font: 500 13px var(--font-mono);
  outline: none;
  transition: border-color .15s ease;
  -moz-appearance: textfield;
}
.airports-custom-oat input::-webkit-outer-spin-button,
.airports-custom-oat input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.airports-custom-oat input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.06); color: var(--text); }
.airports-grid {
.airports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.airport-card {
  background: rgba(14, 20, 36, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.airport-card:hover { border-color: rgba(56, 189, 248, 0.35); }
.airport-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  background:
    linear-gradient(180deg, rgba(20, 28, 50, 0.85) 0%, rgba(14, 20, 36, 0.65) 100%);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.airport-id { display: flex; align-items: baseline; gap: 8px; }
.airport-icao {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.04em;
}
.airport-iata {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.22);
  padding: 2px 7px;
  border-radius: 5px;
}
.airport-name {
  font-size: 12.5px;
  color: var(--text-soft);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.airport-elev {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}
.airport-max {
  display: flex;
  gap: 6px;
  padding: 8px 16px 10px;
  background: rgba(20, 28, 50, 0.45);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.max-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: var(--emerald);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.max-badge.muted {
  background: rgba(148, 163, 184, 0.06);
  border-color: var(--line);
  color: var(--muted);
}
.max-badge .max-label { letter-spacing: 0.06em; }
.max-badge .max-value { color: var(--text); font-weight: 700; }
.max-badge .max-oat { color: var(--muted); font-weight: 500; }
.airport-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.aircraft-block {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--line);
}
.aircraft-block:last-child { border-right: 0; }
.aircraft-block.missing .aircraft-block-head .muted { font-style: italic; }
.aircraft-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}
.aircraft-block-head .type-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}
.aircraft-block-head .muted { font-size: 10.5px; }
.airport-table-wrap { max-height: none; overflow: visible; }
table.airport-table { min-width: 0; font-size: 11.5px; }
table.airport-table th, table.airport-table td {
  padding: 5px 7px;
  font-size: 11.5px;
}
table.airport-table th {
  position: static;
  background: rgba(20, 28, 50, 0.55);
  font-size: 10px;
  letter-spacing: 0.06em;
}
table.airport-table th:first-child, table.airport-table td:first-child { padding-left: 7px; }
table.airport-table th:last-child, table.airport-table td:last-child { padding-right: 7px; }
.mtow-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--amber);
}
.mtow-cell.max {
  color: var(--emerald);
  font-weight: 700;
}
.custom-oat-col {
  background: rgba(56, 189, 248, 0.06);
  border-left: 1px dashed rgba(56, 189, 248, 0.30);
}
table.airport-table th.custom-oat-col {
  color: var(--sky);
  background: rgba(56, 189, 248, 0.10);
}
.airport-compare-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  background: rgba(10, 14, 26, 0.35);
}
.compare-block { padding: 10px 14px; border-right: 1px solid var(--line); }
.compare-block:last-child { border-right: 0; }
.compare-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; }
.compare-block-head .type-chip { font-size: 10.5px; }
.compare-block-head .muted { font-size: 10px; }
table.compare-table { min-width: 0; font-size: 11px; }
table.compare-table th, table.compare-table td { padding: 4px 6px; font-size: 11px; }
table.compare-table th { font-size: 9.5px; letter-spacing: 0.05em; }
table.compare-table td strong { color: var(--text); font-weight: 700; }
table.compare-table tr.best { background: rgba(16, 185, 129, 0.08); }
table.compare-table tr.best td:first-child { border-left: 2px solid var(--emerald); }
.best-tag {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}
.cmp-max { font-family: var(--font-mono); color: var(--emerald); font-weight: 700; }
.cmp-oat30 { font-family: var(--font-mono); color: var(--amber); font-weight: 700; }
.cmp-loss { font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; }
.cmp-loss.good { color: var(--muted); }
.cmp-loss.ok { color: var(--text-soft); }
.cmp-loss.warn { color: var(--rose); }


/* =====================================================================
   Weather alert banner
   ===================================================================== */
.alert-banner {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.10) 0%, rgba(244, 63, 94, 0.04) 100%);
  border: 1px solid rgba(244, 63, 94, 0.30);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert-banner-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--rose);
}
.alert-banner-head strong { letter-spacing: 0.04em; }
.alert-banner-head .light { width: 8px; height: 8px; }
.alert-banner-head .muted { margin-left: auto; color: var(--muted); font-size: 11px; }
.alert-item {
  display: grid;
  grid-template-columns: 16px 220px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(244, 63, 94, 0.15);
  font-size: 12px;
}
.alert-item:first-of-type { border-top: 0; }
.alert-item.alert-warn { color: var(--text-soft); }
.alert-item.alert-critical { color: var(--text); font-weight: 600; }
.alert-item .light { width: 8px; height: 8px; box-shadow: none; }
.alert-flight { font-family: var(--font-mono); color: var(--text); font-weight: 700; }
.alert-msg { color: var(--text-soft); }

/* =====================================================================
   Alerts page (viewer/admin list)
   ===================================================================== */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert-list-item {
  background: rgba(14, 20, 36, 0.55);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.alert-list-item.alert-warn { border-left-color: var(--amber); }
.alert-list-item.alert-critical {
  border-left-color: var(--rose);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.06), rgba(14, 20, 36, 0.55));
}
.alert-list-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.alert-list-head .badge { flex: 0 0 auto; }
.alert-list-flight { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.alert-list-flight strong { color: var(--text); }
.alert-list-time { font-family: var(--font-mono); font-size: 11px; }
.alert-list-body { display: flex; flex-direction: column; gap: 3px; }
.alert-list-route { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-soft); }
.alert-list-msg { font-size: 12px; color: var(--text); }
.alert-list-values { font-size: 11px; }
.alert-list-values strong { color: var(--text); }
.alert-acked { font-size: 10.5px; color: var(--muted); font-style: italic; }
.alert-ack-form { margin-left: auto; }
.alert-ack-form .btn { padding: 4px 12px; font-size: 11.5px; }

/* =====================================================================
   Topbar - alert bell
   ===================================================================== */
.nav-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
  margin-right: 4px;
}
.nav-bell:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.nav-bell-active { color: var(--rose); animation: nav-bell-pulse 2.4s ease-in-out infinite; }
.nav-bell-active:hover { color: var(--rose); }
.nav-bell-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--rose);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg, rgba(10, 14, 26, 0.95));
  line-height: 1;
}
@keyframes nav-bell-pulse {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50% { transform: rotate(0); }
}

/* =====================================================================
   Custom alert - hucre c ikonu + modal + /alerts listesi
   ===================================================================== */
.cell-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(20, 28, 50, 0.55);
  color: var(--muted);
  cursor: pointer;
  margin-left: 6px;
  padding: 0;
  flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
  vertical-align: middle;
}
.cell-bell:hover {
  color: var(--rose);
  border-color: var(--rose);
  background: rgba(244, 63, 94, 0.10);
}
.runway-line { vertical-align: middle; }
.custom-alert-modal { position: fixed; inset: 0; z-index: 100; }
.custom-alert-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.custom-alert-modal-box {
  position: relative;
  max-width: 440px;
  margin: 80px auto;
  background: rgba(14, 20, 36, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.custom-alert-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 28, 50, 0.85), rgba(14, 20, 36, 0.65));
}
.custom-alert-modal-head strong { font-size: 14px; }
.custom-alert-modal-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.custom-alert-modal-close:hover { color: var(--text); }
.custom-alert-modal-form { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.cam-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; }
.cam-row .muted { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.cam-row strong { font-family: var(--font-mono); color: var(--text); }
.cam-row-input { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cam-row-input label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.cam-row-input input {
  background: rgba(20, 28, 50, 0.6);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 12px;
  font: 500 14px var(--font-mono);
  outline: none;
  -moz-appearance: textfield;
}
.cam-row-input input::-webkit-outer-spin-button,
.cam-row-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cam-row-input input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
.cam-row-input #cam-unit-hint { font-size: 11px; text-align: right; }
.cam-actions { display: flex; gap: 8px; justify-content: flex-end; }
.muted-row { opacity: 0.55; }

/* Custom alert form (/alerts sayfasi) */
.custom-alert-form {
  background: rgba(20, 28, 50, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.custom-alert-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.custom-alert-field { display: flex; flex-direction: column; gap: 4px; }
.custom-alert-field label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.custom-alert-field input,
.custom-alert-field select {
  background: rgba(20, 28, 50, 0.6);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 10px;
  font: 500 12.5px var(--font-sans);
  outline: none;
  transition: border-color .15s ease;
}
.custom-alert-field input:focus,
.custom-alert-field select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.custom-alert-field-action { align-self: end; }
.custom-alert-field-action .btn { width: 100%; }

/* Admin upload - yukleme sirasinda spinner */
.import-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: var(--sky);
  font-size: 12.5px;
  font-weight: 600;
}
.import-progress-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: import-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes import-spin {
  to { transform: rotate(360deg); }
}
#import-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* =====================================================================
   Responsive
   ===================================================================== */
/* Onceki breakpoint 1200px idi — sidebar hala acik, sadece grid 4 -> 2 */
@media (max-width: 1200px) {
  .grid.cols-4, .metric-grid, .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .brand-mark { width: 32px; height: 32px; font-size: 14px; }
  .brand-text strong { font-size: 12.5px; }
  .nav a, .nav button { padding: 8px 9px; font-size: 12px; }
}

/* iPad landscape ve kucuk laptop — sidebar ust bar olur */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto;
    flex-direction: row; align-items: center;
    gap: 12px; padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { border: 0; padding: 0; margin: 0; flex-shrink: 0; }
  .brand-text { display: none; }
  .brand-mark { width: 30px; height: 30px; font-size: 13px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; flex: 1; }
  .nav a, .nav button { width: auto; padding: 7px 11px; font-size: 12.5px; }
  .sidebar-foot { display: none; }
  .viewer-hero, .viewer-toolbar { align-items: stretch; flex-direction: column; }
  .oat-card { min-width: 0; }
  .week-picker select { min-width: 200px; }
  .content { padding: 18px; }
  .topbar { padding: 12px 18px; }
  .topbar-meta span:not(.avatar) { display: none; }
}

/* Tablet (iPad portrait) — kart gorunumu baslar, tablo scroll gerekmez */
@media (max-width: 720px) {
  .metric-grid, .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid, .analytics-grid, .history-comparison { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .topbar { padding: 12px 14px; }
  .topbar h1 { font-size: 17px; }
  .topbar-meta { gap: 8px; }
  .topbar-meta .muted { display: none; }
  .table-wrap { max-height: none; overflow: visible; }
  .panel-body, .card-body { padding: 14px; }
  .oat-card .oat-input-row { grid-template-columns: 1fr; }
  .viewer-hero { padding: 18px; }
  .viewer-hero h2 { font-size: 22px; }
  .oat-result .oat-temp { font-size: 32px; }
  .history-toolbar-row { grid-template-columns: 1fr; }
  .history-pickers { grid-template-columns: 1fr; }
  .history-vs { justify-content: flex-start; height: auto; padding: 4px 0; }
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-airport { margin-left: 0; }
  .filter-airport select { width: 100%; }
  .period-chips { width: 100%; }
  .period-chip { flex: 1; }
  .week-picker { width: 100%; flex-direction: column; align-items: stretch; }
  .week-picker select { width: 100%; min-width: 0; }
  .viewer-toolbar { flex-direction: column; align-items: stretch; }
  .stas-group, .legend { justify-content: flex-start; flex-wrap: wrap; }
  .stas-badge { font-size: 11px; padding: 5px 10px; }
  .legend span { font-size: 11px; }
  /* Tablo kart gorunumu (iPad / buyuk telefon) */
  table { min-width: 0; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr {
    background: rgba(14, 20, 36, 0.55);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 6px 12px;
  }
  tr:hover td { background: transparent; }
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12.5px;
    min-height: 28px;
  }
  td:last-child { border-bottom: 0; }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex: 0 0 auto;
    max-width: 48%;
  }
  td > * { text-align: right; min-width: 0; }
  td .weather-cell, td .estimate-cell { text-align: right; }
}

/* iPhone / kucuk telefon — daha kompakt */
@media (max-width: 480px) {
  .content { padding: 10px; }
  .topbar { padding: 10px 12px; min-height: 48px; }
  .topbar h1 { font-size: 15px; }
  .crumbs { font-size: 10.5px; }
  .avatar { width: 28px; height: 28px; font-size: 11px; }
  .panel, .card { border-radius: 12px; }
  .panel-body, .card-body { padding: 12px; }
  .metric-card { padding: 12px; }
  .metric-card strong { font-size: 22px; }
  .metric-card span { font-size: 10.5px; }
  .viewer-hero { padding: 16px; }
  .viewer-hero h2 { font-size: 18px; line-height: 1.25; }
  .viewer-hero p { font-size: 12.5px; }
  .eyebrow { font-size: 10px; }
  .sidebar { padding: 8px 10px; gap: 8px; }
  .nav a, .nav button { padding: 6px 9px; font-size: 11.5px; }
  .brand-mark { width: 28px; height: 28px; font-size: 12px; }
  tr { padding: 4px 10px; }
  td { padding: 6px 0; font-size: 12px; }
  td::before { font-size: 10px; max-width: 45%; }
  .runway-line { font-size: 11.5px; }
  .runway-mini { padding: 3px 0; }
  .estimate-cell-runways { gap: 2px; }
  .stas-badge { font-size: 10.5px; padding: 4px 8px; }
  .app-footer { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 0; }
  .filter-form { gap: 10px; }
  .period-chip { font-size: 12px; padding: 6px 10px; }
  .airports-grid { grid-template-columns: 1fr; }
  .airports-toolbar { flex-direction: column; align-items: stretch; }
  .airports-search, .airports-toggles, .airports-custom-oat { width: 100%; }
  .airport-card-body { grid-template-columns: 1fr; }
  .aircraft-block { border-right: 0; border-bottom: 1px solid var(--line); }
  .aircraft-block:last-child { border-bottom: 0; }
  .airport-compare-band { grid-template-columns: 1fr; }
  .compare-block { border-right: 0; border-bottom: 1px solid var(--line); }
  .compare-block:last-child { border-bottom: 0; }
  table.airport-table th, table.airport-table td { padding: 4px 5px; font-size: 10.5px; }
  .airport-max { padding: 6px 12px 8px; }
  .max-badge { font-size: 10px; padding: 3px 7px; gap: 4px; }
  .airport-card-body { grid-template-columns: 1fr; }
  .aircraft-block { border-right: 0; border-bottom: 1px solid var(--line); }
  .aircraft-block:last-child { border-bottom: 0; }
  table.airport-table th, table.airport-table td { padding: 4px 5px; font-size: 10.5px; }
}
