/* ════════════════════════════════════════════════════════════════════════════
   NA RÉGUA — site/app do cliente
   Peça marcante: a tabela de preços no estilo do quadro de parede da
   barbearia (nome em Bodoni, pontilhado, preço em latão) e o cartão ao vivo
   do "próximo horário livre". O resto fica quieto.
   ════════════════════════════════════════════════════════════════════════════ */

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brass); color: var(--brass-ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

body { padding-bottom: calc(76px + var(--safe-b)); }
#main { outline: none; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(620px, 100% - 32px); margin-inline: auto; }

/* ── Barra de cima ───────────────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 16px;
    padding: calc(10px + var(--safe-t)) max(16px, calc((100% - 1080px) / 2)) 10px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand-mark { width: 22px; height: 33px; object-fit: contain; }
.brand-name { font-family: var(--f-display); font-size: 19px; font-weight: 600; letter-spacing: 0.01em; }
.top-nav { display: none; gap: 4px; }
.top-nav a { text-decoration: none; padding: 10px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.top-nav a:hover { color: var(--text); background: var(--surface); }
.top-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* ── Barra de baixo (celular) ────────────────────────────────────────────── */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 6px 8px calc(6px + var(--safe-b));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px);
    border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; min-height: 52px; justify-content: center; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; border-radius: 12px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar .tab-cta .i { color: var(--brass); }
.tabbar a[aria-current="page"] .i { color: var(--brass); }

@media (min-width: 860px) {
    .top-nav { display: flex; }
    .tabbar { display: none; }
    body { padding-bottom: 0; }
}

/* ── Início: abertura ────────────────────────────────────────────────────── */
.hero { position: relative; padding: 36px 0 28px; display: grid; justify-items: center; text-align: center; gap: 18px; }
.hero-mark { width: 92px; height: 136px; object-fit: contain; }
.hero h1 { font-size: clamp(38px, 9vw, 64px); font-weight: 600; letter-spacing: -0.01em; }
.hero .tagline { color: var(--text-2); font-size: 17px; max-width: 34ch; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised); }
.status-line .dot { width: 8px; height: 8px; }
.status-line.open .dot { color: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.status-line.closed .dot { color: var(--muted); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

@media (prefers-reduced-motion: no-preference) {
    .hero-mark { animation: mark-in 0.9s var(--ease) both; }
    .hero h1 { animation: rise 0.8s 0.12s var(--ease) both; }
    .hero .rule { animation: rule-in 0.9s 0.25s var(--ease) both; }
}
@keyframes mark-in { from { opacity: 0; transform: translateY(8px) scale(0.96); filter: blur(3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes rule-in { from { opacity: 0; transform: scaleX(0.3); } }
.hero .rule { width: min(280px, 70%); }

/* ── Próximo horário livre (cartão vivo) ─────────────────────────────────── */
.next-free {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
    padding: 18px 20px; border-radius: var(--r-card);
    background: var(--surface); border: 1px solid var(--brass-line);
    text-decoration: none; color: inherit;
}
.next-free .clock { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--brass-line); color: var(--brass-text); }
.next-free .when { font-family: var(--f-display); font-size: 24px; font-weight: 600; line-height: 1.1; }
.next-free .who { color: var(--muted); font-size: 14px; }
.next-free:hover { border-color: var(--brass); }
.next-free.loading .when, .next-free.loading .who { color: transparent; background: var(--surface-2); border-radius: 6px; }
@media (max-width: 520px) { .next-free { grid-template-columns: auto 1fr; } .next-free .btn { grid-column: 1 / -1; } }

/* ── Seções ──────────────────────────────────────────────────────────────── */
.section { padding: 34px 0 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(26px, 5vw, 34px); }
.section-head p { color: var(--muted); }
.two-col { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

/* ── Tabela de preços (quadro da barbearia) ──────────────────────────────── */
.menu-board { display: flex; flex-direction: column; }
.menu-cat { font-family: var(--f-display); font-style: italic; font-weight: 500; color: var(--brass-text); font-size: 17px; margin: 22px 0 4px; }
.menu-cat:first-child { margin-top: 0; }
.menu-item {
    display: grid; grid-template-columns: minmax(0, auto) 1fr auto; align-items: baseline; column-gap: 10px;
    padding: 12px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line);
}
.menu-item:hover .mi-name { color: var(--brass-text); }
.mi-name { font-family: var(--f-display); font-size: 21px; font-weight: 600; transition: color 0.15s; }
.mi-dots { border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-5px); min-width: 20px; }
.mi-price { font-family: var(--f-display); font-size: 21px; font-weight: 600; color: var(--brass-text); font-variant-numeric: lining-nums; }
.mi-meta { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; margin-top: 3px; flex-wrap: wrap; }
.mi-meta .tag { font-size: 11px; }

/* ── Equipe ──────────────────────────────────────────────────────────────── */
.team { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.team-card { scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 14px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.team-card:hover { border-color: var(--brass-line); }
.team-card .avatar { width: 76px; height: 76px; font-size: 32px; }
.team-card strong { font-family: var(--f-display); font-size: 19px; font-weight: 600; }
.team-card span { font-size: 13px; color: var(--muted); }

/* ── Planos ──────────────────────────────────────────────────────────────── */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.plan {
    position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px;
    border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line);
}
.plan::before { content: ''; position: absolute; inset: 0 18% auto; height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
.plan h3 { font-size: 23px; }
.plan .price { display: flex; align-items: baseline; gap: 6px; }
.plan .price b { font-family: var(--f-display); font-size: 36px; font-weight: 600; color: var(--brass-text); }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 14.5px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .i { color: var(--brass-text); margin-top: 2px; }
.plan .btn { margin-top: auto; }

/* ── Avaliações ──────────────────────────────────────────────────────────── */
.reviews-score { display: flex; align-items: center; gap: 14px; }
.reviews-score b { font-family: var(--f-display); font-size: 46px; font-weight: 600; line-height: 1; }
.stars { display: inline-flex; gap: 2px; color: var(--brass); }
.stars .i { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.quotes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.quote { padding: 18px; border-radius: var(--r-card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.quote p { font-family: var(--f-display); font-style: italic; font-size: 18px; line-height: 1.4; }
.quote .reply { font-size: 13.5px; color: var(--muted); border-left: 2px solid var(--brass-line); padding-left: 10px; }

/* ── Onde estamos ────────────────────────────────────────────────────────── */
.hours-list { display: flex; flex-direction: column; }
.hours-list .hl { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hours-list .hl.today { color: var(--brass-text); font-weight: 600; }
.footer { padding: 48px 0 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.footer img { width: 26px; height: 40px; object-fit: contain; opacity: 0.8; }
.footer a { color: var(--text-2); }

/* ── Agendamento ─────────────────────────────────────────────────────────── */
.flow { padding: 22px 0 120px; display: flex; flex-direction: column; gap: 20px; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--surface-3); }
.steps i.on { background: var(--brass); }
.flow-head { display: flex; flex-direction: column; gap: 8px; }
.flow-head .step-n { font-size: 13px; color: var(--muted); }
.flow-head h1 { font-size: clamp(30px, 7vw, 40px); }
.back { align-self: flex-start; }

.pick { display: flex; flex-direction: column; }
.pick-row {
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px;
    padding: 15px 4px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 64px;
}
.pick-row input { width: 22px; height: 22px; accent-color: var(--brass); margin: 0; }
.pick-row .pr-name { font-weight: 600; font-size: 16px; }
.pick-row .pr-sub { font-size: 13px; color: var(--muted); }
.pick-row .pr-price { font-variant-numeric: tabular-nums; color: var(--text-2); }
.pick-row:has(input:checked) .pr-name { color: var(--brass-text); }

.pro-list { display: flex; flex-direction: column; gap: 10px; }
.pro {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; width: 100%; color: inherit;
}
.pro:hover { border-color: var(--line-strong); }
.pro[aria-pressed="true"] { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.pro[disabled] { opacity: 0.5; cursor: not-allowed; }
.pro .pn { font-weight: 600; font-size: 16px; }
.pro .ps { font-size: 13px; color: var(--muted); }
.pro .any { width: 40px; height: 40px; border-radius: 50%; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--brass-text); }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; margin-inline: -2px; }
.day {
    flex: none; width: 62px; min-height: 80px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; scroll-snap-align: start;
}
.day small { font-size: 11.5px; color: var(--muted); }
.day b { font-family: var(--f-display); font-size: 24px; font-weight: 600; }
.day em { font-style: normal; font-size: 11px; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.day[aria-pressed="true"] small, .day[aria-pressed="true"] em { color: color-mix(in srgb, var(--bg) 70%, var(--text)); }
.day[disabled] { opacity: 0.35; cursor: not-allowed; }

.slot-group { display: flex; flex-direction: column; gap: 10px; }
.slot-group h3 { font-family: var(--f-ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
    min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
    font-variant-numeric: tabular-nums; font-size: 15px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 4px;
}
.slot small { font-size: 10.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot:hover { border-color: var(--line-strong); }
.slot[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); font-weight: 600; }
.slot[aria-pressed="true"] small { color: var(--brass-ink); opacity: 0.8; }
.slot.suggested { border-color: var(--brass-line); }

.summary-bar {
    position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-b)); z-index: 55;
    padding: 12px max(16px, calc((100% - 620px) / 2));
    background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
}
.summary-bar .sb-total { font-family: var(--f-display); font-size: 22px; font-weight: 600; }
.summary-bar .sb-sub { font-size: 12.5px; color: var(--muted); }
@media (min-width: 860px) { .summary-bar { bottom: 0; } }

/* ── Ticket (horário marcado) ────────────────────────────────────────────── */
.ticket { position: relative; border-radius: 22px; background: var(--ivory); color: #111; padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
:root[data-theme="claro"] .ticket { background: #111; color: var(--ivory); }
.ticket .t-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ticket .t-day { font-size: 13px; opacity: 0.72; }
.ticket .t-time { font-family: var(--f-display); font-size: 52px; font-weight: 600; line-height: 0.95; }
.ticket .t-mark { width: 30px; height: 46px; object-fit: contain; }
.ticket .t-cut { display: flex; align-items: center; gap: 8px; opacity: 0.4; }
.ticket .t-cut::before, .ticket .t-cut::after { content: ''; flex: 1; border-top: 1.5px dashed currentColor; }
.ticket .t-cut i { width: 6px; height: 6px; transform: rotate(45deg); background: currentColor; }
.ticket dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.ticket dt { font-size: 12px; opacity: 0.65; }
.ticket dd { margin: 0; font-weight: 600; }
.ticket .t-status { align-self: flex-start; }
.ticket.cancelled { opacity: 0.6; }

.actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--brass); color: var(--brass-text); margin: 6px auto 0; }
.done-mark .i { width: 28px; height: 28px; }

.rate-stars { display: flex; gap: 6px; justify-content: center; }
.rate-stars button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.rate-stars button .i { width: 26px; height: 26px; }
.rate-stars button.on { color: var(--brass); border-color: var(--brass-line); }
.rate-stars button.on .i { fill: currentColor; }

.pix-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.pix-box .qr { width: 220px; height: 220px; background: #fff; border-radius: 14px; padding: 8px; }
.pix-box .qr svg { width: 100%; height: 100%; }
.pix-code { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; padding: 12px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text-2); max-height: 84px; overflow: auto; }

.appt-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.appt-card .ac-date { width: 56px; text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.appt-card .ac-date b { display: block; font-family: var(--f-display); font-size: 26px; font-weight: 600; line-height: 1; }
.appt-card .ac-date small { font-size: 11.5px; color: var(--muted); }
.appt-card:hover { border-color: var(--line-strong); }
