/* Dispatch dashboard styles — extends theme.css */

.dispatch-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  min-height: calc(100vh - 65px);
  align-items: start;
}

.dispatch-col { border-right: 1px solid var(--border); }
.dispatch-col:last-child { border-right: none; }

.dispatch-col--feed { position: sticky; top: 0; height: 100vh; overflow-y: auto; }

.dispatch-panel { border-bottom: 1px solid var(--border); }
.dispatch-panel:last-child { border-bottom: none; }

.dispatch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}

.dispatch-panel-label {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Live dot */
.live-dot {
  width: 7px; height: 7px;
  background: var(--dispatch);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--dispatch);
  animation: pulse 2s infinite;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.stat-card {
  padding: 20px 20px 16px;
  border-right: 1px solid var(--border);
}
.stat-card:last-child { border-right: none; }
.stat-card--warn { background: rgba(240, 165, 0, 0.04); }

.stat-label {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

/* Flights table */
.flights-table-wrap { overflow-x: auto; }

.flights-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.flights-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}

.flights-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(30, 45, 61, 0.5);
  color: var(--text);
}

.flights-table tr:last-child td { border-bottom: none; }

.td-callsign { font-family: 'IBM Plex Mono', monospace; font-weight: 500; color: var(--amber); }
.td-route { color: var(--muted); font-size: 0.78rem; }
.td-time { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; }
.td-gate { font-family: 'IBM Plex Mono', monospace; }
.td-empty, .td-loading { text-align: center; color: var(--muted); padding: 32px; }

/* Status badges */
.status-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 3px;
}
.badge-ok { background: rgba(46,160,67,0.15); color: var(--dispatch); }
.badge-warn { background: rgba(240,165,0,0.15); color: var(--maint); }
.badge-neutral { background: rgba(125,133,144,0.15); color: var(--muted); }
.badge-crit { background: rgba(248,81,73,0.15); color: #f85149; }
.badge-muted { background: rgba(125,133,144,0.1); color: var(--muted); }

/* Dispatch button */
.dispatch-btn {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s;
}
.dispatch-btn:hover { border-color: var(--amber); color: var(--amber); }
.dispatch-btn:disabled { opacity: 0.5; cursor: default; }

/* Feed items in dispatch page */
.dispatch-col .ops-feed { padding: 0; }
.dispatch-col .feed-item { padding: 10px 16px; }
.feed-msg.muted { color: var(--muted); font-size: 0.8rem; }

/* Feed tag overrides for dispatch view */
.feed-tag.critical { background: rgba(248,81,73,0.15); color: #f85149; }

/* Responsive */
@media (max-width: 900px) {
  .dispatch-layout { grid-template-columns: 1fr; }
  .dispatch-col--feed { position: static; height: auto; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: none; }
}