/* Prenota Med — la linea a pavimento */
@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/archivo-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --floor: #edefea;
    --floor-deep: #e1e5de;
    --panel: #fbfbf8;
    --ink: #17201c;
    --ink-2: #47534d;
    --ink-3: #5c6761;
    --rule: #cfd5cd;
    --tape: #c6ccc3;
    --green: #1f9d6b;
    --green-ink: #0e6a46;
    --green-wash: #dcefe5;
    --blue: #2c6cc9;
    --blue-ink: #1d539f;
    --blue-wash: #dfe9f7;
    --yellow: #f2c230;
    --yellow-ink: #6f5300;
    --yellow-wash: #fbf0cc;
    --red: #c2412d;
    --red-ink: #9e2f1e;
    --red-wash: #f8e2dc;
    --route: var(--green);
    --route-ink: var(--green-ink);
    --route-wash: var(--green-wash);
    --radius: 6px;
    --radius-chip: 12px;
    --shadow: 0 1px 2px rgb(23 32 28 / .06), 0 8px 24px -12px rgb(23 32 28 / .18);
    --ease: cubic-bezier(.16, 1, .3, 1);
    font-family: "Archivo", system-ui, sans-serif;
    font-size: 112.5%;
    line-height: 1.5;
    color: var(--ink);
    background: var(--floor);
    font-variant-numeric: tabular-nums;
    -webkit-text-size-adjust: 100%;
}
.role-studio, .role-medico { --route: var(--blue); --route-ink: var(--blue-ink); --route-wash: var(--blue-wash); }

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
::selection { background: var(--route); color: #fff; }
html { scrollbar-color: var(--tape) var(--floor); accent-color: var(--route-ink); }
a { color: var(--route-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); font-weight: 720; }
h2 { font-size: 1.35rem; font-weight: 680; }
h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0; }
.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip:focus { top: .5rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Demo profile strip */
.demo-strip { background: var(--ink); color: #dfe5e0; font-size: .8rem; }
.demo-strip .wrap { display: flex; align-items: center; gap: .75rem; overflow-x: auto; scrollbar-width: none; }
.demo-label { white-space: nowrap; color: #a9b4ad; }
.demo-strip nav { display: flex; gap: .15rem; }
.demo-strip a { color: inherit; text-decoration: none; white-space: nowrap; padding: .55rem .6rem; display: block; }
.demo-strip a[aria-current] { color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }

/* App bar: the ward sign */
.app-bar { background: var(--panel); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.app-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 2.2rem; height: 2.2rem; color: var(--route); }
.brand strong { display: block; font-size: 1.15rem; font-weight: 760; letter-spacing: -.02em; }
.brand small { display: block; font-size: .8rem; color: var(--ink-3); }
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { position: relative; display: flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .85rem; color: var(--ink-2); text-decoration: none; font-weight: 560; white-space: nowrap; border-radius: var(--radius); }
.tabs a:hover { background: var(--floor); color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); }
.tabs a[aria-current]::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -.62rem; height: 5px; border-radius: 5px 5px 0 0; background: var(--route); }
.badge { min-width: 1.45rem; height: 1.45rem; padding-inline: .35rem; border-radius: 1rem; background: var(--yellow); color: var(--ink); font-size: .78rem; font-weight: 760; display: inline-grid; place-items: center; }

main { flex: 1; padding-block: 1.5rem 4rem; display: grid; gap: 1.5rem; align-content: start; }
main:focus { outline: none; }
.foot { padding-block: 1.5rem 2rem; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--rule); }

/* Notices */
.notice { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.notice .icon { margin-top: .1rem; }
.notice p { flex: 1; }
.notice-ok { background: var(--green-wash); border-color: #a9d7bf; }
.notice-ok .icon { color: var(--green-ink); }
.notice-error { background: var(--red-wash); border-color: #e6b3a8; }
.notice-error .icon { color: var(--red-ink); }
.notice-offer, .notice-pending { background: var(--yellow-wash); border-color: #e9cf78; }
.notice-offer:hover, .notice-pending:hover { border-color: var(--yellow-ink); }
.notice-offer .icon, .notice-pending .icon { color: var(--yellow-ink); }

/* Panels: enamel signage plates on the floor */
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 2rem); display: grid; gap: 1.1rem; align-content: start; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.count { font-size: .85rem; font-weight: 700; min-width: 1.6rem; height: 1.6rem; padding-inline: .45rem; display: inline-grid; place-items: center; border-radius: 1rem; background: var(--floor-deep); color: var(--ink-2); }
section { display: grid; align-content: start; }
.hint { color: var(--ink-2); display: flex; gap: .5rem; align-items: flex-start; font-size: .95rem; }
.hint .icon { margin-top: .15rem; color: var(--ink-3); }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.empty { padding: 1.1rem; border: 1.5px dashed var(--tape); border-radius: var(--radius); color: var(--ink-2); display: grid; gap: .35rem; }
.stack { display: grid; gap: 1rem; }

/* The route: the floor line itself */
.route { position: relative; padding: .35rem 0 2rem; --dot: 2.5rem; }
.route ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
.route-track { position: absolute; top: calc(.35rem + var(--dot) / 2 - 5px); left: calc(var(--dot) / 2); right: calc(var(--dot) / 2); height: 10px; border-radius: 10px;
    background: var(--tape); }
.route-fill { position: absolute; inset: 0; border-radius: 10px; background: var(--route); transform-origin: left center; transform: scaleX(var(--to)); animation: route-run .6s var(--ease) both; }
@keyframes route-run { from { transform: scaleX(var(--from)); } to { transform: scaleX(var(--to)); } }
.stop { position: relative; width: var(--dot); height: var(--dot); }
.stop a { display: contents; color: inherit; text-decoration: none; }
.stop-dot { width: var(--dot); height: var(--dot); border-radius: 50%; display: grid; place-items: center; font-weight: 760; background: var(--floor); border: 3px solid var(--tape); color: var(--ink-3); position: relative; z-index: 1; transition: transform .2s var(--ease); }
.stop-dot .icon { width: 1.15rem; height: 1.15rem; stroke-width: 3; }
.stop-label { position: absolute; top: calc(var(--dot) + .45rem); left: 50%; transform: translateX(-50%); font-size: .82rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.stop:first-child .stop-label { left: 0; transform: none; }
.stop:last-child .stop-label { left: auto; right: 0; transform: none; }
.stop.is-done .stop-dot { background: var(--route); border-color: var(--route); color: #fff; }
.stop.is-done a:hover .stop-dot { transform: scale(1.08); }
.stop.is-done .stop-label { color: var(--ink-2); }
.stop.is-here .stop-dot { background: var(--panel); border: 5px solid var(--route); color: var(--route-ink); transform: scale(1.18); box-shadow: 0 0 0 6px var(--route-wash); animation: stop-arrive .5s var(--ease) .6s both; }
.stop.is-here .stop-label { color: var(--ink); font-weight: 720; }
@keyframes stop-arrive { from { box-shadow: 0 0 0 0 var(--route-wash); } to { box-shadow: 0 0 0 6px var(--route-wash); } }
@media (max-width: 40rem) {
    .route { --dot: 2.15rem; }
    .route { padding-bottom: 0; }
    .stop-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.step-panel { margin-top: .25rem; }
.route-next { margin-top: .9rem; font-size: .92rem; color: var(--ink-2); }
.route-next strong { color: var(--route-ink); }
.route-now { font-weight: 700; color: var(--ink); }
@media (min-width: 40.01rem) { .route-now-wrap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
@media (max-width: 30rem) { .step-panel { padding-inline: .8rem; } .calendar-grid { border-spacing: 2px; margin: -2px; } }

/* Choices (step 1) */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 650; margin-bottom: .6rem; padding: 0; }
.choices { display: grid; gap: .6rem; }
.choice { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--radius-chip); background: var(--floor); cursor: pointer; transition: background .15s, box-shadow .15s; }
.choice:hover { background: var(--floor-deep); }
.choice input { position: absolute; opacity: 0; }
.choice-mark { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 3px solid var(--ink-3); flex: none; background: var(--panel); display: grid; place-items: center; }
.choice-body { display: grid; gap: .1rem; }
.choice-body strong { font-size: 1.1rem; }
.choice-body span { color: var(--ink-2); font-size: .93rem; }
.choice:has(input:checked) { background: var(--route-wash); box-shadow: inset 0 0 0 2px var(--route); }
.choice input:checked + .choice-mark { border-color: var(--route); }
.choice input:checked + .choice-mark::after { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--route); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.prefs { border-top: 1px solid var(--rule); padding-top: .4rem; }
.prefs summary span { color: var(--ink-3); font-weight: 400; }

/* Fields and buttons */
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--route-ink); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: .5rem; height: .5rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s var(--ease); margin-inline: .15rem .2rem; }
details[open] > summary::before { transform: rotate(45deg); }
.field-row, .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .9rem; align-items: end; }
.field { display: grid; gap: .3rem; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.field-static { font-weight: 600; color: var(--ink); }
.field-static span { display: block; font-size: .92rem; color: var(--ink-2); }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%; min-height: 48px; padding: .6rem .75rem; border-radius: var(--radius); border: 1.5px solid #8f9a93; background: #fff; color: var(--ink); font-weight: 450; font-size: 1rem;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--route); outline-offset: 1px; border-color: var(--route-ink); }
.field-inline select { min-height: 40px; padding-block: .35rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.actions-split { justify-content: space-between; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .6rem 1.2rem; border-radius: var(--radius); border: 0; font-weight: 680; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s var(--ease), box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-go { background: var(--green-ink); color: #fff; box-shadow: 0 2px 0 #0a4f34; }
.btn-go:hover { background: #0b5a3b; }
.btn-agenda { background: var(--blue-ink); color: #fff; box-shadow: 0 2px 0 #163f79; }
.btn-agenda:hover { background: #18478a; }
.btn-line { background: var(--yellow); color: var(--ink); box-shadow: 0 2px 0 #c99d17; }
.btn-line:hover { background: #e9b81f; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #8f9a93; }
.btn-quiet:hover { background: var(--floor); }
.btn-danger { background: var(--red-ink); color: #fff; }
.btn-danger:hover { background: #84261a; }
.btn-small { min-height: 40px; padding: .4rem .85rem; font-size: .92rem; }
.btn[disabled], .btn[aria-disabled=true] { background: var(--floor-deep); color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--floor); color: var(--ink); text-decoration: none; cursor: pointer; }
.icon-btn:hover { background: var(--floor-deep); }
.icon-btn:disabled { color: #a5ada7; cursor: default; background: transparent; }
@media (max-width: 40rem) {
    .actions .btn-go, .actions .btn-agenda { flex: 1 1 100%; }
    .actions-split { flex-direction: column-reverse; align-items: stretch; }
    .actions-split .btn { width: 100%; }
}

/* Chosen summary strip */
.chosen { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--route-wash); }
.chosen a { font-weight: 650; white-space: nowrap; }

/* Calendar */
#giorno { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { #giorno { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); align-items: start; gap: 2rem; } }
.calendar { display: grid; gap: .6rem; scroll-margin-top: 6rem; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-nav { display: flex; gap: .35rem; }
.calendar-grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: -4px; }
.calendar-grid th { font-size: .78rem; font-weight: 650; color: var(--ink-3); padding-bottom: .15rem; }
.calendar-grid td { padding: 0; }
.day { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; min-height: 44px; border-radius: 10px; border: 0; padding: 0; font-weight: 500; font-size: 1rem; text-decoration: none; background: transparent; color: #8a948e; }
.day.is-closed .day-num { text-decoration: line-through; text-decoration-color: #b6bdb8; }
.day.is-open { background: var(--panel); color: var(--ink); font-weight: 720; box-shadow: inset 0 0 0 1.5px var(--rule); }
.day.is-open::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 14%; height: 4px; border-radius: 4px; background: var(--route); }
.day.is-open:hover { box-shadow: inset 0 0 0 2px var(--route); }
.day-free { position: absolute; top: 2px; right: 4px; font-size: .75rem; font-weight: 700; color: var(--route-ink); }
.day[aria-current=true] { background: var(--route-ink); color: #fff; box-shadow: none; }
.day[aria-current=true]::after { background: #fff; }
.day[aria-current=true] .day-free { color: #fff; }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; font-size: .8rem; color: var(--ink-3); }
.legend-item { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; margin-right: .8rem; }
.legend-open { width: 1.1rem; height: 4px; border-radius: 4px; background: var(--route); display: inline-block; }
.legend-closed { text-decoration: line-through; color: var(--ink-3); font-weight: 600; }

/* Time chips */
.times { display: grid; gap: .6rem; align-content: start; scroll-margin-top: 6rem; }
.times:focus { outline: none; }
.times h2 { margin-bottom: .15rem; }
.times-group { font-size: .85rem; font-weight: 650; color: var(--ink-3); margin-top: .35rem; }
.time-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr)); gap: .6rem; }
.time-chip { display: grid; gap: .2rem; padding: .75rem .85rem .8rem; border-radius: var(--radius-chip); background: var(--panel); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--rule), 0 1px 0 var(--rule); transition: box-shadow .15s, transform .2s var(--ease); }
.time-chip:hover { box-shadow: inset 0 0 0 2px var(--route), 0 6px 16px -10px rgb(23 32 28 / .45); transform: translateY(-2px); }
.time-chip-hour { font-size: 1.55rem; font-weight: 760; letter-spacing: -.02em; line-height: 1.1; }
.time-chip-meta { font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
.times.is-arriving .time-chip { animation: chip-in .45s var(--ease) both; }
.times.is-arriving li:nth-child(2) .time-chip { animation-delay: .05s; }
.times.is-arriving li:nth-child(3) .time-chip { animation-delay: .1s; }
.times.is-arriving li:nth-child(n+4) .time-chip { animation-delay: .14s; }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.waitlist { border-top: 1px solid var(--rule); padding-top: .3rem; }
.waitlist .form-grid { margin-top: .6rem; }

/* Ticket (chosen slot) */
.ticket { display: grid; grid-template-columns: 1fr; gap: 1rem 1.4rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: var(--radius-chip); background: var(--ink); color: #fff; position: relative; }
.ticket-when { display: grid; line-height: 1.1; padding-right: 0; grid-template-columns: auto auto; justify-content: start; column-gap: .6rem; align-items: baseline; }
.ticket-tape { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--route); }
.ticket-day { font-size: .9rem; color: #b9c4bd; }
.ticket-date { font-size: 1.15rem; font-weight: 650; }
.ticket-time { grid-column: 1 / -1; font-size: 2.4rem; font-weight: 780; letter-spacing: -.03em; color: #fff; }
.ticket-facts { display: grid; gap: .3rem; margin: 0; }
.ticket-facts div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; }
.ticket-facts dt { color: #9faba4; font-size: .85rem; padding-top: .1rem; }
.ticket-facts dd { margin: 0; font-weight: 600; }
.ticket-change { grid-column: 1 / -1; color: var(--green-wash); font-weight: 650; justify-self: start; }

/* Checklist (step 3) */
.checklist { display: grid; gap: .55rem; }
.check-item { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-chip); background: var(--floor); cursor: pointer; transition: background .15s; }
.check-item:hover { background: var(--floor-deep); }
.check-item input { position: absolute; opacity: 0; }
.check-box { width: 1.75rem; height: 1.75rem; flex: none; border-radius: 6px; border: 2.5px solid var(--ink-3); background: #fff; display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.check-box .icon { stroke-width: 3; width: 1.2rem; height: 1.2rem; }
.check-item:has(input:checked) { background: var(--route-wash); }
.check-item input:checked + .check-box { background: var(--route); border-color: var(--route); color: #fff; }
.check-item:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.check-progress { color: var(--ink-2); font-size: .95rem; flex: 1 1 12rem; }
.check-progress.is-complete { color: var(--route-ink); font-weight: 650; }

/* Summary (step 4) */
.summary { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--radius-chip); overflow: hidden; gap: 1px; padding: 1px; background: var(--rule); }
@media (min-width: 48rem) { .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 26rem) { .summary { grid-template-columns: 1fr; } }
.summary div { background: var(--panel); padding: .8rem 1rem; display: grid; gap: .1rem; }
.summary dt { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.summary dd { margin: 0; font-weight: 650; font-size: 1.08rem; }
.summary-time { font-size: 1.6rem !important; font-weight: 780 !important; color: var(--route-ink); }
.terms { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.terms li { display: flex; gap: .6rem; color: var(--ink-2); }
.terms .icon { color: var(--route-ink); margin-top: .12rem; }

/* Arrival */
.arrival .status { justify-self: start; }
.prep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.prep-list li { display: flex; gap: .55rem; }
.prep-list .icon { color: var(--route-ink); margin-top: .15rem; }

/* Statuses: shape + word, never colour alone */
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; padding: .2rem .6rem .2rem .5rem; border-radius: 1rem; background: var(--floor-deep); color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; border: 2px solid currentColor; }
.status-confirmed { background: var(--green-wash); color: var(--green-ink); }
.status-confirmed::before { background: currentColor; }
.status-pending { background: var(--yellow-wash); color: var(--yellow-ink); }
.status-pending::before { border-style: dashed; }
.status-free { background: var(--blue-wash); color: var(--blue-ink); }
.status-offered { background: var(--yellow-wash); color: var(--yellow-ink); }
.status-cancelled, .status-declined { background: var(--red-wash); color: var(--red-ink); }
.status-cancelled::before, .status-declined::before, .status-closed::before { border-radius: 0; height: 2px; border: 0; background: currentColor; }
.status-moved::before { border-radius: 2px; }
.text-pending { color: var(--yellow-ink); }

/* Patient: appointments, offers */
.appointment { display: grid; grid-template-columns: 6.5rem 1fr; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: .9rem; }
.appointment-when { background: var(--route-wash); display: grid; align-content: center; justify-items: center; gap: .1rem; padding: 1rem .5rem; text-align: center; }
.appointment-date { font-size: .85rem; font-weight: 650; color: var(--route-ink); }
.appointment-time { font-size: 1.6rem; font-weight: 780; letter-spacing: -.02em; }
.appointment-body { padding: 1rem 1.2rem; display: grid; gap: .45rem; justify-items: start; }
.appointment-body > p { color: var(--ink-2); }
.fold { width: 100%; }
.fold > :not(summary) { margin-top: .5rem; }
.fold-danger > summary { color: var(--red-ink); }
.fold-inline { width: auto; }
.check-inline { display: flex; gap: .5rem; align-items: center; min-height: 44px; }
.check-inline input { width: 1.25rem; height: 1.25rem; }
@media (max-width: 30rem) { .appointment { grid-template-columns: 1fr; } .appointment-when { grid-template-columns: auto auto; justify-content: start; gap: .6rem; align-items: baseline; padding: .7rem 1.2rem; } }
.history { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: var(--radius); }
.history li { display: grid; grid-template-columns: minmax(0, 14rem) 1fr auto; gap: .75rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.history li:last-child { border-bottom: 0; }
@media (max-width: 36rem) { .history li { grid-template-columns: 1fr auto; } .history li span:nth-child(2) { grid-column: 1; grid-row: 2; } .history li .status { grid-row: 1 / 3; grid-column: 2; } }
.offer { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: .9rem; }
@media (min-width: 52rem) { .offer { grid-template-columns: minmax(0, 24rem) 1fr; align-items: center; } }
.offer-body { display: grid; gap: .6rem; }
.offer-body p { color: var(--ink-2); }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .85rem 1rem; background: var(--panel); border-radius: var(--radius); margin-bottom: .5rem; }
.row-item > div { display: grid; gap: .1rem; }
.row-item span { color: var(--ink-2); font-size: .93rem; }
.row-pending { box-shadow: inset 0 0 0 2px var(--yellow); }
.messages { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: var(--radius); }
.messages li { display: flex; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.messages li:last-child { border-bottom: 0; }
.messages .icon { color: var(--ink-3); margin-top: .15rem; }

/* Studio: the day as a line of stops */
.day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.day-title { display: grid; gap: .25rem; }
.day-title p { color: var(--ink-2); }
.day-tools { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.filter { margin-left: .4rem; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.week-day { display: grid; justify-items: center; gap: .05rem; padding: .55rem .2rem .5rem; border-radius: var(--radius); background: var(--panel); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--rule); }
.week-day:hover { box-shadow: inset 0 0 0 2px var(--route); }
.week-name { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.week-num { font-size: 1.25rem; font-weight: 740; }
.week-load { font-size: .75rem; color: var(--ink-2); display: flex; align-items: center; gap: .25rem; }
.week-day.is-closed { background: transparent; color: var(--ink-3); }
.week-day[aria-current=date] { background: var(--blue-ink); color: #fff; box-shadow: none; }
.week-day[aria-current=date] .week-name, .week-day[aria-current=date] .week-load { color: #e3ecfa; }
.dot-pending { width: .55rem; height: .55rem; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1.5px var(--ink); }
.line-day { list-style: none; margin: 0; padding: 0; position: relative; display: grid; }
.line-day::before { content: ""; position: absolute; left: calc(4.2rem + 9px); top: 1.2rem; bottom: 1.2rem; width: 8px; border-radius: 8px; background: var(--route); }
.line-stop { display: grid; grid-template-columns: 4.2rem 26px 1fr; column-gap: .9rem; align-items: start; padding-block: .45rem; }
.line-time { font-size: 1.2rem; font-weight: 760; padding-top: .9rem; text-align: right; letter-spacing: -.01em; }
.line-node { width: 26px; height: 26px; margin-top: .85rem; border-radius: 50%; background: var(--panel); border: 5px solid var(--route); position: relative; z-index: 1; }
.line-body { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem; display: grid; gap: .3rem; }
.line-main { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.line-body > p { color: var(--ink-2); font-size: .93rem; }
.line-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .3rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.line-stop.is-free .line-body { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tape); }
.line-stop.is-free h3 { color: var(--blue-ink); }
.line-stop.is-confirmed .line-node { background: var(--route); }
.line-stop.is-pending .line-node { border-color: var(--yellow); background: var(--panel); box-shadow: 0 0 0 2px var(--ink); }
.line-stop.is-pending .line-body { box-shadow: inset 0 0 0 2px var(--yellow), var(--shadow); }
.line-stop.is-offered .line-node { border-color: var(--yellow); }
.line-stop.is-closed .line-node, .line-stop.is-past .line-node, .line-stop.is-inactive .line-node { border-color: var(--tape); background: var(--floor); }
.line-stop.is-closed .line-node::after { content: ""; position: absolute; inset: 50% -6px auto; height: 3px; margin-top: -1.5px; background: var(--ink-3); transform: rotate(-45deg); }
.line-stop.is-closed .line-body, .line-stop.is-past .line-body, .line-stop.is-inactive .line-body { background: transparent; box-shadow: none; color: var(--ink-3); }
.line-stop.is-closed .line-time, .line-stop.is-past .line-time { color: var(--ink-3); }
@media (max-width: 36rem) {
    .line-day::before { left: calc(3.1rem + 7px); }
    .line-stop { grid-template-columns: 3.1rem 22px 1fr; column-gap: .6rem; }
    .line-node { width: 22px; height: 22px; border-width: 4px; }
    .line-time { font-size: 1.02rem; }
    .week-load { font-size: .66rem; }
}

/* Tables */
.table-wrap { overflow-x: auto; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 650; padding: .7rem 1rem; border-bottom: 2px solid var(--rule); white-space: nowrap; }
.data td { padding: .6rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.data tr:last-child td { border-bottom: 0; }
.data .num { font-weight: 650; }

/* Settings */
.settings { display: grid; gap: 1.25rem; }
.doctor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.doctor-row { display: grid; grid-template-columns: 1fr repeat(3, auto); gap: .75rem; align-items: end; padding: .7rem .8rem; background: var(--floor); border-radius: var(--radius); }
@media (max-width: 36rem) { .doctor-row { grid-template-columns: 1fr auto; } .doctor-row .field { grid-column: 1 / -1; } }
.add-row { align-items: end; }
.add-row .field { flex: 1 1 16rem; }
.switch { display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 2.9rem; height: 1.65rem; border-radius: 1rem; background: #b3bbb5; position: relative; transition: background .2s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .25s var(--ease); }
.switch input:checked + .switch-track { background: var(--route-ink); }
.switch input:checked + .switch-track::after { transform: translateX(1.25rem); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Schedule: sedi, settimana tipo, bulk */
.panel { scroll-margin-top: 6rem; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: var(--radius-chip); background: var(--floor); }
.segmented a { min-height: 40px; display: inline-flex; align-items: center; padding: .3rem .85rem; border-radius: var(--radius); color: var(--ink-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.segmented a:hover { color: var(--ink); background: var(--floor-deep); }
.segmented a[aria-current] { background: var(--panel); color: var(--route-ink); box-shadow: 0 1px 2px rgb(23 32 28 / .14); }
.more { border-top: 1px solid var(--rule); padding-top: .4rem; }
.more > form { margin-top: .6rem; }
.location-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.location-edit { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.location-card { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; border-radius: var(--radius); background: var(--floor); }
.location-card .icon { color: var(--route-ink); margin-top: .2rem; }
.location-card span { display: grid; }
.location-card small, .ticket-facts small { display: block; color: var(--ink-3); font-weight: 450; font-size: .85rem; }
.ticket-facts small { color: #9faba4; }
.location-card.is-off { opacity: .7; }
.location-row { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.4fr) auto auto; gap: .75rem; align-items: end; padding: .7rem .8rem; background: var(--floor); border-radius: var(--radius); }
@media (max-width: 48rem) { .location-row { grid-template-columns: 1fr auto; } .location-row .field { grid-column: 1 / -1; } }
.week-plan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.week-plan-day { display: grid; gap: .45rem; align-content: start; padding: .6rem; border-radius: var(--radius); background: var(--floor); min-height: 9rem; }
.week-plan-day h3 { font-size: .95rem; font-weight: 700; }
.week-plan-day.is-free h3 { color: var(--ink-3); }
.band { position: relative; display: grid; gap: .15rem; padding: .6rem 2.4rem .65rem .7rem; border-radius: var(--radius-chip); background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--route-wash), 0 1px 0 var(--rule); }
.band-time { white-space: nowrap; font-size: 1.05rem; font-weight: 760; letter-spacing: -.01em; color: var(--route-ink); }
.band-place { display: flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .9rem; }
.band-place .icon { width: 1rem; height: 1rem; color: var(--ink-3); }
.band-meta { font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
.band-remove { position: absolute; top: .1rem; right: .1rem; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.band-remove:hover { background: var(--red-wash); color: var(--red-ink); }
.band-remove .icon { width: 1.05rem; height: 1.05rem; }
.band-none { font-size: .85rem; color: var(--ink-3); }
@media (max-width: 66rem) {
    .week-plan { grid-template-columns: 1fr; }
    .week-plan-day { grid-template-columns: 6.5rem 1fr; min-height: 0; align-items: start; }
    .week-plan-day h3 { padding-top: .55rem; }
    .week-plan-day > :not(h3) { grid-column: 2; }
}
@media (max-width: 30rem) { .week-plan-day { grid-template-columns: 1fr; } .week-plan-day > :not(h3) { grid-column: 1; } .week-plan-day h3 { padding-top: 0; } }
.day-picks { display: grid; grid-template-columns: repeat(6, minmax(3.2rem, 1fr)); gap: .4rem; margin-top: .35rem; }
.day-pick { position: relative; cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; }
.day-pick > span { min-height: 48px; display: grid; place-items: center; border-radius: var(--radius-chip); background: var(--floor); font-weight: 700; color: var(--ink-2); transition: background .15s, box-shadow .15s; }
.day-pick:hover > span { background: var(--floor-deep); }
.day-pick input:checked + span { background: var(--route-wash); color: var(--route-ink); box-shadow: inset 0 0 0 2px var(--route); }
.day-pick input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (max-width: 30rem) { .day-picks { grid-template-columns: repeat(3, 1fr); } }
.preview { display: grid; gap: .45rem; padding: .8rem .9rem; border-radius: var(--radius); background: var(--floor); }
.preview:empty { display: none; }
.preview strong { font-size: 1rem; }
.preview.is-warning strong { color: var(--red-ink); }
.preview-times { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.preview-times li { padding: .15rem .5rem; border-radius: var(--radius); background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule); font-weight: 650; font-size: .88rem; }

/* Accounts and sign-in */
.account { display: flex; align-items: center; gap: .5rem; }
.account-name { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.account-name small { font-weight: 450; color: var(--ink-3); }
.account-name .icon { color: var(--route-ink); }
.demo-strip form { display: contents; }
.demo-strip button { background: none; border: 0; color: inherit; font: inherit; white-space: nowrap; padding: .55rem .6rem; min-height: 40px; cursor: pointer; }
.demo-strip button:hover { color: #fff; }
.demo-strip button[aria-current] { color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }
.demo-strip button:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
.auth-wrap { max-width: 32rem; }
.auth-panel { gap: 1rem; }
.btn-google { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px #8f9a93; gap: .7rem; }
.btn-google:hover { background: var(--floor); }
.google-mark { width: 1.25rem; height: 1.25rem; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--ink-3); font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.consent { display: flex; align-items: flex-start; gap: .6rem; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 1.3rem; height: 1.3rem; margin-top: .15rem; accent-color: var(--route-ink); flex: none; }
.optional { font-weight: 450; color: var(--ink-3); }
.auth-switch { color: var(--ink-2); }
.who { display: grid; gap: .8rem; padding: 1rem; border-radius: var(--radius); background: var(--floor); }
.who-note { color: var(--ink-2); }
.who legend { font-weight: 700; font-size: 1.1rem; float: left; width: 100%; }
.keep-link { display: grid; gap: .6rem; padding: 1rem; border-radius: var(--radius); background: var(--yellow-wash); border: 1px solid #e9cf78; }
.keep-link-row { display: flex; gap: .5rem; }
.keep-link-row input { flex: 1; font-size: .9rem !important; }
.sign-in-prompt { max-width: 40rem; }
.line-contact { font-weight: 600; color: var(--ink-2); }
.access-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.access-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .7rem .8rem; background: var(--floor); border-radius: var(--radius); }
.access-who { display: grid; flex: 1 1 14rem; }
.access-who small { color: var(--ink-3); }
@media (max-width: 40rem) { .tabs { order: 2; } .account { margin-left: auto; } .account-name > span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Schedule setup guide */
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; counter-reset: none; }
.setup-step a { height: 100%; display: flex; gap: .7rem; align-items: flex-start; padding: .85rem .9rem; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.setup-step a:hover { box-shadow: inset 0 0 0 1.5px var(--route), var(--shadow); }
.setup-num { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 760; background: var(--floor); color: var(--ink-2); }
.setup-num .icon { width: 1.1rem; height: 1.1rem; }
.setup-step.is-done .setup-num { background: var(--route-ink); color: #fff; }
.setup-step.is-next a { box-shadow: inset 0 0 0 2px var(--route), var(--shadow); }
.setup-step.is-next .setup-num { background: var(--route-wash); color: var(--route-ink); box-shadow: inset 0 0 0 2px var(--route); }
.setup-body { display: grid; gap: .15rem; }
.setup-body strong { font-size: 1rem; }
.setup-body span { font-size: .85rem; color: var(--ink-2); line-height: 1.35; }
.setup-body small { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.setup-body b { color: var(--route-ink); }
.step-tag { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-right: .2rem; border-radius: 50%; background: var(--route-wash); color: var(--route-ink); font-size: .95rem; font-weight: 760; vertical-align: .15em; }
.btn-remove { color: var(--red-ink); box-shadow: inset 0 0 0 1.5px #e6b3a8; }
.btn-remove:hover { background: var(--red-wash); }
@media (max-width: 56rem) { .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .setup-steps { grid-template-columns: 1fr; } }

/* Bulk delete and floating outcome */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem .9rem; margin-bottom: .6rem; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.bulk-all { flex: 1 1 16rem; }
.bulk-count { font-weight: 650; color: var(--ink-2); font-size: .92rem; }
.btn-remove[disabled] { color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--rule); background: transparent; }
.data .pick { width: 3rem; padding-right: 0; }
.data .pick input { width: 1.4rem; height: 1.4rem; accent-color: var(--route-ink); cursor: pointer; vertical-align: middle; }
.data tr:has(.pick input:checked) td { background: var(--route-wash); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 1rem; transform: translateX(-50%); width: min(100% - 1.5rem, 36rem); display: grid; gap: .4rem; padding: .5rem; border-radius: var(--radius-chip); background: var(--ink); box-shadow: 0 12px 32px -12px rgb(23 32 28 / .6); animation: toast-in .35s var(--ease) both; }
.toast .notice { margin: 0; }
.toast-close { justify-self: end; background: none; border: 0; color: #dfe5e0; font: inherit; font-weight: 650; font-size: .9rem; min-height: 40px; padding: 0 .6rem; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, .75rem); } }

/* Services */
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.service-row { display: grid; gap: .7rem; padding: .8rem .9rem; border-radius: var(--radius); background: var(--floor); }
.service-row.is-off { opacity: .78; }
.service-head { display: grid; grid-template-columns: minmax(12rem, 1.6fr) minmax(9rem, 1fr) auto; gap: .75rem; align-items: end; }
@media (max-width: 40rem) { .service-head { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

@media (max-width: 40rem) {
    .app-bar-inner { padding-block: .45rem 0; gap: .3rem; }
    .tabs { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; }
    .tabs a { justify-content: center; padding-inline: .3rem; font-size: .9rem; white-space: normal; text-align: center; line-height: 1.15; }
    .tabs a[aria-current]::after { bottom: 0; }
}

@media (max-width: 30rem) { .wrap { width: min(100% - 1.25rem, 68rem); } .step-panel { padding-inline: .7rem; } .calendar-grid th { font-size: .72rem; } }
@media (min-width: 40.01rem) { .route { padding-bottom: .5rem; } .route-next { margin-top: 2.1rem; } }
