/* ==========================================================================
   VolleyUp - Design System & Modern Responsive Stylesheet
   Sport Theme: Midnight Navy, Cyber Sky Blue, Court Amber & Energetic Emerald
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Palette Colori dd */
  --bg-main: #0b1120;
  --bg-surface: #131d33;
  --bg-surface-elevated: #1e2942;
  --bg-glass: rgba(19, 29, 51, 0.78);
  --bg-glass-card: rgba(30, 41, 66, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-glow: rgba(56, 189, 248, 0.25);

  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.35);

  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --info: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --header-height: 64px;
  --bottom-nav-height: 68px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(550px circle at 90% 0%, rgba(2, 132, 199, 0.16) 0%, transparent 70%),
    radial-gradient(500px circle at 10% 100%, rgba(245, 158, 11, 0.10) 0%, transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
}

/* Top App Bar */
.top-bar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 60%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  position: relative;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-icon.btn-sm {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background-color: var(--accent-gold);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  will-change: transform;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.8;
  }
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color 0.2s;
}

.user-pill:hover {
  border-color: var(--primary-light);
}

.user-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--primary-dark);
}

.user-pill-name {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drawer Navigation & Hamburger */
.btn-hamburger {
  font-size: 1.25rem;
}

/* Drawer Backdrop Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Nav Drawer Slide-in Panel */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #090f1e;
  border-right: 1px solid var(--border-glass);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.02);
}

/* Navigation list in Drawer */
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px 6px 12px;
  flex: 1;
}

/* User Card in Drawer (above footer line and Esci) */
.drawer-user-card {
  margin: 10px 16px 14px 16px;
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-user-card:hover,
.drawer-user-card.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-glow);
  box-shadow: 0 0 12px var(--primary-glow);
}

.drawer-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.drawer-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-user-role {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: capitalize;
}

.drawer-user-team {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.drawer-item:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.drawer-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.28) 0%, rgba(2, 132, 199, 0.08) 100%);
  border-color: var(--border-glass-glow);
  box-shadow: inset 3px 0 0 var(--primary-light);
}

.drawer-icon {
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.drawer-text {
  flex: 1;
}

.drawer-footer {
  padding: 20px 16px calc(36px + env(safe-area-inset-bottom, 0px)) 16px;
  border-top: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.01);
  margin-top: auto;
}

.drawer-footer .btn {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  transition: all 0.2s;
}

.drawer-footer .btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

/* Main Container & Sections */
.main-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}


@media (min-width: 768px) {
  .main-content {
    padding: 24px;
  }
}

/* View Sections */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* Hero / Header Card */
.hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 66, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-team-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid var(--primary-light);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Alert Banner (Oggi c'è un evento!) */
.alert-today-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px var(--accent-gold-glow);
  animation: pulse-border 3s infinite;
}

@keyframes pulse-border {

  0%,
  100% {
    border-color: rgba(245, 158, 11, 0.45);
  }

  50% {
    border-color: rgba(245, 158, 11, 0.9);
  }
}

.alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-time-pill {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Cards & Containers */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-glass-glow);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-attending {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-not-attending {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-maybe {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-pending {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-training {
  background: rgba(56, 189, 248, 0.18);
  color: var(--primary-light);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-match {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Event List Card */
.event-card {
  position: relative;
  border-left: 4px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card.event-match {
  border-left-color: var(--accent-gold);
}

.event-card.event-today {
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.3);
  border-color: var(--primary-light);
  border-left-width: 6px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* RSVP Buttons group */
.rsvp-buttons-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.btn-rsvp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-rsvp:hover {
  transform: translateY(-2px);
  color: #fff;
}

.btn-rsvp.active-attending {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-rsvp.active-not-attending {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-rsvp.active-maybe {
  background: var(--warning);
  color: #000;
  border-color: var(--warning);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Buttons Standard */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d97706 100%);
  color: #000;
  box-shadow: 0 4px 14px var(--accent-gold-glow);
}

.btn-accent:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-gold-glow);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass-glow);
  color: var(--primary-light);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(2, 132, 199, 0.15);
  border-color: var(--primary-light);
}

.btn-ghost {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-surface);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Roster / Player Grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.player-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.player-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

.player-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.player-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.player-role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--primary-light);
  border: 1px solid var(--border-glass);
  text-transform: capitalize;
}

/* Messages & Notice Board */
.message-card {
  border-left: 4px solid var(--primary);
  margin-bottom: 12px;
}

.message-card.priority-urgent {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-glass-card) 100%);
}

.message-card.priority-high {
  border-left-color: var(--accent-gold);
}

.message-card.unread {
  border-color: var(--primary-light);
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.message-sender {
  font-weight: 700;
  color: var(--primary-light);
  font-size: 0.9rem;
}

.message-target-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
}

.message-body {
  color: var(--text-primary);
  font-size: 0.92rem;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-surface-elevated);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }

  .form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-glass);
}

/* Attendance table / check list */
.attendance-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attendance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.attendance-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Custom switch toggle */
.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  position: relative;
  width: 46px;
  height: 26px;
  background-color: #475569;
  border-radius: var(--radius-full);
  transition: 0.3s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch-input:checked+.switch-slider {
  background-color: var(--success);
}

.switch-input:checked+.switch-slider::before {
  transform: translateX(20px);
}

/* Toast Notifications in-app */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: 16px;
  left: 16px;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
  pointer-events: none;
}

@media (min-width: 600px) {
  #toast-container {
    left: auto;
    right: 20px;
    bottom: 20px;
  }
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass-glow);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideInUp 0.3s ease-out;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

.toast.toast-warning {
  border-left: 4px solid var(--warning);
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Calendar styling */
.calendar-card {
  padding: 14px 10px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .calendar-card {
    padding: 10px 4px;
  }
}

.calendar-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .calendar-grid {
    gap: 6px;
  }
}

.calendar-day-head {
  text-align: center;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 4px 0;
  text-transform: uppercase;
}

.calendar-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  min-height: 52px;
  min-width: 0;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
  box-sizing: border-box;
}

.calendar-cell:hover {
  border-color: var(--primary-light);
  background: var(--bg-surface-elevated);
}

.calendar-cell.other-month {
  opacity: 0.3;
}

.calendar-cell.is-today {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.08);
}

.calendar-cell.has-event {
  border-color: rgba(56, 189, 248, 0.35);
}

.calendar-cell.selected {
  border-color: var(--primary-light) !important;
  background: rgba(2, 132, 199, 0.25) !important;
  box-shadow: inset 0 0 0 1px var(--primary-light), 0 0 10px var(--primary-glow);
}

@media (min-width: 640px) {
  .calendar-cell {
    min-height: 74px;
    padding: 6px;
    align-items: stretch;
  }
}

.calendar-cell-date {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.calendar-cell.is-today .calendar-cell-date {
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
}

.calendar-cell.selected:not(.is-today) .calendar-cell-date {
  background: var(--primary);
  color: #fff;
}

/* Indicatore eventi a pallini per mobile / smartphone */
.calendar-cell-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  margin-bottom: 2px;
  width: 100%;
  max-width: 100%;
}

.calendar-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.calendar-event-dot.pill-match {
  background: var(--accent-gold);
  box-shadow: 0 0 4px var(--accent-gold-glow);
}

.calendar-event-dot.pill-training {
  background: var(--primary-light);
  box-shadow: 0 0 4px var(--primary-glow);
}

.calendar-event-dot.pill-more {
  background: #64748b;
}

/* Indicatore esteso pills con orario per desktop */
.calendar-cell-events {
  display: none;
}

@media (min-width: 640px) {
  .calendar-cell-dots {
    display: none;
  }

  .calendar-cell-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    width: 100%;
    margin-top: 2px;
  }

  .calendar-event-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    box-sizing: border-box;
  }

  .calendar-event-pill.pill-training {
    background: var(--primary);
    color: #fff;
  }

  .calendar-event-pill.pill-match {
    background: var(--accent-gold);
    color: #000;
  }
}