/* ===== CSS Custom Properties ===== */
:root {
  --brand: #680000;
  --brand-dark: #4a0000;
  --brand-light: #8a1a1a;
  --bg: #f8f8f8;
  --bg-card: #ffffff;
  --text-primary: #212529;
  --text-muted: #6c757d;
  --text-link: #515e5e;
  --text-link-hover: #95a3a3;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
}

/* ===== Brand ===== */
.bg-brand {
  background-color: var(--brand) !important;
}

.text-brand {
  color: var(--brand) !important;
}

.brand-text {
  font-family: 'Passion One', cursive;
  font-size: 28px;
}

/* ===== Links ===== */
a {
  text-decoration: none;
  color: var(--text-link);
  transition: var(--transition);
}

a:hover {
  text-decoration: none;
  color: var(--text-link-hover);
}

/* ===== Buttons ===== */
.btn-brand {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-brand:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-outline-brand {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline-brand:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ===== Cards ===== */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ===== Stat Cards ===== */
.stat-card {
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Tables ===== */
.table-custom {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-custom thead th {
  background-color: var(--brand);
  color: #fff;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  padding: 12px 16px;
}

.table-custom tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

.table-custom tbody tr {
  transition: var(--transition);
}

.table-custom tbody tr:hover {
  background-color: rgba(104, 0, 0, 0.03);
}

/* ===== Status Badges ===== */
.badge-not_started { background-color: #6c757d; }
.badge-running { background-color: var(--success); }
.badge-finished { background-color: var(--brand); }

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}

.hero-bg {
  position: relative;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  padding: 6rem 0 5rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 0, 0, 0.82) 0%, rgba(104, 0, 0, 0.72) 50%, rgba(40, 0, 0, 0.85) 100%);
}

.hero-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 4rem;
  letter-spacing: 1px;
  text-shadow: 2px 3px 6px rgba(0,0,0,0.5);
}

.hero .lead {
  font-size: 1.3rem;
  opacity: 0.9;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* ===== Home Stats Bar ===== */
.home-stats-bar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.home-stat {
  padding: 0.5rem 1rem;
}

.home-stat-border {
  border-left: 1px solid #e9ecef;
  border-right: 1px solid #e9ecef;
}

.home-stat-value {
  font-family: 'Passion One', cursive;
  font-size: 2rem;
  color: var(--brand);
  line-height: 1.1;
}

.home-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== How It Works ===== */
.how-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0e6e6, #e8d4d4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.5rem;
  color: var(--brand);
}

/* ===== Stable Preview Cards ===== */
.stable-preview-card {
  border: 2px solid #d0d0d0 !important;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  cursor: pointer;
  background: #fff;
}

.stable-preview-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-light) !important;
  box-shadow: var(--shadow-lg);
}

.stable-preview-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.25rem;
  color: #fff;
}

/* ===== Forms ===== */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 0.2rem rgba(104, 0, 0, 0.15);
}

/* ===== Footer ===== */
.vesper-footer {
  background: var(--bg);
  border-top: 1px solid #e0e0e0;
  padding: 2.5rem 0 2rem;
  margin-top: 0;
}

.vesper-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.vesper-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vesper-footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #888 !important;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid #e5e5e5;
  transition: all 0.25s ease;
}

.vesper-footer-nav a:hover {
  color: var(--brand) !important;
  background: #f0e6e6;
  border-color: #d4c0c0;
}

.vesper-footer-nav a i {
  font-size: 0.7rem;
  opacity: 0.6;
}

.vesper-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.vesper-footer-logo {
  font-family: 'Passion One', cursive;
  font-size: 1.5rem;
  color: var(--brand) !important;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.vesper-footer-logo:hover {
  color: var(--brand-dark) !important;
}

.vesper-footer-ext {
  font-size: 0.75rem;
  color: #999 !important;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

.vesper-footer-ext:hover {
  color: var(--brand) !important;
}

.vesper-footer-copy {
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 0.5rem;
}

.vesper-footer-copy a {
  color: #aaa !important;
  transition: color 0.2s ease;
}

.vesper-footer-copy a:hover {
  color: var(--brand) !important;
}

/* ===== Wager Colors ===== */
.wager-won {
  color: var(--success);
  font-weight: 500;
}

.wager-lost {
  color: var(--danger);
  font-weight: 500;
}

.wager-pending {
  color: var(--text-muted);
}

/* ===== Bet Card ===== */
.bet-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Stable radio button cards */
.stable-radio-label {
  border-radius: var(--radius) !important;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-check:checked + .stable-radio-label {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

.btn-check:checked + .stable-radio-label .text-muted {
  color: rgba(255,255,255,0.7) !important;
}

/* Stable odds cards on race detail */
.stable-odds-card {
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.stable-odds-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== Copyable Token Field ===== */
.token-field {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  background-color: #f1f1f1;
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-all;
  cursor: pointer;
}

.token-field:hover {
  background-color: #e2e2e2;
}

/* ===== Page Header ===== */
.page-header {
  padding: 2rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.page-header h2 {
  font-family: 'Passion One', cursive;
  font-size: 2rem;
  color: var(--brand);
  margin: 0;
}

/* ===== Odds Display ===== */
.odds-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Passion One', cursive;
}

/* ===== Races Hero ===== */
.races-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 3rem 0;
}

.races-hero h1 {
  font-size: 3rem;
  margin-bottom: 0.25rem;
}

/* ===== Section Headings ===== */
.section-heading {
  font-family: 'Passion One', cursive;
  font-size: 1.5rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  align-items: center;
}

/* ===== Race Cards ===== */
.race-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.race-card-open {
  border-left: 4px solid var(--success) !important;
}

/* ===== Featured Race Cards (Homepage) ===== */
.race-card-featured {
  background: #f1f1f1;
  border: 2px solid #d0d0d0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.race-card-featured:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow);
}

/* ===== Pool Badge ===== */
.pool-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* ===== Your Bets Cards ===== */
.your-bet-card {
  background: #f1f1f1;
  border: 2px solid #d0d0d0;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}

.your-bet-card:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow);
}

.bet-amount-display {
  font-family: 'Passion One', cursive;
  font-size: 1.75rem;
  line-height: 1;
}

.bet-odds-pill {
  display: inline-block;
  background: #e8dada;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
}

.bet-result-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.bet-result-won {
  background: #d4edda;
  color: #155724;
}

.bet-result-lost {
  background: #f8d7da;
  color: #721c24;
}

.bet-payout-value {
  font-family: 'Passion One', cursive;
  font-size: 1.25rem;
}

.bet-actions .btn {
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
}

/* ===== Stable Chips ===== */
.stable-chip {
  display: inline-block;
  background: #f0e6e6;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin: 2px 4px 2px 0;
}

.stable-chip-winner {
  background: #d4edda;
  color: var(--success);
}

/* ===== Rower Cards ===== */
.rower-card {
  border-radius: var(--radius-lg);
  transition: var(--transition);
  overflow: hidden;
}

.rower-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rower-card-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0e6e6;
}

.rower-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.rower-card:hover .rower-card-img {
  transform: scale(1.04);
}

.rower-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f0e6e6, #e8d4d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--brand-light);
  opacity: 0.5;
}

.rower-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f0e6e6;
  margin: 0 auto;
  display: block;
}

.rower-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0e6e6, #e0d0d0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--brand-light);
  font-size: 1.75rem;
}

/* Bio toggle */
.rower-bio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand) !important;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.rower-bio-toggle:hover {
  opacity: 0.7;
  color: var(--brand) !important;
}

.rower-bio-chevron {
  font-size: 0.55rem;
  transition: transform 0.3s ease;
}

.rower-bio-toggle[aria-expanded="true"] .rower-bio-chevron {
  transform: rotate(180deg);
}

.rower-bio-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #555;
  text-align: left;
}

.rower-stats {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.rower-stat {
  text-align: center;
}

.rower-stat-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand);
}

.rower-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* ===== Stable Section ===== */
.stable-header {
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}

/* ===== My Bets Nav Button ===== */
.nav-mybets-btn {
  background: #fff !important;
  color: var(--brand) !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 8px 22px !important;
  font-size: 0.9rem !important;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
}

.nav-mybets-btn:hover {
  background: #f0e6e6 !important;
  color: var(--brand-dark) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

/* ===== Global Modal Styles ===== */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-header {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-bottom: none;
  padding: 1rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #f0f0f0;
  padding: 1rem 1.5rem;
}

.modal-footer .btn-secondary {
  border-radius: 20px;
  padding: 6px 20px;
}

.modal-footer .btn-brand {
  border-radius: 20px;
  padding: 6px 24px;
}

/* ===== Vesper Accordion ===== */
.vesper-accordion {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.vesper-accordion-item {
  border: none !important;
  border-bottom: 1px solid rgba(104, 0, 0, 0.08) !important;
  background: #fff;
}

.vesper-accordion-item:last-child {
  border-bottom: none !important;
}

.vesper-accordion-btn {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary) !important;
  padding: 1.15rem 1.5rem;
  background: #fff !important;
  border: none;
  transition: all 0.25s ease;
  gap: 0;
}

.vesper-accordion-btn:hover {
  background: #faf5f5 !important;
}

.vesper-accordion-btn:not(.collapsed) {
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: none;
}

.vesper-accordion-btn:focus {
  box-shadow: none;
  border-color: transparent;
}

/* Icon circle next to question text */
.vesper-accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0e6e6, #e8d4d4);
  color: var(--brand);
  font-size: 0.8rem;
  margin-right: 1rem;
  transition: all 0.25s ease;
}

.vesper-accordion-btn:not(.collapsed) .vesper-accordion-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Override Bootstrap's default caret */
.vesper-accordion-btn::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23680000'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transition: transform 0.3s ease;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.vesper-accordion-btn:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Accordion body */
.vesper-accordion-body {
  padding: 1.25rem 1.5rem 1.25rem 4.5rem;
  color: #4a4a4a;
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 2px solid rgba(104, 0, 0, 0.06);
  background: #fdfbfb;
}

.vesper-accordion-body p {
  margin-bottom: 0.75rem;
}

.vesper-accordion-body strong {
  color: var(--brand);
}

/* Inline code blocks */
.vesper-code {
  background: #f0e6e6;
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  font-weight: 500;
}

/* ===== Vesper About Section ===== */
.vesper-about {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.vesper-about-block {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(104, 0, 0, 0.08);
  transition: background 0.2s ease;
}

.vesper-about-block:hover {
  background: #fdfbfb;
}

.vesper-about-block-last {
  border-bottom: none;
}

.vesper-about-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-size: 0.95rem;
  margin-right: 1.25rem;
  margin-top: 2px;
}

.vesper-about-title {
  font-family: 'Passion One', cursive;
  font-size: 1.35rem;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.vesper-about p {
  color: #4a4a4a;
  font-size: 0.95rem;
  line-height: 1.7;
}

.vesper-about-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 20px;
  background: #f0e6e6;
  transition: all 0.2s ease;
}

.vesper-about-link:hover {
  background: var(--brand);
  color: #fff !important;
}

/* ===== Admin Stables: Rower Thumbnails ===== */
.rower-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0e6e6;
}

.rower-thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0e6e6, #e0d0d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--brand-light);
}

.btn-action-pill {
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 500;
}

.image-preview-container {
  text-align: center;
  padding: 1rem;
  background: #fafafa;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px dashed #e0e0e0;
}

/* ===== Mobile Menu Toggle Button ===== */
.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  color: var(--brand) !important;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.nav-menu-btn:hover,
.nav-menu-btn:focus {
  background: #f0e6e6 !important;
  color: var(--brand-dark) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  outline: none;
}

.nav-menu-btn:not(.collapsed) {
  background: #f0e6e6 !important;
  color: var(--brand-dark) !important;
}

.nav-menu-chevron {
  font-size: 0.65rem;
  color: var(--brand);
  transition: transform 0.3s ease;
}

.nav-menu-btn:not(.collapsed) .nav-menu-chevron {
  transform: rotate(180deg);
}

/* ===== Admin Badge ===== */
.admin-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  vertical-align: middle;
}

/* ===== Admin Nav Divider ===== */
.admin-nav-divider {
  display: none;
}

@media (min-width: 992px) {
  .admin-nav-divider {
    display: block;
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: auto 4px;
  }
}

/* ===== Token Copied Flash ===== */
.token-copied {
  background-color: #d4edda !important;
  transition: background-color 0.2s ease;
}

/* ===== House Earnings Stat Card ===== */
.house-earnings-card {
  border-left-color: #ff9800 !important;
}

/* ===== Stable Checklist in Modals ===== */
.stable-checklist {
  background: #fafafa;
  border: 1px solid #e9ecef;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.stable-check-item {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
  margin: 0;
}

.stable-check-item:hover {
  background: #f0e6e6;
}

.stable-check-item:last-child {
  border-bottom: none;
}

.stable-check-item .form-check-input {
  cursor: pointer;
  flex-shrink: 0;
}

.stable-check-item .form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* ===== Upload Drop Zone ===== */
.upload-drop-zone {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
  background: #fafafa;
  border: 2px dashed #d0d0d0;
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.upload-drop-zone:hover {
  border-color: var(--brand-light);
  background: #fdf8f8;
}

.upload-drop-zone > i {
  font-size: 2.5rem;
  color: var(--brand-light);
  opacity: 0.5;
  margin-bottom: 0.75rem;
  display: block;
}

/* ===== CSV Format Reference ===== */
.csv-format-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.csv-format-item-last {
  border-bottom: none;
}

.csv-format-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.csv-format-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0e6e6, #e8d4d4);
  color: var(--brand);
  font-size: 0.75rem;
}

.csv-format-cols {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.csv-format-example {
  display: block;
  background: #f8f8f8;
  border: 1px solid #e9ecef;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #555;
  word-break: break-all;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-bg {
    padding: 4rem 0 3.5rem;
    background-position: center 25%;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .races-hero h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .home-stat-value {
    font-size: 1.5rem;
  }

  .home-stat-label {
    font-size: 0.65rem;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .rower-stats {
    gap: 0.75rem;
  }

  .rower-card-img-wrap,
  .rower-card-img-placeholder {
    height: 180px;
  }

  .stable-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  .how-icon {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .bet-amount-display {
    font-size: 1.4rem;
  }

  .your-bet-card {
    padding: 1rem;
  }

  .vesper-about-block {
    padding: 1.25rem;
  }

  .vesper-about-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.85rem;
    margin-right: 1rem;
  }

  .vesper-about-title {
    font-size: 1.15rem;
  }

  .vesper-accordion-body {
    padding-left: 1.5rem;
  }

  .nav-mybets-btn {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .vesper-footer {
    padding: 2rem 0 1.5rem;
    margin-top: 2rem;
  }

  .vesper-footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .vesper-footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .vesper-footer-nav a {
    font-size: 0.72rem;
    padding: 7px 12px;
    justify-content: center;
  }

  .vesper-footer-right {
    align-items: flex-end;
  }

  .vesper-footer-logo {
    font-size: 1.3rem;
  }
}

/* ===== Custom Alert Styles ===== */
.custom-alert {
  border-radius: 16px;
  border: 2px solid;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.custom-alert:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.custom-alert .alert-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.custom-alert .alert-content {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.custom-alert .btn-close {
  flex-shrink: 0;
  opacity: 0.6;
}

.custom-alert .btn-close:hover {
  opacity: 1;
}

/* Warning Alert - Muted Maroon */
.custom-alert-warning {
  background: linear-gradient(135deg, #f5e6e6 0%, #faf0f0 100%);
  border-color: #c97676;
  color: #6d2828;
}

.custom-alert-warning .alert-icon {
  color: #a85050;
}

/* Danger Alert - Deeper Maroon */
.custom-alert-danger {
  background: linear-gradient(135deg, #f7e7e7 0%, #fdf2f2 100%);
  border-color: #b84545;
  color: #7a1a1a;
}

.custom-alert-danger .alert-icon {
  color: #9a2828;
}

/* Success Alert - Vesper Green */
.custom-alert-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f1 100%);
  border-color: #66bb6a;
  color: #1b5e20;
}

.custom-alert-success .alert-icon {
  color: #2e7d32;
}

/* Info Alert */
.custom-alert-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7fd 100%);
  border-color: #64b5f6;
  color: #0d47a1;
}

.custom-alert-info .alert-icon {
  color: #1976d2;
}
