:root {
  --bg: #050716;
  --panel: rgba(8, 10, 28, .94);
  --panel2: rgba(5, 8, 22, .9);
  --line: rgba(124, 122, 255, .3);
  --text: #f8fafc;
  --muted: #aab6ff;
  --blue: #38bdf8;
  --green: #84cc16;
  --yellow: #facc15;
  --red: #ff1f1f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(124,122,255,.26), transparent 24%),
    radial-gradient(circle at 92% 10%, rgba(56,189,248,.12), transparent 30%),
    linear-gradient(135deg, #030513 0%, #080820 58%, #02030b 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.appShell {
  width: 100vw;
  height: 100vh;
  padding: 14px;
  display: grid;
  grid-template-rows: 160px 104px 1fr;
  gap: 12px;
}

.topBar,
.summaryBand,
.tablePanel {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(10,12,34,.96), rgba(13,12,39,.92));
  box-shadow: 0 22px 70px rgba(0,0,0,.34), inset 0 0 42px rgba(124,122,255,.08);
}

.topBar {
  display: grid;
  grid-template-columns: 1fr minmax(260px, auto);
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  padding: 12px 18px;
}

.brandBlock {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brandLogo {
  width: auto;
  height: 136px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgba(124,122,255,.72))
    drop-shadow(0 0 34px rgba(85,83,214,.38));
}

.eyebrow {
  color: var(--blue);
  font-size: clamp(12px, .95vw, 16px);
  font-weight: 1000;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(42px, 4vw, 78px);
  line-height: .9;
  letter-spacing: 0;
}

.todayLabel {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(15px, 1.1vw, 21px);
  font-weight: 800;
}

.statusPanel {
  justify-self: end;
  text-align: right;
}

.clock {
  font-size: clamp(40px, 3.4vw, 68px);
  font-weight: 1000;
  line-height: .92;
}

.syncStatus {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(13px, 1vw, 18px);
  font-weight: 850;
}

.summaryBand {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 18px;
}

.summaryBand article {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px 22px;
  background: rgba(124,122,255,.06);
}

.summaryBand span {
  color: var(--muted);
  font-size: clamp(12px, .95vw, 16px);
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.summaryBand strong {
  font-size: clamp(32px, 2.8vw, 56px);
  line-height: .9;
}

.tablePanel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 22px;
  overflow: hidden;
}

.tableHeader,
.reservationRow {
  display: grid;
  grid-template-columns: minmax(126px, .66fr) minmax(108px, .5fr) minmax(170px, .78fr) minmax(210px, 1fr) minmax(190px, .9fr) minmax(140px, .68fr);
  gap: 12px;
  align-items: center;
}

.tableHeader {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(124,122,255,.18);
  color: #b8c0ff;
  font-size: clamp(12px, .95vw, 16px);
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.reservationRows {
  min-height: 0;
  overflow: hidden;
  display: grid;
  align-content: start;
  scroll-behavior: auto;
}

.reservationRows.autoScrolling {
  mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.reservationRows::-webkit-scrollbar {
  display: none;
}

.reservationRow {
  min-height: clamp(66px, 8.3vh, 94px);
  padding: 12px 18px;
  border-bottom: 1px solid rgba(124,122,255,.1);
  font-size: clamp(18px, 1.45vw, 30px);
}

.reservationRow:nth-child(odd) {
  background: rgba(124,122,255,.045);
}

.time {
  color: var(--yellow);
  font-weight: 1000;
}

.tail,
.type {
  font-weight: 1000;
}

.type {
  justify-self: start;
  max-width: 100%;
  border-radius: 999px;
  padding: .42em .72em;
  border: 1px solid rgba(255,255,255,.12);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.type.type-dual {
  color: #dbeafe;
  background: rgba(37, 99, 235, .34);
  border-color: rgba(96, 165, 250, .58);
}

.type.type-training {
  color: #1f1300;
  background: #f59e0b;
  border-color: rgba(251, 191, 36, .88);
}

.type.type-rental {
  color: #042f2e;
  background: #14b8a6;
  border-color: rgba(45, 212, 191, .9);
}

.type.type-discovery {
  color: #083344;
  background: #06b6d4;
  border-color: rgba(103, 232, 249, .9);
}

.type.type-student-solo {
  color: #500724;
  background: #f472b6;
  border-color: rgba(251, 207, 232, .95);
}

.type.type-ground {
  color: #1a2e05;
  background: #84cc16;
  border-color: rgba(190, 242, 100, .92);
}

.type.type-maintenance {
  color: #e2e8f0;
  background: #475569;
  border-color: rgba(148, 163, 184, .9);
}

.type.type-checkride {
  color: #f5f3ff;
  background: #7c3aed;
  border-color: rgba(196, 181, 253, .95);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, .2), 0 0 26px rgba(124, 58, 237, .56);
}

.type.type-default {
  color: #e0e7ff;
  background: rgba(100, 116, 139, .4);
}

.person,
.instructor {
  min-width: 0;
  overflow: hidden;
  color: #dbe4ff;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pill {
  justify-self: start;
  min-width: 118px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  color: #07111f;
  background: var(--green);
  font-size: .62em;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.pill.now {
  color: #07111f;
  background: var(--blue);
}

.pill.ended {
  color: #dbe4ff;
  background: #475569;
}

.pill.upcoming {
  background: var(--green);
}

.pill.next {
  background: var(--yellow);
}

.emptyState {
  align-self: center;
  justify-self: center;
  padding: 26px;
  color: #d7d2ff;
  font-size: clamp(26px, 2.3vw, 44px);
  font-weight: 1000;
  text-align: center;
}

@media (max-width: 900px) {
  body { overflow: auto; }

  .appShell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }

  .topBar,
  .summaryBand,
  .tableHeader,
  .reservationRow {
    grid-template-columns: 1fr;
  }

  .statusPanel {
    justify-self: stretch;
    text-align: left;
  }

  .tableHeader {
    display: none;
  }

  .reservationRows {
    overflow: hidden;
  }
}
