:root {
  --terminal-blue: #06194a;
  --terminal-row: #08111d;
  --terminal-white: #e7f0ff;
  --terminal-cyan: #4de8f7;
  --terminal-green: #65de67;
  --terminal-yellow: #f2cf4b;
  --terminal-red: #f25b62;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: #000;
  color: var(--terminal-white);
  font-family: "Courier New", Courier, monospace;
  text-transform: uppercase;
}

.terminal-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #02060b;
}

.masthead {
  flex: 0 0 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: linear-gradient(135deg, #081a3d 0%, #123a73 100%);
  border-bottom: 2px solid #dbeaff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .8);
}

.brand { display: flex; align-items: center; gap: 18px; }
.plane-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 3px solid #f0f6ff;
  border-radius: 7px;
  box-shadow: inset 0 0 10px rgba(255,255,255,.12);
}
.plane-icon svg { width: 48px; height: 48px; fill: #eaf3ff; }
.masthead h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); font-weight: 700; letter-spacing: 1px; }
.terminal-name { align-self: flex-end; margin-bottom: 18px; font-size: clamp(24px, 3vw, 38px); font-weight: 700; }

.tabs {
  flex: 0 0 54px;
  display: flex;
  background: #02050a;
  border-bottom: 2px solid #1d2c3c;
}
.tab {
  min-width: 210px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border: 0;
  border-right: 1px solid #202c38;
  color: #7388a2;
  background: #05090e;
  font: 700 18px "Courier New", monospace;
  text-transform: uppercase;
  cursor: pointer;
}
.tab strong {
  min-width: 28px;
  color: #7388a2;
  font-size: 16px;
  text-align: right;
}
.tab.active {
  color: #fff;
  background: #0a1b33;
  box-shadow: inset 0 -3px 0 var(--terminal-cyan);
}
.tab.active strong { color: var(--terminal-cyan); }
.board-panel {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  background: #02060b;
}
.board-heading,
.flight-row {
  display: grid;
  grid-template-columns: .9fr 2.15fr 1.1fr .55fr 1.35fr;
  align-items: center;
  column-gap: 16px;
  padding: 0 34px;
}
.board-heading {
  height: 64px;
  color: var(--terminal-cyan);
  background: #02060b;
  border-bottom: 1px solid #1b2630;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}
.flight-row {
  min-height: 67px;
  border-bottom: 1px solid #101923;
  color: #dcecff;
  font-size: clamp(20px, 2.25vw, 30px);
  font-weight: 700;
  letter-spacing: .5px;
  text-shadow: 1px 1px 0 #000;
}
.flight-row:nth-child(even) { background: rgba(255, 255, 255, .018); }
.flight-row:hover { background: #0b1724; }
.time-cell { color: var(--terminal-white); }
.origin-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flight-number { color: #f2f7ff; }
.gate-cell { color: var(--terminal-cyan); }
.status {
  width: fit-content;
  color: var(--terminal-green);
  font-weight: 700;
  white-space: nowrap;
}
.status.delayed { color: var(--terminal-yellow); }
.status.boarding { color: var(--terminal-cyan); }
.status.cancelled { color: var(--terminal-red); }
.status.arrived { color: var(--terminal-green); }

.empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: #71829a;
  text-align: center;
  font-size: 21px;
  letter-spacing: 1px;
}

.status-bar {
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  color: #647891;
  background: #02060b;
  border-top: 1px solid #1b2630;
  font-size: 12px;
  letter-spacing: 1px;
}
.status-bar div { display: flex; align-items: center; gap: 9px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terminal-green); box-shadow: 0 0 8px rgba(101,222,103,.7); }

@media (max-width: 760px) {
  .masthead { height: 88px; flex-basis: 88px; padding: 0 14px; }
  .plane-icon { width: 48px; height: 48px; }
  .plane-icon svg { width: 36px; }
  .terminal-name { font-size: 20px; }
  .tabs { height: 50px; flex-basis: 50px; }
  .tab { min-width: 0; flex: 1; padding: 0 12px; font-size: 14px; }
  .tab strong { display: none; }
  .board-heading { display: none; }
  .flight-row {
    min-height: 76px;
    grid-template-columns: .7fr 1.35fr 1fr .6fr 1.25fr;
    column-gap: 7px;
    padding: 0 12px;
    font-size: clamp(13px, 3.8vw, 20px);
  }
  .status-bar { padding: 0 12px; }
  #updated-label { display: none; }
}
