:root {
  --ink: #eef8f6;
  --muted: #8aa2a9;
  --dim: #5c747b;
  --bg: #061119;
  --panel: #0c1d26;
  --panel-2: #102631;
  --line: rgba(143, 191, 199, 0.16);
  --mint: #75f4c1;
  --mint-strong: #36e8a9;
  --amber: #ffc66d;
  --coral: #ff8e7a;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
a { color: var(--mint); }

.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 58% 42%, #12313a 0%, #071821 34%, #040c12 100%);
  z-index: 30;
}
.gate::before, .gate::after {
  content: "";
  position: absolute;
  width: 42rem;
  height: 42rem;
  border: 1px solid rgba(117,244,193,.13);
  border-radius: 50%;
  transform: translate(28%, -8%);
}
.gate::after { width: 66rem; height: 66rem; border-color: rgba(117,244,193,.05); transform: translate(11%, -6%); }
.gate-noise { position: absolute; inset: 0; opacity: .14; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.19'/%3E%3C/svg%3E"); }
.gate-card {
  position: relative;
  width: min(440px, calc(100vw - 40px));
  padding: 38px;
  border: 1px solid rgba(164,220,218,.22);
  border-radius: 24px;
  background: rgba(7, 21, 29, .83);
  box-shadow: 0 30px 110px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
  z-index: 2;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: var(--mint); color: #062119; font: 700 11px/1 var(--mono); letter-spacing: -.08em; }
.brand-name { color: #cce6e4; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: lowercase; }
.eyebrow { color: var(--mint); font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.gate-card h1 { margin: 42px 0 12px; font-size: clamp(42px, 8vw, 64px); line-height: .95; letter-spacing: -.075em; font-weight: 800; }
.gate-copy { max-width: 320px; margin: 0 0 32px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.login-form label { display: block; margin-bottom: 8px; color: #b7cccd; font-size: 12px; font-weight: 700; }
.password-wrap { display: flex; gap: 8px; padding: 5px; border: 1px solid rgba(117,244,193,.28); border-radius: 13px; background: rgba(255,255,255,.045); }
.password-wrap:focus-within { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(117,244,193,.09); }
.password-wrap input { width: 100%; border: 0; outline: 0; padding: 11px 12px; background: transparent; color: var(--ink); font-size: 14px; }
.password-wrap input::placeholder { color: #698087; }
.password-wrap button { width: 40px; border: 0; border-radius: 9px; background: var(--mint); color: #062119; font-size: 18px; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.password-wrap button:hover { background: #a3ffda; transform: translate(1px,-1px); }
.auth-error { min-height: 17px; margin: 8px 0 0; color: var(--coral); font: 11px var(--mono); }
.gate-footnote { display: flex; align-items: center; gap: 8px; margin-top: 35px; color: var(--dim); font: 10px var(--mono); }
.pulse-dot, .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(117,244,193,.09); }

.app-shell { display: none; min-height: 100vh; padding: 28px clamp(18px, 4vw, 64px) 24px; background: linear-gradient(180deg, #061119 0%, #07151e 100%); }
.app-shell.is-unlocked { display: block; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1600px; margin: 0 auto 26px; }
.topbar-center { text-align: center; }
.topbar-center h1 { margin: 5px 0 0; font-size: 19px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.ghost-button { justify-self: end; padding: 9px 0 9px 12px; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.ghost-button span { margin-left: 7px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--dim); font: 10px var(--mono); }
.ghost-button:hover { color: var(--ink); }
.control-rail { display: flex; align-items: center; gap: 16px; max-width: 1600px; margin: 0 auto 22px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(13,31,40,.72); }
.layer-switcher { display: flex; gap: 4px; }
.layer-button { border: 0; border-radius: 8px; padding: 8px 12px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.layer-button:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.layer-button.is-active { background: rgba(117,244,193,.14); color: var(--mint); }
.control-divider { width: 1px; height: 24px; background: var(--line); }
.date-control { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.date-label { color: var(--dim); }
.date-control input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; outline: none; background: var(--panel-2); color: var(--ink); font: 11px var(--mono); }
.date-control input:focus { border-color: rgba(117,244,193,.55); }
.check-control { display: flex; align-items: center; gap: 7px; color: #a9c0c1; font-size: 10px; cursor: pointer; user-select: none; }
.check-control input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { display: inline-block; width: 15px; height: 15px; border: 1px solid rgba(143,191,199,.36); border-radius: 4px; background: rgba(255,255,255,.035); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.check-control input:focus-visible + .check-box { outline: 2px solid rgba(117,244,193,.55); outline-offset: 2px; }
.check-control input:checked + .check-box { border-color: var(--mint); background: var(--mint); box-shadow: inset 0 0 0 3px #0b2329; }
.check-count { color: var(--dim); font: 9px var(--mono); }
.control-note { margin-left: auto; color: var(--dim); font: 10px var(--mono); }

.atlas-intro { display: flex; align-items: end; justify-content: space-between; max-width: 1600px; margin: 0 auto 21px; gap: 20px; }
.atlas-intro h2 { max-width: 680px; margin: 9px 0 0; font-size: clamp(23px, 3vw, 36px); line-height: 1.06; letter-spacing: -.06em; font-weight: 700; }
.intro-stats { display: flex; gap: 30px; padding-bottom: 3px; }
.stat-block { display: grid; gap: 4px; text-align: right; }
.stat-block strong { color: var(--mint); font: 500 23px/1 var(--mono); letter-spacing: -.08em; }
.stat-block span { color: var(--dim); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 390px); gap: 16px; max-width: 1600px; margin: 0 auto; }
.map-card { position: relative; min-height: 650px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #09161e; box-shadow: 0 20px 70px rgba(0,0,0,.16); }
#map { position: absolute; inset: 0; min-height: 650px; background: #0a1921; }
.leaflet-container { font-family: var(--sans); background: #0a1921; }
.leaflet-control-attribution { padding: 3px 6px !important; background: rgba(6,17,25,.78) !important; color: #71878d !important; font: 9px var(--mono); }
.leaflet-control-attribution a { color: #8fbfc0; }
.leaflet-control-zoom { margin: 0 16px 16px 0 !important; border: 1px solid rgba(143,191,199,.24) !important; border-radius: 9px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 30px !important; height: 30px !important; line-height: 28px !important; border: 0 !important; background: #102631 !important; color: #b9dcda !important; }
.leaflet-control-zoom a + a { border-top: 1px solid var(--line) !important; }
.map-hud { position: absolute; top: 17px; left: 17px; z-index: 500; padding: 11px 13px; border: 1px solid rgba(143,191,199,.16); border-radius: 11px; background: rgba(7,22,29,.78); backdrop-filter: blur(9px); pointer-events: none; }
.map-hud-title { display: flex; align-items: center; gap: 8px; color: #d6ebe8; font-size: 11px; font-weight: 700; }
.map-hud-copy { margin-top: 5px; color: var(--dim); font: 10px var(--mono); }
.map-legend { position: absolute; left: 17px; bottom: 18px; z-index: 500; display: grid; gap: 8px; padding: 11px 13px; border: 1px solid rgba(143,191,199,.16); border-radius: 11px; background: rgba(7,22,29,.8); backdrop-filter: blur(9px); color: #8fa7ad; font: 10px var(--mono); pointer-events: none; }
.map-legend > div { display: flex; align-items: center; gap: 8px; }
.legend-line { display: inline-block; width: 20px; height: 2px; }
.direct-line { background: var(--mint); box-shadow: 0 0 8px rgba(117,244,193,.65); }
.onward-line { background: var(--amber); opacity: .65; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.hub-dot { background: var(--mint); box-shadow: 0 0 0 3px rgba(117,244,193,.15); }
.leaflet-marker-icon.route-marker { transition: transform .18s ease, filter .18s ease; }
.leaflet-marker-icon.route-marker:hover { filter: brightness(1.35); }
.leaflet-marker-icon.is-selected .airport-marker { transform: scale(1.45); filter: brightness(1.35); }
.leaflet-marker-icon.is-filtered { display: none !important; }
.leaflet-marker-icon.is-muted { opacity: .28 !important; }
.airport-marker { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(235,255,248,.84); background: var(--amber); box-shadow: 0 0 0 4px rgba(255,198,109,.13), 0 3px 12px rgba(0,0,0,.4); }
.airport-marker.hub { width: 17px; height: 17px; border-color: #dffff0; background: var(--mint-strong); box-shadow: 0 0 0 5px rgba(117,244,193,.15), 0 4px 16px rgba(0,0,0,.45); }
.airport-marker.origin { width: 21px; height: 21px; border-color: #fff; background: var(--coral); box-shadow: 0 0 0 6px rgba(255,142,122,.15), 0 5px 20px rgba(0,0,0,.5); }
.weather-tooltip { min-width: 250px; max-width: 310px; padding: 0 !important; border: 1px solid rgba(143,191,199,.26) !important; border-radius: 13px !important; background: #0a1d26 !important; box-shadow: 0 15px 42px rgba(0,0,0,.36) !important; color: var(--ink) !important; overflow: hidden; }
.weather-tooltip::before { border-top-color: #0a1d26 !important; }
.weather-tooltip .leaflet-tooltip-content { margin: 0 !important; }
.weather-card { padding: 12px; }
.weather-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 9px; }
.weather-card-title { font-weight: 800; font-size: 13px; }
.weather-card-sub { margin-top: 3px; color: var(--dim); font: 9px var(--mono); }
.weather-loading { padding: 20px 14px; color: var(--muted); font: 10px var(--mono); }
.weather-error { padding: 15px; color: var(--coral); font: 10px var(--mono); }
.weather-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; }
.weather-day { padding: 7px 3px; border: 1px solid rgba(143,191,199,.11); border-radius: 7px; background: rgba(255,255,255,.03); text-align: center; }
.weather-day-date { color: var(--dim); font: 8px var(--mono); }
.weather-day-icon { margin: 5px 0 3px; font-size: 15px; line-height: 1; }
.weather-day-temp { font: 9px var(--mono); color: #cfe8e4; white-space: nowrap; }
.weather-day-rain { margin-top: 3px; color: #70d9f4; font: 8px var(--mono); }

.detail-panel { display: flex; flex-direction: column; min-height: 650px; max-height: 760px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(14,35,45,.96), rgba(8,24,32,.98)); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.panel-heading h3 { margin: 6px 0 0; font-size: 24px; line-height: 1; letter-spacing: -.06em; }
.panel-heading h3 span { color: var(--dim); font: 500 13px var(--mono); letter-spacing: -.03em; }
.icon-button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--mint); border-color: rgba(117,244,193,.42); }
.panel-description { min-height: 42px; margin: 13px 0 15px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.panel-search-wrap { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.search-icon { color: var(--dim); font-size: 18px; line-height: .8; }
.panel-search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.panel-search-wrap input::placeholder { color: #667e84; }
.panel-meta { display: flex; gap: 7px; padding: 12px 0 9px; color: var(--dim); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.panel-meta span:first-child { color: var(--mint); }
.route-list { flex: 1; min-height: 150px; overflow: auto; padding-right: 3px; scrollbar-color: #23424d transparent; }
.route-list::-webkit-scrollbar { width: 5px; }
.route-list::-webkit-scrollbar-thumb { border-radius: 99px; background: #23424d; }
.route-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 5px; border-bottom: 1px solid rgba(143,191,199,.08); cursor: pointer; transition: background .15s ease; }
.route-row:hover, .route-row.is-selected { border-radius: 8px; background: rgba(117,244,193,.08); }
.route-code { color: var(--mint); font: 500 10px var(--mono); }
.route-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d7e8e5; font-size: 11px; font-weight: 700; }
.route-country { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font: 9px var(--mono); }
.route-frequency { text-align: right; color: var(--amber); font: 9px var(--mono); white-space: nowrap; }
.route-frequency.daily { color: #79a6a6; }
.route-via { margin-top: 2px; color: #8baeb0; font: 8px var(--mono); }
.empty-state { padding: 24px 5px; color: var(--dim); font: 10px/1.6 var(--mono); }
.weather-panel { margin-top: 11px; border-top: 1px solid var(--line); padding-top: 11px; }
.weather-panel.is-hidden { display: none; }

.site-footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1600px; margin: 16px auto 0; padding: 0 3px; color: var(--dim); font: 9px/1.6 var(--mono); }
.footer-label { margin-right: 8px; color: #7f9aa0; letter-spacing: .1em; }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 1fr; }
  .detail-panel { min-height: 420px; max-height: 500px; }
  .map-card, #map { min-height: 570px; }
}
@media (max-width: 680px) {
  .app-shell { padding: 18px 12px 16px; }
  .topbar { grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 18px; }
  .topbar-center { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .topbar-center h1 { font-size: 17px; }
  .ghost-button { font-size: 10px; }
  .control-rail { flex-wrap: wrap; gap: 9px; padding: 8px; }
  .control-divider { display: none; }
  .control-note { width: 100%; margin-left: 0; padding: 2px 3px 0; }
  .date-control { margin-left: auto; }
  .atlas-intro { display: block; }
  .atlas-intro h2 { font-size: 27px; }
  .intro-stats { justify-content: space-between; margin-top: 18px; gap: 9px; }
  .stat-block { text-align: left; }
  .stat-block strong { font-size: 19px; }
  .stat-block span { font-size: 8px; white-space: normal; }
  .map-card, #map { min-height: 480px; }
  .detail-panel { padding: 16px; border-radius: 16px; }
  .site-footer { display: block; }
  .site-footer > div + div { margin-top: 7px; }
}
