:root {
  color-scheme: light;
  --bg: #eef2f5;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --ink: #17202a;
  --muted: #667382;
  --line: #d9e0e7;
  --airbus-blue: #153e75;
  --navy: #0c1f33;
  --cyan: #2aa6b8;
  --green: #20835a;
  --amber: #b66d00;
  --red: #b8443f;
  --shadow: 0 18px 40px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(21, 62, 117, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(21, 62, 117, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  color: #f6fbff;
  background: linear-gradient(180deg, var(--navy), #102b49);
}

.brand {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(42, 166, 184, 0.22);
  font-size: 0.82rem;
  font-weight: 800;
}

.brand h1,
.topbar h2,
.panel h3 {
  margin: 0;
}

.brand h1 {
  font-size: 1.18rem;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: rgba(246, 251, 255, 0.62);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-link {
  border-radius: 8px;
  padding: 11px 12px;
  color: rgba(246, 251, 255, 0.74);
  font-size: 0.93rem;
  font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-card strong,
.sidebar-card span {
  display: block;
}

.sidebar-card span {
  margin-top: 6px;
  color: rgba(246, 251, 255, 0.66);
  font-size: 0.86rem;
}

.dashboard {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.crew-panel {
  display: grid;
  min-width: 230px;
  grid-template-columns: 42px 1fr;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.crew-panel span {
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--airbus-blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.crew-panel strong {
  align-self: center;
  font-size: 0.95rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-strip article,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.status-strip article {
  padding: 16px;
}

.status-strip span,
.metric-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-strip strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 1.2rem;
}

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

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 16px;
}

.panel {
  padding: 18px;
}

.wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 1.12rem;
  line-height: 1.2;
}

.badge {
  flex: 0 0 auto;
  border: 1px solid #b8d9df;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0b6473;
  background: #e9f8fb;
  font-size: 0.74rem;
  font-weight: 800;
}

.badge.amber {
  border-color: #efd0a3;
  color: var(--amber);
  background: #fff5e5;
}

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

.phase {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--panel-soft);
}

.phase span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #e4e9ee;
  font-size: 0.84rem;
  font-weight: 900;
}

.phase strong,
.phase small {
  display: block;
}

.phase strong {
  margin-top: 18px;
}

.phase.complete span,
.phase.current span {
  color: #ffffff;
  background: var(--green);
}

.phase.current {
  border-color: rgba(42, 166, 184, 0.7);
  background: linear-gradient(180deg, #ecfbfd, #ffffff);
}

.phase.current span {
  background: var(--cyan);
}

.timeline {
  display: grid;
  gap: 12px;
}

.event {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 13px;
  border-left: 3px solid var(--line);
  padding-left: 12px;
}

.event.active {
  border-color: var(--cyan);
}

.event.checkride {
  border-color: var(--airbus-blue);
}

.event time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.event strong,
.event p {
  margin: 0;
}

.event p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.schedule-table th,
.schedule-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.schedule-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.schedule-table tr:last-child td {
  border-bottom: 0;
}

.status-good {
  color: var(--green);
}

.status-warn {
  color: var(--amber);
}

.task-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: #263342;
  line-height: 1.38;
}

.checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #aeb9c4;
  border-radius: 5px;
}

.checkbox.done {
  border-color: var(--green);
  background:
    linear-gradient(135deg, transparent 46%, #ffffff 47% 58%, transparent 59%),
    var(--green);
}

.exam-list {
  display: grid;
  gap: 10px;
}

.exam {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.exam span {
  grid-row: span 2;
  align-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.exam.pass span {
  color: #ffffff;
  background: var(--green);
}

.exam.fail span {
  color: #ffffff;
  background: var(--red);
}

.exam.pending span {
  color: var(--amber);
  background: #fff0d6;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.notes article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.notes time {
  color: var(--airbus-blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.notes p {
  margin: 9px 0 0;
  color: #334151;
  font-size: 0.92rem;
  line-height: 1.5;
}

.metrics {
  grid-column: 1 / -1;
}

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

.metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.metric-grid strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 1.55rem;
  line-height: 1;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

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

  .status-strip,
  .phase-rail,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dashboard,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-head {
    display: grid;
  }

  .crew-panel {
    min-width: 0;
  }

  .nav-list,
  .status-strip,
  .phase-rail,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .event {
    grid-template-columns: 1fr;
  }

  .schedule-table {
    font-size: 0.82rem;
  }
}
