/* ==========================================================================
   Styles (lesbar formatiert)
   ========================================================================== */

/* ---------- Variablen & Basis ---------- */

:root {
  --bg: #07111f;
  --surface: #0d1929;
  --surface-2: #111f31;
  --line: #203047;
  --text: #f3f7fb;
  --muted: #8d9caf;
  --cyan: #39d9f5;
  --cyan-2: #17a9d0;
  --green: #2de0a0;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Header & Navigation ---------- */

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  padding: 0 4vw;
  gap: 42px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 17, 31, .9);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57, 217, 245, .35);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(57, 217, 245, .2), rgba(23, 169, 208, .04));
  color: var(--cyan);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: none;
}

.brand strong {
  font-size: 20px;
}

.brand em {
  font-style: normal;
  color: var(--cyan);
  font-weight: 700;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
  margin-right: auto;
}

.main-nav a {
  height: 100%;
  display: flex;
  align-items: center;
  color: #9eabba;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
}

.main-nav a.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #b4c1d0;
  position: relative;
}

.icon-button span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  right: 8px;
  top: 8px;
}

.profile {
  border: 0;
  background: transparent;
  color: #eaf0f6;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.profile>b {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #23c8e8, #176de0);
}

.profile span {
  font-size: 12px;
  line-height: 1.25;
}

.profile small {
  color: var(--muted);
}

/* ---------- Hero-Bereich ---------- */

.hero {
  height: 570px;
  position: relative;
  overflow: hidden;
}

.hero>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 13, 25, .98) 8%, rgba(5, 13, 25, .77) 48%, rgba(5, 13, 25, .1) 84%), linear-gradient(0deg, var(--bg), transparent 30%);
}

.hero-content {
  position: absolute;
  left: max(4vw, calc((100vw - 1380px)/2));
  top: 50%;
  transform: translateY(-50%);
  max-width: 720px;
}

.eyebrow {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.eyebrow i,
.updated i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  margin-right: 8px;
}

.hero h1 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
  margin: 16px 0 18px;
  letter-spacing: -.055em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(90deg, #fff, var(--cyan));
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: #bbc6d4;
  max-width: 620px;
  line-height: 1.6;
}

/* ---------- Globale Suche ---------- */

.global-search {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(12, 25, 42, .86);
  border-radius: 18px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  margin-top: 28px;
}

.global-search>svg {
  color: var(--cyan);
  width: 23px;
  height: 23px;
}

.global-search input {
  min-width: 0;
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
}

.global-search input::placeholder {
  color: #728297;
}

.global-search kbd {
  font: 11px Inter;
  color: #8492a5;
  border: 1px solid #344358;
  border-radius: 6px;
  padding: 5px 7px;
}

.global-search button {
  height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 0 25px;
  background: linear-gradient(135deg, var(--cyan), #159bd0);
  color: #04101c;
  font-weight: 800;
  cursor: pointer;
}

.quick-links {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
  font-size: 12px;
  color: #738297;
}

.quick-links a {
  color: #b9c5d3;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  padding: 6px 9px;
}

/* ---------- Inhalt & Statistik-Karten ---------- */

.content-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px 4vw 70px;
}

.section-heading,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2,
.panel-head h2 {
  margin: 7px 0 0;
  font-size: 25px;
  letter-spacing: -.03em;
}

.updated {
  font-size: 12px;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0 28px;
}

.stat-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(17, 31, 49, .96), rgba(10, 22, 37, .96));
  border-radius: var(--radius);
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
}

.stat-icon svg {
  width: 25px;
  height: 25px;
}

.stat-icon.cyan {
  background: #132f3e;
  color: var(--cyan);
}

.stat-icon.violet {
  background: #2a2145;
  color: #a78bfa;
}

.stat-icon.amber {
  background: #382c1b;
  color: #fbbf24;
}

.stat-icon.green {
  background: #15382e;
  color: var(--green);
}

.stat-card div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  flex: 1;
}

.stat-card small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  font-size: 27px;
  margin-top: 7px;
}

.stat-card em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.stat-card .up,
.stat-card .online {
  color: var(--green);
}

/* ---------- Dashboard: Karte & Seitenpanel ---------- */

.panel-head {
  padding: 19px 21px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 19px;
}

.outline-button {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9c6d5;
  background: #101e30;
  border: 1px solid #2b3c52;
  border-radius: 10px;
  padding: 9px 13px;
}

.map-stage {
  height: 520px;
  position: relative;
  overflow: hidden;
}

.map-stage>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) brightness(.7);
}

.plane-dot {
  position: absolute;
  border: 0;
  background: transparent;
  color: #dffaff;
  filter: drop-shadow(0 0 7px var(--cyan));
  cursor: pointer;
}

.plane-dot svg {
  fill: currentColor;
  stroke: none;
  width: 23px;
  height: 23px;
}

.p1 {
  left: 51%;
  top: 42%;
  transform: rotate(25deg);
}

.p2 {
  left: 30%;
  top: 25%;
  transform: rotate(72deg);
}

.p3 {
  left: 71%;
  top: 66%;
  transform: rotate(-25deg);
}

.flight-popover {
  position: absolute;
  left: 54%;
  top: 28%;
  min-width: 175px;
  padding: 12px 14px;
  border: 1px solid rgba(57, 217, 245, .35);
  background: rgba(7, 17, 31, .92);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.flight-popover span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
}

.flight-popover strong {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 5px 0;
}

.flight-popover small {
  color: var(--muted);
}

.map-controls {
  position: absolute;
  right: 15px;
  top: 15px;
  display: grid;
}

.map-controls button {
  width: 35px;
  height: 35px;
  border: 1px solid #35465b;
  background: #0a1727;
  color: #fff;
  font-size: 18px;
}

.map-controls button:first-child {
  border-radius: 9px 9px 0 0;
}

.map-controls button:last-child {
  border-radius: 0 0 9px 9px;
}

.map-legend {
  position: absolute;
  left: 15px;
  bottom: 15px;
  border: 1px solid #304158;
  background: rgba(7, 17, 31, .88);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 10px;
  color: #b5c1cf;
  display: flex;
  gap: 14px;
}

.map-legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
}

.green-dot {
  background: var(--green);
}

.cyan-dot {
  background: var(--cyan);
}

.panel-head a {
  color: var(--cyan);
  text-decoration: none;
  font-size: 12px;
  display: flex;
  align-items: center;
}

/* ---------- Flugliste & Filter ---------- */

.flight-list {
  padding: 8px;
}

.flight-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 13px 11px;
  border-radius: 13px;
  color: #fff;
  text-decoration: none;
}

.flight-row:hover,
.flight-row.selected {
  background: #14243a;
}

.airline {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.airline.red {
  background: #d9273c;
}

.airline.yellow {
  background: #f2c94c;
  color: #18202b;
}

.airline.blue {
  background: #245bb4;
}

.airline.gold {
  background: #a78949;
}

.flight-row div,
.flight-row>span:last-child {
  display: flex;
  flex-direction: column;
}

.flight-row>span:last-child {
  text-align: right;
}

.flight-row strong,
.flight-row b {
  font-size: 12px;
}

.flight-row small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.flight-row>span:last-child small {
  color: var(--green);
}

.filters {
  border-top: 1px solid var(--line);
  padding: 17px 19px;
}

.filters h3 {
  font-size: 13px;
  margin: 0 0 12px;
}

.filters div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filters button {
  border: 1px solid #2b3b50;
  background: #101c2d;
  color: #95a4b6;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 10px;
}

.filters button.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(57, 217, 245, .08);
}

/* ---------- Feature-Karten ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 22px;
}

.features article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
}

.features article>svg {
  width: 28px;
  height: 28px;
  color: var(--cyan);
}

.features h3 {
  font-size: 13px;
  margin: 0 0 5px;
}

.features p {
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}

.features article>span {
  color: #50617a;
}

/* ---------- Footer ---------- */

footer {
  min-height: 100px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 25px 4vw;
  color: var(--muted);
  font-size: 11px;
}

.brand.mini {
  margin-right: auto;
}

.brand.mini .brand-mark {
  width: 34px;
  height: 34px;
}

.brand.mini .brand-mark svg {
  width: 20px;
}

.brand.mini strong {
  font-size: 16px;
}

footer div {
  display: flex;
  gap: 18px;
}

footer a {
  color: #9aa7b7;
  text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1050px) {
  .main-nav {
    display: none;
  }

  .stats-grid,
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    left: 4vw;
    right: 4vw;
  }

  .profile span {
    display: none;
  }
}

@media (max-width: 650px) {
  .topbar {
    height: 66px;
    padding: 0 18px;
  }

  .header-actions {
    margin-left: auto;
  }

  .brand small,
  .icon-button {
    display: none;
  }

  .hero {
    height: 600px;
  }

  .hero-content {
    top: 46%;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero p {
    font-size: 15px;
  }

  .global-search {
    height: auto;
    flex-wrap: wrap;
    padding: 13px;
  }

  .global-search input {
    min-width: 180px;
  }

  .global-search kbd {
    display: none;
  }

  .global-search button {
    width: 100%;
  }

  .quick-links {
    flex-wrap: wrap;
  }

  .stats-grid,
  .features {
    grid-template-columns: 1fr;
  }

  .content-wrap {
    padding: 25px 16px 50px;
  }

  .map-stage {
    height: 430px;
  }

  .stat-card {
    padding: 17px;
  }

  .section-heading {
    align-items: flex-end;
  }

  .updated {
    max-width: 100px;
    text-align: right;
  }

  .flight-popover {
    left: 36%;
    top: 29%;
  }

  footer {
    flex-wrap: wrap;
  }

  .profile b {
    width: 36px;
    height: 36px;
  }
}

/* ---------- Mobile Navigation (Drawer) ---------- */

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px auto;
  border-radius: 2px;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -330px;
  width: min(320px, 86vw);
  height: 100dvh;
  background: #0d1929;
  z-index: 2000;
  transition: left .28s ease;
  border-right: 1px solid #203047;
  box-shadow: 20px 0 50px rgba(0, 0, 0, .38);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  left: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 7, 15, .68);
  opacity: 0;
  visibility: hidden;
  transition: .28s;
  z-index: 1999;
  backdrop-filter: blur(3px);
}

.drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #111f31;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 14px;
  color: #aab7c7;
  text-decoration: none;
  border-radius: 12px;
  font-size: 14px;
}

.drawer-nav a svg {
  width: 20px;
  height: 20px;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: #14243a;
  color: var(--cyan);
}

.drawer-account {
  margin: auto 16px 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111f31;
}

.drawer-account b {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #23c8e8, #176de0);
}

.drawer-account span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}

.drawer-account small {
  color: var(--muted);
  margin-top: 3px;
}

.menu-open {
  overflow: hidden;
}

@media (max-width: 1050px) {
  .hamburger {
    display: block;
    margin-left: auto;
  }

  .header-actions {
    margin-left: 0;
  }
}

@media (max-width: 650px) {
  .topbar {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .profile {
    display: none;
  }
}

/* ---------- Kompakte Suche im Header ---------- */

.topbar .global-search {
  flex: 0 1 340px;
  height: 44px;
  margin: 0 0 0 auto;
  padding: 4px 4px 4px 14px;
  gap: 9px;
  border-radius: 12px;
  box-shadow: none;
}

.topbar .global-search > svg {
  width: 18px;
  height: 18px;
}

.topbar .global-search input {
  font-size: 14px;
}

.topbar .global-search button {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
}

/* Tablet: Suche vor dem Hamburger-Menü */
@media (max-width: 1050px) {
  .topbar .global-search { order: 2; }
  .topbar .hamburger     { order: 3; margin-left: 12px; }
}

/* Handy: kein Platz im Header -> Suche ausblenden, Menü wieder rechts */
@media (max-width: 650px) {
  .topbar .global-search { display: none; }
  .topbar .hamburger     { margin-left: auto; }
}