/* ── 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;
}
/*
  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: #0d6efd;
  --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: rgba(13,110,253,.04); }
.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, #0d6efd));
  border-color: var(--slms-button-border, var(--primary-color, #0d6efd));
  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, #0d6efd)));
  border-color: var(--slms-button-hover-border, var(--slms-button-border, var(--primary-color, #0d6efd)));
  color: var(--slms-button-hover-color, #fff);
}
.btn-outline-primary {
  color: var(--slms-button-outline-color, var(--primary-color, #0d6efd));
  border-color: var(--slms-button-outline-color, var(--primary-color, #0d6efd));
  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, #0d6efd));
  color: var(--slms-button-outline-hover-color, #fff);
  border-color: var(--slms-button-outline-color, var(--primary-color, #0d6efd));
}

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

/* Enhanced match and schedule styling */
.venue-pill {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  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: rgba(13, 110, 253, 0.05);
  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: rgba(13, 110, 253, 0.05);
  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: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  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: #0dcaf0 !important; color: #212529 !important; }
.status-loan { background-color: #6f42c1 !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: rgba(13, 110, 253, 0.05);
  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 rgba(13, 110, 253, 0.25);
}

/* 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-shell {
  color: #e2e8f0;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  width: 100%;
}

/* When custom colors are applied via inline style, child elements inherit */
.footer-shell[style] .footer-brand-title,
.footer-shell[style] .footer-column-title {
  color: inherit;
}

.footer-shell[style] .footer-tagline,
.footer-shell[style] .footer-link,
.footer-shell[style] .footer-legal,
.footer-shell[style] .footer-social a {
  color: inherit;
  opacity: 0.85;
}

.footer-shell[style] .footer-link:hover,
.footer-shell[style] .footer-social a:hover {
  opacity: 1;
}

.footer-shell[style] .footer-columns,
.footer-shell[style] .footer-meta {
  border-top-color: currentColor;
  border-top-color: color-mix(in srgb, currentColor 20%, transparent);
}

.footer-top {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1;
  min-width: 250px;
}

.footer-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand-title .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.footer-tagline {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.footer-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-columns {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #fff;
}

/* --- Footer sponsor logos --- */
.footer-sponsors-col {
  justify-self: end;
  text-align: right;
}
.footer-sponsors-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}
.footer-sponsor-item {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.footer-sponsor-item:hover { opacity: 1; }
.footer-sponsor-item img {
  max-height: 80px;
  max-width: 200px;
  object-fit: contain;
}
.footer-sponsor-name {
  color: inherit;
  opacity: 0.75;
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-meta {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal {
  color: #94a3b8;
  font-size: 0.85rem;
  flex: 1;
}

.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social a {
  color: #cbd5e1;
  font-size: 1.25rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

/* ── Footer style variants ─────────────────────────────────── */

/* Modern (default) - gradient banner with CTA emphasis */
.footer-modern .footer-shell {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* 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;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .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: 40px; 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: 40px; }
.mn-size-compact .mobile-drawer-sub-nav .mobile-drawer-nav-link { padding-left: 2rem; min-height: 38px; }
.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);
    }
}

/* ── Icon Toggle ── */
.mn-hide-icons .navbar-nav .nav-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;
}

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

/* --- Phase 5: Image Layout Stability --- */
.team-logo-sm,
.team-logo-md,
.team-logo-lg,
.brand-avatar,
.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;
  }
}











