/* BeautyApp — stile boutique. Tutti i colori dalle CSS custom properties del tenant. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body, sans-serif);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}
.page { max-width: 480px; margin: 0 auto; padding: 18px 18px 40px; }
a { color: inherit; text-decoration: none; }
b { font-weight: 500; }
.muted { color: var(--c-brand-deep); font-size: 14px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* --- Firma: arco --- */
.arch-card {
  border-radius: 999px 999px 16px 16px;
  background: linear-gradient(175deg, var(--c-brand-soft), #fff 70%);
  border: 1px solid var(--c-border);
  box-shadow: 0 24px 50px color-mix(in srgb, var(--c-ink) 12%, transparent);
}

/* --- Hero home --- */
.hero { padding: 52px 24px 30px; text-align: center; margin-top: 8px; }
.hero-logo { width: 200px; max-width: 70%; display: block; margin: 0 auto; }
.hero-name-fallback {
  font-family: var(--font-heading); font-size: 34px; font-weight: 500;
  color: var(--c-ink); line-height: 1.1;
}
.hero-tagline {
  letter-spacing: .34em; text-transform: uppercase; font-size: 11px;
  color: var(--c-brand-deep); margin-top: 12px; padding-left: .34em;
}
.hero-script {
  font-family: var(--font-accent); font-size: 34px;
  color: var(--c-brand-deep); margin-top: 14px;
}
.welcome-text { text-align: center; margin: 22px 6px 6px; font-size: 15px; }

/* --- Azioni home --- */
.actions { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; }
.action-btn {
  display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto;
  align-items: center; column-gap: 4px;
  background: #fff; border: 1px solid var(--c-border); border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c-ink) 8%, transparent);
  transition: transform .12s ease;
}
.action-btn:active { transform: scale(.98); }
.action-icon {
  grid-row: span 2; font-size: 22px; color: var(--c-brand-deep);
  width: 42px; height: 42px; border-radius: 999px 999px 8px 8px;
  background: var(--c-brand-soft); display: flex; align-items: center; justify-content: center;
}
.action-label { font-family: var(--font-heading); font-size: 21px; font-weight: 500; }
.action-sub { font-size: 13px; color: var(--c-brand-deep); grid-column: 2; }

/* --- Card generiche --- */
.card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 18px;
  padding: 20px; margin: 16px 0;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c-ink) 7%, transparent);
}
.soft-card { background: var(--c-brand-soft); }
.card-title {
  font-family: var(--font-heading); font-size: 22px; font-weight: 500;
  margin-bottom: 10px; color: var(--c-ink);
}
.hours-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours-table td { padding: 5px 0; border-bottom: 1px dashed var(--c-border); }
.hours-table tr:last-child td { border-bottom: 0; }
.hours-val { text-align: right; color: var(--c-brand-deep); }

/* --- Footer --- */
.foot {
  background: var(--c-ink-dark); color: var(--c-brand-light);
  border-radius: 18px; text-align: center; padding: 26px 18px; margin-top: 26px;
}
.foot-name { font-family: var(--font-heading); font-size: 20px; color: var(--c-bg); }
.foot-line { font-size: 13px; margin-top: 4px; }

/* --- Topbar pagine interne --- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; }
.back-link {
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--c-brand-deep); line-height: 1;
}
.topbar-title { font-family: var(--font-heading); font-size: 26px; font-weight: 500; }

/* --- Progress dots --- */
.progress { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.progress .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-border); transition: background .2s;
}
.progress .dot.active { background: var(--c-brand-deep); }

/* --- Wizard prenotazione --- */
.step-title {
  font-family: var(--font-heading); font-size: 24px; font-weight: 500;
  margin: 4px 0 14px; text-align: center;
}
.chip-list { display: flex; flex-direction: column; gap: 10px; }
.chip {
  background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
  padding: 15px 18px; font-size: 16px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c-ink) 6%, transparent);
}
.chip:active { background: var(--c-brand-soft); }
.chip .arrow { color: var(--c-brand); font-size: 18px; }
.svc-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
  padding: 14px 18px; cursor: pointer; margin-bottom: 10px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c-ink) 6%, transparent);
}
.svc-card:active { background: var(--c-brand-soft); }
.svc-name { font-weight: 400; font-size: 16px; }
.svc-note { font-size: 12.5px; color: var(--c-brand-deep); margin-top: 2px; }
.svc-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; }
.svc-dur { color: var(--c-brand-deep); }
.svc-price { font-weight: 500; color: var(--c-ink); }

/* --- Calendario --- */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-month { font-family: var(--font-heading); font-size: 20px; font-weight: 500; text-transform: capitalize; }
.cal-nav {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--c-border);
  background: #fff; font-size: 18px; color: var(--c-brand-deep); cursor: pointer;
}
.cal-nav:disabled { opacity: .3; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--c-brand-deep); text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--c-border);
  background: #fff; font-size: 15px; font-family: var(--font-body); font-weight: 300;
  color: var(--c-ink); cursor: pointer; position: relative;
}
.cal-day:disabled { opacity: .32; cursor: default; background: transparent; }
.cal-day.satreq { background: var(--c-brand-soft); border-style: dashed; }
.cal-day.selected { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--c-brand-deep); }
.cal-legend .lg { display: flex; align-items: center; gap: 5px; }
.cal-legend .sq { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--c-border); }
.cal-legend .sq.satreq { background: var(--c-brand-soft); border-style: dashed; }

/* --- Slot orari --- */
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot-btn {
  padding: 12px 0; border-radius: 999px; border: 1px solid var(--c-border);
  background: #fff; font-size: 15px; font-family: var(--font-body); cursor: pointer;
  color: var(--c-ink);
}
.slot-btn.selected, .slot-btn:active { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.slot-period { margin: 14px 0 8px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--c-brand-deep); }

/* --- Form --- */
.input {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--c-border); background: #fff;
  font-family: var(--font-body); font-size: 16px; color: var(--c-ink);
  margin: 6px 0 12px; outline: none;
}
.input:focus { border-color: var(--c-brand-deep); }
label.flabel { font-size: 13px; color: var(--c-brand-deep); letter-spacing: .06em; }
.btn-primary {
  width: 100%; padding: 15px; border: 0; border-radius: 999px;
  background: var(--c-brand-deep); color: #fff; font-family: var(--font-body);
  font-size: 16px; letter-spacing: .06em; cursor: pointer; margin-top: 8px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--c-brand-deep) 40%, transparent);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; }
.btn-ghost {
  width: 100%; padding: 14px; border-radius: 999px; margin-top: 10px;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-ink);
  font-family: var(--font-body); font-size: 15px; cursor: pointer; display: block; text-align: center;
}
.error { color: #a33; font-size: 14px; margin-top: 8px; }

/* --- Riepilogo --- */
.summary-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--c-border); font-size: 15px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row .k { color: var(--c-brand-deep); }
.policy-card { background: var(--c-brand-soft); border-style: dashed; }

/* --- Conferma --- */
.confirm-hero { text-align: center; padding: 44px 20px 30px; margin-top: 10px; }
.confirm-check {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--c-brand-deep); color: #fff; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
}
.confirm-title { font-family: var(--font-heading); font-size: 28px; font-weight: 500; }
.confirm-script { font-family: var(--font-accent); font-size: 30px; color: var(--c-brand-deep); margin-top: 6px; }

/* --- Tessera fedeltà --- */
.loyalty-card { padding: 46px 26px 26px; text-align: center; margin-top: 10px; }
.loyalty-logo { width: 130px; max-width: 55%; margin: 0 auto 8px; display: block; }
.loyalty-name { font-family: var(--font-heading); font-size: 22px; font-weight: 500; margin-bottom: 16px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 300px; margin: 0 auto; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--c-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; background: transparent;
}
.stamp.filled { background: var(--c-brand); border-style: solid; }
.loyalty-reward { margin-top: 18px; font-size: 15px; color: var(--c-ink); }
.loyalty-note { font-size: 13px; color: var(--c-brand-deep); margin-top: 4px; }

/* --- Header saluto (home) --- */
.greet-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px 16px; }
.greet-kick { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--c-brand-deep); }
.greet-name { font-family: var(--font-heading); font-size: 32px; font-weight: 500; line-height: 1.15; }
.greet-avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: 0 0 52px;
  background: #fff; border: 1px solid var(--c-border);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c-ink) 10%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.greet-avatar img { width: 82%; height: 82%; object-fit: contain; }
.greet-avatar { cursor: pointer; transition: transform .12s ease; text-decoration: none; }
.greet-avatar:active { transform: scale(.94); }
.greet-avatar-ph { font-size: 24px; }

/* --- Pagina profilo --- */
.profile-head { padding: 32px 24px 24px; text-align: center; margin-bottom: 4px; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px;
  background: #fff; border: 1px solid var(--c-border); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c-ink) 12%, transparent); }
.profile-avatar img { width: 82%; height: 82%; object-fit: contain; }
.profile-name { font-family: var(--font-heading); font-size: 26px; font-weight: 500; }
.profile-phone { font-size: 14px; color: var(--c-brand-deep); margin-top: 2px; }
.loyalty-mini { display: block; }
.loyalty-mini-head { display: flex; justify-content: space-between; align-items: baseline; }
.loyalty-mini-count { font-family: var(--font-heading); font-size: 20px; font-weight: 600; color: var(--c-ink); }
.stamps-mini { grid-template-columns: repeat(10, 1fr); gap: 7px; max-width: 100%; margin-top: 12px; }
.stamps-mini .stamp { font-size: 13px; border-width: 1.2px; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.profile-actions .btn-ghost { margin: 0; }
.profile-reset { color: var(--c-brand-deep); border-style: dashed; }

/* --- Anello fedeltà --- */
.ring-card { padding: 34px 26px 24px; text-align: center; }
.ring-wrap { position: relative; width: 148px; height: 148px; margin: 0 auto; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--c-brand-light); stroke-width: 5; opacity: .5; }
.ring-val { fill: none; stroke: var(--c-brand-deep); stroke-width: 5; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.4, 0, .2, 1); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.ring-label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--c-brand-deep); }
.ring-num { font-family: var(--font-heading); font-size: 44px; font-weight: 500;
  line-height: 1.05; color: var(--c-ink); }
.ring-sub { font-size: 12px; color: var(--c-brand-deep); }
.ring-text { margin-top: 14px; font-size: 14px; color: var(--c-ink); }

/* --- Sezioni + carosello orizzontale --- */
.sect-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 12px; }
.sect-title { font-family: var(--font-heading); font-size: 22px; font-weight: 500; }
.sect-link { font-size: 13px; color: var(--c-brand-deep); letter-spacing: .04em; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px;
  margin: 0 -18px; padding-left: 18px; padding-right: 18px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.feat-card { flex: 0 0 158px; scroll-snap-align: start; background: #fff;
  border: 1px solid var(--c-border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--c-ink) 8%, transparent); }
.feat-img { height: 140px; background-size: cover; background-position: center; }
.feat-img-ph { background: linear-gradient(160deg, var(--c-brand-light), var(--c-brand-soft)); }
.feat-body { padding: 10px 13px 13px; }
.feat-name { font-family: var(--font-heading); font-size: 16.5px; font-weight: 500; line-height: 1.2; }
.feat-sub { font-size: 12px; color: var(--c-brand-deep); margin-top: 3px; }

/* --- Prossimi appuntamenti --- */
.up-item { display: flex; gap: 13px; align-items: center; background: #fff;
  border: 1px solid var(--c-border); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c-ink) 6%, transparent); }
.up-date { width: 50px; height: 54px; flex: 0 0 50px; border-radius: 12px;
  background: var(--c-brand-soft); display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.up-mon { font-size: 10px; letter-spacing: .18em; color: var(--c-brand-deep); }
.up-day { font-family: var(--font-heading); font-size: 22px; font-weight: 600; color: var(--c-ink); line-height: 1; }
.up-svc { font-size: 15px; font-weight: 400; }
.up-meta { font-size: 12.5px; color: var(--c-brand-deep); margin-top: 2px; }
.up-st.up-confermato { color: #2c7a3a; }

/* --- Tab bar: pillola/ellisse fluttuante --- */
.has-tabbar { padding-bottom: 104px; }
.tabbar { position: fixed; left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  max-width: 420px; margin: 0 auto;
  background: color-mix(in srgb, #fff 88%, var(--c-brand-soft));
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 9px 12px;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--c-ink) 20%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; letter-spacing: .05em; color: var(--c-brand-deep); min-width: 56px; }
.tab-ico { font-size: 18px; line-height: 1; width: 38px; height: 38px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease; }
.tab.on { color: var(--c-ink); font-weight: 400; }
.tab.on .tab-ico { background: var(--c-brand); color: #fff; }

/* --- Griglia gruppi (wizard step 1) --- */
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.group-card { background: #fff; border: 1px solid var(--c-border); border-radius: 18px;
  overflow: hidden; cursor: pointer;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--c-ink) 8%, transparent);
  transition: transform .12s ease; }
.group-card:active { transform: scale(.97); }
.group-img { height: 110px; background-size: cover; background-position: center; }
.group-body { padding: 10px 13px 12px; text-align: center; }
.group-name { font-family: var(--font-heading); font-size: 18px; font-weight: 500; line-height: 1.15; }
.group-sub { font-size: 12px; color: var(--c-brand-deep); margin-top: 2px; }

/* --- Hero categoria (wizard step 2) --- */
.cat-hero { height: 148px; border-radius: 18px; margin-bottom: 16px;
  background-size: cover; background-position: center; position: relative; overflow: hidden;
  box-shadow: 0 16px 36px color-mix(in srgb, var(--c-ink) 14%, transparent); }
.cat-hero::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--c-ink-dark) 72%, transparent)); }
.cat-hero-title { position: absolute; bottom: 12px; left: 0; right: 0; z-index: 1;
  text-align: center; color: #fff; font-family: var(--font-heading);
  font-size: 24px; font-weight: 500; }

/* --- Stat tiles (tessera) --- */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.stat-tile { background: #fff; border: 1px solid var(--c-border); border-radius: 16px;
  padding: 16px 18px; box-shadow: 0 8px 22px color-mix(in srgb, var(--c-ink) 6%, transparent); }
.stat-num { font-family: var(--font-heading); font-size: 30px; font-weight: 500; line-height: 1.1; }
.stat-lbl { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-brand-deep); }

/* --- Buono regalo --- */
.gift-banner { display: flex; gap: 14px; align-items: center; margin: 18px 0;
  background: linear-gradient(135deg, var(--c-brand-soft), #fff 80%);
  border: 1px dashed var(--c-brand); border-radius: 18px; padding: 15px 18px;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--c-ink) 7%, transparent); }
.gift-banner-ico { font-size: 26px; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 12px; }
.amount-btn { padding: 13px 0; border-radius: 999px; border: 1px solid var(--c-border);
  background: #fff; font-family: var(--font-body); font-size: 15px; color: var(--c-ink); cursor: pointer; }
.amount-btn.selected { background: var(--c-brand-deep); color: #fff; border-color: var(--c-brand-deep); }
.gift-card { padding: 52px 26px 30px; text-align: center; margin-top: 14px;
  background: linear-gradient(175deg, var(--c-brand-soft), #fff 60%); }
.gift-logo { width: 150px; max-width: 60%; margin: 0 auto; display: block; }
.gift-salon { font-family: var(--font-heading); font-size: 26px; font-weight: 500; }
.gift-script { font-family: var(--font-accent); font-size: 36px; color: var(--c-brand-deep); margin-top: 10px; }
.gift-amount { font-family: var(--font-heading); font-size: 44px; font-weight: 500;
  color: var(--c-ink); margin-top: 8px; }
.gift-to { margin-top: 8px; font-size: 16px; }
.gift-msg { font-family: var(--font-heading); font-style: italic; font-size: 17px;
  color: var(--c-brand-deep); margin-top: 8px; }
.gift-code-label { margin-top: 20px; font-size: 10px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--c-brand-deep); }
.gift-code { font-family: var(--font-heading); font-size: 27px; letter-spacing: .14em;
  font-weight: 600; color: var(--c-ink); background: #fff; border: 1px dashed var(--c-brand);
  border-radius: 12px; padding: 8px 14px; display: inline-block; margin-top: 6px; }
.gift-valid { margin-top: 14px; font-size: 12.5px; color: var(--c-brand-deep); }
.gift-used { margin-top: 14px; font-size: 14px; color: #2c7a3a; font-weight: 500; }
.gift-from { margin-top: 16px; font-family: var(--font-accent); font-size: 24px; color: var(--c-brand-deep); }

/* --- Contatti --- */
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--c-border); border-radius: 16px;
  padding: 15px 18px; font-size: 15px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c-ink) 6%, transparent);
}
.contact-ico {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 999px 999px 8px 8px;
  background: var(--c-brand-soft); color: var(--c-brand-deep);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
