/* ============================================================
   BARBERIA LEVANTE — foglio di stile unico
   Mobile first: tutto è pensato prima per il telefono,
   poi adattato a tablet e desktop.
   ============================================================ */

/* ---------- 1. Variabili ---------- */
:root {
  --bg: #0b0b0d;
  --bg-elev: #141418;
  --surface: #17171c;
  --surface-2: #1f1f26;
  --line: #2c2c35;
  --line-soft: #232329;

  --text: #f4f2ee;
  --text-dim: #a6a29a;
  --text-faint: #6f6c66;

  --gold: #c9a961;
  --gold-bright: #e0c281;
  --gold-dim: #8a733c;
  --gold-glow: rgba(201, 169, 97, 0.16);

  --ok: #58b368;
  --ok-bg: rgba(88, 179, 104, 0.12);
  --warn: #e0a458;
  --err: #e0685f;
  --err-bg: rgba(224, 104, 95, 0.12);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);

  --font-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pad: 20px;
  --maxw: 620px;
  --nav-h: calc(64px + env(safe-area-inset-bottom));
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 3. Tipografia ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.4rem, 11vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
h3 { font-size: 1.15rem; letter-spacing: 0.04em; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.lead { color: var(--text-dim); font-size: 1.02rem; }
.muted { color: var(--text-dim); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* ---------- 4. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

main { padding-bottom: 24px; }

section { padding-block: 44px; }
section.tight { padding-block: 28px; }

.stack > * + * { margin-top: 14px; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  border: 0;
  margin-block: 4px;
}

/* Filo dorato decorativo sotto i titoli */
.rule {
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 14px;
  border-radius: 2px;
}
.center .rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- 5. Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: env(safe-area-inset-top);
}
.site-head .bar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.brand span { line-height: 1; padding-top: 3px; }
.head-call {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.head-call:active { background: var(--gold-glow); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 40px 0 44px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 420px;
  background: radial-gradient(ellipse at 50% 40%, var(--gold-glow), transparent 68%);
  pointer-events: none;
}
.hero-logo {
  position: relative;
  width: min(280px, 78%);
  margin: 0 auto 22px;
  border-radius: var(--r);
}
.hero h1 { position: relative; }
.hero .lead { position: relative; margin: 14px auto 0; max-width: 34ch; }

.status-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.status-pill.open { color: var(--ok); border-color: rgba(88, 179, 104, 0.4); background: var(--ok-bg); }
.status-pill.open .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(88, 179, 104, 0.18); }
.status-pill.closed { color: var(--text-dim); }

/* ---------- 7. Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
  text-align: center;
}
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  color: #17140c;
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.22);
}
.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.btn-ghost:active { background: var(--surface-2); }
.btn-wa { background: #25d366; color: #08320f; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 0.88rem; }

/* ---------- 8. Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 18px;
}
.card-gold { border-color: var(--gold-dim); box-shadow: 0 0 0 1px rgba(201, 169, 97, 0.08); }

/* Griglia scorciatoie in home */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.tile:active { transform: scale(0.98); border-color: var(--gold-dim); }
.tile .ico { color: var(--gold); }
.tile b { font-size: 0.98rem; }
.tile small { color: var(--text-dim); font-size: 0.8rem; line-height: 1.35; }

/* ---------- 9. Listino ---------- */
.price-list { display: grid; gap: 12px; }
.price-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  position: relative;
}
.price-row.popular { border-color: var(--gold-dim); background: linear-gradient(180deg, rgba(201, 169, 97, 0.06), var(--surface)); }
.price-row .info { flex: 1; min-width: 0; }
.price-row h3 { font-family: var(--font); font-size: 1rem; font-weight: 650; text-transform: none; letter-spacing: 0; line-height: 1.3; }
.price-row p { font-size: 0.85rem; color: var(--text-dim); margin-top: 4px; line-height: 1.45; }
.price-row .amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold);
  line-height: 1;
  padding-top: 2px;
  white-space: nowrap;
}
.price-row .amount.ask { font-family: var(--font); font-size: 0.82rem; font-weight: 600; text-align: right; max-width: 88px; white-space: normal; line-height: 1.3; }
.badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-glow);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  margin-bottom: 7px;
}
.dur {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 8px;
}

/* ---------- 10. Orari ---------- */
.hours { display: grid; gap: 2px; }
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.93rem;
}
.hours-row:nth-child(odd) { background: rgba(255, 255, 255, 0.022); }
.hours-row.today { background: var(--gold-glow); box-shadow: inset 0 0 0 1px rgba(201, 169, 97, 0.28); }
.hours-row .day { font-weight: 600; }
.hours-row.today .day { color: var(--gold-bright); }
.hours-row .time { color: var(--text-dim); text-align: right; font-variant-numeric: tabular-nums; }
.hours-row.today .time { color: var(--text); }
.hours-row .time.shut { color: var(--text-faint); }

/* ---------- 11. Barbieri ---------- */
.barbers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.barber-card { text-align: center; padding: 22px 14px; }
.avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
  background: var(--surface-2);
  border: 1px solid var(--gold-dim);
  padding-top: 4px;
}
/* con la foto l'iniziale sparisce: niente sfondo, niente spaziatura interna,
   l'immagine riempie tutto il cerchio e il bordo dorato le fa da cornice. */
.avatar-foto {
  padding: 0;
  overflow: hidden;
  background: var(--surface-2);
}
.avatar-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.barber-card .avatar-foto { width: 84px; height: 84px; }

.barber-card b { display: block; font-size: 1.05rem; }
.barber-card small { color: var(--text-dim); font-size: 0.8rem; }

/* ---------- 12. Prenotazione: passi ---------- */
.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.steps .st { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); transition: background 0.25s ease; }
.steps .st.done { background: var(--gold-dim); }
.steps .st.now { background: var(--gold); }

.step-head { margin-bottom: 18px; }
.step-head .num { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.step-head h2 { margin-top: 6px; }

.panel { display: none; animation: fade 0.25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Scelte (servizio / barbiere) */
.choices { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.choice:active { transform: scale(0.985); }
.choice[aria-pressed="true"] {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.1), var(--surface));
}
.choice .txt { flex: 1; min-width: 0; }
.choice .txt b { display: block; font-weight: 650; font-size: 1rem; }
.choice .txt small { color: var(--text-dim); font-size: 0.8rem; }
/* prezzo sopra, durata sotto: sono due span, senza questo finirebbero
   sulla stessa riga attaccati ("25€45 min") */
.choice .side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
  white-space: nowrap;
}
.choice .side .p { font-family: var(--font-display); font-size: 1.45rem; color: var(--gold); line-height: 1; }
.choice .side .d { font-size: 0.74rem; color: var(--text-faint); line-height: 1; }
.choice .mark {
  width: 24px; height: 24px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
  color: transparent;
  transition: all 0.15s ease;
}
.choice[aria-pressed="true"] .mark { border-color: var(--gold); background: var(--gold); color: #17140c; }

/* Selettore giorni scorrevole */
.days {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px var(--pad) 12px;
  margin-inline: calc(var(--pad) * -1);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day-btn {
  flex: none;
  width: 62px;
  padding: 11px 0 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  text-align: center;
  scroll-snap-align: center;
  transition: all 0.15s ease;
}
.day-btn .dw { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.day-btn .dn { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.1; margin-top: 3px; }
.day-btn .dm { font-size: 0.66rem; color: var(--text-faint); text-transform: uppercase; }
.day-btn[aria-pressed="true"] { border-color: var(--gold); background: linear-gradient(180deg, rgba(201, 169, 97, 0.14), var(--surface)); }
.day-btn[aria-pressed="true"] .dw, .day-btn[aria-pressed="true"] .dm { color: var(--gold); }
.day-btn:disabled { opacity: 0.3; }

/* Griglia orari */
.slot-group + .slot-group { margin-top: 22px; }
.slot-group h4 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.slot-group h4::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 9px; }
.slot {
  min-height: 48px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  transition: all 0.14s ease;
}
.slot:active { transform: scale(0.96); }
.slot[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #17140c; font-weight: 700; }
.slot:disabled { opacity: 0.28; text-decoration: line-through; pointer-events: none; }

/* Riepilogo persistente */
.recap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.chip b { color: var(--text); font-weight: 600; }

/* Form */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px; /* evita lo zoom automatico su iOS */
  transition: border-color 0.15s ease;
}
.input::placeholder { color: var(--text-faint); }
.input:focus { border-color: var(--gold); outline: none; }
textarea.input { min-height: 88px; resize: vertical; line-height: 1.5; }
.field.err .input { border-color: var(--err); }
.field .msg { display: none; color: var(--err); font-size: 0.78rem; margin-top: 6px; }
.field.err .msg { display: block; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--gold); margin-top: 1px; }

/* Riquadro totale */
.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.total .lbl { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim); }
.total .val { font-family: var(--font-display); font-size: 2rem; color: var(--gold); line-height: 1; }

/* Conferma */
.done-mark {
  width: 82px; height: 82px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok-bg);
  border: 2px solid var(--ok);
  color: var(--ok);
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.code-box {
  text-align: center;
  padding: 20px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px dashed var(--gold-dim);
  margin-block: 20px;
}
.code-box .lbl { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.code-box .code {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  line-height: 1.2;
  margin-top: 4px;
}

.summary-list { display: grid; gap: 1px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-soft); }
.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  font-size: 0.92rem;
}
.summary-list span:first-child { color: var(--text-dim); }
.summary-list span:last-child { font-weight: 600; text-align: right; }

/* Avvisi */
.notice {
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.notice.err { background: var(--err-bg); border-color: rgba(224, 104, 95, 0.35); color: #f0a9a3; }
.notice.warn { background: rgba(224, 164, 88, 0.1); border-color: rgba(224, 164, 88, 0.32); color: #e8c08a; }
.notice .ico { flex: none; margin-top: 1px; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty svg { margin: 0 auto 14px; opacity: 0.5; }

/* Caricamento */
.spinner {
  width: 26px; height: 26px;
  border: 2.5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: sk 1.3s infinite;
  border-radius: var(--r-sm);
  min-height: 48px;
}
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- 13. Barra azioni fissa ---------- */
.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(11, 11, 13, 0), rgba(11, 11, 13, 0.94) 26%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.actionbar .inner { max-width: var(--maxw); margin-inline: auto; display: flex; gap: 10px; }
.actionbar .btn { flex: 1; }
.actionbar .btn.back { flex: 0 0 54px; padding: 0; }

/* ---------- 14. Navigazione in basso ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(15, 15, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  transition: color 0.15s ease;
  padding-top: 4px;
}
.tabbar a.on { color: var(--gold); }
.tabbar a.on svg { filter: drop-shadow(0 0 8px var(--gold-glow)); }
.tabbar a:active { color: var(--gold-bright); }

/* ---------- 15. Footer ---------- */
.site-foot {
  /* lo spazio in fondo tiene il contenuto sopra la barra di navigazione fissa */
  padding: 34px 0 calc(26px + var(--nav-h));
  border-top: 1px solid var(--line-soft);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}
.site-foot .socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.site-foot .socials a {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
}
.site-foot .socials a:active { border-color: var(--gold); color: var(--gold); }
.site-foot .admin-link { color: var(--text-faint); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 16. Area gestione ---------- */
.admin-shell { max-width: 900px; }
.login-wrap { min-height: 78dvh; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 380px; }

.adm-toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.seg {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
}
.seg button {
  padding: 8px 15px;
  border-radius: var(--r-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--gold); color: #17140c; }

.appt {
  display: flex;
  gap: 14px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  align-items: flex-start;
}
.appt.blocked { border-left-color: var(--text-faint); opacity: 0.75; }
.appt.past { opacity: 0.5; }
.appt .when {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1.1;
  min-width: 58px;
  font-variant-numeric: tabular-nums;
}
.appt .body { flex: 1; min-width: 0; }
.appt .body b { display: block; font-size: 1rem; }
.appt .body .meta { font-size: 0.83rem; color: var(--text-dim); margin-top: 2px; }
.appt .body .note { font-size: 0.82rem; color: var(--warn); margin-top: 6px; font-style: italic; }
.appt .acts { display: flex; flex-direction: column; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-dim);
}
.icon-btn:active { background: var(--bg-elev); }
.icon-btn.danger:active { border-color: var(--err); color: var(--err); }

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-left: 8px;
  vertical-align: middle;
}
.tag.cat { background: rgba(120, 160, 220, 0.16); color: #9dbdea; }
.tag.aur { background: rgba(201, 169, 97, 0.16); color: var(--gold); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.off { background: var(--err-bg); color: #e89a94; }

/* appuntamento annullato dal cliente: resta visibile ma spento */
.appt.cancelled { border-left-color: var(--err); opacity: 0.6; }
.appt.cancelled .when, .appt.cancelled .body b { text-decoration: line-through; }
.appt.cancelled .body b .tag { text-decoration: none; }

/* Finestra modale */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal .sheet {
  width: 100%;
  max-width: var(--maxw);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px var(--pad) calc(24px + env(safe-area-inset-bottom));
  max-height: 88dvh;
  overflow-y: auto;
  animation: up 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.modal .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 18px; }

/* Messaggio a comparsa */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px);
  transform: translate(-50%, 20px);
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
.toast.err { border-color: var(--err); color: #f0a9a3; }

/* Striscia modalità demo */
.demo-bar {
  background: rgba(224, 164, 88, 0.12);
  border-bottom: 1px solid rgba(224, 164, 88, 0.3);
  color: #e8c08a;
  font-size: 0.76rem;
  text-align: center;
  padding: 7px 16px;
  line-height: 1.4;
}

/* ---------- 17. Schermi grandi ---------- */
@media (min-width: 700px) {
  :root { --pad: 32px; --maxw: 760px; }
  section { padding-block: 62px; }
  .hero { padding: 60px 0 56px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tabbar { display: none; }
  .site-foot { padding-bottom: 26px; }
  .actionbar { position: sticky; background: none; backdrop-filter: none; padding-bottom: 16px; }
  .actionbar::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent, var(--bg) 40%);
    z-index: -1;
  }
  .toast { bottom: 28px; }
  .modal { align-items: center; }
  .modal .sheet { border-radius: var(--r-lg); border-bottom: 1px solid var(--line); margin: 20px; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .desk-nav { display: flex !important; }
}

/* Navigazione in alto solo da tablet in su */
.desk-nav { display: none; gap: 22px; align-items: center; font-size: 0.88rem; font-weight: 600; }
.desk-nav a { color: var(--text-dim); }
.desk-nav a.on, .desk-nav a:hover { color: var(--gold); }

@media (hover: hover) {
  .btn-gold:hover { filter: brightness(1.07); }
  .btn-ghost:hover { border-color: var(--gold-dim); }
  .tile:hover { border-color: var(--gold-dim); }
  .choice:hover { border-color: var(--gold-dim); }
  .slot:not(:disabled):hover { border-color: var(--gold); }
  .day-btn:not(:disabled):hover { border-color: var(--gold-dim); }
  .icon-btn:hover { color: var(--text); border-color: var(--gold-dim); }
}

/* Accesso all'area riservata: discreto ma trovabile */
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
}
.admin-pill:active { border-color: var(--gold-dim); color: var(--gold); }
@media (hover: hover) {
  .admin-pill:hover { border-color: var(--gold-dim); color: var(--gold); }
}

/* ---------- Riepilogo settimanale ---------- */
.barra {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.barra span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 4px;
  transition: width 0.4s ease;
}
.buchi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.buchi span {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: var(--r-pill);
  padding: 3px 9px;
}

/* ---------- Turni di lavoro ---------- */
.turno {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
}
.turno.vigente { border-color: var(--gold-dim); }
.turno-orari { margin-top: 10px; display: grid; gap: 2px; }
.turno-riga {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.turno-riga span:first-child { color: var(--text-dim); min-width: 34px; }
.turno-riga.off span:last-child { color: var(--text-faint); }

.giorno-riga {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.giorno-nome { font-weight: 600; font-size: 0.9rem; }
.giorno-fasce { display: flex; align-items: center; gap: 8px; }
.giorno-fasce .input { min-height: 44px; padding: 8px 10px; font-size: 0.95rem; }
.giorno-fasce span { color: var(--text-faint); }

@media (min-width: 560px) {
  .giorno-riga { grid-template-columns: 90px 1fr 1fr; align-items: center; }
}

/* Ultimo riquadro della striscia: apre il calendario per saltare a una data */
.day-btn.pick {
  width: 68px;
  border-style: dashed;
  color: var(--gold);
}
.day-btn.pick .dw, .day-btn.pick .dm { color: var(--gold); }
.day-btn.pick .dn { display: grid; place-items: center; margin: 4px 0 2px; }
