/* RMFS Fuel Board – Departures-style board, tuned for TV
   Safe-area padding (overscan), larger text for viewing distance, high contrast. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "JetBrains Mono", "IBM Plex Mono", "Consolas", "Monaco",
    monospace;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
  color: #01456a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
}

/* TV / large display: bigger text so it’s readable from a distance */
@media (min-width: 1920px) {
  body {
    font-size: clamp(22px, 1.4vw, 28px);
  }
}

.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: #fff;
  /* Safe area for TV overscan – keep content away from edges */
  padding-left: max(2rem, 3vw, env(safe-area-inset-left));
  padding-right: max(2rem, 3vw, env(safe-area-inset-right));
}

.dashboard-header {
  flex-shrink: 0;
  padding: 1.5rem 0 1.75rem;
  background: #fff;
  border-bottom: 2px solid #01456a;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.board-logo {
  height: clamp(44px, 5.5vw, 64px);
  width: auto;
  object-fit: contain;
  display: block;
}

.board-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.board-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 800;
  color: #01456a;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.board-subtitle {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
  opacity: 0.9;
  color: #01456a;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

@media (min-width: 1920px) {
  .board-title {
    font-size: clamp(34px, 2.2vw, 44px);
  }
  .board-subtitle {
    font-size: clamp(15px, 1vw, 18px);
  }
}

.dashboard-main {
  flex: 1;
  min-height: 0;
  padding: 2rem 0 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

.fuel-requests-container {
  width: 100%;
  margin: 0;
}

.placeholder {
  color: #01456a;
  font-size: 1.2em;
  padding: 2rem;
  text-transform: none;
}

/* Board table – blue headers, blue text on white */
.board-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: inherit;
  font-size: inherit;
  background: #fff;
}

.board-table th,
.board-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid #01456a;
  vertical-align: middle;
}

.board-table thead th {
  background: #01456a;
  color: #fff;
  font-weight: 800;
  font-size: 1.15em;
  letter-spacing: 0.08em;
  padding: 1.15rem 1.25rem;
  border-bottom: 2px solid #01456a;
}

.board-table tbody td {
  color: #01456a;
  background: #fff;
}

.board-table tbody tr:nth-child(even) td {
  background: #f5f9fc;
}

/* Requested column: late = red, on time = orange, before = green */
.board-table td.time-status-late {
  color: #f44336;
}

.board-table td.time-status-ontime {
  color: #ff9800;
}

.board-table td.time-status-before {
  color: #4caf50;
}

.dashboard-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  background: #fff;
  border-top: 1px solid #01456a;
  font-size: clamp(0.85em, 1.2vw, 1em);
  color: #01456a;
  text-transform: none;
}

.last-updated {
  font-variant-numeric: tabular-nums;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  display: none;
}

.status-dot.ok {
  background: #4caf50;
  animation: status-pulse 1.5s ease-in-out infinite;
}

.status-dot.error {
  background: #f44336;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.25);
  }
}

.status-text {
  color: #4caf50;
}

.status-text.error {
  color: #f44336;
}

/* Error banner when live update fails */
.error-banner {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #ffcdd2;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.95em;
}
