/* RC Beauty Studio & Solarium: rosa e oro del listino, solarium nel suo grigio. */
:root {
  --bg: #fff5f4; --surface: #ffffff; --band: #f9b8b8; --ink: #4a3b3d; --soft: #7b6467;
  --gold: #8f6a1f; --gold-frame: #dab163; --line: #f3d3d1; --action: #7f5c17; --on-action: #ffffff;
  --sun: #6f6b6c; --on-sun: #ffffff; --sun-line: #c9c6c7; --tile: #fde0df; --ok: #2f7a55; --danger: #a8323a; --warn: #9a5b00;
  --display: "Italiana", Georgia, serif; --script: "Allura", "Brush Script MT", cursive; --body: "Poppins", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #241a1c; --surface: #31252a; --band: #4c2f36; --ink: #f7e9e6; --soft: #c9b2b3;
  --gold: #e8c47e; --gold-frame: #cfa758; --line: #4f3b40; --action: #e3be77; --on-action: #2b1f12;
  --sun: #4a4748; --on-sun: #f5f2f2; --sun-line: #7c7879; --tile: #43323a; --ok: #7fd0a6; --danger: #f19aa0; --warn: #f0c070;
  color-scheme: dark; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
[hidden] { display: none !important; }

.shell { max-width: 480px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; }
.shell > * { min-width: 0; }
.shell.wide { max-width: 760px; }

.head { background: var(--band); padding: 7px; }
.frame { border: 5px solid var(--gold-frame); padding: 16px 16px 14px; display: grid; gap: 10px; }
.brand { font-family: var(--display); font-size: 25px; line-height: 1.2; letter-spacing: .14em; color: var(--gold); margin: 0; text-wrap: balance; }
.hours { margin: 0; font-size: 13px; color: var(--ink); }
.note { font-size: 13px; color: var(--soft); margin: 0; }

.script { font-family: var(--script); font-weight: 400; font-size: 44px; line-height: 1; color: var(--gold); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; border-radius: 20px; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
.chip[aria-pressed="true"], .chip.on { background: var(--action); border-color: var(--action); color: var(--on-action); font-weight: 500; }

.list { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; text-align: left; padding: 12px 2px; background: none; border: 0; border-bottom: 1px solid var(--line); }
.row b { font-weight: 500; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; }
.row .price { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row small { color: var(--soft); font-size: 12.5px; }
.row small.go { color: var(--gold); text-align: right; font-weight: 500; }

.back { justify-self: start; min-height: 40px; background: none; border: 0; padding: 0; color: var(--gold); font-weight: 500; }
.summary { background: var(--surface); border: 1px solid var(--line); padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
.summary b { font-weight: 600; }
.summary span { color: var(--soft); font-size: 13px; }
.summary strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
h2.step { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.block { display: grid; gap: 10px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { flex: 0 0 62px; min-height: 72px; display: grid; place-content: center; text-align: center; background: var(--surface); border: 1px solid var(--line); padding: 4px; color: var(--ink); text-decoration: none; }
.day small { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); }
.day b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.day[aria-pressed="true"], .day.on { background: var(--action); border-color: var(--action); color: var(--on-action); }
.day[aria-pressed="true"] small, .day.on small { color: var(--on-action); }
.day:disabled, .day.off { background: transparent; opacity: .55; }
.day:disabled { cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.slot { min-height: 44px; background: var(--surface); border: 1px solid var(--gold-frame); font-weight: 500; font-variant-numeric: tabular-nums; }
.slot[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.slot:disabled { background: transparent; border-color: var(--line); color: var(--soft); text-decoration: line-through; cursor: not-allowed; }

.field { display: grid; gap: 4px; font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea { min-height: 46px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; font-weight: 400; width: 100%; }
.field textarea { padding: 10px 12px; min-height: 120px; line-height: 1.45; }
.field small { font-weight: 400; color: var(--soft); }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--action); }
.primary { min-height: 52px; width: 100%; background: var(--action); color: var(--on-action); border: 0; font-weight: 600; font-size: 16px; }
.primary:disabled { opacity: .6; cursor: progress; }
.btn { min-height: 44px; padding: 0 18px; background: var(--action); color: var(--on-action); border: 0; font-weight: 600; }
.quiet { min-height: 40px; padding: 0 12px; background: none; border: 1px solid var(--line); font-size: 13px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.quiet.warn { border-color: var(--danger); color: var(--danger); }
.err { color: var(--danger); font-size: 13.5px; margin: 0; }
.okbox { background: var(--surface); border: 1px solid var(--ok); padding: 16px; display: grid; gap: 4px; }
.okbox b { color: var(--ok); font-weight: 600; }
.flash { background: var(--surface); border: 1px solid var(--ok); color: var(--ok); padding: 10px 14px; margin: 0; }
.flash.bad { border-color: var(--danger); color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sun { background: var(--sun); color: var(--on-sun); padding: 16px; display: grid; gap: 14px; }
.sun .script { color: var(--on-sun); }
.promo { border: 2px solid var(--sun-line); padding: 10px 12px; font-weight: 600; text-transform: uppercase; font-size: 13.5px; letter-spacing: .03em; text-align: center; white-space: pre-line; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product { display: grid; gap: 2px; align-content: start; }
.photo { aspect-ratio: 1; max-width: 100%; width: 100%; background: var(--tile); display: grid; place-content: center; color: var(--gold); font-family: var(--display); font-size: 34px; margin-bottom: 4px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.sun .photo { background: rgba(255,255,255,.08); color: var(--on-sun); }
.product b { font-weight: 500; font-size: 14px; }
.product span { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.product p { margin: 2px 0 0; font-size: 12.5px; color: var(--soft); }
.sun .product p { color: var(--on-sun); opacity: .8; }

.appt { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; }
.appt.gone { opacity: .6; }
.appt .when { font-weight: 600; font-variant-numeric: tabular-nums; }
.appt .what, .appt .who, .appt .acts, .appt .msg { grid-column: 1 / -1; }
.appt .who { color: var(--soft); font-size: 13.5px; overflow-wrap: anywhere; }
.appt .msg { font-size: 12.5px; }
.appt .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.appt .acts form { display: contents; }
.tag { font-size: 11.5px; padding: 1px 8px; border: 1px solid var(--gold-frame); color: var(--gold); white-space: nowrap; }
.tag.bad { border-color: var(--danger); color: var(--danger); }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.wait { border-color: var(--warn); color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 10px; display: grid; }
.stat b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--soft); line-height: 1.3; }
.empty { color: var(--soft); margin: 0; padding: 14px 0; }
.closed { background: var(--tile); padding: 10px 12px; font-size: 14px; margin: 0; }
.contact { display: grid; gap: 2px; font-size: 14px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav div { max-width: 448px; margin-inline: auto; display: flex; }
.nav.wide div { max-width: 728px; }
.nav button, .nav a { flex: 1; min-height: 60px; background: none; border: 0; border-top: 3px solid transparent; font-size: 14px; font-weight: 500; color: var(--soft); display: grid; place-content: center; text-decoration: none; text-align: center; }
.nav [aria-current="page"] { color: var(--gold); border-top-color: var(--gold-frame); }

/* pannello */
.card { background: var(--surface); border: 1px solid var(--line); padding: 16px; display: grid; gap: 12px; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tablewrap { overflow-x: auto; }
table.edit { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.edit th { text-align: left; font-weight: 500; font-size: 12px; color: var(--soft); padding: 4px 6px; }
table.edit td { padding: 4px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
table.edit input[type=text], table.edit input[type=number], table.edit select { width: 100%; min-height: 38px; padding: 0 6px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
table.edit input.num { text-align: right; font-variant-numeric: tabular-nums; min-width: 64px; }
table.edit input.name { min-width: 150px; }
.group-title { margin: 8px 0 0; font-family: var(--script); font-weight: 400; font-size: 32px; line-height: 1; color: var(--gold); }
.pitem { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: start; border-top: 1px solid var(--line); padding-top: 12px; }
.pitem .photo { font-size: 24px; margin: 0; }
.pitem form { display: grid; gap: 8px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline .field { flex: 1 1 140px; }
.log { display: grid; gap: 8px; }
.log .appt { font-size: 13.5px; }
.login { max-width: 360px; margin: 10vh auto 0; }
@media (prefers-reduced-motion: no-preference) { .okbox, .flash { animation: pop .25s ease-out; } @keyframes pop { from { transform: translateY(4px); opacity: .6; } } }
.nav.wide a { font-size: 12.5px; padding-inline: 2px; }
