/* ── Admin sidebar active-state (loaded early to prevent Bootstrap blue FOUC) ── */
.admin-sidebar-link.active {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
}
.admin-sidebar-link.active i {
    color: var(--slms-accent, #f97316) !important;
}

.btn,
.btn-primary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-light,
.btn-lg,
.btn-sm {
    border-radius: var(--slms-button-radius, 0.5rem) !important;
}

/* ── Bootstrap → theme bridge ─────────────────────────────────────────────
   Compiled Bootstrap hard-codes its blue (#0d6efd) inside components: badges,
   .text-primary, checkboxes, pills, dropdown/list/pagination active states,
   progress bars, focus rings and the pressed state of buttons. Point them at
   the theme tokens so staff screens use LeagueArc's palette and public pages
   use the league's own palette (both set by base.html). */
:root {
  --bs-primary: var(--slms-primary);
  --bs-primary-rgb: var(--slms-primary-rgb, 52, 58, 64);
  --bs-primary-text-emphasis: var(--slms-primary-text, var(--slms-primary));
  --bs-primary-bg-subtle: color-mix(in srgb, var(--slms-primary) 7%, var(--slms-surface, #fff));
  --bs-primary-border-subtle: color-mix(in srgb, var(--slms-primary) 20%, var(--slms-surface, #fff));
  --bs-focus-ring-color: color-mix(in srgb, var(--slms-accent) 28%, transparent);
}
.text-primary { color: var(--slms-primary-text, var(--slms-primary)) !important; }
.link-primary,
.link-primary:hover,
.link-primary:focus { color: var(--slms-primary-text, var(--slms-primary)) !important; text-decoration-color: currentColor !important; }
.text-bg-primary { color: var(--slms-on-primary, #fff) !important; background-color: var(--slms-primary) !important; }
/* No !important: "badge bg-primary bg-opacity-10 text-primary" must keep .text-primary. */
.badge.bg-primary { color: var(--slms-on-primary, #fff); }
.btn-primary {
  --bs-btn-bg: var(--slms-button-bg, var(--slms-primary));
  --bs-btn-border-color: var(--slms-button-border, var(--slms-primary));
  --bs-btn-color: var(--slms-button-color, #fff);
  --bs-btn-hover-bg: var(--slms-button-hover-bg, var(--slms-primary));
  --bs-btn-hover-border-color: var(--slms-button-hover-border, var(--slms-primary));
  --bs-btn-hover-color: var(--slms-button-hover-color, #fff);
  --bs-btn-active-bg: var(--slms-button-hover-bg, var(--slms-primary));
  --bs-btn-active-border-color: var(--slms-button-hover-border, var(--slms-primary));
  --bs-btn-active-color: var(--slms-button-hover-color, #fff);
  --bs-btn-disabled-bg: var(--slms-button-bg, var(--slms-primary));
  --bs-btn-disabled-border-color: var(--slms-button-border, var(--slms-primary));
  --bs-btn-disabled-color: var(--slms-button-color, #fff);
  --bs-btn-focus-shadow-rgb: var(--slms-accent-rgb, 249, 115, 22);
}
.btn-outline-primary {
  --bs-btn-color: var(--slms-button-outline-color, var(--slms-primary));
  --bs-btn-border-color: var(--slms-button-outline-color, var(--slms-primary));
  --bs-btn-hover-bg: var(--slms-button-outline-hover-bg, var(--slms-primary));
  --bs-btn-hover-border-color: var(--slms-button-outline-hover-bg, var(--slms-primary));
  --bs-btn-hover-color: var(--slms-button-outline-hover-color, #fff);
  --bs-btn-active-bg: var(--slms-button-outline-hover-bg, var(--slms-primary));
  --bs-btn-active-border-color: var(--slms-button-outline-hover-bg, var(--slms-primary));
  --bs-btn-active-color: var(--slms-button-outline-hover-color, #fff);
  --bs-btn-disabled-color: var(--slms-button-outline-color, var(--slms-primary));
  --bs-btn-disabled-border-color: var(--slms-button-outline-color, var(--slms-primary));
  --bs-btn-focus-shadow-rgb: var(--slms-accent-rgb, 249, 115, 22);
}
.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--slms-primary);
  border-color: var(--slms-primary);
}
.form-check-input:focus {
  border-color: color-mix(in srgb, var(--slms-accent) 55%, var(--slms-surface, #fff));
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}
.form-switch .form-check-input:focus:not(:checked) {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}
.form-range::-webkit-slider-thumb { background-color: var(--slms-primary); }
.form-range::-moz-range-thumb { background-color: var(--slms-primary); }
/* Separate rules: a browser drops a whole selector list holding the other engine's pseudo-element. */
.form-range::-webkit-slider-thumb:active { background-color: color-mix(in srgb, var(--slms-primary) 45%, var(--slms-surface, #fff)); }
.form-range::-moz-range-thumb:active { background-color: color-mix(in srgb, var(--slms-primary) 45%, var(--slms-surface, #fff)); }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--slms-surface, #fff), 0 0 0 0.25rem var(--bs-focus-ring-color); }
.form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px var(--slms-surface, #fff), 0 0 0 0.25rem var(--bs-focus-ring-color); }
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--slms-primary);
  --bs-nav-pills-link-active-color: var(--slms-on-primary, #fff);
}
.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--slms-primary);
  --bs-dropdown-link-active-color: var(--slms-on-primary, #fff);
}
.list-group {
  --bs-list-group-active-bg: var(--slms-primary);
  --bs-list-group-active-border-color: var(--slms-primary);
  --bs-list-group-active-color: var(--slms-on-primary, #fff);
}
.pagination {
  --bs-pagination-active-bg: var(--slms-primary);
  --bs-pagination-active-border-color: var(--slms-primary);
  --bs-pagination-active-color: var(--slms-on-primary, #fff);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}
.progress,
.progress-stacked { --bs-progress-bar-bg: var(--slms-primary); }
.accordion {
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
  --bs-accordion-active-color: var(--bs-primary-text-emphasis);
  --bs-accordion-active-bg: var(--bs-primary-bg-subtle);
}
.table-primary {
  --bs-table-bg: var(--bs-primary-bg-subtle);
  --bs-table-color: var(--bs-primary-text-emphasis);
  --bs-table-border-color: var(--bs-primary-border-subtle);
}

/* ── Page changes ─────────────────────────────────────────────────────────
   Same-site page changes cross-fade instead of blinking white (Chrome, Edge
   and Safari 18.2+; other browsers just navigate). Both pages must opt in, so
   the rule lives in this shared sheet; login.html and the marketing base carry
   the same rule. The easing matches the marketing site's --ease-out. */
:root {
  --slms-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --slms-duration-page: 220ms;
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: var(--slms-duration-page);
    animation-timing-function: var(--slms-ease-out);
  }
  /* The admin sidebar and top bar are the same on every page: give them their
     own names so they hold still while only the content cross-fades. */
  .admin-sidebar { view-transition-name: admin-sidebar; }
  .admin-topbar { view-transition-name: admin-topbar; }
  ::view-transition-group(admin-sidebar),
  ::view-transition-group(admin-topbar) {
    animation-duration: var(--slms-duration-page);
  }
}

/* ── Game status colours ──────────────────────────────────────────────────
   One set for every status pill. Scheduled is the common state, so it stays
   quiet (an outline); colour is kept for what needs attention: live games in
   the accent, finals in solid ink, postponed in amber, canceled and forfeit
   in red. Pages point their own status classes at these. */
:root {
  --slms-status-scheduled-bg: transparent;
  --slms-status-scheduled-fg: var(--slms-muted);
  --slms-status-scheduled-border: var(--slms-card-border, var(--slms-border));
  --slms-status-live-bg: color-mix(in srgb, var(--slms-accent) 12%, var(--slms-surface, #fff));
  --slms-status-live-fg: var(--slms-accent-text, var(--slms-accent));
  --slms-status-final-bg: var(--slms-primary);
  --slms-status-final-fg: var(--slms-on-primary, #fff);
  --slms-status-postponed-bg: var(--bs-warning-bg-subtle);
  --slms-status-postponed-fg: var(--bs-warning-text-emphasis);
  --slms-status-canceled-bg: var(--bs-danger-bg-subtle);
  --slms-status-canceled-fg: var(--bs-danger-text-emphasis);
}
/* The pulsing dot a live status shows in place of its icon. */
.slms-live-dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .slms-live-dot { animation: slms-live-pulse 1.6s ease-in-out infinite; }
}
@keyframes slms-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
/*
  Global UI polish for Sports League Management System
  - Unifies look across legacy (layout.html) and modern (base.html) templates
  - Adds spacing, typography, tables, cards, forms
  - Provides Bootstrap 4-era class shims for Bootstrap 5 (e.g., .jumbotron)
*/

:root {
  --slms-primary: #343a40;
  --slms-bg-soft: #f8f9fa;
  --slms-border: #e9ecef;
  --slms-text-muted: #6c757d;
}

/* Fallback to configured org color when available via inline CSS var injection */
:root { --primary-color: var(--slms-primary); }

/* Typography & spacing */
body {
  background-color: #fff;
  font-family: Inter, system-ui, sans-serif;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: Inter, system-ui, sans-serif;
}
.section-title { margin-bottom: 1rem; }
.content { padding-top: 1rem; padding-bottom: 1rem; }

/* Accessibility helpers */
.visually-hidden-focusable {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.visually-hidden-focusable:focus,
.visually-hidden-focusable:focus-visible {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translate(-50%, 0);
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.75rem 1.5rem;
  overflow: visible;
  opacity: 1;
}

.skip-link {
  background: var(--slms-heading, #111827);
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
  z-index: 2000;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body :focus-visible {
  outline: 3px solid var(--slms-accent, #f97316);
  outline-offset: 3px;
  box-shadow: none !important;
}

body :focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

.nav-link.disabled {
  color: var(--slms-text-muted) !important;
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-link .nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Layout scaffolding */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-header .page-title {
  margin: 0;
  font-weight: 600;
}

.page-header .page-subtitle {
  margin: 0;
  color: var(--slms-text-muted);
}

.page-header .page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Navbar spacing */
.navbar .nav-link { font-weight: 500; }

/* Cards */
.card { border-radius: .5rem; border-color: var(--slms-border); }
.card-header { background-color: var(--slms-bg-soft); }

/* Tables */
.table thead th { border-bottom: 2px solid var(--slms-border); }
.table-hover tbody tr:hover { background-color: color-mix(in srgb, var(--slms-primary) 4%, transparent); }
.table-responsive { overflow-x: auto; }

/* Forms */
.form-label { font-weight: 500; }
.form-control, .form-select { border-radius: .5rem; }
.input-group-text { background-color: var(--slms-bg-soft); }

/* Buttons */
.btn {
    font-family: inherit;
    border-radius: var(--slms-button-radius, 0.5rem) !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none !important;
}
.btn:hover, .btn:focus, .btn:active {
  text-decoration: none !important;
}
.btn-primary {
  background: var(--slms-button-bg, var(--primary-color, #343a40));
  border-color: var(--slms-button-border, var(--primary-color, #343a40));
  color: var(--slms-button-color, #fff);
  border-radius: var(--slms-button-radius, 0.5rem);
  box-shadow: var(--slms-button-shadow, none);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--slms-button-hover-bg, var(--slms-button-bg, var(--primary-color, #343a40)));
  border-color: var(--slms-button-hover-border, var(--slms-button-border, var(--primary-color, #343a40)));
  color: var(--slms-button-hover-color, #fff);
}
.btn-outline-primary {
  color: var(--slms-button-outline-color, var(--primary-color, #343a40));
  border-color: var(--slms-button-outline-color, var(--primary-color, #343a40));
  border-radius: var(--slms-button-radius, 0.5rem);
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background: var(--slms-button-outline-hover-bg, var(--primary-color, #343a40));
  color: var(--slms-button-outline-hover-color, #fff);
  border-color: var(--slms-button-outline-color, var(--primary-color, #343a40));
}

/* Badges for game status */
.game-status-badge { font-size: .75rem; padding: .25rem .5rem; }

/* Enhanced match and schedule styling */
.venue-pill {
  background-color: color-mix(in srgb, var(--slms-primary) 8%, transparent);
  color: var(--slms-primary-text, var(--slms-primary));
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.match-status-badge {
  font-weight: 500;
  font-size: 0.75rem;
}

.match-row:hover {
  background-color: color-mix(in srgb, var(--slms-primary) 5%, transparent);
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.match-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.game-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.game-item:hover {
  background-color: color-mix(in srgb, var(--slms-primary) 5%, transparent);
  border-left-color: var(--slms-primary);
}

.game-item[data-status="live"] {
  border-left-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
}

.pulse {
  animation: pulse 2s infinite;
}

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

.stat-box {
  padding: 1rem 0;
  border-radius: 0.5rem;
}

.team-name {
  font-weight: 600;
  color: #333;
}

.btn-group .btn {
  border-radius: 0.375rem;
  margin-left: 2px;
}

.btn-group .btn:first-child {
  margin-left: 0;
}

/* Calendar view styling */
.calendar-grid .month-section h5 {
  color: var(--slms-primary);
  border-bottom: 2px solid var(--slms-border);
  padding-bottom: 0.5rem;
}

.calendar-grid .card {
  height: 100%;
  min-height: 150px;
}

.calendar-grid .card-header {
  text-align: center;
  font-weight: 600;
}

/* Filter section styling */
.card .form-label {
  color: #495057;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* Quick stats styling */
.stat-box h4 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-box small {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Enhanced table responsiveness */
@media (max-width: 768px) {
  .match-row .col-md-2,
  .match-row .col-md-6 {
    margin-bottom: 0.5rem;
  }

  .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .venue-pill {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
  }
}

/* Status-specific styling */
.game-item[data-status="final"] {
  border-left-color: #198754;
}

.game-item[data-status="postponed"] {
  border-left-color: #ffc107;
}

.game-item[data-status="cancelled"] {
  border-left-color: #6c757d;
  opacity: 0.7;
}

/* Loading states */
.spinner-border {
  color: var(--slms-primary);
}

/* ── Empty States (unified) ── */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state i:not(.empty-state-icon-box i):not(.empty-state-step-icon i):not(.empty-state-cta i) {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 1rem;
  display: block;
  color: var(--slms-muted, #6b7280);
}

.empty-state-icon-box {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md, 16px);
  background: color-mix(in srgb, var(--slms-primary, #343a40) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.empty-state-icon-box i {
  font-size: 2rem;
  color: var(--slms-primary, #343a40);
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slms-heading, #111827);
  margin-bottom: 0.5rem;
}

.empty-state-description {
  color: var(--slms-muted, #6b7280);
  font-size: 0.875rem;
  max-width: 420px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}

.empty-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.empty-state-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--slms-button-radius, 8px);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--slms-secondary, #6c757d);
  color: var(--slms-text, #1f2937);
  background: var(--slms-surface, #ffffff);
  cursor: pointer;
  transition: var(--transition-base, all 0.25s ease);
}

.empty-state-cta:hover {
  background: color-mix(in srgb, var(--slms-primary, #343a40) 8%, var(--slms-surface, #ffffff));
  border-color: var(--slms-primary, #343a40);
  color: var(--slms-primary, #343a40);
  text-decoration: none;
}

.empty-state-cta.cta-primary {
  background: var(--slms-button-bg, var(--slms-primary, #343a40));
  color: var(--slms-button-color, #ffffff);
  border-color: var(--slms-button-bg, var(--slms-primary, #343a40));
}

.empty-state-cta.cta-primary:hover {
  background: var(--slms-button-hover-bg, color-mix(in srgb, var(--slms-primary, #343a40) 85%, #000));
  color: var(--slms-button-color, #ffffff);
}

/* Public-facing empty state: informational, no CTAs */
.empty-state--public {
  border: 2px dashed color-mix(in srgb, var(--slms-muted, #6b7280) 40%, transparent);
  border-radius: var(--radius-md, 16px);
  background: color-mix(in srgb, var(--slms-background, #f5f6fa) 60%, var(--slms-surface, #ffffff));
}

/* Inline variant for table cells */
.empty-state--inline {
  padding: 2rem 1rem;
  min-height: auto;
}

/* Guided admin empty states with next-best-action steps */
.empty-state--guided {
  border: 1px solid color-mix(in srgb, var(--slms-muted) 24%, transparent);
  border-radius: var(--slms-card-radius);
  background: color-mix(in srgb, var(--slms-surface) 88%, var(--slms-background));
  box-shadow: var(--slms-card-shadow);
}

.empty-state-checklist {
  display: grid;
  gap: 0.5rem;
  width: min(100%, 520px);
  margin: 0 auto 1.25rem;
  text-align: left;
}

.empty-state-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--slms-muted) 22%, transparent);
  border-radius: var(--slms-button-radius);
  color: var(--slms-text);
  background: var(--slms-surface);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.empty-state-step:hover {
  color: var(--slms-primary);
  border-color: color-mix(in srgb, var(--slms-primary) 42%, transparent);
  background: color-mix(in srgb, var(--slms-primary) 6%, var(--slms-surface));
  text-decoration: none;
}

.empty-state-step-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--slms-button-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--slms-primary) 10%, transparent);
  color: var(--slms-primary);
}

.empty-state-step-icon i {
  font-size: 1rem;
  margin: 0;
  opacity: 1;
  color: inherit;
}

/* Player Management CRM Styles */
.stat-card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.avatar-placeholder, .avatar-placeholder-large, .avatar-placeholder-small {
  background-color: var(--slms-bg-soft);
  border: 2px solid var(--slms-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slms-text-muted);
  font-size: 1.2rem;
}

.avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.avatar-placeholder-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
}

.avatar-placeholder-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
}

.team-badge, .team-badge-small {
  background-color: color-mix(in srgb, var(--slms-primary) 8%, transparent);
  color: var(--slms-primary-text, var(--slms-primary));
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.team-badge-small {
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
}

.position-pill {
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.position-goalkeeper { background-color: #dc3545; color: white; }
.position-defender { background-color: #198754; color: white; }
.position-midfielder { background-color: #ffc107; color: #212529; }
.position-forward { background-color: #fd7e14; color: white; }

.status-badge {
  font-weight: 500;
  font-size: 0.75rem;
}

.status-active { background-color: #198754 !important; }
.status-injured { background-color: #dc3545 !important; }
.status-suspended { background-color: #ffc107 !important; color: #212529 !important; }
.status-inactive { background-color: #6c757d !important; }
.status-trial { background-color: var(--bs-info-bg-subtle) !important; color: var(--bs-info-text-emphasis) !important; box-shadow: inset 0 0 0 1px var(--bs-info-border-subtle); }
.status-loan { background-color: var(--slms-primary) !important; color: var(--slms-on-primary, #fff) !important; }

.rating-bar {
  height: 8px;
  background-color: var(--slms-bg-soft);
  border-radius: 4px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #198754 100%);
  transition: width 0.3s ease;
}

.player-profile-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-profile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--slms-border);
}

.detail-label {
  font-weight: 500;
  color: var(--slms-text-muted);
  font-size: 0.875rem;
}

.player-list-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.player-list-item:hover {
  background-color: color-mix(in srgb, var(--slms-primary) 5%, transparent);
  border-left-color: var(--slms-primary);
}

.photo-preview {
  width: 150px;
  height: 150px;
  border: 2px dashed var(--slms-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--slms-bg-soft);
  color: var(--slms-text-muted);
  margin: 0 auto;
  cursor: pointer;
}

.photo-preview:hover {
  border-color: var(--slms-primary);
  color: var(--slms-primary);
}

.photo-preview i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.bulk-actions {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contract-info {
  font-size: 0.875rem;
}

.performance-section {
  background-color: var(--slms-bg-soft);
  padding: 0.75rem;
  border-radius: 0.5rem;
}

/* Responsive adjustments for player management */
@media (max-width: 768px) {
  .stat-card .card-body {
    flex-direction: column;
    text-align: center;
  }

  .stat-icon {
    margin-bottom: 0.5rem;
  }

  .player-profile-card .card-body {
    padding: 0.75rem;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-label {
    margin-bottom: 0.25rem;
  }
}

/* Tab content styling */
.nav-tabs .nav-link {
  color: var(--slms-text-muted);
  border: none;
  border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link.active {
  color: var(--slms-primary);
  border-bottom-color: var(--slms-primary);
  background-color: transparent;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--slms-primary);
  color: var(--slms-primary);
}

/* Filter section enhancements */
.pm-filters .collapse.show {
  animation: expandDown 0.3s ease;
}

@keyframes expandDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

/* Advanced search highlight */
.form-control:focus, .form-select:focus {
  border-color: var(--slms-primary);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--slms-accent) 25%, transparent);
}

/* Jumbotron shim (Bootstrap 4 -> 5) */
.jumbotron { background-color: var(--slms-bg-soft); border-radius: .75rem; }
.jumbotron .display-4 { font-weight: 700; }
.jumbotron p.lead { color: var(--slms-text-muted); }

/* Legacy .close button -> style similar to .btn-close */
.close { font-size: 1.25rem; line-height: 1; opacity: .6; }
.close:hover { opacity: 1; }

/* Utility pills */
.venue-pill { background-color: var(--slms-bg-soft); border: 1px solid var(--slms-border); border-radius: 1rem; padding: .25rem .75rem; font-size: .875rem; }

/* Footer */
footer .text-muted { color: var(--slms-text-muted) !important; }

/* ============================================================
   FOOTER — editorial ink default
   Premium sports-media vibe: confident Bebas wordmark, ghost CTA,
   muted secondary type. All muting derives from currentColor +
   opacity so the footer remains readable on ANY admin-set bg
   color, not just dark. Hairlines use color-mix for the same reason.
   ============================================================ */

/* ============================================================
   FOOTER — simple. Logo on the left, columns to the right,
   thin hairline, copyright. Nothing else.
   ============================================================ */

.footer-shell {
  position: relative;
  color: #ededed;
  background: #0d0e10;
  padding: 3.5rem 0 0;
  margin-top: auto;
  width: 100%;
  font-family: var(--slms-font-base, system-ui, -apple-system, "Segoe UI", sans-serif);
}

body.public-page:not(.tenant-public-page) .footer-shell {
  isolation: isolate;
  overflow: hidden;
  color: var(--slms-surface, currentColor) !important;
  background: var(--slms-heading) !important;
}

body.public-page:not(.tenant-public-page) .footer-shell::before,
body.public-page:not(.tenant-public-page) .footer-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.public-page:not(.tenant-public-page) .footer-shell::before {
  z-index: 0;
  background-image: url("../images/public-footer-stadium.png");
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
  opacity: 0.84;
  filter: contrast(1.08);
}

body.public-page:not(.tenant-public-page) .footer-shell::after {
  z-index: 0;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--slms-heading) 92%, transparent) 0%,
      color-mix(in srgb, var(--slms-heading) 72%, transparent) 42%,
      color-mix(in srgb, var(--slms-heading) 78%, transparent) 58%,
      color-mix(in srgb, var(--slms-heading) 92%, transparent) 100%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--slms-heading) 82%, transparent) 0%,
      color-mix(in srgb, var(--slms-heading) 74%, transparent) 46%,
      color-mix(in srgb, var(--slms-heading) 90%, transparent) 100%);
}

body.public-page:not(.tenant-public-page) .footer-shell > * {
  position: relative;
  z-index: 1;
}

body.public-page:not(.tenant-public-page) .footer-shell .footer-brand,
body.public-page:not(.tenant-public-page) .footer-shell .footer-actions,
body.public-page:not(.tenant-public-page) .footer-shell .footer-column,
body.public-page:not(.tenant-public-page) .footer-shell .footer-meta-inner {
  text-shadow: 0 1px 18px color-mix(in srgb, var(--slms-heading) 72%, transparent);
}

body.public-page:not(.tenant-public-page) .footer-shell .footer-brand-title,
body.public-page:not(.tenant-public-page) .footer-shell .footer-column-title,
body.public-page:not(.tenant-public-page) .footer-shell .footer-link,
body.public-page:not(.tenant-public-page) .footer-shell .footer-legal,
body.public-page:not(.tenant-public-page) .footer-shell .footer-cta,
body.public-page:not(.tenant-public-page) .footer-shell .footer-social a,
body.public-page:not(.tenant-public-page) .footer-shell .footer-sponsor-name {
  color: var(--slms-surface, currentColor) !important;
}

body.public-page:not(.tenant-public-page) .footer-shell .footer-column-title,
body.public-page:not(.tenant-public-page) .footer-shell .footer-legal,
body.public-page:not(.tenant-public-page) .footer-shell .footer-social a {
  opacity: 0.78;
}

body.public-page:not(.tenant-public-page) .footer-shell .footer-link {
  opacity: 0.98;
}

/* Main row: brand on the left, columns filling the rest */
.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem 2.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 2rem 4rem;
}

/* Logo left, link columns center, contact CTA pinned top-right.
   Empty auto tracks collapse to 0, so missing brand/CTA degrades gracefully. */
.footer-brand   { grid-column: 1; }
.footer-columns { grid-column: 2; }
.footer-actions--end {
  grid-column: 3;
  justify-self: end;
  align-self: start;
  margin: 0;
}

.footer-top--columns-only .footer-columns {
  grid-column: 1 / -1;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
  min-width: 0;
}

.footer-logo {
  display: block;
  max-height: clamp(110px, 10vw, 150px);
  max-width: min(300px, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
}

/* The league's email and phone under the logo, when the footer shows them. */
.footer-contact {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.25rem;
  color: currentColor;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-contact-link i {
  flex: none;
  font-size: 1.1rem;
  opacity: 0.7;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: currentColor;
  text-decoration: underline;
}

/* Fallback wordmark when no logo image is set — kept simple, no Bebas */
.footer-brand-title {
  margin: 0;
  color: currentColor;
  font-family: var(--slms-font-heading, var(--slms-font-base, sans-serif));
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.footer-brand-title .badge { display: none; }

/* Footer actions render from CTA settings. Legacy tagline remains hidden. */
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  max-width: 18rem;
}

.footer-tagline {
  display: none;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  max-width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: var(--slms-button-radius, 0.5rem);
  color: currentColor;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.footer-cta i {
  flex: 0 0 auto;
  font-size: 1rem;
}

.footer-cta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-cta:hover,
.footer-cta:focus-visible {
  color: currentColor;
  text-decoration: none;
  opacity: 0.82;
}

.footer-cta-primary {
  background: var(--slms-button-bg, var(--slms-primary));
  border-color: var(--slms-button-bg, var(--slms-primary));
  color: var(--slms-button-color, var(--slms-surface)) !important;
}

.footer-cta-secondary,
.footer-cta-outline {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.footer-cta-link {
  background: transparent;
  border-color: transparent;
  padding-inline: 0.2rem;
}

/* Columns sit inside .footer-top in the new structure */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem 3rem;
  margin: 0;
  padding: 0;
  border: none;
  max-width: none;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.footer-column-title {
  margin: 0 0 0.35rem;
  padding: 0;
  color: currentColor;
  opacity: 0.5;
  font-family: var(--slms-font-base, inherit);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.footer-column-title::after { content: none; }

.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.footer-link {
  display: inline-block;
  width: fit-content;
  color: currentColor;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  opacity: 0.65;
  color: currentColor;
  transform: none;
  text-decoration: none;
}
.footer-link i { display: none; }

/* ── Sponsors ─────────────────────────────────────────────
   Logos render larger than ordinary nav links so partners
   feel acknowledged. Each logo sits on a subtle currentColor
   wash so it pops cleanly on either dark or saturated bgs. */
.footer-sponsors-col {
  justify-self: initial;
  text-align: left;
  gap: 1.1rem;
}
.footer-sponsors-col .footer-column-title {
  opacity: 0.6;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
}
.footer-sponsors-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
}
.footer-sponsor-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  background: color-mix(in srgb, currentColor 8%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 4px;
  text-decoration: none;
  opacity: 0.96;
  transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.footer-sponsor-item:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 14%, transparent);
  transform: translateY(-1px);
}
.footer-sponsor-item img {
  display: block;
  max-height: 56px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.footer-sponsor-name {
  color: currentColor;
  opacity: 0.78;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Bottom strip: hairline + copyright. No scrim, no extra noise. */
.footer-meta {
  margin: 0;
  padding: 1.5rem 2.5rem;
  background: transparent;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.footer-shell[style] .footer-meta {
  border-top-color: color-mix(in srgb, currentColor 22%, transparent);
}
.footer-shell[style] .footer-brand-title,
.footer-shell[style] .footer-column-title,
.footer-shell[style] .footer-link,
.footer-shell[style] .footer-link:hover,
.footer-shell[style] .footer-link:focus-visible,
.footer-shell[style] .footer-legal,
.footer-shell[style] .footer-cta:not(.footer-cta-primary),
.footer-shell[style] .footer-cta:not(.footer-cta-primary):hover,
.footer-shell[style] .footer-cta:not(.footer-cta-primary):focus-visible,
.footer-shell[style] .footer-social a,
.footer-shell[style] .footer-social a:hover,
.footer-shell[style] .footer-social a:focus-visible,
.footer-shell[style] .footer-sponsor-name {
  color: currentColor !important;
}
.footer-meta-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  color: currentColor;
  font-size: 0.85rem;
  letter-spacing: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
}

/* Custom org legal text stays quiet; the platform attribution is its own link */
.footer-legal .footer-legal-text {
  opacity: 0.5;
}

.footer-powered {
  color: currentColor;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.footer-powered:hover,
.footer-powered:focus-visible {
  opacity: 1;
  color: currentColor;
  text-decoration: none;
}

.footer-powered-brand {
  font-weight: 600;
}

/* "Have a question? Ask the league": shown only when the league has Ask the league on. */
.footer-ask {
  color: currentColor;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-ask:hover,
.footer-ask:focus-visible {
  color: currentColor;
}

/* LeagueArc's one-line invitation under a league's scoreboards, game pages and payment confirmations
   (templates/public/_leaguearc_promo.html). Quiet by design: it belongs to the league's page, not over it. */
.la-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  margin: 2rem auto 0;
  max-width: 100%;
  padding: 0.9rem 1.1rem;
  background: var(--slms-surface, #ffffff);
  border: 1px solid color-mix(in srgb, var(--slms-text, #1f2937) 10%, transparent);
  border-radius: var(--slms-card-radius, 12px);
  color: var(--slms-muted, #6b7280);
  font-size: 0.875rem;
  line-height: 1.45;
}

.la-promo-text {
  margin: 0;
  flex: 1 1 18rem;
}

.la-promo-ask {
  color: var(--slms-heading, #111827);
  font-weight: 650;
  margin-right: 0.25rem;
}

.la-promo-link {
  flex: 0 0 auto;
  color: var(--slms-heading, #111827);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid color-mix(in srgb, var(--slms-accent, #f97316) 70%, transparent);
  padding-bottom: 1px;
}

.la-promo-link:hover,
.la-promo-link:focus-visible {
  color: var(--slms-heading, #111827);
  border-bottom-color: var(--slms-accent, #f97316);
  text-decoration: none;
}

@media (max-width: 560px) {
  .la-promo { padding: 0.85rem 1rem; }
  .la-promo-link { white-space: normal; }
}

/* Social — small, quiet, optional */
.footer-social {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: currentColor;
  opacity: 0.5;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 0;
  background: transparent;
  transition: opacity 0.15s ease;
}
.footer-social a:hover,
.footer-social a:focus-visible {
  opacity: 1;
  background: transparent;
  color: currentColor;
}

/* Empty state (no columns) — keep the brand row tight */
.footer-shell:not(:has(.footer-columns)) .footer-top {
  padding-bottom: 2rem;
}

@media (max-width: 720px) {
  .footer-top {
    grid-template-columns: 1fr;
    padding: 0 1.5rem 2rem;
    gap: 2rem;
  }
  .footer-brand,
  .footer-columns,
  .footer-actions--end {
    grid-column: 1;
  }
  .footer-actions--end { justify-self: start; }
  .footer-meta { padding: 1.25rem 1.5rem; }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .footer-meta-inner { justify-content: center; text-align: center; }
}

/* ── Modern (default) variant ─────────────────────────────── */
.footer-modern .footer-shell {
  background: #0d0e10;
}

/* Classic - traditional layout, softer dark background */
.footer-classic .footer-shell {
  background: #1f2937;
  border-top: 3px solid var(--slms-primary, #343a40);
}

.footer-classic .footer-top {
  flex-direction: column;
  gap: 1.25rem;
}

.footer-classic .footer-actions {
  order: 2;
}

.footer-classic .footer-columns {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Minimal - clean and restrained */
.footer-minimal .footer-shell {
  background: #f8fafc;
  color: #475569;
  padding: 2rem 0 1rem;
}

.footer-minimal .footer-brand-title {
  color: #1e293b;
  font-size: 1.15rem;
}

.footer-minimal .footer-brand-title .badge {
  display: none;
}

.footer-minimal .footer-tagline {
  color: #64748b;
  font-size: 0.875rem;
}

.footer-minimal .footer-top {
  padding-bottom: 1rem;
}

.footer-minimal .footer-actions .btn {
  font-size: 0.875rem;
  padding: 0.4rem 1rem;
}

.footer-minimal .footer-actions .btn-primary {
  background: #334155;
  border-color: #334155;
}

.footer-minimal .footer-actions .btn-outline-light {
  color: #475569;
  border-color: #cbd5e1;
}

.footer-minimal .footer-actions .btn-outline-light:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.footer-minimal .footer-columns {
  border-top-color: #e2e8f0;
}

.footer-minimal .footer-column-title {
  color: #1e293b;
  font-size: 0.85rem;
}

.footer-minimal .footer-link {
  color: #64748b;
}

.footer-minimal .footer-link:hover {
  color: #1e293b;
}

.footer-minimal .footer-meta {
  border-top-color: #e2e8f0;
}

.footer-minimal .footer-legal {
  color: #94a3b8;
}

.footer-minimal .footer-social a {
  color: #64748b;
}

.footer-minimal .footer-social a:hover {
  color: #1e293b;
}

/* Centered - everything centered */
.footer-centered .footer-shell {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  text-align: center;
}

.footer-centered .footer-top {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-centered .footer-brand {
  text-align: center;
  min-width: auto;
}

.footer-centered .footer-brand-title {
  justify-content: center;
}

.footer-centered .footer-actions {
  justify-content: center;
}

.footer-centered .footer-columns {
  justify-items: center;
  text-align: center;
}

.footer-centered .footer-column {
  align-items: center;
}

.footer-centered .footer-link {
  justify-content: center;
}

.footer-centered .footer-meta {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-centered .footer-social {
  justify-content: center;
}

/* Dark - deep dark background, high contrast */
.footer-dark .footer-shell {
  background: #0b0f19;
  color: #cbd5e1;
}

.footer-dark .footer-brand-title {
  color: #f1f5f9;
}

.footer-dark .footer-brand-title .badge {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
}

.footer-dark .footer-tagline {
  color: #94a3b8;
}

.footer-dark .footer-columns {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.footer-dark .footer-column-title {
  color: #e2e8f0;
}

.footer-dark .footer-link {
  color: #94a3b8;
}

.footer-dark .footer-link:hover {
  color: #e2e8f0;
}

.footer-dark .footer-meta {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.footer-dark .footer-legal {
  color: #64748b;
}

.footer-dark .footer-social a {
  color: #94a3b8;
}

.footer-dark .footer-social a:hover {
  color: #e2e8f0;
}

/* Default style - simple icons */
.footer-social-default a {
  width: auto;
  height: auto;
  padding: 0.25rem;
}

.footer-social-default a:hover {
  transform: translateY(-2px);
}

/* Circular buttons */
.footer-social-circular a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.footer-social-circular a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

/* Square buttons */
.footer-social-square a {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.footer-social-square a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Minimal style - text only */
.footer-social-minimal a {
  width: auto;
  height: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.footer-social-minimal a i {
  display: none;
}

.footer-social-minimal a::after {
  content: attr(aria-label);
  margin-left: 0;
}

.footer-social-minimal a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
  }

  /* Two link groups a row on phones (as the 720px rule above intends), so a
     footer of four groups isn't one long column of links. */
  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
  }

  .footer-meta {
    flex-direction: column;
    text-align: center;
  }
}

/* Responsive tweaks */
@media (max-width: 576px) {
  .navbar-brand img { height: 32px; }
}

/* ========================================
   UX UTILITIES - Loading States & Feedback
   ======================================== */

/* Button Loading State */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  margin-left: -0.5rem;
  margin-top: -0.5rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: btn-spinner 0.75s linear infinite;
}

.btn-loading.btn-sm::after {
  width: 0.75rem;
  height: 0.75rem;
  margin-left: -0.375rem;
  margin-top: -0.375rem;
}

.btn-loading.btn-lg::after {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: -0.625rem;
  margin-top: -0.625rem;
}

@keyframes btn-spinner {
  to { transform: rotate(360deg); }
}

/* Inline Save Indicator */
.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.save-indicator.show {
  opacity: 1;
}

.save-indicator.saving {
  color: var(--slms-muted, #6c757d);
}

.save-indicator.saved {
  color: #198754;
}

.save-indicator.error {
  color: #dc3545;
}

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 0.25rem;
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text.skeleton-sm {
  height: 0.75rem;
}

.skeleton-text.skeleton-lg {
  height: 1.25rem;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

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

.skeleton-cell {
  flex: 1;
  margin-right: 1rem;
}

.skeleton-cell:last-child {
  margin-right: 0;
}

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

/* Unsaved Changes Indicator */
.form-unsaved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background-color: #fff3cd;
  color: #856404;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.form-unsaved-indicator.show {
  opacity: 1;
}

.form-unsaved-indicator i {
  font-size: 0.875rem;
}

/* Form Field States */
.form-control.is-validating {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3e%3ccircle cx='12' cy='12' r='10' stroke-dasharray='31.4' stroke-dashoffset='31.4'%3e%3canimate attributeName='stroke-dashoffset' dur='1s' values='31.4;0' repeatCount='indefinite'/%3e%3c/circle%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

/* (Empty state styles consolidated above) */

/* Focus Improvements */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 3px solid var(--slms-accent, #f97316);
  outline-offset: 2px;
}

/* Status Pill Enhancement */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

.status-pill.status-active { color: #198754; background-color: rgba(25, 135, 84, 0.1); }
.status-pill.status-pending { color: #fd7e14; background-color: rgba(253, 126, 20, 0.1); }
.status-pill.status-inactive { color: #6c757d; background-color: rgba(108, 117, 125, 0.1); }
.status-pill.status-error { color: #dc3545; background-color: rgba(220, 53, 69, 0.1); }

/* ── Mobile card & text overflow prevention ────────────────── */

/* Prevent text from hanging off cards on any screen */
.card,
.card-body,
.info-card,
.list-group-item {
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

/* Headings inside cards shouldn't overflow */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card .h1, .card .h2, .card .h3, .card .h4, .card .h5, .card .h6,
.info-card h1, .info-card h2, .info-card h3, .info-card h4, .info-card h5, .info-card h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

/* Flex children inside cards need min-width: 0 to allow shrinking */
.card .d-flex > *,
.info-card .d-flex > *,
.list-group-item .d-flex > * {
    min-width: 0;
}

/* Flex-grow items must be able to shrink */
.card .flex-grow-1,
.info-card .flex-grow-1,
.list-group-item .flex-grow-1 {
    min-width: 0;
    overflow-wrap: break-word;
}

@media (max-width: 767.98px) {
    /* Headers with buttons: stack vertically on mobile */
    .d-flex.justify-content-between.align-items-center:has(.btn) {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Season tile: stack vertically */
    .season-tile {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    /* Game matchup rows: remove fixed min-widths */
    .game-item .team-name {
        min-width: 0 !important;
    }

    /* Nav pills: horizontal scroll on mobile */
    .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-pills::-webkit-scrollbar {
        display: none;
    }
    .nav-pills .nav-item {
        flex-shrink: 0;
    }

    /* Countdown units: shrink on mobile */
    .countdown-unit {
        min-width: 60px !important;
        max-width: none !important;
        padding: 0.5rem !important;
    }

    /* Quick stat boxes: 2-column grid on mobile */
    .stat-box {
        padding: 0.75rem 0;
    }

    /* Calendar: show abbreviated day names */
    .calendar-header {
        font-size: 0.6rem;
        padding: 0.5rem 0.25rem;
    }
    .calendar-day {
        min-height: 80px;
        padding: 0.35rem;
    }
    .calendar-game {
        font-size: 0.6rem;
        padding: 0.25rem;
    }
    .calendar-game-time {
        font-size: 0.55rem;
    }
    .calendar-game-teams {
        font-size: 0.6rem;
    }
    .calendar-month-year {
        font-size: 1.25rem;
    }
    .calendar-nav-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    /* CTA panel: stack on mobile */
    .cta-panel {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem;
    }
    .cta-panel .d-flex {
        justify-content: center;
    }

    /* Filter bar: stack on mobile */
    .card-body .row.align-items-center > .col-md-6.text-end {
        text-align: start !important;
        margin-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    /* Hero list: tighter spacing */
    .hero-list li {
        font-size: 0.875rem;
    }

    /* Buttons in headers: full width */
    .d-flex.gap-2:has(.btn-outline-primary) {
        flex-wrap: wrap;
    }
    .d-flex.gap-2:has(.btn-outline-primary) .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    /* Game info in schedule: smaller */
    .venue-pill {
        font-size: 0.7rem;
    }
}

/* ── Venue Map Button ──────────────────────────────────────────── */
.venue-map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--slms-primary) 8%, transparent);
    color: var(--slms-primary);
    margin-left: 0.35rem;
    vertical-align: middle;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.85rem;
}

.venue-map-btn:hover {
    background: var(--slms-primary);
    color: #fff;
}

/* ===========================================
   Mobile Navigation Layouts
   =========================================== */

/* Hamburger fade animation variant */
.mobile-nav-fade.collapsing {
    transition: opacity 0.3s ease;
    opacity: 0;
    height: auto !important;
}
.mobile-nav-fade.collapse.show {
    opacity: 1;
}

/* Hamburger collapse: scroll when menu is long */
@media (max-width: 991.98px) {
    .navbar-collapse.collapse.show,
    .navbar-collapse.collapsing {
        max-height: calc(100vh - 60px);
        max-height: calc(100dvh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Bottom Tab Bar ── */
.mobile-bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: var(--slms-surface, #fff);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    min-height: 64px;
}

.mobile-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 48px;
    padding: 8px 4px 6px;
    color: var(--slms-text-muted, #6c757d);
    text-decoration: none;
    font-size: 0.75rem;
    gap: 3px;
    transition: color 0.15s ease;
    position: relative;
}

.mobile-tab-item i {
    font-size: 1.35rem;
}

.mobile-tab-label {
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72px;
}

.mobile-tab-item.active {
    color: var(--slms-primary, #4f46e5);
    font-weight: 600;
}

/* Active styles */
.tab-active-pill .mobile-tab-item.active i {
    background: color-mix(in srgb, var(--slms-primary, #4f46e5) 12%, transparent);
    border-radius: 999px;
    padding: 2px 12px;
}

.tab-active-underline .mobile-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 2.5px;
    background: var(--slms-primary, #4f46e5);
    border-radius: 2px;
}

.tab-active-dot .mobile-tab-item.active::after {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--slms-primary, #4f46e5);
    margin-top: 1px;
}

/* Bottom padding for page content when tab bar is present */
.has-bottom-tab-bar {
    padding-bottom: 80px;
}

/* ── Slide-Out Drawer ── */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1050;
    pointer-events: none;
    visibility: hidden;
}

.mobile-drawer.open {
    pointer-events: auto;
    visibility: visible;
}

.mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer.open .mobile-drawer-backdrop {
    opacity: 1;
}

.mobile-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(300px, 85vw);
    background: var(--slms-surface, #fff);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top, 0px);
}

/* Left drawer */
.drawer-left .mobile-drawer-panel {
    left: 0;
    transform: translateX(-100%);
    padding-left: env(safe-area-inset-left, 0px);
}
.drawer-left.open .mobile-drawer-panel {
    transform: translateX(0);
}

/* Right drawer */
.drawer-right .mobile-drawer-panel {
    right: 0;
    left: auto;
    transform: translateX(100%);
    padding-right: env(safe-area-inset-right, 0px);
}
.drawer-right.open .mobile-drawer-panel {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    min-height: 56px;
}

.mobile-drawer-header .btn-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mobile-drawer-nav {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-drawer-nav-item {
    margin: 0;
}

.mobile-drawer-nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    color: var(--slms-text, #212529);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s ease;
}

.mobile-drawer-nav-link:hover,
.mobile-drawer-nav-link.active {
    background: rgba(0, 0, 0, 0.04);
    color: var(--slms-primary, #4f46e5);
}

.mobile-drawer-nav-heading {
    display: block;
    padding: 0.75rem 1.25rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slms-text-muted, #6c757d);
}

.mobile-drawer-sub-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-drawer-sub-nav .mobile-drawer-nav-link {
    padding-left: 2.25rem;
    font-size: 0.95rem;
    min-height: 44px;
    border-left: 2px solid rgba(0, 0, 0, 0.06);
    margin-left: 1.25rem;
}

.mobile-drawer-footer {
    padding: 0.75rem 1.25rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Full-Screen Overlay ── */
.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s, transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s, transform 0.3s ease;
}

/* Overlay animations */
.overlay-slide-up {
    transform: translateY(30px);
}
.overlay-slide-up.open {
    transform: translateY(0);
}

.overlay-zoom {
    transform: scale(0.92);
}
.overlay-zoom.open {
    transform: scale(1);
}

/* Overlay backgrounds */
.overlay-bg-blur {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mobile-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.mobile-overlay-header .btn-close {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.85;
}

.mobile-overlay-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.mobile-overlay-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 0.65rem 1.5rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease;
    text-align: center;
    border-radius: 8px;
}

.mobile-overlay-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-overlay-link.active {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.mobile-overlay-heading {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.mobile-overlay-footer {
    padding: 1rem 1.5rem;
    text-align: center;
}

.mobile-overlay-footer .mobile-overlay-link {
    font-size: 1rem;
}

/* ── Size Presets ── */
/* Compact */
.mn-size-compact .navbar-nav .nav-link { font-size: 0.9rem !important; padding-top: 0.4rem; padding-bottom: 0.4rem; min-height: 44px; display: flex; align-items: center; }
.mn-size-compact .mobile-bottom-tab-bar { min-height: 54px; }
.mn-size-compact .mobile-tab-item { min-height: 44px; padding: 6px 4px 4px; }
.mn-size-compact .mobile-tab-item i { font-size: 1.15rem; }
.mn-size-compact .mobile-tab-label { font-size: 0.65rem; }
.mn-size-compact .mobile-drawer-nav-link { padding: 0.55rem 1rem; font-size: 0.9rem; min-height: 44px; }
.mn-size-compact .mobile-drawer-sub-nav .mobile-drawer-nav-link { padding-left: 2rem; min-height: 44px; }
.mn-size-compact .mobile-overlay-link { font-size: 1.25rem; padding: 0.5rem 1.25rem; min-height: 44px; }
.mn-size-compact .mobile-overlay-footer .mobile-overlay-link { font-size: 0.9rem; }

/* Large */
.mn-size-large .navbar-nav .nav-link { font-size: 1.1rem !important; padding-top: 0.65rem; padding-bottom: 0.65rem; min-height: 52px; display: flex; align-items: center; }
.mn-size-large .mobile-bottom-tab-bar { min-height: 74px; }
.mn-size-large .mobile-tab-item { min-height: 56px; padding: 10px 4px 8px; }
.mn-size-large .mobile-tab-item i { font-size: 1.5rem; }
.mn-size-large .mobile-tab-label { font-size: 0.8rem; }
.mn-size-large .mobile-drawer-nav-link { padding: 0.9rem 1.5rem; font-size: 1.1rem; min-height: 54px; }
.mn-size-large .mobile-drawer-sub-nav .mobile-drawer-nav-link { padding-left: 2.75rem; min-height: 50px; }
.mn-size-large .mobile-overlay-link { font-size: 1.85rem; padding: 0.75rem 1.75rem; min-height: 56px; }
.mn-size-large .mobile-overlay-footer .mobile-overlay-link { font-size: 1.1rem; }

/* Bottom tab padding variants */
.has-bottom-tab-compact { padding-bottom: 70px; }
.has-bottom-tab-large { padding-bottom: 90px; }

/* ── Mobile navbar safe areas ── */
@media (max-width: 991.98px) {
    .app-navbar {
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }
}

/* Search is an icon-only action, not a decorative menu icon. */
.navbar.app-navbar .quick-search-link {
    opacity: 1;
}

/* ── Icon Toggle ── */
.mn-hide-icons .navbar-nav .nav-link:not(.quick-search-link) i,
.mn-hide-icons .mobile-tab-item > i,
.mn-hide-icons .mobile-drawer-nav-link > i,
.mn-hide-icons .mobile-drawer-sub-nav .mobile-drawer-nav-link > i,
.mn-hide-icons .mobile-overlay-link > i {
    display: none !important;
}

/* ── Social Icons Row ── */
.mobile-nav-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
}
.mobile-nav-social a {
    color: var(--slms-text-muted, #6c757d);
    font-size: 1.25rem;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    text-decoration: none;
}
.mobile-nav-social a:hover {
    color: var(--slms-primary, #4f46e5);
}
/* Overlay variant: white icons on dark background */
.mobile-overlay .mobile-nav-social a {
    color: rgba(255, 255, 255, 0.6);
}
.mobile-overlay .mobile-nav-social a:hover {
    color: #fff;
}

/* ── Hide mobile structures on desktop ── */
@media (min-width: 992px) {
    .mobile-bottom-tab-bar,
    .mobile-drawer,
    .mobile-overlay {
        display: none !important;
    }
    .has-bottom-tab-bar,
    .has-bottom-tab-compact,
    .has-bottom-tab-large {
        padding-bottom: 0;
    }
}

/* ── Staff CRM Styles ─────────────────────────────────────── */

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--slms-primary, #343a40);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.avatar-circle-lg {
    width: 56px;
    height: 56px;
    font-size: 1.125rem;
}

.staff-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.staff-row:hover {
    background-color: color-mix(in srgb, var(--slms-primary, #343a40) 5%, transparent) !important;
}

/* Offcanvas panel for staff detail */
.staff-offcanvas {
    width: min(480px, 90vw) !important;
}

.staff-offcanvas .offcanvas-body {
    padding: 0;
}

.staff-detail-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--slms-border, #e9ecef);
}

.staff-detail-section:last-child {
    border-bottom: none;
}

.staff-detail-section h6 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slms-text-muted, #6c757d);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.staff-mini-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--slms-bg-soft, #f8f9fa);
    border-radius: 0.5rem;
    flex: 1;
}

.staff-mini-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.staff-mini-stat .stat-label {
    font-size: 0.7rem;
    color: var(--slms-text-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.staff-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--slms-primary, #343a40) 10%, transparent);
    color: var(--slms-primary, #343a40);
    margin: 0.125rem;
}

/* ==========================================================================
   UX Polish: Transitions, Animations & Layout Stability
   ========================================================================== */

/* --- Phase 1: Navigation Progress Bar --- */
#slms-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--slms-accent, #f97316);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.35s ease-out, opacity 0.3s ease;
  opacity: 0;
}

/* --- Phase 1: Content Fade-In --- */
@keyframes slms-page-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
#main-content {
  animation: slms-page-in 200ms ease-out backwards;
}

/* --- Phase 3: Dropdown Animation --- */
@keyframes slms-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.dropdown-menu.show {
  animation: slms-dropdown-in 150ms ease-out backwards;
}

/* --- Phase 3: Flash Alert Animation --- */
@keyframes slms-alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.alert-modern {
  animation: slms-alert-in 250ms ease-out backwards;
}

/* --- Phase 3: Toast Animation --- */
@keyframes slms-toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}
#app-toast-container .toast.show {
  animation: slms-toast-in 200ms ease-out backwards;
}
/* A toast's next-step link: inherits the toast's own text color so it reads on every variant. */
#app-toast-container .app-toast-action {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* --- Phase 3: Collapsing Smoothness --- */
.collapsing {
  transition: height 200ms ease-out !important;
}

/* --- Phase 5: Image Layout Stability --- */
/* Note: .brand-avatar is intentionally excluded — org logos may be landscape and
   must keep their natural aspect ratio (handled in base.html with object-fit: contain). */
.team-logo-sm,
.team-logo-md,
.team-logo-lg,
.avatar-circle,
.avatar-circle-lg,
.avatar-placeholder,
.avatar-placeholder-large,
.avatar-placeholder-small {
  aspect-ratio: 1;
  object-fit: cover;
}
.card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--slms-bg-soft, #f8f9fa);
}

/* --- Phase 5: HTMX & Empty State Containers --- */
[hx-target] .table-responsive,
.htmx-indicator-parent {
  min-height: 200px;
}
/* (Empty state min-height consolidated above) */

/* --- Phase 5: Image Fade-In --- */
img[data-slms-fadein] {
  opacity: 0;
  transition: opacity 200ms ease;
}
img[data-slms-fadein].slms-img-loaded {
  opacity: 1;
}

/* --- Accessibility: Respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  #slms-progress {
    transition: none;
  }
  #main-content {
    animation: none;
  }
  .dropdown-menu.show {
    animation: none;
  }
  .alert-modern {
    animation: none;
  }
  #app-toast-container .toast.show {
    animation: none;
  }
  .collapsing {
    transition: none !important;
  }
  img[data-slms-fadein] {
    opacity: 1;
    transition: none;
  }
}







/* Admin league/season context bar (includes/admin_context_bar.html) */
.admin-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  background: var(--slms-surface);
  border: 1px solid var(--slms-border);
  border-radius: var(--slms-card-radius, var(--radius-sm, 12px));
  /* Not the public site's card shadow: that follows the site palette (a tinted glow here). */
  box-shadow: var(--shadow-subtle, 0 1px 3px color-mix(in srgb, var(--slms-text) 8%, transparent));
  padding: .65rem 1rem;
  margin-bottom: 1rem;
}
/* First row of a list's filter panel (Teams, Players). */
.admin-context-bar--embedded {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom: 1px solid var(--slms-border);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0 0 .65rem;
  margin-bottom: .75rem;
}
.admin-context-bar__title {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  color: var(--slms-heading);
}
.admin-context-bar__controls,
.admin-context-bar__controls > form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  flex: 1 1 22rem;
  min-width: 0;
}
.admin-context-bar__controls > form { flex-basis: 100%; }
.admin-context-bar__controls .admin-context-field {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1 1 11rem;
  min-width: 0;
}
.admin-context-bar__controls .admin-context-field label {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--slms-muted);
  white-space: nowrap;
}
.admin-context-bar__controls .admin-context-field .form-select {
  min-width: 0;
  max-width: 100%;
  font-weight: 600;
  color: var(--slms-text);
}
.admin-context-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--slms-border);
  background: var(--slms-background);
  color: var(--slms-muted);
  font-size: .8rem;
  white-space: nowrap;
}
.admin-context-bar__recovery { flex: 1 1 100%; min-width: 0; }
.admin-context-short { display: none; }
.admin-context-bar__recovery:empty { display: none; }
.admin-context-recovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .75rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--slms-border);
  color: var(--slms-text);
  font-size: .9rem;
}
.admin-context-recovery__text { flex: 1 1 16rem; min-width: 0; }
.admin-context-recovery__actions { display: inline-flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 767.98px) {
  /* Narrow screens: the context stays one compact strip so records stay in view. */
  .admin-context-bar { gap: .4rem .6rem; padding: .5rem .65rem; }
  .admin-context-bar--embedded { padding: 0 0 .5rem; }
  .admin-context-bar__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .admin-context-bar__controls, .admin-context-bar__controls > form { flex-basis: 100%; gap: .4rem .6rem; }
  .admin-context-bar__controls .admin-context-field { flex: 1 1 9rem; gap: .35rem; }
  .admin-context-chip { font-size: .75rem; padding: .1rem .5rem; }
  .admin-context-bar__recovery { flex: 1 1 14rem; }
  .admin-context-recovery { padding-top: 0; border-top: 0; font-size: .82rem; gap: .3rem .5rem; }
  /* One status line: a short chip, a short note and the button(s). */
  .admin-context-long { display: none; }
  .admin-context-short { display: inline; }
  .admin-context-recovery__text { flex: 0 1 auto; }
  .admin-context-recovery .btn { padding: .15rem .5rem; font-size: .8rem; }
}
@media (max-width: 479.98px) {
  /* Phones: one context field per row so league and season names stay readable. */
  .admin-context-bar__controls .admin-context-field { flex-basis: 100%; }
}

/* ── "Verify to continue" prompt (verification_prompt.js) ───────────────── */
.slms-verify-prompt {
  position: fixed;
  left: 50%;
  bottom: 24px;
  /* Above the cookie banner (9999): it answers something the owner just tried to do. */
  z-index: 10000;
  width: min(440px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 16px 18px;
  border: 1px solid var(--slms-card-border, rgba(0, 0, 0, 0.12));
  border-radius: var(--radius-md, 16px);
  background: var(--slms-surface);
  color: var(--slms-text);
  box-shadow: var(--shadow-soft);
  font-size: 0.875rem;
}

.slms-verify-prompt strong {
  display: block;
  color: var(--slms-heading);
  font-size: 0.95rem;
}

.slms-verify-prompt p {
  margin: 6px 0 0;
}

.slms-verify-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.slms-verify-prompt-status {
  color: var(--slms-muted);
  font-size: 0.8rem;
}

.slms-verify-prompt-status:empty {
  display: none;
}
