/* REVISION: 20 */
:root {
  --bg: #edf3f8;
  --bg-2: #dbe7f2;
  --panel: #ffffff;
  --ink: #152a3c;
  --muted: #607386;
  --line: #9eb6c8;
  --nav: #133150;
  --nav-2: #2e5e99;
  --accent: var(--nav-2);
  --accent-2: #6e8faa;
  --paper: #ffffff;
  --sand: #ead8a8;
  --green: #1f7a4a;
  --yellow: #ad7d0a;
  --red: #cf3e33;
  --magenta: #9f2c78;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /*font-family: "Book Antiqua", "Goudy Old Style", Palatino, "Palatino Linotype", "Baskerville Old Face", "Times New Roman", serif;*/
  font-family: Palatino, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(46, 94, 153, 0.14), transparent 24rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

a {
  color: var(--nav-2);
}

.site-header {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--nav) 0%, var(--nav-2) 100%);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.brand h1 {
  margin: 0;
  font-size: 1.55rem;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header .brand-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.site-nav a {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
}

.site-nav .nav-link-disabled {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  user-select: none;
}

.site-nav a.active {
  background: rgba(255, 255, 255, 0.18);
}

.nav-user {
  padding: 0.35rem 0.2rem 0.35rem 0.6rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--nav);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.page-shell {
  width: min(1200px, calc(100% - 1.4rem));
  margin: 1.25rem auto 3rem;
}

.site-footer {
  border-top: 1px solid rgba(19, 49, 80, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.site-footer-inner {
  width: min(1200px, calc(100% - 1.4rem));
  margin: 0 auto;
  padding: 0.8rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer-inner a {
  color: var(--nav-2);
  text-decoration: none;
}

.site-footer-inner a:hover {
  text-decoration: underline;
}

.site-footer-inner > :last-child {
  margin-left: auto;
  text-align: right;
}

.panel {
  display: grid;
  gap: 1rem;
}

.panel.narrow {
  max-width: 28rem;
}

.disclaimer-card {
  text-align: center;
}

.disclaimer-card p:last-of-type {
  max-width: 24rem;
  margin: 0 auto 1rem;
}

.card,
.hero-strip {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(21, 42, 60, 0.08);
}

.hero-strip,
.section-bar,
.flight-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

button,
.button-link {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--nav-2);
  color: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

button:disabled,
button[disabled],
.button-link[aria-disabled="true"] {
  opacity: 0.46;
  cursor: not-allowed;
  filter: saturate(0.45);
  box-shadow: none;
}

button.secondary,
.button-link.ghost {
  background: transparent;
  color: var(--nav-2);
  border: 1px solid var(--nav-2);
}

.dashboard-grid,
.split-grid,
.wb-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-status-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.wb-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.9fr);
  align-items: start;
}

.workspace-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 260px 1fr;
}

.workspace-main {
  display: grid;
  gap: 1rem;
}

.auth-card,
.kv-list,
.result-list {
  display: grid;
  gap: 0.8rem;
}

.notice-banner {
  border-color: var(--green);
  color: var(--green);
}

.maintenance-banner {
  margin-bottom: 1rem;
}

.maintenance-banner-grid {
  display: grid;
  gap: 0.35rem;
}

.maintenance-banner p {
  margin: 0.2rem 0 0;
}

.maintenance-banner-label {
  font-weight: 700;
}

.dashboard-ready-details {
  margin-top: 0.55rem;
}

.dashboard-ready-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--green);
}

.dashboard-ready-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
}

.dashboard-ready-meta div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.5rem;
}

.dashboard-ready-meta dt {
  font-weight: 700;
}

.dashboard-ready-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-airports-status-head,
.admin-airports-ready-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin-airports-status-main {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.admin-airports-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.admin-airports-status-chip {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  min-width: 8rem;
}

.admin-airports-status-row > p,
.admin-airports-status-row > div > p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-airports-page .panel-header > div {
  min-width: 0;
}

.admin-airports-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-airports-page code,
.admin-airports-page .data-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-airports-runs-table .admin-airports-runs-col-source {
  width: 6.75em;
}

.admin-airports-runs-table .admin-airports-runs-col-cycle {
  width: 4.5em;
}

.admin-airports-runs-table .admin-airports-runs-col-status {
  width: 7em;
}

.admin-airports-runs-table .admin-airports-runs-col-started,
.admin-airports-runs-table .admin-airports-runs-col-finished {
  width: 6.4em;
}

.admin-airports-runs-table .admin-airports-runs-col-log {
  width: 12em;
}

.data-table.admin-airports-runs-table th,
.data-table.admin-airports-runs-table td {
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}

.admin-airports-runs-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #2e5e99;
}

.data-table.admin-airports-runs-table th,
.data-table.admin-airports-runs-table td {
  border-right: 1px solid #dae1e7;
  border-bottom: 1px solid #3a5c95;
}

.admin-airports-runs-table th:last-child,
.admin-airports-runs-table td:last-child {
  border-right: 0;
}

.admin-airports-runs-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-airports-runs-datetime {
  white-space: nowrap;
}

.error-banner {
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 640px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

label span {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.kv-list {
  margin: 0;
}

.kv-list div,
.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #d8e1e8;
}

.kv-list dt,
.result-list dt {
  font-weight: 700;
}

.kv-list dd,
.result-list dd {
  margin: 0;
}

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

.data-table th,
.data-table td {
  padding: 0.7rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #d8e1e8;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.35em;
  border-radius: 999px;
  background: #dbe7f2;
}

.admin-airports-runs-status-processing {
  font-size: calc(1em - 1pt);
}

.pill-green,
.status-green {
  background: rgba(31, 122, 74, 0.12);
  color: var(--green);
}

.pill-yellow,
.status-yellow {
  background: rgba(173, 125, 10, 0.14);
  color: var(--yellow);
}

.pill-red,
.status-red {
  background: rgba(179, 58, 47, 0.12);
  color: var(--red);
}

.pill-magenta,
.status-magenta {
  background: rgba(159, 44, 120, 0.12);
  color: var(--magenta);
}

.pill-info,
.status-info {
  background: #e6e6e6;
  color: #444444;
}

.status-card-list {
  display: grid;
  gap: 0.8rem;
}

.status-card {
  border-left: 6px solid currentColor;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.status-card p {
  margin-bottom: 0;
}

.rail-card ul {
  padding-left: 1.15rem;
}

.wb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.wb-card,
.wb-summary-card {
  padding: 1rem 1rem 1.1rem;
}

.wb-card-head h3,
.wb-summary-card h3,
.graph-panel h4 {
  margin: 0;
}

.wb-card-head p,
.wb-summary-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.wb-form {
  margin-top: 0.8rem;
}

.wb-airframe {
  position: relative;
  min-height: 43rem;
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(46, 94, 153, 0.14), transparent 7rem),
    linear-gradient(180deg, #f9fbfd 0%, #edf3f8 100%);
}

.wb-fuselage,
.wb-tail,
.wb-wing,
.wb-tailplane {
  position: absolute;
  background: linear-gradient(180deg, #d9e5ef 0%, #c0d2e1 100%);
  border: 1px solid rgba(19, 49, 80, 0.18);
}

.wb-fuselage {
  left: 40.5%;
  top: 3%;
  width: 19%;
  height: 86%;
  border-radius: 999px;
  z-index: 1;
}

.wb-tail {
  left: 47%;
  top: 83%;
  width: 6%;
  height: 12%;
  border-radius: 0 0 18px 18px;
  z-index: 1;
}

.wb-wing {
  top: 30%;
  width: 42%;
  height: 16%;
  border-radius: 999px;
}

.wb-wing-left {
  left: 3%;
}

.wb-wing-right {
  right: 3%;
}

.wb-tailplane {
  top: 84%;
  width: 24%;
  height: 4.8%;
  border-radius: 999px;
  background: linear-gradient(180deg, #d9e5ef 0%, #c0d2e1 100%);
  border: 1px solid rgba(19, 49, 80, 0.18);
  z-index: 1;
}

.wb-tailplane-left {
  left: 22%;
}

.wb-tailplane-right {
  right: 22%;
}

.wb-bucket-card {
  position: absolute;
  width: 6.7rem;
  min-height: 4.9rem;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.16rem;
  padding: 0.34rem 0.38rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(21, 42, 60, 0.08);
  z-index: 2;
}

.wb-slot-seat {
  width: 6.5rem;
  min-height: 5.4rem;
  border-radius: 28px 28px 16px 16px;
}

.wb-slot-baggage {
  width: 7.3rem;
  min-height: 4.8rem;
}

.wb-slot-hat-rack {
  width: 6.9rem;
  min-height: 4.4rem;
  border-radius: 14px;
}

.wb-slot-fuel {
  width: 7.1rem;
  min-height: 4.5rem;
  border-radius: 999px;
}

.wb-slot-generic {
  background: rgba(255, 255, 255, 0.98);
}

.wb-bucket-head strong {
  display: block;
  width: 100%;
  font-size: 0.7rem;
  line-height: 1.15;
  text-align: center;
}

.wb-inline-field span {
  color: var(--muted);
}

.wb-inline-field span {
  display: block;
  margin-bottom: 0.08rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wb-inline-field input {
  padding: 0.24rem 0.34rem;
  border-radius: 8px;
  font-size: 0.74rem;
}

.wb-summary-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.9rem 0 0;
}

.wb-summary-grid div {
  padding: 0.7rem 0.75rem;
  border: 1px solid #d8e1e8;
  border-radius: 14px;
  background: #f8fbfd;
}

.wb-summary-grid dt {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.wb-summary-grid dd {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.graph-panel {
  margin-top: 1rem;
}

.graph-placeholder {
  min-height: 15rem;
  border: 2px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(0deg, rgba(46, 94, 153, 0.08), rgba(46, 94, 153, 0.02)),
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(46, 94, 153, 0.08) 31px, rgba(46, 94, 153, 0.08) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(46, 94, 153, 0.08) 31px, rgba(46, 94, 153, 0.08) 32px);
}

.wb-graph-panel {
  margin-top: 0.9rem;
}

.wb-graph-placeholder {
  min-height: 11rem;
}

@media (min-width: 901px) {
  .site-header {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .site-nav {
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .dashboard-grid,
  .split-grid,
  .wb-grid,
  .workspace-grid,
  .wb-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
  }

  .site-header,
  .hero-strip,
  .section-bar,
  .flight-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .wb-airframe {
    min-height: 62rem;
  }

  .wb-bucket-card {
    width: 8.4rem;
  }

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid #d8e1e8;
  }

  .data-table td {
    border: 0;
    padding: 0.25rem 0;
  }

  .dashboard-ready-meta div {
    grid-template-columns: 1fr;
    gap: 0.08rem;
  }

  .admin-airports-status-head,
  .admin-airports-ready-head {
    grid-template-columns: 1fr;
  }

  .admin-airports-status-row {
    grid-template-columns: 1fr;
  }

  .admin-airports-status-chip {
    justify-self: start;
  }
}
