@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Roboto-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Roboto-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Roboto-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/RobotoMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/RobotoMono-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/RobotoMono-Bold.woff2') format('woff2');
}

:root {
  --bg-0: #000000;
  --bg-1: #101010;
  --bg-2: #171717;
  --bg-3: #232323;
  --line: #3a3a3a;
  --line-strong: #525252;
  --text: #ffffff;
  --text-dim: #dddddd;
  --text-secondary: rgb(255 255 255 / 38%);
  --chip-bg: rgb(255 255 255 / 4%);
  --chip-border: rgb(255 255 255 / 12%);
  --chip-bg-strong: rgb(255 255 255 / 6%);
  --chip-border-strong: rgb(255 255 255 / 16%);
  --roster-row-gap: 5px;
  --roster-altitude-top-gap: 10px;
  --roster-altitude-group-gap: 24px;
  --token-control-height: 58px;
  --token-captcha-max-height: 100px;
  --warning: #ffd54a;
  --tablo-ready-15-bg: #bdf1b5;
  --tablo-ready-15-border: #7ec977;
  --tablo-ready-10-bg: #fff0a8;
  --tablo-ready-10-border: #cfb94a;
  --tablo-ready-5-bg: rgb(255 77 79 / 16%);
  --tablo-ready-5-border: rgb(255 77 79 / 45%);
  --tablo-ready-5-text: #ff4d4f;
  --tablo-alert-text: #ff4d4f;
  --tablo-accent-text-dark: #151515;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 15% 0%, #0f0f0f 0%, var(--bg-0) 56%);
  color: var(--text);
  font-family: 'Roboto', 'Segoe UI', sans-serif;
}

#viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: block;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 4px 6px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 4px;
  background:
    linear-gradient(145deg, rgb(8 8 8 / 96%), rgb(2 2 2 / 98%)),
    radial-gradient(circle at 88% 4%, rgb(72 72 72 / 12%), transparent 34%);
  border: 0;
}

html.tablo-mobile-force-landscape #viewport {
  width: var(--tablo-mobile-viewport-width, 100vw);
  height: var(--tablo-mobile-viewport-height, 100dvh);
}

html.tablo-mobile-force-landscape #stage {
  width: var(--tablo-mobile-landscape-width, 100vw);
  height: var(--tablo-mobile-landscape-height, 100dvh);
}

html.tablo-mobile-force-landscape-rotated #stage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

.topbar {
  display: grid;
  grid-template-columns: 0.85fr 3.3fr 0.85fr;
  gap: 4px;
}

.topbar > .status-block:not(.status-block--weather):not(.status-block-right) {
  grid-column: 1;
}

.status-block {
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 6px 10px;
  min-height: 66px;
  min-width: 0;
}

.topbar > .status-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
}

.status-block--weather {
  position: relative;
  grid-column: 2;
}

.status-block--weather-with-direction {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    'label direction'
    'value direction';
  column-gap: 10px;
  align-items: end;
}

.status-block--weather-with-direction .label {
  grid-area: label;
  align-self: start;
}

.status-block--weather-with-direction #weather-value {
  grid-area: value;
  align-self: end;
}

.status-block--weather-with-direction #weather-direction-dock {
  grid-area: direction;
  align-self: end;
}

.topbar.topbar--shift-hidden .status-block--weather {
  grid-column: 1 / 3;
}

.topbar.topbar--sse-hidden .status-block--weather {
  grid-column: 2 / 4;
}

.topbar.topbar--shift-hidden.topbar--sse-hidden .status-block--weather {
  grid-column: 1 / 4;
}

.status-block-right {
  grid-column: 3;
  text-align: right;
}

.label {
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.value,
.topbar-value {
  margin-top: 3px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.topbar > .status-block > .value,
.topbar > .status-block > .topbar-value {
  margin-top: 0;
  align-self: end;
}

.flights-grid {
  margin-top: 4px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: rgb(1 1 1);
}

.flight-card {
  --tablo-roster-scale: 1;
  --tablo-roster-row-gap: clamp(2px, calc(var(--roster-row-gap) * var(--tablo-roster-scale)), 9px);
  --tablo-roster-altitude-top-gap: clamp(6px, calc(var(--roster-altitude-top-gap) * var(--tablo-roster-scale)), 16px);
  --tablo-roster-altitude-group-gap: clamp(12px, calc(var(--roster-altitude-group-gap) * var(--tablo-roster-scale)), 30px);
  --tablo-roster-slot-column-width: 2ch;
  --tablo-roster-slot-font-size: calc(18px * var(--tablo-roster-scale));
  --tablo-roster-altitude-font-size: calc(12px * var(--tablo-roster-scale));
  --tablo-roster-name-font-size: calc(20px * var(--tablo-roster-scale));
  --tablo-roster-chip-font-size: calc(14px * var(--tablo-roster-scale));
  --tablo-roster-chip-text-font-size: calc(12px * var(--tablo-roster-scale));
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 4px;
  background: linear-gradient(180deg, #0d0d0d, #040404);
  border: 1px solid var(--line);
  padding: 6px;
  overflow: hidden;
}

.flight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
}

.flight-number {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.flight-number-label {
  font-size: 0.9em;
}

.flight-number-value {
  font-size: 1em;
}

.flight-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 15.4px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  /* Status must yield space to flight number when cards get narrow (e.g. 6 flights visible). */
  flex: 0 2 auto;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.flight-status-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

.flight-status--ready-15 {
  color: var(--tablo-accent-text-dark);
  border-color: var(--tablo-ready-15-border);
  background: var(--tablo-ready-15-bg);
}

.flight-status--ready-10 {
  color: var(--tablo-accent-text-dark);
  border-color: var(--tablo-ready-10-border);
  background: var(--tablo-ready-10-bg);
}

.flight-status--ready-5 {
  color: var(--tablo-ready-5-text);
  border-color: var(--tablo-ready-5-border);
  background: var(--tablo-ready-5-bg);
}

.flight-load {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  font-size: 11.2px;
  color: var(--text);
  letter-spacing: 0.08em;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.flight-load-label {
  color: var(--text-secondary);
}

.participants {
  border-top: 1px solid var(--line);
  padding-top: var(--tablo-roster-row-gap);
  display: grid;
  grid-auto-rows: min-content;
  gap: var(--tablo-roster-row-gap);
  overflow: hidden;
}

.participant-row {
  display: grid;
  grid-template-columns: var(--tablo-roster-slot-column-width) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.participant-row--without-ordinal {
  grid-template-columns: minmax(0, 1fr) auto;
}

.participant-row--without-role {
  grid-template-columns: var(--tablo-roster-slot-column-width) minmax(0, 1fr);
}

.participant-row--without-ordinal.participant-row--without-role {
  grid-template-columns: minmax(0, 1fr);
}

.participant-slot-no {
  min-width: 0;
  padding-right: 0.44em;
  font-size: var(--tablo-roster-slot-font-size);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  text-align: right;
}

.altitude-group-header {
  margin-top: calc(var(--tablo-roster-altitude-top-gap) - var(--tablo-roster-row-gap));
  text-align: center;
  font-size: var(--tablo-roster-altitude-font-size);
  line-height: 1.05;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  transform-origin: center center;
}

.altitude-group-header--separated {
  margin-top: calc(var(--tablo-roster-altitude-group-gap) - var(--tablo-roster-row-gap));
}

.participant-name {
  min-width: 0;
  font-size: var(--tablo-roster-name-font-size);
  line-height: 1.06;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  transform-origin: left center;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 0;
  min-width: 0;
  padding: 2px 2px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--text-secondary);
  font-size: var(--tablo-roster-chip-font-size);
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chip--filled {
  background: var(--chip-bg-strong);
  border-color: var(--chip-border-strong);
}

.chip--outline {
  background: transparent;
  border-color: var(--chip-border);
}

.chip-text {
  font-size: var(--tablo-roster-chip-text-font-size);
  line-height: 1;
  letter-spacing: 0.06em;
}

.weather-inline {
  display: inline-flex;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
}

.weather-primary-text {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.42em;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  flex: 0 0 auto;
}

.weather-metric {
  min-width: 0;
  flex: 0 0 auto;
}

.weather-metric--alert {
  color: var(--tablo-alert-text);
}

.weather-separator {
  color: var(--text);
  flex: 0 0 auto;
}

.weather-direction-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.52em;
  flex: 0 0 auto;
}

.weather-direction-deg {
  font-variant-numeric: tabular-nums;
}

.wind-compass {
  position: relative;
  width: 2.5em;
  height: 2.5em;
  flex: 0 0 auto;
}

.wind-compass-mark {
  position: absolute;
  font-size: 0.28em;
  line-height: 1;
  color: var(--text);
  pointer-events: none;
}

.wind-compass-mark--n {
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
}

.wind-compass-mark--e {
  right: 0;
  top: 50%;
  transform: translate(0, -50%);
}

.wind-compass-mark--s {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0);
}

.wind-compass-mark--w {
  left: 0;
  top: 50%;
  transform: translate(0, -50%);
}

.wind-compass-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.8em;
  height: 1.3em;
  transform-origin: 50% 50%;
  transition: transform 260ms ease-in-out;
  animation: wind-compass-arrow-pulse 1.8s ease-in-out infinite;
  color: var(--text);
}

.wind-compass-arrow::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.13em;
  width: 2px;
  height: 0.58em;
  background: currentcolor;
  transform: translateX(-50%);
  border-radius: 1px;
}

.wind-compass-arrow::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0.03em;
  width: 0;
  height: 0;
  border-left: 0.21em solid transparent;
  border-right: 0.21em solid transparent;
  border-bottom: 0.31em solid currentcolor;
  transform: translateX(-50%);
}

@keyframes wind-compass-arrow-pulse {
  0% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.82;
  }
}

.weather-direction-dock {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 146px;
  max-width: 154px;
  pointer-events: none;
}

.weather-direction-dock .weather-direction-inline {
  justify-content: flex-end;
  font-size: 22px;
}

.weather-direction-dock .weather-direction-deg {
  min-width: 5.2ch;
  text-align: right;
}

html.tablo-mobile-compact #stage {
  padding: 3px 4px;
  gap: 3px;
}

html.tablo-mobile-compact .topbar,
html.tablo-mobile-compact .flights-grid {
  gap: 3px;
}

html.tablo-mobile-compact .flights-grid {
  margin-top: 3px;
}

html.tablo-mobile-compact .status-block {
  padding: 4px 8px;
  min-height: 56px;
}

html.tablo-mobile-compact .label {
  font-size: 12px;
}

html.tablo-mobile-compact .value,
html.tablo-mobile-compact .topbar-value {
  margin-top: 2px;
  line-height: 1.02;
}

html.tablo-mobile-compact .topbar > .status-block > .value,
html.tablo-mobile-compact .topbar > .status-block > .topbar-value {
  margin-top: 0;
}

html.tablo-mobile-compact .status-block--weather-with-direction {
  column-gap: 6px;
}

html.tablo-mobile-compact .weather-primary-text {
  gap: 0.28em;
}

html.tablo-mobile-compact .weather-direction-dock {
  min-width: 118px;
  max-width: 124px;
}

html.tablo-mobile-compact .weather-direction-dock .weather-direction-inline {
  gap: 0.38em;
  font-size: 18px;
}

html.tablo-mobile-compact .weather-direction-dock .weather-direction-deg {
  min-width: 4.5ch;
}

html.tablo-mobile-compact .wind-compass {
  width: 2.15em;
  height: 2.15em;
}

html.tablo-mobile-compact .flight-header {
  gap: 6px;
}

html.tablo-mobile-compact .flight-status {
  padding: 3px 7px;
}

html.tablo-ios-phone-compact .flight-card {
  padding-left: 4px;
  padding-right: 4px;
}

html.tablo-ios-phone-compact .participant-row {
  gap: 4px;
}

html.tablo-ios-phone-compact .participant-name {
  text-overflow: ellipsis;
}

#weather-block.weather-flash .label,
#weather-block.weather-flash .value {
  animation: weather-text-flash 420ms ease-out 1;
}

@keyframes weather-text-flash {
  0% {
    text-shadow: 0 0 0 rgb(255 255 255 / 0%);
  }
  35% {
    text-shadow: 0 0 12px rgb(255 255 255 / 85%);
  }
  100% {
    text-shadow: 0 0 0 rgb(255 255 255 / 0%);
  }
}

.value--shift-warning {
  color: var(--warning);
}

.locked-mask {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 24px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.1em;
}

.empty-state {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--text-dim);
  border: 1px dashed var(--line);
  background: var(--bg-1);
}

.empty-state--shift-closed {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(34px, 4vw, 64px);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.closed-shift-scene {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.closed-shift-scene-title-slot {
  position: absolute;
  inset: 0 0 50% 0;
  display: grid;
  place-items: center;
  padding: 0 6vw;
  z-index: 1;
  pointer-events: none;
}

.closed-shift-scene-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(32px, 3.8vw, 64px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 6px 28px rgb(0 0 0 / 45%);
}

.closed-shift-scene-animation-slot {
  position: absolute;
  inset: 50% 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.closed-shift-scene-animation {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  z-index: 20;
}

.auth-gate-panel {
  display: grid;
  grid-template-columns: minmax(320px, 360px);
  justify-content: center;
  gap: 12px;
  width: min(100%, 420px);
  padding: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgb(14 14 14 / 96%), rgb(5 5 5 / 98%)),
    radial-gradient(circle at 12% 0%, rgb(74 74 74 / 14%), transparent 38%);
  box-shadow: 0 12px 36px rgb(0 0 0 / 42%);
  pointer-events: auto;
}

.auth-gate.auth-gate--captcha-visible .auth-gate-panel {
  grid-template-columns: minmax(320px, 360px);
  align-items: stretch;
  width: min(100%, 420px);
}

.auth-token-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  min-width: 0;
}

.auth-token-label {
  padding-left: 2px;
}

.auth-token-field input {
  width: 100%;
  height: var(--token-control-height);
  border: 1px solid var(--line-strong);
  background: #0f0f0f;
  color: var(--text);
  padding: 0 14px;
  font-size: 18px;
  font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, monospace;
}

.auth-token-field input:focus {
  outline: none;
  border-color: #7a7a7a;
  box-shadow: 0 0 0 1px rgb(122 122 122 / 42%);
}

.token-captcha-slot {
  display: none;
  min-height: var(--token-control-height);
  max-height: var(--token-captcha-max-height);
  border: 1px solid var(--line-strong);
  background: #0f0f0f;
  border-radius: 2px;
  overflow: hidden;
  align-items: flex-start;
  justify-content: stretch;
  min-width: 0;
  max-width: none;
  width: 100%;
}

.token-captcha-slot.is-visible {
  display: flex;
  pointer-events: auto;
}

.token-captcha-widget {
  position: relative;
  width: 100%;
  min-height: inherit;
  max-height: inherit;
  display: block;
  overflow: hidden;
}

.token-captcha-widget > * {
  width: 100%;
  max-width: 100%;
  max-height: inherit;
}

.token-captcha-widget iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: inherit;
  border: 0;
}

.sse-error-block {
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-dim);
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  max-height: 64px;
  overflow-y: auto;
}

.hidden-block {
  display: none !important;
}

@media (max-width: 1600px) {
  .token-captcha-slot {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 860px) {
  .auth-gate.auth-gate--captcha-visible .auth-gate-panel {
    grid-template-columns: minmax(280px, 360px);
    width: min(100%, 420px);
  }

  .token-captcha-slot {
    min-width: 0;
    max-width: none;
  }
}
