/*
 * Tema Club — design system.
 * Brand palette (from logo): purple #26215C / #5E2563, indigo #6078E9,
 * cyan #1BCCDD. Ink text on white; color arrives via hero, promo and accents.
 */

:root {
  --brand-purple: #26215C;
  --brand-purple-alt: #5E2563;
  --brand-indigo: #6078E9;
  --brand-indigo-dark: #4a61d1;
  --brand-cyan: #1BCCDD;
  --ink: #211d45;
  --text: #3d3a5c;
  --text-muted: #6b6890;
  --surface: #ffffff;
  --tint: #f6f6fb;
  --border: #e8e7f2;
  --error: #b3261e;
  --error-bg: #fdecea;
  --success-bg: #e9fbf9;
  --success-border: #1BCCDD;
  --radius: 18px;
  --shadow-soft: 0 1px 2px rgba(33, 29, 69, 0.05), 0 8px 24px rgba(33, 29, 69, 0.07);
  --shadow-lift: 0 2px 4px rgba(33, 29, 69, 0.06), 0 16px 40px rgba(33, 29, 69, 0.12);
}

* {
  box-sizing: border-box;
}

/* turbo-frame is a custom element with no default display — without this
   it renders inline, which is harmless while its content is only block
   elements (browsers cope) but wrong the moment something inline sits at
   its top level. */
turbo-frame {
  display: block;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background-color: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a {
  color: var(--brand-indigo);
}

a:hover {
  color: var(--brand-indigo-dark);
}

/* --- Buttons --- */

.btn,
.actions input[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1.6rem;
  background-color: var(--brand-indigo);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(96, 120, 233, 0.35);
}

.btn:hover,
.actions input[type="submit"]:hover {
  background-color: var(--brand-indigo-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(96, 120, 233, 0.45);
}

.btn--inline,
.btn--small {
  width: auto;
}

.btn--small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  box-shadow: none;
}

.btn--secondary {
  background-color: transparent;
  color: var(--brand-indigo);
  border: 1.5px solid var(--brand-indigo);
  box-shadow: none;
}

.btn--secondary:hover {
  background-color: var(--brand-indigo);
  color: #fff;
}

.btn--ghost {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}

.btn--danger {
  background-color: transparent;
  color: var(--error);
  border: 1.5px solid var(--error);
  box-shadow: none;
}

.btn--danger:hover {
  background-color: var(--error);
  color: #fff;
}

.tournament-new {
  margin-bottom: 1.5rem;
}
/* --- Flash messages --- */

/* Base box — also used inline (a static <p class="flash flash--alert">) for
   in-page notices. The floating toast adds .flash--toast on top. */
.flash {
  margin: 0.75rem 0;
  padding: 0.8rem 1.15rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

/* The dismissable toast rendered by shared/_flash: bottom-centre, glides up
   from off the bottom edge on appear, slides back down on leave (see
   flash_controller.js). */
.flash--toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  z-index: 1000;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: max-content;
  max-width: min(92vw, 27rem);
  padding-right: 0.7rem;
  box-shadow: 0 10px 34px rgba(33, 29, 69, 0.16), 0 2px 8px rgba(33, 29, 69, 0.08);
  transform: translateX(-50%);
  animation: flash-in 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.flash--toast.flash--leaving {
  opacity: 0;
  transform: translate(-50%, calc(100% + 1.75rem));
}

@keyframes flash-in {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(100% + 1.75rem));
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes flash-in-mobile {
  0% {
    opacity: 0;
    transform: translateY(calc(100% + 1rem));
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash__message {
  flex: 1;
  min-width: 0;
}

.flash__close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.flash__close:hover {
  opacity: 1;
}

.flash--notice {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--brand-purple);
}

.flash--alert {
  background-color: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error);
}

@media (max-width: 560px) {
  .flash--toast {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    transform: none;
    animation-name: flash-in-mobile;
  }

  .flash--toast.flash--leaving {
    transform: translateY(calc(100% + 1rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash--toast {
    animation: none;
    transition: none;
  }
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.site-brand__logo {
  width: 50px;
  height: auto;
}

.site-brand__name {
  color: var(--brand-purple);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}

.site-header__menus {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 1;
  min-width: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: auto;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--brand-indigo);
}

.site-header__auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__auth form {
  display: inline;
}

/* --- Back bar --- */

.back-bar {
  border-bottom: 1px solid var(--border);
  background-color: var(--tint);
}

.back-bar__inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.back-link:hover {
  color: var(--brand-indigo);
}

.back-link__icon {
  width: 16px;
  height: 16px;
}

/* --- Navbar dropdowns --- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown__button {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown__button:hover {
  color: var(--brand-indigo);
}

.nav-caret {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  min-width: 13rem;
  padding: 0.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  z-index: 30;
  flex-direction: column;
}

.nav-dropdown__menu.is-open {
  display: flex;
}

.nav-dropdown__menu--right {
  left: auto;
  right: 0;
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-dropdown__menu a:hover {
  background-color: var(--tint);
  color: var(--brand-indigo);
}

.nav-dropdown__divider {
  height: 1px;
  background-color: var(--border);
  margin: 0.4rem 0.5rem;
}

.nav-dropdown__signout {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--error);
  cursor: pointer;
}

.nav-dropdown__signout:hover {
  background-color: var(--error-bg);
}

.nav-account__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
}

.nav-account__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-indigo) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-account__badge {
  position: absolute;
  top: -3px;
  left: 26px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background-color: var(--brand-cyan);
  color: var(--brand-purple);
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Burger / mobile drawer --- */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background-color: var(--brand-purple);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .nav-burger span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-burger {
    display: flex;
  }

  /* Overlay panel: floats over the page instead of pushing it down. */
  .site-header__menus {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1rem;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-header__menus.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-right: 0;
  }

  .site-nav > a,
  .nav-dropdown__button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.7rem 0.25rem;
    font-size: 1rem;
  }

  .nav-dropdown__menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding: 0 0 0 0.85rem;
    margin: 0 0 0.25rem 0.25rem;
    min-width: 0;
  }

  .site-header__auth {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.5rem;
  }

  .nav-account__button {
    width: 100%;
    padding: 0.7rem 0.25rem;
  }

  .nav-dropdown--account,
  .nav-dropdown--account .nav-dropdown__menu {
    width: 100%;
  }
}

/* --- Hero --- */

.hero {
  position: relative;
  color: #fff;
  text-align: center;
  overflow: hidden;
  background-image: url("/assets/hero-7b2394db.png");
  background-size: cover;
  background-position: center;
}

/* Gradient sits above the photo as its own layer — tune --hero-gradient-opacity
   (0 = full photo, 1 = original solid gradient, no photo visible) to taste. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55rem 28rem at 85% -10%, rgba(96, 120, 233, 0.55), transparent 62%),
    radial-gradient(40rem 26rem at 8% 115%, rgba(27, 204, 221, 0.32), transparent 62%),
    linear-gradient(150deg, #26215C 0%, #38296b 55%, #5E2563 100%);
  opacity: var(--hero-gradient-opacity, 0.9);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
  padding: 5.5rem 1.25rem 4.5rem;
}

.hero__eyebrow {
  color: var(--brand-cyan);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 1.25rem;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero__subtitle {
  color: #c9c6e8;
  font-size: 1.15rem;
  max-width: 32rem;
  margin: 0 auto 2.25rem;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  min-width: 8.5rem;
  padding: 1rem 1.4rem;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.stat__num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--brand-cyan);
  line-height: 1.2;
}

.stat__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d5d3ee;
}

/* --- Sections --- */

.section__inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 1.5rem;
}

.section-brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.section-brand__logo {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  padding: 0.5rem;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.section-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.section-brand__text .eyebrow {
  margin-bottom: 0.2rem;
}

.section-brand__text h2 {
  margin-bottom: 0;
}

.section__inner--narrow {
  max-width: 46rem;
}

.section:last-of-type .section__inner {
  padding-bottom: 5rem;
}

.eyebrow {
  color: var(--brand-indigo);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 0.5rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 1.25rem;
}

.section h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
}

/* --- Promo banner --- */

.promo {
  display: block;
  border-radius: 24px;
  padding: 2.4rem 2.2rem;
  background:
    radial-gradient(30rem 16rem at 90% -30%, rgba(255, 255, 255, 0.25), transparent 60%),
    linear-gradient(120deg, var(--brand-indigo) 0%, var(--brand-cyan) 100%);
  color: #fff;
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}

.promo--link {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.promo--link:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33, 29, 69, 0.08), 0 24px 48px rgba(33, 29, 69, 0.16);
}

.promo__title {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.promo__sub {
  margin: 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Courts --- */

.court-group {
  margin-bottom: 2.25rem;
}

.court-group h3 {
  margin: 0 0 0.9rem;
}

.court-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.9rem;
}

.court-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.court-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.court-tile__name {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.events-tile {
  padding: 1.5rem 1.75rem;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.events-tile p {
  margin: 0;
}

.badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  display: flex;
}

.badge--indoor {
  background-color: #eceaf7;
  color: var(--brand-purple);
  display: inline;
}

.badge--outdoor {
  background-color: #dcf8fb;
  color: #0e7c87;
  display: inline;
}

/* --- Services & payment methods (home) --- */

.feature-grid {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.9rem;
}

.feature-tile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.feature-tile__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background-color: var(--tint);
  color: var(--brand-indigo);
}

.feature-tile__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.payment-pills {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.payment-pill {
  padding: 0.5rem 1rem;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

/* --- Teachers --- */

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

.teacher-card {
  padding: 1.75rem 1.6rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.teacher-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.teacher-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-indigo) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.teacher-card__name {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
}

.teacher-card__role {
  margin: 0 0 0.7rem;
  color: var(--brand-indigo);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.teacher-card__bio {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.teacher-card--link {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.teacher-card--link:hover {
  color: var(--text);
}

.teacher-card__more {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-indigo);
}

.teacher-card__phone {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
}

.teacher-card__phone a {
  text-decoration: none;
  font-weight: 700;
}

/* --- Price list --- */

.pricelist {
  margin-top: 3rem;
  padding: 2.25rem 2.25rem 2rem;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: 24px;
}

@media (max-width: 480px) {
  .pricelist {
    padding: 1.5rem 1rem 1.25rem;
  }
}

.pricelist__title {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.pricelist__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
}

.pricelist__group h4 {
  margin: 0 0 0.6rem;
  color: var(--brand-indigo);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.pricelist__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricelist__group li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.pricelist__group li:last-child {
  border-bottom: none;
}

.pricelist__item {
  font-weight: 600;
  color: var(--ink);
}

.pricelist__price {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--brand-purple);
}

.pricelist__meta {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.pricelist__more {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-indigo);
}

/* --- Contact --- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
}

.contact-card {
  padding: 1.75rem 2rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.contact-card h3 {
  margin: 0 0 0.6rem;
}

.contact-card h3 + h3,
.contact-card p + h3 {
  margin-top: 1.5rem;
}

.contact-card p {
  margin: 0.3rem 0;
}

.contact-card a {
  text-decoration: none;
  font-weight: 600;
}

.contact-card__maps {
  display: inline-block;
  margin-top: 0.5rem;
}

/* --- Footer --- */

.site-footer {
  margin-top: 3rem;
  background-color: var(--brand-purple);
  color: #b6b3d8;
  font-size: 0.9rem;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--brand-indigo), var(--brand-cyan)) 1;
}

.site-footer__inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.75rem;
}

.site-footer p {
  margin: 0.3rem 0;
}

.site-footer__title {
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.site-footer a {
  color: var(--brand-cyan);
  text-decoration: none;
  font-weight: 600;
}

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

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
}

.site-footer__bottom .powered-by {
  color: rgba(255, 255, 255, 0.45);
}

.site-footer__bottom .powered-by__link:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* --- Powered by credit (discreet, always below the club's own branding) --- */

.powered-by {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.powered-by__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
}

.powered-by__link:hover {
  color: var(--brand-indigo);
}

/* --- Auth pages --- */

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(40rem 24rem at 100% 0%, rgba(96, 120, 233, 0.08), transparent 60%),
    radial-gradient(32rem 20rem at 0% 100%, rgba(27, 204, 221, 0.07), transparent 60%),
    var(--tint);
}

.auth-wrapper {
  max-width: 27rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.auth-logo {
  width: 72px;
  height: auto;
}

.auth-wordmark {
  color: var(--brand-purple);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 1rem;
}

.auth-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2.25rem 2rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-lift);
}

.auth-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.auth-footer + .powered-by {
  text-align: center;
  margin-top: 0.35rem;
}

.auth-links {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.auth-links p {
  margin: 0.35rem 0;
}

.auth-links a {
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* --- Forms --- */

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.field .hint {
  color: var(--text-muted);
  font-size: 0.83rem;
  margin: 0.3rem 0 0;
}

.field--checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field--checkbox label {
  margin: 0;
  font-weight: 500;
  color: var(--text);
}

.field--checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}

.checkbox-chip:has(input:checked) {
  border-color: var(--brand-indigo);
  background-color: rgba(96, 120, 233, 0.1);
  color: var(--ink);
}

.checkbox-chip--static {
  border-color: var(--brand-indigo);
  background-color: rgba(96, 120, 233, 0.1);
  color: var(--ink);
  cursor: default;
}

.actions {
  margin-top: 1.5rem;
}

/* --- Booking flow --- */

.site-nav__cta {
  color: var(--brand-indigo) !important;
}

.booking-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 1.5rem;
}

.booking-offerings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.offering-pill {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.75rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background-color: var(--surface);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.offering-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  color: var(--text);
}

.offering-pill.is-selected {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.offering-pill__title {
  font-weight: 800;
  color: var(--ink);
}

.offering-pill__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.booking-datenav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.booking-datenav__form input[type="date"] {
  padding: 0.5rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background-color: #fff;
}

.booking-grid-wrap {
  overflow-x: auto;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.booking-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.booking-grid th {
  padding: 0.75rem 0.9rem;
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.booking-grid th .badge {
  margin-left: 0.4rem;
}

.booking-grid td {
  padding: 0.35rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.booking-grid tbody tr:last-child td {
  border-bottom: none;
}

.booking-grid__time {
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  width: 4.5rem;
}

.slot {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}

.slot--free {
  background-color: #e6f7f4;
  color: #0e7c87;
  border: 1px solid var(--brand-cyan);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.slot--free:hover {
  background-color: var(--brand-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.slot--taken {
  background-color: var(--tint);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 600;
}

.booking-summary {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

/* The /prenota/conferma card: club logo on top, brand-coloured border. */
.booking-summary--confirm {
  border: 1.5px solid var(--brand-indigo);
  padding-top: 1.5rem;
}

.booking-summary__brand {
  display: flex;
  justify-content: center;
  padding-bottom: 1.1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.booking-summary__logo {
  width: 56px;
  height: auto;
}

.booking-summary dl {
  margin: 0;
}

.booking-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.booking-summary dl > div:last-child {
  border-bottom: none;
}

.booking-summary dt {
  color: var(--text-muted);
  font-weight: 600;
}

.booking-summary dd {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

.booking-summary__price dd {
  color: var(--brand-purple);
  font-size: 1.1rem;
}

.booking-confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.booking-index-actions {
  margin-bottom: 2rem;
}

/* --- Share control (see shared/_share_button + share_controller.js) --- */

.share {
  position: relative;
  display: inline-block;
}

.share__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.share__trigger svg {
  width: 1rem;
  height: 1rem;
}

.share__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}

.share__menu[hidden] {
  display: none;
}

.share__option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.share__option:hover {
  background-color: var(--tint);
}

.share__dot {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background-color: var(--text-muted);
}

.share__dot--whatsapp { background-color: #25d366; }
.share__dot--facebook { background-color: #1877f2; }
.share__dot--telegram { background-color: #29a9eb; }
.share__dot--link { background-color: var(--brand-indigo); }

.share-image-preview {
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.booking-subhead {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 1.75rem 0 0.9rem;
}

/* --- Area (client/teacher back office) --- */

.area-shell {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .area-shell {
    grid-template-columns: 1fr;
  }
}

.area-sidebar {
  display: flex;
  flex-direction: column;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 5rem;
}

@media (max-width: 860px) {
  .area-sidebar {
    position: static;
  }
}

.area-sidebar__brand {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.area-sidebar__section {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-indigo);
}

.area-sidebar__section:first-of-type {
  margin-top: 0;
}

.area-sidebar__link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
}

.area-sidebar__link:hover {
  background-color: var(--surface);
}

.area-sidebar__link.is-active {
  background-color: var(--brand-purple);
  color: #fff;
}

.area-sidebar__divider {
  height: 1px;
  background-color: var(--border);
  margin: 1.25rem 0;
}

.area-sidebar__signout {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 10px;
  background: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--error);
  text-align: left;
  cursor: pointer;
}

.area-sidebar__signout:hover {
  background-color: var(--surface);
}

.area-content {
  min-width: 0;
}

.area-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.75rem;
}

.area-section-head .booking-subhead {
  margin-top: 0;
}

.area-section-head__link {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-indigo);
  white-space: nowrap;
}

.booking-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.85rem;
}

.booking-card--past {
  opacity: 0.65;
}

.booking-card p {
  margin: 0.15rem 0;
}

.booking-card__court {
  font-weight: 800;
  color: var(--ink);
}

.booking-card__when {
  font-weight: 600;
}

.booking-card__price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payment-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.5rem 0 0;
  padding: 0.25rem 0.6rem;
  background-color: var(--error-bg);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--error);
}

.payment-countdown strong {
  font-variant-numeric: tabular-nums;
}

/* --- Site-wide pending-payment banner --- */

.payment-banner {
  background-color: var(--error-bg);
  border-bottom: 1px solid var(--error);
}

.payment-banner__inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-align: center;
}

.payment-countdown--banner {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

.payment-banner__link {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--error);
  text-decoration: underline;
  white-space: nowrap;
}

.booking-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.badge--status-confirmed {
  background-color: #e6f7f4;
  color: #0e7c87;
  display: inline-block;
}

.badge--status-pending {
  background-color: #fdf3e0;
  color: #9a6a00;
  display: inline-block;
}

.badge--status-cancelled {
  background-color: var(--error-bg);
  color: var(--error);
  display: inline-block;
}

.badge--status-completed {
  background-color: #eceaf7;
  color: var(--brand-purple);
  display: inline-block;
}

.badge--status-no_show {
  background-color: var(--tint);
  color: var(--text-muted);
  display: inline-block;
}

.badge--status-paid {
  background-color: #e6f7f4;
  color: #0e7c87;
  display: inline-block;
}

.badge--status-failed {
  background-color: var(--error-bg);
  color: var(--error);
  display: inline-block;
}

.badge--status-refunded {
  background-color: var(--tint);
  color: var(--text-muted);
  display: inline-block;
}

.badge--status-draft {
  background-color: var(--tint);
  color: var(--text-muted);
  display: inline-block;
}

.badge--status-registration_open {
  background-color: #e6f7f4;
  color: #0e7c87;
  display: inline-block;
}

.badge--status-registration_closed {
  background-color: #fdf3e0;
  color: #9a6a00;
  display: inline-block;
}

.badge--status-in_progress {
  background-color: #eceaf7;
  color: var(--brand-purple);
  display: inline-block;
}

/* --- Admin back-office --- */

.admin-body {
  display: flex;
  min-height: 100vh;
  background-color: var(--tint);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  width: 15rem;
  flex-shrink: 0;
  padding: 1.5rem 1.25rem;
  background-color: var(--brand-purple);
  color: #d9d7ea;
  height: 100vh;
  position: sticky;
  top: 0;
  left: 0;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  text-decoration: none;
}

.admin-sidebar__brand:hover {
  color: #fff;
}

.admin-sidebar__logo {
  width: 34px;
  height: auto;
  background: #fff;
  border-radius: 8px;
  padding: 3px;
}

.admin-sidebar__label {
  color: var(--brand-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0.75rem 0 1.75rem;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.admin-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar__group:first-child {
  padding-top: 0;
  border-top: none;
}

.admin-sidebar__group-label {
  color: rgba(217, 215, 234, 0.55);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.15rem;
  padding: 0 0.85rem;
}

.admin-sidebar__nav a {
  color: #c6c3e4;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-sidebar__nav a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.admin-sidebar__nav a.is-active {
  color: #fff;
  background-color: var(--brand-indigo);
}

.admin-sidebar__bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.admin-sidebar__bottom a {
  color: var(--brand-cyan);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
}

.admin-sidebar__bottom .powered-by {
  margin-top: 0.4rem;
  padding: 0 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

.admin-sidebar__bottom .powered-by__link:hover {
  color: rgba(255, 255, 255, 0.7);
}

.admin-sidebar__signout {
  background: none;
  border: none;
  color: #c6c3e4;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.admin-sidebar__signout:hover {
  color: #fff;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 2rem;
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.admin-topbar__facility {
  font-weight: 800;
  color: var(--ink);
}

.admin-topbar__user {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.admin-topbar__user:hover {
  color: var(--brand-indigo);
  text-decoration: underline;
}

.admin-content {
  padding: 2rem;
  max-width: 95%;
}

.admin-content h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  font-weight: 800;
}

.admin-subtitle {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Dashboard-only: tiles grouped into sections mirroring the sidebar nav's
   own groups (Operazioni, Incassi, Struttura, Persone), each its own
   .admin-stats row so a small group (e.g. just "Incassi") doesn't stretch
   into empty columns the way a shared fixed-column grid would. */
.admin-dashboard-group {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.admin-dashboard-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.admin-dashboard-group__label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.admin-stat__num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--brand-purple);
  line-height: 1.2;
}

.admin-stat__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-stat__num-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-stat__sub {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.revenue-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.revenue-toolbar__label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.revenue-toolbar .cal-toolbar {
  margin-bottom: 0;
}

.payment-refund-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.payment-refund-form input[type="text"] {
  width: 8rem;
  padding: 0.35rem 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
}

.admin-table-wrap {
  overflow-x: auto;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.admin-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

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

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tr.is-inactive td {
  opacity: 0.5;
}

.admin-table__title {
  font-weight: 700;
  color: var(--ink);
}

.admin-table__meta {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.admin-table__actions {
  white-space: nowrap;
  text-align: right;
}

.admin-table__actions a {
  font-weight: 700;
  text-decoration: none;
  margin-right: 0.75rem;
}

.admin-table__actions form {
  display: inline;
}

/* For a cell with several actions (e.g. corsi: dettagli/modifica/annulla/segna
   pagato) — stacks them into a tidy left-aligned column instead of one
   crowded, wrapping line. */
.admin-table__actions--stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  white-space: normal;
  text-align: left;
}

.admin-table__actions--stack a {
  margin-right: 0;
}

.admin-link-danger {
  background: none;
  border: none;
  padding: 0;
  color: var(--error);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-link-danger:hover {
  text-decoration: underline;
}

.badge--kind-court_rental {
  background-color: #dcf8fb;
  color: #0e7c87;
}

.badge--kind-lesson {
  background-color: #eceaf7;
  color: var(--brand-purple);
  display: inline;
}

.badge--kind-course {
  background-color: #e9edfd;
  color: var(--brand-indigo-dark);
  display: inline;
}

.badge--kind-tournament {
  background-color: #ffe4e6;
  color: #e11d48;
  display: inline;
}

.admin-search {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  max-width: 34rem;
}

.admin-search input[type="search"] {
  flex: 1;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background-color: #fff;
}

.admin-search input[type="search"]:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.admin-form {
  max-width: 34rem;
  padding: 2rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-form select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: #fff;
}

.admin-form select:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.admin-form input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.admin-form input[type="number"]:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.admin-form__actions {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .admin-body {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .admin-sidebar__label {
    display: none;
  }

  .admin-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    margin-left: 0;
    gap: 0.35rem;
  }

  .admin-sidebar__group {
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 0;
    border-top: none;
    gap: 0.35rem;
  }

  .admin-sidebar__group-label {
    display: none;
  }

  .admin-sidebar__nav a {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
  }

  /* Was display: none, which also swallowed sign-out and the site link —
     kept visible but reflowed as a wrapping row now that the sidebar
     itself is no longer a tall column with margin-top: auto to lean on. */
  .admin-sidebar__bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    gap: 0.5rem 1rem;
  }

  .admin-topbar {
    flex-wrap: wrap;
    padding: 0.75rem 1.25rem;
  }

  .admin-content {
    padding: 1.25rem;
  }

  .admin-form__row {
    grid-template-columns: 1fr;
  }
}

/* --- Open matches --- */

.match-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.match-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.6rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: var(--tint);
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
}

.match-card__month {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.match-card__day {
  font-size: 1.6rem;
  font-weight: 800;
}

.match-card__year {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.match-card__body {
  flex: 1;
  min-width: 0;
}

.match-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.match-card__meta {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.match-slots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.match-avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-indigo) 100%);
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

/* When a photo fills the avatar, .match-avatar__level floats as a small
   overlay chip instead of stacking below the (now absent) initials. */
.match-avatar:has(.avatar-photo) {
  overflow: visible;
}

.match-avatar:has(.avatar-photo) .match-avatar__level {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--ink);
  padding: 1px 4px;
  border-radius: 6px;
  border: 1.5px solid var(--surface);
  line-height: 1.3;
}

.match-avatar__initials {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.1;
}

/* Shared by every avatar container (match-avatar, teacher-card__avatar,
   nav-account__avatar) — border-radius: inherit picks up whichever shape
   the parent defines, circular or rounded-square alike. */
.avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  cursor: pointer;
}

/* --- Avatar lightbox (click a profile photo to see it full-size) --- */

.avatar-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(90vw, 32rem);
  max-height: 90vh;
}

.avatar-lightbox::backdrop {
  background: rgba(20, 18, 38, 0.75);
}

.avatar-lightbox__image {
  display: block;
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.avatar-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background-color: var(--surface);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 0;
  box-shadow: var(--shadow-lift);
  cursor: pointer;
}

.avatar-lightbox__close:hover {
  background-color: var(--tint);
}

@media (max-width: 480px) {
  .avatar-lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* --- Admin dialog: any row-triggered popover (edit a match's court/time,
   a client's quick-view details, ...) as a floating overlay, not a
   <details> block that shoves the rest of the table down --- */

.admin-dialog {
  position: fixed;
  margin: auto;
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: min(90vw, 28rem);
  width: 100%;
  box-shadow: var(--shadow-lift);
  background-color: var(--surface);
  color: var(--ink);
}

.admin-dialog::backdrop {
  background: rgba(20, 18, 38, 0.45);
}

.admin-dialog__title {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.admin-dialog__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background-color: var(--tint);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 0;
  cursor: pointer;
}

.admin-dialog__close:hover {
  background-color: var(--border);
}

/* --- Confirm dialog: stands in for the browser's own window.confirm() on
   every data-turbo-confirm action, site-wide (see confirm_dialog.js) — so
   "are you sure?" looks like Tema Club, not a bare OS alert box. */

.confirm-dialog {
  position: fixed;
  margin: auto;
  border: 1.5px solid var(--brand-indigo);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem 1.75rem;
  max-width: min(90vw, 26rem);
  width: 100%;
  box-shadow: var(--shadow-lift);
  background-color: var(--surface);
  color: var(--ink);
}

.confirm-dialog::backdrop {
  background: rgba(20, 18, 38, 0.45);
}

.confirm-dialog__brand {
  display: flex;
  justify-content: center;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.confirm-dialog__logo {
  display: block;
  width: 46px;
  height: 46px;
  background: url("/assets/logo-790bf24a.png") center / contain no-repeat;
}

.confirm-dialog__message {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.match-avatar__level {
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.85;
}

.match-slot-free {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px dashed var(--border);
  background-color: var(--tint);
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.match-slot-free:hover {
  border-color: var(--brand-indigo);
  color: var(--brand-indigo);
}

.match-teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.match-team {
  padding: 1.25rem 1.4rem;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.match-team h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.match-player {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 0.6rem;
}

.match-player p {
  margin: 0;
}

.match-player__name {
  font-weight: 800;
  color: var(--ink);
}

.match-player__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.match-player__due {
  font-size: 0.78rem;
  color: #b26a00;
  font-weight: 700;
}

.tournament-roster-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tournament-roster-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.tournament-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tournament-section-head .booking-subhead {
  margin: 0;
}

/* Compact team tiles for "Squadre iscritte" — a maxi torneo can have 30+
   teams, so these are deliberately denser than .match-team/.match-player
   (built for a 4-person open-match roster, not dozens of tournament teams). */
.tournament-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.tournament-team-card {
  padding: 0.65rem 0.85rem;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
  max-width: 350px;
}

.tournament-team-card__name {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tournament-team-card__player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.3;
}

.tournament-team-card__player:last-child {
  margin-bottom: 0;
}

.tournament-team-card__player a {
  color: var(--ink);
}

.tournament-team-card__player-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tournament-team-card__guest {
  color: var(--text-muted);
  font-weight: 500;
}

.match-player__voucher {
  font-size: 0.78rem;
  color: var(--brand-purple);
  font-weight: 700;
}

.match-join {
  padding: 1.5rem 1.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.match-join__form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.match-join__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.match-join__form .field {
  margin-bottom: 0;
  min-width: 10rem;
}

.match-join__form select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: #fff;
}

/* --- Player profile --- */

.profile-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.match-avatar--big {
  width: 84px;
  height: 84px;
  border-radius: 22px;
}

.match-avatar--big .match-avatar__initials {
  font-size: 1.7rem;
}

.match-avatar--small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.match-avatar--small .match-avatar__initials {
  font-size: 0.68rem;
}

.profile-name {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
}

.profile-badges {
  margin: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.privacy-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.privacy-tag--on {
  background-color: #e6f7f4;
  color: #0e7c87;
}

.badge--role-client {
  background-color: var(--tint);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge--role-instructor {
  background-color: #ede9fe;
  color: #6d28d9;
}

.badge--role-admin {
  background-color: var(--brand-purple);
  color: #fff;
}

.privacy-tag--off {
  background-color: var(--tint);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.profile-form {
  max-width: none;
  box-shadow: var(--shadow-soft);
}

.profile-photo-field {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-photo-field .field {
  flex: 1;
}

.match-player__link {
  color: var(--ink);
  text-decoration: none;
}

.match-player__link:hover {
  color: var(--brand-indigo);
}

/* --- Friends & private matches --- */

.friend-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.friend-actions {
  flex-direction: row !important;
  align-items: center !important;
}

/* Inline friend-request toggle in the /giocatori directory */
.player-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.friend-toggle,
.friend-toggle__form {
  display: inline-flex;
  margin: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid var(--brand-indigo);
  background: transparent;
  color: var(--brand-indigo);
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--brand-indigo);
  color: #fff;
}

.icon-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.icon-btn--pending {
  border-color: #9a6a00;
  color: #9a6a00;
}

.icon-btn--pending:hover {
  background: #9a6a00;
  color: #fff;
}

.icon-btn--friends {
  border-color: #0e7c87;
  color: #0e7c87;
  cursor: default;
}

.icon-btn--friends:hover {
  background: #0e7c87;
  color: #fff;
}

.match-list--section {
  margin-bottom: 1.5rem;
}

.private-match-cta {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  background-color: var(--tint);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.field--radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.radio-option:has(.radio-option__input:checked) {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.radio-option__input {
  flex-shrink: 0;
  accent-color: var(--brand-indigo);
}

.radio-option__label {
  flex: 1;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.radio-option__amount {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--brand-purple);
  font-size: 0.92rem;
}

.radio-option--disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.radio-option--disabled .radio-option__amount {
  color: var(--text-muted);
}

.radio-option__explanation {
  margin-top: 0.15rem;
  margin-bottom: 0;
}

.radio-option__disabled-note {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.85rem;
}

.match-invite-panel {
  margin-bottom: 1.5rem;
}

.invite-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  background-color: var(--tint);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.invite-search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.invite-search-form input[type="text"] {
  flex: 1;
}

.partner-picker {
  position: relative;
  max-width: 26rem;
}

.partner-picker__input {
  width: 100%;
}

.partner-picker__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 20, 40, 0.12);
  padding: 0.35rem;
}

.partner-picker__option {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink);
}

.partner-picker__option:hover {
  background-color: var(--tint);
}

.partner-picker__empty {
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --- Admin calendar --- */

.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cal-toolbar .booking-datenav {
  margin-bottom: 0;
}

.cal-sports {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cal-sport-pill {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.cal-sport-pill.is-selected {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
  color: #fff;
}

/* --- Admin time-picker quick-pick chips --- */

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-height: 6.5rem;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: var(--tint);
  border-radius: 10px;
}

.time-chip {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
}

.time-chip:hover {
  border-color: var(--brand-indigo);
}

.time-chip.is-selected {
  background-color: var(--brand-indigo);
  border-color: var(--brand-indigo);
  color: #fff;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cal-nav__label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
  white-space: nowrap;
}

.cal-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cal-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

/* A categorical palette (one hue family per type, evenly spread rather
   than clustered) — the old set had lesson/club/tournament all sitting in
   the same purple-magenta-pink family, hard to tell apart at a glance in
   a grid showing several at once. */
.cal-dot--standard { background-color: var(--brand-indigo); }
.cal-dot--open-match { background-color: #0891b2; }
.cal-dot--lesson { background-color: #a855f7; }
.cal-dot--maintenance { background-color: #ea580c; }
.cal-dot--club { background-color: #92400e; }
.cal-dot--course { background-color: #16a34a; }
.cal-dot--tournament { background-color: #e11d48; }
.cal-dot--proposed { background-color: transparent; border: 2px dashed #e11d48; }

.cal-wrap {
  margin-bottom: 1.5rem;
}

.cal {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.cal th {
  padding: 0.7rem 0.6rem;
  text-align: center;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal td {
  border-bottom: 1px solid var(--tint);
  border-left: 1px solid var(--tint);
  height: 2.2rem;
  padding: 0;
  vertical-align: top;
}

.cal__time {
  width: 4rem;
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
  vertical-align: middle !important;
  border-left: none !important;
}

.cal__empty {
  text-align: center;
}

.cal__add {
  display: block;
  height: 100%;
  line-height: 2.2rem;
  color: transparent;
  text-decoration: none;
  font-weight: 800;
}

.cal__add:hover {
  color: var(--brand-indigo);
  background-color: rgba(96, 120, 233, 0.07);
}

.cal__block-cell {
  padding: 2px;
}

.cal-block {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  height: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  color: #fff;
  overflow: hidden;
  text-decoration: none;
  transition: filter 0.15s ease;
}

a.cal-block:hover {
  color: #fff;
  filter: brightness(1.12);
}

.cal-block--standard {
  background-color: var(--brand-indigo);
}

.cal-block--open_match {
  background-color: #0891b2;
}

.cal-block--lesson {
  background-color: #a855f7;
}

.booking-teachers {
  margin-bottom: 1.25rem;
  align-items: center;
}

.booking-teachers__label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cal-block--maintenance {
  background-color: #ea580c;
}

.cal-block--club {
  background-color: #92400e;
}

.cal-block--course {
  background-color: #16a34a;
}

.cal-block--tournament {
  background-color: #e11d48;
}

/* Still-proposed match on the calendar preview — not a real booking yet
   (see TournamentSchedulePreviewBlock), so it reads as "would go here"
   rather than "is here": same hue, hollow/dashed instead of filled. */
.cal-block--proposed {
  background-color: transparent;
  border: 2px dashed #e11d48;
  color: #e11d48;
}

.cal-block__time {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

.cal-block__type {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

.cal-block__label {
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-block__pay {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
  margin-top: auto;
  align-self: flex-end;
  text-align: right;
}

.admin-link-action {
  background: none;
  border: none;
  padding: 0;
  margin-right: 0.75rem;
  color: var(--brand-indigo);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-link-action:hover {
  text-decoration: underline;
}

.admin-stat--good .admin-stat__num {
  color: #18a999;
}

.admin-stat--warn .admin-stat__num {
  color: #b26a00;
}

.revenue-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.revenue-filter input[type="date"] {
  padding: 0.5rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background-color: #fff;
}

.revenue-view-switch {
  margin-bottom: 1.5rem;
}

/* --- Revenue charts --- */

.revenue-chart {
  padding: 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
}

.revenue-chart__title {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.revenue-chart__svg-wrap {
  position: relative;
}

.revenue-chart__svg {
  display: block;
  width: 100%;
  height: auto;
}

.revenue-chart__bar {
  fill: var(--brand-indigo);
  transition: fill 0.1s ease;
  cursor: pointer;
}

.revenue-chart__bar.is-active {
  fill: var(--brand-purple);
}

.revenue-chart__grid {
  stroke: var(--border);
  stroke-width: 1;
}

.revenue-chart__axis-label {
  font-size: 9px;
  fill: var(--text-muted);
  font-family: inherit;
}

.revenue-chart__peak-label {
  font-size: 10px;
  font-weight: 700;
  fill: var(--ink);
  font-family: inherit;
}

.chart-tooltip {
  position: absolute;
  transform: translate(-50%, -120%);
  pointer-events: none;
  background-color: var(--ink);
  color: #fff;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: var(--shadow-lift);
  z-index: 5;
}

.chart-tooltip strong {
  display: block;
  font-size: 0.85rem;
}

.chart-tooltip span {
  color: rgba(255, 255, 255, 0.7);
}

.hbar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}

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

.hbar-row__label {
  width: 9rem;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbar-row__track {
  flex: 1;
  height: 22px;
  background-color: var(--tint);
  border-radius: 4px;
}

.hbar-row__fill {
  height: 100%;
  min-width: 4px;
  background-color: var(--brand-indigo);
  border-radius: 0 4px 4px 0;
  transition: background-color 0.1s ease, width 0.2s ease;
  cursor: pointer;
}

.hbar-row__fill.is-active {
  background-color: var(--brand-purple);
}

.hbar-row__value {
  width: 4.5rem;
  flex-shrink: 0;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .hbar-row__label {
    width: 6rem;
  }
}

.admin-stat--link {
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-stat--link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.admin-stat--link.is-selected {
  border-width: 2px;
}

.admin-stat--good.is-selected {
  border-color: #18a999;
}

.admin-stat--warn.is-selected {
  border-color: #b26a00;
}

.revenue-table-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.revenue-table-caption .booking-subhead {
  margin: 0;
}

.admin-form textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.admin-form textarea:focus,
.admin-form input[type="date"]:focus,
.admin-form input[type="time"]:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.admin-form input[type="date"],
.admin-form input[type="time"] {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}

/* --- Validation errors --- */

.error-messages {
  background-color: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--error);
}

.course-pattern-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.25rem;
  margin: 0 0 1.25rem;
}

.course-pattern-fieldset legend {
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.error-messages h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--error);
  letter-spacing: 0;
}

.error-messages ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* --- Tessera socio (loyalty card) --- */

.tessera-card {
  margin: 1.5rem 0 2rem;
  padding: 1.75rem 2rem 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

@media (max-width: 480px) {
  .tessera-card {
    padding: 1.25rem 1.5rem 1.25rem;
  }
}

.tessera-card__label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.tessera-card__name {
  margin: 0.15rem 0 1.25rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 0.85rem;
}

.tessera-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .tessera-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.2rem;
  }
}

.tessera-square {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background-color: var(--tint);
}

.tessera-square.is-stamped {
  background-color: var(--brand-indigo);
  border-color: var(--brand-indigo);
}

.tessera-square__num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tessera-square__stamp {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.tessera-square.is-free {
  background: linear-gradient(120deg, var(--brand-purple) 0%, var(--brand-purple-alt) 100%);
  border-color: var(--brand-purple);
}

.tessera-square__free {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
  line-height: 1.15;
}

.tessera-card__progress {
  margin: 1.25rem 0 0.35rem;
  font-weight: 700;
  color: var(--ink);
}

.tessera-card__terms {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Tornei --- */

.hint {
  color: var(--text-muted);
  font-size: 0.83rem;
  margin: 0.3rem 0 0;
}

.tournament-section {
  margin: 2.5rem 0 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.tournament-section__hint {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0.15rem 0 1.25rem;
  max-width: 46rem;
}

.tournament-section__danger {
  color: var(--error);
}

.team-detail-payment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.team-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.team-card {
  padding: 1rem 1.1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.team-card__players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.team-card__player {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  background-color: var(--tint);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-purple);
}

.team-card__contact {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.team-card__name {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.tournament-breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.tournament-breadcrumb__sep {
  margin: 0 0.35rem;
  color: var(--text-muted);
}

.team-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.team-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.team-card--link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.team-card--link:hover {
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.14);
}

.tournament-match-card {
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.4rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tournament-match-card--completed {
  background-color: var(--tint);
  border-color: transparent;
}

.tournament-match-card__teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0;
  font-size: 0.88rem;
}

.tournament-match-card__team--winner {
  font-weight: 700;
  color: var(--brand-purple);
}

.tournament-match-card__vs {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.tournament-match-card__score {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tournament-match-card__check {
  color: #0e7c87;
  font-weight: 700;
}

.tournament-match-card__result-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.tournament-match-card__set {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tournament-match-card__set-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tournament-match-card__set-sep {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.tournament-match-card__set-input {
  width: 2.5rem;
  padding: 0.2rem 0.35rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  text-align: center;
}

.tournament-match-card__set-input:focus {
  outline: none;
  border-color: var(--brand-indigo);
  box-shadow: 0 0 0 3px rgba(96, 120, 233, 0.18);
}

.tournament-match-card details {
  margin-top: 0.35rem;
}

.tournament-match-card summary {
  font-size: 0.8rem;
}

.tournament-champion {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-indigo) 100%);
  color: #fff;
  border-radius: 12px;
  font-size: 0.95rem;
}

.bracket {
  display: flex;
  align-items: stretch;
  gap: 2.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.5rem;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 1rem;
  flex: 0 0 auto;
  min-width: 15rem;
}

.bracket-round__title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
}

.bracket-match {
  position: relative;
  padding: 0.7rem 0.9rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.bracket-round:not(:last-child) .bracket-match::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1.25rem;
  width: 1.25rem;
  height: 1px;
  background-color: var(--border);
}

.bracket-match__team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.86rem;
}

.bracket-match__team--winner {
  font-weight: 700;
  color: var(--brand-purple);
}

.bracket-match__score {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bracket-match--pending {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* Margin bottom */
.mb-1 {
  margin-bottom: 1rem !important;
}
