/* ============================================
   Heritage Theme — Bold Dark Green + Bright Gold
   The Masters Broadcast Aesthetic
   Deep forest backgrounds, burnished gold accents
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Surfaces — DARK (lightened for modern feel) */
  --bg-main: #1a3829;
  --bg-card: #234a35;
  --bg-accent: #2a5540;
  --bg-navbar: #153524;

  /* Text — LIGHT on dark (high contrast for readability) */
  --text-cream: #F8F6EF;
  --text-muted: #E0D9CC;
  --text-warm-muted: #D0C4AE;
  --parchment-bg: #234a35;
  --parchment-text: #F8F6EF;

  /* Heritage Gold Accents */
  --gold-burnished: #BD9329;
  --gold-glow: rgba(212, 169, 69, 0.2);
  --gold-glow-strong: rgba(212, 169, 69, 0.35);
  --brass-secondary: #B48C45;
  --metallic-brass: linear-gradient(135deg, #C49A30 0%, #B8922E 25%, #B48C45 50%, #B8922E 75%, #C49A30 100%);

  /* Green (structural) */
  --green-primary: #1e5f3e;
  --green-dark: #14452b;
  --green-light: #2a7f52;
  --green-accent: #059669;
  --racing-green: #2E4B31;

  /* Status */
  --success-green: #4ADE80;
  --danger-red: #F87171;
  --live-red: #EF4444;
  --deep-crimson: #991b1b;

  /* Shadows — balanced for dark theme depth */
  --shadow-heavy: 0 10px 25px -5px rgba(0,0,0,0.4);
  --shadow-card: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-subtle: 0 2px 4px rgba(0,0,0,0.15);

  /* Timing */
  --transition-heritage: 300ms;

  /* Borders */
  --border-gold: 1px solid var(--gold-burnished);
  --border-card: 1px solid rgba(212, 169, 69, 0.18);
  --border-gold-dim: 1px solid rgba(212, 169, 69, 0.22);

  /* Emboss */
  --emboss-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* --- Base Body --- */
.heritage-body {
  background-color: var(--bg-main);
  color: var(--text-cream);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
}

/* --- Grain Overlay (disabled — clean solid colors) --- */
.heritage-grain {
  position: relative;
}

.heritage-grain::before {
  display: none;
}

/* --- Typography --- */
.heritage-heading {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gold-burnished);
  letter-spacing: 0.05em;
  text-shadow: none;
}

.heritage-mono {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-cream);
}

/* --- The Locker Card (Primary Container) --- */
.locker-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 169, 69, 0.18);
  border-top: 2px solid var(--gold-burnished);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-heritage) ease, border-color var(--transition-heritage) ease, background-color var(--transition-heritage) ease;
}

.locker-card:hover {
  background-color: #2e5d44;
  box-shadow: var(--shadow-heavy);
  border-color: rgba(212, 169, 69, 0.2);
  border-top-color: var(--gold-burnished);
}

/* Wood grain overlay — disabled */
.locker-card::before {
  display: none;
}

.locker-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(212, 169, 69, 0.22);
}

.locker-card .card-header h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gold-burnished);
  font-size: 1.1875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  text-shadow: none;
}

/* --- Gold Badge (heritage accent for role badges) --- */
.gold-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--metallic-brass);
  border: 1px solid rgba(212, 169, 69, 0.5);
  border-radius: 9999px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.025em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* --- Stat Card --- */
.heritage-stat-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 169, 69, 0.18);
  border-left: none;
  border-radius: 4px;
  padding: 1.25rem 1.5rem 1.25rem calc(1.25rem + 4px);
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
}

/* Grain overlay — disabled */
.heritage-stat-card::before {
  display: none;
}

/* Left border stripe — metallic brass gradient */
.heritage-stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #C49A30 0%, #B8922E 25%, #B48C45 50%, #B8922E 75%, #C49A30 100%);
}

.heritage-stat-card .stat-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.heritage-stat-card .stat-value {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-cream);
  margin-top: 0.25rem;
}

/* Stat card accent variants */
.heritage-stat-card.accent-gold::after {
  background: linear-gradient(180deg, #C49A30 0%, #B8922E 25%, #B48C45 50%, #B8922E 75%, #C49A30 100%);
}

.heritage-stat-card.accent-green::after {
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 50%, #4ADE80 100%);
}

.heritage-stat-card.accent-crimson::after {
  background: linear-gradient(180deg, #F87171 0%, #EF4444 50%, #F87171 100%);
}

.heritage-stat-card.accent-brass::after {
  background: linear-gradient(180deg, #B48C45 0%, #B8922E 50%, #B48C45 100%);
}

/* --- Quick Action Buttons --- */
.heritage-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 169, 69, 0.18);
  border-radius: 4px;
  color: var(--text-cream);
  text-decoration: none;
  transition: all var(--transition-heritage) ease;
  box-shadow: var(--shadow-subtle);
}

.heritage-action-btn:hover {
  background-color: #2e5d44;
  border-color: rgba(212, 169, 69, 0.3);
  box-shadow: var(--shadow-card), 0 0 12px rgba(212, 169, 69, 0.08);
}

.heritage-action-btn:active {
  transform: scale(0.98);
}

.heritage-action-btn svg {
  color: var(--gold-burnished);
  margin-bottom: 0.75rem;
}

.heritage-action-btn span {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text-cream);
}

/* --- Parchment List (Tee Times, Matches) — dark themed --- */
.parchment-list {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 169, 69, 0.18);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Paper edge effect — disabled for dark theme */
.parchment-list::before {
  display: none;
}

.parchment-list .list-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(212, 169, 69, 0.22);
  background-color: var(--bg-main);
}

.parchment-list .list-header h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gold-burnished);
  font-size: 1.1875rem;
  letter-spacing: 0.025em;
  margin: 0;
}

.parchment-list .list-item {
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(212, 169, 69, 0.12);
  color: var(--text-cream);
  text-decoration: none;
  transition: background-color var(--transition-heritage) ease;
}

.parchment-list .list-item:hover {
  background-color: #2e5d44;
}

.parchment-list .list-item:last-child {
  border-bottom: none;
}

.parchment-list .list-item h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-cream);
  margin: 0;
}

.parchment-list .list-item .list-meta {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.parchment-list .list-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.parchment-list .list-view-all {
  display: block;
  text-align: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 1rem;
  color: var(--gold-burnished);
  background-color: rgba(21, 46, 34, 0.5);
  border-top: 1px solid rgba(212, 169, 69, 0.22);
  text-decoration: none;
  transition: color var(--transition-heritage) ease, background-color var(--transition-heritage) ease;
}

.parchment-list .list-view-all:hover {
  color: #D4A945;
  background-color: rgba(212, 169, 69, 0.05);
}

/* --- Status Badges --- */
.heritage-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.heritage-badge.badge-green {
  background-color: #4ADE80;
  color: var(--bg-main);
  border: 1px solid #22C55E;
}

.heritage-badge.badge-gold {
  background: var(--metallic-brass);
  color: #ffffff;
  border: 1px solid rgba(212, 169, 69, 0.5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.heritage-badge.badge-crimson {
  background-color: #EF4444;
  color: #ffffff;
  border: 1px solid #DC2626;
}

.heritage-badge.badge-live {
  background: radial-gradient(ellipse at center, #EF4444 0%, #DC2626 100%);
  color: white;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
  animation: heritage-pulse 2s infinite;
}

@keyframes heritage-pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
  }
  50% {
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.7), 0 0 30px rgba(239, 68, 68, 0.3);
  }
}

/* --- Live Match Card --- */
.heritage-live-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  padding: 1rem;
  text-decoration: none;
  display: block;
  color: var(--text-cream);
  transition: all var(--transition-heritage) ease;
  box-shadow: var(--shadow-subtle);
}

.heritage-live-card:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.1), var(--shadow-card);
}

/* --- CTA Banner --- */
.heritage-cta {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, var(--bg-card) 0%, #214433 100%);
  border: 1px solid rgba(212, 169, 69, 0.15);
  border-radius: 4px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-heritage) ease;
  position: relative;
  overflow: hidden;
  color: var(--text-cream);
}

.heritage-cta::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 169, 69, 0.15) 100%);
  pointer-events: none;
}

.heritage-cta:hover {
  box-shadow: var(--shadow-heavy);
  border-color: rgba(212, 169, 69, 0.3);
}

/* --- Heritage Section Divider --- */
.heritage-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(212, 169, 69, 0.4) 20%,
    rgba(212, 169, 69, 0.4) 80%, transparent 100%);
  margin: 2rem 0;
}

/* --- Clubhouse Card (Trophy Room style) --- */
.heritage-club-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 169, 69, 0.18);
  border-top: 2px solid var(--gold-burnished);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-heritage) ease;
}

.heritage-club-card:hover {
  box-shadow: var(--shadow-heavy);
  border-color: rgba(212, 169, 69, 0.2);
  border-top-color: var(--gold-burnished);
}

.heritage-club-card .club-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  filter: sepia(0.15) contrast(1.05);
}

.heritage-club-card .club-image-placeholder {
  width: 100%;
  height: 12rem;
  background: linear-gradient(135deg, var(--bg-navbar) 0%, var(--bg-main) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.heritage-club-card .club-body {
  padding: 1.25rem;
}

.heritage-club-card .club-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.1875rem;
  color: var(--text-cream);
  font-weight: 600;
}

.heritage-club-card .club-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Heritage Buttons --- */
.btn-heritage-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background-color: var(--gold-burnished);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--gold-burnished);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-heritage) ease;
  text-decoration: none;
}

.btn-heritage-primary:hover {
  background-color: #D4A945;
  border-color: #D4A945;
  box-shadow: 0 2px 8px rgba(212, 169, 69, 0.3);
}

.btn-heritage-primary:active {
  transform: scale(0.98);
}

.btn-heritage-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background-color: transparent;
  color: var(--gold-burnished);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid var(--gold-burnished);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-heritage) ease;
  text-decoration: none;
}

.btn-heritage-secondary:hover {
  background-color: rgba(212, 169, 69, 0.1);
  border-color: #D4A945;
  color: #D4A945;
}

.btn-heritage-secondary:active {
  transform: scale(0.98);
}

/* --- Page Header --- */
.heritage-page-header {
  background: linear-gradient(135deg, var(--bg-navbar) 0%, var(--bg-card) 100%);
  border: none;
  border-radius: 4px;
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.heritage-page-header::before {
  display: none;
}

.heritage-page-header h1 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gold-burnished);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  margin: 0;
  text-shadow: none;
}

.heritage-page-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-top: 0.5rem;
}

/* --- Navbar Heritage --- */
.heritage-navbar {
  background: linear-gradient(135deg, var(--bg-navbar) 0%, var(--bg-main) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
}

.heritage-navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--metallic-brass);
}

.heritage-nav-link {
  color: var(--text-cream);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 1.0625rem;
  font-weight: 400;
  transition: all var(--transition-heritage) ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: none;
}

.heritage-nav-link:hover {
  background-color: rgba(212, 169, 69, 0.12);
  color: #ffffff;
}

.heritage-nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--text-cream);
}

/* Logo — gold Playfair Display style */
.heritage-navbar .heritage-logo-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gold-burnished);
}

/* --- Heritage Mobile Drawer --- */
.heritage-drawer {
  background-color: var(--bg-main);
}

.heritage-drawer-header {
  background-color: var(--bg-navbar);
  padding: 1.25rem;
  border-bottom: 2px solid var(--gold-burnished);
  color: var(--text-cream);
}

.heritage-drawer-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-cream);
  text-decoration: none;
  transition: all var(--transition-heritage) ease;
  min-height: 44px;
}

.heritage-drawer-link:hover {
  background-color: #2e5d44;
}

.heritage-drawer-link.active {
  background-color: rgba(212, 169, 69, 0.15);
  border-left: 3px solid var(--gold-burnished);
  color: var(--gold-burnished);
}

.heritage-drawer-link svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.heritage-drawer-link.active svg {
  color: var(--gold-burnished);
}

/* Drawer dividers */
.heritage-drawer hr {
  border-color: rgba(212, 169, 69, 0.22);
}

/* --- Map Container (Heritage) --- */
.heritage-map-container {
  border: 1px solid rgba(212, 169, 69, 0.15);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* --- Search Bar (Heritage) --- */
.heritage-search {
  background-color: var(--bg-accent);
  border: 1px solid rgba(212, 169, 69, 0.2);
  border-radius: 4px;
  padding: 0.625rem 1rem;
  color: var(--text-cream);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  width: 100%;
  transition: border-color var(--transition-heritage) ease, box-shadow var(--transition-heritage) ease;
}

.heritage-search::placeholder {
  color: var(--text-muted);
}

.heritage-search:focus {
  outline: none;
  border-color: var(--gold-burnished);
  box-shadow: 0 0 0 3px rgba(212, 169, 69, 0.15);
}

/* --- Empty State --- */
.heritage-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

.heritage-empty::before {
  content: "\25C6";
  display: block;
  width: 80%;
  max-width: 200px;
  margin: 0 auto 1.5rem;
  text-align: center;
  font-size: 0.625rem;
  color: var(--gold-burnished);
  line-height: 1;
  background: linear-gradient(90deg,
    transparent 0%, rgba(212, 169, 69, 0.3) 20%, rgba(212, 169, 69, 0.3) 45%,
    transparent 45%, transparent 55%,
    rgba(212, 169, 69, 0.3) 55%, rgba(212, 169, 69, 0.3) 80%, transparent 100%);
  background-size: 100% 1px;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0 0.5rem;
}

.heritage-empty svg {
  color: var(--text-muted);
  opacity: 0.5;
  margin: 0 auto 1rem;
}

.heritage-empty p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* --- Custom Dark Scrollbar (WebKit) --- */
.heritage-body::-webkit-scrollbar {
  width: 10px;
}

.heritage-body::-webkit-scrollbar-track {
  background: var(--bg-main);
}

.heritage-body::-webkit-scrollbar-thumb {
  background: rgba(212, 169, 69, 0.3);
  border-radius: 5px;
}

.heritage-body::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 169, 69, 0.5);
}

/* Also apply scrollbar to any scrollable heritage containers */
.heritage-body *::-webkit-scrollbar {
  width: 8px;
}

.heritage-body *::-webkit-scrollbar-track {
  background: var(--bg-main);
}

.heritage-body *::-webkit-scrollbar-thumb {
  background: rgba(212, 169, 69, 0.3);
  border-radius: 4px;
}

.heritage-body *::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 169, 69, 0.5);
}

/* ============================================
   Theme Heritage — Tailwind Bridge
   Overrides common Tailwind utility classes
   when .theme-heritage is on the <body> tag.
   This allows classic-only pages to inherit
   heritage dark styling without dedicated templates.
   ============================================ */
.theme-heritage {
  background-color: var(--bg-main);
  color: var(--text-cream);
  min-height: 100vh;
}

/* Background overrides */
.theme-heritage .bg-gray-50 { background-color: var(--bg-main) !important; }
.theme-heritage .bg-gray-100 { background-color: #1f4230 !important; }
.theme-heritage .bg-white { background-color: var(--bg-card) !important; }

/* Text color overrides */
.theme-heritage .text-gray-900 { color: var(--text-cream) !important; }
.theme-heritage .text-gray-800 { color: var(--text-cream) !important; }
.theme-heritage .text-gray-700 { color: var(--text-cream) !important; }
.theme-heritage .text-gray-600 { color: var(--text-muted) !important; }
.theme-heritage .text-gray-500 { color: var(--text-muted) !important; }
.theme-heritage .text-gray-400 { color: var(--text-warm-muted) !important; }

/* Border overrides */
.theme-heritage .border-gray-200 { border-color: rgba(212,169,69,0.18) !important; }
.theme-heritage .border-gray-300 { border-color: rgba(212,169,69,0.18) !important; }
.theme-heritage .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(212,169,69,0.18) !important; }

/* Shadow overrides */
.theme-heritage .shadow { box-shadow: var(--shadow-subtle) !important; }
.theme-heritage .shadow-md { box-shadow: var(--shadow-card) !important; }
.theme-heritage .shadow-lg { box-shadow: var(--shadow-heavy) !important; }
.theme-heritage .shadow-xl { box-shadow: var(--shadow-heavy) !important; }

/* Ring/focus overrides */
.theme-heritage .ring-1 { --tw-ring-color: rgba(212,169,69,0.2) !important; }
.theme-heritage .focus\:ring-green-500:focus { --tw-ring-color: rgba(212,169,69,0.4) !important; }

/* Form element overrides */
.theme-heritage input:not([type="checkbox"]):not([type="radio"]),
.theme-heritage select,
.theme-heritage textarea {
  background-color: var(--bg-accent) !important;
  color: var(--text-cream) !important;
  border-color: rgba(212,169,69,0.2) !important;
}

.theme-heritage input::placeholder,
.theme-heritage textarea::placeholder {
  color: var(--text-warm-muted) !important;
}

.theme-heritage input:focus,
.theme-heritage select:focus,
.theme-heritage textarea:focus {
  border-color: var(--gold-burnished) !important;
  box-shadow: 0 0 0 3px rgba(212,169,69,0.15) !important;
}

/* Button overrides for green buttons */
.theme-heritage .bg-green-600 { background-color: var(--gold-burnished) !important; color: #ffffff !important; }
.theme-heritage .bg-green-700 { background-color: var(--brass-secondary) !important; color: #ffffff !important; }
.theme-heritage .hover\:bg-green-700:hover { background-color: #D4A945 !important; }

/* Table overrides */
.theme-heritage table thead { background-color: var(--bg-main) !important; }
.theme-heritage table th { color: var(--gold-burnished) !important; border-color: rgba(212,169,69,0.18) !important; }
.theme-heritage table td { border-color: rgba(212,169,69,0.12) !important; color: var(--text-cream) !important; }
.theme-heritage table tr:hover td { background-color: #2e5d44 !important; }

/* Scrollbar for theme-heritage (reuse heritage-body pattern) */
.theme-heritage::-webkit-scrollbar { width: 10px; }
.theme-heritage::-webkit-scrollbar-track { background: var(--bg-main); }
.theme-heritage::-webkit-scrollbar-thumb { background: rgba(212,169,69,0.3); border-radius: 5px; }
.theme-heritage::-webkit-scrollbar-thumb:hover { background: rgba(212,169,69,0.5); }

/* ============================================
   Tailwind Bridge — Extended Coverage
   Closes gaps for full-app heritage theme support
   ============================================ */

/* --- Gray Backgrounds --- */
.theme-heritage .bg-gray-200 { background-color: var(--bg-accent) !important; }
.theme-heritage .bg-gray-300 { background-color: #2e5d44 !important; }
.theme-heritage .bg-gray-400 { background-color: #2a5a40 !important; }

/* --- Gray Text --- */
.theme-heritage .text-gray-300 { color: var(--text-cream) !important; }
.theme-heritage .text-gray-200 { color: var(--text-cream) !important; }
.theme-heritage .text-gray-100 { color: var(--text-cream) !important; }

/* --- Gray Borders --- */
.theme-heritage .border-gray-100 { border-color: rgba(212,169,69,0.1) !important; }
.theme-heritage .border-gray-400 { border-color: rgba(212,169,69,0.22) !important; }
.theme-heritage .border-gray-500 { border-color: rgba(212,169,69,0.25) !important; }

/* --- Hover States (critical for UX) --- */
.theme-heritage .hover\:bg-gray-100:hover { background-color: #2e5d44 !important; }
.theme-heritage .hover\:bg-gray-50:hover { background-color: var(--bg-accent) !important; }
.theme-heritage .hover\:bg-gray-200:hover { background-color: #2e5d44 !important; }
.theme-heritage .hover\:text-gray-700:hover { color: var(--text-cream) !important; }
.theme-heritage .hover\:text-gray-900:hover { color: var(--text-cream) !important; }

/* --- Green Family → Heritage Gold Mapping --- */
.theme-heritage .bg-green-50 { background-color: rgba(212,169,69,0.08) !important; }
.theme-heritage .bg-green-100 { background-color: rgba(212,169,69,0.12) !important; }
.theme-heritage .bg-green-200 { background-color: rgba(212,169,69,0.18) !important; }
.theme-heritage .bg-green-800 { background-color: var(--bg-card) !important; }
.theme-heritage .bg-green-900 { background-color: var(--bg-navbar) !important; }
.theme-heritage .hover\:bg-green-100:hover { background-color: rgba(212,169,69,0.18) !important; }
.theme-heritage .hover\:bg-green-900:hover { background-color: rgba(212,169,69,0.12) !important; }
.theme-heritage .hover\:bg-green-700:hover { background-color: #D4A945 !important; }
.theme-heritage .hover\:bg-green-800:hover { background-color: var(--bg-accent) !important; }
.theme-heritage .text-green-600 { color: var(--gold-burnished) !important; }
.theme-heritage .text-green-700 { color: var(--gold-burnished) !important; }
.theme-heritage .text-green-800 { color: var(--gold-burnished) !important; }
.theme-heritage .text-green-500 { color: var(--success-green) !important; }
.theme-heritage .border-green-600 { border-color: var(--gold-burnished) !important; }
.theme-heritage .border-green-500 { border-color: var(--gold-burnished) !important; }
.theme-heritage .border-green-200 { border-color: rgba(212,169,69,0.18) !important; }

/* --- Blue Family → Heritage Brass Mapping --- */
.theme-heritage .bg-blue-50 { background-color: rgba(212,169,69,0.06) !important; }
.theme-heritage .bg-blue-100 { background-color: rgba(212,169,69,0.1) !important; }
.theme-heritage .bg-blue-600 { background-color: var(--brass-secondary) !important; color: #fff !important; }
.theme-heritage .bg-blue-700 { background-color: var(--gold-burnished) !important; color: #ffffff !important; }
.theme-heritage .hover\:bg-blue-700:hover { background-color: #D4A945 !important; }
.theme-heritage .hover\:bg-blue-800:hover { background-color: var(--gold-burnished) !important; }
.theme-heritage .text-blue-600 { color: var(--gold-burnished) !important; }
.theme-heritage .text-blue-700 { color: var(--gold-burnished) !important; }
.theme-heritage .text-blue-800 { color: var(--gold-burnished) !important; }
.theme-heritage .border-blue-200 { border-color: rgba(212,169,69,0.18) !important; }
.theme-heritage .border-blue-500 { border-color: var(--gold-burnished) !important; }

/* --- Red Family (keep red, adjust light variants for dark bg) --- */
.theme-heritage .bg-red-50 { background-color: rgba(239,68,68,0.1) !important; }
.theme-heritage .bg-red-100 { background-color: rgba(239,68,68,0.15) !important; }
.theme-heritage .border-red-200 { border-color: rgba(239,68,68,0.3) !important; }
.theme-heritage .border-red-300 { border-color: rgba(239,68,68,0.4) !important; }
.theme-heritage .text-red-700 { color: var(--danger-red) !important; }

/* --- Purple Family (tournament badges) --- */
.theme-heritage .bg-purple-100 { background-color: rgba(147,51,234,0.15) !important; }
.theme-heritage .text-purple-700 { color: #c084fc !important; }

/* --- Amber/Yellow Family --- */
.theme-heritage .bg-amber-50 { background-color: rgba(212,169,69,0.08) !important; }
.theme-heritage .bg-amber-100 { background-color: rgba(212,169,69,0.12) !important; }
.theme-heritage .text-amber-800 { color: var(--gold-burnished) !important; }
.theme-heritage .border-amber-200 { border-color: rgba(212,169,69,0.22) !important; }

/* --- Focus/Ring Overrides --- */
.theme-heritage .focus\:ring-blue-500:focus { --tw-ring-color: rgba(212,169,69,0.4) !important; }
.theme-heritage .focus\:ring-blue-300:focus { --tw-ring-color: rgba(212,169,69,0.3) !important; }
.theme-heritage .focus\:ring-green-300:focus { --tw-ring-color: rgba(212,169,69,0.3) !important; }
.theme-heritage .ring-green-500 { --tw-ring-color: rgba(212,169,69,0.4) !important; }
.theme-heritage .ring-blue-500 { --tw-ring-color: rgba(212,169,69,0.4) !important; }

/* --- Divide (list separators) --- */
.theme-heritage .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(212,169,69,0.1) !important; }
.theme-heritage .divide-gray-300 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(212,169,69,0.18) !important; }

/* --- Opacity modifier adjustment for green backgrounds in navbar --- */
.theme-heritage .bg-opacity-50 { --tw-bg-opacity: 0.15 !important; }
.theme-heritage .bg-opacity-30 { --tw-bg-opacity: 0.1 !important; }

/* --- Classic navbar re-theme inside .theme-heritage --- */
.theme-heritage nav.bg-gradient-to-r {
  background: linear-gradient(135deg, var(--bg-navbar) 0%, var(--bg-main) 100%) !important;
}

/* --- Compound status badges (green/blue pills) --- */
.theme-heritage .bg-green-100.text-green-800 {
  background-color: rgba(212,169,69,0.15) !important;
  color: var(--gold-burnished) !important;
}
.theme-heritage .bg-blue-100.text-blue-800,
.theme-heritage .bg-blue-100.text-blue-700 {
  background-color: rgba(212,169,69,0.12) !important;
  color: var(--gold-burnished) !important;
}
