/* Stile dell'area clienti: leggero e minimal.
   Il colore principale è in --accent: per dare a ogni salone i propri colori basta
   cambiare queste variabili (es. dalla pagina del salone). */
:root {
  --bg: #fdf8f5;
  --surface: rgba(255, 255, 255, 0.92);
  --card: #ffffff;
  --card2: #fcf0f3;
  --line: #f0dde2;
  --text: #3e2c33;
  --muted: #9a858c;
  --accent: #c46a86;
  --accent-ink: #ffffff;
  --ok: #3f9d6b;
  --bad: #c94a5f;
  --radius: 14px;
}
* { box-sizing: border-box; }
/* il browser disegna in scuro anche i menu nativi (es. la lista delle città) */
:root { color-scheme: light; }
select option, select optgroup { background: #ffffff; color: var(--text); }
html, body { margin: 0; background-color: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; }
/* sfondo chiaro con l'illustrazione in basso */
body { min-height: 100vh; -webkit-font-smoothing: antialiased;
  background-image: url("/bg.svg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
  background-attachment: fixed; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* barra in alto con i tre puntini */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 14px; background: rgba(253,248,245,.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.dots { background: none; border: 0; color: var(--text); font-size: 22px; line-height: 1;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer; letter-spacing: 1px; }
.dots:hover { background: var(--surface); }
.topbar .title { font-size: 14px; color: var(--muted); letter-spacing: .4px; }
.topbar .title b { color: var(--text); font-weight: 600; }

/* menu a tendina in alto a sinistra */
.dropdown { position: fixed; top: 56px; left: 12px; width: 250px; z-index: 30; background: #ffffff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px;
  box-shadow: 0 16px 40px rgba(160,90,115,.18); }
.dropdown button { display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); padding: 11px 12px; border-radius: 10px; font: inherit; cursor: pointer; }
.dropdown button:hover { background: var(--card2); }
.dropdown .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dropdown .who { padding: 10px 12px 6px; color: var(--muted); font-size: 13px; }

/* finestra centrale per le sezioni del menu */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(120,70,90,.28); display: flex;
  align-items: flex-start; justify-content: center; padding: 60px 14px 14px; }
.modal-card { width: 100%; max-width: 520px; max-height: calc(100vh - 80px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; position: relative; }
.modal-card h3 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.modal-x { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 6px; }

main { max-width: 560px; margin: 0 auto; padding: 18px 16px 60px; }

/* pulsanti e campi */
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px;
  padding: 12px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-block; text-align: center; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 6px; }
input, select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 13px; font: inherit; font-size: 15px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.stack { display: grid; gap: 10px; }
.lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg { min-height: 18px; color: var(--bad); font-size: 13px; margin: 8px 0 0; }
.msg.ok { color: var(--ok); }
.empty { color: var(--muted); padding: 16px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); font-size: 14px; }
.seg { display: flex; gap: 6px; margin-bottom: 14px; }
.seg button { flex: 1; background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 9px; border-radius: 10px; font: inherit; cursor: pointer; }
.seg button.active { color: var(--text); border-color: var(--accent); }

/* card semplici */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.row { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.row > * { min-width: 0; }
@media (min-width: 520px) { .row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

/* pagina del salone / prenotazione */
.salon-head { padding: 6px 2px 16px; }
.salon-head .sname { font-size: 22px; font-weight: 600; letter-spacing: -.2px; }
.salon-head .saddr { color: var(--muted); font-size: 13px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 10px; }
.chip { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { color: var(--text); border-color: var(--accent); }
/* giorni: una striscia da far scorrere con il dito, con i giorni che si agganciano uno per volta */
.days { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 76px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 4px; text-align: center; color: var(--text); cursor: pointer; font: inherit; }
.day.full { opacity: .55; }
/* operatori: una scheda per ciascuno, con la foto */
.staffs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.staffs::-webkit-scrollbar { display: none; }
.staff-card { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; color: var(--text);
  font: inherit; cursor: pointer; }
.staff-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.staff-card .staff-name { font-size: 14px; font-weight: 600; text-align: center; }
.staff-card .small { font-size: 11px; text-align: center; }
.avatar { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #2a2a31; color: var(--accent); font-weight: 600; font-size: 18px; border: 1px solid var(--line); }
.avatar.photo { background-size: cover; background-position: center; background-color: #2a2a31; }
.avatar.any { background: linear-gradient(135deg, #3a3024, #1e1e24); font-size: 22px; }
.day .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.day .num { font-size: 19px; font-weight: 600; margin: 2px 0; }
.day .free { font-size: 11px; color: var(--ok); }
.day.full .free { color: var(--bad); }
.day:disabled { opacity: .35; cursor: not-allowed; }
.day.on { border-color: var(--accent); }
.day.on .dow, .day.on .free { color: var(--text); }
.slots { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); margin-top: 10px; }
.slot { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 11px 6px;
  border-radius: 11px; font: inherit; font-weight: 500; cursor: pointer; }
.slot:hover { border-color: var(--accent); }
.slot:disabled { opacity: .4; }
.section-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 22px 0 8px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(160,90,115,.18); }
.toast.err { border-color: var(--bad); }

/* fedeltà */
.loy { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dots-row { display: flex; gap: 8px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--accent); }
.dot.on { background: var(--accent); }
.qr { width: 200px; max-width: 80%; background: #fff; border-radius: 12px; padding: 8px; display: block; margin: 12px auto; }
.reward { margin-top: 12px; text-align: center; }

/* promemoria */
.reminder { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid #cfe9d8;
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }

/* scanner */
video { width: 100%; border-radius: 12px; background: #000; max-height: 340px; }

/* prenotazione: la tua prenotazione in alto, conferma con banner, orario già prenotato */
.mybook-card { background: var(--surface); border: 1px solid var(--accent); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 18px; }
.mybook-title { font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.slot.mine { border-color: var(--accent); color: var(--accent); font-weight: 600; background: transparent; }
.slot.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day.mine .free { color: var(--accent); }
.confirm-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  width: min(92vw, 460px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; background: var(--surface); border: 1px solid var(--accent); border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.confirm-bar .cb-btns { display: flex; gap: 8px; }

/* niente scorrimento laterale: tutto si adatta alla larghezza dello schermo */
html, body { overflow-x: hidden; max-width: 100%; }
img, video, svg { max-width: 100%; }
.dropdown { max-width: calc(100vw - 24px); }
input, select { min-width: 0; max-width: 100%; }
