@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');
:root {
  --ink: #0d303a;
  --mint: #8bd5ad;
  --lime: #eaff49;
  --paper: #fafbf8;
  --muted: #5c7175;
  --line: #dbe4df;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
h1,
h2,
h3 {
  font-family: Outfit, sans-serif;
  line-height: 1;
  margin: 0.2em 0;
}
h1 {
  font-size: clamp(3rem, 7vw, 6.4rem);
  letter-spacing: -0.07em;
}
h1 em {
  font-style: normal;
  color: #6bbf94;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.05em;
}
h3 {
  font-size: 1.35rem;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9;
  background: #fff;
  padding: 1rem;
}
header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5vw, 24px);
  border-bottom: 1px solid var(--line);
  background: #ffffffd9;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font: 700 1.35rem Outfit;
}
.brand-logo {
  height: 42px;
  width: 42px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand b {
  color: #76c599;
}
.brand small {
  display: block;
  font: 600 0.53rem 'DM Sans';
  letter-spacing: 0.12em;
}
nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
nav a,
footer a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.login,
.menu {
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 99px;
  padding: 11px 18px;
  font: 600 0.9rem inherit;
  cursor: pointer;
}
.menu {
  display: none;
}
.hero,
.section,
.cta {
  padding: clamp(56px, 9vw, 130px) max(5vw, 24px);
}
.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 5vw;
  overflow: hidden;
  position: relative;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #fafbf8ee 0%, #fafbf8cc 45%, #fafbf866 75%, #fafbf822 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.eyebrow {
  color: #599b78;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
}
.lead {
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 560px;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 12px;
  margin: 28px 0;
}
.btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 14px 20px;
  text-decoration: none;
  font: 700 0.92rem inherit;
  cursor: pointer;
}
.primary {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 7px 0 #c7d52d;
}
.primary:hover {
  transform: translateY(2px);
  box-shadow: 0 5px 0 #c7d52d;
}
.ghost {
  border: 1px solid var(--ink);
  color: var(--ink);
}
.dark {
  background: var(--ink);
  color: #fff;
}
.stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.stats b {
  color: var(--ink);
  font: 700 1.3rem Outfit;
  display: block;
}
.hero-card {
  background: var(--ink);
  color: white;
  border-radius: 32px;
  padding: 35px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  box-shadow: 20px 22px 0 #b6e7cb;
  transform: rotate(2deg);
}
.hero-card > * {
  position: relative;
}
.hero-card p {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #9ddfbc;
}
.hero-card h3 {
  font-size: 2rem;
}
.hero-card span {
  color: #b9c8ca;
}
.orb {
  position: absolute;
  width: 230px;
  height: 230px;
  right: -100px;
  top: -100px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: inset -20px -20px #d5df29;
}
.avatars {
  display: flex;
  margin: 30px 0;
}
.avatars i {
  font-style: normal;
  background: #5594a4;
  border: 2px solid var(--ink);
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  margin-right: -8px;
}
.avatars .empty {
  background: transparent;
  border-color: #8ea3a7;
}
.text-btn,
.text-link {
  border: 0;
  background: none;
  color: var(--lime);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 34px;
}
.date-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.date-nav button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.5rem;
  cursor: pointer;
}
.booking {
  display: grid;
  grid-template-columns: 230px 1fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  overflow: hidden;
  box-shadow: 0 14px 30px #1233;
}
.booking aside {
  padding: 22px;
  border-right: 1px solid var(--line);
}
label {
  font-size: 0.82rem;
  font-weight: 700;
  display: block;
  margin: 0 0 15px;
}
input,
select {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  background: white;
  font: inherit;
  color: var(--ink);
}
.legend {
  margin-top: 30px;
  font-size: 0.75rem;
  display: grid;
  gap: 10px;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
}
.free {
  background: var(--lime);
}
.busy {
  background: #dfe7e5;
}
.slots {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.slot {
  padding: 12px 5px;
  border-radius: 9px;
  border: 0;
  font: 600 0.82rem inherit;
}
.slot.free {
  cursor: pointer;
  color: var(--ink);
}
.slot.busy {
  color: #879897;
}
.tint {
  background: #eaf5ee;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}
.game {
  background: white;
  padding: 23px;
  border-radius: 17px;
  border: 1px solid #dbe8df;
  box-shadow: 0 8px 18px #1131;
}
.game-top {
  display: flex;
  justify-content: space-between;
}
.pill,
.tag {
  font-size: 0.68rem;
  padding: 5px 8px;
  border-radius: 20px;
  background: #e4f4e9;
  color: #348259;
  font-weight: 700;
}
.game h3 {
  margin-top: 20px;
}
.game p {
  color: var(--muted);
  font-size: 0.86rem;
}
.game footer {
  margin-top: 18px;
  border: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.game button {
  background: var(--ink);
  color: white;
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}
.tournament {
  background: var(--ink);
  color: white;
  border-radius: 20px;
  padding: 25px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}
.cup {
  font-size: 3rem;
  background: #fff2a1;
  border-radius: 14px;
  padding: 14px;
}
.tournament p {
  color: #b6c8c7;
}
.tag {
  background: var(--lime);
  color: var(--ink);
}
.tour-actions {
  display: flex;
  gap: 8px;
}
.tab {
  border: 1px solid #4c696c;
  background: transparent;
  color: white;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
}
.tab.active {
  background: white;
  color: var(--ink);
}
.tournament-data {
  border: 1px solid var(--line);
  border-top: 0;
  padding: 24px;
  border-radius: 0 0 16px 16px;
  min-height: 120px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table td,
.data-table th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.profile {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 8vw;
  align-items: center;
}
.profile-card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 12px 15px 0 #b9e8cc;
}
.player-photo {
  height: 75px;
  width: 75px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--lime), #70be98);
  display: grid;
  place-items: center;
  font: 700 1.4rem Outfit;
}
.profile-card p {
  color: var(--muted);
  font-size: 0.85rem;
}
.level {
  margin-left: auto;
  font-size: 0.7rem;
  background: #e7f3ec;
  padding: 6px;
  border-radius: 8px;
}
.cta {
  text-align: center;
  background: var(--ink);
  color: white;
}
.cta .eyebrow {
  color: #a3e5bd;
}
.cta .btn {
  margin-top: 18px;
}
footer {
  padding: 36px max(5vw, 24px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: center;
}
footer > div:last-of-type {
  display: flex;
  gap: 15px;
  justify-content: end;
  flex-wrap: wrap;
}
footer p,
footer small {
  color: var(--muted);
  font-size: 0.78rem;
}
.modal {
  position: fixed;
  inset: 0;
  background: #091e24aa;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 20px;
}
.modal:not([hidden]) {
  display: grid;
}
.modal.mandatory .close {
  display: none;
}
.dialog {
  position: relative;
  background: var(--paper);
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px #0006;
}
.close {
  position: absolute;
  right: 15px;
  top: 12px;
  border: 0;
  background: none;
  font-size: 2rem;
  cursor: pointer;
}
.auth-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 15px;
}
.auth-tabs button {
  border: 0;
  background: none;
  padding: 8px 0;
  font-weight: 700;
  cursor: pointer;
}
.auth-tabs .active {
  border-bottom: 3px solid #75c99d;
}
.check {
  font-size: 0.72rem;
  display: flex;
  gap: 7px;
  align-items: start;
}
.check input {
  width: auto;
  margin: 0;
}
.form-note {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.4;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: white;
  padding: 13px 18px;
  border-radius: 9px;
  z-index: 20;
  transition: 0.25s;
}
.show {
  transform: translateX(-50%) translateY(0) !important;
}
@media (max-width: 760px) {
  header {
    height: 70px;
  }
  .brand-logo {
    height: 34px;
    width: 34px;
  }
  .hero-overlay {
    background: linear-gradient(180deg, #fafbf8f2 0%, #fafbf8e6 55%, #fafbf8b3 100%);
  }
  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
  }
  nav.open {
    display: flex;
  }
  .menu {
    display: block;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 70px;
    min-height: auto;
  }
  .hero-card {
    margin: 10px 9px 0;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
  }
  .booking {
    grid-template-columns: 1fr;
  }
  .booking aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .slots {
    grid-template-columns: repeat(3, 1fr);
  }
  .game-grid {
    grid-template-columns: 1fr;
  }
  .tournament {
    grid-template-columns: auto 1fr;
  }
  .tour-actions {
    grid-column: 1/-1;
    overflow: auto;
  }
  .profile {
    grid-template-columns: 1fr;
  }
  .profile-card {
    box-shadow: 8px 9px 0 #b9e8cc;
  }
  footer {
    grid-template-columns: 1fr;
  }
  footer > div:last-of-type {
    justify-content: start;
  }
  .date-nav {
    width: 100%;
    justify-content: space-between;
  }
  .section,
  .hero,
  .cta {
    padding-left: 22px;
    padding-right: 22px;
  }
  .actions {
    flex-direction: column;
    text-align: center;
  }
  .btn {
    width: 100%;
  }
}
.admin-link {
  background: #eaf5ee;
  padding: 8px 14px;
  border-radius: 99px;
  color: var(--ink) !important;
}
.logout {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 99px;
  padding: 11px 18px;
  font: 600 0.9rem inherit;
  cursor: pointer;
}
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.atab {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}
.atab.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.admin-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px;
  overflow: auto;
}
.admin-table {
  min-width: 560px;
}
.admin-table select {
  width: auto;
  margin: 0;
  padding: 7px;
  display: inline-block;
}
.admin-table button {
  border: 0;
  border-radius: 7px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 6px;
}
.btn-confirm {
  background: #8bd5ad;
  color: var(--ink);
}
.btn-cancel {
  background: #f3d3d3;
  color: #7a2323;
}
.btn-save {
  background: var(--ink);
  color: white;
}
.status-badge {
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.status-pending {
  background: #fff2c4;
  color: #7a5b00;
}
.status-confirmed {
  background: #dcf3e6;
  color: #2c7a4d;
}
.status-cancelled {
  background: #f3d3d3;
  color: #7a2323;
}
.admin-toolbar {
  padding: 16px;
  display: flex;
  justify-content: end;
}
@media (max-width: 760px) {
  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .atab {
    white-space: nowrap;
  }
}
.admin-denied {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
  gap: 14px;
}
.admin-denied h1 {
  font: 700 2rem Outfit;
}
.admin-denied p {
  color: var(--muted);
  max-width: 420px;
}

.week-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 300px;
}
.week-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.week-nav-head strong {
  font: 600 0.9rem inherit;
  text-transform: capitalize;
}
.week-nav-head button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.wday {
  display: grid;
  gap: 2px;
  justify-items: center;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 8px 0;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
}
.wday-letter {
  font:
    700 0.82rem Outfit,
    sans-serif;
  letter-spacing: 0.04em;
}
.wday-num {
  font-size: 0.7rem;
  color: var(--muted);
}
.wday:hover {
  border-color: var(--ink);
}
.wday.past {
  opacity: 0.55;
}
.wday.today {
  border-color: #75c99d;
  box-shadow: inset 0 0 0 1px #75c99d;
}
.wday.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.wday.active .wday-num {
  color: #9ddfbc;
}
@media (max-width: 760px) {
  .week-nav {
    width: 100%;
    min-width: 0;
  }
}

.court-toggle {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}
.court-btn {
  flex: 1;
  border: 1px solid #cbd8d5;
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 6px;
  font: 600 0.85rem inherit;
  cursor: pointer;
}
.court-btn:hover {
  border-color: var(--ink);
}
.court-btn.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

:root {
  --slot-available: #eaff49;
  --slot-open: #ffb149;
  --slot-pending: #ff5149e0;
  --slot-confirmed: #89ff49d1;
}
.admin-booking .legend {
  grid-template-columns: 1fr 1fr;
  display: grid;
  gap: 10px 18px;
}
.admin-booking .legend i.state-available {
  background: var(--slot-available);
}
.admin-booking .legend i.state-open {
  background: var(--slot-open);
}
.admin-booking .legend i.state-pending {
  background: var(--slot-pending);
}
.admin-booking .legend i.state-confirmed {
  background: var(--slot-confirmed);
}
.admin-booking .slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-booking .slot {
  cursor: pointer;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 10px;
  text-align: left;
}
.admin-booking .slot.state-available {
  background: var(--slot-available);
  color: var(--ink);
}
.admin-booking .slot.state-open {
  background: var(--slot-open);
  color: var(--ink);
}
.admin-booking .slot.state-pending {
  background: var(--slot-pending);
  color: #fff;
}
.admin-booking .slot.state-confirmed {
  background: var(--slot-confirmed);
  color: var(--ink);
}
.admin-booking .slot small {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0;
  opacity: 0.85;
}
@media (max-width: 760px) {
  .admin-booking .legend {
    grid-template-columns: 1fr;
  }
}

/* Vista calendario settimanale — solo desktop */
.cal-desktop-only {
  display: none;
}
@media (min-width: 761px) {
  .booking-mobile-only {
    display: none;
  }
  .cal-desktop-only {
    display: block;
  }
}

.cal-wrap {
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 14px 30px #1233;
  --slot-available: #ffffff;
}
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cal-nav strong {
  font: 600 0.95rem inherit;
  text-transform: capitalize;
}
.cal-nav button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.cal-toolbar .court-toggle {
  margin-top: 0;
  flex: 0 0 auto;
  width: 220px;
}
.cal-toolbar .legend {
  display: flex;
  gap: 16px;
  margin: 0;
}
.cal-toolbar .legend span {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.cal-toolbar .legend i.state-available {
  border: 1px solid #c7cdca;
}

.cal-grid {
  display: flex;
  flex-direction: column;
  min-width: 860px;
}
.cal-grid-header {
  display: flex;
}
.cal-grid-header .cal-gutter {
  flex: 0 0 64px;
}
.cal-daycol-head {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.cal-day-name {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.cal-day-num {
  font:
    700 1.05rem Outfit,
    sans-serif;
}
.cal-daycol-head.today {
  background: #e6f6ec;
  border-bottom: 2px solid #2c7a4d;
}
.cal-daycol-head.today .cal-day-name {
  color: #2c7a4d;
}
.cal-daycol-head.today .cal-day-num {
  color: #2c7a4d;
}

.cal-grid-body {
  display: flex;
  position: relative;
}
.cal-gutter-col {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
}
.cal-hour-tick {
  height: 30px;
  font-size: 0.64rem;
  color: var(--muted);
  text-align: right;
  padding-right: 8px;
  position: relative;
  top: -6px;
}
.cal-hour-tick.on-hour {
  font-weight: 700;
  color: var(--ink);
}
.cal-hour-tick.tail {
  opacity: 0.5;
}
.cal-hour-tick.end {
  height: 0;
}

.cal-day-col {
  flex: 1;
  position: relative;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.cal-add-cell {
  height: 30px;
  padding: 0;
  background: var(--slot-available);
  border: 0;
  border-bottom: 1px dashed #e8edea;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
}
.cal-add-cell.hour-line {
  border-bottom: 1px solid var(--line);
}
.cal-add-plus {
  opacity: 0;
  font:
    700 1rem Outfit,
    sans-serif;
  color: #2c7a4d;
  line-height: 1;
}
.cal-add-cell:hover {
  background: #e9f6ee;
}
.cal-add-cell:hover .cal-add-plus {
  opacity: 1;
}
.cal-cell-tail {
  height: 30px;
  background: repeating-linear-gradient(45deg, #f5f7f6, #f5f7f6 6px, #edefee 6px, #edefee 12px);
  border-bottom: 1px dashed #e8edea;
}
.cal-cell-tail.hour-line {
  border-bottom: 1px solid var(--line);
}
.cal-day-col.today .cal-add-cell {
  background: #f1faf4;
}
.cal-day-col.today .cal-add-cell:hover {
  background: #dcf1e5;
}

.cal-now {
  position: absolute;
  left: 64px;
  right: 0;
  height: 0;
  border-top: 2px solid #e0483c;
  z-index: 4;
  pointer-events: none;
}
.cal-now-label {
  position: absolute;
  right: 100%;
  top: -8px;
  padding-right: 8px;
  font-size: 0.64rem;
  font-weight: 700;
  color: #e0483c;
  background: white;
  white-space: nowrap;
}
.cal-now::after {
  content: '';
  position: absolute;
  left: -4px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0483c;
}

.cal-event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 2px 5px #12335522;
}
.cal-event-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  color: inherit;
  padding: 4px 24px 4px 8px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font: inherit;
}
.cal-event-type {
  font: 700 0.72rem inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event-time {
  font-size: 0.64rem;
  opacity: 0.85;
  white-space: nowrap;
}
.cal-event-del {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #ffffff59;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-event-del:hover {
  opacity: 1;
  background: #c0392b;
  color: #fff;
}
.cal-event.state-open {
  background: var(--slot-open);
  color: var(--ink);
}
.cal-event.state-pending {
  background: var(--slot-pending);
  color: #fff;
}
.cal-event.state-confirmed {
  background: var(--slot-confirmed);
  color: var(--ink);
}
.cal-event:hover {
  filter: brightness(0.95);
}

#bookingDetailModal .dialog {
  width: min(480px, 100%);
}
.court-wrap {
  margin: 18px 0 6px;
  display: flex;
  justify-content: center;
}
.court-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}
.court-frame {
  fill: #c7d2cd;
  stroke: #9fada6;
  stroke-width: 3;
}
.court-fill {
  fill: url(#courtGrad);
  stroke: #fff;
  stroke-width: 3;
}
.court-line {
  stroke: #fff;
  stroke-width: 3;
}
.court-net {
  fill: url(#netHatch);
  stroke: var(--ink);
  stroke-width: 2;
}
.court-avatar {
  stroke-width: 3;
}
.court-avatar.filled {
  fill: #5594a4;
  stroke: var(--ink);
}
.court-avatar.empty {
  fill: #ffffffb3;
  stroke: #c9d6d2;
  stroke-dasharray: 5 5;
}
.court-initials {
  fill: #fff;
  font:
    700 19px 'Outfit',
    sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
}
.court-plus {
  fill: #9fb0ac;
  font:
    700 22px 'Outfit',
    sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
}
.court-name {
  fill: var(--ink);
  font:
    700 13px 'DM Sans',
    sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

/* --- Sezione Campi del pannello admin (fase 2) --------------------------- */

.admin-table tr.riga-inattiva {
  opacity: 0.55;
}
.admin-table tr.riga-inattiva td:first-child {
  text-decoration: line-through;
}

.hours-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px 18px;
  margin: 18px 0 8px;
}
.hours-editor legend {
  font:
    700 0.82rem Outfit,
    sans-serif;
  letter-spacing: 0.04em;
  padding: 0 6px;
}
.hours-editor .form-note {
  margin: 0 0 12px;
}

.hours-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}
.hours-row + .hours-row {
  border-top: 1px dashed var(--line);
}
.hours-row .check {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.hours-row input[type='time'],
.hours-row input[type='text'] {
  width: 92px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
}
.hours-row input:disabled {
  background: #f1f4f1;
  color: #9aa8a4;
}

#copyMondayBtn {
  margin-top: 12px;
}

@media (max-width: 560px) {
  .hours-row {
    grid-template-columns: 1fr auto auto;
    row-gap: 4px;
  }
  .hours-row .check {
    grid-column: 1 / -1;
  }
}
