@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* =====================================================
   SOUTHERN CATS CLUB MANAGER - MAIN STYLESHEET
   Design: Dark Glassmorphism, Navy/Gold, Inter
   ===================================================== */

/* --- CSS Custom Properties --- */
:root {
  --navy:          #3b82f6;
  --gold:          #8b5cf6;
  --tertiary:      #FFFFFF;
  --primary:       #3b82f6;
  --secondary:     #8b5cf6;
  --primary-text:  #ffffff;
  --secondary-text: #ffffff;
  --tertiary-text: #0f172a;
  --club-text-primary: #60a5fa;
  --club-text-accent:  #c084fc;
  --white:         #FFFFFF;
  --dark-bg:       #0b1120;
  --surface:       #151f32;
  --card:          #1e293b;
  --card-bg:       #1e293b;
  --surface-card:  #0f172a;
  --surface-active: rgba(255, 255, 255, 0.08);
  --surface-subtle: rgba(255, 255, 255, 0.03);
  --surface-elevated: #1e293b;
  --bg-base:       #0b1120;
  --bg-surface:    #151f32;
  --bg-card:       #1e293b;
  --bg-card-hover: #26354d;
  --bg-input:      rgba(15, 23, 42, 0.75);
  --bg-hover:      rgba(255, 255, 255, 0.06);
  --event-card-bg: rgba(15, 23, 42, 0.85);
  --border:        rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text:          #f1f5f9;
  --text-bright:   #ffffff;
  --text-heading:  #f8fafc;
  --text-main:     #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted:    #94a3b8;
  --text-dim:      #64748b;
  --muted:         #94a3b8;
  --sidebar-width: 250px;
  --topbar-height: 64px;
  --transition:    200ms cubic-bezier(0.4, 0, 0.2, 1);
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:     0 8px 48px rgba(0, 0, 0, 0.7);
  --glass:         rgba(15, 23, 42, 0.85);
  --glass-border:  rgba(255, 255, 255, 0.08);

  /* Sidebar Variables - Dark Mode */
  --sb-bg:              #121316;
  --sb-border:          rgba(255, 255, 255, 0.07);
  --sb-text:            #94a3b8;
  --sb-text-hover:      #ffffff;
  --sb-text-active:     var(--club-text-accent, #c084fc);
  --sb-link-hover:      rgba(255, 255, 255, 0.06);
  --sb-link-active:     rgba(139, 92, 246, 0.16);
  --sb-section-title:   #64748b;
  --sb-user-card-bg:    rgba(255, 255, 255, 0.04);
  --sb-user-card-border: rgba(255, 255, 255, 0.07);
  --sb-user-card-hover: rgba(255, 255, 255, 0.07);
  --sb-user-name:       #f1f5f9;
  --sb-user-role:       #94a3b8;
  --sb-bottom-bg:       rgba(0, 0, 0, 0.2);
  --sb-pill-bg:         rgba(255, 255, 255, 0.05);
  --sb-pill-border:     rgba(255, 255, 255, 0.08);
  --sb-pill-active:     rgba(255, 255, 255, 0.18);
  --sb-pill-text-active: #ffffff;
  --sb-icon-color:      #64748b;

  /* Topbar Variables - Dark Mode */
  --tb-bg:              #16181d;
  --tb-border:          rgba(255, 255, 255, 0.08);
  --tb-text:            #f8fafc;
}

[data-theme="light"] {
  --white:         #FFFFFF;
  --dark-bg:       #f8fafc;
  --surface:       #ffffff;
  --card:          #ffffff;
  --card-bg:       #ffffff;
  --surface-card:  #ffffff;
  --surface-active: #f1f5f9;
  --surface-subtle: #f8fafc;
  --surface-elevated: #ffffff;
  --bg-base:       #f8fafc;
  --bg-surface:    #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input:      #ffffff;
  --bg-hover:      #f1f5f9;
  --event-card-bg: #ffffff;
  --border:        #e2e8f0;
  --border-subtle: #f1f5f9;
  --text:          #0f172a;
  --text-bright:   #0f172a;
  --text-heading:  #0f172a;
  --text-main:     #0f172a;
  --text-secondary: #334155;
  --text-muted:    #475569;
  --text-dim:      #64748b;
  --muted:         #475569;
  --shadow:        0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg:     0 8px 36px rgba(15, 23, 42, 0.1);
  --glass:         rgba(255, 255, 255, 0.92);
  --glass-border:  #e2e8f0;

  /* Topbar in Light Mode */
  --tb-bg:              #ffffff;
  --tb-border:          #e2e8f0;
  --tb-text:            #0f172a;

  /* Sidebar in Light Mode: Crisp, Elegant Light Surface */
  --sb-bg:              #ffffff;
  --sb-border:          #e2e8f0;
  --sb-text:            #475569;
  --sb-text-hover:      #0f172a;
  --sb-text-active:     var(--club-text-primary, #4f46e5);
  --sb-link-hover:      #f1f5f9;
  --sb-link-active:     rgba(var(--primary-rgb, 99, 102, 241), 0.1);
  --sb-section-title:   #64748b;
  --sb-user-card-bg:    #f8fafc;
  --sb-user-card-border: #e2e8f0;
  --sb-user-card-hover: #f1f5f9;
  --sb-user-name:       #0f172a;
  --sb-user-role:       #475569;
  --sb-bottom-bg:       #f8fafc;
  --sb-pill-bg:         #e2e8f0;
  --sb-pill-border:     #cbd5e1;
  --sb-pill-active:     #ffffff;
  --sb-pill-text-active: #0f172a;
  --sb-icon-color:      #475569;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark-bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.82; }

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* Global scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- App Layout --- */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-body-container {
  display: flex;
  margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height));
  width: 100%;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--topbar-height));
  min-width: 0;
  background: var(--dark-bg);
  transition: margin-left var(--transition), background var(--transition);
  overflow-x: hidden;
}

.main-wrapper.main-expanded {
  margin-left: 0;
}

.main-content {
  flex: 1;
  padding: 2rem;
}

.content {
  padding: 1.5rem 2rem;
  min-width: 0;
}

.page-container {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  z-index: 900;
  border-right: 1px solid var(--sb-border);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  overflow: hidden;
}

.sidebar.sidebar-collapsed {
  transform: translateX(-100%);
}

/* ── Brand / Logo ── */
.sidebar-brand {
  padding: 1.25rem 1.25rem 0.75rem;
  flex-shrink: 0;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
  opacity: 1;
}

.sidebar-brand-link:hover { opacity: 1; }

.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand-fallback {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* ── User / Org Card ── */
.sidebar-user-container {
  padding: 0.85rem 0.75rem 0.65rem;
  position: relative;
  border-bottom: 1px solid var(--sb-border);
  transition: border-color var(--transition);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  background: var(--sb-user-card-bg);
  border: 1px solid var(--sb-user-card-border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-user-card:hover {
  background: var(--sb-user-card-hover);
  opacity: 1;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-user-initials {
  background: var(--primary);
  color: var(--primary-text, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-user-details {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sb-user-name);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  transition: color var(--transition);
}

.sidebar-user-role {
  font-size: 0.68rem;
  color: var(--sb-user-role);
  line-height: 1.2;
  transition: color var(--transition);
}

.sidebar-user-chevron-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  margin-left: auto;
}

.sidebar-user-chevron-btn:hover {
  background: var(--sb-link-hover);
}

.sidebar-user-chevron {
  font-size: 18px;
  color: var(--sb-icon-color);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.15s;
}

.sidebar-user-card:hover .sidebar-user-chevron {
  color: var(--sb-text-hover);
}

.sidebar-user-container.open .sidebar-user-chevron {
  transform: rotate(180deg);
  color: var(--sb-text-hover);
}

/* ── Floating Submenu (Like Public Nav Dropdown) ── */
.sidebar-user-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 220px;
  background: rgba(24, 28, 40, 0.98);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius, 10px);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 6px 12px -4px rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0;
  z-index: 600;
  animation: sidebarSubmenuFade 0.15s ease-out;
}

@keyframes sidebarSubmenuFade {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-user-container.open .sidebar-user-submenu {
  display: block;
}

.sidebar-user-submenu-header {
  padding: 0.4rem 0.85rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.25rem;
}

.sidebar-user-submenu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: #f1f5f9;
  transition: background 0.15s;
}

.sidebar-user-submenu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-submenu-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-user-submenu-logo-fallback {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.sidebar-user-submenu-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-submenu-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-user-submenu-role {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.2;
}

.sidebar-user-submenu-arrow {
  font-size: 16px;
  color: #64748b;
  transition: transform 0.15s, color 0.15s;
}

.sidebar-user-submenu-item:hover .sidebar-user-submenu-arrow {
  transform: translateX(2px);
  color: #fff;
}

/* ── Guardian Context Switcher ── */
.context-switcher {
  margin: 0 0.75rem 0.25rem;
  padding: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.context-switcher-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--sidebar-text);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.context-switcher-option:hover { background: rgba(255,255,255,0.06); }
.context-switcher-option.active {
  background: rgba(255,255,255,0.08);
  font-weight: 700;
}
.context-switcher-option .material-symbols-outlined { font-size: 16px; }
.context-switcher-divider {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0;
}

/* ── Acting-As Banner ── */
.acting-as-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.acting-as-banner .material-symbols-outlined { font-size: 16px; color: #a855f7; }
.acting-as-banner-name { font-weight: 700; color: #a855f7; }
.acting-as-banner-exit {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  border: none;
  background: none;
}
.acting-as-banner-exit:hover { color: var(--text); }

/* ── Minor Account Badge ── */
.badge-minor {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
  background: rgba(168,85,247,0.1);
  color: #a855f7;
  border: 1px solid rgba(168,85,247,0.2);
}

/* ── Season Wizard ── */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 0 1rem;
  position: relative;
}
.wizard-progress::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  flex: 1;
}
.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s ease;
}
.wizard-step.active .wizard-step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 59,130,246), 0.4);
}
.wizard-step.completed .wizard-step-circle {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
.wizard-step-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  max-width: 90px;
}
.wizard-step.active .wizard-step-label { color: var(--text); font-weight: 600; }
.wizard-step.completed .wizard-step-label { color: #22c55e; }

.wizard-content { max-width: 720px; margin: 0 auto; }

.wizard-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.wizard-group-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wizard-group-card:hover { border-color: var(--accent); }
.wizard-group-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 59,130,246), 0.2);
}
.wizard-group-card input[type=checkbox] { display: none; }
.wizard-group-check {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.wizard-group-card.selected .wizard-group-check {
  background: var(--accent);
  border-color: var(--accent);
}
.wizard-group-card.selected .wizard-group-check::after {
  content: '\2713';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.wizard-group-info { flex: 1; }
.wizard-group-name { font-weight: 600; font-size: 0.95rem; }
.wizard-group-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

.wizard-summary-card {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
}
.wizard-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.wizard-stat {
  text-align: center;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
}
.wizard-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.wizard-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.wizard-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: wizardPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wizard-success-icon .material-symbols-outlined {
  font-size: 36px;
  color: #22c55e;
}
@keyframes wizardPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.wizard-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
}
.wizard-option label { font-size: 0.88rem; cursor: pointer; }

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Roster Migration ── */
.migrate-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .migrate-panels { grid-template-columns: 1fr; }
}
.migrate-panel {
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.migrate-panel h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.migrate-member-list {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 0.75rem;
}
.migrate-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.migrate-member:last-child { border-bottom: none; }
.migrate-select-all {
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: underline;
  margin-bottom: 0.5rem;
}

/* ── Navigation ── */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0 1rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  list-style: none;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 2px; }

.sidebar-nav li { list-style: none; }

/* ── Section Header (Dynamic Categorisation & Collapsible) ── */
.sidebar-section-header {
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0.85rem 1.05rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sb-section-title);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: color var(--transition);
  text-align: left;
}

.sidebar-section-header:hover {
  color: var(--sb-text-hover);
}

.sidebar-section-header.non-interactive {
  cursor: default;
}

.sidebar-section-header.non-interactive:hover {
  color: var(--sb-section-title);
}

.sidebar-section-header .sec-right-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.sidebar-section-header .sec-view-pill {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--sb-section-title);
}

.sidebar-section-header .sec-chevron {
  font-size: 15px;
  transition: transform 0.18s ease;
  opacity: 0.7;
}

.nav-section-group.collapsed .sec-chevron {
  transform: rotate(-90deg);
}

.sidebar-section-header .section-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* Low-volume auto-consolidation (threshold <= 5 items hides headers) */
.sidebar-flat-nav .sidebar-section-header,
.sidebar-flat-nav .nav-section-group,
.sidebar-section-header.hidden-empty,
.nav-section-group.hidden-empty {
  display: none !important;
}

.sidebar-item-collapsed {
  display: none !important;
}

.sidebar-flat-nav .sidebar-item-collapsed {
  display: block !important;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.95rem;
  color: var(--sb-text);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
  position: relative;
  margin: 1px 0.5rem;
}

.sidebar-link .material-symbols-outlined {
  font-size: 20px;
  color: var(--sb-icon-color);
  transition: color var(--transition);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.sidebar-link:hover {
  color: var(--sb-text-hover);
  background: var(--sb-link-hover);
  opacity: 1;
}

.sidebar-link:hover .material-symbols-outlined {
  color: var(--sb-text-hover);
}

.sidebar-link.active {
  color: var(--sb-text-active);
  background: var(--sb-link-active);
  font-weight: 600;
}

.sidebar-link.active .material-symbols-outlined {
  color: var(--sb-text-active);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.3;
}

/* ── Sidebar Sub-nav (coached teams) ── */
.sidebar-subnav {
  list-style: none;
  margin: 2px 0 4px 1.5rem;
  padding-left: 0.5rem;
  border-left: 1px dashed var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  color: var(--sb-text);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  margin: 0;
  transition: all var(--transition);
  position: relative;
}

.sidebar-sublink:hover {
  color: var(--sb-text-hover);
  background: var(--sb-link-hover);
  opacity: 1;
}

.sidebar-sublink.active {
  color: var(--sb-text-active);
  background: var(--sb-link-active);
  font-weight: 600;
}

.sidebar-sublink-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #8b5cf6;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition), box-shadow var(--transition);
}

.sidebar-sublink.active .sidebar-sublink-dot {
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
  transform: scale(1.2);
}

/* ── Redesigned Compact Sidebar Bottom ── */
.sidebar-bottom {
  flex-shrink: 0;
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 1px solid var(--sb-border);
  background: var(--sb-bottom-bg);
  transition: background var(--transition), border-color var(--transition);
}

.sidebar-bottom .sidebar-link {
  margin: 0 0 0.5rem 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.sidebar-utility-dock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0;
}

.theme-mode-pill-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--sb-pill-bg);
  border: 1px solid var(--sb-pill-border);
  border-radius: 20px;
  padding: 2px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.theme-mode-pill-toggle:hover {
  filter: brightness(0.96);
}

.theme-mode-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 16px;
  color: var(--sb-text);
  transition: all 0.15s ease;
}

.theme-mode-item .material-symbols-outlined {
  font-size: 14px;
}

.theme-mode-item.active {
  background: var(--sb-pill-active);
  color: var(--sb-pill-text-active);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.sidebar-logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sb-pill-bg);
  border: 1px solid var(--sb-pill-border);
  color: var(--sb-icon-color);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}

.sidebar-logout-btn .material-symbols-outlined {
  font-size: 17px;
}

.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Mobile sidebar backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--topbar-height);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 890;
}

.sidebar-backdrop.open { display: block; }

/* --- Full-Width Top Bar --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--topbar-height);
  background: var(--tb-bg);
  border-bottom: 1px solid var(--tb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

/* Club Masthead in Topbar */
.topbar-club-masthead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 1.25rem;
  border-right: 1px solid var(--tb-border);
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.topbar-club-crest {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold, #f59e0b) 0%, #b45309 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.topbar-club-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-club-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--tb-text);
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: color var(--transition);
}

.topbar-badge-season {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3b82f6;
  width: fit-content;
  margin-top: 1px;
}

[data-theme="light"] .topbar-badge-season {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* Page Context in Topbar */
.topbar-page-context {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tb-text);
  white-space: nowrap;
  transition: color var(--transition);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 1;
  min-width: 0;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--tb-text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
  border-radius: 6px;
  transition: background var(--transition);
}

.topbar-toggle:hover { background: rgba(255, 255, 255, 0.06); }

/* Responsive Adjustments */
@media (max-width: 768px) {
  .topbar {
    padding: 0 1rem;
  }
  .topbar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .topbar-club-masthead {
    border-right: none;
    padding-right: 0.5rem;
  }
  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    z-index: 1100;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .topbar-page-context {
    display: none;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--gold); opacity: 1; }

.breadcrumb-sep {
  color: var(--border);
  font-size: 0.9rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

.topbar-user:hover { border-color: var(--gold); opacity: 1; color: var(--text); }

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
}

/* --- Cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.12);
}

.card-glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-header-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  width: 100%;
}

.card-header-row .card-title,
.card-header-row h2,
.card-header-row h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.card-body {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.card-footer {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Stat Cards */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--secondary-rgb), 0.3);
}

.stat-card-body { flex: 1; }

.stat-value {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-icon {
  font-size: 1.75rem;
  opacity: 0.5;
}

/* Grid layouts */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.01em;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--secondary-rgb), 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary);
  color: var(--primary-text);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(var(--secondary-rgb), 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
  opacity: 1;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.1);
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.2);
  border-color: #f87171;
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  opacity: 1;
}

.btn-success {
  background: rgba(72, 187, 120, 0.1);
  color: #68d391;
  border-color: rgba(72, 187, 120, 0.3);
}

.btn-success:hover:not(:disabled) {
  background: rgba(72, 187, 120, 0.2);
  border-color: #68d391;
  opacity: 1;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; line-height: 1.2; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.btn-icon:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}
.btn-icon.btn-danger-icon,
.btn-icon--danger,
.btn-danger-icon {
  color: var(--muted);
}
.btn-icon.btn-danger-icon:hover,
.btn-icon--danger:hover,
.btn-danger-icon:hover {
  color: var(--danger) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}
.btn-full { width: 100%; justify-content: center; }

/* --- Forms --- */

/* Page-level form container (centers and limits width for standalone form pages) */
.form-page-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Form grids for logical field grouping */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* Span the full grid width (use inside form-grid / form-grid-2 / form-grid-3) */
.form-full { grid-column: 1 / -1; }

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-label .form-optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.3rem;
}

.form-control,
.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  min-height: 42px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  box-sizing: border-box;
}

.form-control:focus,
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.form-control::placeholder,
.form-input::placeholder { color: var(--muted); }
.form-control:disabled,
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }

select.form-control,
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

select.form-control option,
select.form-input option {
  background: var(--card);
  color: var(--text);
}

textarea.form-control,
textarea.form-input { resize: vertical; min-height: 110px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.form-hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ── Standard Modal Components ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open,
.modal-backdrop.show {
  display: flex;
}

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.modal-card-lg { max-width: 760px; }
.modal-card-sm { max-width: 420px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}
.modal-close-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.modal-close-btn .material-symbols-outlined { font-size: 22px; }

[data-theme="light"] .modal-close-btn:hover { background: rgba(0, 0, 0, 0.06); }


.form-error {
  font-size: 0.76rem;
  color: #f87171;
  margin-top: 0.3rem;
}

.form-control.is-invalid { border-color: #f87171; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }

[data-theme="light"] .form-control,
[data-theme="light"] .form-input {
  background: #f8f9fa;
  border-color: #d1d5db;
  color: var(--text);
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-input:focus {
  background: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

[data-theme="light"] select.form-control option,
[data-theme="light"] select.form-input option {
  background: #ffffff;
  color: var(--text);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: nowrap; flex-shrink: 0; }

.color-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-input-row input[type="color"] {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 2px;
  cursor: pointer;
  background: var(--surface);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Role badges */
.badge-committee { background: rgba(var(--secondary-rgb), 0.14); color: var(--gold); border: 1px solid rgba(var(--secondary-rgb), 0.3); }
.badge-coach     { background: rgba(99,179,237,0.14); color: #63b3ed; border: 1px solid rgba(99,179,237,0.3); }
.badge-player    { background: rgba(104,211,145,0.14); color: #68d391; border: 1px solid rgba(104,211,145,0.3); }
.badge-volunteer { background: rgba(214,188,250,0.14); color: #d6bcfa; border: 1px solid rgba(214,188,250,0.3); }
.badge-supporter { background: rgba(136,150,179,0.14); color: var(--muted); border: 1px solid var(--border); }
.badge-guardian  { background: rgba(252,129,74,0.14); color: #fc814a; border: 1px solid rgba(252,129,74,0.3); }

/* Status badges */
.badge-success, .badge-attending    { background: rgba(72,187,120,0.14); color: #68d391; border: 1px solid rgba(72,187,120,0.3); }
.badge-danger, .badge-not-attending { background: rgba(245,101,101,0.14); color: #f87171; border: 1px solid rgba(245,101,101,0.3); }
.badge-warning, .badge-maybe        { background: rgba(246,224,94,0.14);  color: #f6e05e; border: 1px solid rgba(246,224,94,0.3); }
.badge-info, .badge-open            { background: rgba(99,179,237,0.14);  color: #63b3ed; border: 1px solid rgba(99,179,237,0.3); }
.badge-complete                     { background: rgba(72,187,120,0.14); color: #68d391; border: 1px solid rgba(72,187,120,0.3); }
.badge-in-progress                  { background: rgba(var(--secondary-rgb), 0.14); color: var(--gold); border: 1px solid rgba(var(--secondary-rgb), 0.3); }
.badge-cancelled                    { background: rgba(245,101,101,0.14); color: #f87171; border: 1px solid rgba(245,101,101,0.3); }
.badge-neutral                      { background: rgba(136,150,179,0.14); color: var(--muted); border: 1px solid var(--border); }

/* Difficulty */
.badge-beginner    { background: rgba(72,187,120,0.14); color: #68d391; border: 1px solid rgba(72,187,120,0.3); }
.badge-intermediate { background: rgba(var(--secondary-rgb), 0.14); color: var(--gold); border: 1px solid rgba(var(--secondary-rgb), 0.3); }
.badge-advanced    { background: rgba(245,101,101,0.14); color: #f87171; border: 1px solid rgba(245,101,101,0.3); }

/* Event type */
.badge-training { background: rgba(99,179,237,0.14); color: #63b3ed; border: 1px solid rgba(99,179,237,0.3); }
.badge-match    { background: rgba(var(--secondary-rgb), 0.14); color: var(--gold); border: 1px solid rgba(var(--secondary-rgb), 0.3); }
.badge-social   { background: rgba(214,188,250,0.14); color: #d6bcfa; border: 1px solid rgba(214,188,250,0.3); }
.badge-meeting  { background: rgba(252,129,74,0.14); color: #fc814a; border: 1px solid rgba(252,129,74,0.3); }

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead { background: var(--surface); }

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
tbody tr:nth-child(even):hover { background: rgba(255, 255, 255, 0.03); }

[data-theme="light"] thead {
  background: #f8f9fa;
}

[data-theme="light"] tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.04);
}

.table-action-cell { display: flex; gap: 0.4rem; align-items: center; }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 200ms ease; }

/* --- Year filter tabs (Minutes) --- */
.year-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.year-tab-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.year-tab-btn:hover { border-color: var(--gold); color: var(--gold); }
.year-tab-btn.active { background: rgba(var(--secondary-rgb), 0.1); border-color: var(--gold); color: var(--gold); }

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 250ms ease;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 720px; }

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0.2rem;
  line-height: 1;
  border-radius: 4px;
}

.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* --- Toasts --- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  min-width: 280px;
  max-width: 400px;
  transform: translateX(120%);
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.toast.show { transform: translateX(0); }
.toast-success { border-left: 3px solid #68d391; }
.toast-error   { border-left: 3px solid #f87171; }
.toast-warning { border-left: 3px solid #f6e05e; }
.toast-info    { border-left: 3px solid #63b3ed; }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-message { flex: 1; line-height: 1.4; }

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.15rem;
  flex-shrink: 0;
  transition: color var(--transition);
}

.toast-close:hover { color: var(--text); }

/* --- Flash Messages (Modern Floating Toasts) --- */
.messages-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 440px;
  width: calc(100vw - 3rem);
  pointer-events: none;
}

.message {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f8fafc;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.06);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow: hidden;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.message-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 1px;
}
.message-icon .material-symbols-outlined {
  font-size: 22px;
}

.message-body {
  flex: 1;
  min-width: 0;
}
.message-text {
  word-break: break-word;
  font-weight: 500;
  color: #f1f5f9;
}

.message-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s ease;
  margin-top: -2px;
}
.message-close:hover {
  color: #fff;
}

.message-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: toastCountdown 20s linear forwards;
}

@keyframes toastCountdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.message-success {
  border-left: 4px solid #10b981;
}
.message-success .message-icon { color: #34d399; }
.message-success .message-progress { background: #10b981; }

.message-error, .message-danger {
  border-left: 4px solid #ef4444;
}
.message-error .message-icon, .message-danger .message-icon { color: #f87171; }
.message-error .message-progress { background: #ef4444; }

.message-warning {
  border-left: 4px solid #f59e0b;
}
.message-warning .message-icon { color: #fbbf24; }
.message-warning .message-progress { background: #f59e0b; }

.message-info {
  border-left: 4px solid #3b82f6;
}
.message-info .message-icon { color: #60a5fa; }
.message-info .message-progress { background: #3b82f6; }

.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  border: 1px solid;
  animation: slideUp 250ms ease forwards;
  transition: opacity 350ms ease;
}

.alert-success { background: rgba(72,187,120,0.1); color: #68d391; border-color: rgba(72,187,120,0.28); }
.alert-error, .alert-danger { background: rgba(245,101,101,0.1); color: #f87171; border-color: rgba(245,101,101,0.28); }
.alert-warning { background: rgba(var(--secondary-rgb), 0.1); color: var(--gold); border-color: rgba(var(--secondary-rgb), 0.28); }
.alert-info    { background: rgba(99,179,237,0.1); color: #63b3ed; border-color: rgba(99,179,237,0.28); }

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: currentColor;
  cursor: pointer;
  opacity: 0.6;
  font-size: 1.1rem;
  line-height: 1;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

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

/* --- RSVP Widget --- */
.rsvp-widget {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rsvp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}

.rsvp-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.rsvp-btn[data-rsvp="attending"].active,
.rsvp-btn.active-attending {
  background: rgba(72,187,120,0.15);
  border-color: #68d391;
  color: #68d391;
}

.rsvp-btn[data-rsvp="maybe"].active,
.rsvp-btn.active-maybe {
  background: rgba(246,224,94,0.15);
  border-color: #f6e05e;
  color: #f6e05e;
}

.rsvp-btn[data-rsvp="not_attending"].active,
.rsvp-btn.active-not-attending {
  background: rgba(248,113,113,0.15);
  border-color: #f87171;
  color: #f87171;
}

.rsvp-counts {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.rsvp-count-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.rsvp-list-section { margin-top: 1.25rem; }

.rsvp-names { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.name-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

/* --- Volunteer Roster --- */
.roster-list { display: flex; flex-direction: column; gap: 0.5rem; }

.roster-slot {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color var(--transition);
}

.roster-slot:hover { border-color: rgba(var(--secondary-rgb), 0.2); }

.roster-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  width: 160px;
  flex-shrink: 0;
}

.roster-assignee {
  flex: 1;
  font-size: 0.875rem;
  color: var(--muted);
}

.roster-assignee.assigned { color: var(--text); }

.roster-notes {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  flex: 1;
}

@keyframes slotHighlightPulse {
  0% { background: rgba(34, 197, 94, 0.32); }
  50% { background: rgba(34, 197, 94, 0.16); }
  100% { background: transparent; }
}

.slot-highlight-flash {
  animation: slotHighlightPulse 1.2s ease-out;
}

.roster-actions { display: flex; gap: 0.4rem; align-items: center; margin-left: auto; }

/* --- Meeting Minutes Layout --- */
.minutes-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.minutes-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.minutes-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.minutes-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.minutes-items { display: flex; flex-direction: column; gap: 1rem; }

.minutes-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  transition: border-color var(--transition);
}

.minutes-item.action-item { border-left: 3px solid var(--gold); }
.minutes-item.noting-item { border-left: 3px solid #63b3ed; }
.minutes-item.general-item { border-left: 3px solid var(--border); }

.minutes-item-number {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold);
  min-width: 2rem;
  flex-shrink: 0;
  line-height: 1.3;
}

.minutes-item-body { flex: 1; min-width: 0; }

.minutes-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.minutes-item-text {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.action-detail {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(var(--secondary-rgb), 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--secondary-rgb), 0.14);
}

.action-assignee {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.action-due {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.attendee-section { margin-bottom: 1.5rem; }

.attendee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.attendee-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.attendee-chip.present {
  background: rgba(72,187,120,0.1);
  color: #68d391;
  border: 1px solid rgba(72,187,120,0.25);
}

.attendee-chip.apology {
  background: rgba(248,113,113,0.1);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.25);
}

/* Minutes multi-step form */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--card);
  flex-shrink: 0;
  transition: all var(--transition);
}

.step-dot.active { border-color: var(--gold); color: var(--gold); background: rgba(var(--secondary-rgb), 0.1); }
.step-dot.completed { border-color: #68d391; background: rgba(72,187,120,0.1); color: #68d391; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.step-line.completed { background: rgba(72,187,120,0.4); }

.step-label {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 0.35rem;
  text-align: center;
}

/* Dynamic items list */
.dynamic-items { display: flex; flex-direction: column; gap: 1rem; }

.dynamic-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  position: relative;
}

.dynamic-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dynamic-item-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem;
  transition: color var(--transition);
}

.remove-item-btn:hover { color: #f87171; }

/* --- Drill Library --- */
.drill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.drill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(var(--secondary-rgb), 0.2);
}

.drill-card-field {
  height: 140px;
  background: #1e5c1e;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Mini AFL field markings via CSS */
.drill-card-field::before {
  content: '';
  position: absolute;
  top: 6%;
  left: 6%;
  right: 6%;
  bottom: 6%;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
}

.drill-card-field::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 25%;
  right: 25%;
  height: 1.5px;
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%);
}

.drill-card-field-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drill-card-field-inner::before {
  content: '';
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
}

.drill-card-body { padding: 1rem; flex: 1; }

.drill-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.drill-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.drill-card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}

/* --- Drill Editor Layout --- */
.drill-editor-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--dark-bg);
}

.drill-title-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  height: 52px;
}

.drill-title-input {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  outline: none;
  flex: 1;
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--transition);
  padding: 0.2rem 0;
}

.drill-title-input:focus { border-bottom-color: var(--gold); }

.drill-editor-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.drill-toolbar {
  width: 76px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  gap: 0.4rem;
  overflow-y: auto;
  flex-shrink: 0;
}

.tool-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 0.3rem 0;
}

.tool-btn {
  width: 52px;
  height: 52px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.55rem;
  color: var(--muted);
  gap: 0.15rem;
  text-align: center;
  line-height: 1.2;
}

.tool-btn:hover { border-color: var(--gold); color: var(--text); }
.tool-btn.active { border-color: var(--gold); background: rgba(var(--secondary-rgb), 0.1); color: var(--gold); }

.tool-icon { font-size: 1.2rem; }

.drill-canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  background: var(--dark-bg);
}

.canvas-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.canvas-container canvas {
  display: block;
}

.drill-steps-panel {
  width: 272px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.steps-panel-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.steps-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.steps-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 0.25rem;
  border: 1.5px solid transparent;
}

.step-item:hover { background: rgba(255,255,255,0.04); }

.step-item.active {
  background: rgba(var(--secondary-rgb), 0.08);
  border-color: rgba(var(--secondary-rgb), 0.28);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.step-item.active .step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--secondary-text);
}

.step-text {
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-item.active .step-text { color: var(--text); }

.step-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.15rem;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
  opacity: 0;
}

.step-item:hover .step-delete { opacity: 1; }
.step-delete:hover { color: #f87171; }

.step-instruction-area {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.step-instruction-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.step-instruction-area textarea {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  padding: 0.6rem 0.75rem;
  resize: none;
  height: 90px;
  outline: none;
  transition: border-color var(--transition);
}

.step-instruction-area textarea:focus { border-color: var(--gold); }

.drill-bottom-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.65rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.shortcut-hints {
  display: flex;
  gap: 1rem;
  font-size: 0.68rem;
  color: var(--muted);
  margin-left: auto;
  flex-wrap: wrap;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.key {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.08rem 0.35rem;
  font-size: 0.62rem;
  font-family: monospace;
  color: var(--text);
}

/* Auto-save indicator */
.save-indicator {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.save-dot.saving { background: var(--gold); animation: spin 1s linear infinite; }
.save-dot.saved  { background: #68d391; }

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--gold); color: var(--gold); }
.filter-chip.active { background: rgba(var(--secondary-rgb), 0.1); border-color: var(--gold); color: var(--gold); }

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input-wrap .form-control {
  padding-left: 2.5rem;
}

/* --- Member Cards (Styles defined in Member Directory section below) --- */

.member-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}

.member-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.member-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.member-detail-text {
  font-size: 0.8rem;
  color: var(--muted);
}


/* ── Season Filter Bar ── */
.season-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.season-filter-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.season-filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
  background: var(--dark-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.season-pill:hover { border-color: var(--gold); color: var(--text); }
.season-pill-active {
  background: rgba(var(--secondary-rgb), 0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.season-active-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

/* ── Season Info Banner ── */
.season-info-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(var(--secondary-rgb), 0.07);
  border: 1px solid rgba(var(--secondary-rgb), 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.season-info-banner .material-symbols-outlined { font-size: 16px; color: var(--gold); }

/* ── Team Card Badges Row ── */
.team-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.season-badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
  background: rgba(var(--secondary-rgb), 0.1);
  color: var(--gold);
  border: 1px solid rgba(var(--secondary-rgb), 0.2);
}
.badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
}
.badge-success { background: rgba(34,197,94,0.12); color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.badge-muted { background: var(--dark-bg); color: var(--muted); border: 1px solid var(--border); }
.badge-info { background: rgba(var(--primary-rgb), 0.1); color: #3b82f6; border: 1px solid rgba(var(--primary-rgb), 0.2); }
.badge-senior { background: rgba(var(--secondary-rgb), 0.1); color: var(--gold); border: 1px solid rgba(var(--secondary-rgb), 0.2); }
.badge-junior { background: rgba(var(--primary-rgb), 0.1); color: #3b82f6; border: 1px solid rgba(var(--primary-rgb), 0.2); }
.badge-social { background: rgba(168,85,247,0.1); color: #a855f7; border: 1px solid rgba(168,85,247,0.2); }

/* ── Archived Team Card ── */
.team-card-archived {
  opacity: 0.6;
  filter: grayscale(0.3);
}
.team-card-archived:hover { opacity: 0.85; }

/* --- Event Cards --- */
.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: border-color var(--transition);
}

.event-date-block {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(var(--secondary-rgb), 0.1);
  border: 1px solid rgba(var(--secondary-rgb), 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-date-day {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.event-date-month {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-body { flex: 1; min-width: 0; }

.event-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.event-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Profile Page --- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2.2rem;
  overflow: hidden;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--secondary-text);
  border: 2px solid var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}

.avatar-upload-btn:hover { background: #7c3aed; }

.profile-info { flex: 1; }

.profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.profile-email { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.6rem; }

/* --- Landing Page --- */
.landing-layout {
  min-height: 100vh;
  background: var(--dark-bg);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.52rem 0.85rem 0.52rem 1.25rem;
  position: fixed;
  top: 1.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2.5rem);
  max-width: 1160px;
  z-index: 1000;
  border-radius: 100px;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.landing-logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}

.landing-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: var(--secondary-text);
}

.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #111111 45%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, rgba(var(--secondary-rgb), 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  pointer-events: none;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: var(--navy);
  top: -180px;
  left: -180px;
  animation: float 10s ease-in-out infinite;
}

.hero-orb-2 {
  width: 350px;
  height: 350px;
  background: var(--gold);
  bottom: -100px;
  right: -100px;
  animation: float 12s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(var(--secondary-rgb), 0.3);
  background: rgba(var(--secondary-rgb), 0.07);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-title span { color: var(--gold); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.features {
  padding: 5rem 2rem;
  background: var(--surface);
}

.features-inner { max-width: 1100px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--secondary-rgb), 0.2);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature-text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  text-align: center;
  display: block;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

.landing-footer {
  background: var(--dark-bg);
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --- Auth Pages --- */
.auth-layout {
  min-height: 100vh;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.auth-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--navy);
  top: -250px;
  left: -250px;
  opacity: 0.18;
  animation: float 12s ease-in-out infinite;
}

.auth-orb-2 {
  width: 450px;
  height: 450px;
  background: rgba(var(--secondary-rgb), 0.6);
  bottom: -200px;
  right: -180px;
  opacity: 0.08;
  animation: float 14s ease-in-out infinite reverse;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-mark {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--secondary-text);
  margin: 0 auto 0.75rem;
  overflow: hidden;
}

.auth-logo-mark img { width: 100%; height: 100%; object-fit: contain; }

.auth-logo-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--white);
  display: block;
}

.auth-logo-sub {
  font-size: 0.78rem;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-footer a { color: var(--gold); }

.auth-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* --- Page layout helpers --- */
.page-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-text { flex: 1; }

.page-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.section-title-sm {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  display: block;
}

.empty-state-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.empty-state-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-24px) scale(1.03); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.animate-fadeIn  { animation: fadeIn 300ms ease forwards; }
.animate-slideUp { animation: slideUp 350ms ease forwards; }

.shimmer {
  background: linear-gradient(90deg, var(--card) 25%, rgba(255,255,255,0.04) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}

@keyframes pageLoad {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.content {
  animation: pageLoad 350ms ease-out;
}

.main-content {
  animation: pageLoad 350ms ease-out;
}

/* --- Context Menu --- */
.context-menu {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 300;
  min-width: 160px;
  overflow: hidden;
  animation: slideDown 150ms ease;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}

.context-menu-item:hover { background: rgba(255,255,255,0.05); }
.context-menu-item.danger { color: #f87171; }
.context-menu-item.danger:hover { background: rgba(248,113,113,0.08); }

/* --- Dropdown --- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 150;
  min-width: 180px;
  overflow: hidden;
  display: none;
  animation: slideDown 150ms ease;
}

.dropdown-menu.open { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.dropdown-item:hover { background: rgba(255,255,255,0.05); opacity: 1; color: var(--text); }
.dropdown-item.danger { color: #f87171; }
.dropdown-item.danger:hover { background: rgba(248,113,113,0.08); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }

/* Google Tasks button */
.gtasks-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1.5px solid rgba(66,133,244,0.4);
  background: rgba(66,133,244,0.1);
  color: #4285f4;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.gtasks-btn:hover { background: rgba(66,133,244,0.2); border-color: #4285f4; color: #4285f4; opacity: 1; }
.gtasks-btn.synced { border-color: rgba(52,168,83,0.4); background: rgba(52,168,83,0.1); color: #34a853; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; }
.toggle-label { font-size: 0.875rem; color: var(--text); font-weight: 500; }
.toggle-sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
}

.toggle input:checked + .toggle-slider { background: var(--gold); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Pagination */
.pagination {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: rgba(var(--secondary-rgb), 0.1); border-color: var(--gold); color: var(--gold); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Quick action grid */
.quick-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.quick-action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(var(--secondary-rgb), 0.06);
  opacity: 1;
  transform: translateY(-1px);
}

/* Colour swatch */
.colour-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  display: inline-block;
  flex-shrink: 0;
}

/* Pending invite list */
.invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 0.5rem;
}

/* Step-through viewer (drill detail) */
.step-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.step-viewer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.step-counter {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.sidebar-backdrop { display: none; }

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1100;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--topbar-height);
    background: rgba(0,0,0,0.5);
    z-index: 1090;
    backdrop-filter: blur(2px);
  }
  .sidebar-backdrop.open { display: block; }
  .main-wrapper {
    margin-left: 0;
  }
  .topbar-toggle {
    display: flex;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
  .main-content {
    padding: 1rem;
  }
  .topbar {
    padding: 0 1rem;
  }
  .topbar-title { font-size: 1rem; }
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .landing-nav {
    padding: 1rem 1.25rem;
  }
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  .drill-editor-main {
    flex-direction: column;
  }
  .drill-toolbar {
    width: 100%;
    height: 64px;
    flex-direction: row;
    padding: 0.5rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .tool-divider {
    width: 1px;
    height: 32px;
    margin: 0 0.25rem;
  }
  .drill-steps-panel {
    width: 100%;
    height: 200px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .minutes-item { flex-direction: column; gap: 0.5rem; }
  .roster-slot { flex-wrap: wrap; }
  .roster-role { width: auto; }
}

@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .btn-lg { padding: 0.75rem 1.5rem; }
  .hero-title { font-size: 2rem; }
}

/* --- Print Styles --- */
@media print {
  .sidebar,
  .topbar,
  .mobile-menu-btn,
  .rsvp-widget,
  .drill-toolbar,
  .drill-steps-panel,
  .drill-bottom-bar,
  .drill-title-bar,
  .messages-container,
  .toast-container,
  .btn:not(.no-print-hide),
  .modal-overlay {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
  }

  body {
    background: #ffffff !important;
    color: #1a1a1a !important;
    font-size: 11pt;
  }

  .card,
  .minutes-item,
  .minutes-header {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
  }

  .minutes-title { color: #000000 !important; font-size: 18pt; }
  .minutes-meta { color: #555555 !important; }
  .minutes-item-title { color: #000000 !important; }
  .minutes-item-text { color: #333333 !important; }
  .minutes-item-number { color: #000000 !important; }

  .badge {
    border: 1px solid #cccccc !important;
    color: #333333 !important;
    background: #f5f5f5 !important;
  }

  a { color: #000000 !important; text-decoration: underline; }
  .main-content { padding: 0 !important; }

  .attendee-chip.present { background: #e8f5e9 !important; color: #2e7d32 !important; }
  .attendee-chip.apology { background: #ffebee !important; color: #c62828 !important; }

  @page {
    margin: 2cm;
    size: A4;
  }
}

/* --- Utility Classes --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.text-sm  { font-size: 0.82rem; }
.text-xs  { font-size: 0.72rem; }
.text-lg  { font-size: 1.1rem; }
.text-xl  { font-size: 1.3rem; }
.text-muted   { color: var(--muted); }
.text-gold    { color: var(--gold); }
.text-white   { color: var(--white); }
.text-danger  { color: #f87171; }
.text-success { color: #68d391; }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.w-full { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }
.max-w-container { max-width: 1200px; margin: 0 auto; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.relative { position: relative; }
.hidden { display: none !important; }
.opacity-50 { opacity: 0.5; }
.rounded { border-radius: var(--radius-sm); }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.min-w-0 { min-width: 0; }

/* ===================================================
   DRILL DETAIL / OVERVIEW
   =================================================== */

.drill-overview-card {
  margin-bottom: 1.5rem;
}

.drill-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.drill-overview-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.drill-overview-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.drill-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.drill-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  flex: 1 1 120px;
  min-width: 120px;
}

.drill-stat-icon {
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.8;
}

.drill-stat-info {
  display: flex;
  flex-direction: column;
}

.drill-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.drill-stat-value small {
  font-size: 0.7em;
  font-weight: 400;
  color: var(--muted);
  margin-left: 1px;
}

.drill-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.drill-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.drill-purpose-section {
  margin-bottom: 1.25rem;
}

.drill-purpose-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  padding-left: 0.25rem;
}

.drill-skills-section {
  margin-bottom: 1.25rem;
}

.drill-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-chip {
  background: rgba(var(--secondary-rgb), 0.12);
  color: var(--gold);
  border: 1px solid rgba(var(--secondary-rgb), 0.25);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.drill-tags-section {
  margin-bottom: 1.25rem;
}

.drill-overview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.drill-author, .drill-date {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Light mode overrides */
[data-theme="light"] .drill-stats-row {
  background: rgba(0,0,0,0.02);
}

[data-theme="light"] .skill-chip {
  background: rgba(180, 120, 0, 0.1);
  color: #8b5e00;
  border-color: rgba(180, 120, 0, 0.25);
}

/* ===================================================
   DRILL EDITOR LAYOUT
   =================================================== */

.drill-editor-page .main-wrapper {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.drill-editor-page .content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
}

.drill-editor-layout {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  gap: 0;
}

.drill-main-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: #090d16;
  position: relative;
}

/* ── Option B: Left Tool Palette ── */
.drill-palette-left {
  position: absolute;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 72px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.4rem;
  gap: 0.85rem;
  overflow-y: auto;
  transition: all 0.25s ease;
}

.drill-palette-left.palette-hidden { display: none !important; }

.palette-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.palette-group:last-child { border-bottom: none; }

.palette-group-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.palette-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.palette-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.palette-icon-btn.active {
  background: rgba(var(--secondary-rgb, 245, 158, 11), 0.18);
  border-color: var(--gold, #f59e0b);
  color: var(--gold, #f59e0b);
}

.palette-icon-btn .material-symbols-outlined { font-size: 20px; }

/* ── One-Click Color Swatches ── */
.swatches-grid {
  display: grid;
  grid-template-columns: repeat(2, 26px);
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.color-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  padding: 0;
  outline: none;
}

.color-swatch-btn:hover {
  transform: scale(1.2);
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.color-swatch-btn.selected,
.color-swatch-btn.active {
  transform: scale(1.15);
  border-color: #fff !important;
  box-shadow: 0 0 0 2.5px var(--gold, #f59e0b), 0 3px 10px rgba(0, 0, 0, 0.7) !important;
}

.color-swatch-btn:active {
  transform: scale(0.95);
}

/* ── Toolbars ── */
.drill-toolbar-horizontal {
  background: var(--surface);
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  flex-shrink: 0;
}
.drill-toolbar-horizontal.top { border-bottom: 1px solid var(--border); }
.drill-toolbar-horizontal.bottom {
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
.drill-toolbar-horizontal.bottom.toolbar-hidden { display: none !important; }

.toolbar-section { display: flex; flex-direction: row; align-items: center; gap: 0.4rem; padding-right: 1rem; border-right: 1px solid rgba(255,255,255,0.1); }
.toolbar-section:last-child { border-right: none; }

.toolbar-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 0.25rem;
}

.tool-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  text-align: left;
  transition: all var(--transition);
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.tool-btn:hover { background: rgba(var(--secondary-rgb), 0.1); border-color: var(--gold); }
.tool-btn.active { background: rgba(var(--secondary-rgb), 0.2); border-color: var(--gold); color: var(--gold); }
.tool-btn-danger:hover { background: rgba(220,38,38,0.15); border-color: #ef4444; color: #f87171; }

.tool-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 80px;
}
.tool-select:hover { border-color: var(--gold); }
.tool-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(var(--secondary-rgb), 0.15); }
.tool-select option { background: var(--surface); color: var(--text); }

.toolbar-rotation-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 2.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.toolbar-shortcuts { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.shortcut-hint { font-size: 0.65rem; color: var(--muted); line-height: 1.8; }

.drill-canvas-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.75rem;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  position: relative;
}

#drillCanvas {
  border-radius: 12px;
  cursor: grab;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

#drillCanvas:active { cursor: grabbing; }
.drill-canvas-readonly { cursor: default !important; }

/* ── Steps Panel with In-Card Collapsible Instructions ── */
.drill-steps-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 320px;
  flex-shrink: 0;
  transition: width 0.25s ease;
}

.steps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.steps-title { font-weight: 800; font-size: 0.9rem; color: var(--text); display: flex; align-items: center; gap: 0.4rem; }

.steps-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition);
  position: relative;
}

.step-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }
.step-item.step-active { background: rgba(var(--secondary-rgb), 0.08); border-color: var(--gold); }

.step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.step-card-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.step-num {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--gold);
  background: rgba(var(--secondary-rgb), 0.2);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-preview { font-size: 0.85rem; font-weight: 700; color: var(--muted); flex: 1; }
.step-item.step-active .step-preview { color: var(--text); }

.step-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  opacity: 0.5;
  transition: all var(--transition);
}

.step-item:hover .step-delete { opacity: 1; }
.step-delete:hover { background: rgba(239,68,68,0.2); color: #f87171; }

/* ── In-Card Collapsible Instruction Block ── */
.step-instruction-block {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  transition: all 0.2s ease;
  position: relative;
  cursor: default;
}
.step-instruction-block:hover { border-color: rgba(255, 255, 255, 0.14); }

.instruction-preview-mode {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.step-instruction-block.collapsed .instruction-edit-mode { display: none; }
.step-instruction-block.collapsed .instruction-preview-mode { display: -webkit-box; }

.instruction-click-hint {
  font-size: 0.68rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-weight: 600;
  cursor: pointer;
}
.step-instruction-block.collapsed .instruction-click-hint { display: flex; }

.step-instruction-block.editing {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--gold);
}
.step-instruction-block.editing .instruction-preview-mode { display: none; }
.step-instruction-block.editing .instruction-click-hint { display: none; }
.step-instruction-block.editing .instruction-edit-mode { display: flex; flex-direction: column; gap: 0.5rem; }

.instruction-in-card-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  outline: none;
  resize: none;
  min-height: 70px;
  max-height: 150px;
  overflow-y: auto;
}

.instruction-edit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.4rem;
}
.instruction-char-badge {
  font-size: 0.68rem;
  color: var(--muted);
}
.instruction-done-btn {
  background: rgba(var(--secondary-rgb), 0.2);
  color: var(--gold);
  border: 1px solid rgba(var(--secondary-rgb), 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s;
}
.instruction-done-btn:hover {
  background: var(--gold);
  color: #0b1120;
}

/* Responsive tablet/mobile layout adjustments */
@media (min-width: 769px) and (max-width: 1023px) {
  .drill-palette-left {
    width: 52px;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    padding: 0.5rem 0.2rem;
  }
  .palette-icon-btn {
    width: 38px;
    height: 38px;
  }
  .drill-steps-panel {
    width: 260px;
  }
}

@media (max-width: 768px) {
  .drill-palette-left {
    display: none !important;
  }
}

.save-status { font-size: 0.8rem; color: var(--muted); }
.save-status.saving { color: var(--gold); }
.save-status.saved  { color: #68d391; }

.inline-editable {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: inherit;
  font-weight: inherit;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--transition);
}

.inline-editable:focus { border-color: var(--gold); }

/* ─── Metadata Slide-Out Panel ───────────────── */

.meta-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
  backdrop-filter: blur(2px);
}
.meta-panel-overlay.open { display: block; }

.meta-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 950;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.meta-panel.open { transform: translateX(0); }

.meta-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.meta-panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.meta-panel-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.meta-panel-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.meta-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.meta-panel-body .form-group { margin-bottom: 0.85rem; }
.meta-panel-body .form-label { font-size: 0.78rem; }

.btn-block { width: 100%; }

/* ===================================================
   DRILL VIEWER (read-only)
   =================================================== */

.drill-viewer { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

/* Compact Drill Header Overview Card */
.detail-header-card {
  background: var(--surface-card, rgba(15, 23, 42, 0.75));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}
.detail-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.detail-title-group { flex: 1; min-width: 0; }
.detail-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.detail-title-group h2 {
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
}
.detail-desc-text {
  color: var(--muted, #94a3b8);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}
.detail-purpose-callout {
  margin: 0.4rem 0 0 0;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
}
.detail-purpose-callout strong {
  color: var(--gold, #f59e0b);
  font-weight: 700;
}
.detail-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.btn-pdf-export {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  font-family: inherit;
  text-decoration: none;
}
.btn-pdf-export:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn-edit-drill {
  background: var(--gold, #f59e0b);
  color: #0b1120 !important;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(var(--gold-rgb, 245, 158, 11), 0.3);
}
.btn-edit-drill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--gold-rgb, 245, 158, 11), 0.45);
}
.youtube-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
}
.youtube-hero-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.difficulty-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}
.diff-beginner { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.diff-intermediate { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.diff-advanced { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.duration-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}
.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.detail-stat-pill {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm, 10px);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.detail-stat-pill:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.detail-stat-pill .material-symbols-outlined {
  font-size: 20px;
  color: var(--gold, #f59e0b);
  flex-shrink: 0;
}
.detail-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.detail-stat-lbl {
  font-size: 0.68rem;
  color: var(--muted, #94a3b8);
  font-weight: 600;
  text-transform: capitalize;
}
.detail-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.detail-tags-row .skill-chip {
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.12);
  color: var(--gold, #f59e0b);
  border: 1px solid rgba(var(--gold-rgb, 245, 158, 11), 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.75rem;
  font-weight: 600;
}
.detail-tags-row .tag-chip {
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.75rem;
  font-weight: 600;
}
.detail-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
}

/* Step Navigation Container & Horizontal Scrubber */
.step-nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 820px;
  margin: 1.25rem auto 1rem;
  padding: 0 0.5rem;
}
.step-nav-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: #e2e8f0;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
  line-height: 1;
}
.step-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.step-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.step-nav-btn .material-symbols-outlined {
  font-size: 16px;
}
.step-scrubber-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
}
.step-scrubber-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 18px;
  width: 100%;
  scrollbar-width: none;
}
.step-scrubber-pills::-webkit-scrollbar {
  display: none;
}
.scrubber-pill {
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill, 9999px);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
}
.scrubber-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.scrubber-pill.active {
  background: #fff;
  color: #0b1120;
  border-color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.instruction-card {
  margin-top: 1.25rem;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.instruction-card strong {
  color: var(--gold);
  font-size: 0.88rem;
  display: block;
  margin-bottom: 0.4rem;
}
.instruction-card p {
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ===================================================
   UNIFIED APP HERO SYSTEM (MATCHING DRILLS BLUEPRINT)
   =================================================== */

.app-hero,
.drill-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.app-hero::before,
.drill-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(var(--secondary-rgb, 245, 158, 11), 0.16) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

.app-hero-top,
.drill-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
  margin-bottom: 1.75rem;
}

.app-hero-text,
.drill-hero-text {
  flex: 1;
  min-width: 280px;
  max-width: 760px;
}

.app-hero-text h1,
.drill-hero-text h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.app-hero-text h1 .material-symbols-outlined,
.drill-hero-text h1 .material-symbols-outlined {
  color: var(--gold, #f59e0b);
  font-size: 2.2rem;
  flex-shrink: 0;
}

.app-hero-text p,
.drill-hero-text p {
  color: var(--muted, #94a3b8);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.app-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.app-hero-cta-primary,
.drill-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--gold, #f59e0b);
  color: #0b1120 !important;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm, 8px);
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(var(--secondary-rgb, 245, 158, 11), 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
  line-height: 1;
}

.app-hero-cta-primary:hover,
.drill-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--secondary-rgb, 245, 158, 11), 0.5);
  color: #0b1120 !important;
}

.app-hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: #e2e8f0 !important;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.65rem 1.05rem;
  border-radius: var(--radius-sm, 8px);
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.app-hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff !important;
}

/* ── Hero Stats Deck ── */
.app-hero-stats,
.drill-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.hero-stat-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: inherit;
  user-select: none;
  cursor: default;
}

a.hero-stat-card,
button.hero-stat-card {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
  text-align: left;
  width: 100%;
}

a.hero-stat-card:hover,
button.hero-stat-card:hover,
.hero-stat-card.interactive:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.icon-gold, .icon-total { background: rgba(245, 158, 11, 0.15); color: var(--gold, #f59e0b); }
.icon-green, .icon-beg  { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.icon-blue, .icon-int   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-purple, .icon-adv { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.icon-rose              { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.icon-cyan              { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }

.hero-stat-info {
  flex: 1;
  min-width: 0;
}

.hero-stat-info .num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-stat-info .lbl {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-stat-info .sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Responsive Hero Helpers ── */
.hero-stat-suffix,
.hero-stat-prefix {
  display: inline;
}
.hero-label-desktop {
  display: inline;
}
.hero-label-mobile {
  display: none;
}

/* ── Tablet Refinements (769px - 1024px) ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-hero,
  .drill-hero,
  .sponsor-hero,
  .billing-hero,
  .profile-hero-card,
  .role-hero-card,
  .tasks-hero {
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.35rem;
  }
  .app-hero-stats,
  .drill-hero-stats,
  .sponsor-hero-stats,
  .billing-hero-stats,
  .hero-stats-grid,
  .tasks-hero-stats,
  .profile-hero-stats,
  .role-hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)) !important;
    gap: 0.65rem !important;
  }
  .hero-stat-card {
    padding: 0.65rem 0.85rem !important;
  }
}

/* ── Mobile Condensed Hero Cards (<= 768px) ── */
@media (max-width: 768px) {
  .hero-stat-suffix,
  .hero-stat-prefix {
    display: none !important;
  }
  .hero-label-desktop {
    display: none !important;
  }
  .hero-label-mobile {
    display: inline !important;
  }

  /* Hero containers */
  .app-hero,
  .drill-hero,
  .sponsor-hero,
  .billing-hero,
  .tasks-hero,
  .profile-hero-card,
  .role-hero-card,
  .runner-hero-card,
  .training-hero-card,
  .event-hero {
    padding: 0.85rem 1rem !important;
    margin-bottom: 0.85rem !important;
    border-radius: 12px !important;
  }

  .app-hero-top,
  .drill-hero-top,
  .sponsor-hero-top,
  .billing-hero-top,
  .tasks-hero-top,
  .hero-top-row,
  .role-hero-content {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    margin-bottom: 0.5rem !important;
  }

  .app-hero-text h1,
  .drill-hero-text h1,
  .sponsor-hero-text h1,
  .billing-hero-text h1,
  .tasks-hero-text h1,
  .hero-title-area h2,
  .role-hero-title,
  .event-hero-title {
    font-size: 1.25rem !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
  }

  .app-hero-text h1 .material-symbols-outlined,
  .drill-hero-text h1 .material-symbols-outlined,
  .sponsor-hero-text h1 .material-symbols-outlined,
  .billing-hero-text h1 .material-symbols-outlined,
  .tasks-hero-text h1 .material-symbols-outlined {
    font-size: 1.35rem !important;
  }

  /* Hide long marketing descriptions on phones */
  .app-hero-text p,
  .drill-hero-text p,
  .sponsor-hero-text p,
  .billing-hero-text p,
  .tasks-hero-text p,
  .blueprints-hero-content p {
    display: none !important;
  }

  /* Compact Action Buttons - matches Team Detail pills */
  .app-hero-actions,
  .drill-hero-actions,
  .sponsor-hero-actions,
  .billing-hero-actions,
  .hero-actions,
  .role-hero-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .app-hero-cta-primary,
  .app-hero-cta-secondary,
  .drill-hero-cta,
  .drill-hero-cta-secondary,
  .hero-cta-primary,
  .hero-cta-secondary,
  .hero-cta-stripe,
  .btn-club-accent,
  .role-hero-actions .btn,
  .event-desktop-actions .btn,
  .event-mobile-actions .btn {
    flex: initial !important;
    width: auto !important;
    padding: 0.28rem 0.6rem !important;
    font-size: 0.74rem !important;
    border-radius: 7px !important;
    gap: 0.3rem !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
    min-height: 28px !important;
    box-shadow: none !important;
  }

  .app-hero-cta-primary .material-symbols-outlined,
  .app-hero-cta-secondary .material-symbols-outlined,
  .drill-hero-cta .material-symbols-outlined,
  .drill-hero-cta-secondary .material-symbols-outlined,
  .hero-cta-primary .material-symbols-outlined,
  .hero-cta-secondary .material-symbols-outlined,
  .hero-cta-stripe .material-symbols-outlined,
  .btn-club-accent .material-symbols-outlined {
    font-size: 15px !important;
  }

  /* Unified Team-Detail-Style Stat Strip on mobile */
  .app-hero-stats,
  .drill-hero-stats,
  .sponsor-hero-stats,
  .billing-hero-stats,
  .hero-stats-grid,
  .tasks-hero-stats,
  .profile-hero-stats,
  .role-hero-stats {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)) !important;
    gap: 0.25rem !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 0.45rem 0.4rem !important;
    margin-top: 0.65rem !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .app-hero-stats,
  [data-theme="light"] .drill-hero-stats,
  [data-theme="light"] .sponsor-hero-stats,
  [data-theme="light"] .billing-hero-stats,
  [data-theme="light"] .hero-stats-grid,
  [data-theme="light"] .tasks-hero-stats,
  [data-theme="light"] .profile-hero-stats,
  [data-theme="light"] .role-hero-stats {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  }

  .hero-stat-card,
  .hero-stat-chip,
  .stat-chip {
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.2rem 0.15rem !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-shadow: none !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: auto !important;
    margin: 0 !important;
  }

  .hero-stat-card:hover,
  .hero-stat-chip:hover,
  .stat-chip:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    transform: none !important;
  }

  /* Hide bulky 44x44 icons in stat strip on mobile */
  .hero-stat-icon,
  .hero-chip-icon,
  .stat-chip-icon,
  .hero-stat-card .icon,
  .sponsor-stat-icon {
    display: none !important;
  }

  /* Hide verbose secondary line on mobile */
  .hero-stat-info .sub,
  .stat-chip-info .sub,
  .hero-stat-sub {
    display: none !important;
  }

  .hero-stat-info,
  .hero-stat-content,
  .stat-chip > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Stat values / numbers */
  .hero-stat-info .num,
  .stat-chip-value,
  .hero-stat-value,
  .stat-val,
  .hero-stat-card .num,
  .hero-chip-val {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* Stat labels */
  .hero-stat-info .lbl,
  .stat-chip-label,
  .hero-stat-label,
  .stat-lbl,
  .hero-stat-card .lbl,
  .hero-chip-lbl {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    color: var(--muted, #94a3b8) !important;
    margin-top: 1px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    line-height: 1.15 !important;
  }

  /* Transfer icon semantic colours to stat numbers on mobile */
  .hero-stat-card:has(.icon-gold, .icon-total) .num,
  .hero-stat-card:has(.icon-amber) .num,
  .hero-stat-card:has([style*="gold"], [style*="#fbbf24"], [style*="#f59e0b"]) .num { color: #fbbf24 !important; }

  .hero-stat-card:has(.icon-blue, .icon-int) .num,
  .hero-stat-card:has([style*="blue"], [style*="#38bdf8"], [style*="#3b82f6"]) .num { color: #38bdf8 !important; }

  .hero-stat-card:has(.icon-green, .icon-beg) .num,
  .hero-stat-card:has([style*="green"], [style*="#4ade80"], [style*="#10b981"]) .num { color: #4ade80 !important; }

  .hero-stat-card:has(.icon-purple, .icon-adv) .num,
  .hero-stat-card:has([style*="purple"], [style*="#c084fc"], [style*="#8b5cf6"]) .num { color: #c084fc !important; }

  .hero-stat-card:has(.icon-rose, .icon-danger) .num,
  .hero-stat-card:has([style*="rose"], [style*="#f87171"], [style*="#ef4444"]) .num { color: #f87171 !important; }

  .hero-stat-card:has(.icon-cyan) .num,
  .hero-stat-card:has([style*="cyan"], [style*="#22d3ee"], [style*="#06b6d4"]) .num { color: #22d3ee !important; }

  /* Training and Event Detail Cards */
  .training-hero-body {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }
  .training-readiness-box {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.25rem !important;
    padding: 0.45rem 0.4rem !important;
    box-sizing: border-box !important;
  }
  .training-readiness-box .readiness-divider {
    display: none !important;
  }
  .readiness-val {
    font-size: 1.15rem !important;
  }
  .readiness-lbl {
    font-size: 0.6rem !important;
  }
  .meta-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    padding-top: 0.65rem !important;
  }
  .meta-item {
    gap: 0.45rem !important;
  }
  .meta-icon {
    width: 28px !important;
    height: 28px !important;
  }
  .meta-icon .material-symbols-outlined {
    font-size: 16px !important;
  }
  .meta-content div:first-child {
    font-size: 0.62rem !important;
  }
  .meta-content div:last-child {
    font-size: 0.8rem !important;
  }
  .hero-meta-row {
    gap: 0.5rem !important;
    font-size: 0.78rem !important;
  }
  .status-pill {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.74rem !important;
  }

  /* Avatar & Identity sizes on detail pages */
  .hero-avatar-img,
  .hero-avatar-fallback {
    width: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
    font-size: 1.35rem !important;
  }
  .role-hero-icon-bubble {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.4rem !important;
    border-radius: 10px !important;
  }
  .hero-name {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .hero-stat-info .num,
  .stat-chip-value,
  .hero-stat-value,
  .stat-val,
  .hero-stat-card .num {
    font-size: 1.05rem !important;
  }
  .hero-stat-info .lbl,
  .stat-chip-label,
  .hero-stat-label,
  .stat-lbl,
  .hero-stat-card .lbl {
    font-size: 0.58rem !important;
  }
}

/* ===================================================
   AUTH PAGES
   =================================================== */

.auth-page { background: var(--dark-bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }

.auth-bg { position: fixed; inset: 0; pointer-events: none; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.2; animation: orbFloat 8s ease-in-out infinite alternate; }
.auth-orb-1 { width: 500px; height: 500px; background: #8b5cf6; top: -150px; left: -100px; }
.auth-orb-2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -100px; right: -80px; animation-delay: -4s; }
.auth-orb-3 { width: 300px; height: 300px; background: #888; top: 50%; left: 50%; animation-delay: -2s; }
@keyframes orbFloat { from { transform: translate(0,0) scale(1); } to { transform: translate(40px, 30px) scale(1.1); } }

.auth-card-wrapper { position: relative; z-index: 1; width: 100%; max-width: 440px; padding: 1.5rem; }

.auth-card {
  background: rgba(30, 30, 30, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

[data-theme="light"] .auth-page {
  background: linear-gradient(135deg, #f0f2f5 0%, #e8edf5 50%, #f0f2f5 100%);
}

[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--border);
}

[data-theme="light"] .topbar-user {
  background: var(--card);
  border-color: var(--border);
}

/* Light mode button overrides */
[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text);
}

[data-theme="light"] .btn-secondary:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-danger {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .btn-success {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 2px 8px rgba(var(--secondary-rgb), 0.2);
}

.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-club-logo { max-height: 80px; max-width: 200px; object-fit: contain; }
.auth-logo-text { font-size: 1.6rem; font-weight: 900; color: var(--gold); }
.auth-title { font-size: 1.6rem; font-weight: 800; color: var(--text); text-align: center; margin-bottom: 0.4rem; }
.auth-subtitle { color: var(--muted); text-align: center; margin-bottom: 2rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-links { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.auth-link { color: var(--gold); text-decoration: none; font-size: 0.875rem; }
.auth-link:hover { text-decoration: underline; }
.auth-divider { color: var(--muted); }

/* Google SSO button */
.auth-divider-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.auth-divider-line::before,
.auth-divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider-text {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
}
.btn-google:hover {
  background: #f7f8f8;
  border-color: #c6c6c6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===================================================
   DASHBOARD
   =================================================== */

.dashboard { max-width: 1152px; margin: 0 auto; }
.dashboard-welcome { margin-bottom: 2rem; }
.welcome-heading { font-size: 2rem; font-weight: 800; color: var(--text); }
.welcome-sub { color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stats-grid-narrow { grid-template-columns: minmax(0, 320px); margin-top: -1rem; }

.stat-card {
  background: rgba(20, 20, 25, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
}

.stat-card:hover {
  background: rgba(25, 25, 30, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .stat-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
}

.stat-card .stat-glow {
  position: absolute;
  right: 0;
  top: 0;
  transform: translate(50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.6;
  pointer-events: none;
}

.stat-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
}

.stat-card-title {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--text);
  opacity: 0.8;
}

.stat-card-body {
  z-index: 1;
}

.stat-value {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--primary-text);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-change.positive { color: #10b981; }
.stat-change.negative { color: #ef4444; }
.stat-change.neutral { color: #f59e0b; }

.stat-card-alert { border-color: rgba(var(--secondary-rgb), 0.3); }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

.dash-section {
  background: rgba(20, 20, 25, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.dash-section:hover {
  background: rgba(25, 25, 30, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .dash-section {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .dash-section:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
}
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.section-link { color: var(--gold); text-decoration: none; font-size: 0.8rem; }
.section-link:hover { text-decoration: underline; }

.event-list { display: flex; flex-direction: column; gap: 0.6rem; }

.event-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
}

.event-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(var(--secondary-rgb), 0.3); }

.event-date-badge { text-align: center; min-width: 44px; }
.event-day { display: block; font-size: 1.3rem; font-weight: 800; color: var(--gold); line-height: 1; }
.event-month { display: block; font-size: 0.65rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.event-info { flex: 1; }
.event-title { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.event-meta { font-size: 0.75rem; color: var(--muted); }
.rsvp-chip { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 100px; font-weight: 600; }
.rsvp-attending { background: rgba(72,187,120,0.2); color: #68d391; }
.rsvp-maybe { background: rgba(var(--secondary-rgb), 0.2); color: var(--gold); }
.rsvp-not_attending { background: rgba(239,68,68,0.2); color: #f87171; }
.rsvp-none { background: rgba(255,255,255,0.1); color: var(--muted); }

.volunteer-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  margin-top: 0.25rem;
}

.child-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  margin-top: 0.25rem;
}

[data-theme="light"] .volunteer-role-chip {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

[data-theme="light"] .child-event-chip {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}


.meeting-list { display: flex; flex-direction: column; gap: 0.6rem; }
.meeting-card { display: block; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; transition: all var(--transition); }
.meeting-card:hover { border-color: rgba(var(--secondary-rgb), 0.3); background: rgba(255,255,255,0.05); }
.meeting-date { font-size: 0.75rem; color: var(--muted); }
.meeting-title { font-weight: 600; color: var(--text); }
.meeting-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

.quick-actions { margin-top: 1.5rem; }
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: var(--muted);
  transition: all 0.2s ease;
  font-size: 0.78rem;
  font-weight: 500;
}

.quick-action-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.quick-action-card .material-symbols-outlined {
  font-size: 24px;
}

[data-theme="light"] .quick-action-card {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .quick-action-card:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.1);
}

.quick-actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.row-overdue td { color: #f87171 !important; }

/* ===================================================
   TEAMS / EVENTS
   =================================================== */

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius, 14px);
  text-decoration: none;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--team-colour, var(--gold));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 18px rgba(var(--secondary-rgb, 240, 165, 0), 0.2);
  color: inherit;
}

.team-card--archived,
.team-card-archived {
  opacity: 0.65;
}

.team-card--archived:hover,
.team-card-archived:hover {
  opacity: 0.9;
}

/* Subtle Top Accent Line */
.team-card__top-bar,
.team-colour-bar {
  height: 3px;
  background: var(--team-colour, var(--gold));
  width: 100%;
}

/* Card Body */
.team-card__body,
.team-card-body {
  padding: 1.25rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

/* Header: Avatar, Title & Chevron */
.team-card__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.team-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0b1120;
  border: 2px solid var(--team-colour, var(--gold));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.team-card__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.team-card__avatar-img--club {
  padding: 5px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.team-card__monogram {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.team-card__title-group {
  flex: 1;
  min-width: 0;
}

.team-card__name,
.team-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text, #ffffff);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card__sub,
.team-age-group {
  color: var(--muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card__action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card__chevron {
  font-size: 20px;
  color: var(--muted, #64748b);
  transition: transform 0.2s ease, color 0.2s ease;
}

.team-card:hover .team-card__chevron {
  transform: translateX(4px);
  color: var(--team-colour, var(--gold));
}

/* Info Chips (Pills) */
.team-card__chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
  max-width: 100%;
}

.team-chip__icon {
  font-size: 15px;
  color: var(--muted, #94a3b8);
  flex-shrink: 0;
}

.team-chip__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges Strip */
.team-card__badges,
.team-card-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.team-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.team-badge--senior {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.team-badge--junior {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.team-badge--social {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.team-badge--season,
.season-badge {
  background: rgba(240, 165, 0, 0.15);
  color: var(--gold, #f0a500);
  border: 1px solid rgba(240, 165, 0, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0;
  display: inline-flex;
}

.team-badge--archived {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted, #94a3b8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-badge--layout {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.teams-section { margin-bottom: 2rem; }

.event-mini-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem; border-radius: var(--radius-sm); text-decoration: none; background: rgba(255,255,255,0.03); border: 1px solid transparent; transition: all var(--transition); margin-bottom: 0.5rem; }
.event-mini-card:hover { border-color: var(--border); background: rgba(255,255,255,0.05); }
.past-event { opacity: 0.6; }
.emc-date { min-width: 40px; text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--gold); }
.emc-info { flex: 1; }
.emc-title { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.emc-meta { font-size: 0.75rem; color: var(--muted); }
.event-type-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Event detail */
.event-header-card { margin-bottom: 1.5rem; }
.event-header-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.event-type-badge { display: inline-block; padding: 0.3rem 1rem; border-radius: 100px; font-size: 0.8rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; width: fit-content; }
.event-detail-row { color: var(--muted); font-size: 0.9rem; }
.event-description { color: var(--text); margin-top: 0.5rem; }
.cancelled-banner { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.event-cancelled .elc-title { text-decoration: line-through; opacity: 0.7; }
.cancelled-chip { background: rgba(239,68,68,0.2); color: #f87171; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }

/* RSVP widget */
.rsvp-card { margin-bottom: 1.5rem; }
.rsvp-widget { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.rsvp-btn { flex: 1; min-width: 100px; padding: 0.65rem 1rem; border: 2px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 0.875rem; transition: all var(--transition); }
.rsvp-btn:hover { border-color: rgba(72,187,120,0.5); color: #68d391; }
.rsvp-btn.rsvp-active { border-color: #68d391; background: rgba(72,187,120,0.15); color: #68d391; }
.rsvp-btn-no:hover, .rsvp-btn-no.rsvp-active { border-color: #f87171 !important; color: #f87171 !important; background: rgba(239,68,68,0.1) !important; }
.rsvp-counts { display: flex; gap: 0.75rem; }
.rsvp-count-chip { padding: 0.3rem 0.75rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600; }
.rsvp-count-attending { background: rgba(72,187,120,0.15); color: #68d391; }
.rsvp-count-maybe { background: rgba(var(--secondary-rgb), 0.15); color: var(--gold); }
.rsvp-count-no { background: rgba(239,68,68,0.15); color: #f87171; }

.rsvp-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.rsvp-col-header { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); }
.attending-header { background: rgba(72,187,120,0.15); color: #68d391; }
.maybe-header { background: rgba(var(--secondary-rgb), 0.15); color: var(--gold); }
.no-header { background: rgba(239,68,68,0.15); color: #f87171; }
.rsvp-name { font-size: 0.875rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }

/* Volunteer roster */
.add-slot-form { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.assignee-chip { background: rgba(255,255,255,0.08); padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.8rem; }
.gtask-badge { background: rgba(72,187,120,0.15); color: #68d391; padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }

/* Event list page */
.events-list { display: flex; flex-direction: column; gap: 0.75rem; }
.event-list-card { display: flex; align-items: center; gap: 0; text-decoration: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all var(--transition); }
.event-list-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(var(--secondary-rgb), 0.3); }
.elc-type-bar { width: 4px; align-self: stretch; flex-shrink: 0; }
.elc-date { text-align: center; padding: 1rem; min-width: 64px; }
.elc-day { display: block; font-size: 1.5rem; font-weight: 900; color: var(--gold); line-height: 1; }
.elc-month { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }
.elc-info { flex: 1; padding: 0.75rem 1rem; }
.elc-title { font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.elc-meta { font-size: 0.8rem; color: var(--muted); }
.elc-rsvp { padding: 1rem; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); }

/* ===================================================
   GAME EVENT TABS & LINEUP
   =================================================== */

/* Tab bar */
.game-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.game-tabs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.game-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition);
}
.game-tab:hover { color: var(--text); }
.game-tab.game-tab-active,
.game-tab-active {
  color: var(--gold);
}
.game-tab.game-tab-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}
.game-tab-panel { display: none; }
.game-tab-panel.game-tab-panel-active { display: block; }
#panel-rsvps .card,
#panel-volunteers .card {
  max-width: 700px;
  margin: 0 auto;
}

/* RSVP Table */
.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.rsvp-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}
.rsvp-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.rsvp-table tr:last-child td { border-bottom: none; }
.rsvp-table tr.rsvp-row-current { background: rgba(var(--secondary-rgb), 0.05); }
.rsvp-table .rsvp-col-status { text-align: center; width: 48px; }

/* RSVP radio buttons (for current user row) */
.rsvp-radio-group { display: flex; gap: 0.25rem; justify-content: center; }
.rsvp-radio {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all var(--transition);
}
.rsvp-radio:hover { border-color: rgba(var(--secondary-rgb), 0.5); transform: scale(1.1); }
.rsvp-radio-attending.rsvp-radio-selected { border-color: #68d391; background: rgba(72,187,120,0.2); }
.rsvp-radio-maybe.rsvp-radio-selected { border-color: var(--gold); background: rgba(var(--secondary-rgb), 0.2); }
.rsvp-radio-no.rsvp-radio-selected { border-color: #f87171; background: rgba(239,68,68,0.2); }

/* Other user status dots */
.rsvp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 auto;
}
.rsvp-dot-attending { background: #68d391; }
.rsvp-dot-maybe { background: var(--gold); }
.rsvp-dot-not_attending { background: #f87171; }
.rsvp-dot-none { background: rgba(255,255,255,0.15); }

/* RSVP Summary Bar */
.rsvp-summary-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.rsvp-summary-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.rsvp-summary-count {
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ─── Lineup ─────────────────────────────────────────────────────── */

.lineup-container {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 1rem;
  min-height: 500px;
}
.lineup-container-readonly {
  grid-template-columns: 1fr 240px;
}

/* Roster panel (left) */
.lineup-roster {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  overflow-y: auto;
  max-height: 620px;
}
.lineup-roster-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.lineup-roster-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lineup-roster-empty {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem 0;
}

/* AFL / Multi-Sport Field */
.lineup-field-wrapper {
  position: relative;
  border-radius: var(--radius);
  background: #1a501a;
  min-height: 480px;
}
.lineup-field-img {
  width: 100%;
  height: auto;
  min-height: 480px;
  object-fit: contain;
  display: block;
  border-radius: var(--radius);
}
.lineup-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Position drop zones */
.lineup-drop-zone {
  position: absolute;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  z-index: 2;
}
.lineup-drop-zone.lineup-zone-filled {
  border-color: transparent;
  background: none;
  width: auto;
  height: auto;
}
.lineup-drop-zone:not(.lineup-zone-filled) {
  background: rgba(0,0,0,0.25);
}
.lineup-drop-hover {
  border-color: var(--gold) !important;
  background: rgba(var(--secondary-rgb), 0.2) !important;
  transform: translate(-50%, -50%) scale(1.08) !important;
}
.lineup-pos-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
}
.lineup-zone-filled .lineup-pos-label {
  display: none;
}

/* Player chips */
.lineup-player-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  background: rgba(0,27,94,0.85);
  border: 1px solid rgba(var(--secondary-rgb), 0.4);
  border-radius: 100px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: grab;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
  position: relative;
}
.lpc-card-inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}
.lpc-top-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.lpc-surname-mobile {
  display: none;
}
.lpc-injury-icon {
  display: none;
}
.lineup-player-chip:hover { border-color: var(--gold); }
.lineup-player-chip.lineup-dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.lineup-player-chip.highlight-match {
  border-color: #48bb78;
  box-shadow: 0 0 10px rgba(72, 187, 120, 0.45), inset 0 0 4px rgba(72, 187, 120, 0.15);
}
.lpc-jersey {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  min-width: 24px;
  text-align: center;
}
.lpc-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  overflow: hidden;
}
.lpc-first {
  font-size: 1.05rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.lpc-last {
  font-size: 0.93rem;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.lineup-interchange-list .lpc-first,
.lineup-interchange-list .lpc-last,
.lineup-roster-list .lpc-first,
.lineup-roster-list .lpc-last {
  max-width: none;
}
.lpc-position {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  margin-left: auto;
  padding-left: 0.4rem;
}
.lpc-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0 0.15rem;
  line-height: 1;
  margin-left: 0.1rem;
}
.lpc-remove:hover { color: #f87171; }

/* RSVP status indicators on available player chips */
.lpc-rsvp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  margin-left: auto;
}
.lpc-rsvp-attending {
  background: rgba(72, 187, 120, 0.2);
  color: #68d391;
  border: 1.5px solid #68d391;
}
.lpc-rsvp-maybe {
  background: rgba(var(--secondary-rgb), 0.2);
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.lpc-rsvp-no {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  border: 1.5px solid #f87171;
}

/* Chips inside field drop zones */
.lineup-drop-zone .lineup-player-chip {
  font-size: 0.97rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0,27,94,0.9);
  border-color: rgba(var(--secondary-rgb), 0.6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.lineup-drop-zone .lpc-first {
  max-width: 80px;
  font-size: 0.9rem;
}
.lineup-drop-zone .lpc-last {
  max-width: 80px;
  font-size: 0.78rem;
}
.lineup-drop-zone .lpc-jersey {
  font-size: 1.1rem;
}
.lineup-drop-zone .lpc-position {
  font-size: 1.1rem;
}

/* Interchange panel (right) */
.lineup-interchange {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.lineup-interchange-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.lineup-interchange-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 60px;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 2px dashed transparent;
  transition: all 0.2s ease;
}
.lineup-interchange-list.lineup-drop-hover {
  border-color: var(--gold);
  background: rgba(var(--secondary-rgb), 0.08);
}

/* Lineup action bar */
.lineup-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.lineup-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lineup-draft {
  background: rgba(var(--secondary-rgb), 0.15);
  color: var(--gold);
}
.lineup-published {
  background: rgba(72,187,120,0.15);
  color: #68d391;
}

/* Responsive */
@media (max-width: 768px) {
  .lineup-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .lineup-container-readonly {
    grid-template-columns: 1fr;
  }
  .lineup-roster {
    max-height: none;
  }
  .lineup-roster-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .lineup-drop-zone {
    width: clamp(48px, 14vw, 68px);
    height: clamp(48px, 14vw, 68px);
    transform: translate(-50%, -50%);
  }
  .lineup-drop-zone.lineup-zone-filled {
    width: auto;
    height: auto;
  }
  .lineup-field .lineup-player-chip,
  .lineup-drop-zone .lineup-player-chip,
  .lineup-field .lineup-drop-zone .lineup-player-chip {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: clamp(52px, 16vw, 68px) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 3px 4px 4px 4px !important;
    border-radius: 7px !important;
    background: rgba(0, 27, 94, 0.94) !important;
    border: 1px solid rgba(240, 165, 0, 0.5) !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.5) !important;
    text-align: center !important;
    cursor: pointer !important;
    gap: 1px !important;
    white-space: normal !important;
  }
  .lineup-field .lpc-card-inner,
  .lineup-drop-zone .lpc-card-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 1px !important;
  }
  .lineup-field .lpc-top-row,
  .lineup-drop-zone .lpc-top-row {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    line-height: 1 !important;
    margin-bottom: 1px !important;
    gap: 3px !important;
    padding-right: 14px !important; /* reserve space so top-right .lpc-remove never collides */
    position: relative !important;
  }
  .lineup-field .lpc-jersey,
  .lineup-drop-zone .lpc-jersey {
    color: var(--secondary, var(--gold, #F0A500)) !important;
    font-weight: 800 !important;
    font-size: clamp(0.68rem, 2.7vw, 0.82rem) !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums !important;
    min-width: 0 !important;
    text-align: left !important;
    flex-shrink: 0 !important;
  }
  .lineup-field .lpc-position,
  .lineup-drop-zone .lpc-position {
    font-size: clamp(0.52rem, 2vw, 0.62rem) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.25) !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
    line-height: 1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    letter-spacing: 0.02em !important;
    flex-shrink: 0 !important;
  }
  .lineup-field .lpc-name-wrap,
  .lineup-drop-zone .lpc-name-wrap {
    display: block !important;
    width: 100% !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
  .lineup-field .lpc-first,
  .lineup-field .lpc-last,
  .lineup-drop-zone .lpc-first,
  .lineup-drop-zone .lpc-last {
    display: none !important;
  }
  .lineup-field .lpc-surname-mobile,
  .lineup-drop-zone .lpc-surname-mobile {
    display: block !important;
    font-weight: 700 !important;
    font-size: clamp(0.62rem, 2.4vw, 0.74rem) !important;
    color: #ffffff !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    width: 100% !important;
  }
  .lineup-field .lpc-injury,
  .lineup-drop-zone .lpc-injury {
    display: none !important;
  }
  .lineup-field .lpc-injury-icon,
  .lineup-drop-zone .lpc-injury-icon {
    display: inline-block !important;
    font-size: 0.65rem !important;
    line-height: 1 !important;
    margin-left: 2px !important;
  }
  .lineup-field .lpc-stats,
  .lineup-drop-zone .lpc-stats {
    display: block !important;
    font-size: 0.55rem !important;
    font-weight: 800 !important;
    color: #48bb78 !important;
    background: rgba(72, 187, 120, 0.18) !important;
    border-radius: 3px !important;
    padding: 1px 2px !important;
    line-height: 1 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .lineup-field .lpc-remove,
  .lineup-drop-zone .lpc-remove {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: 1.5px solid #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10 !important;
  }
  .lineup-interchange-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  .lineup-interchange-list .lineup-player-chip {
    padding: 0.35rem 0.55rem;
    font-size: 0.85rem;
    border-radius: 8px;
    min-width: 0;
  }
  .lineup-interchange-list .lpc-jersey {
    font-size: 0.95rem;
  }
  .lineup-interchange-list .lpc-position {
    font-size: 0.75rem;
  }
  .rsvp-table th,
  .rsvp-table td {
    padding: 0.4rem 0.35rem;
    font-size: 0.78rem;
  }
  .rsvp-col-status { width: 60px !important; }
}

/* ─── Mobile Player Detail Bottom Sheet ────────────────────── */
.lineup-player-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lineup-player-sheet-backdrop.lps-open {
  opacity: 1;
  visibility: visible;
}
.lineup-player-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 500px;
  margin: 0 auto;
  background: var(--surface, #1e293b);
  color: var(--text, #f8fafc);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  border-bottom: none;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  padding: 0.75rem 1.25rem 1.5rem 1.25rem;
  z-index: 9999;
  transform: translateY(105%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.lineup-player-sheet.lps-open {
  transform: translateY(0);
}
.lps-handle-bar {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0 0.75rem 0;
}
.lps-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}
.lps-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  position: relative;
}
.lps-avatar-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-hover, #334155);
  border: 2px solid var(--gold, #F0A500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lps-avatar-initials {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}
.lps-title-wrap {
  flex: 1;
  min-width: 0;
}
.lps-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text, #ffffff);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lps-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.lps-jersey-pill {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold, #F0A500);
  background: rgba(240, 165, 0, 0.15);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(240, 165, 0, 0.3);
}
.lps-pos-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 100px;
}
.lps-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.lps-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.lps-section {
  margin-top: 0.75rem;
}
.lps-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #94a3b8);
  margin-bottom: 0.5rem;
}
.lps-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.lps-stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 0.6rem 0.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lps-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold, #F0A500);
  line-height: 1;
}
.lps-stat-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  margin-top: 0.25rem;
}
.lps-alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-top: 0.6rem;
  line-height: 1.35;
}
.lps-alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.lps-alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.lps-alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
body.lps-sheet-open {
  overflow: hidden;
}

/* ─── Mobile-First Lineup & Segmented View Styles ─────────────── */
.lineup-view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lineup-segmented-control {
  display: inline-flex;
  background: var(--surface, #1e293b);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.lineup-segmented-control .lsc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lineup-segmented-control .lsc-btn:hover {
  color: var(--text, #ffffff);
}

.lineup-segmented-control .lsc-btn.active {
  background: var(--primary, #3b82f6);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.lineup-segmented-control .lsc-btn .material-symbols-outlined {
  font-size: 18px;
}

.lineup-swap-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.08));
  border: 1px solid var(--gold, #f59e0b);
  border-radius: 10px;
  margin-bottom: 1rem;
  color: var(--text, #ffffff);
  font-size: 0.88rem;
  font-weight: 600;
  animation: swapBannerPulse 2s infinite ease-in-out;
}

@keyframes swapBannerPulse {
  0%, 100% { border-color: rgba(245, 158, 11, 0.5); }
  50% { border-color: rgba(245, 158, 11, 1); box-shadow: 0 0 14px rgba(245, 158, 11, 0.4); }
}

/* ─── Line-by-Line List View ─────────────────────────────────── */
.lineup-list-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.lineup-line-group {
  background: var(--card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.lineup-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lineup-line-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold, #f59e0b);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lineup-line-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.lineup-line-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .lineup-line-slots {
    grid-template-columns: 1fr;
  }
}

.lineup-slot-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-height: 56px;
}

.lineup-slot-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold, #f59e0b);
  transform: translateY(-2px);
}

.lineup-slot-card.lineup-slot-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.015);
}

.lineup-slot-card.lineup-slot-empty:hover {
  border-color: var(--primary, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
}

.lineup-slot-pos-tag {
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 7px;
  border-radius: 6px;
  min-width: 38px;
  text-align: center;
  flex-shrink: 0;
}

.lineup-slot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #0b1120;
  border: 1.5px solid var(--gold, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
}

.lineup-slot-info {
  flex: 1;
  min-width: 0;
}

.lineup-slot-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.lineup-slot-empty-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lineup-slot-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
  flex-wrap: wrap;
}

.lineup-slot-action {
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* ─── Bottom Sheets & Viewport Fixed Positioning ─────────────── */
.lineup-player-sheet,
.lineup-picker-sheet {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  max-width: 540px !important;
  margin: 0 auto !important;
  background: var(--surface, #1e293b) !important;
  color: var(--text, #f8fafc) !important;
  border-top-left-radius: 22px !important;
  border-top-right-radius: 22px !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16)) !important;
  border-bottom: none !important;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.7) !important;
  padding: 0.75rem 1.25rem 1.75rem 1.25rem !important;
  z-index: 99999 !important;
  max-height: 85vh !important;
  max-height: 85dvh !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateY(105%) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lineup-player-sheet.lps-open,
.lineup-picker-sheet.lps-open {
  transform: translateY(0) !important;
}

.lineup-player-sheet-backdrop,
.lineup-picker-sheet-backdrop,
.lineup-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  z-index: 99998 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.lineup-player-sheet-backdrop.lps-open,
.lineup-picker-sheet-backdrop.lps-open,
.lineup-modal-backdrop.lps-open {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Placed player quick action cards */
.lps-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 1rem 0;
}

.lps-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #ffffff);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  gap: 0.35rem;
}

.lps-action-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold, #f59e0b);
  transform: translateY(-2px);
}

.lps-action-card .material-symbols-outlined {
  font-size: 24px;
  color: var(--gold, #f59e0b);
}

.lps-action-card.action-danger {
  color: #ef4444;
}

.lps-action-card.action-danger .material-symbols-outlined {
  color: #ef4444;
}

.lps-action-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.lps-action-desc {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
}

/* Player picker options list */
.lps-player-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lps-player-option:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--gold, #f59e0b);
  transform: translateX(3px);
}

.lps-player-option.option-recommended {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.lps-player-option.option-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lps-section-divider {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #94a3b8);
  margin: 0.85rem 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Conflict Resolver Modal */
.lineup-conflict-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(540px, 94vw) !important;
  max-height: 85vh !important;
  max-height: 85dvh !important;
  background: var(--surface, #1e293b) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.16)) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important;
  z-index: 99999 !important;
  display: none;
  flex-direction: column !important;
  padding: 1.25rem !important;
}

.lineup-conflict-modal.lps-open {
  display: flex !important;
}

.lcm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lcm-title {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text, #ffffff);
}

.lcm-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lcm-conflict-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.lcm-conflict-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold, #f59e0b);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lcm-candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lcm-candidate-row:last-child {
  border-bottom: none;
}

.lcm-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .lineup-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  .lineup-field-wrapper {
    order: 1 !important;
  }
  .lineup-roster {
    order: 2 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    background: rgba(15, 23, 42, 0.8) !important;
  }
  .lineup-interchange {
    order: 3 !important;
  }
}

/* ─── Lineup Toast Notifications ────────────────────────────── */
.lineup-toast-container {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 100000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  pointer-events: none !important;
}

@media (max-width: 600px) {
  .lineup-toast-container {
    left: 16px !important;
    right: 16px !important;
    bottom: 20px !important;
  }
}

.lineup-toast {
  pointer-events: auto !important;
  min-width: 280px !important;
  max-width: 440px !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6) !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  opacity: 0 !important;
  transform: translateY(16px) scale(0.96) !important;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lineup-toast.lineup-toast-show {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

.lineup-toast-success {
  border-left: 4px solid #10b981 !important;
}

.lineup-toast-success .lineup-toast-icon {
  color: #10b981 !important;
  font-size: 20px !important;
}

.lineup-toast-warning {
  border-left: 4px solid #f59e0b !important;
}

.lineup-toast-warning .lineup-toast-icon {
  color: #f59e0b !important;
  font-size: 20px !important;
}

.lineup-toast-error {
  border-left: 4px solid #ef4444 !important;
}

.lineup-toast-error .lineup-toast-icon {
  color: #ef4444 !important;
  font-size: 20px !important;
}

.lineup-toast-info {
  border-left: 4px solid #6366f1 !important;
}

.lineup-toast-info .lineup-toast-icon {
  color: #818cf8 !important;
  font-size: 20px !important;
}

.lineup-toast-msg {
  flex: 1 !important;
  line-height: 1.35 !important;
}

.lineup-toast-close {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 20px !important;
  cursor: pointer !important;
  padding: 0 4px !important;
  line-height: 1 !important;
}

.lineup-toast-close:hover {
  color: #ffffff !important;
}


/* ===================================================
   MINUTES
   =================================================== */

.minutes-page { max-width: 900px; }
.minutes-header.card { margin-bottom: 1.5rem; }
.minutes-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.meta-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 0.2rem; }
.meta-value { font-weight: 600; color: var(--text); }

.minutes-attendees { margin-bottom: 1.5rem; }
.attendee-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.attendee-group-label { font-size: 0.8rem; color: var(--muted); font-weight: 700; margin-bottom: 0.5rem; }
.attendee-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.attendee-chip { background: rgba(0,27,94,0.4); border: 1px solid rgba(255,255,255,0.1); padding: 0.25rem 0.65rem; border-radius: 100px; font-size: 0.78rem; }
.attendee-apology { opacity: 0.6; text-decoration: line-through; }

.discussion-item { border-left: 3px solid var(--border); padding: 0.75rem 1rem; margin-bottom: 0.75rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: rgba(255,255,255,0.02); }
.discussion-item-noting { border-left-color: #3182ce; }
.discussion-item-action { border-left-color: var(--gold); }

.item-header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.item-number { font-weight: 800; color: var(--gold); font-size: 0.95rem; }
.item-title { font-weight: 600; color: var(--text); flex: 1; }
.item-type-badge { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 100px; font-weight: 700; }
.badge-noting { background: rgba(49,130,206,0.2); color: #63b3ed; }
.badge-action { background: rgba(var(--secondary-rgb), 0.2); color: var(--gold); }
.badge-general { background: rgba(255,255,255,0.08); color: var(--muted); }

.item-body { color: var(--muted); font-size: 0.875rem; margin: 0.5rem 0 0 1.5rem; }
.action-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0 0 1.5rem; padding: 0.4rem 0.75rem; background: rgba(var(--secondary-rgb), 0.06); border-radius: var(--radius-sm); font-size: 0.83rem; }
.action-label { font-weight: 700; color: var(--gold); }
.action-assignee { color: var(--text); font-weight: 600; }
.action-due { color: var(--muted); }
.action-due.overdue { color: #f87171; }

.status-select { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 0.2rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.8rem; cursor: pointer; }
.status-open { border-color: rgba(var(--secondary-rgb), 0.4); color: var(--gold); }
.status-in_progress { border-color: rgba(49,130,206,0.4); color: #63b3ed; }
.status-complete { border-color: rgba(72,187,120,0.4); color: #68d391; }

.meeting-list-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: all var(--transition); margin-bottom: 0.75rem; }
.meeting-list-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(var(--secondary-rgb), 0.3); }
.meeting-list-date { text-align: center; min-width: 56px; }
.mlc-day { display: block; font-size: 1.6rem; font-weight: 900; color: var(--gold); line-height: 1; }
.mlc-month { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.meeting-list-info { flex: 1; }
.mlc-title { font-weight: 700; color: var(--text); }
.mlc-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.meeting-list-stats { display: flex; gap: 0.5rem; }
.stat-chip { background: rgba(255,255,255,0.08); padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.75rem; color: var(--muted); }
.stat-chip-alert { background: rgba(var(--secondary-rgb), 0.15); color: var(--gold); }
.card-arrow { color: var(--muted); font-size: 1.2rem; }

/* ===================================================
   PROFILE / MEMBER DETAIL
   =================================================== */

.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-avatar-section { text-align: center; margin-bottom: 1.5rem; }
.profile-avatar-large { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.profile-avatar-initials-large { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: var(--gold); font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.75rem; border: 3px solid var(--gold); }

.profile-form .form-grid { margin-bottom: 1.5rem; }
.profile-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.profile-detail-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.detail-label { color: var(--muted); }
.detail-value { color: var(--text); font-weight: 500; }
.success-text { color: #68d391; font-size: 0.875rem; margin-bottom: 1rem; }
.muted-text { color: var(--muted); font-size: 0.875rem; margin-bottom: 1rem; }

/* Member Directory Grid & Cards */
.members-grid,
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .members-grid,
  .member-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.member-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
  box-sizing: border-box;
  min-width: 0;
  position: relative;
}

.member-card:hover {
  border-color: rgba(var(--secondary-rgb, 59, 130, 246), 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow, 0 4px 12px rgba(0, 0, 0, 0.2));
  color: var(--text);
  opacity: 1;
}

.member-avatar-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.member-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  margin: 0;
}

.member-avatar-initials {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.14);
  color: var(--club-text-primary, var(--text));
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px solid rgba(var(--primary-rgb, 59, 130, 246), 0.28);
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.member-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.member-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text, #f8fafc);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-badge-row {
  display: inline-flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
}

.member-teams-row {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.1rem;
}

.member-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.15s ease, color 0.15s ease;
}

.member-card:hover .member-card-arrow {
  color: var(--text);
  transform: translateX(3px);
}

.member-phone {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Member tab — team chips */
.member-team-chip { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 600; background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2); white-space: nowrap; }
.member-team-chip-more { background: rgba(255,255,255,0.05); color: var(--muted); border-color: var(--border); }

/* Member tab — badge helpers */
.member-badge-wwcc { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 12px; font-size: 0.7rem; font-weight: 600; background: rgba(34,197,94,0.15); color: #22c55e; }
.member-badge-wwcc-pending { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 12px; font-size: 0.7rem; font-weight: 600; background: rgba(234,179,8,0.15); color: #eab308; }
.member-badge-junior { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 12px; font-size: 0.7rem; font-weight: 600; background: rgba(168,85,247,0.15); color: #c084fc; }
.member-badge-status { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 12px; font-size: 0.7rem; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--muted); }

/* Member tab — filter bar action group (add + toggle) */
.members-filter-bar { flex-wrap: wrap; }
.members-filter-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.view-toggle-group { display: flex; gap: 0; border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle-btn { padding: 0.4rem 0.6rem; border-radius: 0; }
.view-toggle-group .view-toggle-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.view-toggle-group .view-toggle-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.member-detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }
@media (max-width: 768px) { .member-detail-grid { grid-template-columns: 1fr; } }
.member-detail-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.member-detail-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.member-detail-name { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 0.4rem; }
.detail-rows { display: flex; flex-direction: column; gap: 0; }
.detail-row { display: flex; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }

.team-chip { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: 0.875rem; font-weight: 600; transition: background var(--transition); margin-bottom: 0.4rem; }
.team-chip:hover { background: rgba(255,255,255,0.05); }
.team-chip-colour { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ===================================================
   MISC / UTILITY
   =================================================== */

.add-member-panel { background: rgba(0,27,94,0.2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; margin-top: 1rem; }
.team-content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .team-content-grid { grid-template-columns: 1fr; } }

.team-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
}

.team-tab {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.team-tab:hover {
  color: var(--text);
}

.team-tab.active {
  color: var(--primary-text);
  border-bottom-color: var(--primary-text);
}

.team-tab-panel { display: none; }
.team-tab-panel.active { display: block; }

.team-info-card .team-header-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
.team-detail-name { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.team-age { color: var(--muted); }
.staff-row { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }
.team-desc { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }

/* ── Team Hero Card Redesign ── */
.team-hero-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
}

.team-hero-top-bar {
  height: 3px;
  background: var(--team-colour, var(--gold, #f0a500));
  width: 100%;
}

.team-hero-body {
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.team-hero-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 260px;
  flex: 1 1 280px;
}

.team-hero-avatar {
  width: 68px;
  height: 68px;
  min-width: 68px;
  min-height: 68px;
  border-radius: 50%;
  background: #0b1120;
  border: 2px solid var(--team-colour, var(--gold, #f0a500));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.team-hero-avatar-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.team-hero-avatar-img--club {
  padding: 5px;
  object-fit: contain;
  background: #ffffff;
}

.team-hero-monogram {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.team-hero-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.team-hero-name {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text, #ffffff);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.team-hero-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.team-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.team-hero-badge--age {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.team-hero-badge--season {
  background: rgba(240, 165, 0, 0.12);
  color: #f0a500;
  border: 1px solid rgba(240, 165, 0, 0.3);
}

.team-hero-badge--archived {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-hero-desc {
  color: var(--muted, #94a3b8);
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0.25rem 0 0 0;
}

.team-hero-stats-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.team-hero-stat {
  text-align: center;
  min-width: 48px;
}

.team-hero-stat-val {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.team-hero-stat-val--squad { color: #38bdf8; }
.team-hero-stat-val--injury { color: #f87171; }
.team-hero-stat-val--fit { color: #4ade80; }
.team-hero-stat-val--events { color: #fbbf24; }
.team-hero-stat-val--fixtures { color: #c084fc; }

.team-hero-stat-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.team-hero-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.team-hero-staff-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.team-hero-staff-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}

.team-hero-staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text, #f8fafc);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.team-hero-staff-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.team-hero-staff-chip--empty {
  color: var(--muted, #94a3b8);
  font-style: italic;
}

.team-hero-staff-chip__icon {
  font-size: 16px;
  color: var(--secondary, var(--gold, #f0a500));
}

.team-hero-staff-chip__content {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.team-hero-staff-chip__role {
  color: var(--muted, #94a3b8);
  font-size: 0.75rem;
  font-weight: 600;
}

.team-hero-staff-chip__name {
  font-weight: 700;
  color: #ffffff;
}

.team-hero-staff-chip__remove {
  background: transparent;
  border: none;
  color: #ef4444;
  padding: 2px;
  margin-left: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  opacity: 0.75;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.team-hero-staff-chip__remove:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.15);
}

.team-hero-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.team-hero-action-btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 7px;
  font-weight: 600;
}

.team-hero-action-btn--guernsey {
  color: var(--secondary, var(--gold, #f0a500));
  border-color: rgba(240, 165, 0, 0.4);
}

.team-hero-action-btn--guernsey:hover {
  background: rgba(240, 165, 0, 0.1);
  border-color: var(--secondary, var(--gold, #f0a500));
  color: #ffffff;
}

.team-hero-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(240, 165, 0, 0.15);
  color: #f0a500;
  border: 1px solid rgba(240, 165, 0, 0.3);
}

@media (max-width: 1024px) {
  .team-hero-card {
    margin-bottom: 1rem;
  }
  .team-hero-body {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }
  .team-hero-identity {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    gap: 0.9rem;
  }
  .team-hero-avatar {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
  }
  .team-hero-name {
    font-size: 1.35rem;
  }
  .team-hero-stats-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }
  .team-hero-stat {
    min-width: 0;
    text-align: center;
  }
  .team-hero-stat-divider {
    display: none;
  }
  .team-hero-stat-val {
    font-size: 1.2rem;
  }
  .team-hero-stat-lbl {
    font-size: 0.62rem;
    margin-top: 1px;
  }
  .team-hero-staff-actions {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    align-items: stretch;
    gap: 0.5rem;
  }
  .team-hero-staff-list {
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .team-hero-staff-chip {
    padding: 0.22rem 0.55rem;
    font-size: 0.75rem;
  }
  .team-hero-actions-row {
    justify-content: flex-start;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .team-hero-actions-row .btn,
  .team-hero-action-btn {
    flex: initial;
    padding: 0.3rem 0.65rem;
    font-size: 0.76rem;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .team-hero-card {
    margin-bottom: 0.85rem;
    border-radius: 12px;
  }
  .team-hero-body {
    padding: 0.85rem 0.95rem;
    gap: 0.6rem;
  }
  .team-hero-identity {
    flex-direction: row;
    gap: 0.75rem;
  }
  .team-hero-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
  .team-hero-monogram {
    font-size: 1.15rem;
  }
  .team-hero-name {
    font-size: 1.2rem;
  }
  .team-hero-badge {
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
  }
  .team-hero-desc {
    font-size: 0.8rem;
    margin: 0.15rem 0 0 0;
  }
  .team-hero-stats-box {
    gap: 0.25rem;
    padding: 0.45rem 0.4rem;
  }
  .team-hero-stat-val {
    font-size: 1.15rem;
  }
  .team-hero-stat-lbl {
    font-size: 0.6rem;
  }
  .team-hero-staff-actions {
    gap: 0.45rem;
  }
  .team-hero-staff-list {
    gap: 0.3rem;
  }
  .team-hero-staff-chip {
    padding: 0.2rem 0.5rem;
    font-size: 0.73rem;
  }
  .team-hero-actions-row {
    gap: 0.3rem;
  }
  .team-hero-actions-row .btn,
  .team-hero-action-btn {
    padding: 0.28rem 0.6rem;
    font-size: 0.74rem;
  }
}

@media (max-width: 480px) {
  .team-hero-card {
    margin-bottom: 0.75rem;
    border-radius: 10px;
  }
  .team-hero-body {
    padding: 0.75rem 0.85rem;
    gap: 0.55rem;
  }
  .team-hero-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .team-hero-name {
    font-size: 1.15rem;
  }
  .team-hero-meta-row {
    gap: 0.3rem;
  }
  .team-hero-badge {
    padding: 0.12rem 0.45rem;
    font-size: 0.7rem;
  }
  .team-hero-stats-box {
    padding: 0.38rem 0.3rem;
    gap: 0.2rem;
  }
  .team-hero-stat-val {
    font-size: 1.08rem;
  }
  .team-hero-stat-lbl {
    font-size: 0.58rem;
  }
}

.settings-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.logo-preview { display: block; max-height: 60px; margin-top: 0.5rem; }
.role-breakdown { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
.role-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; }

.platform-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .platform-grid { grid-template-columns: 1fr; } }

.profile-count { font-size: 1.5rem; font-weight: 800; color: var(--gold); }

.drills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.drill-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; transition: all var(--transition); }
.drill-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(var(--secondary-rgb), 0.3); }
.drill-card-header { display: flex; align-items: center; gap: 0.5rem; }
.difficulty-badge { padding: 0.25rem 0.7rem; border-radius: 100px; font-size: 0.72rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; }
.duration-badge { background: rgba(255,255,255,0.1); padding: 0.25rem 0.6rem; border-radius: 100px; font-size: 0.72rem; color: var(--muted); }
.team-badge { background: rgba(0,27,94,0.4); padding: 0.25rem 0.6rem; border-radius: 100px; font-size: 0.72rem; color: var(--muted); }
.drill-title { font-weight: 700; color: var(--text); font-size: 1rem; }
.drill-desc { color: var(--muted); font-size: 0.8rem; }
.drill-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag-chip { background: rgba(0,27,94,0.4); border: 1px solid rgba(255,255,255,0.1); padding: 0.15rem 0.5rem; border-radius: 100px; font-size: 0.7rem; color: var(--muted); }
.drill-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.drill-meta { font-size: 0.75rem; color: var(--muted); }
.drill-actions { display: flex; gap: 0.4rem; }

.attendee-edit-form { margin-top: 1rem; border-top: 1px dashed var(--border); padding-top: 1rem; }
.attendee-checkboxes { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.attendee-check-row { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; }
.attendee-name { min-width: 140px; font-weight: 500; }

.add-item-form.card-inner { background: rgba(0,27,94,0.2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; margin-top: 1rem; }
.form-subtitle { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }

/* ═══════════════════════════════════════════════════════
   MOBILE DRILL EDITOR — diagrams.net-inspired layout
   Hidden on desktop; all mobile elements use .mob- prefix
   ═══════════════════════════════════════════════════════ */

/* Mobile elements hidden by default (desktop) */
.mob-toolbar,
.mob-sidebar-backdrop,
.mob-sidebar,
.mob-step-tabs { display: none; }

@media (max-width: 768px) {

  /* ── Hide desktop chrome for drill editor ── */
  .drill-editor-page .sidebar,
  .drill-editor-page .topbar,
  .drill-editor-page .sidebar-backdrop,
  .drill-editor-page .desktop-only {
    display: none !important;
  }

  /* ── Lock page to visible viewport (strict 100dvh app mode, zero window scroll) ── */
  html:has(body.drill-editor-page),
  body.drill-editor-page {
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    touch-action: none;
  }

  .drill-editor-page .app-body-container {
    margin-top: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
  }

  .drill-editor-page .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    min-height: 0 !important;   /* override base min-height:100vh */
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
  }

  .drill-editor-page .content {
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
  }

  /* ── Strict 3-Row Mobile App: Toolbar (top) → Responsive Canvas (fill) → Step Tabs (bottom) ── */
  .drill-editor-page .drill-editor-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .drill-editor-page .drill-main-area {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    background: #090d16;
  }

  .drill-editor-page .drill-canvas-wrapper {
    flex: 1 1 0% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #0b1120 !important;
    position: relative !important;
  }

  .drill-editor-page #drillCanvas {
    display: block;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    touch-action: none !important;
  }

  /* ═══════════════════════════════════════════
     MOBILE TOP TOOLBAR (Sticky to top)
     ═══════════════════════════════════════════ */
  .drill-editor-page .mob-toolbar {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    flex-shrink: 0 !important;
    min-height: 44px;
    height: auto !important;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  .mob-toolbar-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text);
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-family: inherit;
    transition: all var(--transition);
    white-space: nowrap;
  }
  .mob-toolbar-btn:hover,
  .mob-toolbar-btn:active {
    background: rgba(var(--secondary-rgb), 0.12);
    border-color: rgba(var(--secondary-rgb), 0.3);
  }
  .mob-toolbar-btn .material-symbols-outlined { font-size: 20px; }

  .mob-btn-label { font-size: 0.72rem; font-weight: 600; }
  .mob-chevron { font-size: 14px !important; opacity: 0.5; }

  .mob-save-status {
    font-size: 0.75rem;
    color: #68d391;
    margin-right: auto;
    white-space: nowrap;
  }

  .mob-btn-danger:hover,
  .mob-btn-danger:active {
    background: rgba(239,68,68,0.15) !important;
    border-color: rgba(239,68,68,0.3) !important;
    color: #f87171 !important;
  }

  .mob-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-left: auto;
  }

  /* ─── Dropdown menus ─── */
  .mob-dropdown-wrap {
    position: relative;
  }
  .mob-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 500;
    padding: 0.4rem 0;
    margin-top: 0.25rem;
    backdrop-filter: blur(12px);
  }
  .mob-dropdown-menu.open { display: block; }

  .mob-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    text-align: left;
  }
  .mob-menu-item:hover,
  .mob-menu-item:active { background: rgba(var(--secondary-rgb), 0.1); }
  .mob-menu-item .material-symbols-outlined { font-size: 18px; color: var(--muted); }
  .mob-colour-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
    border: 1.5px solid rgba(255,255,255,0.25);
  }

  .mob-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0;
  }
  .mob-menu-label {
    padding: 0.4rem 1rem 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  /* ═══════════════════════════════════════════
     MOBILE SIDEBAR (hamburger overlay)
     ═══════════════════════════════════════════ */
  .mob-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 600;
    backdrop-filter: blur(3px);
  }
  .mob-sidebar-backdrop.open { display: block; }

  .mob-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 650;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  .mob-sidebar.open { transform: translateX(0); }

  .mob-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .mob-sidebar-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
  }
  .mob-sidebar-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    line-height: 1;
  }
  .mob-sidebar-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }

  .mob-sidebar-body { padding: 0.75rem; }

  .mob-sidebar-section {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .mob-sidebar-section:last-child { border-bottom: none; }

  .mob-sidebar-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.5rem;
  }

  .mob-sidebar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .mob-select {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    min-width: 80px;
    flex: 1;
  }

  .mob-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.75rem;
  }

  .mob-btn-danger-outline {
    color: #f87171 !important;
    border-color: rgba(239,68,68,0.3) !important;
  }
  .mob-btn-danger-outline:hover {
    background: rgba(239,68,68,0.12) !important;
  }

  /* ═══════════════════════════════════════════
     MOBILE BOTTOM STEP TABS (Excel-style, Sticky with Safe-Area Padding)
     ═══════════════════════════════════════════ */
  .drill-editor-page .mob-step-tabs {
    display: flex !important;
    align-items: stretch;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    flex-shrink: 0 !important;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 46px;
    height: auto !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 16px));
    box-sizing: border-box;
    overflow: hidden;
  }

  .mob-step-tabs-scroll {
    display: flex;
    align-items: stretch;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    min-height: 44px;
    height: 44px;
  }
  .mob-step-tabs-scroll::-webkit-scrollbar { display: none; }

  .mob-step-tab {
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0 1rem;
    min-height: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
  }
  .mob-step-tab:hover,
  .mob-step-tab:active { background: rgba(var(--secondary-rgb), 0.06); color: var(--text); }

  .mob-step-tab-active {
    color: var(--gold) !important;
    background: rgba(var(--secondary-rgb), 0.12);
  }
  .mob-step-tab-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
    border-radius: 2px 2px 0 0;
  }

  .mob-step-tab-add {
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gold);
    padding: 0 1rem;
    min-height: 44px;
    height: 44px;
    border-right: none;
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mob-step-tab-add:hover { background: rgba(var(--secondary-rgb), 0.15); }
}

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .minutes-page { max-width: 100%; }
  body { background: white; color: black; }
  .card { border: 1px solid #ccc; break-inside: avoid; }
}


/* ===================================================
   PLAYER STATS & SQUAD RATINGS (Responsive Cards)
   =================================================== */

.player-stat-card-row {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md, 8px);
  margin-bottom: 0;
  transition: border-color var(--transition, 0.15s ease);
}

.player-stat-card-inner {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 1.1fr) minmax(120px, 0.9fr) minmax(150px, 1.1fr) minmax(180px, 1.4fr) auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
}

.pcard-section-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.pcard-jersey-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pcard-name-group {
  min-width: 0;
}

.pcard-player-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard-player-pos {
  font-size: 0.72rem;
  color: var(--muted);
}

.pcard-section-positions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.pcard-section-scoring {
  min-width: 0;
}

.pcard-section-rating {
  min-width: 0;
}

.pcard-rating-labels {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3px;
  flex-wrap: wrap;
}

.rating-standard-label {
  font-size: 0.78rem;
  font-weight: 800;
}

.rating-perf-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.pcard-section-tags {
  min-width: 0;
}

.pcard-add-tag-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pcard-section-tags .player-tag-input {
  font-size: 0.72rem;
  padding: 2px 8px;
  height: 24px;
  border-radius: 12px;
  max-width: 140px;
}

.pcard-add-tag-btn {
  padding: 2px 6px;
  font-size: 0.7rem;
  height: 24px;
}

.pcard-section-notes {
  text-align: right;
}

.pcard-note-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 4px 8px;
  white-space: nowrap;
}

/* ── Mobile Player Review Cards & Filter Bar (< 768px) ── */
@media (max-width: 768px) {
  #gameConsoleStatsCard {
    padding-bottom: 5.5rem !important; /* space for sticky save bar */
  }

  .stats-filter-pill-bar {
    display: flex !important;
    gap: 0.4rem !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 4px !important;
    width: 100% !important;
  }
  .stats-filter-pill-bar::-webkit-scrollbar {
    display: none;
  }
  .stats-filter-pill-bar .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.65rem !important;
  }
  .desktop-only-save-btn {
    display: none !important;
  }

  #unifiedPlayerStatsGrid {
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .player-stat-card-row {
    padding: 0.75rem 0.85rem !important;
    border-radius: 10px !important;
  }

  .player-stat-card-inner {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "identity scoring"
      "positions positions"
      "rating notes"
      "tags tags" !important;
    gap: 0.6rem 0.5rem !important;
    align-items: center !important;
    width: 100% !important;
  }

  .pcard-section-identity {
    grid-area: identity;
    min-width: 0;
  }

  .pcard-section-scoring {
    grid-area: scoring;
    justify-self: end;
  }

  .pcard-section-positions {
    grid-area: positions;
    padding-top: 2px;
  }

  .pcard-section-rating {
    grid-area: rating;
  }

  .pcard-section-notes {
    grid-area: notes;
    justify-self: end;
  }

  .pcard-section-tags {
    grid-area: tags;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.5rem;
  }

  .pcard-section-tags .player-tag-input {
    flex: 1;
    max-width: none !important;
  }

  /* Sticky Floating Save Bar on Mobile */
  .mobile-stats-save-bar {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 850 !important;
    background: var(--surface, #1e293b) !important;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.12)) !important;
    padding: 0.65rem 1rem !important;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 16px)) !important;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }
  .mobile-stats-save-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 100%;
  }
  .mobile-stats-save-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text, #f8fafc);
  }
}

@media (min-width: 769px) {
  .mobile-stats-save-bar {
    display: none !important;
  }
}

/* ===================================================
   GAMES APP — Match Day Management
   =================================================== */

/* ─── Game Header ────────────────────────────────────────────────── */

.game-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.game-header-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.game-header-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.game-header-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.game-header-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}


/* ─── Pre-Match Timeline ─────────────────────────────────────────── */

.prematch-timeline {
  position: relative;
  padding: 1.5rem 0 1rem;
}
/* Vertical connecting line */
.prematch-timeline::before {
  content: '';
  position: absolute;
  top: 2.5rem;
  bottom: 2rem;
  left: 54px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), rgba(var(--secondary-rgb), 0.2));
  border-radius: 2px;
}

.prematch-slot {
  display: grid;
  grid-template-columns: 50px 20px 1fr;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 1.25rem;
  position: relative;
}

/* Time label */
.prematch-time {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-align: right;
  padding-top: 0.85rem;
  white-space: nowrap;
}

/* Timeline dot */
.prematch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--gold);
  margin-top: 0.85rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  justify-self: center;
}
.prematch-dot-completed {
  background: var(--gold);
}

/* Content card */
.prematch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: border-color var(--transition);
}
.prematch-card:hover {
  border-color: rgba(var(--secondary-rgb), 0.3);
}
.prematch-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.prematch-select {
  width: 100%;
  padding: 0.45rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.prematch-select:focus {
  outline: none;
  border-color: var(--gold);
}
.prematch-notes {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  resize: vertical;
  min-height: 36px;
  transition: border-color var(--transition);
}
.prematch-notes:focus {
  outline: none;
  border-color: var(--gold);
}
.prematch-notes::placeholder {
  color: var(--muted);
}


/* ─── Score Tracker ──────────────────────────────────────────────── */

.score-tracker {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.score-tracker-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.score-block-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.score-block-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  min-width: 48px;
  text-align: center;
}
.score-separator {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--muted);
  padding-top: 1rem;
}
.score-block-total .score-block-value {
  font-size: 2.8rem;
  color: var(--gold);
}
.score-block-total .score-block-label {
  color: var(--gold);
}

/* Quarter breakdown tabs */
.score-quarter-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 1.25rem;
  padding-top: 1rem;
}
.score-quarter-tab {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  background: none;
  border: 1px solid var(--border);
  border-right: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.score-quarter-tab:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.score-quarter-tab:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.score-quarter-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.score-quarter-tab-active {
  background: rgba(var(--secondary-rgb), 0.12);
  color: var(--gold);
  border-color: rgba(var(--secondary-rgb), 0.3);
}
.score-quarter-tab-active + .score-quarter-tab {
  border-left-color: rgba(var(--secondary-rgb), 0.3);
}
.score-quarter-detail {
  display: none;
  text-align: center;
  padding: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text);
}
.score-quarter-detail-active {
  display: block;
}
.score-quarter-detail-value {
  font-weight: 700;
  font-size: 1.1rem;
}


/* ─── Countdown Timer ────────────────────────────────────────────── */

.game-timer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.game-timer-display {
  font-size: 4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 1rem;
}
.game-timer-active .game-timer-display {
  color: var(--gold);
  text-shadow: 0 0 24px rgba(var(--secondary-rgb), 0.25);
  animation: timer-pulse 2s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { text-shadow: 0 0 24px rgba(var(--secondary-rgb), 0.2); }
  50%      { text-shadow: 0 0 36px rgba(var(--secondary-rgb), 0.4); }
}
.game-timer-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.game-timer-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.game-timer-btn:hover {
  border-color: rgba(var(--secondary-rgb), 0.4);
  background: rgba(var(--secondary-rgb), 0.08);
}
.game-timer-btn-start {
  background: rgba(72,187,120,0.15);
  border-color: rgba(72,187,120,0.3);
  color: #68d391;
}
.game-timer-btn-start:hover {
  background: rgba(72,187,120,0.25);
}
.game-timer-btn-pause {
  background: rgba(var(--secondary-rgb), 0.15);
  border-color: rgba(var(--secondary-rgb), 0.3);
  color: var(--gold);
}
.game-timer-btn-pause:hover {
  background: rgba(var(--secondary-rgb), 0.25);
}
.game-timer-btn-reset {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #f87171;
}
.game-timer-btn-reset:hover {
  background: rgba(239,68,68,0.2);
}
.game-timer-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.game-timer-duration-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.game-timer-duration-select {
  padding: 0.3rem 0.6rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
}
.game-timer-duration-select:focus {
  outline: none;
  border-color: var(--gold);
}


/* ─── Quarter Selector ───────────────────────────────────────────── */

.quarter-selector {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
}
.quarter-btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.quarter-btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.quarter-btn:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.quarter-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.quarter-btn-active {
  background: rgba(var(--secondary-rgb), 0.15);
  border-color: rgba(var(--secondary-rgb), 0.4);
  color: var(--gold);
}
.quarter-btn-active + .quarter-btn {
  border-left-color: rgba(var(--secondary-rgb), 0.4);
}


/* ─── Player Action Dialog ───────────────────────────────────────── */

.player-action-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 900;
  animation: pad-overlay-in 150ms ease-out;
}
@keyframes pad-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.player-action-dialog {
  position: absolute;
  z-index: 910;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  animation: pad-pop-in 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

/* Drag-and-drop visuals */
.live-chip-dragging {
  opacity: 0.4;
  transform: scale(0.9);
}
.lineup-zone-dragover {
  outline: 2px dashed var(--gold) !important;
  outline-offset: 2px;
  background: rgba(var(--secondary-rgb), 0.15) !important;
}
.live-player-chip {
  cursor: grab;
}
.live-player-chip:active {
  cursor: grabbing;
}
@keyframes pad-pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pad-player-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pad-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
}
.pad-close:hover {
  color: var(--text);
}

.pad-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pad-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pad-btn-swap {
  background: rgba(var(--primary-rgb), 0.15);
  color: #60a5fa;
}
.pad-btn-swap:hover {
  background: rgba(var(--primary-rgb), 0.25);
}
.pad-btn-goal {
  background: rgba(72,187,120,0.15);
  color: #68d391;
}
.pad-btn-goal:hover {
  background: rgba(72,187,120,0.25);
}
.pad-btn-behind {
  background: rgba(var(--secondary-rgb), 0.15);
  color: var(--gold);
}
.pad-btn-behind:hover {
  background: rgba(var(--secondary-rgb), 0.25);
}


/* ─── Swap Mode Indicator ────────────────────────────────────────── */

.swap-mode-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: rgba(var(--primary-rgb), 0.1);
  border: 2px solid rgba(var(--primary-rgb), 0.4);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  animation: swap-pulse 1.8s ease-in-out infinite;
}
@keyframes swap-pulse {
  0%, 100% { border-color: rgba(var(--primary-rgb), 0.4); background: rgba(var(--primary-rgb), 0.1); }
  50%      { border-color: rgba(var(--primary-rgb), 0.7); background: rgba(var(--primary-rgb), 0.16); }
}
.swap-mode-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #60a5fa;
}
.swap-mode-player {
  font-weight: 700;
  color: var(--text);
}
.swap-mode-cancel {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.12);
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.swap-mode-cancel:hover {
  background: rgba(239,68,68,0.22);
  border-color: rgba(239,68,68,0.5);
}


/* ─── Post-Match Review Form ─────────────────────────────────────── */

.postmatch-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Collapsible section */
.postmatch-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.postmatch-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  transition: background var(--transition);
}
.postmatch-section-header:hover {
  background: rgba(255,255,255,0.03);
}
.postmatch-collapse-icon {
  font-size: 0.85rem;
  color: var(--muted);
  transition: transform var(--transition);
}
.postmatch-section-open .postmatch-collapse-icon {
  transform: rotate(180deg);
}
.postmatch-section-body {
  display: none;
  padding: 0 1.15rem 1.15rem;
}
.postmatch-section-open .postmatch-section-body {
  display: block;
}

/* Question blocks */
.postmatch-question {
  margin-bottom: 1.25rem;
}
.postmatch-question:last-child {
  margin-bottom: 0;
}
.postmatch-question-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.postmatch-question-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  line-height: 1.4;
}
.postmatch-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color var(--transition);
}
.postmatch-textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.postmatch-textarea::placeholder {
  color: var(--muted);
}


/* ─── Star Rating Widget ─────────────────────────────────────────── */

.star-rating-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.star-rating-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}
.star-rating-player {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.star-rating {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}
.star-rating-star {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  transition: color 120ms ease, transform 120ms ease;
  line-height: 1;
}
.star-rating-star:hover,
.star-rating-star-hover {
  color: var(--gold);
  transform: scale(1.2);
}
.star-rating-star-filled {
  color: var(--gold);
}
.star-rating-note {
  width: 100%;
  padding: 0.35rem 0.6rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.78rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
.star-rating-note:focus {
  outline: none;
  border-color: var(--gold);
}
.star-rating-note::placeholder {
  color: var(--muted);
}


/* ─── Player Stats Display ───────────────────────────────────────── */

.player-game-stats {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.2rem;
}
.pgs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.35rem;
  border-radius: 100px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.3;
}
.pgs-badge-goal {
  background: rgba(72,187,120,0.2);
  color: #68d391;
}
.pgs-badge-behind {
  background: rgba(var(--secondary-rgb), 0.2);
  color: var(--gold);
}


/* ─── Swap Log ───────────────────────────────────────────────────── */

.swap-log {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.swap-log-title {
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.swap-log-list {
  max-height: 240px;
  overflow-y: auto;
}
.swap-log-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.swap-log-item:last-child {
  border-bottom: none;
}
.swap-log-item:nth-child(even) {
  background: rgba(255,255,255,0.02);
}
.swap-log-quarter {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.72rem;
  text-transform: uppercase;
  min-width: 24px;
}
.swap-log-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.78rem;
  min-width: 40px;
}
.swap-log-players {
  color: var(--text);
  font-weight: 500;
}
.swap-log-arrow {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0.15rem;
}
.swap-log-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}


/* ─── Games App — Responsive ─────────────────────────────────────── */

@media (max-width: 768px) {

  /* Game header stacks */
  .game-header {
    gap: 0.75rem;
  }
  .game-header-divider {
    display: none;
  }
  .game-header-item {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 0;
  }

  /* Score tracker stacks vertically */
  .score-tracker-main {
    flex-direction: column;
    gap: 0.75rem;
  }
  .score-separator {
    display: none;
  }
  .score-block {
    flex-direction: row;
    gap: 0.75rem;
  }
  .score-block-value {
    font-size: 1.6rem;
  }
  .score-block-total .score-block-value {
    font-size: 2.2rem;
  }

  /* Timer full-width */
  .game-timer {
    padding: 1rem;
  }
  .game-timer-display {
    font-size: 3rem;
  }
  .game-timer-controls {
    flex-wrap: wrap;
  }

  /* Star rating grid to single column */
  .star-rating-grid {
    grid-template-columns: 1fr;
  }

  /* Pre-match timeline compact */
  .prematch-timeline::before {
    left: 34px;
  }
  .prematch-slot {
    grid-template-columns: 30px 16px 1fr;
    gap: 0.5rem;
  }
  .prematch-time {
    font-size: 0.7rem;
  }
  .prematch-dot {
    width: 10px;
    height: 10px;
  }
  .prematch-card {
    padding: 0.6rem 0.75rem;
  }

  /* Quarter selector */
  .quarter-btn {
    font-size: 0.75rem;
    padding: 0.45rem 0.5rem;
  }

  /* Player action dialog */
  .player-action-dialog {
    min-width: 160px;
  }

  /* Post-match form */
  .postmatch-section-header {
    padding: 0.75rem 0.85rem;
    font-size: 0.88rem;
  }
  .postmatch-section-body {
    padding: 0 0.85rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .star-rating-grid {
    grid-template-columns: 1fr;
  }
  .game-timer-display {
    font-size: 2.5rem;
  }
  .score-block-total .score-block-value {
    font-size: 1.8rem;
  }
}

/* ===================================================
   TRAINING EVENT — Tabbed Session Management
   =================================================== */

/* -------------------------------------------------
   1. PLANNING TAB  (.training-planning)
   ------------------------------------------------- */
.training-planning {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* --- Game Review Summary Card --- */
.training-review-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.training-review-summary__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.training-review-summary__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.training-review-summary__content {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}

.training-review-summary__content:empty::after {
  content: '—';
  color: var(--muted);
}

/* --- Section Header Labels (shared) --- */
.training-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

/* --- Notepad Fallback --- */
.training-notepad {
  width: 100%;
  min-height: 180px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.training-notepad::placeholder {
  color: var(--muted);
}

.training-notepad:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), 0.12);
}

/* -------------------------------------------------
   2. SESSION PLAN TABLE  (.session-plan-table)
   ------------------------------------------------- */

/* --- Filter Row --- */
.session-plan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.session-plan-filters select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

.session-plan-filters select:focus {
  outline: none;
  border-color: var(--gold);
}

/* -------------------------------------------------
   2. SESSION TIMELINE & DRILL BLOCKS
   ------------------------------------------------- */
.session-plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.session-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.session-plan-header__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.session-plan-header__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.session-plan-duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.session-plan-header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Timeline container */
.drill-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Drill & Activity Card */
.drill-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface, #111827);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.drill-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.drill-card--drill {
  border-left: 4px solid #10b981;
}

.drill-card--break {
  border-left: 4px solid #0ea5e9;
}

.drill-card--meeting {
  border-left: 4px solid #8b5cf6;
}

.drill-card--custom {
  border-left: 4px solid #f59e0b;
}

/* Time Badge */
.drill-time-badge {
  flex-shrink: 0;
  min-width: 95px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drill-time-badge--drill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.drill-time-badge--break {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}

.drill-time-badge--meeting {
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
}

.drill-time-badge--custom {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.drill-time-badge__duration {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 2px;
}

/* Card content */
.drill-info {
  flex: 1;
  min-width: 0;
}

.drill-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.3;
}

.drill-category-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.drill-desc {
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  margin-top: 0.25rem;
  line-height: 1.45;
}

.drill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.drill-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #cbd5e1);
  letter-spacing: 0.01em;
}

/* Card Actions */
.drill-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.drill-duration-control {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
}

.drill-duration-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.drill-duration-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.drill-duration-val {
  font-family: 'Courier New', monospace;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  padding: 0 6px;
  min-width: 32px;
  text-align: center;
}

.drill-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.drill-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.drill-action-btn--delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Empty State */
.drill-timeline-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.1);
}

.drill-timeline-empty__icon {
  font-size: 2.5rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.drill-timeline-empty__text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* -------------------------------------------------
   3. ADD TO PLAN MODAL (.modal-add-slot)
   ------------------------------------------------- */
.modal-add-slot-dialog {
  max-width: 720px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--surface-card, #141a24);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.modal-add-slot-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.modal-add-slot-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.modal-add-slot-tab {
  flex: 1;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.modal-add-slot-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.modal-add-slot-tab.active {
  color: #fff;
  border-bottom-color: #10b981;
  background: rgba(255, 255, 255, 0.05);
}

.modal-add-slot-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-slot-panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.modal-slot-panel.active {
  display: flex;
}

/* Drill filters */
.modal-drill-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.modal-drill-filters input[type="text"] {
  flex: 1;
  min-width: 180px;
}

.modal-drill-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-drill-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-drill-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.modal-drill-item.selected {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
}

.modal-drill-item__title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.modal-drill-item__desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.35;
}

.modal-drill-item__tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* Presets grid */
.activity-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
}

.activity-preset-card {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.activity-preset-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.activity-preset-card.selected {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
}

.activity-preset-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activity-preset-card__icon {
  font-size: 1.3rem;
}

.activity-preset-card__mins {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.activity-preset-card__name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.activity-preset-card__desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Modal Footer */
.modal-add-slot-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-duration-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-duration-quick-btn {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.modal-duration-quick-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@media (max-width: 768px) {
  .drill-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .drill-card-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .drill-time-badge {
    align-self: flex-start;
  }
}

/* -------------------------------------------------
   4. POST-TRAINING REVIEW  (.training-review)
   ------------------------------------------------- */
.training-review {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.training-review__player-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.training-review__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.training-review__save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.training-review__save-btn:hover {
  background: #ffb833;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--secondary-rgb), 0.25);
}

.training-review__save-btn:active {
  transform: translateY(0);
}

/* -------------------------------------------------
   5. PLAYER ATTENDANCE CARD  (.attendance-card)
   ------------------------------------------------- */
.attendance-card {
  display: grid;
  grid-template-columns: 1fr auto 1.5fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem 0.75rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--muted);
  transition: border-color var(--transition), background var(--transition);
}

.attendance-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* RSVP border color modifiers */
.attendance-card--attending {
  border-left-color: #22c55e;
}

.attendance-card--maybe {
  border-left-color: #facc15;
}

.attendance-card--not-attending {
  border-left-color: #f97316;
}

.attendance-card--no-response {
  border-left-color: #ef4444;
}

/* Player identity */
.attendance-card__player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.attendance-card__jersey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(var(--secondary-rgb), 0.1);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.attendance-card__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-card__rsvp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.attendance-card__rsvp-dot--attending {
  background: #22c55e;
}

.attendance-card__rsvp-dot--maybe {
  background: #facc15;
}

.attendance-card__rsvp-dot--not-attending {
  background: #f97316;
}

.attendance-card__rsvp-dot--no-response {
  background: #ef4444;
}

/* Comment input */
.attendance-card__comment {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.65rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  transition: border-color var(--transition);
}

.attendance-card__comment::placeholder {
  color: var(--muted);
}

.attendance-card__comment:focus {
  outline: none;
  border-color: var(--gold);
}

/* -------------------------------------------------
   6. ATTENDANCE TOGGLE  (.attendance-toggle)
   ------------------------------------------------- */
.attendance-toggle {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.attendance-toggle__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  user-select: none;
  border: none;
  background: transparent;
  color: var(--muted);
}

.attendance-toggle__option:first-child {
  border-right: 1px solid var(--border);
}

.attendance-toggle__option:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Present active state */
.attendance-toggle__option--present.is-active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

/* Absent active state */
.attendance-toggle__option--absent.is-active {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* -------------------------------------------------
   RESPONSIVE — Training Event Tabs
   ------------------------------------------------- */
@media (max-width: 768px) {
  .attendance-card {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .attendance-card__player {
    justify-content: space-between;
  }

  .attendance-toggle {
    justify-self: start;
  }

  .drill-picker-dropdown {
    width: calc(100vw - 2rem);
    left: 50%;
    transform: translateX(-50%);
  }

  .session-plan-table {
    display: block;
    overflow-x: auto;
  }

  .session-plan-filters {
    flex-direction: column;
  }

  .training-review-summary {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .attendance-toggle__option {
    padding: 0.25rem 0.55rem;
    font-size: 0.7rem;
  }

  .drill-picker-dropdown {
    max-height: 280px;
  }

  .session-plan-table thead th,
  .session-plan-table tbody td {
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
  }
}

/* -------------------------------------------------
   MISC — Training Utilities
   ------------------------------------------------- */
.training-review-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.session-plan-filters {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filter-label {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.attendance-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drill-name-link {
  color: var(--gold);
  cursor: pointer;
  text-decoration: none;
}
.drill-name-link:hover {
  text-decoration: underline;
}
.drill-name-empty {
  color: var(--muted);
  font-style: italic;
}

.drill-picker-end-session {
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-style: italic;
  transition: background var(--transition);
}
.drill-picker-end-session:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.drill-picker-empty {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.drill-picker-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}
.drill-picker-item:hover {
  background: rgba(var(--secondary-rgb), 0.08);
}
.drill-picker-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}
.drill-picker-item-meta {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.2rem;
}
.drill-picker-item-duration {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.session-row-end td {
  color: var(--muted);
  font-style: italic;
  background: rgba(255,255,255,0.02);
}

.col-start-time {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--gold);
}

/* Toast notification */
.training-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.training-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================================================
   STANDARD ROTATIONS
   =================================================== */

/* --- Layout: live lineup container with rotations panel --- */
.lineup-container-live {
  display: flex;
  gap: 1rem;
}

/* --- Rotations panel (right side of lineup field) --- */
.rotations-panel {
  width: 180px;
  min-width: 160px;
  max-height: 520px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rotations-panel-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* --- Rotation macro button --- */
.rotation-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
}
.rotation-btn:hover {
  background: rgba(var(--secondary-rgb), 0.08);
  box-shadow: 0 0 8px rgba(var(--secondary-rgb), 0.25);
  transform: translateY(-1px);
}
.rotation-btn:active {
  transform: scale(0.96);
  transition: transform 80ms ease;
}
.rotation-btn__name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.rotation-btn__count {
  font-size: 0.7rem;
  color: var(--muted);
}

/* --- Invalid rotation --- */
.rotation-btn--invalid {
  opacity: 0.45;
  border-left-color: #e05050;
  cursor: not-allowed;
  pointer-events: none;
}
.rotation-btn--invalid .rotation-btn__warn {
  display: inline-block;
  color: #e05050;
  font-size: 0.7rem;
  margin-left: 0.3rem;
}
.rotation-btn:not(.rotation-btn--invalid) .rotation-btn__warn {
  display: none;
}

/* Executed flash */
.rotation-btn--executed {
  background: rgba(46, 204, 113, 0.15) !important;
  border-left-color: #2ecc71 !important;
  transition: background 0.3s ease;
}

/* Header row */
.rotation-btn__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rotation-btn__warning {
  font-size: 0.75rem;
}
.rotation-btn__moves {
  margin: 0.2rem 0;
}

/* --- Rotation move summary --- */
.rotation-move {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
  padding: 0.1rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rotation-move__arrow {
  color: var(--gold);
  margin: 0 0.15rem;
}

/* --- Clash highlight on drop zones --- */
@keyframes clash-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(224, 80, 80, 0.4); }
  50%      { box-shadow: 0 0 14px rgba(224, 80, 80, 0.8); }
}
.lineup-drop-zone.clash-highlight {
  border-color: #e05050 !important;
  animation: clash-pulse 0.8s ease-in-out infinite;
}

/* --- Rotation editor (team dashboard) --- */
.rotation-editor {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rotation-editor__row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.rotation-editor__row select {
  flex: 1;
  padding: 0.4rem 0.5rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
.rotation-editor__add-btn,
.rotation-editor__remove-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  transition: color var(--transition), border-color var(--transition);
}

/* ═══════════════════════════════════════════════════════
   MOBILE LIVE FIELD — Drill Editor-inspired layout
   Hidden on desktop; game mobile elements use .game-mob- prefix
   ═══════════════════════════════════════════════════════ */

/* Mobile game elements hidden by default (desktop) */
.game-mob-toolbar,
.game-mob-scorebar,
.game-mob-interchange,
.game-mob-quarter-tabs,
.game-mob-sidebar-backdrop,
.game-mob-sidebar { display: none; }

@media (max-width: 768px) {

  /* ── Hide generic game chrome when Live Field is active ── */
  body.game-livefield-active .game-tabs,
  body.game-livefield-active .game-header,
  body.game-livefield-active .game-tab-panel:not(#panel-livefield) {
    display: none !important;
  }



  /* Hide legacy score-timer-card on mobile live field, but keep afl-match-centre and scoring visible */
  body.game-livefield-active .score-timer-card {
    display: none !important;
  }

  /* Hide desktop rotations panel and interchange sidebar on mobile */
  body.game-livefield-active .rotations-panel,
  #phase-content-3 .rotations-panel {
    display: none !important;
  }
  body.game-livefield-active .lineup-interchange,
  #phase-content-3 .lineup-interchange {
    display: none !important;
  }

  /* Hide swap log card on mobile live field */
  body.game-livefield-active #panel-livefield > .card {
    display: none !important;
  }

  /* Make the live field panel take full height */
  body.game-livefield-active #panel-livefield {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  /* ═══════════════════════════════════════════
     GAME MOBILE TOP TOOLBAR
     ═══════════════════════════════════════════ */
  body.game-livefield-active .game-mob-toolbar {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    flex-shrink: 0;
    height: 44px;
    overflow: visible;
  }

  /* Reuse drill mob-toolbar button styles */
  .game-mob-toolbar .mob-toolbar-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text);
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-family: inherit;
    transition: all var(--transition);
    white-space: nowrap;
  }
  .game-mob-toolbar .mob-toolbar-btn:hover,
  .game-mob-toolbar .mob-toolbar-btn:active {
    background: rgba(var(--secondary-rgb), 0.12);
    border-color: rgba(var(--secondary-rgb), 0.3);
  }
  .game-mob-toolbar .mob-toolbar-btn .material-symbols-outlined { font-size: 20px; }
  .game-mob-toolbar .mob-btn-label { font-size: 0.72rem; font-weight: 600; }
  .game-mob-toolbar .mob-chevron { font-size: 14px !important; opacity: 0.5; }

  /* Reuse drill dropdown menu styles */
  .game-mob-toolbar .mob-dropdown-wrap { position: relative; }
  .game-mob-toolbar .mob-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 500;
    padding: 0.4rem 0;
    margin-top: 0.25rem;
    backdrop-filter: blur(12px);
  }
  .game-mob-toolbar .mob-dropdown-menu.open { display: block; }
  .game-mob-toolbar .mob-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    text-align: left;
  }
  .game-mob-toolbar .mob-menu-item:hover,
  .game-mob-toolbar .mob-menu-item:active { background: rgba(var(--secondary-rgb), 0.1); }
  .game-mob-toolbar .mob-menu-item .material-symbols-outlined { font-size: 18px; color: var(--muted); }
  .game-mob-toolbar .mob-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0;
  }
  .game-mob-toolbar .mob-menu-label {
    padding: 0.4rem 1rem 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  /* ═══════════════════════════════════════════
     COMPACT CLOCK + DUAL SCORE BAR
     ═══════════════════════════════════════════ */
  .game-mob-scorebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.35rem 0.75rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .game-mob-clock {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1;
    min-width: 58px;
    text-align: center;
  }
  .game-mob-clock.game-timer-running {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(var(--secondary-rgb), 0.25);
  }

  .game-mob-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
  }
  .game-mob-score-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
  .game-mob-score-value {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
  }
  .game-mob-score-value .score-sep {
    color: var(--muted);
    margin: 0 0.1rem;
    font-weight: 400;
  }
  .game-mob-score-total {
    color: var(--gold);
  }

  .game-mob-timer-controls {
    display: flex;
    gap: 0.2rem;
  }
  .game-mob-timer-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.65rem;
    font-family: inherit;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
  }
  .game-mob-timer-btn:hover {
    border-color: rgba(var(--secondary-rgb), 0.4);
    background: rgba(var(--secondary-rgb), 0.08);
  }
  .game-mob-timer-btn.active {
    background: rgba(72,187,120,0.15);
    border-color: rgba(72,187,120,0.3);
    color: #68d391;
  }

  /* ═══════════════════════════════════════════
     MOBILE FIELD WRAPPER — fill remaining space
     ═══════════════════════════════════════════ */
  body.game-livefield-active .lineup-container-live,
  #phase-content-3 .lineup-container-live {
    display: flex !important;
    flex-direction: column !important;
    min-height: 480px !important;
    gap: 0 !important;
    width: 100% !important;
  }

  body.game-livefield-active .lineup-field-wrapper,
  #phase-content-3 .lineup-field-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 440px !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
  }
  body.game-livefield-active .lineup-field-img,
  #phase-content-3 .lineup-field-img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  /* ═══════════════════════════════════════════
     MOBILE INTERCHANGE — horizontal strip below field
     ═══════════════════════════════════════════ */
  .game-mob-interchange,
  #phase-content-3 .game-mob-interchange {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
    background: var(--card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow-y: auto;
    max-height: 120px;
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .game-mob-interchange::-webkit-scrollbar { display: none; }
  .game-mob-interchange-title {
    grid-column: 1 / -1;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
  }
  .game-mob-interchange .lineup-player-chip {
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ═══════════════════════════════════════════
     MOBILE QUARTER TABS (bottom, Excel-style)
     ═══════════════════════════════════════════ */
  body.game-livefield-active .game-mob-quarter-tabs {
    display: flex !important;
    align-items: center;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    height: 42px;
    overflow: hidden;
  }
  .game-mob-quarter-tabs-scroll {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
    gap: 0;
  }
  .game-mob-quarter-tab {
    flex: 1;
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0;
    height: 100%;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
  }
  .game-mob-quarter-tab:last-child { border-right: none; }
  .game-mob-quarter-tab:hover,
  .game-mob-quarter-tab:active { background: rgba(var(--secondary-rgb), 0.06); color: var(--text); }
  .game-mob-quarter-tab.mob-step-tab-active {
    color: var(--gold) !important;
    background: rgba(var(--secondary-rgb), 0.12);
  }
  .game-mob-quarter-tab.mob-step-tab-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    border-radius: 2px 2px 0 0;
  }

  /* ═══════════════════════════════════════════
     MOBILE SIDEBAR (hamburger overlay for game)
     ═══════════════════════════════════════════ */
  .game-mob-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 600;
    backdrop-filter: blur(3px);
  }
  .game-mob-sidebar-backdrop.open { display: block; }

  .game-mob-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 650;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  .game-mob-sidebar.open { transform: translateX(0); }

  .game-mob-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .game-mob-sidebar-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
  }
  .game-mob-sidebar-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    line-height: 1;
  }
  .game-mob-sidebar-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }
  .game-mob-sidebar-body { padding: 0.75rem; }
  .game-mob-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  .game-mob-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    text-align: left;
    width: 100%;
  }
  .game-mob-sidebar-link:hover { background: rgba(var(--secondary-rgb), 0.08); }
  .game-mob-sidebar-link .material-symbols-outlined { font-size: 20px; color: var(--muted); }

  /* ═══════════════════════════════════════════
     PLAYER TOKEN RESCALING FOR MOBILE
     ═══════════════════════════════════════════ */

  /* On mobile live field: hide first name and jersey, show only surname + position */
  body.game-livefield-active .lineup-drop-zone .lpc-first {
    display: none !important;
  }
  body.game-livefield-active .lineup-drop-zone .lpc-jersey {
    display: none !important;
  }
  body.game-livefield-active .lineup-drop-zone .lpc-last {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
    max-width: 60px;
  }
  body.game-livefield-active .lineup-drop-zone .lpc-position {
    font-size: 0.7rem;
    padding-left: 0.2rem;
  }
  body.game-livefield-active .lineup-drop-zone .lineup-player-chip {
    padding: 0.15rem 0.35rem;
    gap: 0.15rem;
    font-size: 0.7rem;
  }
  body.game-livefield-active .lineup-drop-zone .lpc-stats {
    display: none !important;
  }

  /* Rescale drop zones on mobile for better spacing */
  body.game-livefield-active .lineup-drop-zone {
    width: 65px;
    height: 50px;
    margin-left: -32.5px;
    margin-top: -25px;
  }
}

/* ═══════════════════════════════════════════════════════
   PUBLIC CLUB WEBSITE — Marketing-focused presentation
   Uses the same design tokens but with spacious layout
   ═══════════════════════════════════════════════════════ */

/* ── Body ─────────────────────────────────────────────── */
.pub-body {
  background: var(--dark-bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ───────────────────────────────────────── */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.pub-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.5rem clamp(1rem, 2vw, 1.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1.25rem;
}
.pub-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  min-width: 0;
  margin-right: 0.5rem;
}
.pub-nav-logo {
  height: 36px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
}
.pub-nav-name {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 440px;
  letter-spacing: -0.01em;
}
.pub-nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.pub-nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  height: 36px;
  box-sizing: border-box;
}
.pub-nav-link:hover, .pub-nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.pub-nav-link.active {
  color: var(--gold);
}
.pub-nav-cta {
  margin-left: 0.35rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 36px;
}
.pub-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem;
  flex-shrink: 0;
}

/* Intermediate screen compaction (1121px - 1280px) */
@media (min-width: 1121px) and (max-width: 1280px) {
  .pub-nav-inner {
    padding: 0.5rem 1rem;
    gap: 0.75rem;
  }
  .pub-nav-brand {
    margin-right: 0.25rem;
  }
  .pub-nav-name {
    font-size: 0.98rem;
    max-width: 320px;
  }
  .pub-nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
  }
  .pub-nav-cta {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
  }
}

/* ── Nav Dropdown ─────────────────────────────────────── */
.pub-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.pub-nav-dropdown-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.pub-nav-chevron {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
  pointer-events: none;
}
.pub-nav-dropdown.open .pub-nav-chevron {
  transform: rotate(180deg);
  color: var(--gold);
}
.pub-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 175px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem 0;
  z-index: 300;
}
/* Invisible hover bridge */
.pub-nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
@media (min-width: 993px) {
  .pub-nav-dropdown:hover .pub-nav-dropdown-menu,
  .pub-nav-dropdown:focus-within .pub-nav-dropdown-menu {
    display: block;
  }
}
.pub-nav-dropdown.open .pub-nav-dropdown-menu {
  display: block;
}
.pub-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.pub-nav-dropdown-item .material-symbols-outlined {
  font-size: 18px;
  opacity: 0.85;
}
.pub-nav-dropdown-item:hover {
  background: rgba(var(--secondary-rgb), 0.08);
  color: var(--text-bright);
}
.pub-nav-dropdown-item.active {
  color: var(--gold);
  font-weight: 700;
  background: var(--gold-glow, rgba(245, 158, 11, 0.12));
}
.pub-nav-dropdown-item.active .material-symbols-outlined {
  color: var(--gold);
  opacity: 1;
}

/* ── Hero Section (Compact Horizontal) ────────────────── */
.pub-hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: #080d1a;
  padding: 4.5rem 2rem 3.5rem;
}
.pub-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: pubOrbFloat 10s ease-in-out infinite alternate;
}
.pub-hero-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--navy, #3b82f6);
  top: -150px;
  left: -150px;
}
.pub-hero-orb-2 {
  width: 450px;
  height: 450px;
  background: var(--gold, #8b5cf6);
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}
@keyframes pubOrbFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(50px, 35px) scale(1.15); }
}
.pub-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 0;
  text-align: left;
}
.pub-hero__left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}
.pub-hero-logo {
  width: 80px;
  height: auto;
  border-radius: 16px;
  margin-bottom: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.pub-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 900;
  color: #e8edf5;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}
.pub-hero-subtitle {
  font-size: 0.95rem;
  color: #8895b3;
  line-height: 1.5;
  margin: 0;
  max-width: 420px;
}
.pub-hero__right {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-shrink: 0;
  align-items: flex-end;
}
.pub-hero__right .btn { min-width: 180px; justify-content: center; }
.pub-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.pub-hero-actions .btn-lg {
  padding: 0.875rem 2.2rem;
  font-size: 1.05rem;
}
.pub-hero__scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold, #F0A500);
  text-decoration: none;
  margin-top: 0.15rem;
  transition: color 0.2s ease;
}
.pub-hero__scroll-link:hover { color: #e8edf5; }
.pub-hero__scroll-link .material-symbols-outlined { font-size: 16px; }

/* ── Container & Sections ─────────────────────────────── */
.pub-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.pub-section {
  padding: 4rem 0;
}
.pub-section-alt {
  background: var(--surface);
}
.pub-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 1rem;
}
.pub-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  background: var(--gold);
  border-radius: 4px;
}

/* ── Page Header ──────────────────────────────────────── */
.pub-page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2rem;
  text-align: center;
}
.pub-page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.pub-page-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ── Upcoming Games Cards (Home) ──────────────────────── */
.pub-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.pub-game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: all var(--transition);
}
.pub-game-card:hover {
  border-color: rgba(var(--secondary-rgb), 0.3);
  box-shadow: 0 4px 20px rgba(var(--secondary-rgb), 0.08);
  transform: translateY(-2px);
}
.pub-game-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}
.pub-game-day {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.pub-game-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.pub-game-info {
  flex: 1;
}
.pub-game-team {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.pub-game-title {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}
.pub-game-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ── Weekly Schedule Grid (Home) ──────────────────────── */
.pub-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.pub-schedule-card {
  background: var(--card, rgba(20, 20, 25, 0.5));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 140px;
  display: flex;
  flex-direction: column;
}
.pub-schedule-card:hover {
  border-color: rgba(var(--secondary-rgb), 0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.pub-schedule-card--active {
  border-color: rgba(var(--secondary-rgb), 0.3);
}
.pub-schedule-day {
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.pub-schedule-body {
  padding: 0.65rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.pub-schedule-subheading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold, #F0A500);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.pub-schedule-subheading .material-symbols-outlined { font-size: 13px; }
.pub-schedule-entries {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pub-schedule-entry {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.pub-schedule-entry__label { font-weight: 600; font-size: 0.78rem; }
.pub-schedule-entry__time { font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.pub-schedule-empty {
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.6;
  font-style: italic;
  padding: 0.25rem 0;
}
.pub-schedule-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.pub-schedule-season-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(var(--secondary-rgb), 0.12);
  color: var(--gold, #F0A500);
  border: 1px solid rgba(var(--secondary-rgb), 0.2);
}

/* ── Fixtures List ────────────────────────────────────── */
.pub-fixture-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pub-fixture-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: all var(--transition);
  cursor: pointer;
}
.pub-fixture-row:hover {
  border-color: rgba(var(--secondary-rgb), 0.35);
  background: rgba(var(--secondary-rgb), 0.04);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.pub-fixture-row.past {
  opacity: 0.65;
}
.pub-fixture-row.past:hover {
  opacity: 1;
}
.pub-fixture-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.pub-fixture-team-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.pub-fixture-detail {
  flex: 1;
}
.pub-fixture-title {
  font-weight: 700;
  color: var(--text);
}
.pub-fixture-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
  flex-wrap: wrap;
}
.pub-fixture-team-name {
  font-weight: 600;
}

/* ── History Timeline ─────────────────────────────────── */
.pub-timeline {
  position: relative;
  padding-left: 2.5rem;
}
.pub-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border);
  border-radius: 3px;
}
.pub-timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.pub-timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--dark-bg);
  z-index: 1;
}
.pub-timeline-year {
  position: absolute;
  left: 2rem;
  top: -0.1rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.pub-timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-left: 3.5rem;
  transition: all var(--transition);
}
.pub-timeline-card:hover {
  border-color: rgba(var(--secondary-rgb), 0.2);
}
.pub-timeline-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.pub-timeline-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.pub-timeline-content {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Committee Grid ───────────────────────────────────── */
.pub-committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.pub-committee-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
}
.pub-committee-card:hover {
  border-color: rgba(var(--secondary-rgb), 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.pub-committee-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 3px solid var(--border);
}
.pub-committee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pub-committee-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #e8edf5;
  font-size: 1.8rem;
  font-weight: 800;
}
.pub-committee-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.pub-committee-role {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.pub-contact-btn {
  font-size: 0.8rem !important;
}

/* ── Play for Us Form ─────────────────────────────────── */
.pub-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.pub-form-group {
  margin-bottom: 1.25rem;
}
.pub-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.pub-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}
.pub-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), 0.1);
}
.pub-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pub-form-error {
  color: #ef4444;
  font-size: 0.78rem;
  margin-top: 0.3rem;
}
/* ── Public Page Header ───────────────────────────────── */
.pub-page-header {
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
  position: relative;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--primary-rgb, 99, 102, 241), 0.12) 0%, transparent 80%), var(--surface, #111827);
  background-size: cover;
  background-position: center;
  text-align: left;
}
.pub-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.pub-page-title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 900;
  color: var(--text-bright, #fff);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}
.pub-page-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted, #94a3b8);
  max-width: 650px;
  line-height: 1.5;
  margin: 0;
}

/* ── Outer Story Feed Carousel & Magazine Cards ── */
.story-feed-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.story-feed-carousel {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.5rem 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
}
.story-feed-carousel::-webkit-scrollbar {
  height: 6px;
}
.story-feed-carousel::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 999px;
}

/* Magazine-Width Card (~540px desktop, ~90vw mobile) */
.story-feed-card {
  flex: 0 0 clamp(320px, 90vw, 540px);
  scroll-snap-align: start;
  background: var(--card-bg, #18202f);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.09));
  border-radius: var(--radius, 14px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.story-feed-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

/* Card Author & Date Header */
.story-card-header {
  padding: 1.25rem 1.25rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.story-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #6366f1), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 0.95rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.story-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-author-name {
  font-weight: 700;
  color: var(--text-bright, #fff);
  font-size: 0.95rem;
}
.story-date {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 1px;
}

/* Story Title */
.story-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-bright, #fff);
  padding: 0 1.25rem 0.75rem;
  line-height: 1.3;
  margin: 0;
}

/* Story Caption Text */
.story-caption-wrap {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text, #cbd5e1);
}
.story-caption-text {
  position: relative;
  word-break: break-word;
}
.story-caption-text.collapsed {
  max-height: 5.2em;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.story-expand-btn {
  background: none;
  border: none;
  color: var(--gold, #f59e0b);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0 0;
  margin-top: 0.25rem;
}
.story-expand-btn:hover {
  text-decoration: underline;
}

/* ── Uncropped Media Presentation ── */
.post-media-box {
  width: 100%;
  background: #080c14;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.post-media-box img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

/* ── Inner Multi-Image Photo Slider ── */
.post-slider-container {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.post-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  min-width: 0;
}
.post-slider-track::-webkit-scrollbar {
  display: none;
}
.post-slider-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080c14;
  overflow: hidden;
}
.post-slider-slide img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.post-slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s;
}
.post-slider-nav-btn:hover {
  background: var(--primary, #6366f1);
  transform: translateY(-50%) scale(1.08);
}
.post-slider-nav-btn.prev { left: 10px; }
.post-slider-nav-btn.next { right: 10px; }
.post-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 15;
  pointer-events: none;
}
.post-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}
.post-slider-dot.active {
  background: var(--gold, #f59e0b);
  width: 22px;
  border-radius: 99px;
}

/* ── Linked Events / Match Cards ── */
.story-match-cards {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.story-match-link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 8px);
  padding: 0.85rem 1rem;
  text-decoration: none !important;
  color: var(--text, #e2e8f0) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.15s ease;
}
.story-match-link:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateX(2px);
  color: #fff !important;
}
.story-match-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.story-match-team-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}
.story-match-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright, #fff);
  margin-top: 3px;
}
.story-match-score-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold, #f59e0b);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

/* ── Desktop Outer Carousel Chevrons ── */
.story-feed-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition: all 0.15s ease;
}
.story-feed-chevron:hover {
  background: var(--primary, #6366f1);
  border-color: var(--primary, #6366f1);
}
.story-feed-chevron.left { left: -22px; }
.story-feed-chevron.right { right: -22px; }

@media (max-width: 768px) {
  .story-feed-chevron { display: none; }
  .story-feed-card { flex: 0 0 90vw; }
  .post-slider-nav-btn { display: none; }
}

/* ── Fixtures Team Filter Overflow UX ── */
.team-filter-wrapper {
  position: relative;
  margin-top: 1.25rem;
  padding: 0 35px;
}
.team-filter-scroll-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
  -webkit-overflow-scrolling: touch;
}
.team-filter-scroll-container::-webkit-scrollbar {
  height: 4px;
}
.team-filter-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 99px;
}
.team-filter-wrapper::before,
.team-filter-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35px;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease;
}
.team-filter-wrapper::before {
  left: 35px;
  background: linear-gradient(to right, var(--surface, #111827) 10%, transparent);
  opacity: 0;
}
.team-filter-wrapper.scrolled-left::before {
  opacity: 1;
}
.team-filter-wrapper::after {
  right: 35px;
  background: linear-gradient(to left, var(--surface, #111827) 10%, transparent);
  opacity: 1;
}
.team-filter-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid var(--border);
  color: var(--text-bright, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.15s ease;
}
.team-filter-chevron:hover {
  background: var(--primary, #6366f1);
  border-color: var(--primary, #6366f1);
}
.team-filter-chevron.left { left: 0; }
.team-filter-chevron.right { right: 0; }

/* ── Unified Cards & Callouts ── */
.pub-card-unified {
  background: var(--card-bg, #18202f);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}
.pub-card-unified:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.pub-bottom-cta-card {
  margin-top: 3.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius, 12px);
  padding: 2.75rem 2rem;
  text-align: center;
}

/* ── About Cards Grid ─────────────────────────────────── */
.pub-about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.pub-about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.pub-about-card:hover {
  border-color: rgba(var(--secondary-rgb), 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}
.pub-about-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.pub-about-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--secondary-rgb), 0.12);
  border: 1px solid rgba(var(--secondary-rgb), 0.25);
  color: var(--gold, #F0A500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pub-about-icon .material-symbols-outlined {
  font-size: 24px;
}
.pub-about-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.pub-about-card-body {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── Ground & Map Section ─────────────────────────────── */
.pub-section-mt {
  margin-top: 3rem;
}
.pub-ground-section {
  width: 100%;
}
.pub-ground-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: stretch;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.pub-ground-details {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.pub-ground-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(var(--secondary-rgb), 0.12);
  border: 1px solid rgba(var(--secondary-rgb), 0.25);
  color: var(--gold, #F0A500);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}
.pub-ground-badge .material-symbols-outlined {
  font-size: 16px;
}
.pub-ground-name {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 900;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.pub-ground-address {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}
.pub-ground-actions {
  margin-top: 0.75rem;
}
.pub-map-container {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: rgba(0, 0, 0, 0.2);
}
.pub-map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
}

@media (max-width: 860px) {
  .pub-ground-card {
    grid-template-columns: 1fr;
  }
  .pub-map-container iframe {
    height: 280px;
  }
}

/* ── Empty State ──────────────────────────────────────── */
.pub-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1rem;
}

/* ── Messages ─────────────────────────────────────────── */
.pub-messages {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
}

/* ── Public Merchandise Shop ──────────────────────────── */
.pub-shop-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  white-space: nowrap;
  height: 42px;
  border-radius: 9999px;
  padding: 0.6rem 1.35rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.pub-shop-notice {
  background: rgba(30, 58, 138, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.pub-shop-notice-icon {
  color: #60a5fa;
  font-size: 28px;
  flex-shrink: 0;
}
.pub-shop-notice-text {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.55;
}
.pub-shop-notice-text strong {
  color: #ffffff;
  font-weight: 700;
}

.pub-shop-empty {
  background: var(--card, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 4rem 2rem;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}
.pub-shop-empty-icon {
  font-size: 48px;
  color: var(--gold, #f59e0b);
  margin-bottom: 1rem;
  display: inline-block;
}
.pub-shop-empty-title {
  color: var(--text, #ffffff);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
}
.pub-shop-empty-desc {
  color: var(--muted, #94a3b8);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

.pub-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}
.pub-product-card {
  background: var(--card, rgba(30, 41, 59, 0.5));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.pub-product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--secondary-rgb, 245, 158, 11), 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}
.pub-product-image-box {
  height: 240px;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.pub-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pub-product-fallback-icon {
  font-size: 64px;
  color: rgba(255, 255, 255, 0.2);
}
.pub-product-badge-wrap {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
.pub-product-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pub-product-badge.badge-blue {
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
}
.pub-product-badge.badge-green {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
}
.pub-product-badge.badge-amber {
  background: rgba(245, 158, 11, 0.95);
  color: #000000;
}
.pub-product-badge.badge-red {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
}
.pub-product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.pub-product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.pub-product-title {
  color: var(--text, #ffffff);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.pub-product-price {
  color: var(--gold, #f59e0b);
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
}
.pub-product-desc {
  color: var(--muted, #94a3b8);
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 0 1rem 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pub-product-variant-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #ffffff);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.2));
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  height: 42px;
}
.pub-product-variant-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Modal */
.pub-shop-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pub-shop-modal {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}
.pub-shop-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}
.pub-shop-modal-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}
.pub-shop-modal-desc {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.pub-shop-modal-label {
  display: block;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.pub-shop-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-height: 240px;
  overflow-y: auto;
}
.variant-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.variant-option-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Cart Drawer */
.pub-cart-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  z-index: 10000;
}
.pub-cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}
.pub-cart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pub-cart-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.pub-cart-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}
.pub-cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}
.cart-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #94a3b8;
}
.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cart-item-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-item-sub {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 2px;
}
.cart-qty-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}
.cart-qty-pill button {
  background: none;
  border: none;
  color: #ffffff;
  padding: 2px 7px;
  cursor: pointer;
}
.cart-qty-pill span {
  color: #ffffff;
  font-size: 0.8rem;
  padding: 0 4px;
  font-weight: 600;
}
.cart-item-price {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 50px;
  text-align: right;
}
.pub-cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.95);
}
.pub-cart-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.pub-cart-fulfillment-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #ffffff;
  cursor: pointer;
  border: 1px solid transparent;
}
.pub-cart-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: #ffffff;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}
.pub-cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}
.pub-cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Footer ───────────────────────────────────────────── */
.pub-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.pub-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.pub-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.pub-footer-logo {
  height: 28px;
  width: auto;
  border-radius: 6px;
}
.pub-footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.pub-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
}
.pub-footer-links a:hover {
  color: var(--gold);
}
.pub-footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}
.pub-footer-copy a {
  color: var(--gold);
  text-decoration: none;
}

/* ── Public site responsive ───────────────────────────── */
@keyframes pubNavSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
  .pub-nav-toggle { display: block; }
  .pub-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1rem 1.25rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  .pub-nav-links.open { display: flex; }
  .pub-nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
  }
  .pub-nav-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
  }
  .pub-nav-dropdown-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
  }
  .pub-nav-chevron {
    font-size: 20px;
    margin-left: auto;
  }
  .pub-nav-dropdown-menu {
    display: none;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0.35rem 0 0.5rem 1rem;
    margin-left: 0.85rem;
    border-left: 2px solid rgba(245, 158, 11, 0.3);
    flex-direction: column;
    gap: 2px;
  }
  .pub-nav-dropdown.open .pub-nav-dropdown-menu {
    display: flex;
    animation: pubNavSlideDown 0.2s ease-out;
  }
  .pub-nav-dropdown-item {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    min-height: 40px;
  }
  .pub-nav-cta { width: 100%; text-align: center; margin-left: 0; margin-top: 0.5rem; }
  .pub-theme-pill {
    align-self: flex-start;
    margin: 0.35rem 0 0.5rem 0;
  }
}

@media (max-width: 992px) {
  .pub-hero { padding: 4rem 1.25rem 2.5rem; }
  .pub-hero-content { flex-direction: column; text-align: center; gap: 1.5rem; }
  .pub-hero__left { flex-direction: column; align-items: center; gap: 1rem; }
  .pub-hero__left .pub-hero__text { text-align: center; }
  .pub-hero-subtitle { margin: 0 auto; }
  .pub-hero__right { align-items: center; width: 100%; }
  .pub-hero__right .btn { width: 100%; }
  .pub-hero-title { font-size: clamp(1.5rem, 8vw, 2.2rem); }
  .pub-section { padding: 2.5rem 0; }
  .pub-form-row { grid-template-columns: 1fr; }
  .pub-timeline { padding-left: 1.5rem; }
  .pub-timeline-card { margin-left: 2rem; }
  .pub-committee-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .pub-schedule-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .pub-nav-inner {
    min-height: 60px;
    padding: 0.4rem 1rem;
    gap: 0.5rem;
  }
  .pub-nav-brand {
    gap: 0.6rem;
    margin-right: 0.25rem;
  }
  .pub-nav-logo {
    height: 32px;
  }
  .pub-nav-name {
    font-size: 0.95rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    max-width: 240px;
  }
}

@media (max-width: 420px) {
  .pub-nav-name {
    font-size: 0.88rem;
    max-width: 180px;
  }
}

@media (max-width: 1100px) {
  .pub-schedule-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .pub-schedule-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------
   NEWS FEED
   ------------------------------------------------------- */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.news-avatar, .news-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.news-avatar-placeholder {
  background: var(--gold);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.news-meta {
  display: flex;
  flex-direction: column;
}

.news-author {
  font-weight: 600;
  color: var(--text);
}

.news-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.news-title {
  padding: 0 1rem 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.news-caption {
  padding: 0 1rem 1rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.news-video iframe {
  border: none;
}

/* Horizontal scrollable carousel */
.news-carousel-container {
  position: relative;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev-btn {
  left: 8px;
}

.carousel-btn.next-btn {
  right: 8px;
}

@media (max-width: 768px) {
  .carousel-btn {
    display: none;
  }
}

.news-carousel {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.news-carousel::-webkit-scrollbar {
  display: none;
}

.news-carousel-inner {
  display: flex;
}

.news-image {
  width: 100%;
  flex: 0 0 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  scroll-snap-align: center;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

.news-match-card {
  display: flex;
  flex-direction: column;
  margin: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  background: var(--background);
  transition: all var(--transition);
}

.news-match-card:hover {
  border-color: var(--gold);
  background: rgba(var(--secondary-rgb), 0.05);
}

.nmc-header {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nmc-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
}

.nmc-title {
  font-weight: 700;
}

.nmc-score, .nmc-time {
  font-weight: 600;
  color: var(--gold);
}

/* ═══════════════════════════════════════════════════════
   PLAYER STATS & BADGES
   ═══════════════════════════════════════════════════════ */

/* Stats cards row */
.stats-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Badge grid */
.badge-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Base badge style */
.player-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-align: center;
  min-width: 90px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.player-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.player-badge-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.player-badge-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.player-badge-year {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}

/* ── Milestone badges ── */
.milestone-badge-50 {
  border-color: #CD7F32;
  background: linear-gradient(135deg, rgba(205,127,50,0.08), rgba(205,127,50,0.02));
}
.milestone-badge-50 .player-badge-icon { color: #CD7F32; }
.milestone-badge-50 .player-badge-label { color: #CD7F32; }

.milestone-badge-100 {
  border-color: #C0C0C0;
  background: linear-gradient(135deg, rgba(192,192,192,0.12), rgba(192,192,192,0.03));
}
.milestone-badge-100 .player-badge-icon { color: #B0B0B0; }
.milestone-badge-100 .player-badge-label { color: #B0B0B0; }

.milestone-badge-150 {
  border-color: #C0C0C0;
  background: linear-gradient(135deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05));
  box-shadow: 0 0 8px rgba(192,192,192,0.15);
}
.milestone-badge-150 .player-badge-icon { color: #A8A8A8; }
.milestone-badge-150 .player-badge-label { color: #A8A8A8; }

.milestone-badge-200 {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(240,165,0,0.12), rgba(240,165,0,0.03));
}
.milestone-badge-200 .player-badge-icon { color: #8b5cf6; }
.milestone-badge-200 .player-badge-label { color: #8b5cf6; }

.milestone-badge-250 {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(240,165,0,0.18), rgba(240,165,0,0.06));
  box-shadow: 0 0 12px rgba(240,165,0,0.15);
  animation: badge-shimmer 3s ease-in-out infinite;
}
.milestone-badge-250 .player-badge-icon { color: #8b5cf6; }
.milestone-badge-250 .player-badge-label { color: #8b5cf6; }

.milestone-badge-300 {
  border-color: #E5E4E2;
  background: linear-gradient(135deg, rgba(229,228,226,0.15), rgba(184,115,51,0.08), rgba(229,228,226,0.15));
  box-shadow: 0 0 16px rgba(229,228,226,0.2), 0 0 4px rgba(240,165,0,0.15);
  animation: badge-shimmer 2.5s ease-in-out infinite;
}
.milestone-badge-300 .player-badge-icon {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.milestone-badge-300 .player-badge-label {
  background: linear-gradient(135deg, #E5E4E2, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes badge-shimmer {
  0%, 100% { box-shadow: 0 0 12px rgba(240,165,0,0.10); }
  50% { box-shadow: 0 0 20px rgba(240,165,0,0.25); }
}

/* ── Award badges by hierarchy ── */
.award-badge-1 {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(240,165,0,0.15), rgba(240,165,0,0.04));
  animation: badge-shimmer 3s ease-in-out infinite;
}
.award-badge-1 .player-badge-label { color: #8b5cf6; }

.award-badge-2 {
  border-color: #C0C0C0;
  background: linear-gradient(135deg, rgba(192,192,192,0.12), rgba(192,192,192,0.03));
}
.award-badge-2 .player-badge-label { color: #B0B0B0; }

.award-badge-3 {
  border-color: #CD7F32;
  background: linear-gradient(135deg, rgba(205,127,50,0.08), rgba(205,127,50,0.02));
}
.award-badge-3 .player-badge-label { color: #CD7F32; }

/* ── Premiership badge ── */
.premiership-badge {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(240,165,0,0.18), rgba(255,215,0,0.08));
  box-shadow: 0 0 12px rgba(240,165,0,0.15);
  animation: badge-shimmer 3s ease-in-out infinite;
}
.premiership-badge .player-badge-icon {
  font-size: 1.8rem;
}
.premiership-badge .player-badge-label {
  color: #8b5cf6;
  font-weight: 800;
}

/* ── Public player directory ── */
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}
.player-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}
.player-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.player-card-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface);
}
.player-card-initials {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface);
}
.player-card-body {
  padding: 0.75rem;
}
.player-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.player-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ── Public player profile hero ── */
.player-profile-hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.player-profile-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.player-profile-initials {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface);
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.player-profile-info h1 {
  font-size: 1.8rem;
  margin: 0 0 0.25rem;
}
.player-profile-info .player-meta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.player-profile-sponsor {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.player-profile-sponsor img {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
}
.player-profile-sponsor-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 600px) {
  .player-profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .player-profile-info .player-meta-row {
    justify-content: center;
  }
  .stats-cards {
    flex-direction: column;
  }
}

/* ─── Help Guide ───────────────────────────────────────────────────────────── */
.help-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.help-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}
.help-search-wrapper {
  position: relative;
  margin-bottom: 2rem;
}
.help-search-wrapper .material-symbols-outlined {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.help-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.help-section:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.help-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: var(--surface);
  user-select: none;
  transition: background 0.15s;
}
.help-section-header:hover {
  background: var(--surface-hover, var(--surface));
}
.help-section-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.help-section-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  flex: 1;
}
.help-section-chevron {
  color: var(--muted);
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}
.help-section.open .help-section-chevron {
  transform: rotate(180deg);
}
.help-section-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.help-section.open .help-section-body {
  display: block;
}
.help-section-body h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.5rem;
}
.help-section-body h4:first-child {
  margin-top: 1rem;
}
.help-section-body p,
.help-section-body li {
  font-size: 0.875rem;
  color: var(--text-secondary, var(--muted));
  line-height: 1.65;
}
.help-section-body ul,
.help-section-body ol {
  padding-left: 1.25rem;
  margin: 0.35rem 0;
}
.help-section-body li {
  margin-bottom: 0.3rem;
}
.help-section-body code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--primary);
}

.help-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.help-badge-all { background: #e0f2fe; color: #0369a1; }
.help-badge-guardian { background: #fce7f3; color: #be185d; }
.help-badge-coach { background: #dcfce7; color: #15803d; }
.help-badge-committee { background: #fef3c7; color: #b45309; }
.help-badge-owner { background: #ede9fe; color: #7c3aed; }

[data-theme="dark"] .help-badge-all { background: #0c4a6e33; color: #7dd3fc; }
[data-theme="dark"] .help-badge-guardian { background: #831843aa; color: #f9a8d4; }
[data-theme="dark"] .help-badge-coach { background: #14532daa; color: #86efac; }
[data-theme="dark"] .help-badge-committee { background: #78350faa; color: #fcd34d; }
[data-theme="dark"] .help-badge-owner { background: #4c1d9533; color: #c4b5fd; }

.help-hidden {
  display: none !important;
}

.help-intro {
  color: var(--text-secondary, var(--muted));
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.help-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.help-no-results .material-symbols-outlined {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}


/* ================= REDESIGN GAME VIEW STYLES ================= */
.event-header-3col {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 900px) {
  .event-header-3col { grid-template-columns: 1fr; }
}
.header-stat-card {
  background: rgba(20, 20, 25, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: default;
}
.header-stat-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}
[data-theme="light"] .header-stat-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .header-stat-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .header-stat-nav button,
[data-theme="light"] .header-stat-nav a {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}
[data-theme="light"] .header-stat-nav button:hover,
[data-theme="light"] .header-stat-nav a:hover {
  background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .name-display-select {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .lineup-player-chip.int-card {
  background: rgba(0, 0, 0, 0.03);
}
a.header-stat-card,
.matchday-cta-card {
  cursor: pointer;
}
.header-stat-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.header-stat-label .material-symbols-outlined { font-size: 18px; }
.header-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.header-stat-sub {
  font-size: 0.82rem;
  color: var(--muted);
}
.header-stat-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}
.header-stat-nav button, .header-stat-nav a {
  flex: 1;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  text-decoration: none;
}
.header-stat-nav button:hover, .header-stat-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.event-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1rem;
}
.event-date-main {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.event-time { font-size: 0.95rem; color: var(--text-secondary); }
.event-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.event-location .material-symbols-outlined { font-size: 16px; }
.event-opponent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 0.25rem;
}
.event-opponent-badge .material-symbols-outlined { font-size: 16px; }
.event-league {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.matchday-cta-card { cursor: pointer; text-decoration: none; display: flex; color: inherit; }
.matchday-cta-card:hover { border-color: rgba(139, 92, 246, 0.3); opacity: 1; }
.matchday-cta-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}
.matchday-cta-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.matchday-cta-btn .material-symbols-outlined { font-size: 18px; }
.rsvp-scroll-container {
  overflow-x: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.rsvp-scroll-container::-webkit-scrollbar {
  height: 4px;
}
.rsvp-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}
.rsvp-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.scroll-fade-bottom {
  display: none;
}
.volunteer-scroll-container {
  /* No scroll — show all rows */
}
.name-display-select {
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}
.name-display-select:focus { border-color: var(--gold); }
.name-display-select option { background: var(--surface); color: var(--text); }
.lineup-player-chip.int-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  min-width: 160px;
  cursor: pointer;
  transition: all 0.2s;
  justify-content: flex-start;
}
.lineup-player-chip.int-card .lpc-jersey {
  font-weight: 800;
  color: var(--gold);
  font-size: 0.85rem;
  min-width: 24px;
}
.lineup-player-chip.int-card .lpc-name-wrap {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  flex: 1;
}
.lineup-player-chip.int-card .lpc-position {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: auto;
  flex-shrink: 0;
}

/* B&F Voter Section */
.bf-voter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.bf-voter-row:last-child { border-bottom: none; }
.bf-voter-name {
  font-weight: 500;
  flex: 1;
}
.bf-assign-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}
.bf-assign-form select {
  flex: 1;
}

/* B&F Votes Page */
.bf-vote-card {
  border: 1px solid var(--border);
}
.bf-vote-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.bf-vote-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.bf-vote-label {
  min-width: 100px;
  font-weight: 600;
  font-size: 0.9rem;
}
.bf-submitted-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.bf-vote-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.bf-vote-display:last-child { border-bottom: none; }
.bf-vote-value {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--secondary-rgb), 0.2);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* B&F Tally Table */
.bf-cell-high {
  background: rgba(72, 187, 120, 0.15);
  color: #68d391;
  font-weight: 600;
}
.bf-cell-mid {
  background: rgba(var(--secondary-rgb), 0.1);
  color: var(--gold);
  font-weight: 500;
}
.bf-cell-low {
  color: var(--muted);
}
.sidebar-badge {
  background: var(--gold);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════
   MATCH DAY IMPROVEMENTS — Timer Stepper, Locks, Opp Score,
   Multi-device, Player Stats, Quarter-End Review
   ═══════════════════════════════════════════════════════════ */

/* Timer Duration Stepper */
.timer-duration-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.15rem 0.3rem;
}
.stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.stepper-btn:hover {
  background: var(--gold);
  color: var(--bg);
}
.stepper-input {
  width: 42px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper-unit {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

/* Quarter Lock Badges */
.quarter-lock-badge {
  font-size: 0.7rem;
  display: none;
}
.quarter-btn {
  position: relative;
}

/* Timer Flash Animation */
@keyframes timerFlash {
  0%, 100% { background: transparent; }
  20% { background: rgba(var(--gold-rgb, 212, 175, 55), 0.3); }
  40% { background: transparent; }
  60% { background: rgba(var(--gold-rgb, 212, 175, 55), 0.3); }
  80% { background: transparent; }
}
.timer-flash {
  animation: timerFlash 2s ease-out;
  border-radius: var(--radius);
}

/* ══════════════════════════════════════════════════════
   AFL MATCH CENTRE HERO SCOREBOARD
   ══════════════════════════════════════════════════════ */
.afl-match-centre {
  background: linear-gradient(135deg, rgba(var(--primary-rgb, 13, 31, 61), 0.5) 0%, rgba(10, 15, 25, 0.95) 50%, rgba(var(--primary-rgb, 13, 31, 61), 0.3) 100%), #0b0f19;
  border: 1px solid rgba(var(--secondary-rgb, 212, 175, 55), 0.35);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.afl-match-centre::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle at 50% 30%, rgba(var(--primary-rgb, 37, 99, 235), 0.15), transparent 60%);
  pointer-events: none;
}

.afl-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--muted, #8da2c0);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.afl-top-bar .match-brand {
  color: var(--secondary, var(--gold, #d4af37));
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
}

.afl-scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

/* Team Side */
.afl-team-side {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.afl-team-side.home {
  justify-content: flex-start;
  text-align: left;
}

.afl-team-side.away {
  justify-content: flex-start;
  flex-direction: row-reverse;
  text-align: right;
}

.afl-team-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--surface, #111927);
  border: 2px solid var(--secondary, var(--gold, #d4af37));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.afl-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.afl-team-logo-placeholder {
  font-size: 32px;
  color: var(--secondary, var(--gold, #d4af37));
}

.afl-team-info {
  display: flex;
  flex-direction: column;
}

.afl-team-side.away .afl-team-info {
  align-items: flex-end;
}

.afl-team-name {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 0.15rem;
  line-height: 1.15;
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.afl-team-subtitle {
  font-size: 0.75rem;
  color: var(--muted, #8da2c0);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.afl-score-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.afl-team-side.away .afl-score-display {
  flex-direction: row-reverse;
}

.afl-score-pts {
  font-family: var(--font-display, inherit);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.afl-team-side.home .afl-score-pts {
  color: var(--secondary, var(--gold, #d4af37));
}

.afl-score-gb {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted, #8da2c0);
  font-family: var(--font-display, inherit);
}

/* Center Timer & State */
.afl-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  min-width: 210px;
  padding: 0 0.75rem;
}

.afl-status-badge {
  background: var(--danger, #ef4444);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.afl-status-badge.live {
  background: #16a34a;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.4);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.afl-timer-clock {
  font-family: var(--font-display, inherit);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1;
}

.afl-margin-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary, var(--gold, #d4af37));
  letter-spacing: 0.02em;
}

.afl-quarter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.afl-q-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted, #8da2c0);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.afl-q-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.afl-q-btn.active {
  background: var(--secondary, var(--gold, #d4af37));
  color: var(--secondary-text, #000000);
  border-color: var(--secondary, var(--gold, #d4af37));
  font-weight: 800;
}

.afl-timer-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.btn-timer {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.btn-timer:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ══════════════════════════════════════════════════════
   1 x 2 QUARTER LIVE SCORING GRID
   ══════════════════════════════════════════════════════ */
.quarter-scoring-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.25rem;
}

.quarter-scoring-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.quarter-scoring-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display, inherit);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold, #d4af37);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quarter-scoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.quarter-team-box {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quarter-team-box.our-team {
  border-top: 3px solid var(--gold, #d4af37);
}

.quarter-team-box.opp-team {
  border-top: 3px solid var(--muted, #8da2c0);
}

.quarter-team-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quarter-team-name-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary, #ffffff);
}

.quarter-score-tally {
  font-family: var(--font-display, inherit);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold, #d4af37);
}

.quarter-team-box.opp-team .quarter-score-tally {
  color: var(--text-primary, #ffffff);
}

.quarter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-goal {
  background: var(--primary, #2563eb);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  flex: 1.2;
  min-width: 105px;
}
.btn-goal:hover { background: var(--primary-hover, #1d4ed8); }

.btn-behind {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  flex: 1;
  min-width: 95px;
}
.btn-behind:hover { background: rgba(255, 255, 255, 0.18); }

.btn-undo {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted, #8da2c0);
  font-size: 0.76rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}
.btn-undo:hover {
  color: #ffffff;
  border-color: var(--muted, #8da2c0);
}

.btn-end-quarter {
  background: var(--warning, #f59e0b);
  color: #000000;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
}
.btn-end-quarter:hover { background: #d97706; }

.btn-full-time {
  background: var(--success, #22c55e);
  color: #000000;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
}

@media (max-width: 860px) {
  .quarter-scoring-grid {
    grid-template-columns: 1fr;
  }
}

/* Quick Scorer Popover Chips */
.quick-scorer-chip {
  cursor: pointer;
  transition: all var(--transition);
}
.quick-scorer-chip:hover {
  transform: translateY(-1px);
  border-color: var(--gold) !important;
}

/* Session Read-Only Banner */
.session-readonly-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(var(--gold-rgb, 212, 175, 55), 0.12);
  border: 1px solid rgba(var(--gold-rgb, 212, 175, 55), 0.3);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.session-readonly-banner .btn {
  margin-left: auto;
}

/* Quarter-End Review Modal */
.qer-section {
  margin-bottom: 1.25rem;
}
.qer-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.6rem 0;
  color: var(--text);
}
.qer-stepper-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.qer-stepper-row label {
  font-size: 0.85rem;
  color: var(--muted);
  width: 70px;
  flex-shrink: 0;
}
.qer-event-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.qer-event-row:last-child {
  border-bottom: none;
}
.qer-timer {
  font-size: 0.8rem;
  font-family: var(--font-mono, monospace);
  color: var(--muted);
  min-width: 45px;
}
.qer-event-row .form-input-sm {
  flex: 1;
  min-width: 120px;
}
.qer-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Player Stats Table */
.pos-time-chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  margin: 0.1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  font-size: 0.78rem;
  font-family: var(--font-mono, monospace);
  color: var(--text);
  white-space: nowrap;
}
.star-rating {
  display: flex;
  gap: 2px;
  justify-content: center;
}
.star-rating-star {
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--border);
  transition: color 0.15s;
}
.star-rating-star.star-filled {
  color: var(--gold);
}
.star-rating-star:hover {
  color: var(--gold);
}
#playerStatsTable td {
  vertical-align: middle;
}
#playerStatsTable textarea {
  resize: vertical;
}

/* Full Time Button */
#fullTimeBtn {
  animation: pulseGold 2s infinite;
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb, 212, 175, 55), 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(var(--gold-rgb, 212, 175, 55), 0); }
}

/* ══════════════════════════════════════════════════════════ */
/* Tab Component (ca-tab-*)                                  */
/* ══════════════════════════════════════════════════════════ */
.ca-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
}
.ca-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ca-tab-btn:hover { color: var(--text); }
.ca-tab-btn.active {
  color: var(--gold, var(--primary));
  border-bottom-color: var(--gold, var(--primary));
}
.ca-tab-panel { display: none; }
.ca-tab-panel.active { display: block !important; }

/* ══════════════════════════════════════════════════════════ */
/* Segmented Controls & Filter Chips (ca-filter-*)            */
/* ══════════════════════════════════════════════════════════ */
.ca-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ca-segmented-control-wrapper {
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 4px 2px;
}
.ca-segmented-control-wrapper::-webkit-scrollbar {
  display: none;
}

.ca-segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  max-width: 100%;
}

[data-theme="light"] .ca-segmented-control {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ca-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.16s ease-in-out;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
}

.ca-segment:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .ca-segment:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ca-segment.active {
  background: var(--gold, #F0A500);
  color: #0b0f19 !important;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(240, 165, 0, 0.25);
}

.ca-segment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.25rem;
  padding: 0 0.42rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  transition: all 0.16s ease-in-out;
}

[data-theme="light"] .ca-segment-badge {
  background: rgba(0, 0, 0, 0.07);
}

.ca-segment.active .ca-segment-badge {
  background: rgba(0, 0, 0, 0.18);
  color: #000;
}

.ca-segment:not(.active) .ca-segment-badge--highlight {
  background: rgba(240, 165, 0, 0.18);
  color: var(--gold, #F0A500);
  border: 1px solid rgba(240, 165, 0, 0.35);
}

.ca-segment:not(.active) .ca-segment-badge--new {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Secondary Chip Bar (for Type filter) */
.ca-chip-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px 0;
}
.ca-chip-bar::-webkit-scrollbar {
  display: none;
}

.ca-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 0.25rem;
}
.ca-chip-label .material-symbols-outlined {
  font-size: 14px;
}

.ca-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.32rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.ca-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .ca-chip:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.04);
}

.ca-chip.active {
  background: rgba(240, 165, 0, 0.14);
  color: var(--gold, #F0A500);
  border-color: rgba(240, 165, 0, 0.45);
  font-weight: 600;
}

.ca-chip .material-symbols-outlined {
  font-size: 15px;
}

.ca-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.05rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.ca-chip.active .ca-chip-badge {
  background: rgba(240, 165, 0, 0.25);
  color: var(--gold, #F0A500);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .opp-score-card {
    display: none;  /* Mobile uses the toolbar dropdown instead */
  }
  .qer-event-row {
    flex-wrap: wrap;
  }
  .qer-event-row .form-input-sm {
    min-width: 100%;
  }
  .qer-actions {
    flex-direction: column;
  }
  .session-readonly-banner {
    flex-wrap: wrap;
    font-size: 0.82rem;
  }
}

/* =====================================================
   MOBILE RESPONSIVENESS — Global fixes
   ===================================================== */

@media (max-width: 768px) {
  /* ── Content & Page Container ── */
  .content {
    padding: 1rem;
  }

  .page-container {
    padding: 0;
  }

  /* ── Topbar ── */
  .topbar {
    padding: 0.5rem 0.75rem;
    min-height: var(--topbar-height, 60px);
    gap: 0.35rem;
  }

  .topbar-left {
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
  }

  .topbar-club-masthead {
    border-right: none;
    padding-right: 0.25rem;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 1;
  }

  .topbar-club-details {
    min-width: 0;
    flex-shrink: 1;
  }

  .topbar-club-name {
    max-width: min(360px, calc(100vw - 90px));
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-superadmin-club {
    display: none;
  }

  .platform-owner-badge {
    margin-left: 0 !important;
    padding: 0.18rem 0.45rem !important;
    font-size: 0.72rem !important;
    flex-shrink: 0;
  }

  .topbar-title {
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .topbar-actions .btn {
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
  }

  .topbar-actions .btn .material-symbols-outlined {
    font-size: 15px;
  }

  /* Hide button text on mobile, keep icon */
  .topbar-actions .btn .btn-text-mobile-hide {
    display: none;
  }

  /* ── Sidebar Mobile: Locked viewport height with fixed bottom utility dock ── */
  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
    max-height: calc(100vh - var(--topbar-height));
    max-height: calc(100dvh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(-100%);
    z-index: 1100;
    box-shadow: none;
    transition: transform var(--transition, 0.25s ease);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--topbar-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1090;
    backdrop-filter: blur(2px);
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .sidebar-user-container {
    flex-shrink: 0;
  }

  .sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .sidebar-bottom {
    flex-shrink: 0;
    position: relative;
    bottom: auto;
    margin-top: auto;
    background: var(--sb-bottom-bg, #1a1a1a);
    border-top: 1px solid var(--sb-border);
    padding: 0.65rem 0.75rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    z-index: 2;
  }

  [data-theme="light"] .sidebar-bottom {
    background: var(--sb-bottom-bg, #f8fafc);
    border-top-color: var(--sb-border, var(--border));
  }

  .sidebar-utility-dock {
    gap: 0.5rem;
    padding-top: 0.35rem;
  }

  .theme-mode-item {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .sidebar-logout-btn {
    width: 36px;
    height: 36px;
  }

  /* ── Cards ── */
  .card {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  .card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-footer {
    flex-wrap: wrap;
  }

  /* ── Tables — scrollable on mobile ── */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  thead, tbody, tfoot, tr, th, td {
    /* Reset display for scrollable tables only when table is block */
  }

  /* ── Tab bars ── */
  .ca-tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ca-tab-bar::-webkit-scrollbar { display: none; }

  .ca-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── Form grids ── */
  .form-grid,
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr !important;
  }

  .form-grid > *,
  .form-grid-2 > *,
  .form-grid-3 > * {
    grid-column: 1 / -1 !important;
    min-width: 0;
  }

  input[type="date"].form-input,
  input[type="date"].form-control {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* ── Stats grids ── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Acting-as banner ── */
  .acting-as-banner {
    flex-wrap: wrap;
    font-size: 0.78rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  /* ── Wizard ── */
  .wizard-progress {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
  }
  .wizard-step-label {
    font-size: 0.72rem;
  }

  /* ── Misc layout helpers ── */
  .flex-row-wrap {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .training-hero-card {
    padding: 1rem 0.85rem !important;
  }
  .training-hero-body {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .training-readiness-box {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.25rem !important;
    padding: 0.6rem 0.4rem !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
  }
  .training-readiness-box .readiness-divider {
    display: none !important;
  }
  .training-readiness-box .readiness-stat {
    min-width: 0 !important;
    text-align: center !important;
  }
  .training-readiness-box .readiness-val {
    font-size: 1.25rem !important;
    line-height: 1 !important;
  }
  .training-readiness-box .readiness-lbl {
    font-size: 0.62rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 480px) {
  /* ── Topbar at very small widths ── */
  .topbar {
    padding: 0.4rem 0.5rem;
  }

  .topbar-club-crest {
    width: 34px;
    height: 34px;
  }

  .topbar-club-name {
    max-width: min(320px, calc(100vw - 84px));
    font-size: 0.88rem;
  }

  .topbar-title {
    font-size: 0.88rem;
  }

  .topbar-actions .btn {
    font-size: 0.68rem;
    padding: 0.3rem 0.5rem;
  }

  /* Icon-only buttons on very small screens */
  .topbar-actions .btn .btn-text-mobile-hide {
    display: none;
  }

  /* ── Cards ── */
  .card {
    padding: 0.85rem;
  }

  /* ── Content ── */
  .content {
    padding: 0.75rem;
  }

  /* ── Stats grid to single column ── */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* ── Badge in sidebar ── */
  .sidebar-badge {
    font-size: 0.65rem;
    min-width: 16px;
    height: 16px;
  }
}
/* -- Best Players Display ------------------ */
.best-players-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.best-player-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-hover);
  border-radius: 8px;
}
.best-player-rank {
  font-weight: 700;
  color: var(--gold);
  min-width: 1.5rem;
  text-align: center;
}
.best-player-name {
  font-weight: 500;
}

/* ── Quill.js Layout & Theme Overrides ─────────────────────── */
.ql-toolbar.ql-snow {
  background: var(--card);
  border-color: var(--border) !important;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-sizing: border-box;
}
.ql-container.ql-snow {
  border-color: var(--border) !important;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  height: auto !important;
  box-sizing: border-box;
}
.ql-editor {
  background: var(--surface);
  color: var(--text);
  min-height: 140px;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.6;
  box-sizing: border-box;
}
.form-group:has(.ql-container),
.form-group.form-full:has(.ql-container) {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}
.ql-editor.ql-blank::before {
  color: var(--muted) !important;
  font-style: normal !important;
}
.ql-snow .ql-stroke {
  stroke: var(--text-secondary) !important;
}
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
  fill: var(--text-secondary) !important;
}
.ql-snow .ql-picker {
  color: var(--text-secondary) !important;
}
.ql-snow .ql-picker-options {
  background: var(--card) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.ql-snow .ql-picker-label:hover,
.ql-snow .ql-picker-label.ql-active,
.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
  color: var(--gold) !important;
}
.ql-snow .ql-picker-item:hover .ql-stroke,
.ql-snow .ql-picker-item.ql-selected .ql-stroke {
  stroke: var(--gold) !important;
}
.ql-snow button:hover .ql-stroke,
.ql-snow button.ql-active .ql-stroke {
  stroke: var(--gold) !important;
}
.ql-snow button:hover .ql-fill,
.ql-snow button.ql-active .ql-fill {
  fill: var(--gold) !important;
}
.ql-snow a {
  color: var(--navy) !important;
}
.ql-snow .ql-tooltip {
  background: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow);
}
.ql-snow .ql-tooltip input[type=text] {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ── Rich Text Content Renderer ────────────────────────── */
.rich-text-content {
  line-height: 1.7;
  color: var(--text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4 {
  color: var(--text);
  margin: 0.85em 0 0.35em;
  font-weight: 700;
  line-height: 1.3;
}
.rich-text-content h1 { font-size: 1.4rem; }
.rich-text-content h2 { font-size: 1.2rem; }
.rich-text-content h3 { font-size: 1.05rem; }
.rich-text-content h4 { font-size: 0.95rem; }
.rich-text-content p {
  margin: 0 0 0.65rem;
}
.rich-text-content p:last-child {
  margin-bottom: 0;
}
.rich-text-content p:empty,
.rich-text-content p:has(> br:only-child) {
  min-height: 1.25em;
}
.rich-text-content ul,
.rich-text-content ol {
  padding-left: 1.5em;
  margin: 0.3em 0 0.5em;
}
.rich-text-content li {
  margin-bottom: 0.2em;
}
.rich-text-content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rich-text-content a:hover {
  color: var(--gold);
}
.rich-text-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1em;
  color: var(--muted);
  margin: 0.5em 0;
  font-style: italic;
}
.rich-text-content strong,
.rich-text-content b {
  font-weight: 600;
  color: var(--text);
}

/* =====================================================
   UNIFIED MATCH DAY HUB & TRAINING HERO SUITE
   ===================================================== */

/* ─── Training Session Hero Card ─── */
.training-hero-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb, 30, 58, 138), 0.35) 0%, #090d16 50%, rgba(var(--primary-rgb, 30, 58, 138), 0.15) 100%), var(--surface, #111827);
  border: 1px solid rgba(var(--primary-rgb, 30, 58, 138), 0.35);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.training-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle at 50% 30%, rgba(var(--primary-rgb, 30, 58, 138), 0.12), transparent 60%);
  pointer-events: none;
}
.training-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: var(--secondary, #f59e0b);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.training-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--secondary, #f59e0b);
}
.training-hero-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}
.training-main-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.training-team-crest {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--secondary, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}
.training-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}
.training-team-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary, #f59e0b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.training-logistics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #cbd5e1;
}
.training-logistics-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.training-readiness-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(var(--primary-rgb, 255, 255, 255), 0.2);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.readiness-stat { text-align: center; }
.readiness-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.readiness-val.attending { color: var(--success, #22c55e); }
.readiness-val.maybe { color: var(--warning, #f59e0b); }
.readiness-val.unavailable { color: var(--danger, #ef4444); }
.readiness-val.uncommitted { color: var(--text-muted, #94a3b8); }
.readiness-val.drills { color: var(--secondary, #f59e0b); }
.readiness-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}
.readiness-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

/* ─── AFL Match Centre Broadcast Scoreboard (Club Themed) ─── */
.afl-match-centre {
  background: linear-gradient(135deg, rgba(var(--primary-rgb, 10, 25, 47), 0.45) 0%, #070c18 50%, rgba(var(--primary-rgb, 10, 25, 47), 0.25) 100%), #0b0f19;
  border: 1px solid rgba(var(--secondary-rgb, 245, 158, 11), 0.35);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: visible;
  margin-bottom: 1rem;
  width: 100%;
}
.afl-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  position: relative;
  z-index: 5;
}
.afl-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.afl-top-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.afl-marsh-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.afl-marsh-pill.verified {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}
.afl-marsh-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

/* Coach Dropdown */
.coach-actions-wrap { position: relative; }
.btn-coach-menu {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-coach-menu:hover { background: rgba(255, 255, 255, 0.15); }
.coach-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  width: 220px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
  z-index: 50;
}
.coach-dropdown.show { display: block; }
.coach-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 10px;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.coach-dropdown-item:hover { background: #334155; }
.coach-dropdown-item.danger { color: #f87171; }
.coach-dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.15); }

/* Scoreboard Grid */
.afl-scoreboard-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}
.afl-team-side {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.afl-team-side.home { justify-content: flex-start; }
.afl-team-side.away { justify-content: flex-start; flex-direction: row-reverse; }

.afl-team-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--secondary, var(--primary, #f59e0b));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
  overflow: hidden;
}
.afl-team-logo.away-logo {
  border-color: #38bdf8;
  background: #0369a1;
}
.afl-team-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.afl-team-side.away .afl-team-info {
  align-items: flex-end;
  text-align: right;
}
.afl-team-side.away .afl-team-name {
  text-align: right;
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.afl-team-side.away .afl-team-subtitle { text-align: right; }

.afl-team-name {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 260px;
}
.afl-team-subtitle {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
}
.afl-score-display {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.2rem;
}
.afl-team-side.away .afl-score-display { flex-direction: row-reverse; }
.afl-score-pts {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}
.afl-score-gb {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* Center Column */
.afl-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
  min-width: 140px;
}
.afl-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.afl-status-badge.upcoming {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
}
.afl-status-badge.live {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
}
.afl-status-badge.final {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #10b981;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.3); } }

.afl-timer-clock {
  font-size: 1.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1;
  margin: 0.15rem 0;
}
.afl-margin-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.afl-quarter-tabs {
  display: flex;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.35rem;
}
.afl-q-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.afl-q-btn.active { background: var(--secondary, var(--gold)); color: var(--secondary-text, #000); }

.afl-timer-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.btn-timer {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
}
.btn-timer:hover { background: rgba(255, 255, 255, 0.15); }
.btn-timer-end {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.btn-timer-end:hover { background: var(--gold); color: #000; }
.btn-timer-ft {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.btn-timer-ft:hover { background: #10b981; color: #fff; }

/* ─── 4-Phase Stepper Bar ─── */
.phase-stepper-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 1rem;
}
.phase-stepper-wrap::-webkit-scrollbar { display: none; }

.phase-stepper-bar {
  display: flex;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  min-width: 100%;
}
.phase-step-btn {
  flex: 1;
  min-width: 130px;
  background: transparent;
  border: none;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.phase-step-btn:hover { background: var(--surface-hover); color: #fff; }
.phase-step-btn.active {
  background: var(--primary, var(--navy));
  color: var(--primary-text, #ffffff);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb, 30, 58, 138), 0.4);
}
.phase-step-btn.active .phase-badge {
  background: var(--secondary, var(--gold));
  color: var(--secondary-text, #000);
}
.phase-icon-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
}
.phase-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Phase Containers & Panels */
.phase-container,
.phase-content-panel { display: none; animation: fadeIn 0.25s ease; }
.phase-container.active,
.phase-content-panel.active { display: block !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Subnav Pills */
.subnav-pills {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 2px;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.subnav-pills::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.subnav-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
  position: relative;
}
.subnav-pill::before,
.subnav-pill::after {
  display: none !important;
  content: none !important;
}
.subnav-pill:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.subnav-pill.active {
  background: var(--primary, var(--navy));
  color: var(--primary-text, #fff);
  border-color: var(--secondary, #3b82f6);
}

/* Quick Scoring Action Ribbon */
.scoring-quick-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.score-action-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 900;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.score-action-btn:active { transform: scale(0.97); }
.score-action-btn.goal { background: rgba(245, 158, 11, 0.15); border-color: var(--gold); color: #fbbf24; }
.score-action-btn.behind { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; color: #60a5fa; }
.score-action-btn.opp-goal { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); color: #fca5a5; }
.score-action-btn.opp-behind { background: rgba(100, 116, 139, 0.15); border-color: rgba(100, 116, 139, 0.3); color: #cbd5e1; }
.score-action-btn .sub-pts { font-size: 0.65rem; font-weight: 600; opacity: 0.8; }

/* Tactical Pitch & Live Bench */
.live-match-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  align-items: start;
}
.live-field-canvas {
  background: radial-gradient(ellipse at center, #1b4332 0%, #081c15 100%);
  border: 2px solid rgba(45, 106, 79, 0.6);
  border-radius: var(--radius);
  padding: 0.75rem;
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pitch-zone {
  display: flex;
  justify-content: space-around;
  margin: 0.25rem 0;
  gap: 0.35rem;
}
.pitch-slot {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 6px 4px;
  min-width: 68px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.pitch-slot:hover { border-color: var(--gold); background: rgba(0, 0, 0, 0.75); }
.pitch-slot.selected {
  border-color: var(--gold) !important;
  background: rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 0 10px var(--gold);
}
.pitch-slot.dragging { opacity: 0.4; }
.pitch-slot-pos { font-size: 0.62rem; color: var(--gold); font-weight: 900; }

/* Interchange Bench */
.bench-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.player-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.15s;
}
.player-chip:hover { background: rgba(255, 255, 255, 0.08); }
.player-chip.selected {
  border-color: var(--gold) !important;
  background: rgba(245, 158, 11, 0.2) !important;
}

/* Modal Overlays */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open,
.modal-backdrop.show { display: flex; }
.modal-sheet {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  max-width: 440px;
  width: 100%;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  animation: modalPop 0.2s ease;
}
@keyframes modalPop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.modal-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 1rem; }
.tagger-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.tag-player-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  text-align: left;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.tag-player-btn:hover { background: var(--navy); border-color: #60a5fa; }
.tag-count-badge {
  background: var(--gold);
  color: #000;
  font-weight: 900;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ══════════════════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES (<=768px)
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .afl-match-centre { padding: 0.75rem; }
  .afl-top-bar { font-size: 0.7rem; }
  .meta-tags { display: none !important; }

  .afl-scoreboard-grid {
    display: grid !important;
    grid-template-columns: 1fr 115px 1fr !important;
    gap: 0.25rem !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Hide team names & subtitles on mobile phone screens — keep ONLY avatars */
  .afl-team-name, .afl-team-subtitle {
    display: none !important;
  }

  /* Home Team (Left): Avatar on far left, score right of avatar */
  .afl-team-side.home {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    text-align: left !important;
  }
  .afl-team-side.home .afl-score-display {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    line-height: 1 !important;
  }

  /* Away Team (Right): Avatar on far right, score left of avatar */
  .afl-team-side.away {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    text-align: right !important;
  }
  .afl-team-side.away .afl-team-info {
    align-items: flex-end !important;
    text-align: right !important;
  }
  .afl-team-side.away .afl-score-display {
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0 !important;
    line-height: 1 !important;
    text-align: right !important;
  }

  .afl-team-logo {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
  }
  .afl-score-pts {
    font-size: 1.85rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  .afl-score-gb {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    margin-top: 1px !important;
  }

  .afl-center-col {
    min-width: 110px !important;
    max-width: 120px !important;
  }
  .afl-timer-clock { font-size: 1.5rem !important; }
  .afl-margin-text { font-size: 0.65rem !important; white-space: nowrap !important; }
  .afl-status-badge { font-size: 0.65rem !important; padding: 2px 6px !important; }
  .afl-quarter-tabs { gap: 2px !important; }
  .afl-q-btn { padding: 2px 5px !important; font-size: 0.65rem !important; }

  .training-hero-card { padding: 1rem; }
  .training-title { font-size: 1.15rem; }
  .training-hero-body { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .training-readiness-box { width: 100%; justify-content: space-around; }
  .live-match-grid { grid-template-columns: 1fr !important; }
  .live-field-canvas { min-height: 420px !important; padding: 0.5rem !important; }
  .pitch-slot { min-width: 50px !important; padding: 4px 2px !important; font-size: 0.68rem !important; }
}

/* ══════════════════════════════════════════════════════
   MATCH DAY MOBILE STREAMLINING & TWO-FIELD CAROUSEL
   ══════════════════════════════════════════════════════ */

/* Hero Toggle Button */
.afl-hero-toggle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-bright);
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}
.afl-hero-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 768px) {
  .afl-hero-toggle-btn {
    display: flex !important;
  }
  .afl-match-centre {
    position: relative;
    transition: all 0.25s ease;
  }
  .afl-match-centre.collapsed {
    padding: 0.4rem 0.6rem !important;
    border-radius: 12px !important;
    margin-bottom: 0.5rem !important;
  }
  .afl-match-centre.collapsed .hero-collapsible-part {
    display: none !important;
  }
  .afl-match-centre.collapsed .afl-top-bar {
    display: none !important;
  }
  .afl-match-centre.collapsed .afl-scoreboard-grid {
    grid-template-columns: 1fr auto 1fr !important;
    gap: 0.35rem !important;
    padding-right: 28px !important;
  }
  .afl-match-centre.collapsed .afl-team-side.home {
    gap: 0.35rem !important;
  }
  .afl-match-centre.collapsed .afl-team-side.away {
    gap: 0.35rem !important;
  }
  .afl-match-centre.collapsed .afl-team-logo {
    width: 32px !important;
    height: 32px !important;
  }
  .afl-match-centre.collapsed .afl-score-pts {
    font-size: 1.35rem !important;
  }
  .afl-match-centre.collapsed .afl-score-gb {
    font-size: 0.7rem !important;
  }
  .afl-match-centre.collapsed .afl-center-col {
    min-width: 90px !important;
    max-width: 105px !important;
  }
  .afl-match-centre.collapsed .afl-timer-clock {
    font-size: 1.15rem !important;
  }
  .afl-match-centre.collapsed .afl-status-badge {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
    margin-bottom: 1px !important;
  }
  .afl-match-centre.collapsed .scoreboard-match-actions {
    margin-top: 2px !important;
  }
  .afl-match-centre.collapsed .btn-end-quarter {
    font-size: 0.65rem !important;
    padding: 2px 5px !important;
  }
}

/* Match Carousel */
.match-carousel-container {
  width: 100%;
  position: relative;
  margin-bottom: 1rem;
}
.match-carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem 0.5rem;
}
.match-carousel-tabs {
  display: flex;
  gap: 0.35rem;
}
.match-carousel-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.match-carousel-tab.active {
  background: var(--surface-active, rgba(255, 255, 255, 0.12));
  color: var(--text-bright);
  border-color: var(--border);
}
.match-carousel-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.match-carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-right: 0.25rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}
.carousel-dot.active {
  background: var(--gold, #d4af37);
  width: 18px;
  border-radius: 4px;
}
.match-carousel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y pinch-zoom;
}
.match-carousel-track {
  display: flex;
  width: 200%;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}
.match-carousel-slide {
  width: 50%;
  flex: 0 0 50%;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .match-carousel-nav {
    display: flex !important;
    margin-bottom: 0.75rem !important;
  }
  .match-carousel-viewport {
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
  }
  .match-carousel-track {
    display: flex !important;
    width: 200% !important;
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }
  .match-carousel-slide {
    width: 50% !important;
    flex: 0 0 50% !important;
    box-sizing: border-box !important;
  }
  .match-carousel-slide#matchSlideOpp {
    display: block !important;
  }
}

/* Field Maximise Button */
.btn-field-maximise {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-bright);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-field-maximise:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--gold);
  color: #fff;
}
.btn-field-maximise span.material-symbols-outlined {
  font-size: 16px;
  color: var(--gold);
}

/* Field Top Toolbar */
.field-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding: 0.4rem 0.65rem;
  background: var(--surface-card, rgba(15, 23, 42, 0.85));
  border: 1px solid var(--border);
  border-radius: 8px;
}
.field-quick-scores {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.quick-score-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.quick-score-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.quick-score-our .quick-score-group-label {
  color: var(--gold);
}
.quick-score-opp .quick-score-group-label {
  color: #f87171;
}
.btn-quick-opp {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}
.btn-quick-opp:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #fff !important;
}
.btn-quick-opp-undo {
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
}
.btn-quick-opp-undo:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════════════
   MAXIMISED FIELD VIEW (Mobile & Tablet)
   ══════════════════════════════════════════════════════ */
.match-carousel-container.field-maximised {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  background: #090e17 !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.match-carousel-container.field-maximised .match-carousel-nav {
  display: none !important;
}

.maximized-score-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 0.4rem 0.65rem;
  padding-top: max(0.4rem, env(safe-area-inset-top, 0.4rem));
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 0.4rem;
  z-index: 10;
  user-select: none;
}
.msh-team {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 0;
}
.msh-team.msh-home {
  color: var(--gold);
  justify-self: start;
}
.msh-team.msh-opp {
  color: #f87171;
  justify-self: end;
  justify-content: flex-end;
}
.msh-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
@media (max-width: 480px) {
  .msh-team-name { display: none; }
}
@media (min-width: 481px) {
  .msh-team-name { max-width: 160px; }
}
.msh-score {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.msh-center {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 0.35rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}
.msh-period-badge {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}
.msh-timer {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
}
.msh-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px;
}
.msh-mode-toggle .mode-toggle-btn {
  padding: 2px 6px;
  font-size: 0.7rem;
}
.msh-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-bright);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.msh-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}
.msh-close-btn span {
  font-size: 18px;
}

.match-carousel-container.field-maximised .match-carousel-viewport {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.match-carousel-container.field-maximised .match-carousel-viewport {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}
.match-carousel-container.field-maximised .match-carousel-track {
  height: 100% !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  width: 200% !important;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1) !important;
  will-change: transform;
}
.match-carousel-container.field-maximised .match-carousel-slide {
  height: 100% !important;
  width: 50% !important;
  flex: 0 0 50% !important;
  min-width: 50% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}
.match-carousel-container.field-maximised #matchSlideOur {
  display: flex !important;
}
.match-carousel-container.field-maximised #matchSlideOpp {
  display: flex !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  background: var(--background, #0b1120) !important;
}
.match-carousel-container.field-maximised .opp-slide-container {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 600px !important;
  margin: 0 auto !important;
  padding: 0.5rem 0.75rem !important;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 24px)) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}
.match-carousel-container.field-maximised .msh-team {
  cursor: pointer !important;
  transition: opacity 0.2s ease, border-color 0.2s ease !important;
}
.match-carousel-container.field-maximised .msh-team.active-slide {
  opacity: 1 !important;
}
.match-carousel-container.field-maximised .msh-team:not(.active-slide) {
  opacity: 0.6 !important;
}
.match-carousel-container.field-maximised #matchSlideOur .field-top-toolbar {
  display: none !important;
}
.match-carousel-container.field-maximised #matchSlideOpp .opp-top-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.45rem 0.65rem !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  margin-bottom: 0.6rem !important;
}
#oppPlayerScorerModal {
  z-index: 100002 !important;
}
#oppPlayerScorerModal.open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.opp-quick-score-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.opp-qsb-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-bright);
}
.match-carousel-container.field-maximised .mobile-rotations-drawer {
  display: none !important;
}
.match-carousel-container.field-maximised .rotations-panel,
.match-carousel-container.field-maximised .lineup-interchange {
  display: none !important;
}
.match-carousel-container.field-maximised .lineup-container-live {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.15rem 0.35rem 0 0.35rem !important;
  overflow: hidden !important;
  position: relative !important;
}
.match-carousel-container.field-maximised .lineup-field-wrapper {
  position: relative !important;
  min-height: 0 !important;
  max-height: 100% !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 1 auto !important;
}
.match-carousel-container.field-maximised .lineup-field-img {
  min-height: 0 !important;
  max-height: 100% !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* ── Tactical Interchange Bench (Wrapping Grid in Maximised Mode - No Scrollbars) ── */
.match-carousel-container.field-maximised .game-mob-interchange {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.2rem !important;
  width: calc(100% - 0.75rem) !important;
  max-width: 640px !important;
  margin: 0.2rem auto 0 auto !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15)) !important;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 0.35rem 0.5rem !important;
  padding-bottom: max(1.15rem, env(safe-area-inset-bottom, 20px)) !important;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45) !important;
  z-index: 30 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.match-carousel-container.field-maximised .game-mob-interchange-title {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: var(--gold, #f59e0b) !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  padding: 0.12rem 0.6rem !important;
  border-radius: 999px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  user-select: none !important;
  margin-bottom: 0.1rem !important;
}

.match-carousel-container.field-maximised #gameMobInterchangeList {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.35rem !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 2px 2px 4px !important;
}

.match-carousel-container.field-maximised #gameMobInterchangeList::-webkit-scrollbar,
.match-carousel-container.field-maximised .game-mob-interchange::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lineup-player-chip {
  flex: 0 1 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  padding: 0.22rem 0.5rem !important;
  border-radius: 8px !important;
  background: var(--surface, #1e293b) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15)) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
  cursor: pointer !important;
  user-select: none !important;
  touch-action: manipulation !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lineup-player-chip:hover,
.match-carousel-container.field-maximised .game-mob-interchange .lineup-player-chip.lineup-chip-dragover,
.lineup-player-chip.lineup-chip-dragover {
  border-color: var(--gold, #f59e0b) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55), inset 0 0 4px rgba(245, 158, 11, 0.2) !important;
  transform: translateY(-1px) scale(1.02) !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-card-inner {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-top-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-jersey {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: var(--gold, #f59e0b) !important;
  min-width: 16px !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-position {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: var(--muted, #94a3b8) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-name-wrap {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.1 !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-first {
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  max-width: 80px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.match-carousel-container.field-maximised .game-mob-interchange .lpc-last {
  font-size: 0.66rem !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  max-width: 80px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.field-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.mode-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.mode-toggle-btn.active {
  background: var(--primary, #1e3a8a);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.field-quick-scores {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.quick-score-unit {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.btn-quick-score {
  border: none;
  background: transparent;
  color: var(--text-bright);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-quick-goal {
  background: rgba(var(--secondary-rgb, 212, 175, 55), 0.15);
  color: var(--secondary, var(--gold));
}
.btn-quick-goal:hover {
  background: rgba(var(--secondary-rgb, 212, 175, 55), 0.3);
}
.btn-quick-behind {
  background: rgba(255, 255, 255, 0.06);
}
.btn-quick-behind:hover {
  background: rgba(255, 255, 255, 0.14);
}
.btn-opp-goal {
  background: rgba(71, 85, 105, 0.35);
  color: #94a3b8;
}
.btn-opp-behind {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}
.btn-quick-undo {
  border: none;
  border-left: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
  padding: 0.28rem 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-quick-undo:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.btn-quick-undo .material-symbols-outlined {
  font-size: 15px;
}

/* Mobile Rotations Drawer */
.mobile-rotations-drawer {
  margin-top: 0.65rem;
  background: var(--surface-card, rgba(15, 23, 42, 0.85));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.mrd-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}
.mrd-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
}
.mrd-trigger-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.mrd-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-bright);
}
.mrd-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(var(--secondary-rgb, 212, 175, 55), 0.15);
  color: var(--secondary, var(--gold));
  border: 1px solid rgba(var(--secondary-rgb, 212, 175, 55), 0.3);
}
.mrd-chevron {
  color: var(--text-muted);
  font-size: 20px;
  transition: transform 0.2s ease;
}
.mrd-content {
  padding: 0.65rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.mrd-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mrd-rotation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
}
.mrd-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.mrd-card-moves {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.mrd-exec-btn {
  padding: 0.25rem 0.65rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
}

/* Opposition Slide */
.opp-slide-container {
  width: 100%;
}
.opp-field-wrapper {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
}
.opp-scout-info-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border: 1px dashed var(--border);
}
.opp-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.5rem;
}
.opp-player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.opp-player-card:hover, .opp-player-card:active {
  border-color: var(--gold);
  background: rgba(var(--secondary-rgb), 0.08);
  transform: translateY(-1px);
}
.opp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.opp-card-jersey {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--gold);
}
.opp-card-danger {
  font-size: 0.7rem;
  color: #f87171;
  font-weight: 800;
}
.opp-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-card-pos {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.opp-prominent-card {
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-radius: 12px;
}
.opp-prominent-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.opp-logo-big {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.opp-logo-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.opp-prominent-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.btn-opp-big-goal {
  background: #334155;
  color: #fff;
  border: 1px solid #475569;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 0.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.btn-opp-big-goal:hover, .btn-opp-big-goal:active {
  background: #475569;
}
.btn-opp-big-behind {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-bright);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 0.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.btn-opp-big-behind:hover, .btn-opp-big-behind:active {
  background: rgba(255, 255, 255, 0.12);
}
.opp-prominent-undos {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* =====================================================
   MODERN EVENT CARDS & CONTROL DECK (GLASSMORPHISM)
   ===================================================== */
:root {
  --event-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(15, 23, 42, 0.98) 100%);
  --event-deck-bg: rgba(15, 23, 42, 0.65);
}

[data-theme="light"] {
  --event-card-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --event-deck-bg: rgba(255, 255, 255, 0.9);
}

/* ── Events Hub Header ── */
.events-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.events-page-title-group h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text, #ffffff);
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.events-page-title-group h1 .material-symbols-outlined {
  color: var(--gold, var(--secondary, #f59e0b));
}

.events-page-title-group p {
  color: var(--muted, #94a3b8);
  margin: 0;
  font-size: 0.9rem;
}

/* ── Interactive Control Deck ── */
.events-control-deck {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--event-deck-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.control-deck-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Segmented Upcoming / Past Toggle */
.events-segmented-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

[data-theme="light"] .events-segmented-toggle {
  background: rgba(0, 0, 0, 0.06);
}

.events-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted, #94a3b8);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.events-seg-btn:hover {
  color: var(--text, #ffffff);
}

.events-seg-btn.active {
  background: var(--gold, var(--secondary, #f59e0b));
  color: var(--secondary-text, #0b1120);
  box-shadow: 0 2px 10px rgba(var(--gold-rgb, 245, 158, 11), 0.35);
}

.events-seg-count {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.12);
}

.events-seg-btn.active .events-seg-count {
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
}

/* Type Filter Pills */
.events-type-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #ffffff);
  border-color: rgba(255, 255, 255, 0.2);
}

.type-pill.active {
  border-color: var(--gold, var(--secondary, #f59e0b));
  color: var(--gold, var(--secondary, #f59e0b));
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.1);
}

/* Team Filter Scrollbar */
.team-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.team-filter-bar::-webkit-scrollbar { display: none; }

.team-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted, #94a3b8);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.team-filter-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #ffffff);
}

.team-filter-pill.active {
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.15);
  border-color: var(--gold, var(--secondary, #f59e0b));
  color: var(--gold, var(--secondary, #f59e0b));
}

.team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Modern Event Card Grid ── */
.event-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

/* ── Base Modern Event Card ── */
.event-card-modern {
  display: flex;
  flex-direction: column;
  background: var(--event-card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.event-card-modern:hover {
  transform: translateY(-4px);
  border-color: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--card-accent-rgb, 245, 158, 11), 0.2);
  color: inherit;
}

.event-card-modern.event-cancelled {
  opacity: 0.65;
}

.event-card-modern.event-cancelled:hover {
  opacity: 0.9;
}

.event-card__top-bar {
  height: 3px;
  background: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  width: 100%;
}

.event-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
}

/* ── Match Showdown Header (Dual Avatars) ── */
.event-card__matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.85rem 0.65rem;
}

[data-theme="light"] .event-card__matchup {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.matchup-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  min-width: 0;
}

.matchup-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.matchup-avatar--home {
  border-color: var(--team-colour, var(--gold, var(--secondary, #f59e0b)));
}

.matchup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matchup-avatar img.club-logo-img {
  object-fit: contain;
  padding: 3px;
  background: #ffffff;
}

.matchup-avatar-initials {
  font-weight: 900;
  font-size: 1rem;
  color: #ffffff;
}

.matchup-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.matchup-col--home .matchup-name {
  color: var(--team-colour, var(--gold, var(--secondary, #f59e0b)));
}

.matchup-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.matchup-tag--home {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.matchup-tag--away {
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.2);
  color: var(--gold, var(--secondary, #fbbf24));
}

.matchup-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.matchup-round-pill {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.matchup-vs {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold, var(--secondary, #f59e0b));
  line-height: 1;
}

.matchup-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text, #e2e8f0);
}

/* ── Standard Event Header (Training / Social / Club) ── */
.event-card__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.event-card__avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #0b1120;
  border: 2px solid var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.event-card__avatar-icon {
  font-size: 26px;
  color: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
}

.event-card__title-group {
  flex: 1;
  min-width: 0;
}

.event-card__title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text, #ffffff);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-card__team {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  margin-top: 0.2rem;
}

/* ── Meta Chips ── */
.event-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text, #cbd5e1);
}

[data-theme="light"] .event-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

.event-chip__icon {
  font-size: 14px;
  color: var(--muted, #94a3b8);
}

.event-chip--time {
  color: var(--gold, var(--secondary, #f59e0b));
  border-color: rgba(var(--gold-rgb, 245, 158, 11), 0.25);
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.08);
}

/* ── Footer Row with Quick RSVP & Navigation Arrow ── */
.event-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  margin-top: auto;
  gap: 0.5rem;
}

.rsvp-pill-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.rsvp-pill-action--attending {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.rsvp-pill-action--maybe {
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.15);
  border-color: rgba(var(--gold-rgb, 245, 158, 11), 0.35);
  color: var(--gold, var(--secondary, #fbbf24));
}

.rsvp-pill-action--unavailable {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.rsvp-pill-action--pending {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--muted, #94a3b8);
}

.squad-count-pill {
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.event-card__arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #94a3b8);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.event-card-modern:hover .event-card__arrow {
  background: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  color: var(--secondary-text, #0b1120);
  transform: translateX(3px);
}

/* ── Past Score Badge ── */
.past-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
}

.past-score-pill--win {
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.past-score-pill--loss {
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.past-score-pill--draw {
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ── DASHBOARD: TIER 1 FEATURED NEXT GAME HERO ── */
.featured-match-hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35) 0%, rgba(15, 23, 42, 0.95) 60%, rgba(var(--gold-rgb, 245, 158, 11), 0.15) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

[data-theme="light"] .featured-match-hero {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, #ffffff 60%, rgba(var(--gold-rgb, 245, 158, 11), 0.12) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

.featured-match-hero:hover {
  transform: translateY(-3px);
  border-color: var(--gold, var(--secondary, #f59e0b));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(var(--gold-rgb, 245, 158, 11), 0.25);
  color: inherit;
}

.fmh-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fmh-top-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold, var(--secondary, #f59e0b));
}

.fmh-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.15);
  border: 1px solid rgba(var(--gold-rgb, 245, 158, 11), 0.3);
  color: var(--gold, var(--secondary, #fbbf24));
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
}

.fmh-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fmh-team {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fmh-team--away {
  flex-direction: row-reverse;
  text-align: right;
}

.fmh-crest {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 50%;
  background: #0b1120;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.fmh-team--home .fmh-crest {
  border-color: var(--team-colour, var(--gold, var(--secondary, #f59e0b)));
}

.fmh-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fmh-crest img.club-logo-img {
  object-fit: contain;
  padding: 3px;
  background: #ffffff;
}

.fmh-crest-initials {
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
}

.fmh-team-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.fmh-team-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fmh-team--home .fmh-team-name {
  color: var(--team-colour, var(--gold, var(--secondary, #f59e0b)));
}

.fmh-role-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.fmh-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .fmh-center {
  background: rgba(0, 0, 0, 0.04);
}

.fmh-vs {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold, var(--secondary, #f59e0b));
  line-height: 1;
}

.fmh-kickoff {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text, #ffffff);
}

.fmh-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted, #94a3b8);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fmh-meta-chips {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.fmh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── DASHBOARD: TIER 2-4 FEED CARDS ── */
.dashboard-events-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-event-card {
  display: flex;
  align-items: center;
  background: var(--event-card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  text-decoration: none;
  color: inherit;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dash-event-card:hover {
  transform: translateX(4px);
  border-color: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
}

.dash-event-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
}

.dash-event-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: #0b1120;
  border: 2px solid var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  flex-shrink: 0;
}

.dash-event-info {
  flex: 1;
  min-width: 0;
}

.dash-event-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-event-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #ffffff);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-event-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.dash-event-meta {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dash-event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dash-event-rsvp {
  flex-shrink: 0;
}

.dash-rsvp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.dash-rsvp-pill--going {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.dash-rsvp-pill--maybe {
  background: rgba(var(--gold-rgb, 245, 158, 11), 0.15);
  color: var(--gold, var(--secondary, #fbbf24));
  border: 1px solid rgba(var(--gold-rgb, 245, 158, 11), 0.3);
}

.dash-rsvp-pill--unavailable {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dash-rsvp-pill--pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted, #94a3b8);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* ── TEAM DETAIL: EVENT MINI CARD MODERN ── */
.event-mini-card-modern {
  display: flex;
  align-items: center;
  background: var(--event-card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  text-decoration: none;
  color: inherit;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.event-mini-card-modern:hover {
  transform: translateX(3px);
  border-color: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
  color: inherit;
}

.event-mini-card-modern::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--card-accent, var(--gold, var(--secondary, #f59e0b)));
}

.emc-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

[data-theme="light"] .emc-date-box {
  background: rgba(0, 0, 0, 0.04);
}

.emc-date-box__day {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold, var(--secondary, #f59e0b));
  line-height: 1;
}

.emc-date-box__month {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.emc-details {
  flex: 1;
  min-width: 0;
}

.emc-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.emc-meta {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  margin-top: 0.15rem;
}

/* ── Mobile Breakpoints ── */
@media (max-width: 768px) {
  .event-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .control-deck-top {
    flex-direction: column;
    align-items: stretch;
  }
  
  .events-segmented-toggle {
    width: 100%;
  }
  
  .events-seg-btn {
    flex: 1;
    justify-content: center;
  }
  
  .fmh-body {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .fmh-team--away {
    flex-direction: row;
    text-align: left;
  }
  
  .fmh-center {
    order: -1;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0.4rem 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   SOCIAL MEDIA STUDIO & POSTING CALENDAR
   ═══════════════════════════════════════════════════════════════════ */

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

.day-column {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), background var(--transition);
}

.day-column.today {
  border-color: var(--gold, #f59e0b);
  background: rgba(245, 158, 11, 0.04);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.08);
}

.cal-event-card {
  display: block;
  text-decoration: none;
  background: #1e2942;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-size: 0.75rem;
  color: #fff;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.cal-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

.post-card {
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.post-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.due-reminder-banner {
  animation: banner-subtle-glow 3s ease-in-out infinite alternate;
}

@keyframes banner-subtle-glow {
  0% {
    border-color: rgba(245, 158, 11, 0.35);
  }
  100% {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.12);
  }
}

.social-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  transition: border-color var(--transition), background var(--transition);
}

.social-dropzone:hover,
.social-dropzone.dragover {
  border-color: var(--gold, #f59e0b);
  background: rgba(245, 158, 11, 0.05);
}

@media (max-width: 1024px) {
  .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .week-grid {
    grid-template-columns: 1fr;
  }
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* ── Public Theme Pill Toggle & Button ── */
.pub-theme-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 2px;
  height: 32px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 0.35rem;
  flex-shrink: 0;
}
.pub-theme-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}
.pub-theme-pill:focus-visible {
  outline: 2px solid var(--gold, #f59e0b);
  outline-offset: 2px;
}
.pub-theme-pill-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.45);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.pub-theme-pill-option .material-symbols-outlined {
  font-size: 15px;
  line-height: 1;
}
[data-theme="dark"] .pub-theme-pill-dark {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .pub-theme-pill-light {
  color: rgba(255, 255, 255, 0.4);
}
[data-theme="light"] .pub-theme-pill {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
}
[data-theme="light"] .pub-theme-pill:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.28);
}
[data-theme="light"] .pub-theme-pill-light {
  background: #ffffff;
  color: #f59e0b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
[data-theme="light"] .pub-theme-pill-dark {
  color: #94a3b8;
}
@media (max-width: 1120px) {
  .pub-theme-pill {
    align-self: flex-start;
    margin: 0.35rem 0 0.5rem 0;
  }
}

.pub-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: var(--text, #e2e8f0);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-right: 0.25rem;
}
.pub-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold, #f59e0b);
  border-color: var(--gold, #f59e0b);
  transform: translateY(-1px);
}
[data-theme="dark"] .pub-theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .pub-theme-toggle .theme-icon-dark { display: inline-block; }
[data-theme="light"] .pub-theme-toggle .theme-icon-dark { display: none; }
[data-theme="light"] .pub-theme-toggle .theme-icon-light { display: inline-block; color: #475569; }

/* ── Public Light Mode Polish ── */
[data-theme="light"] .pub-body {
  background: #f8fafc;
  color: #0f172a;
}
[data-theme="light"] .pub-nav {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .pub-nav-brand {
  color: #0f172a;
}
[data-theme="light"] .pub-nav-link {
  color: #475569;
}
[data-theme="light"] .pub-nav-link:hover,
[data-theme="light"] .pub-nav-link.active {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .pub-nav-dropdown-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .pub-nav-dropdown-item {
  color: #334155;
}
[data-theme="light"] .pub-nav-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .pub-theme-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
[data-theme="light"] .pub-theme-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}
[data-theme="light"] .story-feed-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .story-feed-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .story-title,
[data-theme="light"] .story-author-name {
  color: #0f172a !important;
}
[data-theme="light"] .story-caption-wrap {
  color: #334155;
}
[data-theme="light"] .story-match-link {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b !important;
}
[data-theme="light"] .story-match-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-game-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .pub-game-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .pub-schedule-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .pub-schedule-day {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-color: #e2e8f0;
}
[data-theme="light"] .pub-schedule-entry {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}
[data-theme="light"] .pub-footer {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
}
[data-theme="light"] .pub-footer-brand {
  color: #0f172a;
}
[data-theme="light"] .pub-footer-links a {
  color: #475569;
}
[data-theme="light"] .pub-footer-links a:hover {
  color: #0f172a;
}
[data-theme="light"] .pub-footer-copy {
  color: #94a3b8;
}
[data-theme="light"] .pub-section-alt {
  background: #f1f5f9;
}
[data-theme="light"] .pub-card-unified {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

/* ── Public Light Mode Contrast Hardening ── */
[data-theme="light"] .pub-page-header:not([style*="url"]):not(.has-hero-image) {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .pub-page-header:not([style*="url"]):not(.has-hero-image) .pub-page-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-page-header:not([style*="url"]):not(.has-hero-image) .pub-page-subtitle {
  color: #475569 !important;
}
[data-theme="light"] .pub-page-header:not([style*="url"]):not(.has-hero-image) .btn-ghost {
  border-color: #cbd5e1;
  color: #334155;
  background: #ffffff;
}
[data-theme="light"] .pub-page-header:not([style*="url"]):not(.has-hero-image) .btn-ghost:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* ── Hero Banner High Contrast Rules (Light & Dark Mode) ── */
/* When a hero banner image is present, the background is dark photo/scrim (rgba(11, 15, 25, 0.82-0.92)).
   Typography, buttons, badges, and controls inside must ALWAYS be crisp white and high contrast. */
.pub-page-header[style*="url"],
.pub-page-header.has-hero-image,
.pub-hero--compact[style*="url"],
.pub-hero--compact.has-hero-image,
.pub-program-hero[style*="url"],
.pub-program-hero.has-hero-image,
.pub-program-hero,
.mdc-hero[style*="url"],
.mdc-hero.has-hero-image,
.comm-hero[style*="url"],
.comm-hero.has-hero-image,
.trad-hero[style*="url"],
.trad-hero.has-hero-image,
.portal-hero-strip[style*="url"],
.portal-hero-strip.has-hero-image {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Titles */
.pub-page-header[style*="url"] .pub-page-title,
.pub-page-header.has-hero-image .pub-page-title,
.pub-hero--compact[style*="url"] .pub-hero__text h1,
.pub-hero--compact.has-hero-image .pub-hero__text h1,
.pub-program-hero[style*="url"] .pub-program-title,
.pub-program-hero.has-hero-image .pub-program-title,
.pub-program-hero .pub-program-title,
.comm-hero[style*="url"] .comm-title,
.comm-hero.has-hero-image .comm-title,
.trad-hero[style*="url"] .trad-title,
.trad-hero.has-hero-image .trad-title,
[data-theme="light"] .pub-page-header[style*="url"] .pub-page-title,
[data-theme="light"] .pub-page-header.has-hero-image .pub-page-title,
[data-theme="light"] .pub-hero--compact[style*="url"] .pub-hero__text h1,
[data-theme="light"] .pub-hero--compact.has-hero-image .pub-hero__text h1,
[data-theme="light"] .pub-program-hero[style*="url"] .pub-program-title,
[data-theme="light"] .pub-program-hero.has-hero-image .pub-program-title,
[data-theme="light"] .pub-program-hero .pub-program-title,
[data-theme="light"] .comm-hero[style*="url"] .comm-title,
[data-theme="light"] .comm-hero.has-hero-image .comm-title,
[data-theme="light"] .trad-hero[style*="url"] .trad-title,
[data-theme="light"] .trad-hero.has-hero-image .trad-title {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

/* Subtitles / Lead / Paragraphs */
.pub-page-header[style*="url"] .pub-page-subtitle,
.pub-page-header.has-hero-image .pub-page-subtitle,
.pub-hero--compact[style*="url"] .pub-hero__text p,
.pub-hero--compact.has-hero-image .pub-hero__text p,
.pub-program-hero[style*="url"] .pub-program-lead,
.pub-program-hero.has-hero-image .pub-program-lead,
.pub-program-hero .pub-program-lead,
.comm-hero[style*="url"] .comm-desc,
.comm-hero.has-hero-image .comm-desc,
.trad-hero[style*="url"] .trad-desc,
.trad-hero.has-hero-image .trad-desc,
[data-theme="light"] .pub-page-header[style*="url"] .pub-page-subtitle,
[data-theme="light"] .pub-page-header.has-hero-image .pub-page-subtitle,
[data-theme="light"] .pub-hero--compact[style*="url"] .pub-hero__text p,
[data-theme="light"] .pub-hero--compact.has-hero-image .pub-hero__text p,
[data-theme="light"] .pub-program-hero[style*="url"] .pub-program-lead,
[data-theme="light"] .pub-program-hero.has-hero-image .pub-program-lead,
[data-theme="light"] .pub-program-hero .pub-program-lead,
[data-theme="light"] .comm-hero[style*="url"] .comm-desc,
[data-theme="light"] .comm-hero.has-hero-image .comm-desc,
[data-theme="light"] .trad-hero[style*="url"] .trad-desc,
[data-theme="light"] .trad-hero.has-hero-image .trad-desc {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Program subtitle / tagline */
.pub-program-hero[style*="url"] .pub-program-subtitle,
.pub-program-hero.has-hero-image .pub-program-subtitle,
.pub-program-hero .pub-program-subtitle,
[data-theme="light"] .pub-program-hero[style*="url"] .pub-program-subtitle,
[data-theme="light"] .pub-program-hero.has-hero-image .pub-program-subtitle,
[data-theme="light"] .pub-program-hero .pub-program-subtitle {
  color: #fef08a !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Ghost buttons and scroll links inside hero */
.pub-page-header[style*="url"] .btn-ghost,
.pub-page-header.has-hero-image .btn-ghost,
.pub-hero--compact[style*="url"] .btn-ghost,
.pub-hero--compact.has-hero-image .btn-ghost,
.pub-hero--compact .pub-hero__scroll-link,
[data-theme="light"] .pub-page-header[style*="url"] .btn-ghost,
[data-theme="light"] .pub-page-header.has-hero-image .btn-ghost,
[data-theme="light"] .pub-hero--compact[style*="url"] .btn-ghost,
[data-theme="light"] .pub-hero--compact.has-hero-image .btn-ghost,
[data-theme="light"] .pub-hero--compact .pub-hero__scroll-link {
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.pub-page-header[style*="url"] .btn-ghost:hover,
.pub-page-header.has-hero-image .btn-ghost:hover,
.pub-hero--compact[style*="url"] .btn-ghost:hover,
.pub-hero--compact.has-hero-image .btn-ghost:hover,
.pub-hero--compact .pub-hero__scroll-link:hover,
[data-theme="light"] .pub-page-header[style*="url"] .btn-ghost:hover,
[data-theme="light"] .pub-page-header.has-hero-image .btn-ghost:hover,
[data-theme="light"] .pub-hero--compact[style*="url"] .btn-ghost:hover,
[data-theme="light"] .pub-hero--compact.has-hero-image .btn-ghost:hover,
[data-theme="light"] .pub-hero--compact .pub-hero__scroll-link:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* Fixtures Segmented Navigation when inside hero header */
.pub-page-header[style*="url"] .fixture-segmented-nav,
.pub-page-header.has-hero-image .fixture-segmented-nav,
[data-theme="light"] .pub-page-header[style*="url"] .fixture-segmented-nav,
[data-theme="light"] .pub-page-header.has-hero-image .fixture-segmented-nav {
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.pub-page-header[style*="url"] .fixture-tab-btn,
.pub-page-header.has-hero-image .fixture-tab-btn,
[data-theme="light"] .pub-page-header[style*="url"] .fixture-tab-btn,
[data-theme="light"] .pub-page-header.has-hero-image .fixture-tab-btn {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.pub-page-header[style*="url"] .fixture-tab-btn:hover,
.pub-page-header.has-hero-image .fixture-tab-btn:hover,
[data-theme="light"] .pub-page-header[style*="url"] .fixture-tab-btn:hover,
[data-theme="light"] .pub-page-header.has-hero-image .fixture-tab-btn:hover {
  color: #ffffff !important;
}

.pub-page-header[style*="url"] .fixture-tab-btn.active,
.pub-page-header.has-hero-image .fixture-tab-btn.active,
[data-theme="light"] .pub-page-header[style*="url"] .fixture-tab-btn.active,
[data-theme="light"] .pub-page-header.has-hero-image .fixture-tab-btn.active {
  background: var(--primary, #6366f1) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

.pub-page-header[style*="url"] .tab-count-pill,
.pub-page-header.has-hero-image .tab-count-pill,
[data-theme="light"] .pub-page-header[style*="url"] .tab-count-pill,
[data-theme="light"] .pub-page-header.has-hero-image .tab-count-pill {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

/* Badges inside hero */
.pub-program-hero .badge-neutral,
[data-theme="light"] .pub-program-hero .badge-neutral {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Schedule section contrast */
[data-theme="light"] .pub-schedule-subheading {
  color: #334155 !important;
  font-weight: 700;
}
[data-theme="light"] .pub-schedule-subheading .material-symbols-outlined {
  color: #4f46e5 !important;
}
[data-theme="light"] .pub-schedule-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .pub-schedule-card--active {
  border-color: #94a3b8 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .pub-schedule-day {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-bottom: 1px solid #cbd5e1 !important;
  font-weight: 800;
}
[data-theme="light"] .pub-schedule-entry {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] .pub-schedule-entry__label {
  color: #0f172a !important;
  font-weight: 700;
}
[data-theme="light"] .pub-schedule-entry__time {
  color: #475569 !important;
  font-weight: 600;
}
[data-theme="light"] .pub-schedule-empty {
  color: #64748b !important;
  opacity: 1 !important;
}
[data-theme="light"] .pub-schedule-season-badge {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Sponsors Light Mode */
[data-theme="light"] .pub-tier-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-tier-divider {
  background: #0f172a !important;
  opacity: 0.6 !important;
}
[data-theme="light"] .pub-tier-desc {
  color: #475569 !important;
}
[data-theme="light"] .pub-sponsor-name {
  color: #0f172a !important;
}
[data-theme="light"] .pub-sponsor-tagline {
  color: #475569 !important;
}
[data-theme="light"] .pub-sponsor-empty {
  background: #ffffff !important;
  border: 2px dashed #cbd5e1 !important;
}
[data-theme="light"] .pub-sponsor-empty:hover {
  background: #f8fafc !important;
  border-color: #6366f1 !important;
}
[data-theme="light"] .pub-sponsor-empty .pub-sponsor-logo-frame {
  background: #f8fafc !important;
  border: 2px dashed #cbd5e1 !important;
}
[data-theme="light"] .pub-sponsor-empty .pub-sponsor-logo-frame .material-symbols-outlined {
  color: #475569 !important;
  opacity: 1 !important;
}
[data-theme="light"] .pub-sponsor-empty .pub-sponsor-name {
  color: #0f172a !important;
}
[data-theme="light"] .pub-sponsor-card--hero {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .pub-sponsor-card--hero .pub-hero-badge {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}
[data-theme="light"] .pub-sponsor-card--hero .pub-hero-badge-star {
  color: #b45309 !important;
}
[data-theme="light"] .pub-bottom-cta-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .pub-bottom-cta-card h2 {
  color: #0f172a !important;
}
[data-theme="light"] .pub-bottom-cta-card p {
  color: #475569 !important;
}
[data-theme="light"] .pub-bottom-cta-card .material-symbols-outlined {
  color: #4338ca !important;
}

/* Timeline / History */
[data-theme="light"] .pub-timeline::before {
  background: #cbd5e1 !important;
}
[data-theme="light"] .pub-timeline-marker {
  background: #0f172a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px #cbd5e1 !important;
}
[data-theme="light"] .pub-timeline-year {
  color: #0f172a !important;
  font-weight: 800 !important;
}
[data-theme="light"] .pub-timeline-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] .pub-timeline-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-timeline-content {
  color: #334155 !important;
}

/* About & Grounds */
[data-theme="light"] .pub-about-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
[data-theme="light"] .pub-about-card-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-about-card-body {
  color: #334155 !important;
}
[data-theme="light"] .pub-about-icon {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] .pub-ground-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
[data-theme="light"] .pub-ground-name {
  color: #0f172a !important;
}
[data-theme="light"] .pub-ground-address {
  color: #475569 !important;
}
[data-theme="light"] .pub-ground-badge {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Committee */
[data-theme="light"] .pub-committee-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
[data-theme="light"] .pub-committee-name {
  color: #0f172a !important;
}
[data-theme="light"] .pub-committee-role {
  color: #475569 !important;
}
[data-theme="light"] .pub-committee-avatar {
  border-color: #cbd5e1 !important;
}
[data-theme="light"] .pub-role-pill {
  background: #e0e7ff !important;
  color: #3730a3 !important;
}

/* ── Public Merchandise Shop Light Mode ── */
[data-theme="light"] .pub-shop-notice {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .pub-shop-notice-icon {
  color: #2563eb !important;
}
[data-theme="light"] .pub-shop-notice-text {
  color: #1e3a8a !important;
}
[data-theme="light"] .pub-shop-notice-text strong {
  color: #1e40af !important;
}

[data-theme="light"] .pub-shop-empty {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .pub-shop-empty-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-shop-empty-desc {
  color: #64748b !important;
}

[data-theme="light"] .pub-product-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .pub-product-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .pub-product-image-box {
  background: #f8fafc !important;
}
[data-theme="light"] .pub-product-fallback-icon {
  color: #94a3b8 !important;
}
[data-theme="light"] .pub-product-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-product-price {
  color: #b45309 !important;
}
[data-theme="light"] .pub-product-desc {
  color: #475569 !important;
}
[data-theme="light"] .pub-product-variant-btn {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
[data-theme="light"] .pub-product-variant-btn:hover {
  background: #e2e8f0 !important;
}

[data-theme="light"] .pub-shop-modal {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .pub-shop-modal-close {
  color: #64748b !important;
}
[data-theme="light"] .pub-shop-modal-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-shop-modal-desc {
  color: #475569 !important;
}
[data-theme="light"] .pub-shop-modal-label {
  color: #475569 !important;
}
[data-theme="light"] .variant-option-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] .variant-option-row:hover {
  background: #f1f5f9 !important;
}

[data-theme="light"] .pub-cart-drawer {
  background: #ffffff !important;
  border-left-color: #e2e8f0 !important;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .pub-cart-header {
  border-bottom-color: #e2e8f0 !important;
}
[data-theme="light"] .pub-cart-title {
  color: #0f172a !important;
}
[data-theme="light"] .pub-cart-close {
  color: #64748b !important;
}
[data-theme="light"] .cart-empty-state {
  color: #64748b !important;
}
[data-theme="light"] .cart-item-row {
  border-bottom-color: #f1f5f9 !important;
}
[data-theme="light"] .cart-item-title {
  color: #0f172a !important;
}
[data-theme="light"] .cart-item-sub {
  color: #64748b !important;
}
[data-theme="light"] .cart-qty-pill {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}
[data-theme="light"] .cart-qty-pill button,
[data-theme="light"] .cart-qty-pill span {
  color: #0f172a !important;
}
[data-theme="light"] .cart-item-price {
  color: #0f172a !important;
}
[data-theme="light"] .pub-cart-footer {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}
[data-theme="light"] .pub-cart-label {
  color: #64748b !important;
}
[data-theme="light"] .pub-cart-fulfillment-opt {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] .pub-cart-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="light"] .pub-cart-summary-row {
  color: #64748b !important;
}
[data-theme="light"] .pub-cart-total-row {
  color: #0f172a !important;
  border-top-color: #e2e8f0 !important;
}





/* --- Marsh Ground Inspection Modal & Checklist Cards --- */
.gi-modal {
  max-width: 840px;
  width: 95%;
  max-height: 92vh;
  box-sizing: border-box;
}

.gi-modal-body {
  padding: 1.25rem;
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: 100%;
}

.gi-section-card {
  padding: 0.85rem 1rem !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  border-radius: var(--radius, 8px) !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin-bottom: 0 !important;
}

.gi-section-card:hover {
  transform: none !important;
}

.gi-item-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.gi-item-row:last-child {
  border-bottom: none;
}

.gi-item-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.gi-item-text {
  font-size: 0.88rem;
  color: var(--text);
  flex: 1 1 200px;
  min-width: 0;
  word-break: break-word;
  line-height: 1.35;
}

.gi-status-toggles {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  max-width: 100%;
}

.gi-status-toggles .gi-btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.gi-status-toggles .gi-btn-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.gi-status-toggles .gi-btn-toggle.active.btn-success {
  background: rgba(46, 160, 67, 0.22) !important;
  border-color: #2ea043 !important;
  color: #3fb950 !important;
  font-weight: 700;
  box-shadow: 0 0 0 1px #2ea043;
}

.gi-status-toggles .gi-btn-toggle.active.btn-danger {
  background: rgba(248, 81, 73, 0.22) !important;
  border-color: #f85149 !important;
  color: #f85149 !important;
  font-weight: 700;
  box-shadow: 0 0 0 1px #f85149;
}

.gi-status-toggles .gi-btn-toggle.active.btn-secondary {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  font-weight: 700;
}

.gi-item-note {
  font-size: 0.78rem !important;
  padding: 0.35rem 0.6rem !important;
  min-height: 32px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: var(--radius-sm, 4px) !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.gi-all-pass-btn {
  padding: 0.2rem 0.55rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* Responsive breakpoint for mobile */
@media (max-width: 580px) {
  .gi-modal-overlay {
    padding: 0.4rem !important;
  }
  .gi-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: var(--radius, 10px) !important;
  }
  .gi-modal-header {
    padding: 0.85rem 1rem !important;
  }
  .gi-modal-body {
    padding: 0.85rem !important;
    gap: 0.85rem !important;
  }
  .gi-section-card {
    padding: 0.75rem 0.85rem !important;
  }
  .gi-item-main {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.45rem !important;
  }
  .gi-item-text {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .gi-status-toggles {
    width: 100% !important;
    display: flex !important;
    gap: 0.35rem !important;
  }
  .gi-status-toggles .gi-btn-toggle {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 0.45rem 0.2rem !important;
    font-size: 0.75rem !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .gi-modal-footer {
    padding: 0.75rem 1rem !important;
    flex-direction: column-reverse !important;
    gap: 0.5rem !important;
  }
  .gi-modal-footer button {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem !important;
    white-space: normal !important;
    text-align: center !important;
  }
}

/* ============================================================================
   CANONICAL PORTAL & WORKSPACE CONTRAST NORMALIZATION LAYER (WCAG 2.1 AA)
   Ensures all Hero Banners, Control Decks, Cards, Tabs, Buttons, Modals, and
   Canvas Workspaces maintain strict contrast in both Dark Mode and Light Mode
   regardless of club Primary / Secondary / Tertiary / Team colours.
   ============================================================================ */

/* ── 1. Dynamic Foreground Contrast for Club-Coloured CTA Buttons ── */
.btn-primary {
  background: var(--primary);
  color: var(--primary-text, #ffffff) !important;
  border-color: var(--primary);
}

.hero-cta-primary,
.app-hero-cta-primary,
.drill-hero-cta,
.btn-edit-drill,
.btn-club-accent,
.billing-cta-primary,
.sponsor-cta-primary {
  background: var(--gold) !important;
  color: var(--secondary-text, #ffffff) !important;
  border-color: var(--gold) !important;
}

.hero-cta-primary:hover,
.app-hero-cta-primary:hover,
.drill-hero-cta:hover,
.btn-edit-drill:hover,
.btn-club-accent:hover {
  filter: brightness(1.06);
  color: var(--secondary-text, #ffffff) !important;
}

/* ── 2. Readable Club Text & Tab Accents (Light & Dark Mode) ── */
.ca-tab-btn.active,
.hub-tab-btn.active,
.scouting-tab-btn.active,
.profile-tab-btn.active {
  color: var(--club-text-accent, var(--gold)) !important;
  border-bottom-color: var(--club-text-accent, var(--gold)) !important;
}

.profile-club-link,
.member-club-email,
.club-accent-text {
  color: var(--club-text-primary, var(--primary)) !important;
}

/* ── 3. Unified Light Mode Hero Surfaces ── */
[data-theme="light"] .app-hero,
[data-theme="light"] .billing-hero,
[data-theme="light"] .drill-hero,
[data-theme="light"] .sponsor-hero,
[data-theme="light"] .team-hero-card,
[data-theme="light"] .event-hero,
[data-theme="light"] .runner-hero-card,
[data-theme="light"] .profile-hero-card,
[data-theme="light"] .blueprints-hero-card,
[data-theme="light"] .dossier-hero,
[data-theme="light"] .store-hero,
[data-theme="light"] .hub-hero,
[data-theme="light"] .club-ops-hero,
[data-theme="light"] .welfare-hero,
[data-theme="light"] .pa-hero,
[data-theme="light"] .scouting-hero,
[data-theme="light"] .inv-hero,
[data-theme="light"] .fin-hero,
[data-theme="light"] .biz-hero,
[data-theme="light"] .roles-hero,
[data-theme="light"] .minutes-hero {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb, 59, 130, 246), 0.08) 0%,
    #ffffff 52%,
    rgba(var(--secondary-rgb, 139, 92, 246), 0.08) 100%
  ) !important;
  border: 1px solid rgba(var(--secondary-rgb, 139, 92, 246), 0.3) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
}

[data-theme="light"] .app-hero h1,
[data-theme="light"] .app-hero h2,
[data-theme="light"] .billing-hero h1,
[data-theme="light"] .billing-hero-text h1,
[data-theme="light"] .drill-hero h1,
[data-theme="light"] .drill-hero-text h1,
[data-theme="light"] .sponsor-hero h1,
[data-theme="light"] .team-hero-card h1,
[data-theme="light"] .team-hero-title,
[data-theme="light"] .event-hero h1,
[data-theme="light"] .event-hero-title,
[data-theme="light"] .runner-hero-card h1,
[data-theme="light"] .runner-hero-title,
[data-theme="light"] .profile-hero-card h1,
[data-theme="light"] .blueprints-hero-card h1,
[data-theme="light"] .dossier-hero h1,
[data-theme="light"] .dossier-hero-title,
[data-theme="light"] .store-hero h1,
[data-theme="light"] .hub-hero h1,
[data-theme="light"] .club-ops-hero h1,
[data-theme="light"] .welfare-hero h1,
[data-theme="light"] .pa-hero h1,
[data-theme="light"] .scouting-hero h1,
[data-theme="light"] .roles-hero h1,
[data-theme="light"] .fin-hero h1,
[data-theme="light"] .biz-hero h1,
[data-theme="light"] .minutes-hero h1 {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .app-hero p,
[data-theme="light"] .billing-hero p,
[data-theme="light"] .billing-hero-text p,
[data-theme="light"] .drill-hero p,
[data-theme="light"] .drill-hero-text p,
[data-theme="light"] .sponsor-hero p,
[data-theme="light"] .team-hero-card p,
[data-theme="light"] .team-hero-sub,
[data-theme="light"] .event-hero p,
[data-theme="light"] .event-hero-meta,
[data-theme="light"] .runner-hero-card p,
[data-theme="light"] .runner-hero-sub,
[data-theme="light"] .profile-hero-card p,
[data-theme="light"] .blueprints-hero-card p,
[data-theme="light"] .dossier-hero p,
[data-theme="light"] .store-hero p,
[data-theme="light"] .hub-hero p,
[data-theme="light"] .club-ops-hero p,
[data-theme="light"] .welfare-hero p,
[data-theme="light"] .pa-hero p,
[data-theme="light"] .scouting-hero p,
[data-theme="light"] .roles-hero p,
[data-theme="light"] .fin-hero p,
[data-theme="light"] .biz-hero p,
[data-theme="light"] .minutes-hero p {
  color: #475569 !important;
  text-shadow: none !important;
}

[data-theme="light"] .hero-stat-card,
[data-theme="light"] .app-hero-stat,
[data-theme="light"] .drill-stat-pill,
[data-theme="light"] .team-stat-pill,
[data-theme="light"] .billing-stat-pill,
[data-theme="light"] .runner-stat-pill,
[data-theme="light"] .hero-kpi-pill {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .hero-stat-card .num,
[data-theme="light"] .app-hero-stat .num,
[data-theme="light"] .drill-stat-pill .num,
[data-theme="light"] .team-stat-pill .num,
[data-theme="light"] .runner-stat-pill .num {
  color: var(--club-text-accent, #0f172a) !important;
}

[data-theme="light"] .hero-stat-card .lbl,
[data-theme="light"] .app-hero-stat .lbl,
[data-theme="light"] .drill-stat-pill .lbl,
[data-theme="light"] .team-stat-pill .lbl,
[data-theme="light"] .runner-stat-pill .lbl {
  color: #475569 !important;
}

[data-theme="light"] .hero-cta-secondary,
[data-theme="light"] .app-hero-cta-secondary,
[data-theme="light"] .btn-pdf-export,
[data-theme="light"] .btn-hero-secondary {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .hero-cta-secondary:hover,
[data-theme="light"] .app-hero-cta-secondary:hover,
[data-theme="light"] .btn-pdf-export:hover,
[data-theme="light"] .btn-hero-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* ── 4. Unified Light Mode Control Decks, Filter Bars, & Pills ── */
[data-theme="light"] .drill-control-deck,
[data-theme="light"] .events-control-deck,
[data-theme="light"] .hub-control-deck,
[data-theme="light"] .filter-deck,
[data-theme="light"] .search-filter-bar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}

[data-theme="light"] .drill-search-input,
[data-theme="light"] .drill-select,
[data-theme="light"] .events-search-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .scope-pill,
[data-theme="light"] .diff-pill,
[data-theme="light"] .team-pill,
[data-theme="light"] .filter-pill {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .scope-pill:hover,
[data-theme="light"] .diff-pill:hover,
[data-theme="light"] .team-pill:hover,
[data-theme="light"] .filter-pill:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="light"] .scope-pill.active,
[data-theme="light"] .diff-pill.active,
[data-theme="light"] .filter-pill.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--primary-text, #ffffff) !important;
}

[data-theme="light"] .team-pill.active {
  background: var(--team-colour, var(--primary)) !important;
  border-color: var(--team-colour, var(--primary)) !important;
  color: var(--team-colour-text, var(--primary-text, #ffffff)) !important;
}

/* ── 5. Unified Light Mode Cards, Modals, & Containers ── */
[data-theme="light"] .team-card,
[data-theme="light"] .pack-card,
[data-theme="light"] .bundle-card,
[data-theme="light"] .drill-card,
[data-theme="light"] .opp-card,
[data-theme="light"] .runner-card,
[data-theme="light"] .club-card,
[data-theme="light"] .detail-header-card,
[data-theme="light"] .coordinator-bar,
[data-theme="light"] .meeting-pack-card,
[data-theme="light"] .modal-add-slot-dialog,
[data-theme="light"] .time-budget-container,
[data-theme="light"] .quote-summary-bar,
[data-theme="light"] .station-card,
[data-theme="light"] .volunteer-card,
[data-theme="light"] .equipment-custody-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] .team-card:hover,
[data-theme="light"] .pack-card:hover,
[data-theme="light"] .bundle-card:hover,
[data-theme="light"] .drill-card:hover,
[data-theme="light"] .opp-card:hover,
[data-theme="light"] .runner-card:hover {
  border-color: var(--team-colour, var(--gold)) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] .team-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .team-card__avatar,
[data-theme="light"] .dash-event-avatar,
[data-theme="light"] .fmh-crest {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .team-card__monogram,
[data-theme="light"] .fmh-crest-initials {
  color: #0f172a !important;
}

[data-theme="light"] .detail-title-group h2,
[data-theme="light"] .pack-name,
[data-theme="light"] .bundle-name,
[data-theme="light"] .drill-card-title,
[data-theme="light"] .opp-card-name,
[data-theme="light"] .runner-card-title {
  color: #0f172a !important;
}

/* ── 6. Interactive Canvas Workspaces (Drill Editor & Viewer) in Light Mode ── */
[data-theme="light"] .drill-palette-left {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .palette-group-title {
  color: #475569 !important;
}

[data-theme="light"] .palette-icon-btn {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .palette-icon-btn:hover {
  background: #f1f5f9 !important;
  border-color: var(--primary) !important;
  color: var(--club-text-primary, #0f172a) !important;
}

[data-theme="light"] .palette-icon-btn.active {
  background: rgba(var(--secondary-rgb, 245, 158, 11), 0.16) !important;
  border-color: var(--gold) !important;
  color: var(--club-text-accent, #0f172a) !important;
}

[data-theme="light"] .canvas-area {
  background: radial-gradient(circle at center, #f1f5f9 0%, #e2e8f0 100%) !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .step-instruction-block,
[data-theme="light"] .drill-stats-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .instruction-preview-body {
  color: #1e293b !important;
}

/* ── Child Safety & Multi-State WWCC Subnav & Register Layout ── */
.safety-subnav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg, rgba(30, 41, 59, 0.75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.safety-subnav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.safety-subnav-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.safety-filter-form {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.safety-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.safety-search-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 320px;
  min-width: 220px;
  margin-left: auto;
}

.safety-search-container .form-input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .safety-subnav-tools,
  .safety-search-container {
    width: 100%;
    margin-left: 0;
    flex-basis: 100%;
  }
}

.wwcc-state-chips {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wwcc-state-chip-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.wwcc-crossborder-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.45rem 0.9rem;
  list-style: none;
  padding: 0.65rem 0.85rem;
  margin: 0.35rem 0 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.wwcc-crossborder-checks label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}

.wwcc-wallet-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.wwcc-wallet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

