:root {
  --bg: #f5efe4;
  --bg-accent: #dbe9e2;
  --panel: rgba(255, 250, 243, 0.84);
  --panel-strong: #fffaf2;
  --line: rgba(19, 55, 52, 0.12);
  --text: #173432;
  --muted: #5f7771;
  --teal: #156b64;
  --teal-strong: #0f5852;
  --gold: #bd8c3c;
  --alert: #c24f3f;
  --shadow: 0 20px 60px rgba(21, 54, 50, 0.12);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(188, 140, 60, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(21, 107, 100, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f2e8 0%, #eef3ee 100%);
}

button,
select {
  font: inherit;
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 28px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.kuwait-clock {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.82);
  backdrop-filter: blur(10px);
}

.clock-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clock-value {
  font-size: 1rem;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.airport-header h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
}

.airport-meta,
.time-note,
.table-card-header p,
.metric-copy span,
.empty-row td,
.data-state {
  color: var(--muted);
}

.control-shell,
.table-card,
.status-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.content {
  min-width: 0;
}

.content {
  display: grid;
  gap: 24px;
}

.control-panel {
  display: flex;
  justify-content: center;
}

.control-shell {
  width: min(860px, 100%);
  padding: 18px;
  box-shadow: var(--shadow);
}

.control-header {
  text-align: center;
  margin-bottom: 12px;
}

.control-title {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.control-grid {
  display: grid;
  gap: 16px;
}

.dashboard {
  display: grid;
  gap: 18px;
}

.sidebar-section {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar-section label {
  font-weight: 600;
}

.airport-list-label {
  font-weight: 600;
}

.country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.country-list-wide {
  width: 100%;
}

.airport-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  width: 100%;
}

.country-chip {
  flex: 1 1 160px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.country-chip:hover,
.country-chip.active {
  background: rgba(21, 107, 100, 0.1);
  border-color: rgba(21, 107, 100, 0.28);
  transform: translateY(-1px);
}

.airport-chip {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.airport-chip strong {
  font-size: 0.94rem;
}

.airport-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.airport-chip:hover,
.airport-chip.active {
  background: rgba(21, 107, 100, 0.1);
  border-color: rgba(21, 107, 100, 0.28);
  transform: translateY(-1px);
}

.airport-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.airport-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.time-note {
  margin: 4px 0 0;
  font-size: 0.84rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.status-card {
  padding: 12px 14px;
  display: grid;
  gap: 5px;
}

.metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.metric-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-copy span {
  font-size: 0.84rem;
  line-height: 1.25;
}

.flight-panel {
  display: grid;
  gap: 12px;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.72);
}

.tab-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.tab-button.active {
  background: var(--teal);
  color: white;
}

.tab-button:hover {
  transform: translateY(-1px);
}

.table-card {
  overflow: hidden;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 16px 16px 0;
}

.table-card-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.search-field {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}

.search-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  padding: 10px 16px 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flight-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flight-link {
  color: var(--teal-strong);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.flight-link:hover {
  text-decoration: underline;
}

.flight-cell strong {
  font-size: 0.95rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill.active,
.signal-on-schedule {
  background: rgba(21, 107, 100, 0.12);
  color: var(--teal-strong);
}

.status-pill.scheduled,
.status-pill.expected,
.signal-minor-delays {
  background: rgba(189, 140, 60, 0.16);
  color: #8c6321;
}

.status-pill.unknown {
  background: rgba(95, 119, 113, 0.14);
  color: #5b6662;
}

.status-pill.cancelled,
.status-pill.incident,
.signal-major-disruption {
  background: rgba(194, 79, 63, 0.16);
  color: var(--alert);
}

.data-state {
  padding: 12px 0;
}

@media (max-width: 1080px) {
  .status-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1380px);
  }

  .control-shell,
  .status-card,
  .table-card {
    border-radius: 20px;
  }

  .control-shell {
    padding: 16px;
  }

  .airport-header {
    flex-direction: column;
    align-items: stretch;
  }

  .table-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    width: 100%;
    justify-content: space-between;
  }

  th:nth-child(4),
  th:nth-child(5),
  td:nth-child(4),
  td:nth-child(5) {
    display: none;
  }
}
