/* ============================================================
   Pilates Laurona — Client Portal
   Variante visiva "Boutique" (palette teal + cream brand,
   serif Fraunces + body Inter). Mobile-first, max 430px.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds */
  --c-bg:           #F1EFE7;   /* cream brand */
  --c-surface:      #FFFFFF;
  --c-surface-deep: #E8E5DA;
  /* Brand teal */
  --c-primary:      #237185;
  --c-primary-text: #F1EFE7;
  --c-accent:       #3F95AB;
  --c-gold:         #5FAEC2;   /* sky teal accent */
  /* Text */
  --c-text:         #1A4F5C;
  --c-text-muted:   #6B8B94;
  --c-text-subtle:  #A1B5BC;
  /* Semantic */
  --c-success:      #5A8B6E;
  --c-danger:       #B5483D;
  /* Borders */
  --c-border:        rgba(35, 113, 133, 0.10);
  --c-border-strong: rgba(35, 113, 133, 0.20);
  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, system-ui, sans-serif;
  /* Geometry */
  --radius-card:  22px;
  --radius-btn:   14px;
  --radius-pill:  100px;
  /* Shadow */
  --shadow-card: 0 1px 12px rgba(26, 79, 92, 0.05);
  /* Liquid Glass tokens (light): vetro chiaro per le card surface */
  --glass-bg:      rgba(255, 255, 255, 0.72);
  --glass-blur:    blur(18px) saturate(1.4);
  --glass-border:  1px solid rgba(255, 255, 255, 0.55);
  --glass-shadow-sm:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 2px 10px rgba(35, 113, 133, 0.06),
      0 1px 2px rgba(0, 0, 0, 0.03);
  --glass-shadow-md:
      inset 0 1px 0 rgba(255, 255, 255, 0.65),
      0 8px 24px -6px rgba(35, 113, 133, 0.18),
      0 2px 6px rgba(0, 0, 0, 0.05);
}

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

.app {
  max-width: 430px;
  margin: 0 auto;
  /* 100dvh = dynamic viewport height: tiene conto della safe-area iOS
     in PWA standalone (in vh tradizionale i numeri possono sballare). */
  min-height: 100dvh;
  min-height: 100vh; /* fallback browser vecchi */
  position: relative;
}

/* ============================================================
   Welcome splash — logo + tagline + decorative arcs
   ============================================================ */
.welcome-splash {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--c-bg);
  overflow: hidden;
  animation: splashFade 2.4s ease-in-out forwards;
}
.welcome-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 32px;
}
.welcome-arc {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--c-primary);
  pointer-events: none;
}
.welcome-arc-1 { top: -180px; right: -180px; width: 420px; height: 420px; opacity: 0.10; }
.welcome-arc-2 { top: -260px; right: -260px; width: 580px; height: 580px; opacity: 0.06; }
.welcome-arc-3 { bottom: -200px; left: -200px; width: 480px; height: 480px; opacity: 0.08; }

.welcome-logo {
  width: 90%; max-width: 420px; height: auto;
  margin-bottom: 32px;
  animation: splashLogoIn 0.8s ease-out;
}
.welcome-tagline {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--c-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  opacity: 0; animation: splashTextIn 0.6s 0.4s ease-out forwards;
}
.welcome-subtitle {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--c-primary);
  opacity: 0;
  line-height: 1.55;
  max-width: 280px;
  animation: splashSubIn 0.6s 0.7s ease-out forwards;
}
@keyframes splashLogoIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes splashTextIn { to { opacity: 1; } }
@keyframes splashSubIn  { to { opacity: 0.7; } }
@keyframes splashFade {
  0%, 75% { opacity: 1; }
  100%    { opacity: 0; visibility: hidden; }
}

/* ============================================================
   Loading & Error
   ============================================================ */
.loading-screen, .error-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; text-align: center; padding: 24px;
}
.boot-logo {
  width: 200px; height: auto;
  margin-bottom: 18px;
}
.loading-screen p, .error-screen p {
  color: var(--c-text-muted);
  font-size: 0.92rem;
}
.error-screen h2 {
  font-family: var(--font-display);
  color: var(--c-text);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

/* ============================================================
   Header (logo + saluto + avatar)
   ============================================================ */
.client-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px 6px;
}
.header-text {
  min-width: 0; flex: 1;
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.header-logo {
  display: block;
  height: 24px;
  width: auto;
  object-fit: contain;
  margin-left: 0;
  margin-bottom: 2px;
  opacity: 0.9;
}
.header-greeting-sub {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  letter-spacing: 0.01em;
  line-height: 1.35;
}
.header-greeting {
  font-family: var(--font-display);
  font-size: 2rem;            /* 32px (design) */
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.greet-sparkle {
  color: var(--c-accent);
  font-size: 1.1rem;
  vertical-align: 0.2em;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-bell {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.12s, box-shadow 0.18s;
}
.header-bell:active { transform: scale(0.94); }
.header-bell svg { width: 20px; height: 20px; }
.header-bell-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #d4843a;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--c-bg, #F1EFE7);
}
.header-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary-text);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(35, 113, 133, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* Avatar accanto al saluto in home */
.header-greet-row { display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 10px; }
.header-greet-text { min-width: 0; }
.header-avatar-home {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: var(--c-primary-text);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.05rem;
  overflow: hidden; cursor: pointer;
  box-shadow: 0 2px 9px rgba(35, 113, 133, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.header-avatar-home:active { transform: scale(0.96); }
.header-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   Main content
   ============================================================ */
.client-main {
  /* Bottom padding generoso per non far scrollare nessun contenuto
     dietro la barra fissa: nav-height (~58px) + safe-area-inset-bottom
     (home indicator ~34px su iPhone con notch) + breathing 30px */
  padding: 0 18px calc(120px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   Package card
   ============================================================ */
.package-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow-md);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-top: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.18s;
}
.package-card:active { transform: scale(0.99); }


.pkg-label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  font-weight: 500;
}
.pkg-sessions {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 6px;
}
.pkg-remaining {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.pkg-total {
  font-size: 1rem;
  color: var(--c-text-muted);
}
.pkg-bar {
  height: 4px;
  background: var(--c-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 14px;
}
.pkg-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  border-radius: var(--radius-pill);
  transition: width 0.4s;
}
.pkg-meta {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--c-text-subtle);
}

/* ============================================================
   Renewal CTA (sessioni in esaurimento)
   ============================================================ */
.renewal-cta {
  background: var(--c-surface);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin: 12px 0 20px;
  border: 1px solid var(--c-border-strong);
}
.renewal-cta h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.renewal-options {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px;
}
.iban-box {
  background: rgba(35, 113, 133, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}
.iban-label {
  font-size: 0.65rem;
  color: var(--c-primary);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.iban-text {
  font-size: 0.78rem;
  color: var(--c-text);
  margin-top: 6px;
  line-height: 1.5;
  font-family: var(--font-body);
}

/* ============================================================
   Tab eyebrow + big serif title (Book / History)
   ============================================================ */
.tab-eyebrow {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 14px 0 4px;
  padding: 0 4px;
}
.tab-title {
  font-family: var(--font-display);
  font-size: 1.9rem;        /* ~30px (design) */
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 6px;
  padding: 0 4px;
}

/* Section label (small caps) — usato dentro home / sezioni minori */
.section-title {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 24px 0 10px;
  padding: 0 4px;
}

/* ============================================================
   Lesson cards (next lessons in home)
   ============================================================ */
.lesson-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow-sm);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  transition: background 0.2s, box-shadow 0.18s;
}
.lesson-card-next {
  background: var(--c-primary);
  color: var(--c-primary-text);
}
.lesson-card-next .lesson-date,
.lesson-card-next .lesson-time { color: var(--c-primary-text); }
.lesson-date {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--c-text);
}
.lesson-time {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-top: 2px;
  opacity: 0.9;
}
.cancel-btn {
  background: transparent;
  border: 1px solid var(--c-border-strong);
  color: var(--c-danger);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.12s;
}
.cancel-btn:active { transform: scale(0.96); }
.lesson-card-next .cancel-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.lesson-routine-icon {
  display: inline-block;
  font-weight: 700;
  margin-right: 6px;
  color: var(--c-primary);
  font-size: 1em;
  vertical-align: baseline;
}

/* Avviso lezioni in sospeso (pacchetti esauriti, presenze flottanti) */
.pkg-suspended {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(196, 75, 63, 0.08);
  border-left: 3px solid #C44B3F;
  border-radius: 8px;
  color: #8b3027;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
}
.pkg-suspended.hidden { display: none; }

/* Tag "In debito" sotto il counter X/Y lezioni: pacchetto fittizio creato
   automaticamente quando la cliente prenota oltre il pkg pagato. */
.pkg-debito-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(196, 75, 63, 0.12);
  color: #C44B3F;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
}
.pkg-debito-badge.hidden { display: none; }

/* Banner "stai esaurendo le lezioni" — dismissibile con la X */
.pkg-low-banner {
  margin-top: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(196, 75, 63, 0.08);
  border-left: 3px solid #C44B3F;
  border-radius: 8px;
}
.pkg-low-banner.hidden { display: none; }
.pkg-low-banner-icon { flex-shrink: 0; color: #C44B3F; display: flex; }
.pkg-low-banner-icon svg { width: 20px; height: 20px; }
.pkg-low-banner-text {
  flex: 1;
  color: #8b3027;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
}
.pkg-low-banner-x {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #8b3027;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0.6;
}
.pkg-low-banner-x:hover { opacity: 1; }

/* Stati severita': giallo (1 lez), arancione (0 lez), rosso (in debito) */
.pkg-low-banner.pkg-low-severity-low {
  background: rgba(212, 132, 58, 0.10);
  border-left-color: #c47e25;
}
.pkg-low-banner.pkg-low-severity-low .pkg-low-banner-icon,
.pkg-low-banner.pkg-low-severity-low .pkg-low-banner-text { color: #8a4f17; }

.pkg-low-banner.pkg-low-severity-empty {
  background: rgba(212, 100, 40, 0.12);
  border-left-color: #b14d1a;
}
.pkg-low-banner.pkg-low-severity-empty .pkg-low-banner-icon,
.pkg-low-banner.pkg-low-severity-empty .pkg-low-banner-text { color: #7f3411; }

.pkg-low-banner.pkg-low-severity-debito {
  background: rgba(196, 75, 63, 0.14);
  border-left-color: #C44B3F;
}
.pkg-low-banner.pkg-low-severity-debito .pkg-low-banner-icon,
.pkg-low-banner.pkg-low-severity-debito .pkg-low-banner-text { color: #8b3027; }

.lesson-card-next .lesson-routine-icon { color: rgba(255,255,255,0.85); }
.lesson-card-routine:not(.lesson-card-next) {
  border-left: 3px solid var(--c-primary);
  padding-left: 13px;
}

/* ============================================================
   Highlights stimolanti — bozza
   3 card con icona/value/label, scroll orizzontale su mobile
   ============================================================ */
.home-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}
.home-highlights.hidden { display: none; }
@media (max-width: 480px) {
  .home-highlights {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .home-highlights::-webkit-scrollbar { display: none; }
  .highlight-card {
    flex: 0 0 64%;
    scroll-snap-align: start;
  }
}
.highlight-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow-sm);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.highlight-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}
.highlight-body { display: flex; flex-direction: column; min-width: 0; }
.highlight-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.highlight-label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 2px;
  line-height: 1.25;
}
.highlight-sub {
  font-size: 0.7rem;
  color: var(--c-primary);
  margin-top: 4px;
  font-weight: 500;
}

/* ============================================================
   Frase del giorno
   ============================================================ */
.quote-card {
  position: relative;
  padding: 18px 20px 18px 44px;
  margin: 4px 0 14px;
  background: linear-gradient(135deg, rgba(35,113,133,0.08), rgba(35,113,133,0.02));
  border-left: 3px solid var(--c-primary);
  border-radius: 14px;
}
.quote-mark {
  position: absolute;
  top: 6px; left: 14px;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--c-primary);
  opacity: 0.45;
}
.quote-text {
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--c-text);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ============================================================
   Banner compleanno
   ============================================================ */
#home-birthday.hidden { display: none; }
.birthday-banner {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  margin: 6px 0 14px;
  background: linear-gradient(120deg, #FFE3D5 0%, #F4E9CF 50%, #E8DCC1 100%);
  border-radius: 16px;
  border: 1px solid rgba(199, 168, 124, 0.4);
  overflow: hidden;
}
.birthday-icon { font-size: 1.7rem; line-height: 1; }
.birthday-body { flex: 1; min-width: 0; }
.birthday-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #8B5E2E;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.birthday-sub {
  font-size: 0.82rem;
  color: #6B5739;
  margin-top: 4px;
}
.birthday-confetti {
  font-size: 1.3rem;
  opacity: 0.85;
  animation: bday-bounce 1.6s ease-in-out infinite;
}
@keyframes bday-bounce {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-3px) rotate(8deg); }
}
.cancelled-label {
  font-size: 0.75rem;
  color: var(--c-text-subtle);
  font-style: italic;
}

/* ============================================================
   Announcements
   ============================================================ */
.announcement-card {
  background: rgba(35, 113, 133, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-left: 3px solid var(--c-accent);
}
.announcement-text {
  font-size: 0.88rem;
  color: var(--c-text);
  line-height: 1.45;
}
.announcement-date {
  font-size: 0.7rem;
  color: var(--c-text-subtle);
  margin-top: 4px;
}

/* ============================================================
   Storico — KPI cards (completate / streak / ore) + lista mensile
   ============================================================ */
.history-stats {
  display: flex; gap: 10px;
  margin: 16px 0 20px;
}
.history-stats.is-hidden { display: none; }
.history-kpi {
  flex: 1;
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.history-kpi-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--c-text);
  letter-spacing: -0.03em;
  line-height: 1;
  font-weight: 500;
}
.history-kpi-unit {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-left: 3px;
  letter-spacing: 0.04em;
}
.history-kpi-label {
  font-size: 0.62rem;
  color: var(--c-text-muted);
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Header mese maiuscolo */
.history-month {
  font-size: 0.66rem;
  color: var(--c-text-muted);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 18px 4px 8px;
}
.history-month:first-of-type { margin-top: 6px; }

/* Card lezione: checkmark + data + meta */
.history-card {
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.history-check {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.history-check svg { width: 18px; height: 18px; color: var(--c-text-muted); }
.history-card.is-present .history-check { background: rgba(90, 139, 110, 0.14); }
.history-card.is-present .history-check svg { color: var(--c-success, #5A8B6E); }
.history-card.is-absent .history-check { background: rgba(181, 72, 61, 0.14); }
.history-card.is-absent .history-check svg { color: var(--c-error, #B5483D); }
.history-card-info { flex: 1; min-width: 0; }
.history-card-date {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.history-card-meta {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* ============================================================
   Notifiche tab (vista full-screen, accesso via campanella header)
   ============================================================ */
.notif-tab-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--c-text);
  margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.12s;
}
.notif-tab-back:active { transform: scale(0.94); }
.notif-tab-back svg { width: 18px; height: 18px; }

.notif-tab-head { position: relative; margin-bottom: 18px; }
.notif-mark-all {
  position: absolute;
  right: 0;
  top: 8px;
  background: none;
  border: none;
  color: var(--c-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 4px 6px;
}
.notif-mark-all:active { opacity: 0.6; }

.notif-tab-card {
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  position: relative;
  transition: transform 0.12s, box-shadow 0.18s;
}
.notif-tab-card:active { transform: scale(0.99); }
.notif-tab-card:hover { box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08); }
.notif-tab-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--c-text-muted);
}
.notif-tab-icon svg { width: 18px; height: 18px; }
.notif-tab-body { flex: 1; min-width: 0; }
.notif-tab-row1 {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 2px;
}
.notif-tab-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-tab-time {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  flex-shrink: 0;
}
.notif-tab-text {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-tab-dot {
  position: absolute;
  top: 14px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3478f6;
}

/* ============================================================
   Profile
   ============================================================ */
.profile-header {
  text-align: center;
  padding: 24px 0 8px;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary-text);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  margin: 0 auto 16px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(35, 113, 133, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.profile-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--c-text);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.profile-meta {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-top: 4px;
}

/* Avatar foto profilo + bottone fotocamera */
.profile-avatar-wrap {
  position: relative;
  width: 96px; height: 96px;
  margin: 0 auto 16px;
}
.profile-avatar-wrap .profile-avatar {
  margin: 0; width: 96px; height: 96px; overflow: hidden;
}
.profile-avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}
.profile-avatar-edit {
  position: absolute; right: 0; bottom: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-primary); color: var(--c-primary-text);
  border: 2px solid var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  box-shadow: 0 2px 7px rgba(35,113,133,0.3);
}
.profile-avatar-edit svg { width: 16px; height: 16px; }
.profile-avatar-edit:disabled { opacity: 0.5; cursor: default; }
.profile-avatar-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: avspin 0.8s linear infinite;
}
@keyframes avspin { to { transform: rotate(360deg); } }

/* Card "Data di nascita" nel profilo */
.profile-data-card {
  margin-top: 18px; padding: 18px 20px;
  background: linear-gradient(135deg, rgba(35,113,133,0.07), rgba(95,174,194,0.04));
  border-radius: var(--radius-card);
  border: 1px solid rgba(35,113,133,0.14);
}
.profile-data-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.profile-data-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(35,113,133,0.1); color: var(--c-primary);
}
.profile-data-ico svg { width: 17px; height: 17px; }
.profile-data-label {
  font-family: var(--font-display); font-size: 1.02rem; color: var(--c-text);
  letter-spacing: -0.01em;
}
.profile-data-row { display: flex; gap: 10px; align-items: center; }
.profile-data-input {
  flex: 1; min-width: 0; padding: 11px 13px;
  border: 1.5px solid rgba(35,113,133,0.18); border-radius: 12px;
  font-size: 0.98rem; color: var(--c-text); background: var(--c-surface);
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
.profile-data-input:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(35,113,133,0.12);
}
.profile-data-save {
  padding: 11px 20px; border: none; border-radius: 12px;
  background: var(--c-primary); color: var(--c-primary-text);
  font-weight: 600; font-size: 0.92rem; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(35,113,133,0.25);
}
.profile-data-save:disabled { opacity: 0.6; }
.profile-data-save:active { transform: translateY(1px); }

.profile-logout-btn {
  width: 100%; padding: 14px; margin-top: 22px;
  background: transparent; color: #B5483D;
  border: 1.5px solid #B5483D; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
}

/* Profile info card */
.info-card {
  background: var(--c-surface);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 14px;
}
.info-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--c-surface-deep);
  display: flex; align-items: center; justify-content: center;
}
.info-label {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.info-value {
  font-size: 0.92rem;
  color: var(--c-text);
  margin-top: 3px;
  line-height: 1.4;
}

.profile-renewal-card {
  background: var(--c-primary);
  color: var(--c-primary-text);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-top: 16px;
}
.renewal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.profile-renewal-card .iban-box { background: rgba(255, 255, 255, 0.10); }
.profile-renewal-card .iban-label { color: rgba(255, 255, 255, 0.7); }
.profile-renewal-card .iban-text { color: rgba(255, 255, 255, 0.95); }
.renewal-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 12px;
  line-height: 1.45;
}

.empty-text {
  text-align: center;
  padding: 28px 16px;
  color: var(--c-text-muted);
  font-size: 0.92rem;
  font-family: var(--font-body);
}

/* ============================================================
   Bottom navigation — Revolut-style floating pill con liquid glass.
   Floata 14px dal fondo, con margini laterali. Pill bianco frosted.
   Active item: blob teal soft dietro icon+label. Icone bold rounded.
   ============================================================ */
.client-nav {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 14px; right: 14px;
  max-width: 410px; margin: 0 auto;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 6px 6px;
  z-index: 50;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 12px 36px -8px rgba(35, 113, 133, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.05);
  /* GPU layer per evitare jank di scroll su iOS Safari */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.client-nav-item {
  position: relative;
  flex: 1;
  background: none;
  border: none;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 6px;
  border-radius: 999px;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color 0.18s;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
/* Blob "highlight" dietro icon+label dell'item attivo: pill morbido teal.
   Animato da inactive (scale 0.6 + opacity 0) a active (full). */
.client-nav-blob {
  position: absolute;
  inset: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    rgba(35, 113, 133, 0.14) 0%,
    rgba(35, 113, 133, 0.08) 100%);
  border: 1px solid rgba(35, 113, 133, 0.16);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 0;
}
.client-nav-item.active .client-nav-blob {
  opacity: 1;
  transform: scale(1);
}
.client-nav-icon {
  width: 22px; height: 22px;
  position: relative; z-index: 1;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.client-nav-item.active { color: var(--c-primary); }
.client-nav-item.active .client-nav-icon { transform: scale(1.04); }
.client-nav-label {
  position: relative; z-index: 1;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: font-weight 0.15s;
}
.client-nav-item.active .client-nav-label { font-weight: 600; }
.client-nav-item:active .client-nav-icon { transform: scale(0.92); }

/* ============================================================
   Book tab — day picker LUN-SAB + slot cards
   ============================================================ */
.book-blocked {
  background: var(--c-surface);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  text-align: center;
  margin: 16px 0;
  box-shadow: var(--shadow-card);
}
.book-blocked-icon { font-size: 2rem; margin-bottom: 10px; }
.book-blocked h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.book-blocked p {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* Day picker: riga di celle quadrate LUN..SAB con label sopra e numero giorno sotto */
.book-day-picker {
  display: flex;
  gap: 8px;
  margin: 8px 0 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px;
}
.book-day-picker::-webkit-scrollbar { display: none; }
.book-day-cell {
  flex: 1 0 auto;
  min-width: 48px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--c-text);
  transition: background 0.16s, color 0.16s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.book-day-cell-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--c-text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.book-day-cell-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}
.book-day-cell.is-empty .book-day-cell-num { opacity: 0.4; }
.book-day-cell:active { transform: scale(0.96); }
.book-day-cell.is-active {
  background: linear-gradient(180deg, #2c6d7e 0%, #1d5063 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px -4px rgba(28, 80, 99, 0.42);
}
.book-day-cell.is-active .book-day-cell-label { color: rgba(255, 255, 255, 0.78); }

/* Cards slot del giorno selezionato: range orario + bottone Prenota */
.book-slot-card {
  background: var(--c-surface);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: opacity 0.16s;
}
.book-slot-card.is-full { opacity: 0.6; }
/* Colonna sinistra: orario sopra, insegnante sotto. Il bottone Prenota
   resta a destra grazie allo space-between della card. */
.book-slot-card-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.book-slot-card-time {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.book-slot-card-instr {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--c-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.book-slot-waitlist {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  font-style: italic;
}

/* Pill button (riusato in push CTA "Attiva", ecc.) */
.book-btn {
  background: linear-gradient(180deg, #2A8398 0%, var(--c-primary) 60%, #1F6577 100%);
  color: var(--c-primary-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s, box-shadow 0.18s;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 4px 14px -2px rgba(35, 113, 133, 0.35);
}
.book-btn:active { transform: scale(0.97); }
.book-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ============================================================
   Notification modal
   ============================================================ */
.notif-overlay {
  position: fixed; inset: 0;
  /* Sfondo "lockscreen": gradient teal scuro per dare profondita' al
     liquid glass delle card. Blur denso del contenuto sottostante. */
  background:
    radial-gradient(ellipse at 30% 20%, rgba(47, 119, 138, 0.55), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(26, 79, 92, 0.55), transparent 60%),
    rgba(15, 40, 48, 0.55);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: notifFadeIn 0.2s ease-out;
}
@keyframes notifFadeIn { from { opacity: 0; } to { opacity: 1; } }

.notif-sheet {
  /* Trasparente: le card sono il vero contenuto, il "sheet" e' solo un
     contenitore di layout. Stile lockscreen iOS. */
  background: transparent;
  border-radius: 0;
  padding: 12px 8px 20px;
  max-width: 380px; width: 100%;
  max-height: 90vh;
  text-align: center;
  animation: notifSheetIn 0.28s ease-out;
  display: flex;
  flex-direction: column;
  position: relative;
}
/* "X" in alto a destra, vetro chiaro per spiccare sul lockscreen scuro */
.notif-close-x {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  font-family: inherit;
  padding: 0;
}
.notif-close-x:hover { background: rgba(255, 255, 255, 0.28); }
.notif-close-x:active { transform: scale(0.92); }
@keyframes notifSheetIn {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Stack di card iOS Liquid Glass: scrolla nel viewport limitato */
.notif-stack {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding: 32px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  scrollbar-width: thin;
}
.notif-stack::-webkit-scrollbar { width: 4px; }
.notif-stack::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 2px; }

/* === iOS LIQUID GLASS NOTIFICATION CARD ============================= */
.notif-card {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(36px) saturate(1.8);
  -webkit-backdrop-filter: blur(36px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 14px 40px -8px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: left;
  animation: notifCardIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.notif-card:nth-child(1) { animation-delay: 0.02s; }
.notif-card:nth-child(2) { animation-delay: 0.07s; }
.notif-card:nth-child(3) { animation-delay: 0.12s; }
.notif-card:nth-child(n+4) { animation-delay: 0.16s; }
@keyframes notifCardIn {
  from { transform: translateY(-12px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

.notif-card-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.9);
}

/* Card cliccabile: tap -> apre la vista dettaglio a tutto schermo */
.notif-card-clickable { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.notif-card-clickable:active { transform: scale(0.985); }

/* Miniatura immagine allegata (notifiche broadcast) */
.notif-card-thumb {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 130px;
}
.notif-card-thumb img {
  width: 100%;
  height: 100%;
  max-height: 130px;
  object-fit: cover;
  display: block;
}

/* ── Vista dettaglio notifica a tutto schermo ── */
.notif-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--c-bg, #F1EFE7);
  display: flex;
  flex-direction: column;
}
.notif-detail-overlay.hidden { display: none; }
.notif-detail-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.notif-detail-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--c-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 16px 18px 8px;
  cursor: pointer;
}
.notif-detail-back svg { width: 20px; height: 20px; }
.notif-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px 40px;
  -webkit-overflow-scrolling: touch;
}
.notif-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.notif-detail-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  object-fit: cover;
}
.notif-detail-app {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
}
.notif-detail-time { font-size: 0.78rem; color: var(--c-text-muted); }
.notif-detail-title {
  font-family: var(--font-display, serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 12px;
  line-height: 1.2;
}
.notif-detail-text {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-text);
  white-space: pre-wrap;
}
.notif-detail-image {
  width: 100%;
  margin-top: 18px;
  border-radius: 14px;
  display: block;
}
.notif-card-text { flex: 1; min-width: 0; }
.notif-card-row1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.notif-card-app {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-card-time {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  flex-shrink: 0;
}
.notif-card-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.notif-card-body {
  font-size: 0.86rem;
  color: var(--c-text);
  line-height: 1.4;
}
.notif-card-cta { padding-bottom: 14px; }
.notif-card .claim-spot-btn {
  margin-top: 10px;
  display: block;
  width: 100%;
  background: var(--c-primary);
  color: var(--c-primary-text);
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}
.notif-ok-btn {
  /* Bottone vetro chiaro: contrasta col lockscreen scuro dell'overlay */
  background: rgba(255, 255, 255, 0.95);
  color: var(--c-primary);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, transform 0.1s;
  width: 100%;
  flex-shrink: 0;
  margin-top: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.notif-ok-btn:hover { background: #1d5e6f; }
.notif-ok-btn:active { transform: scale(0.97); }
.notif-ok-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Claim spot button (dentro al modale notifiche) */
.claim-spot-btn {
  display: block;
  margin: 12px auto 4px;
  background: var(--c-primary);
  color: var(--c-primary-text);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, transform 0.1s;
}
.claim-spot-btn:hover:not(:disabled) { background: #1d5e6f; }
.claim-spot-btn:active:not(:disabled) { transform: scale(0.97); }
.claim-spot-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.claim-spot-btn-disabled { background: #888; }

/* Step di conferma inline (Annulla / Sì, prenota) */
.claim-confirm {
  margin: 14px 0 4px;
  padding: 14px;
  background: rgba(35, 113, 133, 0.06);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-card);
  text-align: center;
}
.claim-confirm-text {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--c-text);
  margin-bottom: 12px;
}
.claim-confirm-fail {
  color: var(--c-danger);
  font-weight: 500;
  margin-bottom: 0;
}
.claim-confirm-actions {
  display: flex; gap: 8px; justify-content: center;
}
.claim-cancel-btn,
.claim-confirm-btn {
  flex: 1; max-width: 150px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}
.claim-cancel-btn {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border-strong);
}
.claim-cancel-btn:active:not(:disabled) { transform: scale(0.96); }
.claim-confirm-btn {
  background: var(--c-primary);
  color: var(--c-primary-text);
  border: 1px solid var(--c-primary);
}
.claim-confirm-btn:hover:not(:disabled) { background: #1d5e6f; }
.claim-confirm-btn:active:not(:disabled) { transform: scale(0.96); }
.claim-cancel-btn:disabled,
.claim-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   Toast (showToast da utils.js)
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-body);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 300;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(26, 79, 92, 0.25);
}
.toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-info    { background: rgba(26, 79, 92, 0.95); }
.toast-success { background: rgba(90, 139, 110, 0.95); }
.toast-error   { background: rgba(181, 72, 61, 0.95); }

/* Push notifications card sul profilo + home */
.push-cta { gap: 12px; margin-top: 12px; }
.push-cta .info-icon { font-size: 22px; }
.push-on { background: rgba(35, 113, 133, 0.05); }
.push-off { background: rgba(212, 132, 58, 0.08); border: 1px solid rgba(212, 132, 58, 0.25); }
.push-on .book-btn,
.push-off .book-btn { padding: 8px 16px; font-size: 0.85rem; flex-shrink: 0; }

/* Sulla HOME (in cima): card piu' prominente, margin-top zero */
#home-push .push-cta { margin-top: 0; margin-bottom: 14px; }

/* Errore visibile sotto la card di iscrizione push */
.push-debug {
  margin: 8px 14px 0;
  padding: 8px 12px;
  background: rgba(181, 72, 61, 0.08);
  border: 1px solid rgba(181, 72, 61, 0.25);
  border-radius: 8px;
  color: #B5483D;
  font-size: 0.8rem;
  word-break: break-word;
}

/* Magic link input nella schermata di accesso */
.magic-link-input {
  width: 100%;
  max-width: 320px;
  padding: 12px 14px;
  margin: 18px 0 10px;
  border: 1px solid var(--c-border-strong);
  border-radius: 12px;
  background: var(--c-surface);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--c-text);
  outline: none;
  text-align: center;
}
.magic-link-input:focus { border-color: var(--c-primary); }
.magic-link-go {
  background: var(--c-primary);
  color: var(--c-primary-text);
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 14px;
}
.magic-link-go:active { transform: scale(0.97); }
.magic-link-hint {
  font-size: 0.78rem;
  color: var(--c-text-subtle);
  max-width: 280px;
  line-height: 1.4;
  margin-top: 8px !important;
}

/* Errore visibile sotto al titolo nel form magic link */
.invalid-error {
  margin: 8px 0 4px;
  padding: 8px 12px;
  background: rgba(181, 72, 61, 0.08);
  border: 1px solid rgba(181, 72, 61, 0.25);
  border-radius: 8px;
  color: #B5483D;
  font-size: 0.82rem;
  word-break: break-all;
  max-width: 320px;
}

/* ============================================================
   Restyle Home cliente (2026-06-05): logo grande + hero prossima lezione
   ============================================================ */
/* Logo CENTRALE e grande; campanella ancorata in alto a destra */
.client-header { display: block; position: relative; align-items: initial; justify-content: initial; }
.header-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.header-logo-lg { display: block; height: 80px; width: auto; max-width: 78%; object-fit: contain; margin: 2px auto 0; }
.header-greeting {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.12; color: var(--c-text); margin-top: 2px;
  text-align: center;
}
.header-bell {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--c-surface); border: 1px solid var(--c-border);
  color: var(--c-text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; position: absolute; top: 16px; right: 22px;
}
.header-bell svg { width: 20px; height: 20px; }

/* Prossima lezione — hero teal */
.next-hero {
  margin: 14px 0 0; padding: 18px 20px;
  background: var(--c-primary); color: var(--c-primary-text);
  border-radius: var(--radius-card); position: relative; overflow: hidden;
}
.next-hero-glow {
  position: absolute; top: -40px; right: -40px; width: 150px; height: 150px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(95,174,194,0.45) 0%, transparent 70%);
}
.next-hero-eyebrow {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.8; position: relative;
}
.next-hero-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 8px; position: relative; gap: 12px;
}
.next-hero-date {
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.05;
}
.next-hero-time { font-size: 0.86rem; opacity: 0.88; margin-top: 4px; }
.next-hero-countdown {
  background: rgba(255,255,255,0.16); border-radius: 100px; flex-shrink: 0;
  padding: 6px 13px; font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.next-hero-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; }
.next-hero-actions button {
  flex: 1; border: none; border-radius: var(--radius-btn); padding: 11px;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; cursor: pointer;
}
.next-hero-ghost { background: rgba(255,255,255,0.16); color: #fff; }
.next-hero-solid { background: #fff; color: var(--c-primary); }

/* ===== Push notifiche: banner elegante (Home/Profilo) ===== */
.push-banner {
  display: flex; align-items: center; gap: 13px;
  margin: 14px 0 0; padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  border: var(--glass-border); box-shadow: var(--shadow-card);
}
.push-banner-off {
  background: linear-gradient(135deg, rgba(35,113,133,0.10), rgba(95,174,194,0.05));
  border: 1px solid rgba(35,113,133,0.18);
}
.push-banner-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary); color: var(--c-primary-text);
}
.push-banner-icon svg { width: 20px; height: 20px; }
.push-banner-text { flex: 1; min-width: 0; }
.push-banner-title {
  font-family: var(--font-display); font-size: 1.02rem; color: var(--c-text);
  letter-spacing: -0.01em; line-height: 1.2;
}
.push-banner-sub { font-size: 0.8rem; color: var(--c-text-muted); margin-top: 2px; line-height: 1.3; }
.push-banner-btn {
  flex-shrink: 0; border: none; cursor: pointer;
  background: var(--c-primary); color: var(--c-primary-text);
  border-radius: 100px; padding: 9px 18px;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
}
.push-banner-btn-ghost { background: transparent; color: var(--c-text-muted); border: 1px solid var(--c-border); }
.push-banner-info .push-banner-icon { background: rgba(0,0,0,0.06); color: var(--c-text-muted); }
.push-banner-on .push-banner-icon { background: rgba(90,139,110,0.16); color: #2f5d44; }

/* ===== Profilo: card "Pacchetto attuale" elegante (no emoji) ===== */
/* Card "Pacchetto attuale" nel profilo — barra di progresso, niente icona scatola */
.profile-pkg2 {
  padding: 18px 20px; border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(35,113,133,0.07), rgba(95,174,194,0.04));
  border: 1px solid rgba(35,113,133,0.14);
}
.profile-pkg2-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.profile-pkg2-name {
  font-family: var(--font-display); font-size: 1.05rem; color: var(--c-text);
  letter-spacing: -0.01em; line-height: 1.2;
}
.profile-pkg2-debt {
  display: inline-block; margin-left: 6px; font-family: var(--font-body);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--c-danger); background: rgba(181,72,61,0.1);
  padding: 2px 7px; border-radius: 6px; vertical-align: middle;
}
.profile-pkg2-count {
  font-size: 0.95rem; color: var(--c-text-muted); white-space: nowrap;
}
.profile-pkg2-count b { font-family: var(--font-display); font-size: 1.25rem; }
.profile-pkg2-bar {
  height: 8px; border-radius: 999px; margin: 12px 0 9px;
  background: rgba(35,113,133,0.12); overflow: hidden;
}
.profile-pkg2-fill {
  height: 100%; border-radius: 999px; transition: width 0.4s ease;
}
.profile-pkg2-meta {
  font-size: 0.8rem; color: var(--c-text-muted);
}
.profile-pkg2-empty .profile-pkg2-meta { margin-top: 6px; }

/* sql/109 — posti liberi per slot + blocco prenotazioni */
.book-slot-card-spots {
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-text-muted);
}
.book-slot-card-spots.is-last { color: #C44B3F; }
.booking-blocked-banner { margin: 0 0 12px; }
