:root {
  color-scheme: light;
  --ink: #242b2d;
  --muted: #606967;
  --line: #b7bbb2;
  --line-soft: #d7d9d2;
  --panel: #f3f3eb;
  --panel-2: #e2e3da;
  --page: #d2d4ca;
  --bar: #4a5557;
  --bar-2: #323d42;
  --nav: #203b52;
  --nav-2: #102337;
  --accent: #284e73;
  --accent-2: #80a83f;
  --good: #35764f;
  --bad: #a5483f;
  --shadow: rgba(39, 47, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 25px;
  border: 1px solid #789237;
  border-radius: 2px;
  background: linear-gradient(#c7df81, #8ab247);
  color: #26320f;
  padding: 0 9px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

button:hover {
  background: linear-gradient(#d8eca0, #7fa83a);
}

input,
select {
  width: 100%;
  min-height: 25px;
  border: 1px solid #b7bbb2;
  border-radius: 1px;
  background: #fff;
  padding: 3px 6px;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(38, 52, 59, 0.1);
}

label span {
  display: block;
  margin-bottom: 3px;
  color: #5f665f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 19px;
  line-height: 1.1;
}

h2 {
  font-size: 15px;
}

h3 {
  margin: -8px -8px 8px;
  border-bottom: 1px solid #2a353a;
  background: linear-gradient(var(--bar), var(--bar-2));
  padding: 5px 8px;
  color: #f4f6ee;
  font-size: 11px;
  text-transform: none;
}

.sidebar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  min-height: 78px;
  border-right: 0;
  border-bottom: 1px solid #081826;
  background:
    linear-gradient(180deg, #f4f5ef 0, #e6e8df 31px, #38444b 32px, #22333f 62px, #162633 100%);
  color: #f4fbfc;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 230px 1fr 120px;
  align-items: start;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(31, 48, 57, 0.25);
}

.brand {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  color: #223242;
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand span {
  display: block;
  color: #66716b;
  font-size: 10px;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 28px;
  border: 1px solid #0b2c4d;
  border-radius: 0;
  background: linear-gradient(135deg, #173a61 0, #173a61 52%, #f1f2eb 53%, #f1f2eb 100%);
  color: #fff;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

nav {
  display: flex;
  align-items: end;
  gap: 0;
  min-height: 66px;
  overflow-x: auto;
}

nav a,
.reset button {
  display: inline-flex;
  width: auto;
  min-height: 25px;
  border: 1px solid #7d878a;
  border-bottom-color: #0f1f2d;
  border-radius: 2px 2px 0 0;
  padding: 5px 12px;
  color: #e9ece7;
  text-decoration: none;
  background: linear-gradient(#50616b, #2b3f4c);
  text-align: center;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

nav a:hover,
nav a.active,
.reset button:hover {
  border-color: #9ea8aa;
  background: linear-gradient(#f7f8f2, #d8dbd0);
  color: #172b3c;
}

nav a.active {
  border-left: 1px solid #9ea8aa;
  border-bottom-color: #d2d4ca;
  padding-left: 12px;
  background: linear-gradient(#ffffff, #d9dbd1);
  color: #172b3c;
}

.reset {
  margin-top: 37px;
  justify-self: end;
}

.reset button {
  border-radius: 2px;
  border-color: #aeb3ac;
  background: #f2f3ec;
  color: #33414b;
}

main {
  margin-left: 0;
  padding: 88px 10px 12px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: stretch;
  border: 1px solid #a9afa6;
  border-radius: 0;
  background: linear-gradient(#f8f8f3, #dfded4);
  padding: 7px 10px;
  box-shadow: none;
  min-width: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin: -8px -8px 8px;
  border-bottom: 1px solid #a9afa6;
  background: linear-gradient(#ffffff, #dfe1d7);
  padding: 7px 8px;
}

.eyebrow,
.date {
  color: #56615c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.realtime-pill {
  display: grid;
  align-content: center;
  min-width: 128px;
  border: 1px solid #b8bcb4;
  border-radius: 0;
  background: #f9faf5;
  padding: 5px 8px;
  text-align: right;
}

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

.realtime-pill strong {
  color: #263e52;
}

.advance {
  display: grid;
  grid-template-columns: 96px auto;
  gap: 8px;
  align-items: end;
}

.notice {
  border: 1px solid #d4c485;
  border-left: 4px solid #a88d32;
  border-radius: 0;
  background: #fff9dc;
  padding: 8px 10px;
}

.notice.danger {
  border-color: #cc8d87;
  border-left-color: var(--bad);
  background: #fff1ef;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  padding: 7px;
  box-shadow: none;
  min-width: 0;
}

.stats,
.airport-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.stat,
.subpanel,
.airport-card,
.module-grid article,
.results article,
.map-info,
.segment-grid article,
.aircraft-gallery article,
.finance-strip div,
.ops-strip div {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f8f8f2;
}

.stat,
.subpanel,
.airport-card,
.module-grid article,
.results article,
.segment-grid article,
.finance-strip div,
.ops-strip div {
  padding: 7px;
  min-width: 0;
}

.stat {
  min-height: 58px;
}

.stat span,
.stat small,
.airport-card small,
.fleet-row span,
.results small,
.module-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat strong {
  display: block;
  margin: 5px 0;
  color: #263e52;
  font-size: 15px;
}

.grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.workspace-split {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.workspace-main {
  min-width: 0;
}

.module-rail {
  border: 1px solid var(--line);
  background: #e8e9e0;
  min-width: 0;
}

.module-rail div + div {
  border-top: 1px solid var(--line);
}

.module-rail strong,
.module-rail span {
  display: block;
}

.module-rail strong {
  background: linear-gradient(var(--bar), var(--bar-2));
  color: #f4f6ee;
  padding: 5px 7px;
  font-size: 11px;
}

.module-rail span {
  border-top: 1px solid #d1d4cb;
  padding: 5px 7px 5px 14px;
  color: #33424b;
  font-size: 11px;
}

.module-rail span::before {
  content: "› ";
  color: #738180;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.barrow,
.kv,
.fleet-row {
  display: grid;
  grid-template-columns: 120px 1fr 44px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border-top: 1px solid var(--line-soft);
  padding: 5px 0;
}

.kv {
  grid-template-columns: 1fr auto;
}

.kv small {
  display: block;
  color: var(--muted);
}

.barrow div,
.live-flight div {
  height: 8px;
  border: 1px solid #c7d2d7;
  border-radius: 0;
  background: #e2e3da;
  overflow: hidden;
}

.barrow i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

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

.mapwrap {
  margin-top: 8px;
  border: 1px solid #8e9792;
  border-radius: 0;
  overflow: hidden;
  background: #151d22;
}

.map-layout {
  display: grid;
  grid-template-columns: 1fr 292px;
  gap: 10px;
  margin-top: 8px;
}

.map-layout .mapwrap {
  margin-top: 0;
}

.finder-search {
  max-width: 420px;
}

.finder-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.map-info {
  padding: 10px;
  align-self: stretch;
}

.map-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-info strong {
  display: block;
  margin: 7px 0;
  color: #244554;
}

.map-info p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

svg {
  display: block;
  width: 100%;
  min-height: 260px;
}

svg rect {
  fill: #222a2f;
}

svg text {
  font-size: 11px;
  font-weight: 800;
  fill: #d4d8d4;
}

.airport {
  fill: #7ca1d8;
}

.hub {
  fill: #cfd765;
}

.route-line {
  stroke: #7da6df;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.candidate-line {
  stroke: rgba(125, 166, 223, .45);
  stroke-width: 1.5;
}

.candidate-line.blocked {
  stroke: rgba(165, 72, 63, .32);
  stroke-dasharray: 5 6;
}

.candidate-dot {
  fill: #7da6df;
  stroke: #f8fbfb;
  stroke-width: 1.5;
}

.candidate-dot.blocked {
  fill: var(--bad);
}

.map-click {
  cursor: pointer;
}

.map-click.selected {
  stroke: #111;
  stroke-width: 4;
}

.flight-marker circle {
  fill: #cfd765;
  stroke: #172328;
  stroke-width: 2;
}

.flight-marker text {
  font-size: 10px;
  fill: #172328;
}

.airport-card strong,
.module-grid strong,
.results strong {
  display: block;
  margin-bottom: 4px;
}

.stack,
.planner {
  display: grid;
  gap: 8px;
}

.planner {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
  margin-top: 8px;
}

.finance-strip,
.ops-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.ops-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 8px 0;
}

.finance-strip span,
.ops-strip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-strip strong,
.ops-strip strong {
  display: block;
  margin-top: 5px;
  color: #26343b;
}

.finance-form {
  grid-template-columns: repeat(2, minmax(120px, 1fr)) auto;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.inline-form select {
  min-height: 22px;
  padding: 2px 5px;
}

.inline-form button {
  min-height: 22px;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f8f8f2;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid #e0e1d9;
  padding: 4px 6px;
  text-align: left;
  white-space: nowrap;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  border-bottom-color: #2a353a;
  border-right-color: #626c6d;
  background: linear-gradient(var(--bar), var(--bar-2));
  color: #f4f6ee;
  font-size: 10px;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: #eeeee7;
}

tbody tr:hover {
  background: #f6f5d6;
}

.module-grid,
.segment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.module-grid span {
  color: #9a6818;
  font-weight: 800;
  text-transform: uppercase;
}

.demand-panel {
  margin-top: 10px;
}

.segment-grid {
  display: grid;
  gap: 7px;
}

.segment-grid span,
.segment-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.aircraft-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.aircraft-gallery article {
  overflow: hidden;
}

.aircraft-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #e5e6dd;
}

.aircraft-gallery strong,
.aircraft-gallery span {
  display: block;
  padding: 0 9px;
}

.aircraft-gallery strong {
  padding-top: 8px;
}

.aircraft-gallery span {
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
}

.settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(25, 43, 52, 0.35), rgba(25, 43, 52, 0.92)),
    url("https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=1200&q=80") center/cover;
}

.auth-shell {
  width: min(900px, calc(100vw - 32px));
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 360px;
  border: 1px solid #31464e;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 50px rgba(11, 25, 31, 0.35);
}

.auth-hero {
  min-height: 410px;
  padding: 34px;
  display: grid;
  align-content: end;
  gap: 12px;
  color: #fff;
  background: linear-gradient(rgba(22, 39, 47, 0.18), rgba(22, 39, 47, 0.88));
}

.auth-hero .mark {
  width: 46px;
  height: 46px;
}

.auth-hero h1 {
  font-size: 38px;
}

.auth-hero p {
  max-width: 500px;
  color: #d9e6e9;
  line-height: 1.5;
}

.auth-card {
  padding: 34px;
  align-self: center;
}

.step {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}

.step b {
  padding: 4px 6px;
  border: 1px solid #cbd7dc;
  border-radius: 3px;
  background: #eef4f6;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.step.done b {
  border-color: #add0bb;
  background: #e3f3ea;
  color: var(--good);
}

.result-line {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}

.result-line span {
  color: var(--muted);
}

.live-flight {
  display: grid;
  gap: 5px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}

.live-flight span {
  color: var(--muted);
  font-size: 12px;
}

.live-flight i {
  display: block;
  height: 100%;
  background: var(--accent-2);
}

.reset-inline {
  margin-top: 12px;
}

@media (max-width: 1080px) {
  .stats,
  .airport-grid,
  .module-grid,
  .results,
  .settings,
  .segment-grid,
  .aircraft-gallery,
  .finance-strip,
  .ops-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: 0;
    grid-template-columns: 1fr auto;
    align-items: start;
    padding-bottom: 8px;
  }

  .brand {
    min-height: 42px;
  }

  .reset {
    margin-top: 8px;
  }

  nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 0;
  }

  nav a {
    justify-content: center;
    border-radius: 2px;
  }

  main {
    margin-left: 0;
    padding: 10px;
  }

  .two,
  .planner,
  .map-layout,
  .finder-layout,
  .workspace-split {
    grid-template-columns: 1fr;
  }

  .module-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .module-rail div + div {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .finance-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 12px;
  }

  .topbar,
  .section-head {
    display: grid;
    align-items: start;
  }

  .advance,
  .search,
  .stats,
  .airport-grid,
  .module-grid,
  .results,
  .settings,
  .segment-grid,
  .aircraft-gallery,
  .finance-strip,
  .ops-strip,
  .planner,
  .finance-form {
    grid-template-columns: 1fr;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack button,
  .planner button,
  .search button {
    width: 100%;
  }

  h1 {
    font-size: 22px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .module-rail {
    grid-template-columns: 1fr;
  }

  .module-rail div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .auth-hero {
    min-height: 280px;
  }
}
