:root {
  color-scheme: dark;
  font-family: "Aptos", "Segoe UI", sans-serif;
  --page: #07111b;
  --chrome: #0b1724;
  --sidebar: #081421;
  --panel: rgba(10, 24, 38, 0.86);
  --panel-2: rgba(13, 29, 45, 0.78);
  --line: rgba(129, 151, 174, 0.2);
  --line-soft: rgba(129, 151, 174, 0.12);
  --text: #d9e1eb;
  --muted: #8290a3;
  --muted-2: #aab4c1;
  --gold: #c49b4e;
  --blue: #5d8ec2;
  --teal: #6aa5a0;
  --green: #7fb177;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: #050c14;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
}

.app-shell {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(18, 37, 56, 0.35), transparent 34%),
    #07111b;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px 8px 18px;
  border-right: 1px solid #173047;
  background:
    linear-gradient(180deg, rgba(11, 29, 46, 0.96), rgba(6, 16, 27, 0.98)),
    var(--sidebar);
}

.brand-mark {
  width: 66px;
  height: 44px;
  margin-left: 18px;
  color: var(--gold);
  font-size: 35px;
  line-height: 1;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #8d9aac;
  text-decoration: none;
  font-size: 14px;
}

.nav-link span {
  width: 20px;
  color: #a9b4c2;
  text-align: center;
}

.nav-link.active {
  color: #d4b46d;
  border-color: rgba(196, 155, 78, 0.18);
  border-left: 3px solid var(--gold);
  background: rgba(196, 155, 78, 0.11);
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.pilot-card,
.sync-note {
  margin: 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 28, 43, 0.74);
}

.pilot-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #101820;
  background: linear-gradient(135deg, #d2b16d, #73869c);
  font-weight: 800;
}

.pilot-card strong,
.pilot-card span,
.sync-note span,
.sync-note strong {
  display: block;
}

.pilot-card strong {
  font-size: 13px;
}

.pilot-card span,
.sync-note span {
  color: var(--muted);
  font-size: 12px;
}

.sync-note strong {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.dashboard {
  position: relative;
  padding: 0 36px 20px;
}

.hero {
  position: relative;
  min-height: 288px;
  margin: 0 -36px 12px;
  overflow: hidden;
  border-bottom: 1px solid rgba(129, 151, 174, 0.14);
  background:
    linear-gradient(90deg, rgba(7, 17, 27, 0.98) 0%, rgba(7, 17, 27, 0.7) 32%, rgba(7, 17, 27, 0.2) 62%, rgba(7, 17, 27, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 17, 27, 0.05), rgba(7, 17, 27, 0.95)),
    url("./avionWeb.jpg") center 48% / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(440px, 1fr) 462px;
  gap: 24px;
  height: 100%;
  padding: 30px 36px 20px;
}

.hero-copy {
  align-self: start;
  padding-top: 6px;
}

.eyebrow,
.metric-card span,
.panel-title span,
th,
.fact span,
label span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  max-width: 620px;
  color: #eef2f7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 50px;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 470px;
  margin: 8px 0 14px;
  color: #a7b2bf;
  font-size: 15px;
  line-height: 1.45;
}

.quick-facts {
  display: flex;
  gap: 10px;
}

.fact {
  min-width: 146px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10, 22, 35, 0.8);
}

.fact span,
label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.fact strong {
  display: block;
  margin-top: 5px;
  color: #dce3ec;
  font-size: 13px;
}

.hero-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-self: start;
  padding-top: 38px;
}

.hero-controls button {
  grid-column: 2;
}

label {
  display: grid;
  gap: 7px;
}

select,
button {
  width: 100%;
  min-height: 42px;
  border-radius: 5px;
  font: inherit;
}

select {
  padding: 0 14px;
  border: 1px solid var(--line);
  color: #d5dde7;
  background: rgba(9, 20, 32, 0.86);
}

button {
  border: 1px solid rgba(196, 155, 78, 0.42);
  color: #f1e2c3;
  background: linear-gradient(180deg, #ba9854, #8e6c33);
  font-weight: 700;
  cursor: pointer;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--panel), rgba(8, 20, 32, 0.9));
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 116px;
  padding: 16px 16px 12px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.metric-card span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 13px;
  color: #dce4ed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric-card.gold strong,
.metric-card.gold .metric-head {
  color: var(--gold);
}

.metric-card.teal .metric-head {
  color: var(--teal);
}

.metric-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.lower-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 10px;
}

.panel {
  min-height: 218px;
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  color: #c8d1dd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panel-title span {
  color: var(--muted);
  font-size: 10px;
}

.aircraft-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 20px;
}

.donut {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0d1b2a 0 43%, transparent 44%),
    conic-gradient(#5d8ec2 0 38%, #6aa5a0 38% 64%, #c49b4e 64% 80%, #4c5c72 80% 100%);
}

.donut span,
.donut small {
  grid-area: 1 / 1;
}

.donut span {
  margin-top: -12px;
  font-size: 19px;
  font-weight: 800;
}

.donut small {
  margin-top: 26px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.legend-list,
.bar-list,
.route-list {
  display: grid;
  gap: 10px;
}

.legend-row,
.bar-row,
.route-row {
  display: grid;
  gap: 6px;
}

.legend-top,
.bar-top,
.route-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  color: #aeb9c7;
  font-size: 13px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.legend-row:nth-child(2) .legend-dot,
.bar-row:nth-child(2) .bar-fill {
  background: var(--teal);
}

.legend-row:nth-child(3) .legend-dot,
.bar-row:nth-child(3) .bar-fill {
  background: var(--gold);
}

.legend-row:nth-child(4) .legend-dot,
.bar-row:nth-child(4) .bar-fill {
  background: #75699a;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(129, 151, 174, 0.12);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.route-panel {
  min-height: auto;
}

.route-list {
  margin-top: 18px;
}

.currency-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.currency-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: rgba(10, 22, 35, 0.62);
}

.currency-main strong,
.currency-main span,
.currency-badge,
.currency-detail {
  display: block;
}

.currency-main strong {
  color: #dce3ec;
  font-size: 14px;
}

.currency-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.currency-badge {
  align-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.currency-detail {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: 12px;
}

.currency-row.is-current .currency-badge {
  color: #cfe7b9;
  background: rgba(127, 177, 119, 0.16);
}

.currency-row.is-expired .currency-badge {
  color: #f0c1b8;
  background: rgba(174, 83, 70, 0.18);
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.period-card {
  min-height: 148px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: rgba(10, 22, 35, 0.62);
}

.period-card h3 {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.period-card strong {
  display: block;
  color: #dce3ec;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.period-card span {
  display: block;
  margin-top: 7px;
  color: var(--green);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 10px;
}

td {
  color: #aeb9c7;
  font-size: 13px;
}

.status-line {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.status-line.error {
  color: #d99a9a;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1220px) {
  .metric-grid,
  .panel-grid,
  .lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-panel,
  .recent-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 14px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #173047;
  }

  .nav {
    display: flex;
    gap: 8px;
  }

  .sidebar-bottom {
    display: none;
  }

  .brand-mark {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin-left: 0;
    font-size: 27px;
  }

  .nav-link {
    flex: 0 0 auto;
    width: auto;
    height: 38px;
    padding: 0 14px;
  }

  .dashboard {
    padding: 16px;
  }

  .hero {
    min-height: 390px;
    margin: -16px -16px 12px;
  }

  .hero-content,
  .metric-grid,
  .panel-grid,
  .lower-grid,
  .period-grid,
  .aircraft-layout {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 22px 16px;
  }

  .hero-controls {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .hero-controls button {
    grid-column: auto;
  }

  h1 {
    font-size: 42px;
  }

  .route-list {
    margin-left: 0;
  }

}

@media (max-width: 520px) {
  .quick-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .metric-card strong {
    font-size: 31px;
  }

  .hero {
    min-height: 430px;
  }
}
