:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html {
  font-size: 14px;
  min-height: 100%;
  min-height: 100dvh;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100%;
  min-height: 100dvh;
  margin: 0;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Nyborjarguide, Regler & FAQ handbook styling */
.guide-bg {
  background: radial-gradient(circle at 10% 20%, #f7f3ff 0, #f7f3ff 25%, #ffffff 60%, #ffffff 100%);
}

.guide-card {
  border: none;
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
}

.guide-label {
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--arena-accent, #6c63ff);
  font-weight: 700;
}

.guide-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.4rem;
}

.guide-accordion .accordion-button {
  font-weight: 600;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.guide-accordion .accordion-body {
  line-height: 1.6;
}

.guide-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.15rem rgba(108, 99, 255, 0.35);
}

.guide-accordion-item {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.guide-cat-btn {
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

.guide-cat-btn.active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* Register page styling */
.register-hero {
  background: radial-gradient(circle at 15% 20%, #f8f3ff 0, #f8f3ff 24%, #ffffff 60%, #f9fbff 100%);
}

.register-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.register-badge {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.register-meta {
  max-width: 46rem;
}

.register-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(33, 37, 41, 0.25) 20%, rgba(33, 37, 41, 0.25) 80%, rgba(0, 0, 0, 0) 100%);
  margin: 1.5rem 0;
}

.register-input {
  border-radius: 14px;
}

.register-input:focus {
  box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.2rem rgba(33, 37, 41, 0.25);
}

/* News page styling */
.news-page {
  background: radial-gradient(circle at 10% 20%, #0f172a 0, #0f172a 28%, #0b1024 55%, #070c1c 100%);
  color: #e9edf5;
  font-family: "Merriweather", "Georgia", serif;
}

.news-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(71, 91, 255, 0.14), rgba(255, 255, 255, 0)) #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
}

.news-hero::after {
  content: "";
  position: absolute;
  inset: 12% auto auto 55%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 60%);
  filter: blur(6px);
}

.news-kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #7fd1ff;
  margin-bottom: 0.5rem;
}

.news-headline {
  font-weight: 800;
  font-size: clamp(2rem, 2.8vw, 2.6rem);
  color: #f8fbff;
}

.news-lede {
  color: #c7d0e0;
  max-width: 44rem;
  line-height: 1.6;
}

.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e9edf5;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-pill--ghost {
  background: transparent;
  color: #9ab8ff;
  border-color: rgba(154, 184, 255, 0.35);
}

.news-hero-card {
  position: relative;
  z-index: 1;
  padding: 1.8rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)) #0c1326;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.news-hero-title {
  color: #f4f7ff;
  font-weight: 700;
}

.news-hero-body {
  color: #cfd7e6;
  line-height: 1.6;
  white-space: pre-line;
}

.news-hero-cta {
  display: inline-block;
  margin-top: 0.4rem;
  color: #9ab8ff;
  font-size: 0.9rem;
}

.news-section .news-label,
.news-stream .news-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #8aa2dd;
}

.news-stack {
  display: grid;
  gap: 1rem;
}

.news-card {
  padding: 1.3rem 1.4rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) #0e152a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(154, 184, 255, 0.35);
}

.news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.news-card__title {
  font-weight: 700;
  color: #f4f7ff;
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
}

.news-card__body {
  margin: 0;
  color: #c9d4e8;
  line-height: 1.6;
  white-space: pre-line;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #b4c9ff;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.news-date {
  color: #9fb3e6;
  font-size: 0.85rem;
}

.news-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.news-feature-card {
  padding: 1.2rem 1.3rem;
  border-radius: 18px;
  color: #0b0c10;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.news-feature-card h4 {
  font-weight: 700;
  color: #0b0c10;
}

.news-feature-card p {
  color: #151922;
  line-height: 1.4;
}

.news-feature-card--1 {
  background: linear-gradient(135deg, #f7d574, #f29f67);
}

.news-feature-card--2 {
  background: linear-gradient(135deg, #9ac5ff, #5e7bff);
  color: #0a1021;
}

.news-feature-card--3 {
  background: linear-gradient(135deg, #8ce2c8, #4fb2a0);
}

.news-feature-date {
  font-size: 0.85rem;
  color: rgba(11, 12, 16, 0.7);
}

.news-stream {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.news-timeline {
  position: relative;
  padding-left: 1.6rem;
}

.news-timeline::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: 0.6rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(154, 184, 255, 0.65), rgba(154, 184, 255, 0));
}

.news-timeline__item {
  position: relative;
  padding: 0.55rem 0 0.65rem;
}

.news-timeline__dot {
  position: absolute;
  left: 0.25rem;
  top: 0.9rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #9ab8ff, #5e7bff);
  box-shadow: 0 0 0 4px rgba(154, 184, 255, 0.12);
}

.news-timeline__content {
  padding-left: 1.4rem;
}

.news-timeline__body {
  color: #c9d4e8;
}

@media (max-width: 991px) {
  .news-hero::after {
    display: none;
  }

  .news-hero {
    padding: 2.2rem 1.6rem;
  }
}

/* Portal & Hover cards */
.hover-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12) !important;
}

.portal-hero {
  min-height: calc(80dvh - 80px);
}

.hover-card:active {
  transform: scale(0.98);
}

.hover-card .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Touch targets & Safe Area integrations */
.navbar {
  padding-top: max(0.5rem, var(--safe-top));
}

.footer {
  padding-bottom: max(1rem, var(--safe-bottom));
}

/* Touch-optimering för tabeller (t.ex. spelartrupp) */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* Responsiv knapp- och formulärkänsla */
@media (max-width: 576px) {
  .btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  .display-4 {
    font-size: 2.2rem;
  }
}

/* ==========================================================================
   Admin UX & Dashboard Theme (High-Contrast & Dark Fantasy)
   ========================================================================== */
.admin-dashboard {
  --admin-bg-surface: #131c2e;
  --admin-bg-surface-elevated: #1a2740;
  --admin-bg-surface-soft: rgba(255, 255, 255, 0.05);
  --admin-border: rgba(255, 255, 255, 0.14);
  --admin-border-focus: rgba(245, 158, 11, 0.4);
  --admin-text-primary: #f8fafc;
  --admin-text-secondary: #cbd5e1;
  --admin-text-muted: #94a3b8;
  --admin-accent-gold: #f59e0b;
  --admin-accent-cyan: #38bdf8;
  --admin-accent-emerald: #10b981;
  color: var(--admin-text-primary);
}

.admin-dashboard .text-muted {
  color: #94a3b8 !important;
}

.admin-dashboard .text-secondary {
  color: #cbd5e1 !important;
}

.admin-dashboard .form-text {
  color: #94a3b8 !important;
}

.admin-dashboard .form-check-label {
  color: #f8fafc !important;
}

.admin-subtext {
  color: #cbd5e1 !important;
  font-size: 0.95rem;
}

.admin-body-text {
  color: #e2e8f0 !important;
  font-size: 0.95rem;
  line-height: 1.6;
}

.admin-card {
  background: linear-gradient(180deg, #151e33 0%, #101728 100%) !important;
  border: 1px solid var(--admin-border) !important;
  border-radius: 16px;
  color: var(--admin-text-primary);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

.admin-stat-card {
  background: linear-gradient(180deg, #151e33 0%, #0f1626 100%) !important;
  border: 1px solid var(--admin-border) !important;
  border-radius: 16px;
  padding: 1.15rem 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.admin-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1 !important;
  margin-bottom: 0.35rem;
}

.admin-stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.admin-stat-subtext {
  font-size: 0.8rem;
  color: #94a3b8 !important;
  font-weight: 500;
}

.admin-callout {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
}

.admin-list-item {
  background-color: #121929 !important;
  border-color: var(--admin-border) !important;
  color: var(--admin-text-primary) !important;
  transition: background-color 0.15s ease;
}

.admin-list-item:hover {
  background-color: var(--admin-bg-surface-elevated) !important;
}

.admin-list-item:hover {
  background-color: var(--admin-bg-surface-elevated) !important;
}

.admin-serie-item {
  display: block;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  text-decoration: none !important;
  color: var(--admin-text-primary) !important;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-border);
  transition: all 0.15s ease-in-out;
}

.admin-serie-item:hover {
  background-color: var(--admin-bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(3px);
}

.admin-serie-item.active {
  background-color: rgba(245, 158, 11, 0.12) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.admin-table {
  color: var(--admin-text-primary);
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th {
  background-color: rgba(0, 0, 0, 0.25) !important;
  color: var(--admin-text-muted) !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--admin-border) !important;
}

.admin-table td {
  background-color: transparent !important;
  color: var(--admin-text-primary) !important;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.admin-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

.admin-nav-pill {
  border-radius: 12px;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--admin-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-nav-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.admin-nav-pill.active {
  color: #0b0f19;
  background: #f59e0b;
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   Admin View Dropdown UX
   ========================================================================== */
.admin-view-dropdown-wrapper {
  min-width: 260px;
  max-width: 380px;
  width: 100%;
}

.admin-view-dropdown-btn {
  background: var(--admin-bg-surface, #131c2e);
  border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.18));
  border-radius: 12px;
  width: 100%;
  min-height: 52px;
  color: var(--admin-text-primary, #f8fafc);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.admin-view-dropdown-btn:hover,
.admin-view-dropdown-btn:focus,
.admin-view-dropdown-btn[aria-expanded="true"] {
  background: var(--admin-bg-surface-elevated, #1a2740);
  border-color: var(--admin-accent-gold, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  color: #fff;
}

.admin-view-dropdown-btn::after {
  display: none !important;
}

.admin-dropdown-caret {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.admin-view-dropdown-btn[aria-expanded="true"] .admin-dropdown-caret {
  transform: rotate(180deg);
}

.admin-view-dropdown-menu {
  background: #111827;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  min-width: 300px;
  max-width: 420px;
  width: 100%;
  backdrop-filter: blur(10px);
  z-index: 1050;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.admin-dropdown-item {
  color: #cbd5e1;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.admin-dropdown-item:hover,
.admin-dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-dropdown-item.active {
  background: rgba(245, 158, 11, 0.15) !important;
  border-left: 3px solid #f59e0b;
}

.admin-dropdown-item.active .item-title {
  color: #fbbf24 !important;
}

/* ==========================================================================
   News Unread Indicator Dot & Badge UX
   ========================================================================== */
.arena-menu-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #f59e0b;
  border-radius: 50%;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.85);
  animation: arena-pulse-gold 2.2s infinite ease-in-out;
  vertical-align: middle;
  flex-shrink: 0;
}

.arena-mobile-nav-dot {
  width: 9px;
  height: 9px;
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.9);
  animation: arena-pulse-gold 2.2s infinite ease-in-out;
}

@keyframes arena-pulse-gold {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
  }

  50% {
    transform: scale(1.35);
    box-shadow: 0 0 12px rgba(245, 158, 11, 1);
  }
}

.admin-search-input {
  background-color: #0d1322 !important;
  border: 1px solid var(--admin-border) !important;
  color: #f8fafc !important;
  border-radius: 10px;
  padding: 0.65rem 1rem;
}

.admin-search-input::placeholder {
  color: var(--admin-text-muted) !important;
  opacity: 0.7;
}

.admin-search-input:focus {
  border-color: var(--admin-accent-gold) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

/* ==========================================================================
   Tactical Pitch Board & Lineup UX (Yaraaz Viigil Arena)
   ========================================================================== */
.text-gradient {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-indicator-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  transition: all 0.3s ease;
}

.status-indicator-dot.ok {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-indicator-dot.warn {
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.basket-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Pitch Board Card */
.pitch-card {
  background: radial-gradient(ellipse at 50% 50%, #0c3321 0%, #062316 60%, #03140c 100%) !important;
  border: 2px solid rgba(52, 211, 153, 0.3) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(0, 0, 0, 0.6) !important;
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Dynamic Match Underlag / Pitch Surfaces (Gräs, Jord, Sten, Nimonimbus) */
.pitch-card.pitch-surface-gras {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(12, 51, 33, 0.78) 0%, rgba(6, 35, 22, 0.88) 65%, rgba(3, 20, 12, 0.96) 100%),
    url('/images/underlag/underlag_gras.gif') repeat !important;
  background-size: auto, 160px 160px !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

.pitch-card.pitch-surface-jord {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(70, 36, 18, 0.78) 0%, rgba(45, 22, 10, 0.88) 65%, rgba(22, 10, 5, 0.96) 100%),
    url('/images/underlag/underlag_jord.gif') repeat !important;
  background-size: auto, 160px 160px !important;
  border-color: rgba(217, 119, 6, 0.45) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(60, 25, 10, 0.5) !important;
}

.pitch-card.pitch-surface-sten {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(45, 52, 65, 0.80) 0%, rgba(28, 33, 43, 0.90) 65%, rgba(15, 18, 24, 0.97) 100%),
    url('/images/underlag/underlag_sten.gif') repeat !important;
  background-size: auto, 160px 160px !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(30, 41, 59, 0.5) !important;
}

.pitch-card.pitch-surface-nimonimbus {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(49, 46, 129, 0.78) 0%, rgba(30, 27, 75, 0.88) 65%, rgba(15, 13, 40, 0.96) 100%),
    url('/images/underlag/underlag_nimonimbus.gif') repeat !important;
  background-size: auto, 160px 160px !important;
  border-color: rgba(167, 139, 250, 0.45) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(76, 29, 149, 0.5) !important;
}

.pitch-surface-picker {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 2px 4px;
}

.pitch-surface-picker .surface-btn {
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  border: 1px solid transparent;
  color: #94a3b8;
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pitch-surface-picker .surface-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.pitch-surface-picker .surface-btn.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fef08a;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.pitch-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  pointer-events: none;
}

.pitch-goal-crease {
  border-bottom: 2px dashed rgba(239, 68, 68, 0.45);
  padding-bottom: 0.4rem;
}

/* Pitch Field Layout & Sideline Margins */
.pitch-field-area {
  position: relative;
  padding: 0 74px;
  /* Generous space for sideline basket goals completely outside the 3x3 grid */
}

/* Sideline Basket Goals (Korgmål V & Korgmål H on the midfield line) */
.pitch-midfield-wrapper {
  position: relative;
  width: 100%;
}

.sideline-basket {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 6;
  user-select: none;
  cursor: help;
  pointer-events: auto;
}

.sideline-basket.basket-left {
  right: calc(100% + 14px);
  left: auto;
}

.sideline-basket.basket-right {
  left: calc(100% + 14px);
  right: auto;
}

.basket-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fbbf24 0%, #d97706 65%, #78350f 100%);
  border: 2px solid #fef08a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.65), 0 3px 6px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: basketPulse 3.5s infinite ease-in-out;
}

.sideline-basket:hover .basket-ring {
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.9);
}

.basket-ring-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.basket-post-pole {
  width: 3px;
  height: 16px;
  background: linear-gradient(to bottom, #d97706, #451a03);
  border-radius: 2px;
  margin: 1px 0;
}

.basket-pill {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fef08a;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

@keyframes basketPulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
  }

  50% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.9), 0 0 30px rgba(245, 158, 11, 0.4);
  }
}

/* Midfield Tactical Axis Line */
.pitch-midline-axis {
  position: absolute;
  top: 50%;
  left: -38px;
  right: -38px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22) 8px, transparent 8px, transparent 16px);
  pointer-events: none;
  z-index: 0;
  transform: translateY(-50%);
}

/* Center of the Pitch (Zon 6 - Innermittfält) */
.pitch-zone.center-of-pitch {
  position: relative;
  overflow: hidden;
  border-color: rgba(245, 158, 11, 0.45) !important;
  background: rgba(30, 41, 59, 0.75) !important;
}

.pitch-center-circle-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.24);
  pointer-events: none;
  z-index: 0;
}

.pitch-center-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  pointer-events: none;
  z-index: 0;
}

/* Pitch Rows and Zones */
.pitch-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.pitch-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.pitch-row.goalie-row {
  grid-template-columns: 1fr;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}

.pitch-zone {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.55rem;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.pitch-zone:hover {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-2px);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.pitch-zone.drag-over {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.5) !important;
  transform: scale(1.02);
}

.pitch-zone.zone-selected {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
}

.pitch-zone-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f5f9;
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
}

.pitch-zone-header .zone-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fafc;
  min-width: 0;
  flex: 1 1 0%;
}

.pitch-zone.highlight-center {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(22, 34, 58, 0.82);
}

.pitch-zone.goalie-zone {
  background: rgba(245, 158, 11, 0.12);
  border: 2px solid rgba(245, 158, 11, 0.6);
  min-height: 98px;
}

.pitch-zone-slots {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
}

.pitch-zone-slots.goalie-slots {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.6rem;
}

.pitch-zone-slots.goalie-slots .pitch-slot {
  max-width: 240px;
}

/* Pitch Slot & Bench Slot (Container) */
.pitch-slot,
.bench-slot {
  min-height: 42px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.2s ease;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.pitch-slot.occupied,
.bench-slot.occupied {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Empty Slot Placeholder (Clean, Minimalist & Tactile) */
.pitch-slot.empty,
.bench-slot.empty {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  min-height: 40px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pitch-slot.empty:hover,
.bench-slot.empty:hover {
  border-color: rgba(245, 158, 11, 0.75) !important;
  background: rgba(245, 158, 11, 0.14) !important;
  box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.12), 0 0 10px rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.pitch-slot.empty,
.bench-slot.empty {
  cursor: pointer !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(245, 158, 11, 0.3);
}

.empty-slot-plus {
  color: rgba(255, 255, 255, 0.28);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
  transition: all 0.2s ease;
  user-select: none;
  pointer-events: none !important;
  cursor: pointer;
}

.pitch-slot.empty:hover .empty-slot-plus,
.bench-slot.empty:hover .empty-slot-plus {
  color: #f59e0b;
  transform: scale(1.3);
}

.pitch-card.selection-active .pitch-slot.empty,
.pitch-card.selection-active .bench-slot.empty {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.08);
}

.pitch-card.selection-active .pitch-slot.empty:hover,
.pitch-card.selection-active .bench-slot.empty:hover {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.2) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.pitch-card.selection-active .empty-slot-plus {
  color: rgba(56, 189, 248, 0.7);
}

.pitch-card.selection-active .pitch-slot.empty:hover .empty-slot-plus,
.pitch-card.selection-active .bench-slot.empty:hover .empty-slot-plus {
  color: #38bdf8;
  transform: scale(1.35);
}

/* Field Player Card (Inside an occupied slot) */
.field-player-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 0.25rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
  min-height: 38px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.field-player-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.field-player-card:active {
  cursor: grabbing;
}

.field-player-card.is-selected {
  outline: 2px solid #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.7);
}

.field-card-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.field-card-header .badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
}

.field-card-name,
.field-player-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  min-width: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  margin: 0 0.25rem;
}

.field-card-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fbbf24 !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.field-card-rating .rating-star {
  color: #fbbf24;
  font-size: 0.72rem;
}

.field-card-rating .rating-val {
  color: #fef08a;
  font-weight: 900;
}

.remove-btn,
.field-player-btn-remove {
  color: #ef4444 !important;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: none;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.remove-btn:hover,
.field-player-btn-remove:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.15);
}

/* Bench Area */
.bench-container {
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}

.bench-container:hover {
  border-color: rgba(245, 158, 11, 0.6);
}

.bench-container.drag-over {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
}

.bench-container.bench-selected {
  outline: 3px solid #38bdf8;
}

.bench-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
}

/* Injury Cross & Injured Player Highlights */
.injury-cross-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
  animation: injuryCrossPulse 2.5s infinite ease-in-out;
}

/* Training status icon in lineup player pickers and squad cards */
.training-status-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.training-status-icon.is-untrained {
  opacity: 0.28;
  filter: grayscale(100%) contrast(70%);
}

@keyframes injuryCrossPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.95;
  }

  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.field-player-card.is-injured {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: linear-gradient(135deg, rgba(69, 10, 10, 0.85) 0%, rgba(24, 24, 27, 0.95) 100%) !important;
}

.field-player-card.is-injured:hover {
  border-color: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
}

.reserve-player-card.is-injured {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: linear-gradient(135deg, rgba(69, 10, 10, 0.85) 0%, rgba(8, 51, 68, 0.95) 100%) !important;
}

.squad-player-card.is-injured {
  border-left: 3px solid #ef4444 !important;
}

/* Tactical Player Token (Gubbe med tröjnummer & skadekors) */
.pitch-gubbe {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 30px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.pitch-gubbe:hover {
  transform: scale(1.12);
  z-index: 6;
}

.pitch-gubbe.is-inspecting {
  transform: scale(1.18);
  filter: drop-shadow(0 0 6px #f59e0b) drop-shadow(0 0 2px #ffffff);
  z-index: 10;
}

.pitch-gubbe-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75));
}

.pitch-gubbe-num {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 1px 3px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.pitch-gubbe-inj-img {
  position: absolute;
  top: -4px;
  right: -5px;
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  z-index: 3;
  pointer-events: none;
}

/* Squad Tray Cards */
.squad-player-card {
  background: linear-gradient(135deg, rgba(26, 36, 54, 0.88) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.squad-player-card:hover {
  background: linear-gradient(135deg, rgba(34, 48, 72, 0.95) 0%, rgba(20, 30, 52, 0.98) 100%);
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.2);
}

.squad-player-card.assigned {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.65) 0%, rgba(10, 15, 28, 0.75) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.88;
}

.squad-player-card.assigned:hover {
  opacity: 1;
  background: linear-gradient(135deg, rgba(26, 36, 54, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(245, 158, 11, 0.5);
}

.squad-player-card.unassigned {
  border-color: rgba(245, 158, 11, 0.45);
}

.squad-player-card.on-bench {
  border-color: rgba(56, 189, 248, 0.35);
}

.squad-tray-scroll::-webkit-scrollbar {
  width: 6px;
}

.squad-tray-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.squad-tray-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.squad-tray-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.5);
}

.squad-player-card.is-inspecting,
.field-player-card.is-inspecting {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.18) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-2px);
}

/* Player Picker Modal Items */
.picker-player-item {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(245, 158, 11, 0.25);
}

.picker-player-item:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.2);
}

.picker-player-item:active {
  transform: scale(0.98);
}

.squad-player-card.is-placed {
  opacity: 0.65;
  border-style: dashed;
}

.squad-player-card.is-placed:hover {
  opacity: 0.95;
}

.jersey-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.jersey-circle.mini {
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
}

.player-location-pill {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 991px) {
  .pitch-card {
    padding: 0.75rem 0.6rem !important;
  }

  .pitch-field-area {
    padding: 0 62px !important;
  }

  .sideline-basket.basket-left {
    right: calc(100% + 10px);
    left: auto;
  }

  .sideline-basket.basket-right {
    left: calc(100% + 10px);
    right: auto;
  }

  .pitch-midline-axis {
    left: -32px;
    right: -32px;
  }

  .pitch-zone {
    min-height: 98px;
    padding: 0.4rem;
  }

  .pitch-zone-header {
    font-size: 0.72rem;
  }

  .field-player-name,
  .field-card-name {
    font-size: 0.76rem;
  }
}

@media (max-width: 576px) {
  .pitch-card {
    padding: 0.6rem 0.35rem !important;
  }

  .pitch-field-area {
    padding: 0 46px !important;
  }

  .sideline-basket.basket-left {
    right: calc(100% + 6px);
    left: auto;
  }

  .sideline-basket.basket-right {
    left: calc(100% + 6px);
    right: auto;
  }

  .pitch-midline-axis {
    left: -22px;
    right: -22px;
  }

  .basket-ring {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .basket-ring-icon {
    font-size: 0.75rem;
  }

  .basket-post-pole {
    height: 10px;
    width: 2px;
  }

  .basket-pill {
    font-size: 0.52rem;
    padding: 0.05rem 0.2rem;
  }

  .pitch-row {
    gap: 0.35rem;
  }

  .pitch-zone {
    min-height: 84px;
    padding: 0.3rem;
    border-radius: 8px;
  }

  .pitch-zone-header {
    font-size: 0.68rem;
    margin-bottom: 0.25rem;
    gap: 0.25rem;
  }

  .pitch-zone-header .badge {
    padding: 0.15rem 0.3rem;
    font-size: 0.65rem;
  }

  .pitch-slot,
  .bench-slot {
    min-height: 36px;
  }

  .pitch-slot.empty,
  .bench-slot.empty {
    min-height: 34px;
    padding: 0.2rem 0.3rem;
  }

  .empty-slot-plus {
    font-size: 1rem;
  }

  .field-player-card,
  .reserve-player-card {
    min-height: 36px;
    padding: 0.15rem 0.25rem;
    gap: 0.2rem;
  }

  /* På mobil döljs spelarnamnet i zonrutorna på planen så att det inte bryts/hackas upp.
     Tröjnumret syns tydligt på tröjan och ett tryck öppnar hela spelarkortet. */
  .field-player-name,
  .field-card-name {
    display: none !important;
  }

  .pitch-gubbe {
    width: 25px;
    height: 27px;
  }

  .pitch-gubbe-num {
    font-size: 0.65rem;
  }

  .pitch-gubbe-inj-img {
    width: 12px;
    height: 12px;
    top: -3px;
    right: -4px;
  }

  .field-card-rating {
    font-size: 0.72rem;
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
  }

  .remove-btn,
  .field-player-btn-remove {
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
  }

  .reserve-badge-slot {
    font-size: 0.58rem;
    padding: 0.1rem 0.22rem;
  }

  .pitch-center-circle-ring {
    width: 68px;
    height: 68px;
  }
}

/* Quick Stats Bottom HUD / Drawer (Ultra-Compact Mobile & Desktop) */
.player-stats-hud {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 2px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  animation: slideUpHud 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.player-stats-hud.drawer-is-injured {
  border-top: 2px solid #ef4444 !important;
  box-shadow: 0 -8px 28px rgba(239, 68, 68, 0.3) !important;
}

@keyframes slideUpHud {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.stats-hud-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.stats-grid-compact {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.35rem;
}

.stat-pill {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.2rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  user-select: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.stat-pill:hover {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(30, 41, 59, 1);
  transform: translateY(-1px);
}

.stat-code {
  font-size: 0.65rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #f8fafc;
}

.stat-val.top {
  color: #fbbf24 !important;
  /* Guld 17+ */
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.stat-val.high {
  color: #34d399 !important;
  /* Grön 14-16 */
}

.stat-val.mid {
  color: #38bdf8 !important;
  /* Cyan 10-13 */
}

.stat-val.low {
  color: #94a3b8 !important;
  /* Grå <10 */
}

.stats-info-btn {
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s, transform 0.15s;
  text-decoration: none !important;
}

.stats-info-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .player-stats-hud {
    padding: 0.4rem 0.6rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  .stats-grid-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .stat-pill {
    padding: 0.15rem 0.2rem;
  }

  .stat-code {
    font-size: 0.58rem;
  }

  .stat-val {
    font-size: 0.78rem;
  }
}


/* Autentisk Positionsmatris från gamla Arena (LagOchSpelare.vbs SkapaPositionsMatris) */
.hud-matrix-wrap {
  animation: fadeIn 0.18s ease-in-out;
}

.hud-matrix-board {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 440px;
  margin: 0 auto;
}

.hud-matrix-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.hud-matrix-goal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.hud-matrix-cell {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 4px;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.15;
  transition: all 0.15s ease;
  user-select: none;
}

.hud-matrix-cell.empty-cell {
  background: transparent !important;
  border-color: transparent !important;
  visibility: hidden;
}

.hud-matrix-cell:hover:not(.empty-cell) {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(30, 41, 59, 1);
  transform: translateY(-1px);
}

.hud-matrix-cell.is-best {
  border-color: #34d399 !important;
  background: rgba(16, 185, 129, 0.15) !important;
}

.hud-matrix-cell.is-current {
  border-color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.hud-matrix-code {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  display: block;
  text-transform: uppercase;
}

.hud-matrix-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
}

.hud-matrix-cell.is-best .hud-matrix-val {
  color: #34d399 !important;
}

.hud-matrix-cell.is-current .hud-matrix-val {
  color: #fbbf24 !important;
}

@media (max-width: 768px) {
  .hud-matrix-board {
    max-width: 100%;
  }

  .hud-matrix-cell {
    padding: 2px 3px;
  }

  .hud-matrix-code {
    font-size: 0.58rem;
  }

  .hud-matrix-val {
    font-size: 0.8rem;
  }
}

/* Squad Tray UX Filter Control */
.squad-filter-bar {
  display: flex;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.25rem;
}

.squad-filter-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.4rem;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}

.squad-filter-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.squad-filter-btn.active {
  color: #fef08a;
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.squad-filter-btn .filter-badge {
  font-size: 0.68rem;
  padding: 0.08rem 0.42rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  transition: background 0.18s ease;
}

.squad-filter-btn.active .filter-badge {
  background: rgba(245, 158, 11, 0.4);
  color: #fff;
}

@media (max-width: 576px) {
  .squad-filter-btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.2rem;
    gap: 0.2rem;
  }

  .squad-filter-btn .filter-badge {
    font-size: 0.62rem;
    padding: 0.05rem 0.3rem;
  }
}


/* ==========================================================================
   Artefakter High-Contrast & Dark Fantasy Design Tokens
   ========================================================================== */
.artefakt-header-subtext {
  color: #cbd5e1 !important;
  font-size: 0.95rem;
}

.artefakt-card {
  background: linear-gradient(180deg, #182234 0%, #101724 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.artefakt-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.18) !important;
}

.artefakt-title {
  color: #fbbf24 !important;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.artefakt-img-box {
  width: 74px;
  height: 74px;
  background: radial-gradient(circle at center, #26334a 0%, #0d121c 100%);
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
}

.artefakt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.artefakt-card:hover .artefakt-thumb {
  transform: scale(1.08);
}

.artefakt-desc {
  color: #e2e8f0 !important;
  font-size: 0.885rem;
  line-height: 1.55;
  letter-spacing: 0.15px;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.artefakt-effect-pill {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.artefakt-price-panel {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
}

.artefakt-price-label {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.artefakt-price-val {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.artefakt-currency {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

/* ==========================================================================
   Rasmärken & Vapensköldar (Race Badges & Emblems)
   ========================================================================== */
.race-badge-xs {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.race-badge-sm {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.race-badge-md {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.race-badge-lg {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.race-badge-hero {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.race-badge-hero:hover {
  transform: scale(1.08) rotate(2deg);
}

.race-card-emblem {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 46px;
  height: 46px;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s ease;
}

.hover-card:hover .race-card-emblem,
.race-hero-trigger:hover .race-card-emblem,
.race-select-card:hover .race-card-emblem {
  transform: scale(1.12) rotate(-4deg);
}

.race-watermark {
  position: absolute;
  right: -15px;
  bottom: -20px;
  width: 150px;
  height: 150px;
  opacity: 0.08;
  pointer-events: none;
  object-fit: contain;
  transform: rotate(-10deg);
  z-index: 0;
}

.race-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.2;
}

/* Regler (Rules) handbook styling */
@media (min-width: 992px) {
  .rules-sidebar {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
}

.chapter-toc {
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rule-toc-link {
  transition: all 0.15s ease-in-out;
  font-size: 0.85rem;
}

.rule-toc-link:hover {
  background-color: rgba(108, 99, 255, 0.08);
  color: #6c63ff !important;
  transform: translateX(3px);
}

.rule-accordion-item {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rule-cat-btn {
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

.rule-cat-btn.active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}





/* ==========================================================================
   Tactical Pitch: Dual Mode (Ordinarie Starters & Reservuppställning)
   ========================================================================== */
.lineup-mode-tabs {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px;
  border-radius: 12px;
  display: flex;
  gap: 6px;
}

.lineup-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lineup-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.lineup-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.lineup-tab-btn.active.tab-reserves {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(14, 116, 144, 0.35) 100%);
  border: 1px solid #06b6d4;
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

/* Pitch Board Reserve Mode */
.pitch-card.reserve-mode {
  border-color: rgba(6, 182, 212, 0.6) !important;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2) !important;
}

/* Reserve Player Card (Inside an occupied slot in reserve mode) */
.reserve-player-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(8, 51, 68, 0.95) 100%);
  border: 1px solid rgba(6, 182, 212, 0.6);
  border-radius: 8px;
  padding: 0.25rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
  min-height: 40px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.reserve-player-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.reserve-badge-slot {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: #0891b2;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.reserve-badge-slot.slot-2 {
  background: #0284c7;
}

.pitch-slot.reserve-empty {
  border: 1px dashed rgba(6, 182, 212, 0.35);
  background: rgba(8, 51, 68, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  cursor: pointer;
  user-select: none;
  min-height: 40px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pitch-slot.reserve-empty:hover {
  border-color: #06b6d4 !important;
  background: rgba(6, 182, 212, 0.18) !important;
  box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.15), 0 0 10px rgba(6, 182, 212, 0.3);
  transform: translateY(-1px);
}

.reserve-slot-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  opacity: 0.85;
}

.reserve-panel-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 12px;
  padding: 1rem;
}

/* ==========================================================================
   Lagets Logotyp & Klubbvapen (Upload & Preview UX)
   ========================================================================== */
.logo-dropzone {
  border: 2px dashed var(--arena-border, rgba(255, 255, 255, 0.25));
  border-radius: 1rem;
  padding: 1.75rem 1.25rem;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease-in-out;
}

.logo-dropzone:hover,
.logo-dropzone.dragover {
  border-color: var(--arena-accent, #ffc107);
  background: rgba(255, 193, 7, 0.08);
  box-shadow: 0 0 16px rgba(255, 193, 7, 0.15);
}

.crest-display-box {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.crest-display-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease;
}

.crest-display-box:hover .crest-display-img {
  transform: scale(1.06);
}

.custom-logo-badge {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.logo-gallery-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  transition: all 0.2s ease-in-out;
  text-align: center;
}

.logo-gallery-card.active-crest {
  border-color: var(--arena-accent, #ffc107);
  background: rgba(255, 193, 7, 0.08);
  box-shadow: 0 0 16px rgba(255, 193, 7, 0.18);
}

.logo-gallery-thumb {
  width: 90px;
  height: 90px;
  margin: 0 auto 8px auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px;
  overflow: hidden;
}

.logo-gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}


/* ==========================================================================
   Gula och orangea fält, märken och badgar:
   Garanterat skarp svart text i samtliga raser (Människor, Dvärgar, Alver, Orcer, Klassisk)
   ========================================================================== */
.bg-warning:not([class*="bg-opacity"]),
.bg-warning:not([class*="bg-opacity"]) *,
.badge.bg-warning:not([class*="bg-opacity"]),
.badge.bg-warning:not([class*="bg-opacity"]) *,
.badge[class*="bg-warning"]:not([class*="bg-opacity"]),
.badge[class*="bg-warning"]:not([class*="bg-opacity"]) *,
.badge.badge-warning,
.badge.badge-warning *,
.btn-warning:not(.btn-outline-warning),
.btn-warning:not(.btn-outline-warning) *,
.bg-warning-subtle,
.bg-warning-subtle *,
.table-warning,
.table-warning * {
  color: #000000 !important;
  --bs-badge-color: #000000 !important;
  text-shadow: none !important;
}

@media (min-width: 576px) {

  .field-card-name,
  .field-player-name {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0 0.25rem;
  }
}

/* ==========================================================================
   Kompakt spelartruppstabell (Lag.cshtml)
   ========================================================================== */
.squad-table {
  font-size: clamp(0.72rem, 0.65rem + 0.3vw, 0.9rem);
  --bs-table-bg: transparent;
}

.squad-table th,
.squad-table td {
  padding: 0.35rem 0.3rem;
  white-space: nowrap;
}

.squad-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.squad-table .squad-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--arena-surface, #fff);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  min-width: 12.5rem;
  max-width: 16.5rem;
  border-right: 1px solid var(--arena-border, rgba(255, 255, 255, 0.1));
  box-shadow: 4px 0 10px -2px rgba(0, 0, 0, 0.45);
  background-clip: padding-box;
}

.squad-table thead th.squad-sticky {
  z-index: 4;
  background-color: var(--arena-table-th, #141d2d);
}

.squad-table tbody tr:hover>td.squad-sticky {
  background-color: var(--arena-surface-hover, #27364f);
}

.squad-table .squad-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.squad-table .squad-sub .badge {
  font-size: 0.65em;
}

.squad-table .squad-form {
  min-width: 4.5rem;
}

.squad-injury-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.squad-played-badge {
  background: var(--arena-primary, #306111);
  color: var(--arena-surface, #fff);
  font-size: 0.7em;
}

@media (min-width: 992px) {

  .squad-table th,
  .squad-table td {
    padding: 0.5rem 0.45rem;
  }

  .squad-table .squad-sticky {
    min-width: 13.5rem;
    max-width: 18rem;
  }
}

.squad-table td.squad-hojning {
  background: color-mix(in srgb, var(--arena-accent, #ffc107) 22%, transparent);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--arena-accent, #ffc107);
}

.squad-table .squad-skador {
  min-width: 4.5rem;
}

/* Sorterbara tabellkolumner i trupptabellen (Lag.cshtml) */
.squad-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  vertical-align: middle;
  touch-action: manipulation;
}

.squad-table th.sortable-th:hover {
  background-color: var(--arena-surface-hover, rgba(255, 255, 255, 0.08)) !important;
  color: var(--arena-accent, #ffc107) !important;
}

.squad-table th.sortable-th:focus-visible {
  outline: 2px solid var(--arena-accent, #ffc107);
  outline-offset: -2px;
}

.squad-table th.sortable-th:active {
  transform: translateY(1px);
}

.squad-table th.sortable-th .th-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.squad-table th.sortable-th.text-start .th-content {
  justify-content: flex-start;
}

.squad-table th.sortable-th .sort-indicator {
  display: inline-block;
  font-size: 0.7em;
  line-height: 1;
  opacity: 0.35;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.squad-table th.sortable-th .sort-indicator::after {
  content: '⇅';
}

.squad-table th.sortable-th:hover .sort-indicator {
  opacity: 0.8;
}

.squad-table th.sortable-th.sort-active {
  color: var(--arena-accent, #ffc107) !important;
  box-shadow: inset 0 -2px 0 var(--arena-accent, #ffc107);
}

.squad-table th.sortable-th.sort-active .sort-indicator {
  opacity: 1;
  color: var(--arena-accent, #ffc107);
  font-weight: bold;
}

.squad-table th.sortable-th.sort-active.sort-desc .sort-indicator::after {
  content: '▼';
}

.squad-table th.sortable-th.sort-active.sort-asc .sort-indicator::after {
  content: '▲';
}

/* Subtil highlight på den sorterade kolumnen i kroppen */
.squad-table td.col-sorted-active {
  background-color: color-mix(in srgb, var(--arena-accent, #ffc107) 6%, transparent);
}

.squad-table td.squad-sticky.col-sorted-active {
  background-color: color-mix(in srgb, var(--arena-accent, #ffc107) 7%, var(--arena-surface, #fff));
}

@media (max-width: 768px) {
  .squad-table th.sortable-th {
    min-height: 38px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }
}

/* ==========================================================================
   Träningssidan (Traning.cshtml)
   ========================================================================== */
.traning-namn {
  min-width: 7.5rem;
}

.traning-rutor {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
}

.traning-ruta {
  aspect-ratio: 1 / 1;
  max-height: 22px;
  border-radius: 4px;
  border: 1px solid var(--arena-border, rgba(128, 128, 128, 0.4));
  background: transparent;
  transition: background 0.15s ease;
}

.traning-ruta.aktiv {
  background: var(--arena-accent, #c0392b);
  border-color: var(--arena-accent, #c0392b);
}

.traning-select {
  width: 4.5rem;
  min-height: 44px;
}

.traning-spara {
  min-height: 44px;
}

@media (max-width: 575.98px) {
  .traning-namn {
    min-width: 6rem;
    font-size: 0.9rem;
  }
}


/* ==========================================================================
   Träningssidan - Infoknapp och Egenskapsguide
   ========================================================================== */
.traning-namn-cell {
  min-width: 9.2rem;
  flex-shrink: 0;
}

.traning-namn-text {
  white-space: nowrap;
}

.traning-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  font-style: italic;
  color: var(--arena-text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--arena-border, rgba(128, 128, 128, 0.3));
  cursor: pointer;
  padding: 0;
  line-height: 1;
  position: relative;
  transition: all 0.15s ease-in-out;
  flex-shrink: 0;
}

/* 44px touch-yta för mobilskärmar utan att öka den visuella storleken */
.traning-info-btn::before {
  content: "";
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: -10px;
  right: -10px;
}

.traning-info-btn:hover,
.traning-info-btn:focus-visible {
  color: var(--arena-text, #ffffff);
  border-color: var(--arena-accent, #c0392b);
  background: var(--arena-accent, #c0392b);
  box-shadow: 0 0 8px rgba(192, 57, 43, 0.4);
  transform: scale(1.1);
  outline: none;
}

.egenskap-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--arena-border, rgba(255, 255, 255, 0.1));
  color: var(--arena-text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 4px 10px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.egenskap-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--arena-text, #ffffff);
}

.egenskap-tab-btn.active {
  background: var(--arena-accent, #c0392b);
  border-color: var(--arena-accent, #c0392b);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (max-width: 575.98px) {
  .traning-namn-cell {
    min-width: 7.2rem;
  }

  .traning-namn-text {
    font-size: 0.85rem;
  }

  .traning-info-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    font-size: 0.7rem;
  }
}