/* General Body Styling */
:root {
  --footer-height: 64px;
  --dashboard-gap: 20px;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: url('/assets/voetbalveld-background.png') no-repeat center center;
  background-size: cover;
  background-color: #0b1d2a;
  margin: 0;
  color: #003366;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-attachment: fixed;
  /* Reserve space so fixed footer doesn't overlap content */
  padding-bottom: var(--footer-height);
}

body.with-side-menu {
  padding-bottom: 0;
}

@supports (height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 900px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }
}

/* Header Styling */
.header-desktop,
.header-mobile {
  background: linear-gradient(to right, rgba(0, 39, 77, 0.902), rgba(0, 85, 165, 0.9));
  color: white;
  padding: 1rem 2rem;
  position: relative; /* ensure z-index applies */
  z-index: 50;        /* stay above cards/buttons overlays */
}

.header-desktop {
  display: flex;
  position: relative;
  align-items: center;
  padding: 0rem 2rem;
  height: 132px;
  justify-content: space-between;
}

.header-desktop h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* Zorgt ervoor dat de tekst gecentreerd is */
  text-align: center;
  margin: 0;
  font-size: 2rem;
  text-shadow: #20114a 2px 2px 4px;
}

.header-desktop .header-buttons {
  margin-left: auto;
  /* Zorgt ervoor dat de knoppen aan de rechterkant blijven */
  display: flex;
  gap: 1rem;
}

.header-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.top-row > * {
  min-width: 0;
}

.header-mobile h1 {
  font-size: 1.6rem;
  margin-top: 1rem;
  text-shadow: #20114a 2px 2px 4px;
}

.logo {
  height: 100px;
  padding-right: 37px;
  cursor: pointer;
}

/* Button Styling */
.logout-btn {
  background: #ff4d4d;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logout-btn:hover {
  background: #e60000;
}

.logout-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('/assets/logout-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
}

.action-btn {
  background: #1e177e;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.action-btn:hover {
  background: #120d51;
}

/* Add Button Styling */
.add-button-container {
  text-align: center;
  /* Centreer de inhoud horizontaal */
  margin: 2rem 0 1rem;
  /* Voeg marges toe boven en onder de container */
}

.add-button {
  display: inline-block;
  background: #1e177e;
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s;
  text-decoration: none;
}

.add-button:hover {
  background: #04013a;
}

/* Container and Grid Styling */
.container {
  max-width: 1400px;
  margin: auto;
  padding: 2rem;
  flex: 1;
}

.clubs-grid,
.user-grid,
.manage-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.progress-gauge {
  --gauge-value: 0;
  --gauge-stroke: 24;
  --gauge-fill: #16a34a;
  --gauge-track: rgba(15, 23, 42, 0.12);
  --gauge-dash: rgba(15, 23, 42, 0.2);
  --gauge-text: #0f172a;
  --gauge-label: #64748b;
  position: relative;
  width: 200px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-gauge--sm {
  width: 190px;
  height: 118px;
  --gauge-stroke: 24;
}

.progress-gauge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.progress-gauge .gauge-path {
  fill: none;
  stroke-width: var(--gauge-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-gauge .gauge-track {
  stroke: var(--gauge-track);
}

.progress-gauge .gauge-pending {
  stroke: var(--gauge-dash);
  stroke-dasharray: 3 5;
  opacity: 0.7;
}

.progress-gauge .gauge-fill {
  stroke: var(--gauge-fill);
  stroke-dasharray: var(--gauge-value) 100;
  transition: stroke-dasharray 0.3s ease;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.2));
}

.progress-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(8px);
  text-align: center;
}

.progress-gauge-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gauge-text);
  line-height: 1;
}

.progress-gauge-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gauge-label);
}

.progress-gauge-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--gauge-label);
}

.progress-gauge-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.progress-gauge-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gauge-fill);
}

.progress-gauge-dot--pending {
  background: repeating-linear-gradient(45deg, var(--gauge-dash), var(--gauge-dash) 2px, transparent 2px, transparent 5px);
  border: 1px solid var(--gauge-dash);
}

/* Card Styling */
.club-card,
.manage-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  width: 250px;
  height: 240px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  /*gap: 1rem;*/
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  /* Zorgt ervoor dat de inhoud niet buiten de kaart valt */
  justify-content: space-between;
  /* Zorgt ervoor dat de inhoud wordt verdeeld */
}

.user-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  width: 250px;
  min-height: 240px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.user-card-logo {
  position: absolute;
  top: 10px;
  right: 10px;
  /* Plaats het logo linksboven */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  /* Maak het logo rond */
  background: white;
  /* Voeg een witte achtergrond toe */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  /* Voeg een schaduw toe */
  object-fit: cover;
  /* Zorg ervoor dat het logo proportioneel wordt geschaald */
}

.user-card-content {
  text-align: left;
  margin-top: 2rem;
}

.user-card-content h3 {
  font-size: 1.2rem;
  font-weight: bold;
  color: #003366;
  margin: 0;
  padding-bottom: 1rem;
}

.user-card-content p {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin: 0;
}

.user-card-actions {
  display: flex;
  justify-content: space-between;
  /* Zorgt ervoor dat de knoppen links en rechts staan */
  align-items: center;
}

.user-action-icon {
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.user-action-icon:hover {
  transform: scale(1.1);
}

.club-card img,
.manage-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.club-card:hover,
.manage-card:hover {
  transform: translateY(-5px);
  background: #0055aa;
  color: white;
  cursor: pointer;
}

/* Cards die niet klikbaar zijn: geen blauwe hover/highlight */
.manage-card.no-hover:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  cursor: default;
}

.user-card:hover {
  transform: translateY(-5px);
  background: #bebebed6;
  color: white;
  cursor: pointer;
}

.club-name,
.user-name {
  font-weight: 600;
  font-size: 1.2rem;
  color: #003366;
  text-shadow: #17093d8e 0.5px 1px 1px;
  transition: color 0.3s;
}

.flex {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: auto;
}
  /* Zorg ervoor dat de knoppen naar de onderkant van de kaart worden geduwd */

.button-link {
  background: #1e177e;
  color: white;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
  display: inline-block;
}

.button-link:hover {
  background: #040035;
}

.button-link--danger {
  background: #dc2626;
}

.button-link--danger:hover {
  background: #b91c1c;
}

.dashboard-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.32);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: background 0.2s ease;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
}

.dashboard-cta:hover {
  background: rgba(255, 255, 255, 0.24);
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.modal-btn:active {
  transform: translateY(1px);
}
.modal-btn--primary {
  background: #1e177e;
  color: #ffffff;
}
.modal-btn--primary:hover {
  background: #04013a;
}
.modal-btn--success {
  background: #16a34a;
  color: #ffffff;
}
.modal-btn--success:hover {
  background: #15803d;
}
.modal-btn--secondary {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}
.modal-btn--secondary:hover {
  background: #cbd5e1;
}
.modal-btn--danger {
  background: #dc2626;
  color: #ffffff;
}
.modal-btn--danger:hover {
  background: #b91c1c;
}
.modal-btn--equal {
  min-width: 140px;
}

@media (max-width: 640px) {
  .modal-box .flex:not(.flex-col) {
    flex-wrap: wrap;
  }
  .modal-box .modal-btn {
    flex: 1 1 140px;
  }
}

.tab-action-btn {
  width: 100%;
  max-width: 328px;
}

.review-card .review-button {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
}

.review-card {
  width: 320px;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

.review-card .review-action-btn {
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  flex: 1 1 140px;
  min-width: 0;
  text-align: center;
}

.review-card .review-actions {
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  #tab-reviews .review-card {
    width: auto !important;
  }
}

/* Player right-side menu */
.player-menu-toggle-row {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding: 0 2rem;
  margin: 0.75rem auto 0;
  max-width: 1400px;
}
.player-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  font-weight: 600;
  color: #1e1b4b;
}
.player-side-menu {
  position: fixed;
  left: var(--dashboard-gap);
  top: var(--dashboard-gap);
  width: min(280px, 22vw);
  height: calc(100vh - (2 * var(--dashboard-gap)));
  pointer-events: auto;
  z-index: 1000;
}
.player-side-overlay {
  display: none;
}
.player-side-panel {
  position: static;
  height: 100%;
  width: 100%;
  background: #f8fafc;
  border-radius: 24px;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
  border: 1px solid #e2e8f0;
  transform: none;
  transition: none;
  padding: 1.6rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.player-side-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.player-side-brand img {
  width: 120px;
  height: 120px;
  border-radius: 18px;
}
.player-side-brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
}
.player-side-section {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 0.25rem;
}
.player-side-header {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
}
.player-side-subtitle {
  font-size: 0.85rem;
  color: #64748b;
}
.player-side-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.player-side-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.95rem;
  border-radius: 16px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.08);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.player-side-icon {
  width: 32px;
  height: 32px;
  border-radius: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.player-side-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}
.player-side-item:hover {
  transform: translateX(2px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}
.player-side-item.is-active {
  background: #eef2f7;
  color: #0f172a;
  border-color: #d7e3ef;
}
.player-side-item.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 70%;
  border-radius: 999px;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
}
.player-side-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-header {
  padding: var(--dashboard-gap) var(--dashboard-gap) 0;
  padding-bottom: 20px !important;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /*margin-bottom: var(--dashboard-gap);*/
}

.dashboard-header-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 1rem 1.25rem;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(10px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-brand h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.header-mobile-brand {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.header-mobile-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.header-mobile-brand span {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
}

.header-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-pill-row {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.4rem;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #fde68a;
  color: #1f2937;
  border: 1px solid #facc15;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.12);
}

@media (max-width: 768px) {
  .header-pill-row {
    justify-content: flex-start;
    margin-top: 0.6rem;
  }

  .header-actions {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .header-hero--with-center-pill {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .header-hero--with-center-pill .header-hero-text {
    grid-column: 1;
  }

  .header-hero--with-center-pill .header-actions {
    grid-column: 3;
    justify-self: end;
  }

  .header-hero--with-center-pill .header-pill-row {
    grid-column: 2;
    margin-top: 0;
  }

  .header-hero--with-center-pill .header-profile {
    grid-column: 3;
    justify-self: end;
    width: fit-content;
    max-width: 240px;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.header-hero-text h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}
.header-hero-text h2.header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.header-title-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  flex: 0 0 auto;
}

.header-hero-text p {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  color: #475569;
  font-weight: 600;
}
.header-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.header-pill--inline {
  margin-top: 0;
}
@media (max-width: 900px) {
  .header-actions .dashboard-cta {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }
}
@media (max-width: 640px) {
  .header-actions .dashboard-cta {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
}

.header-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.header-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.dashboard-footer {
  margin: var(--dashboard-gap);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 0.75rem 1.25rem;
  display: flex;
  height: 47px !important;
  margin-top: 0px !important;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(226, 232, 240, 0.9);
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.dashboard-footer.footer {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  height: auto;
  z-index: auto;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.dashboard-footer .footer-logo {
  width: 34px;
  height: 34px;
}

.dashboard-footer span {
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .player-side-menu {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    pointer-events: none;
  }
  .player-side-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .player-side-panel {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: min(82vw, 320px);
    border-radius: 0 24px 24px 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .player-side-menu.is-open {
    pointer-events: auto;
  }
  .player-side-menu.is-open .player-side-overlay {
    opacity: 1;
  }
  .player-side-menu.is-open .player-side-panel {
    transform: translateX(0);
  }
  .player-menu-toggle-row {
    padding: 0 1rem;
    margin-top: 0;
    max-width: 100%;
    margin-bottom: var(--dashboard-gap);
  }
  .player-menu-toggle {
    width: 100%;
    justify-content: center;
    border-radius: 22px;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
    font-weight: 700;
    color: #0f172a;
  }
  .with-side-menu .container {
    padding: 0 var(--dashboard-gap) calc(var(--dashboard-gap) + env(safe-area-inset-bottom));
  }
  .dashboard-footer {
    margin: var(--dashboard-gap) var(--dashboard-gap) calc(var(--dashboard-gap) + env(safe-area-inset-bottom));
    width: calc(100% - (2 * var(--dashboard-gap)));
  }
  .with-side-menu {
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .dashboard-header {
    padding: 1rem;
  }
  .with-side-menu .dashboard-header {
    padding-bottom: 0;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .header-hero-text h2 {
    font-size: 1.35rem;
  }

  .header-profile {
    width: auto;
    align-self: flex-end;
    justify-content: flex-end;
    padding: 0.45rem 0.8rem;
    gap: 0.5rem;
  }

  .header-brand {
    display: none;
  }

  .header-mobile-brand {
    display: none;
  }

  .header-hero--with-center-pill {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
    align-items: center;
  }

  .header-hero--with-center-pill .header-hero-text {
    grid-column: 1 / -1;
  }

  .header-hero--with-center-pill .header-pill-row {
    grid-column: 2;
    margin-top: 0;
    justify-content: flex-end;
  }

  .header-hero--with-center-pill .header-profile {
    grid-column: 3;
    justify-self: end;
  }

  .header-pill {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }
}

@media (min-width: 769px) {
  :root {
    --side-menu-gap: var(--dashboard-gap);
    --side-menu-width: min(280px, 22vw);
  }
  .player-menu-toggle-row {
    display: none;
  }
  .with-side-menu .container,
  .with-side-menu .dashboard-header,
  .with-side-menu header {
    padding-left: calc(var(--side-menu-width) + (2 * var(--side-menu-gap)));
    padding-right: var(--side-menu-gap);
  }
  .with-side-menu .container {
    max-width: none;
    margin: 0;
    padding-left: calc(var(--side-menu-width) + (2 * var(--side-menu-gap)));
    padding-bottom: 2rem;
    padding-top: 0;
  }
  .with-side-menu .header-desktop,
  .with-side-menu .header-mobile {
    padding-left: calc(var(--side-menu-width) + (2 * var(--side-menu-gap)));
  }
  .with-side-menu .footer {
    margin-left: calc(var(--side-menu-width) + (2 * var(--side-menu-gap)));
    margin-right: var(--side-menu-gap);
  }
  .with-side-menu .dashboard-footer {
    margin-left: calc(var(--side-menu-width) + (2 * var(--side-menu-gap)));
    margin-right: var(--side-menu-gap);
    margin-top: var(--dashboard-gap);
    margin-bottom: var(--dashboard-gap);
    width: calc(100% - var(--side-menu-width) - (3 * var(--side-menu-gap)));
  }
}

.user-card-actions--gear {
  justify-content: flex-end;
}

.user-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.user-actions--absolute {
  position: absolute;
  top: 65px;
  right: 5px;
}

.user-actions-toggle {
  border: 1px solid #cbd5f5;
  background: rgba(255, 255, 255, 0.95);
  color: #1e1b4b;
  border-radius: 999px;
  padding: 0.35rem;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.user-actions-toggle:hover {
  transform: rotate(18deg) scale(1.05);
  background-color: #eef2ff;
  box-shadow: 0 4px 10px rgba(30, 27, 75, 0.18);
}

.user-actions-menu {
  position: absolute;
  right: 0;
  display: inline-flex;
  gap: 0.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.user-actions--down .user-actions-menu {
  top: calc(100% + 6px);
  transform: translateY(-6px) scale(0.96);
}

.user-actions--up .user-actions-menu {
  bottom: calc(100% + 6px);
  transform: translateY(6px) scale(0.96);
}

.user-actions.open .user-actions-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.user-action-item {
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-actions--up .user-action-item {
  transform: translateY(4px) scale(0.92);
}

.user-actions.open .user-action-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.user-actions.open .user-action-item:nth-child(1) {
  transition-delay: 0.02s;
}

.user-actions.open .user-action-item:nth-child(2) {
  transition-delay: 0.04s;
}

.user-actions.open .user-action-item:nth-child(3) {
  transition-delay: 0.06s;
}

.user-actions.open .user-action-item:nth-child(4) {
  transition-delay: 0.08s;
}

.user-actions.open .user-action-item:nth-child(5) {
  transition-delay: 0.1s;
}

/* icon Styling */
.delete-icon {
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  padding: 0.4rem;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.delete-icon:hover {
  background-color: #ffcccc;
  transform: scale(1.2);
}

.password-icon {
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  padding: 0.4rem;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-icon:hover {
  background-color: #cccccc;
  transform: scale(1.2);
}

.transfer-icon {
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  padding: 0.4rem;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.transfer-icon:hover {
  background-color: #dbeafe;
  transform: scale(1.2);
}

.edit-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  padding: 0.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
}

.edit-icon:hover {
  background: #003366;
  color: white;
  transform: scale(1.2);
}

/* Tab Styling */
.tab-button {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.9);
  margin-right: 0.5rem;
  cursor: pointer;
  flex: 0 0 auto;         /* voorkom krimpen */
  white-space: nowrap;     /* geen afbreken van labels */
  width: auto !important;  /* override w-full uit markup */
  box-sizing: border-box;  /* maak breedtes consistent */
}

.tab-button.active {
  background-color: #1e177e;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Horizontaal scrollbare tabbalk (mobielvriendelijk) */
.tabs-bar {
  display: flex;
  gap: 0.5rem;             /* desktop basisruimte */
  justify-content: center; /* centreren op desktop */
  flex-wrap: nowrap;       /* op desktop alles op één rij */
  max-width: none !important; /* override max-w-* uit markup */
  width: 100%;
}

/* Als equalizer actief is: forceer alle knoppen even breed als var(--tab-eq-width) */
.tabs-bar.equalized .tab-button {
  flex: 0 0 var(--tab-eq-width);
  width: var(--tab-eq-width) !important;
}

/* Mobiel: horizontaal scrollen + snap (zonder fades) */
@media (max-width: 768px) {
  .tabs-bar {
    display: none !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-snap-type: x mandatory; /* snap actief */
    scroll-padding-left: 0.5rem;   /* nette uitlijning bij snap */
    padding: 0 0.5rem;             /* laat volgende tab alvast zichtbaar piepen */
    flex-wrap: nowrap;             /* geen wrapping op mobiel */
    justify-content: flex-start;   /* links uitlijnen voor scrollen */
  }
  .tabs-bar::-webkit-scrollbar { display: none; }

  /* Mobiel: beperk extreem brede labels, laat snap op knoppen werken */
  .tab-button { scroll-snap-align: start; }
}
.tabs-bar::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Modal achtergrond */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 1000;
  min-height: 100vh;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Side drawers: keep hidden before Tailwind loads to avoid flash */
.drawer-panel {
  transform: translateX(100%);
}
.drawer-panel:not(.translate-x-full) {
  transform: translateX(0);
}

/* hard center helper voor modals */
.modal-center {
  position: fixed;      /* niet relative */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}


/* Modal box */
.modal-box {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  display: block;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  box-sizing: border-box;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  animation: fadeIn 0.3s ease-in-out;
  margin: auto;
  transform-origin: center;
  -webkit-overflow-scrolling: touch;
}

.modal-box h2 {
  color: #0f172a;
  letter-spacing: -0.01em;
}

.modal-box p,
.modal-box .modal-subtitle {
  color: #64748b;
}

.modal-box input,
.modal-box select,
.modal-box textarea {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.modal-box input:focus,
.modal-box select:focus,
.modal-box textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.modal-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem;
}

.challenge-modal .modal-box {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.challenge-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 0.8rem;
}

.challenge-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.challenge-modal-table th,
.challenge-modal-table td {
  padding: 0.45rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.challenge-modal-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.challenge-modal-self {
  background: #fef9c3;
  font-weight: 700;
  border-left: 4px solid #f59e0b;
}

.challenge-empty {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #64748b;
}

.challenge-sort-note {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: #6b7280;
}

@supports (height: 100dvh) {
  .modal-bg {
    min-height: 100dvh;
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  .modal-box {
    max-height: calc(100dvh - 3rem);
  }
}

/* Afwezigheden modal */
.absence-modal {
  max-width: 720px;
}
.absence-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.absence-modal__subtitle {
  color: #64748b;
  font-size: 0.9rem;
}
.absence-modal__panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
}
.absence-modal__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.absence-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.absence-modal__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.absence-player-search {
  min-width: 180px;
}
.absence-player-list {
  max-height: 280px;
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}
.absence-player-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.absence-player-item input[type="checkbox"] {
  accent-color: #1e177e;
}
.absence-player-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.absence-player-item.checked {
  background: #e0e7ff;
  border-color: #a5b4fc;
}
.absence-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.absence-modal__count {
  color: #64748b;
  font-size: 0.85rem;
}

/* Binnenkant scrolt; hoogte beperkt zodat het op een normaal scherm past */
.modal-scroll {
  /* min 360px, meestal ~60–65% vh, en nooit hoger dan wat onder de header past */
  max-height: clamp(
    360px,
    62vh,
    calc(100vh - var(--header-offset, 96px) - 200px)
  );
  overflow: auto;
  overscroll-behavior: contain;
}

/* optioneel: vaste linkerkolom zodat de tabs niet mee versmallen */
#eval-tab-list {
  flex: 0 0 260px;   /* ~260px vast */
  max-width: 260px;
}
#eval-tab-content {
  min-width: 0;      /* laat canvas netjes krimpen */
}



/* Animatie voor modal */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* Footer Styling */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 0 1rem;
  background: #fff;
  color: #888;
  border-top: 1px solid #ddd;
  z-index: 5;
}

.footer-logo {
  height: 40px;
}

/* Hero-sectie */
.hero,
.hero-mobile {
  text-align: center;
  padding: 2rem;
  background-color: #e6f7ff;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.hero h2,
.hero-mobile h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p,
.hero-mobile p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* Responsive Styling */
@media (max-width: 768px) {
  .header-desktop {
    display: none;
  }

  .header-mobile {
    display: flex;
  }

  .hero-mobile {
    display: flex;
  }

  .logo {
    height: 60px;
    padding-right: 0;
  }

  .header-mobile .action-btn,
  .header-mobile .logout-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    white-space: normal;
    text-align: center;
  }

  .user-card,
  .club-card,
  .manage-card {
    max-width: 220px !important;
    flex: 0 0 220px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .user-grid,
  .manage-grid,
  .clubs-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .user-card h3,
  .manage-card h3,
  .club-card h3 {
    font-size: 1rem;
  }
      #tooltip {
        display: none !important;
    }

}

@media (max-width: 640px) {
  .add-button {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
}

@media (min-width: 769px) {
  .header-mobile {
    display: none;
  }

  .hero-mobile {
    display: flex;
  }
}

/* Spelers-tab: toon 2 kolommen vanaf 443px (alleen spelers-grid verbreden) */
@media (min-width: 443px) and (max-width: 768px) {
  #tab-players .user-grid {
    gap: 1rem !important;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
  }
}

/* Reset: onder 386px normale gridbreedte en standaard gap */
@media (max-width: 386px) {
  .user-grid,
  .manage-grid,
  .clubs-grid {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 1rem !important;
  }
}

/* Paginatie (spelers-tab) */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.pagination .page-arrow,
.pagination .page-link {
  background: #ffffff;
  color: #1e177e;
  border: 1px solid #1e177e;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  min-width: 2rem;
}
.pagination .page-arrow[disabled],
.pagination .page-link[disabled] { opacity: 0.5; }
.pagination .page-link.active {
  background: #1e177e;
  color: #fff;
}

/* Zorg dat paginatie geen layout verspringing geeft in kaarten */
#players-pagination { min-height: 2.2rem; }

/* Absences layout + internal scroll */
#tab-absences .absence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
#tab-absences .absence-card {
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  text-align: left;
  align-items: stretch;
  justify-content: flex-start;
}
#tab-absences .absence-card--wide {
  grid-column: 1 / -1;
}
#tab-absences .absence-card__body {
  flex: 1;
  min-height: 0;
  width: 100%;
}
#tab-absences .absence-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
#tab-absences .absence-filter-bar .input {
  min-width: 160px;
}
#tab-absences .absence-filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
#tab-absences .absence-table-wrap {
  overflow: auto;
  min-height: 0;
}
#tab-absences .absence-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}

/* Afwezigheden: <= 768px elke kaart volledige rij (1 kolom), volgorde: 1) grafiek 2) momenten 3) scoreboard */
@media (max-width: 768px) {
  /* Gebruik grid met 1 kolom om alle flex/inline widths te negeren */
  #tab-absences .user-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-items: stretch !important;
    align-items: stretch !important;
  }
  #tab-absences .user-grid > .manage-card,
  #absence-chart-card,
  #absence-moments-card,
  #absence-scoreboard-card {
    width: 100% !important;             /* overschrijft inline width */
    max-width: 100% !important;
    flex: none !important;              /* negeer flex-basis 220px regels */
  }
  #absence-chart-card { order: 1; }
  #absence-moments-card { order: 2; }
  #absence-scoreboard-card { order: 3; }

  #tab-absences .absence-filter-actions {
    width: 100%;
    flex-wrap: nowrap;
  }
  #tab-absences .absence-filter-actions .button-link {
    flex: 1 1 0;
    text-align: center;
    padding: 0.35rem 0.6rem;
  }
}
