:root {
  --gold:  #f5a623;
  --dark:  #1a1a1a;
  --black: #111111;
  /* Override Bootstrap 5 CSS variables so components inherit light text */
  --bs-body-color:      #e0e0e0;
  --bs-body-bg:         #0d0d0d;
  --bs-table-color:     #e0e0e0;
  --bs-border-color:    #333333;
  --bs-secondary-color: #aaaaaa;
}

body {
  background: #0d0d0d;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
}

/* ── Global Bootstrap overrides ─────────────────────────── */
.text-muted       { color: #aaa !important; }
.small, small     { color: #bbb; }
p                 { color: #ddd; }

/* Let alerts control their own text — don't override with global p rule */
.alert p, .alert li, .alert h6, .alert small, .alert strong { color: inherit; }

/* bg-light used anywhere becomes a dark surface instead of near-white */
.bg-light { background: #252525 !important; }

/* Form check labels — Bootstrap uses var(--bs-body-color) which stays dark; force override */
.form-check-label { color: #ddd !important; }

/* Brighter green for prices inside dark buttons */
.btn-outline-secondary .price-tag { color: #4caf50; font-weight: 700; }

/* HR inside dark components */
.total-summary hr { border-color: #444; opacity: 1; }

/* ── Hero ───────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #111 0%, #1a1a1a 50%, #0d0d0d 100%);
  border-bottom: 2px solid var(--gold);
  padding: 32px 0;
}

.hero-title {
  font-family: 'Impact', 'Arial Black', sans-serif;
  color: var(--gold);
  letter-spacing: 2px;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  margin: 0;
}

.hero-sub { color: #ccc; font-size: 0.95rem; }

/* Clickable images */
.poster-img {
  max-height: 320px;
  border: 3px solid var(--gold);
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}
.poster-img:hover { transform: scale(1.02); box-shadow: 0 8px 30px rgba(245,166,35,0.3); }

.tshirt-img {
  max-height: 280px;
  width: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tshirt-img:hover { transform: scale(1.02); box-shadow: 0 8px 30px rgba(245,166,35,0.3); }

/* ── Stat pills ─────────────────────────────────────────── */
.stat-pill {
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid var(--gold);
  border-radius: 50px;
  padding: 8px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-pill .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-pill .stat-lbl { font-size: 0.72rem; color: #bbb; text-transform: uppercase; letter-spacing: 1px; }

/* ── CTA button ─────────────────────────────────────────── */
.btn-register {
  background: var(--gold);
  border-color: var(--gold);
  color: #111;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-register:hover, .btn-register:focus {
  background: #e09000;
  border-color: #e09000;
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}

/* ── Info cards ─────────────────────────────────────────── */
.info-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  height: 100%;
  transition: border-color 0.2s;
}
.info-card:hover { border-color: var(--gold); }
.info-icon { font-size: 2rem; color: var(--gold); margin-bottom: 12px; }
.info-card h5 { color: var(--gold); font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.info-card p  { color: #ccc; font-size: 0.9rem; }
.info-card strong { color: #fff; }

/* ── Section title ──────────────────────────────────────── */
.section-title {
  color: var(--gold);
  font-family: 'Impact', 'Arial Black', sans-serif;
  letter-spacing: 1px;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* ── Attendance table ───────────────────────────────────── */
.attendance-table {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
}
.attendance-table thead th {
  background: var(--dark);
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.attendance-table tbody tr:hover { background: rgba(245,166,35,0.06); }
.attendance-table td, .attendance-table th { border-color: #2a2a2a; }
.attendance-table td { color: #ddd !important; vertical-align: middle; }
.attendance-table .num-col { color: #666 !important; font-size: 0.8rem; width: 36px; }
.attendance-table .callsign-col { color: #fff !important; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.attendance-table .name-col { color: #ddd !important; font-size: 0.82rem; }
.name-loading { color: #888 !important; font-style: italic; font-size: 0.78rem; }

/* ── Registration form ──────────────────────────────────── */
.card {
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
}
.card-header { border-bottom: 1px solid #333 !important; }

.form-control, .form-select {
  background: #111 !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}
.form-control:focus, .form-select:focus {
  background: #111 !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 0.2rem rgba(245,166,35,0.2) !important;
  color: #e0e0e0 !important;
}
.form-control::placeholder { color: #555 !important; }
.form-label { color: #ccc; font-size: 0.9rem; }
.form-text  { color: #999 !important; font-size: 0.82rem; }

.input-group-text {
  background: #1a1a1a !important;
  border-color: #333 !important;
  color: var(--gold) !important;
}

/* ── Type selector ──────────────────────────────────────── */
.btn-check:checked + .btn-outline-secondary {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #111 !important;
}
.btn-outline-secondary { border-color: #444 !important; color: #bbb !important; }
.btn-outline-secondary:hover { background: #2a2a2a !important; color: #fff !important; }

/* ── Total summary ──────────────────────────────────────── */
.total-summary { background: #111; border: 2px solid var(--gold); border-radius: 8px; padding: 12px 16px; }
.total-summary span { font-size: 0.9rem; color: #ccc; }

/* ── Reg badge ──────────────────────────────────────────── */
.reg-badge {
  display: inline-block;
  background: var(--gold);
  color: #111;
  font-family: 'Impact', monospace;
  font-size: 1.5rem;
  letter-spacing: 3px;
  padding: 8px 24px;
  border-radius: 8px;
}

/* ── List items ─────────────────────────────────────────── */
.list-unstyled li { color: #ccc; margin-bottom: 6px; }

/* ── Admin stats ────────────────────────────────────────── */
.admin-stat-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.admin-stat-card .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.admin-stat-card .stat-lbl { font-size: 0.72rem; color: #999; text-transform: uppercase; }

/* ── Admin table ────────────────────────────────────────── */
.admin-table { font-size: 0.85rem; }
.admin-table thead th { background: #1a1a1a; color: var(--gold); border-bottom: 2px solid var(--gold); white-space: nowrap; }
.admin-table tbody td { color: #ddd !important; border-color: #222; vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(245,166,35,0.05); }

/* ── Generic table ──────────────────────────────────────── */
/* Override Bootstrap's --bs-table-color CSS variable (set to body color = dark) */
.table { color: #ddd !important; --bs-table-color: #ddd; --bs-table-striped-color: #ddd; --bs-table-hover-color: #ddd; }
.table td, .table th { border-color: #2a2a2a !important; color: #ddd !important; }
.table-hover tbody tr:hover { background: rgba(255,255,255,0.04) !important; }
.table td.text-muted { color: #888 !important; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #111;
  border-top: 1px solid #222;
  font-size: 0.85rem;
}
.site-footer p      { color: #aaa; margin: 0; }
.site-footer .small { color: #777; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert-warning { background: rgba(245,166,35,0.12); border-color: var(--gold); color: #f5d28a; }
.alert-success { background: rgba(76,175,80,0.12);  border-color: #4caf50;     color: #a5d6a7; }
.alert-danger  { background: rgba(244,67,54,0.12);  border-color: #f44336;     color: #ef9a9a; }
.alert-info    { background: rgba(33,150,243,0.12); border-color: #2196f3;     color: #90caf9; }
.alert strong  { color: inherit; }

/* ── Badges ─────────────────────────────────────────────── */
.badge.bg-secondary { background: #444 !important; }
.badge.bg-light     { background: #2a2a2a !important; color: #bbb !important; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar { border-bottom: 1px solid #2a2a2a; }

/* ── Lightbox modal ─────────────────────────────────────── */
#lightboxModal .modal-content {
  background: #111;
  border: 1px solid #333;
}
#lightboxModal .modal-body { padding: 8px; text-align: center; }
#lightboxModal img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 4px; }
#lightboxModal .btn-close { filter: invert(1); }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 575.98px) {

  /* Prevent iOS auto-zoom on input focus */
  input, select, textarea { font-size: 16px !important; }

  /* Shrink poster so CTA button is visible without scrolling */
  .poster-img  { max-height: 200px; }
  .tshirt-img  { max-height: 200px; }
  .hero-title  { font-size: 1.2rem; letter-spacing: 1px; }

  /* Stack attendance table: hide number col, shrink text */
  .attendance-table .num-col      { display: none; }
  .attendance-table .callsign-col { font-size: 0.82rem; }
  .attendance-table .name-col     { font-size: 0.75rem; color: #aaa !important; }

  /* Registration form: full-width submit, smaller padding */
  .card-body { padding: 20px 16px !important; }
  .btn-register.btn-lg { font-size: 1rem; padding: 12px; }

  /* Admin navbar: icon-only for export/settings on very small */
  .navbar .btn-label { display: none; }

  /* Admin stat cards: tighter on mobile */
  .admin-stat-card { padding: 10px 8px; }
  .admin-stat-card .stat-num { font-size: 1.4rem; }
  .admin-stat-card .stat-lbl { font-size: 0.65rem; }

  /* Filter buttons wrap nicely */
  .d-flex.flex-wrap.gap-1 .btn { font-size: 0.75rem; padding: 3px 8px; }

  /* Admin table: hide less critical columns on mobile */
  .admin-table .col-hide-xs { display: none; }
}

@media (max-width: 767.98px) {
  /* Medium-small: hide some admin table columns */
  .admin-table .col-hide-sm { display: none; }

  /* Tighter container padding */
  .container { padding-left: 12px; padding-right: 12px; }

  /* Info cards: full-width with less padding on mobile */
  .info-card { padding: 18px; }

  /* Total summary stacks nicely */
  .total-summary { font-size: 0.88rem; }
}
