/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg-soft, #FAF9F7);
  font-family: var(--font-body, 'Montserrat', sans-serif);
  color: var(--fg, #222);
}
img { max-width: 100%; display: block; }

/* Brand display headings — roman opener + italic gold release */
em { font-style: italic; color: var(--accent, #B79B58); font-weight: inherit; }

/* ─── Top Bar ────────────────────────────────────────────────────────────────── */
.top-bar {
  background: var(--near-black, #0A0A0A);
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 8px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar .sync-info { display: flex; align-items: center; gap: 10px; }
.top-bar .sync-info .sep { opacity: 0.4; }
.top-bar .muted-info { color: rgba(255,255,255,0.5); }
.top-bar .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold, #B79B58);
  animation: pulse-gold 2s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Nav ────────────────────────────────────────────────────────────────────── */
nav.main {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  padding: 14px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-mark { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.brand-word {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500; font-size: 18px;
  color: var(--near-black, #0A0A0A);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.brand-word small {
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold, #B79B58); font-weight: 600;
}
.nav-actions { display: flex; align-items: center; gap: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 600; font-size: 11px; letter-spacing: 0.08em;
  padding: 10px 22px; border-radius: var(--radius-full, 9999px);
  text-transform: uppercase; border: none; cursor: pointer;
  transition: all 0.2s ease-out; line-height: 1;
}
.btn-gold { background: var(--gold, #B79B58); color: #fff; }
.btn-gold:hover { background: var(--gold-dark, #9A8145); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--gold, #B79B58);
  border: 1.5px solid var(--gold, #B79B58);
}
.btn-outline:hover { background: var(--gold, #B79B58); color: #fff; }
.clock {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500; font-size: 22px;
  color: var(--near-black, #0A0A0A);
  letter-spacing: 0.02em;
}

/* ─── Hero band ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('/design-system/assets/photo-heated-hangar.jpg');
  background-size: cover;
  background-position: center 60%;
  filter: saturate(0.85);
}
/* Three-stop dark gradient overlay — Inflight hero pattern */
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(10,10,10,0.85) 0%,
      rgba(10,10,10,0.55) 55%,
      rgba(10,10,10,0.30) 100%
    );
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1380px; width: 100%;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 40px);
  color: #fff;
}
.hero .eyebrow-sm {
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold, #B79B58);
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.hero .eyebrow-sm::before {
  content: ''; width: 32px; height: 1px;
  background: var(--gold, #B79B58);
}
.hero-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 10px;
}
.hero-title em { color: var(--gold, #B79B58); font-style: italic; font-weight: 400; }
.hero-date {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

/* ─── Board Layout ───────────────────────────────────────────────────────────── */
.board-wrap {
  max-width: 1380px; margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 40px) 60px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 780px) {
  .columns { grid-template-columns: 1fr; }
}

/* ─── Column ─────────────────────────────────────────────────────────────────── */
.column {
  background: #fff;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
  box-shadow: var(--shadow-subtle, 0 1px 3px rgba(0,0,0,0.06));
}
.column-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  display: flex; align-items: center; justify-content: space-between;
}
.column-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--fg-strong, #0A0A0A);
  text-transform: none;
}
.column-title em { font-style: italic; color: var(--gold, #B79B58); font-weight: 400; }
.column-title .col-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 12px;
  vertical-align: middle;
  position: relative; top: -1px;
}
.col-hangar .col-dot { background: var(--gold, #B79B58); }
.col-line .col-dot { background: var(--gold, #B79B58); opacity: 0.4; }

.column-count {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 22px; font-weight: 500;
  color: var(--fg-strong, #0A0A0A);
  letter-spacing: -0.02em;
  line-height: 1;
}
.cards { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 100px; }

.empty-state {
  text-align: center; padding: 40px 16px;
  color: var(--fg-faint, #888); font-size: 13px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-chip {
  width: 44px; height: 44px; border-radius: var(--radius-md, 8px);
  background: var(--gold-subtle, rgba(183,155,88,0.08));
  color: var(--gold, #B79B58);
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Reservation Card (brand pattern) ───────────────────────────────────────── */
.res-card {
  border-radius: var(--radius-lg, 16px);
  border: 1px solid rgba(0,0,0,0.04);
  padding: 20px 20px;
  background: #fff;
  position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease-out, cubic-bezier(0.16,1,0.3,1)),
              box-shadow 0.4s var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}
/* Gold underline on hover — canonical Inflight card affordance */
.res-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold, #B79B58);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}
.res-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.08));
}
.res-card:hover::after { transform: scaleX(1); }

/* Urgency left-border accent — kept for at-a-glance triage */
.res-card::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  transition: background 0.4s;
}
.urgency-grey::before   { background: var(--border-strong, rgba(0,0,0,0.12)); }
.urgency-yellow::before { background: #F59E0B; }
.urgency-red::before    { background: #EF4444; }
.urgency-pulse::before  { background: #EF4444; animation: pulse-red-slow 1.4s ease-in-out infinite; }
.urgency-flash::before  { background: #EF4444; animation: flash-red 0.6s ease-in-out infinite; }

/* Urgency background tint */
.urgency-yellow { background: #FFFBEB; }
.urgency-red    { background: #FFF5F5; }
.urgency-pulse  { background: #FFF5F5; }
.urgency-flash  { background: #FFF0F0; }

@keyframes pulse-red-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes flash-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.card-id { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Letter chip — first letter of tail in gold serif */
.chip {
  width: 44px; height: 44px; border-radius: var(--radius-md, 8px);
  background: var(--gold-subtle, rgba(183,155,88,0.08));
  color: var(--gold, #B79B58);
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.4s var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}
.res-card:hover .chip { background: rgba(183,155,88,0.18); }
.chip-staged { background: var(--gold-glow, rgba(183,155,88,0.15)); }

.aircraft-id {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 22px; font-weight: 500; line-height: 1;
  letter-spacing: -0.01em;
  color: var(--fg-strong, #0A0A0A);
}
.aircraft-name {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--fg-faint, #888); text-transform: uppercase;
  margin-top: 4px;
}

.countdown-badge {
  text-align: right; flex-shrink: 0;
}
/* Stat-style countdown — 40px Woodford, gold unit/separator */
.countdown-time {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 40px; font-weight: 500; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg-strong, #0A0A0A);
}
.countdown-time span { color: var(--gold, #B79B58); }
.countdown-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-faint, #888); font-weight: 600;
  margin-top: 6px;
}
.urgency-yellow .countdown-time { color: #B45309; }
.urgency-yellow .countdown-time span { color: #D97706; }
.urgency-red    .countdown-time,
.urgency-pulse  .countdown-time,
.urgency-flash  .countdown-time { color: #B91C1C; }
.urgency-red    .countdown-time span,
.urgency-pulse  .countdown-time span,
.urgency-flash  .countdown-time span { color: #DC2626; }

/* Flash/pulse the countdown clock in sync with the border accent. */
.urgency-pulse .countdown-time { animation: pulse-red-slow 1.4s ease-in-out infinite; }
.urgency-flash .countdown-time { animation: flash-red 0.6s ease-in-out infinite; }

.scheduled-time {
  font-size: 28px;
  color: var(--fg-strong, #0A0A0A);
}

.card-divider {
  height: 1px; background: var(--border, rgba(0,0,0,0.06));
  margin: 12px 0;
}
.card-meta {
  display: flex; flex-direction: column; gap: 6px;
}
.meta-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.meta-key {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-faint, #888); font-weight: 600;
  flex-shrink: 0;
}
.meta-value {
  font-weight: 500; color: var(--fg-strong, #0A0A0A);
  text-align: right;
  min-width: 0;
}

.card-actions { margin-top: 16px; }
.action-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-full, 9999px);
  border: none; cursor: pointer;
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s ease-out;
  display: flex; align-items: center; justify-content: center;
}
.action-on-line {
  background: var(--gold, #B79B58); color: #fff;
}
.action-on-line:hover { background: var(--gold-dark, #9A8145); transform: translateY(-1px); }
.action-in-hangar {
  background: transparent; color: var(--gold, #B79B58);
  border: 1.5px solid var(--gold, #B79B58);
}
.action-in-hangar:hover { background: var(--gold, #B79B58); color: #fff; }

.action-disabled {
  background: rgba(0,0,0,0.04);
  color: var(--fg-faint, #888);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  cursor: not-allowed;
}
.action-disabled:hover { background: rgba(0,0,0,0.04); transform: none; }

/* Reservation card on the left whose aircraft is already staged on the line —
   dim slightly so the eye is drawn to the unstaged ones. */
.card-already-staged { opacity: 0.7; }
.card-already-staged .countdown-time { color: var(--fg-muted, #575760); }
.card-already-staged .countdown-time span { color: var(--fg-muted, #575760); }
.card-already-staged::before { background: var(--gold, #B79B58) !important; opacity: 0.5; animation: none !important; }

/* Right-column tail cards — compact, no urgency tinting, no per-flight detail.
   Square so a wall display can see many tails at once at a glance. */
.col-line .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  align-content: start;
}
.line-tail-card {
  background: #fff;
  padding: 12px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border: 2px solid var(--border-strong, rgba(0,0,0,0.12));
}
.line-tail-card::before { display: none; }
.line-tail-card::after { display: none; }
.line-tail-card .staged-badge {
  align-self: flex-start;
  font-size: 9px;
  padding: 2px 9px;
  letter-spacing: 0.14em;
  margin-bottom: 0;
}
.line-tail-card .staged-badge::before { width: 5px; height: 5px; }

/* Identity block — tail + aircraft name centered visually. Drops the chip
   in the small square format so the tail itself can carry the visual weight. */
.line-tail-card .card-top {
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 0;
  gap: 4px;
  min-width: 0;
}
.line-tail-card .card-id {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  min-width: 0;
  width: 100%;
}
.line-tail-card .chip { display: none; }
.line-tail-card .aircraft-id {
  font-size: 22px;
  line-height: 1;
}
.line-tail-card .aircraft-name {
  font-size: 9px;
  margin-top: 4px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Staged-at time, small caption under the identity. */
.line-tail-card .countdown-badge { text-align: center; }
.line-tail-card .scheduled-time {
  color: var(--gold-dark, #9A8145);
  font-size: 13px;
  line-height: 1;
}
.line-tail-card .countdown-label {
  font-size: 8px;
  letter-spacing: 0.16em;
  margin-top: 2px;
}

.line-tail-card .card-actions { margin-top: 0; }
.line-tail-card .action-btn {
  padding: 6px 10px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* ─── On-line card variant ───────────────────────────────────────────────────── */
.col-line .res-card { background: #fff; }
.col-line .res-card::before { background: var(--gold, #B79B58); }
.staged-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-subtle, rgba(183,155,88,0.08));
  color: var(--gold-dark, #9A8145);
  border-radius: var(--radius-full, 9999px);
  padding: 4px 14px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.staged-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold, #B79B58);
}
.delta-note {
  font-size: 12px; color: var(--fg-muted, #575760);
  margin-top: 4px;
}
.delta-note .early { color: var(--gold-dark, #9A8145); font-weight: 700; }
.delta-note .late  { color: #B91C1C; font-weight: 700; }

/* ─── Summary Bar ────────────────────────────────────────────────────────────── */
.summary-bar {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.stat-pill {
  background: #fff; border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--radius-full, 9999px);
  padding: 10px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint, #888);
  box-shadow: var(--shadow-subtle, 0 1px 3px rgba(0,0,0,0.06));
}
.stat-pill .stat-n {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 22px; font-weight: 500;
  color: var(--fg-strong, #0A0A0A);
  letter-spacing: -0.02em;
}
.stat-pill.good .stat-n { color: var(--gold-dark, #9A8145); }
.stat-pill.warn .stat-n { color: var(--gold, #B79B58); }

/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease-out, cubic-bezier(0.16,1,0.3,1));
  padding: 24px;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-elevated, 0 12px 48px rgba(0,0,0,0.12));
  padding: 32px 32px 24px;
  width: 100%; max-width: 460px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.35s var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-eyebrow {
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold, #B79B58);
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.modal-eyebrow::before {
  content: ''; width: 24px; height: 1px;
  background: var(--gold, #B79B58);
}
.modal-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg-strong, #0A0A0A);
  margin-bottom: 12px;
}
.modal-title em { font-style: italic; color: var(--gold, #B79B58); font-weight: 400; }
.modal-body {
  font-size: 14px; line-height: 1.65;
  color: var(--fg-muted, #575760);
  margin-bottom: 24px;
}
.modal-body strong {
  color: var(--fg-strong, #0A0A0A);
  font-weight: 700;
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}
.btn-ghost {
  background: transparent;
  color: var(--fg-muted, #575760);
  border: 1.5px solid var(--border-strong, rgba(0,0,0,0.12));
}
.btn-ghost:hover {
  background: var(--bg-soft, #FAF9F7);
  color: var(--fg-strong, #0A0A0A);
}

/* ─── Toast ──────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--near-black, #0A0A0A); color: #fff;
  padding: 14px 26px; border-radius: var(--radius-full, 9999px);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  box-shadow: var(--shadow-elevated, 0 12px 48px rgba(0,0,0,0.12));
  transition: transform 0.4s var(--ease-out, cubic-bezier(0.16,1,0.3,1)), opacity 0.3s;
  opacity: 0; pointer-events: none; z-index: 100;
  white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
