/* ═══════════════════════════════════════════
   Supportin' Prenotation — Light Minimal Theme
   ═══════════════════════════════════════════ */

:root {
  --primary:       #9b5de5;
  --primary-dark:  #7c3aed;
  --primary-light: #c084fc;
  --bg:            #080808;
  --surface:       #0d0d0d;
  --surface2:      #111111;
  --surface3:      #1a1a1a;
  --text:          #e8e8e8;
  --text-muted:    #888888;
  --success:       #166534;
  --danger:        #991B1B;
  --warning:       #92400E;
  --info:          #1E40AF;
  --border:        #222222;
  --border-light:  #1a1a1a;
  --shadow:        0 1px 8px rgba(0,0,0,0.4);
  --shadow-lg:     0 4px 20px rgba(0,0,0,0.6);
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     14px;
  --transition:    0.18s ease;
}

/* ─── RESET ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: #BBBBBB; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #888888; }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.7; }

/* ─── CONTAINER ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── HEADER ─── */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

/* ─── LOGO ─── */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-badge {
  width: 42px;
  height: 42px;
  background: #1A1A1A;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: -1px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  opacity: 1;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background: var(--surface3);
  opacity: 1;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #7F1D1D;
  opacity: 1;
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover {
  background: #14532D;
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--surface2);
  opacity: 1;
}

.btn-sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 34px;
  height: 34px;
}

/* ─── ACTIVITY INFO STRIP (geolocalizzazione cliente) ─── */
.activity-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
}
.activity-info-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.3;
  min-width: 0;
}
.activity-info-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.activity-info-meta .meta-sep { opacity: 0.5; }
.activity-info-meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* ─── FORM ELEMENTS ─── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.65rem 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}

.form-input::placeholder { color: #AAAAAA; }
.form-select { cursor: pointer; background-color: var(--surface); }
.form-select option { background: var(--surface); color: var(--text); }
.form-textarea { resize: vertical; min-height: 90px; }

.form-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ─── STEP INDICATOR ─── */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 2rem 0;
  padding: 0 1rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 1.5px;
  background: var(--border-light);
  transition: background var(--transition);
  z-index: 0;
}

.step-item.completed:not(:last-child)::after {
  background: var(--primary);
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
  color: var(--text-muted);
}

.step-item.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.step-item.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-align: center;
  font-weight: 500;
}

.step-item.active .step-label { color: var(--primary); font-weight: 700; }
.step-item.completed .step-label { color: var(--success); }

/* ─── SERVICES GRID ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.service-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  user-select: none;
}

.service-card:hover {
  border-color: rgba(155,93,229,0.3);
  background: var(--surface2);
  transform: translateY(-1px);
}

.service-card.selected {
  border-color: var(--primary);
  background: var(--surface2);
  box-shadow: 0 0 0 3px rgba(155,93,229,0.18), 0 4px 18px rgba(155,93,229,0.12);
}

.service-card .service-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  display: block;
}

.service-card .service-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  display: block;
}

/* ─── SLOTS GRID ─── */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.slot-btn {
  padding: 0.7rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  user-select: none;
}

.slot-btn .slot-time {
  display: block;
  font-size: 0.95rem;
}

.slot-btn .slot-spots {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.slot-btn.available:hover {
  border-color: rgba(155,93,229,0.3);
  background: var(--surface2);
}

.slot-btn.selected {
  border-color: var(--primary);
  background: var(--surface2);
  box-shadow: 0 0 0 3px rgba(155,93,229,0.18);
}

.slot-btn.occupied {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: transparent;
  background: var(--surface2);
  text-decoration: line-through;
}

.slot-btn.low-spots .slot-spots { color: #f6c068; }

/* ─── TABLE ─── */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--surface2);
  border-bottom: 1px solid var(--border-light);
}

thead th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }

tbody td {
  padding: 0.8rem 1rem;
  color: var(--text);
  vertical-align: middle;
}

.table-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-success { background: rgba(22,101,52, 0.10); color: var(--success); border: 1px solid rgba(22,101,52,0.20); }
.badge-danger  { background: rgba(153,27,27, 0.10); color: var(--danger);  border: 1px solid rgba(153,27,27,0.20); }
.badge-warning { background: rgba(146,64,14, 0.10); color: var(--warning); border: 1px solid rgba(146,64,14,0.20); }
.badge-info    { background: rgba(30,64,175, 0.10); color: var(--info);    border: 1px solid rgba(30,64,175,0.20); }
.badge-primary { background: rgba(26,26,26, 0.07);  color: var(--primary); border: 1px solid var(--border-light); }
.badge-muted   { background: var(--surface2);        color: var(--text-muted); border: 1px solid var(--border-light); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.18s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.18s ease;
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  transition: all var(--transition);
  border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--text); background: var(--surface2); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ─── STAT CARDS (consolidated, dark v2) ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stats-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: rgba(155,93,229,0.3); }

/* Legacy emoji icon — hidden in consolidated style */
.stat-icon { display: none; }

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a0a0a0;
  margin: 0;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.stat-foot { display: flex; align-items: center; gap: 0.5rem; }

.stat-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.stat-delta.up   { color: #4ade80; background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.25); }
.stat-delta.down { color: #ef4444; background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.25); }

/* ─── TOAST BANNER (consolidated) ─── */
.toast-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.toast-banner .toast-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(155,93,229,0.14); color: #c084fc; flex-shrink: 0;
}
.toast-banner .toast-icon svg { width: 14px; height: 14px; }
.toast-banner .toast-text { flex: 1; font-size: 0.92rem; color: var(--text); font-weight: 500; }
.toast-banner .toast-text strong { color: #c084fc; font-weight: 700; }
.toast-banner .toast-empty { color: #a0a0a0; font-style: italic; }

/* ─── SECTION CARD (consolidated) ─── */
.section-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  transition: border-color var(--transition);
}
.section-card:hover { border-color: rgba(155,93,229,0.3); }
.section-card.is-flat:hover { border-color: rgba(255,255,255,0.06); }

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.section-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section-card-title svg {
  width: 18px; height: 18px; color: var(--primary); flex-shrink: 0;
}
.section-card-sub {
  font-size: 0.82rem;
  color: #a0a0a0;
  margin-top: 0.2rem;
}
.section-card-body { color: var(--text); }

/* ─── CHARTS ─── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.25rem;
  transition: border-color var(--transition);
}
.chart-card:hover { border-color: rgba(155,93,229,0.3); }

.chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #a0a0a0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.chart-container {
  position: relative;
  height: 220px;
}

.chart-container.tall { height: 280px; }

/* ─── CHART BARS (consolidated, CSS-only) ─── */
.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.55rem;
  align-items: end;
  height: 140px;
}
.chart-bars.cols-6 { grid-template-columns: repeat(6, 1fr); }
.chart-bar-col {
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  gap: 0.4rem; height: 100%;
}
.chart-bar {
  width: 100%; max-width: 32px;
  background: linear-gradient(180deg, #c084fc 0%, var(--primary) 60%, #7c3aed 100%);
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 0 10px rgba(155,93,229,0.25);
  transition: height 0.4s ease;
  min-height: 4px;
}
.chart-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: #a0a0a0;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .chart-bars { height: 110px; gap: 0.35rem; }
  .chart-bar { max-width: 28px; }
}

/* ─── ALERTS / MESSAGES ─── */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-success { background: rgba(22,101,52, 0.07); border-color: rgba(22,101,52,0.25); color: var(--success); }
.alert-danger  { background: rgba(153,27,27, 0.07); border-color: rgba(153,27,27,0.25); color: var(--danger); }
.alert-warning { background: rgba(146,64,14, 0.07); border-color: rgba(146,64,14,0.25); color: var(--warning); }
.alert-info    { background: rgba(30,64,175, 0.07); border-color: rgba(30,64,175,0.25); color: var(--info); }

/* ─── LOADING ─── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(0,0,0,0.12);
  border-top-color: #1A1A1A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 38px;
  height: 38px;
  border-width: 3.5px;
  border-color: rgba(26,26,26,0.10);
  border-top-color: var(--primary);
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--text-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── CONFIRMATION STEP ─── */
.confirmation-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(155,93,229,0.14);
  border: 2px solid rgba(155,93,229,0.4);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.5rem;
}
.confirmation-icon svg { width: 38px; height: 38px; }

.booking-code {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.summary-table {
  width: 100%;
  margin: 1.5rem 0;
}

.summary-table tr td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-light);
}

.summary-table tr td:first-child {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  width: 40%;
}

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

/* ─── FILTER BAR ─── */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  flex: 1;
  min-width: 140px;
}

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1px;
}

.tab-btn {
  padding: 0.65rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface2);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }

/* ─── SIDEBAR / DASHBOARD LAYOUT ─── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-nav {
  padding: 0.6rem 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: 0;
}

.sidebar-item:hover {
  color: var(--text);
  background: var(--surface2);
}

.sidebar-item.active {
  color: var(--primary);
  background: var(--surface2);
  border-right: 2px solid var(--primary);
  font-weight: 600;
}

.sidebar-item .nav-icon {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.main-content {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.content-area {
  padding: 1.5rem;
  flex: 1;
}

/* ─── LOGIN OVERLAY ─── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-badge {
  width: 60px;
  height: 60px;
  font-size: 1.3rem;
  margin: 0 auto 0.75rem;
}

/* ─── WHATSAPP TAB ─── */
.wa-instructions {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
}

.wa-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.wa-step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.wa-step-num {
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  flex-shrink: 0;
}

.code-block {
  background: var(--surface3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-all;
  margin-top: 0.5rem;
}

/* ─── SERVICES MANAGEMENT (dashboard) ─── */
.services-manage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.service-manage-card {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.service-manage-card.inactive {
  border-style: dashed;
  opacity: 0.7;
}

.service-manage-card .svc-name-input {
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  color: var(--text);
  width: 100%;
  outline: none;
}
.service-manage-card .svc-name-input:focus {
  border-color: var(--primary);
}

.service-manage-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ─── FOOTER LEGAL ─── */
.booking-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 1.25rem 0;
  margin-top: auto;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.booking-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  margin: 0 0.35rem;
}
.booking-footer a:hover { color: var(--text); opacity: 1; }

/* ─── LEGAL PAGES ─── */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.legal-page h1 {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.legal-page .legal-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.25rem;
}

.legal-page h2 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-page h3 {
  font-size: 0.95rem;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.legal-page p, .legal-page li {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page .highlight-box {
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.88rem;
}

/* ─── CONSENT CHECKBOX ─── */
.consent-block {
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.consent-label input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

/* ─── DEV PAGE ─── */
.dev-badge {
  display: inline-block;
  background: #1A1A1A;
  color: #00FF88;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.08em;
  margin-left: 0.5rem;
}

.code-output {
  background: #1A1A1A;
  color: #00FF88;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in  { animation: fadeIn  0.3s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }

/* ─── ORARI HINT — pulse sui bottoni "Imposta Orari" dopo goToStep('orari') ─── */
@keyframes orariPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(155,93,229,0.65);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(155,93,229,0);
    transform: scale(1.04);
  }
}
.orari-highlight {
  animation: orariPulse 0.9s ease-in-out infinite;
  border: 1px solid #9b5de5 !important;
  background: #2a1d3d !important;
  color: #e9d5ff !important;
  position: relative;
  z-index: 1;
}

/* ─── UTILITY ─── */
.hidden  { display: none !important; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.fw-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ─── MOBILE HAMBURGER ─── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ─── OVERLAY BACKDROP ─── */
.overlay-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 40;
}
.overlay-backdrop.active { display: block; }
.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.2s ease; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .stats-row,
  .stats-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.full-width { grid-column: 1; }
  .services-manage-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }

  .stats-row,
  .stats-row.cols-4 { grid-template-columns: repeat(2, 1fr); }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .form-input,
  .filter-bar .form-select,
  .filter-bar .btn {
    width: 100%;
    min-width: unset;
    margin-left: 0;
  }

  .modal { max-width: 100%; }
  .services-manage-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row,
  .stats-row.cols-4 { grid-template-columns: 1fr; }
  .chart-bars { height: 110px; gap: 0.35rem; }

  .steps-indicator { gap: 0; }
  .step-label { display: none; }

  .container { padding: 0 1rem; }
  .card-body { padding: 1rem; }
}
