* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #fffdf9;
  color: #4e342e;
  line-height: 1.6;
  overflow-x: hidden;
}

/* HERO */

header {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 0;
  isolation: isolate;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(245,241,235,0.62), rgba(245,241,235,0.62)),
    url("images/pilates-bg.jpeg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1);
  animation: heroZoom 28s ease-in-out infinite alternate;
}

.logo img {
  width: 340px;
  margin-bottom: 25px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.12));
  animation: logoFloat 4s ease-in-out infinite;
}

.logo,
header > p,
.contacts,
.scroll-down {
  opacity: 0;
  animation: heroFadeIn 0.9s ease forwards;
}

.logo {
  animation-delay: 0.15s;
}

header > p {
  animation-delay: 0.35s;
  margin-top: 18px;
  padding: 12px 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.38);
  backdrop-filter: blur(8px);
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 1.2px;
  color: #5d4037;
  text-shadow:
    0 4px 18px rgba(255,255,255,0.75),
    0 1px 2px rgba(0,0,0,0.08);
}

.contacts {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  animation-delay: 0.55s;
}

.contacts p {
  background: rgba(255,255,255,0.45);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.contacts a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: inline-block;
}

.contacts a:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

.scroll-down {
  margin-top: 32px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #4e342e;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  font-size: 1.4rem;
  animation:
    heroFadeIn 0.9s ease forwards,
    scrollPulse 2.4s ease-in-out infinite;
  animation-delay: 0.8s;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* TOPBAR */

.topbar {
  position: fixed;
  top: 20px;
  right: 25px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 15px;
}

#openAuthModal,
#userArea button {
  width: auto;
  margin-bottom: 0;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  color: #4e342e;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

#openAuthModal:hover,
#userArea button:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.5);
}

#userArea {
  display: none;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

#welcomeUser {
  white-space: nowrap;
  color: #4e342e;
  font-weight: 500;
  line-height: 1;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  width: auto;
  max-width: none;
}

/* SEZIONI PUBBLICHE */

.section-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  color: #9b7b6d;
  margin-bottom: 8px;
}

.about-section {
  width: 90%;
  max-width: 900px;
  margin: 80px auto 30px;
  padding: 55px 40px;
  text-align: center;
  background: linear-gradient(180deg, #fffdf9, #f8f1ea);
  border: 1px solid rgba(200,165,141,0.22);
  border-radius: 34px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.06);
}

.about-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: #4e342e;
  margin-bottom: 18px;
}

.about-section > p:last-child {
  max-width: 680px;
  margin: auto;
  color: #7b5e57;
  font-size: 1.05rem;
  line-height: 1.8;
}

.schedule-intro {
  text-align: center;
  padding: 70px 20px 10px;
}

.schedule-intro h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: #4e342e;
  margin-bottom: 12px;
}

.schedule-intro p {
  max-width: 620px;
  margin: auto;
  color: #7b5e57;
  font-size: 1rem;
}

/* BOTTONI */

button {
  width: 100%;
  border: none;
  border-radius: 40px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #d7bfae, #c8a58d);
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

button:hover {
  transform: translateY(-2px);
  opacity: 0.92;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* NAV HOME / PRENOTA */

.app-nav {
  position: sticky;
  top: 16px;
  z-index: 200;
  display: flex;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 28px auto 30px;
  padding: 8px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.app-nav button {
  width: auto !important;
  min-width: 120px;
  margin: 0 !important;
  padding: 12px 26px;
  border-radius: 999px;
  background: transparent;
  color: #5d4037;
  box-shadow: none;
}

.app-nav button.active {
  background: linear-gradient(135deg, #d7bfae, #c8a58d);
  color: white;
}

/* CALENDARIO */

.mobile-day-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  padding: 45px 20px 10px;
  background: #fffdf9;
  position: sticky;
  top: 0;
  z-index: 50;
  margin-bottom: 18px;
}

.mobile-day-tabs button {
  position: relative;
  overflow: hidden;
  width: auto;
  min-width: 95px;
  margin: 0;
  padding: 13px 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  color: #4e342e;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 8px 22px rgba(0,0,0,0.05);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.mobile-day-tabs button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-day-tabs button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.mobile-day-tabs button:hover::before {
  opacity: 1;
}

.mobile-day-tabs button.active {
  background: linear-gradient(135deg, #d7bfae, #c8a58d);
  color: white;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.courses {
  width: 100%;
  max-width: 1400px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 30px 80px;
}

.day-column {
  display: none;
  width: 100%;
  max-width: 620px;
  background: #fdf8f3;
  border-radius: 28px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.day-column.mobile-active {
  display: block;
  animation: dropdownDay 0.45s ease forwards;
  transform-origin: top center;
  overflow: visible !important;
  max-height: none !important;
}

.day-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 25px;
  color: #4e342e;
}

.card {
  background: white;
  border: 1px solid rgba(200,165,141,0.12);
  border-radius: 22px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 18px 35px rgba(0,0,0,0.08);
}

.lesson-type {
  text-align: center;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #b08b73;
  margin-bottom: 10px;
  font-weight: 600;
}

.time {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 18px;
  text-align: center;
  color: #5d4037;
  letter-spacing: 0.5px;
}

.card button {
  display: block;
  width: 100%;
  margin: 18px auto 14px;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #d7bfae, #c8a58d);
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card button:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.spots,
.waiting-count {
  text-align: center;
  font-size: 0.95rem;
  color: #7b5e57;
}

.waiting-count {
  font-size: 0.85rem;
  color: #9b7b6d;
  margin-top: 6px;
}

@keyframes dropdownDay {
  from {
    opacity: 0;
    transform: translateY(-14px) scaleY(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* MODALE LOGIN */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 420px;
  background: #fffdf9;
  border-radius: 32px;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.12);
  animation: modalFade 0.25s ease;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1.8rem;
  color: #8d6e63;
  cursor: pointer;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #4e342e;
  font-size: 2.2rem;
  font-family: 'Cormorant Garamond', serif;
}

.modal-content input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid #e5d8cc;
  font-size: 1rem;
  background: white;
}

.modal-content input:focus {
  outline: none;
  border: 1px solid #c8a58d;
}

.modal-content button {
  width: 100%;
  margin-top: 10px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-tabs button {
  margin: 0;
  background: #efe3d8;
  color: #4e342e;
}

.auth-tabs button:hover {
  background: #dfc8b8;
}

#authMessage {
  margin-top: 18px;
  text-align: center;
  color: #6d4c41;
}

/* AREA PERSONALE */

.my-bookings-section {
  width: 92%;
  max-width: 1250px;
  margin: 40px auto 80px;
  padding: 35px;
  background: linear-gradient(180deg, #fffdf9, #f8f1ea);
  border: 1px solid rgba(200,165,141,0.22);
  border-radius: 28px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.my-bookings-section h2 {
  position: relative;
  padding-bottom: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #4e342e;
}

.my-bookings-section h2::after {
  content: "";
  display: block;
  width: 55px;
  height: 2px;
  background: #c8a58d;
  margin-top: 8px;
  border-radius: 10px;
}

.dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.dashboard-main,
.dashboard-news {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

.dashboard-main {
  min-width: 0;
}

.dashboard-news {
  position: sticky;
  top: 110px;
}

.dashboard-news h2 {
  margin-bottom: 18px;
}

.my-booking-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
  padding: 18px;
  border-radius: 18px;
  margin-bottom: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.my-booking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.07);
}

.my-booking-card strong {
  color: #5d4037;
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.premium-booking-card {
  gap: 14px;
}

.premium-booking-card small {
  display: block;
  color: #8d6e63;
  margin-top: 5px;
}

.premium-booking-card button {
  width: auto;
  min-width: 105px;
  margin: 0;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.past-booking-card {
  opacity: 0.65;
}

.past-booking-card::after {
  content: "Completata";
  font-size: 0.8rem;
  color: #8d6e63;
}

.weekly-booking-counter {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 18px;
  text-align: center;
  color: #5d4037;
  font-weight: 500;
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.booking-progress {
  width: 100%;
  max-width: 260px;
  height: 10px;
  margin: 12px auto 8px;
  background: rgba(200,165,141,0.18);
  border-radius: 999px;
  overflow: hidden;
}

.booking-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7bfae, #c8a58d);
  transition: width 0.45s ease;
}

.booking-badge {
  font-size: 0.85rem;
  padding: 6px 12px;
}

.booking-lesson-type,
.lesson-type-admin {
  color: #b08b73 !important;
  font-weight: 600;
}

.waiting-position {
  margin-top: 8px !important;
  color: #c48b5f;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.next-lesson-card {
  display: block;
  margin-bottom: 22px;
}

.dashboard-next-lesson {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 26px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(200,165,141,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

.next-lesson-label {
  color: #9b7b6d;
  font-weight: 600;
  margin-bottom: 8px;
}

.dashboard-next-lesson h3 {
  font-size: 1.55rem;
  color: #4e342e;
  margin-bottom: 12px;
}

.next-lesson-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #6d4c41;
  margin-bottom: 14px;
}

.dashboard-next-lesson button {
  width: auto;
  min-width: 190px;
  margin: 0;
  border-radius: 999px;
}

@media (max-width: 768px) {
  .dashboard-next-lesson {
    grid-template-columns: 1fr;
  }

  .dashboard-next-lesson button {
    width: 100%;
  }
}

/* ADMIN */

#adminPanel {
  display: none;
  margin: 40px auto 80px;
  width: 90%;
  max-width: 900px;
  padding: 35px;
  background: #fffdf9;
  border-radius: 28px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

#adminPanel h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  margin-bottom: 20px;
}

#adminPanel h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  color: #4e342e;
  margin: 30px 0 18px;
}

.admin-stats {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 25px 0 35px;
}

.admin-stats-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.admin-stats-bottom {
  display: grid;
  grid-template-columns: repeat(2, 260px);
  gap: 18px;
  justify-content: center;
  margin-top: 18px;
}

.admin-stat-card,
.pending-user,
.admin-detail-card {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.admin-stat-card {
  min-height: 135px;
  cursor: pointer;
  padding: 24px;
  text-align: center;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.admin-stat-card:hover,
.pending-user:hover,
.admin-detail-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.07);
}

.admin-stat-card span {
  display: block;
  font-size: 2.3rem;
  font-weight: 600;
  color: #5d4037;
  margin-bottom: 6px;
}

.admin-stat-card p {
  color: #8d6e63;
  font-size: 0.95rem;
}

.pending-user,
.admin-detail-card {
  padding: 15px 18px;
  margin-bottom: 12px;
}

.pending-user {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pending-user strong,
.admin-detail-card strong {
  color: #4e342e;
  font-size: 1.05rem;
}

.pending-user small,
.admin-detail-card small {
  display: block;
  color: #8d6e63;
  margin-top: 4px;
}

.pending-user button {
  width: auto;
  min-width: 110px;
  margin: 0;
  padding: 11px 18px;
  border-radius: 18px;
}

.admin-details {
  margin: 20px 0 35px;
}

.details-btn {
  width: auto;
  margin-top: 10px;
  margin-bottom: 0;
  border: none;
  background: #d7bfae;
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.hidden-admin-details {
  display: none;
  margin-top: 10px;
}

.hidden-admin-details.show {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-closures-box,
.admin-news-box {
  margin-top: 35px;
  padding: 24px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 24px;
  overflow: hidden;
}

.admin-closures-box input,
.admin-news-box input,
.admin-news-box textarea {
  width: 100%;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid #e5d8cc;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.admin-news-box textarea {
  min-height: 110px;
  resize: vertical;
}

.closure-admin-card,
.admin-news-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: white;
}

.closure-admin-card small,
.admin-news-card small {
  display: block;
  color: #8d6e63;
  margin-top: 4px;
}

.closure-admin-card button,
.admin-news-card button {
  width: auto;
  margin: 0;
  padding: 9px 14px;
  border-radius: 999px;
}

.news-pin-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7b5e57;
  margin-bottom: 14px;
}

.news-pin-label input {
  width: auto;
  margin: 0;
}

/* NEWS */

.news-section {
  margin-bottom: 35px;
}

.news-card {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.news-card.pinned {
  border: 2px solid #d7bfae;
}

.news-card h4 {
  color: #5d4037;
  margin-bottom: 8px;
}

.news-card p {
  color: #7b5e57;
}

.news-date {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #a1887f;
}

.important-news-banner {
  display: none;
  margin-bottom: 28px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7ed, #f3dfcf);
  border: 1px solid rgba(200,165,141,0.28);
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.important-news-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: white;
  color: #9b6b4f;
  font-size: 0.8rem;
  font-weight: 700;
}

.important-news-banner h3 {
  margin: 0 0 8px;
  color: #4e342e;
  font-size: 1.25rem;
}

.important-news-banner p {
  color: #6d4c41;
  line-height: 1.6;
}

/* FOOTER */

.site-footer {
  margin-top: 80px;
  padding: 65px 40px 32px;
  background: #f7f1eb;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  align-items: center;
  gap: 50px;
}

.footer-left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-logo {
  width: 180px;
  opacity: 0.95;
}

.footer-brand-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  line-height: 1;
  color: #4e342e;
  margin-bottom: 4px;
}

.footer-brand-text p {
  color: #7b5e57;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.footer-brand-text span {
  color: #a1887f;
  font-size: 0.85rem;
}

.footer-center {
  justify-self: center;
  text-align: center;
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 28px;
  padding: 28px 34px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.035);
}

.footer-text {
  color: #7b5e57;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.footer-whatsapp {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer-whatsapp a {
  min-width: 120px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.2);
  color: #5d4037;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  transition: all 0.25s ease;
}

.footer-whatsapp a:hover {
  transform: translateY(-2px);
  background: white;
}

.footer-right {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-right h4 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 2px;
  color: #a1887f;
  font-weight: 600;
}

.footer-location-title {
  margin-top: 14px;
}

.footer-contact,
.footer-instagram,
.footer-location {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5d4037;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer-contact:hover,
.footer-instagram:hover,
.footer-location:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

.footer-contact i,
.footer-instagram i {
  width: 18px;
  text-align: center;
}

.site-footer small {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 45px;
  color: #a1887f;
}

/* MOBILE */

@media (max-width: 900px) {
  .dashboard-top {
    grid-template-columns: 1fr;
  }

  .dashboard-news {
    order: -1;
    position: static;
  }
}

@media (max-width: 768px) {
  header {
    min-height: 520px;
    padding: 90px 0 70px;
  }

  header::before {
    background-image:
      linear-gradient(rgba(245,241,235,0.62), rgba(245,241,235,0.62)),
      url("images/pilates-bg-mobile.jpg");
    animation: heroZoomMobile 34s ease-in-out infinite alternate;
  }

  @keyframes heroZoomMobile {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
  }

  .logo img {
    width: 240px;
  }

  header p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 320px;
  }

  .topbar {
    top: 14px;
    right: 14px;
    left: 14px;
    justify-content: flex-end;
  }

  #openAuthModal,
  #userArea button {
    padding: 12px 18px;
    font-size: 0.9rem;
    border-radius: 18px;
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.55);
  }

  #welcomeUser {
    font-size: 0.85rem;
    padding: 12px 16px;
    border-radius: 18px;
  }

  #userArea {
    gap: 10px;
  }

  .contacts {
    flex-direction: column;
    gap: 14px;
    margin-top: 26px;
  }

  .contacts p {
    width: 100%;
    max-width: 280px;
    margin: auto;
    padding: 12px 18px;
    font-size: 0.9rem;
  }

  .app-nav {
    max-width: 320px;
  }

  .app-nav button {
    flex: 1;
    min-width: 0;
    padding: 11px 22px;
  }

  .schedule-intro {
    padding: 50px 20px 0;
  }

  .schedule-intro h2 {
    font-size: 2.4rem;
  }

  .mobile-day-tabs {
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding: 28px 16px 0;
  }

  .mobile-day-tabs button {
    min-width: 72px;
    padding: 12px 18px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .courses {
    padding: 24px 16px 60px;
  }

  .day-column {
    width: 100%;
    border-radius: 26px;
    padding: 22px;
  }

  .day-title {
    font-size: 2rem;
    margin-bottom: 18px;
  }

  .card {
    border-radius: 22px;
    padding: 24px 18px;
    margin-bottom: 18px;
  }

  .time {
    font-size: 1.05rem;
    margin-bottom: 15px;
  }

  button {
    min-height: 52px;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 500;
  }

  .spots,
  .waiting-count {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .modal {
    padding: 16px;
  }

  .modal-content {
    padding: 34px 22px;
    border-radius: 30px;
  }

  .modal-content h2,
  .my-bookings-section h2,
  #adminPanel h2 {
    font-size: 2rem;
  }

  .modal-content input {
    min-height: 54px;
    border-radius: 18px;
    font-size: 1rem;
  }

  .auth-tabs {
    gap: 8px;
  }

  .my-bookings-section,
  #adminPanel {
    width: calc(100% - 24px);
    padding: 26px 20px;
    border-radius: 26px;
  }

  .my-booking-card,
  .pending-user,
  .admin-news-card,
  .closure-admin-card {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    padding: 16px;
  }

  .premium-booking-card button,
  .pending-user button,
  .admin-news-card button,
  .closure-admin-card button {
    width: 100%;
  }

  .admin-stats-top,
  .admin-stats-bottom {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stats-bottom {
    max-width: 100%;
  }

  .admin-closures-box,
  .admin-news-box {
    width: 100%;
    max-width: 100%;
    padding: 22px 14px;
  }

  .about-section {
    margin: 55px auto 20px;
    padding: 38px 24px;
    border-radius: 28px;
  }

  .about-section h2 {
    font-size: 2.3rem;
  }

  .about-section > p:last-child {
    font-size: 0.98rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: center;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    justify-self: center;
  }

  .footer-left {
    flex-direction: column;
    gap: 16px;
  }

  .footer-logo {
    width: 145px;
  }

  .footer-brand-text h3 {
    font-size: 2.1rem;
  }

  .footer-brand-text p {
    font-size: 0.8rem;
  }

  .footer-brand-text span {
    font-size: 0.9rem;
  }

  .footer-center {
    padding: 26px 24px;
  }

  .footer-whatsapp {
    flex-direction: column;
    align-items: center;
  }

  .footer-whatsapp a {
    width: 220px;
  }

  .footer-right {
    align-items: center;
  }
}
/* FIX DEFINITIVO NAV / DASHBOARD / ADMIN */

.app-nav {
  position: sticky;
  top: 16px;
  z-index: 200;
  display: flex;
  gap: 8px;
  width: fit-content;
  margin: 28px auto 30px !important;
  padding: 8px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(200,165,141,0.18);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.app-nav button {
  width: auto !important;
  min-width: 120px;
  margin: 0 !important;
  padding: 12px 26px;
  border-radius: 999px;
  background: transparent;
  color: #5d4037;
  box-shadow: none;
}

.app-nav button.active {
  background: linear-gradient(135deg, #d7bfae, #c8a58d);
  color: white;
}

.admin-stats {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
}

.admin-stats-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.admin-stats-bottom {
  display: grid;
  grid-template-columns: repeat(2, 260px);
  gap: 18px;
  justify-content: center;
  margin-top: 18px;
}

#adminPanel .admin-stat-card {
  min-height: 135px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.dashboard-main h2 {
  margin-bottom: 18px;
}

#myBookings > p {
  margin-top: 18px;
  padding: 18px;
  border.empty-booking-box {
  margin-top: 18px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(200,165,141,0.16);
  text-align: center;
}

.empty-booking-box p {
  color: #7b5e57;
  margin-bottom: 16px;
}

.empty-booking-box button {
  width: auto;
  min-width: 190px;
  margin: 0;
  border-radius: 999px;
}-radius: 18px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(200,165,141,0.16);
  color: #7b5e57;
}
#myPastBookings,
#myWaitingList {
  margin-bottom: 24px;
}

#myPastBookings > p,
#myWaitingList > p {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(200,165,141,0.14);
  color: #8d6e63;
}

#myBookingsSection > h2:not(:first-of-type) {
  font-size: 1.8rem;
  margin-top: 28px;
  margin-bottom: 12px;
}
/* ===== DASHBOARD CLIENTE ===== */

.dashboard-welcome {
  margin-bottom: 30px;
}

.dashboard-welcome h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #4e342e;
  margin-bottom: 6px;
}

.dashboard-welcome p {
  color: #6d4c41;
  font-size: 1.1rem;
}

.dashboard-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.dashboard-card,
.dashboard-small-card,
.dashboard-news {
  background: rgba(255,255,255,0.85);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.dashboard-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-card-title h2 {
  margin: 0;
  color: #4e342e;
  font-size: 2rem;
}

.dashboard-news {
  height: fit-content;
}

.dashboard-small-card {
  min-height: 220px;
}

@media (max-width: 900px) {

  .dashboard-top {
    grid-template-columns: 1fr;
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
}
.dashboard-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-card-title span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.8rem;
  transform: translateY(-9px);
}

.dashboard-card-title h2 {
  margin: 0;
  line-height: 1.2;
}
.dashboard-bottom {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 30px;
  align-items: start;
}

.dashboard-hidden-box {
  display: none;
  margin-top: 16px;
}

.dashboard-hidden-box.open {
  display: block;
}

.dashboard-outline-btn {
  width: auto;
  min-width: 180px;
  padding: 12px 24px;
  margin: 14px 0 0;
  border-radius: 999px;
}
.dashboard-hidden-box {
  display: none !important;
  margin-top: 16px;
}

.dashboard-hidden-box.open {
  display: block !important;
}
@media (max-width: 768px) {
  .my-bookings-section,
  .admin-panel {
    width: calc(100% - 28px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: visible !important;
  }

  .dashboard-bottom {
    grid-template-columns: 1fr !important;
  }

  .admin-stats-top,
  .admin-stats-bottom {
    grid-template-columns: 1fr 1fr !important;
  }

  .admin-stat-card {
    min-width: 0 !important;
  }

  .app-nav {
    transform: scale(0.92);
  }
}
body.admin-mode #adminPanel {
  display: block !important;
}

body.admin-mode #myBookingsSection {
  display: none !important;
}
.site-footer {
  display: block;
}
@media (max-width: 768px) {
  .site-footer {
    display: block !important;
    margin-top: 55px;
  }
}
/* ===== BADGE PRENOTAZIONE CONFERMATA ===== */

.booking-badge.confirmed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #e7f8ec;
  color: #1f8f45;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 18px rgba(31, 143, 69, 0.12);
}

.confirmed-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #dff8e7;
  color: #16843a;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(22,132,58,0.14);
}

.confirmed-box span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #36c46b;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}

.confirmed-box strong {
  font-weight: 600;
}
/* ===== CARD PROSSIMA LEZIONE PREMIUM ===== */

.dashboard-next-lesson {
  padding: 30px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,248,242,0.9));
  border: 1px solid rgba(200,165,141,0.22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.06);
}

.next-lesson-label {
  font-size: 0.95rem;
  color: #9b7b6d;
  font-weight: 600;
  margin-bottom: 8px;
}

.dashboard-next-lesson h3 {
  font-size: 1.75rem;
  margin-bottom: 14px;
}

.next-lesson-meta {
  margin-bottom: 18px;
}

.dashboard-next-lesson button {
  background: linear-gradient(135deg, #cfa98f, #c39475);
  box-shadow: 0 12px 24px rgba(195,148,117,0.22);
}

.weekly-booking-counter {
  margin-top: 24px;
  padding: 18px 24px;
  border-radius: 22px;
}

.booking-counter-number {
  font-size: 1.05rem;
  font-weight: 600;
  color: #4e342e;
}/* ===== PULIZIA CARD PROSSIMA LEZIONE ===== */

.dashboard-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(200,165,141,0.16);
}

.dashboard-next-lesson {
  padding: 22px 0 24px;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid rgba(200,165,141,0.18);
}

.weekly-booking-counter {
  margin-top: 22px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 0 0;
}

.booking-progress {
  max-width: 320px;
}

.next-lesson-card {
  margin-bottom: 0;
}

/* ===== LEZIONI FUTURE SECONDARIE ===== */

.future-booking-card {
  padding: 16px 20px !important;
  border-radius: 20px;
  min-height: auto;
}

.future-booking-card .confirmed-box {
  transform: scale(0.78);
  transform-origin: left center;
  margin: 0 0 6px 0;
}

.future-booking-card h4 {
  font-size: 1.05rem;
  margin: 6px 0;
}

.future-booking-card .booking-date,
.future-booking-card .booking-time {
  font-size: 0.9rem;
  opacity: 0.85;
}

.future-booking-card .cancel-booking-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 18px;
  min-height: auto;
}

.future-booking-card .lesson-name {
  font-size: 0.95rem;
  color: #9b7b6d;
}
/* ===== RIDUZIONE CARD SECONDARIE ===== */

.future-booking-card .confirmed-box {
  transform: scale(0.65) !important;
  transform-origin: left center;
  margin: -8px 0 0 -18px;
}

.future-booking-card .confirmed-box span {
  width: 18px !important;
  height: 18px !important;
  font-size: 0.75rem !important;
}

.future-booking-card .confirmed-box strong {
  font-size: 0.85rem !important;
}

.future-booking-card .cancel-booking-btn {
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  border-radius: 16px !important;
  min-height: auto !important;
}

.future-booking-card h4 {
  font-size: 1rem !important;
}

.future-booking-card {
  padding: 14px 18px !important;
}
/* ===== BADGE E PULSANTE SECONDARI REALMENTE PICCOLI ===== */

.future-booking-card .confirmed-box {
  transform: none !important;
  padding: 6px 12px !important;
  gap: 6px !important;
  margin: 0 0 8px 0 !important;
  box-shadow: 0 6px 14px rgba(22,132,58,0.10) !important;
}

.future-booking-card .confirmed-box span {
  width: 17px !important;
  height: 17px !important;
  font-size: 0.7rem !important;
}

.future-booking-card .confirmed-box strong {
  font-size: 0.82rem !important;
  line-height: 1 !important;
}

.future-booking-card .cancel-booking-btn {
  padding: 7px 14px !important;
  min-height: 34px !important;
  font-size: 0.82rem !important;
  line-height: 1 !important;
  border-radius: 999px !important;
}

/* ===== CONTATORE SETTIMANA PULITO ===== */

.weekly-booking-counter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.booking-counter-title {
  font-weight: 500;
  color: #5d4037;
  white-space: nowrap;
}

.booking-progress {
  width: 100%;
  max-width: none;
  margin: 0;
}

.booking-counter-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4e342e;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .weekly-booking-counter {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }
}
.dashboard-news-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.18);
  margin-bottom: 14px;
}

.dashboard-news-card.pinned {
  border-left: 4px solid #c39475;
}

.dashboard-news-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f6eee8;
  color: #8d6e63;
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-news-card h4 {
  margin: 0 0 8px;
  color: #4e342e;
}

.dashboard-news-date {
  color: #9b7b6d;
  font-size: 0.85rem;
}
/* ===== AVVISI PREMIUM HOME CLIENTE ===== */

.dashboard-news-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(200,165,141,0.18);
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.dashboard-news-card.pinned {
  border-left: 5px solid #c39475;
}

.dashboard-news-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f6eee8;
  color: #8d6e63;
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-news-card h4 {
  margin: 0 0 8px;
  color: #4e342e;
  font-size: 1rem;
}

.dashboard-news-card p {
  color: #7b5e57;
  font-size: 0.92rem;
  line-height: 1.5;
}

.dashboard-news-date {
  display: block;
  margin-top: 12px;
  color: #9b7b6d;
  font-size: 0.8rem;
}
/* ===== MOBILE HOME CLIENTE PREMIUM ===== */

@media (max-width: 768px) {
  .dashboard-card,
  .dashboard-small-card,
  .dashboard-news {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .dashboard-card-title h2 {
    font-size: 1.55rem;
  }

  .dashboard-next-lesson {
    display: block;
    padding: 18px 0 22px;
  }

  .next-lesson-label {
    font-size: 0.85rem;
  }

  .dashboard-next-lesson h3 {
    font-size: 1.35rem;
  }

  .next-lesson-meta {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
  }

  .confirmed-box {
    margin-top: 12px;
  }

  .dashboard-next-lesson button {
    width: 100%;
    margin-top: 18px;
  }

  .future-booking-card {
    display: block;
  }

  .future-booking-card button {
    width: 100%;
    margin-top: 14px;
  }

  .weekly-booking-counter {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
/* ===== PRENOTAZIONI DISPONIBILI ===== */

.booking-limit-message {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255,248,242,0.8);
  border: 1px solid rgba(200,165,141,0.16);
  color: #7b5e57;
  font-size: 0.92rem;
  font-weight: 500;
}
.weekly-booking-counter {
  grid-template-columns: 1fr auto !important;
  gap: 18px !important;
  margin-top: 14px !important;
  padding-top: 4px !important;
}

.booking-limit-message {
  grid-column: 1 / -1;
  margin-top: 6px !important;
  padding: 10px 14px !important;
  max-width: 520px;
}

.future-booking-card {
  margin-top: 10px !important;
}
.booking-limit-message.full {
  background: #fff4e5;
  color: #c26a00;
  border: 1px solid rgba(194,106,0,0.15);
}
/* ===== LISTA D'ATTESA PREMIUM ===== */

.waiting-booking-card {
  border: 1px solid rgba(214, 156, 36, 0.22);
  background: rgba(255, 250, 235, 0.72);
}

.waiting-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-bottom: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff3cd;
  color: #b77900;
  font-weight: 600;
  font-size: 0.86rem;
  box-shadow: 0 8px 18px rgba(183, 121, 0, 0.10);
}

.waiting-badge span {
  line-height: 1;
}

.waiting-position {
  margin-top: 8px !important;
  color: #b77900 !important;
  font-weight: 600;
}
.forgot-password-btn {
  background: transparent !important;
  color: #8d6e63 !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  margin-top: 4px !important;
  font-size: 0.9rem !important;
  text-decoration: underline;
}

.forgot-password-btn:hover {
  transform: none !important;
  opacity: 0.75;
}
/* ===== ADMIN AGENDA STUDIO ===== */

.admin-agenda-panel {
  width: 92%;
  max-width: 1250px;
  margin: 40px auto 80px;
  padding: 35px;
  background: linear-gradient(180deg, #fffdf9, #f8f1ea);
  border: 1px solid rgba(200,165,141,0.22);
  border-radius: 28px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.admin-agenda-header {
  margin-bottom: 28px;
}

.admin-agenda-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  color: #4e342e;
  margin-bottom: 6px;
}

.admin-agenda-header p {
  color: #7b5e57;
}

.agenda-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.agenda-stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(200,165,141,0.18);
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.agenda-stat-card > span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f6eee8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.agenda-stat-card p {
  color: #7b5e57;
  font-size: 0.9rem;
}

.agenda-stat-card strong {
  display: block;
  font-size: 1.8rem;
  color: #4e342e;
  line-height: 1.2;
}

.agenda-stat-card small {
  color: #9b7b6d;
}

.agenda-days-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}

.agenda-day-card,
.agenda-week-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(200,165,141,0.18);
  box-shadow: 0 10px 26px rgba(0,0,0,0.04);
}

.agenda-day-card h3,
.agenda-week-card h3 {
  font-size: 1.25rem;
  color: #4e342e;
  margin-bottom: 18px;
}

.agenda-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .agenda-stats-grid,
  .agenda-days-grid {
    grid-template-columns: 1fr 1fr;
  }

  .agenda-week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-agenda-panel {
    width: calc(100% - 24px);
    padding: 26px 18px;
  }

  .agenda-stats-grid,
  .agenda-days-grid {
    grid-template-columns: 1fr;
  }

  .agenda-week-grid {
    grid-template-columns: 1fr;
  }
}
.agenda-lesson-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(200,165,141,0.14);
}

.agenda-lesson-row:last-child {
  border-bottom: none;
}

.agenda-lesson-row strong {
  display: block;
  color: #4e342e;
  font-size: 1rem;
}

.agenda-lesson-row small {
  display: block;
  color: #9b7b6d;
  margin-top: 3px;
}

.agenda-lesson-numbers {
  display: flex;
  gap: 10px;
  white-space: nowrap;
  color: #7b5e57;
  font-weight: 600;
}

.agenda-empty {
  color: #9b7b6d;
}
.agenda-week-day {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(200,165,141,0.15);
  text-align: center;
}

.agenda-week-day strong {
  display: block;
  font-size: 1.1rem;
  color: #4e342e;
  margin-bottom: 8px;
}

.agenda-week-day span {
  display: block;
  color: #7b5e57;
  font-size: 0.9rem;
  margin: 3px 0;
}
/* ===== RIEPILOGO SETTIMANA AGENDA PIÙ ARMONIOSO ===== */

.agenda-week-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch;
}

.agenda-week-day {
  min-height: 150px;
  padding: 20px 18px !important;
  border-radius: 22px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.agenda-week-day strong {
  font-size: 1.15rem !important;
  margin-bottom: 10px !important;
  letter-spacing: 0.5px;
}

.agenda-week-day span {
  font-size: 0.92rem !important;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .agenda-week-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .agenda-week-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ===== FIX AGENDA STUDIO LAYOUT ===== */

.admin-agenda-panel {
  margin-top: 90px !important;
}

.agenda-stats-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
  gap: 20px !important;
}

.agenda-stat-card {
  min-height: 130px;
  padding: 24px 22px !important;
}

.agenda-days-grid {
  align-items: stretch;
}

.agenda-day-card {
  min-height: 280px;
}

.agenda-lesson-row {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(200,165,141,0.12);
  border-radius: 16px;
  padding: 14px 16px !important;
  margin-bottom: 12px;
}

.agenda-lesson-row:last-child {
  margin-bottom: 0;
}

.agenda-lesson-numbers span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f6eee8;
}
/* ===== AGENDA STUDIO - LEZIONI PREMIUM ===== */

.agenda-lesson-row {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(200,165,141,0.16);
  border-radius: 18px;
  padding: 16px 18px !important;
  margin-bottom: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.035);
}

.agenda-lesson-row strong {
  font-size: 1rem;
  color: #4e342e;
}

.agenda-lesson-row small {
  color: #9b7b6d;
  font-size: 0.9rem;
}

.agenda-lesson-numbers {
  display: flex;
  gap: 8px;
}

.agenda-lesson-numbers span {
  min-width: 72px;
  text-align: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f6eee8;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .agenda-lesson-row {
    grid-template-columns: 1fr;
  }

  .agenda-lesson-numbers {
    justify-content: flex-start;
  }
}
/* ===== AGENDA MINI PROGRESS ===== */

.agenda-mini-progress {
  width: 100%;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(200,165,141,0.18);
  overflow: hidden;
}

.agenda-mini-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #8ccf9a;
}

.agenda-lesson-row.almost-full .agenda-mini-progress span {
  background: #e8b86d;
}

.agenda-lesson-row.full .agenda-mini-progress span {
  background: #d86b6b;
}

.agenda-lesson-row.available {
  border-left: 4px solid #8ccf9a;
}

.agenda-lesson-row.almost-full {
  border-left: 4px solid #e8b86d;
}

.agenda-lesson-row.full {
  border-left: 4px solid #d86b6b;
}
/* ===== DETTAGLIO LEZIONE AGENDA ===== */

.agenda-lesson-row {
  cursor: pointer;
}

.agenda-lesson-details {
  margin-top: 28px;
  padding: 26px;
  border-radius: 26px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(200,165,141,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.agenda-details-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.agenda-details-header h3 {
  color: #4e342e;
  margin-bottom: 4px;
}

.agenda-details-header p {
  color: #8d6e63;
}

.agenda-details-header button {
  width: auto;
  min-width: 100px;
  margin: 0;
  padding: 10px 18px;
}

.agenda-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.agenda-details-grid h4 {
  margin-bottom: 14px;
  color: #4e342e;
}

.agenda-person-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(200,165,141,0.15);
  margin-bottom: 10px;
}

.agenda-person-card.waiting {
  background: #fff8e6;
}

.agenda-person-card strong {
  display: block;
  color: #4e342e;
}

.agenda-person-card small {
  display: block;
  color: #8d6e63;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .agenda-details-grid {
    grid-template-columns: 1fr;
  }

  .agenda-details-header {
    flex-direction: column;
  }

  .agenda-details-header button {
    width: 100%;
  }
}
.booking-slot-progress {
  width: 100%;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(200,165,141,0.18);
  overflow: hidden;
}

.booking-slot-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #8ccf9a;
}
/* ===== MOBILE PREMIUM ===== */

@media (max-width: 768px) {

  .dashboard-top,
  .dashboard-bottom,
  .agenda-days-grid {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
  }

  .dashboard-card,
  .dashboard-small-card,
  .agenda-day-card,
  .agenda-week-card {
    border-radius: 24px !important;
  }

  .dashboard-welcome h1 {
    font-size: 2rem !important;
  }

  .dashboard-welcome p {
    font-size: 0.95rem;
  }

  .next-lesson-card,
  .dashboard-next-lesson {
    border-radius: 22px !important;
  }

  .agenda-stat-card {
    min-height: auto !important;
  }

  .agenda-stat-card strong {
    font-size: 1.5rem !important;
  }

}
/* ===== MOBILE NAV APP-LIKE ===== */

@media (max-width: 768px) {
  .app-nav {
    position: sticky !important;
    top: 12px !important;
    z-index: 500 !important;
    width: calc(100% - 28px) !important;
    max-width: 420px !important;
    margin: 18px auto 24px !important;
    padding: 8px !important;
    transform: none !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(14px);
  }

  .app-nav button {
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px 10px !important;
    font-size: 0.92rem !important;
    border-radius: 999px !important;
  }

  .app-nav button.active {
    background: linear-gradient(135deg, #d7bfae, #c8a58d) !important;
    color: white !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08) !important;
  }
}
/* ===== MOBILE BOTTOM APP NAV ===== */

@media (max-width: 768px) {
  body {
    padding-bottom: 92px;
  }

  .app-nav {
    position: fixed !important;
    top: auto !important;
    bottom: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;

    width: calc(100% - 32px) !important;
    max-width: 430px !important;
    margin: 0 !important;

    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;

    padding: 8px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(18px);
    border: 1px solid rgba(200,165,141,0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
  }

  .app-nav button {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 10px !important;
    border-radius: 999px !important;
    font-size: 0.92rem !important;
    min-height: 46px !important;
  }

  .app-nav button.active {
    background: linear-gradient(135deg, #d7bfae, #c8a58d) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  }
}
/* ===== BLOCCO AREA RISERVATA SE NON LOGGATO ===== */

body:not(.logged-in) #appNav,
body:not(.logged-in) #myBookingsSection,
body:not(.logged-in) #adminPanel,
body:not(.logged-in) #adminAgendaPanel,
body:not(.logged-in) .schedule-intro {
  display: none !important;
}
/* ===== MOBILE APP EXPERIENCE ===== */

@media (max-width: 768px) {
  body {
    background: #fffaf5;
  }

  header {
    min-height: 360px !important;
    padding: 70px 0 45px !important;
  }

  .logo img {
    width: 210px !important;
  }

  header > p {
    font-size: 0.9rem !important;
    padding: 10px 18px !important;
  }

  .my-bookings-section,
  .admin-agenda-panel,
  #adminPanel {
    width: calc(100% - 22px) !important;
    margin: 18px auto 90px !important;
    padding: 20px 14px !important;
    border-radius: 28px !important;
  }

  .dashboard-welcome {
    margin-bottom: 18px !important;
    padding: 4px 4px 0;
  }

  .dashboard-welcome h1 {
    font-size: 1.8rem !important;
    line-height: 1.15;
  }

  .dashboard-welcome p {
    font-size: 0.92rem !important;
  }

  .dashboard-card,
  .dashboard-small-card,
  .dashboard-news,
  .agenda-day-card,
  .agenda-week-card,
  .agenda-stat-card {
    padding: 20px 16px !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 26px rgba(0,0,0,0.055) !important;
  }

  .dashboard-card-title {
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .dashboard-card-title span {
    font-size: 1.35rem !important;
    transform: translateY(-4px) !important;
  }

  .dashboard-card-title h2 {
    font-size: 1.45rem !important;
    line-height: 1.2;
  }

  .dashboard-next-lesson {
    display: block !important;
    padding: 4px 0 20px !important;
  }

  .dashboard-next-lesson h3 {
    font-size: 1.35rem !important;
    margin-bottom: 10px !important;
  }

  .next-lesson-meta {
    display: grid !important;
    gap: 7px !important;
    margin-bottom: 12px !important;
  }

  .confirmed-box {
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
  }

  .dashboard-next-lesson button {
    width: 100% !important;
    margin-top: 18px !important;
    min-height: 48px !important;
  }

  .weekly-booking-counter {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    text-align: center !important;
    margin-top: 14px !important;
  }

  .booking-progress {
    max-width: none !important;
  }

  .booking-limit-message {
    max-width: none !important;
    font-size: 0.88rem !important;
  }

  .future-booking-card {
    display: block !important;
    padding: 16px !important;
  }

  .future-booking-card button,
  .cancel-booking-btn {
    width: 100% !important;
    margin-top: 14px !important;
  }

  .dashboard-news {
    order: 3 !important;
  }

  .dashboard-bottom {
    gap: 16px !important;
  }
}
/* ===== MOBILE FIX URGENTE - VERSIONE APP ===== */

@media (max-width: 768px) {

  body {
    background: #fffaf5 !important;
    padding-bottom: 86px !important;
    overflow-x: hidden !important;
  }

  header {
    min-height: 190px !important;
    height: 190px !important;
    padding: 22px 0 !important;
    background-position: center !important;
  }

  header .logo img,
  .logo img {
    width: 120px !important;
    max-width: 120px !important;
  }

  header p,
  .scroll-down {
    display: none !important;
  }

  #userArea {
    position: absolute !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 28px) !important;
    justify-content: space-between !important;
    gap: 10px !important;
    z-index: 800 !important;
  }

  #welcomeUser,
  #userArea button {
    font-size: 0.9rem !important;
    padding: 10px 14px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  #welcomeUser {
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .my-bookings-section,
  .admin-agenda-panel,
  #adminPanel {
    width: calc(100% - 20px) !important;
    margin: 18px auto 100px !important;
    padding: 18px 12px !important;
    border-radius: 26px !important;
  }

  .dashboard-welcome {
    margin: 0 0 16px !important;
    padding: 0 6px !important;
  }

  .dashboard-welcome h1 {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  .dashboard-welcome p {
    font-size: 0.95rem !important;
  }

  .dashboard-top,
  .dashboard-bottom,
  .agenda-days-grid,
  .agenda-stats-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .dashboard-card,
  .dashboard-small-card,
  .dashboard-news,
  .agenda-day-card,
  .agenda-week-card,
  .agenda-stat-card {
    width: 100% !important;
    padding: 18px 14px !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05) !important;
  }

  .dashboard-card-title {
    margin-bottom: 14px !important;
    gap: 10px !important;
  }

  .dashboard-card-title h2 {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
  }

  .dashboard-card-title span {
    font-size: 1.25rem !important;
  }

  .dashboard-next-lesson {
    padding: 6px 0 16px !important;
    border-bottom: 1px solid rgba(200,165,141,0.18) !important;
  }

  .next-lesson-label {
    font-size: 0.82rem !important;
    margin-bottom: 6px !important;
  }

  .dashboard-next-lesson h3 {
    font-size: 1.3rem !important;
    margin-bottom: 10px !important;
  }

  .next-lesson-meta {
    display: grid !important;
    gap: 6px !important;
    font-size: 0.95rem !important;
  }

  .confirmed-box {
    margin-top: 12px !important;
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
  }

  .dashboard-next-lesson button {
    width: 100% !important;
    margin-top: 16px !important;
    min-height: 46px !important;
    font-size: 0.95rem !important;
  }

  .weekly-booking-counter {
    margin-top: 14px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    text-align: center !important;
  }

  .booking-counter-number {
    font-size: 1.25rem !important;
  }

  .booking-limit-message {
    max-width: none !important;
    font-size: 0.86rem !important;
    padding: 10px 12px !important;
  }

  .future-booking-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .future-booking-card button,
  .cancel-booking-btn {
    width: 100% !important;
    margin-top: 12px !important;
  }

  .dashboard-news,
  .dashboard-small-card {
    min-height: auto !important;
  }

  footer {
    display: none !important;
  }

  .app-nav {
    position: fixed !important;
    top: auto !important;
    bottom: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 28px) !important;
    max-width: 420px !important;
    margin: 0 !important;
    padding: 7px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    z-index: 9999 !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.96) !important;
    backdrop-filter: blur(18px) !important;
    box-shadow: 0 12px 34px rgba(0,0,0,0.16) !important;
  }

  .app-nav button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 36px !important;
    padding: 8px !important;
    font-size: 0.9rem !important;
    border-radius: 999px !important;
  }
}
/* ===== MOBILE APP MODE LOGGATO ===== */

@media (max-width: 768px) {
  body.logged-in header {
    height: 92px !important;
    min-height: 92px !important;
    padding: 0 !important;
    background-image: none !important;
    background: #fffaf5 !important;
  }

  body.logged-in header .logo,
  body.logged-in header p,
  body.logged-in .scroll-down {
    display: none !important;
  }

  body.logged-in footer {
    display: none !important;
  }

  @media (max-width: 768px) {
     body.logged-in #userArea {
      position: sticky !important;
      top: 10px !important;

      width: calc(100% - 24px) !important;

      margin: 10px auto 14px !important;

      left: auto !important;
      right: auto !important;
      transform: none !important;

      z-index: 300 !important; 
      }
  }

  body.logged-in #welcomeUser {
    flex: 1 !important;
    max-width: none !important;
    min-width: 0 !important;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 768px) {
  body.logged-in .dashboard-small-card {
    padding: 18px 16px !important;
    min-height: auto !important;
  }

  body.logged-in .dashboard-small-card p {
    font-size: 0.95rem !important;
    margin: 12px 0 !important;
  }

  body.logged-in .dashboard-outline-btn {
    min-height: 42px !important;
    padding: 10px 18px !important;
    font-size: 0.92rem !important;
    width: auto !important;
  }
}
@media (max-width: 768px) {
  body.logged-in .my-bookings-section,
  body.logged-in .admin-agenda-panel,
  body.logged-in #adminPanel {
    margin-top: 6px !important;
  }

  body.logged-in .dashboard-welcome {
    margin-top: 0 !important;
  }
}
@media (max-width:768px){

  .dashboard-small-card{
    padding:16px !important;
  }

  .dashboard-small-card h2{
    font-size:1.6rem !important;
    margin-bottom:10px !important;
  }

  .dashboard-small-card p{
    margin:12px 0 !important;
    font-size:0.95rem !important;
  }

  .dashboard-small-card button{
    margin-top:8px !important;
    min-height:42px !important;
  }

}
/* ===== MOBILE HOME CARD COMPATTE ===== */

@media (max-width: 768px) {
  body.logged-in .dashboard-news,
  body.logged-in .dashboard-small-card {
    padding: 18px 16px !important;
    border-radius: 22px !important;
  }

  body.logged-in .dashboard-news {
    min-height: auto !important;
  }

  body.logged-in .dashboard-card-title h2 {
    font-size: 1.45rem !important;
  }

  body.logged-in .dashboard-news p,
  body.logged-in .dashboard-small-card p {
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
    margin: 10px 0 14px !important;
  }

  body.logged-in .dashboard-outline-btn {
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    font-size: 0.92rem !important;
  }

  body.logged-in .dashboard-bottom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}
@media (max-width: 768px) {
  body.logged-in .dashboard-card {
    padding: 16px 12px !important;
  }

  body.logged-in .dashboard-next-lesson {
    padding: 0 !important;
  }

  body.logged-in .next-lesson-label {
    display: none !important;
  }

  body.logged-in .dashboard-next-lesson h3 {
    font-size: 1.45rem !important;
    margin: 8px 0 12px !important;
  }

  body.logged-in .next-lesson-meta {
    font-size: 0.95rem !important;
    gap: 4px !important;
  }

  body.logged-in .confirmed-box {
    margin-top: 12px !important;
    width: fit-content !important;
  }

  body.logged-in .dashboard-next-lesson button {
    margin-top: 14px !important;
    min-height: 44px !important;
  }
}
/* ===== MOBILE HOME COMPATTA DEFINITIVA ===== */

@media (max-width: 768px) {
  body.logged-in .dashboard-news,
  body.logged-in .dashboard-small-card {
    padding: 14px 14px !important;
    border-radius: 20px !important;
    min-height: auto !important;
  }

  body.logged-in .dashboard-news .dashboard-card-title,
  body.logged-in .dashboard-small-card .dashboard-card-title {
    margin-bottom: 8px !important;
  }

  body.logged-in .dashboard-news .dashboard-card-title h2,
  body.logged-in .dashboard-small-card .dashboard-card-title h2 {
    font-size: 1.25rem !important;
  }

  body.logged-in .dashboard-news .dashboard-card-title span,
  body.logged-in .dashboard-small-card .dashboard-card-title span {
    font-size: 1.1rem !important;
  }

  body.logged-in .dashboard-news p,
  body.logged-in .dashboard-small-card p {
    font-size: 0.88rem !important;
    line-height: 1.3 !important;
    margin: 8px 0 10px !important;
  }

  body.logged-in .dashboard-outline-btn {
    width: 100% !important;
    min-height: 38px !important;
    padding: 8px 12px !important;
    font-size: 0.86rem !important;
  }

  body.logged-in .dashboard-bottom {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  body.logged-in .dashboard-bottom .dashboard-small-card {
    width: 100% !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title {
    align-items: flex-start !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title h2 {
    font-size: 1.05rem !important;
    line-height: 1.15 !important;
  }

  body.logged-in .dashboard-bottom .dashboard-small-card p {
    font-size: 0.78rem !important;
  }

  body.logged-in .dashboard-bottom .dashboard-outline-btn {
    font-size: 0.78rem !important;
    min-height: 34px !important;
    padding: 7px 8px !important;
  }
}
/* ===== FIX MOBILE CARD STORICO / LISTA ATTESA ===== */

@media (max-width: 768px) {
  body.logged-in .dashboard-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  body.logged-in .dashboard-bottom .dashboard-small-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title h2 {
    font-size: 0.95rem !important;
    line-height: 1.15 !important;
    word-break: normal !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title span {
    font-size: 1rem !important;
    flex-shrink: 0 !important;
  }

  body.logged-in .dashboard-bottom .dashboard-small-card p {
    font-size: 0.76rem !important;
    line-height: 1.25 !important;
  }

  body.logged-in .dashboard-bottom .dashboard-outline-btn {
    font-size: 0.74rem !important;
    padding: 7px 6px !important;
  }
}
@media (max-width: 768px) {
  body.logged-in .dashboard-bottom .dashboard-outline-btn {
    width: calc(100% - 20px) !important;
    max-width: 160px !important;
    min-height: 34px !important;
    padding: 7px 10px !important;
    font-size: 0.72rem !important;
    margin: 10px auto 0 !important;
    display: block !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 768px) {
  body.logged-in .dashboard-bottom .dashboard-outline-btn {
    width: auto !important;
    max-width: 135px !important;
    min-width: 0 !important;

    padding-left: 14px !important;
    padding-right: 14px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;

    white-space: nowrap !important;
  }
}
@media (max-width: 768px) {
  body.logged-in .dashboard-bottom .dashboard-card-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
  }

  body.logged-in .dashboard-bottom .dashboard-card-title h2 {
    font-size: 1.3rem !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
}
/* ===== FIX DEFINITIVO USER BAR MOBILE ===== */

@media (max-width: 768px) {
  body.logged-in header {
    position: relative !important;
  }

  body.logged-in #userArea {
    position: absolute !important;
    top: 18px !important;
    left: 14px !important;
    right: 14px !important;
    transform: none !important;

    width: auto !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;

    z-index: 50 !important;
  }

  body.logged-in #welcomeUser {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.logged-in #userArea button {
    flex-shrink: 0 !important;
  }
}
/* ===== MOBILE TOPBAR FISSA CORRETTA ===== */

@media (max-width: 768px) {
  body.logged-in .topbar {
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 10000 !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    pointer-events: none !important;
  }

  body.logged-in #userArea {
    position: static !important;
    width: 100% !important;
    max-width: 520px !important;

    display: flex !important;
    align-items: center !important;
    gap: 8px !important;

    pointer-events: auto !important;
  }

  body.logged-in #welcomeUser {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.logged-in #userArea button {
    flex-shrink: 0 !important;
  }

  body.logged-in header {
    padding-top: 66px !important;
  }
}