/* ---------- Tipos de letra (servidos localmente) ---------- */
/* Playfair Display: títulos (elegante, de salão de beleza), com itálico para os destaques.
   Jost: texto e números (suave e legível). Provisórios até haver identidade da marca. */
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display/playfair-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display/playfair-display-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display/playfair-display-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost/jost-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost/jost-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost/jost-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost/jost-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
/* Tema provisório rosa e dourado (mármore), enquanto o salão não escolhe cores nem logótipo.
   Para pôr as cores da marca, basta mudar estas variáveis. */
:root {
  --ink: #3b2b2f;           /* café: texto, botões, cabeçalho do bilhete */
  --brass: #a95b70;         /* latão: preços, seleção, destaques */
  --brass-light: #d4af6a;   /* latão claro: filetes e pormenores */
  --ivory: #fbf3f1;         /* fundo */
  --bg: #fbf3f1;
  --bg-2: #f4e3e0;
  --surface: #ffffff;
  --surface-2: #fdf7f5;
  --line: #efdad7;
  --line-strong: #e0c3be;
  --text: #3b2b2f;
  --muted: #7d6469;
  --primary: #a95b70;
  --primary-hover: #8f4a5e;
  --primary-ink: #ffffff;
  --accent: #9a7424;
  --accent-ink: #ffffff;
  --accent-soft: #f9ebe8;
  --accent-line: #e6cda3;
  --nude: #f4e3e0;
  --gold: #b8923f;
  --gold-soft: #f9ebe8;
  --spark: #d4af6a;
  --sage: #d4af6a;          /* dias com vagas */
  --sage-soft: #f9ebe8;
  --ok: #3d6b5b;
  --danger: #b0412e;
  --danger-soft: #f8e7e2;
  --disabled: #d9c4c1;
  /* compatibilidade com o tema anterior */
  --cafe: var(--ink);
  --taupe: var(--brass);
  --bege: var(--accent-line);
  --creme: var(--accent-soft);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(59, 43, 47, .05), 0 16px 40px rgba(59, 43, 47, .08);
  --shadow-soft: 0 1px 2px rgba(59, 43, 47, .04), 0 6px 18px rgba(59, 43, 47, .05);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif: var(--display);
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --focus: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--accent);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; outline: none; }
main:focus, main:focus-visible { box-shadow: none; }
[hidden] { display: none !important; }
a { color: var(--accent); }
img { max-width: 100%; }
::selection { background: var(--accent-soft); }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--primary); color: var(--primary-ink); padding: 10px 14px; border-radius: 999px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 243, 241, .92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.back-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; transition: background .2s, border-color .2s;
}
.back-btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); }
.brand-name { margin: 0; font: 500 1.4rem/1.05 var(--serif); letter-spacing: .04em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; gap: 6px; }
.tab {
  font: 500 .9rem var(--sans); color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 40px;
}
.tab[aria-current="page"] { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.tab-ghost { border-color: transparent; }

/* ---------- Cartão flutuante dos dados (passo 1) ---------- */
.step-float { min-height: calc(100vh - 170px); display: grid; place-items: center; padding: 28px 0 40px; }
.float-card {
  width: 100%; max-width: 440px; padding: 30px 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow);
  animation: float-in .5s cubic-bezier(.2, .8, .2, 1);
}
.float-title { font: 400 2.2rem/1.05 var(--serif); margin: 0; outline: none; text-align: center; letter-spacing: .005em; }
.float-title::after { content: ""; display: block; width: 36px; height: 1px; background: var(--accent-line); margin: 14px auto 0; }
.float-lede { margin: 0 0 4px; text-align: center; font-size: .95rem; }
@keyframes float-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.summary-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 4px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 500;
}

.step { padding: 24px 0 32px; animation: rise .3s ease-out; }
.step-float { padding-top: 28px; }
.summary-bar:not([hidden]) + .step { padding-top: 10px; }
.step-title { font: 400 2.1rem/1.1 var(--serif); margin: 6px 0 18px; outline: none; letter-spacing: .005em; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step, .float-card { animation: none; } * { scroll-behavior: auto !important; } }

.step-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 20px; }
.btn-block { width: 100%; margin-top: 6px; }
.review-list { display: grid; grid-template-columns: auto 1fr; gap: 12px 0; margin: 0; }
.review-list dt { color: var(--muted); font-size: .9rem; }
.review-list dd { margin: 0; padding-left: 16px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
#booking-error { margin: 0 0 12px; }

/* ---------- Serviços ---------- */
.service-list { display: grid; gap: 10px; }
.service {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; font: inherit; box-shadow: var(--shadow-soft);
  transition: border-color .2s, transform .2s, background .2s;
}
.service:hover { border-color: var(--accent-line); }
.service:active { transform: scale(.99); }
.service[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.service-name { font: 500 1.45rem/1.2 var(--serif); }
.service-meta { color: var(--muted); font-size: .85rem; grid-column: 1; }
.service-price { grid-row: 1 / span 2; grid-column: 2; font-weight: 500; font-size: 1.05rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- Calendário ---------- */
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-soft); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month { margin: 0; font: 500 1.5rem var(--serif); text-transform: capitalize; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays span { text-align: center; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; min-height: 40px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: var(--text); font: 500 .98rem var(--sans); cursor: pointer; position: relative;
  font-variant-numeric: tabular-nums;
}
.cal-day::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sage); }
.cal-day:hover:not(:disabled) { border-color: var(--accent-line); }
.cal-day[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.cal-day[aria-pressed="true"]::after { background: var(--primary-ink); }
.cal-day:disabled { background: transparent; color: var(--disabled); cursor: not-allowed; }
.cal-day:disabled::after { display: none; }
.cal-day.today { border-color: var(--line-strong); }
.cal-blank { aspect-ratio: 1; }
.cal-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8rem; margin: 14px 0 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-free { background: var(--sage); }
.dot-off { background: var(--disabled); margin-left: 10px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 300 1.45rem/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s;
}
.icon-btn:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Horas ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot-grid-small { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.slot {
  min-height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 500 1rem var(--sans); cursor: pointer; font-variant-numeric: tabular-nums;
  transition: border-color .2s, background .2s;
}
.slot-grid-small .slot { min-height: 40px; font-size: .9rem; }
.slot:hover { border-color: var(--accent-line); }
.slot[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.slot-group-label { grid-column: 1 / -1; margin: 10px 0 0; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 30px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted);
}
.empty strong { display: block; color: var(--text); font: 500 1.4rem var(--serif); margin-bottom: 4px; }
.loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 1.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
label, .label-like, legend { font-weight: 500; font-size: .9rem; margin: 0; }
.opt { color: var(--muted); font-weight: 400; }
input, select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 1rem var(--sans);
  transition: border-color .2s, background .2s;
}
input::placeholder { color: var(--disabled); }
input:focus, select:focus { border-color: var(--accent-line); background: var(--surface); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; margin: 2px 0 0; }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.field-check label { font-weight: 400; font-size: .9rem; color: var(--muted); }
.field-check .field-error { grid-column: 1 / -1; }
.hint { margin: 0; font-size: .82rem; color: var(--muted); }
.field-error, .form-error { margin: 0; color: var(--danger); font-size: .86rem; font-weight: 500; }
.field-error:empty, .form-error:empty { display: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
fieldset { border: 0; padding: 0; margin: 0; }
.radio-row { display: grid; gap: 8px; }
.radio-row label { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 500 .98rem var(--sans); cursor: pointer; text-decoration: none; letter-spacing: .02em;
  transition: background .2s, border-color .2s, opacity .2s;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .55; cursor: progress; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-danger { background: transparent; color: var(--danger); border-color: #ecc6bd; }
.btn-small { min-height: 38px; padding: 6px 15px; font-size: .86rem; }
.link-btn { background: none; border: 0; color: var(--muted); font: 500 .85rem var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; }
.link { color: var(--accent); text-underline-offset: 3px; }

/* ---------- Confirmação ---------- */
.ticket {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 26px; padding: 30px 24px 26px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; text-align: left;
}
.ticket::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--nude), var(--accent-line), var(--sage-soft));
}
.ticket-eyebrow { margin: 6px 0 0; text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; font-weight: 600; color: var(--accent); }
.ticket .step-title { color: var(--text); font-size: 2.3rem; }
.ticket .muted { color: var(--muted); }
.ticket-details { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; margin: 0 0 20px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ticket-details dt { color: var(--muted); font-size: .9rem; }
.ticket-details dd { margin: 0; font-weight: 500; text-align: right; }

/* ---------- Gestão ---------- */
.admin-h1 { font: 400 2.6rem var(--serif); margin: 28px 0 14px; letter-spacing: .005em; }
/* Separadores sem deslocamento horizontal: no telemóvel quebram para uma segunda linha */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.subtab {
  flex: 1 1 auto; background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font: 500 .88rem var(--sans); cursor: pointer; min-height: 40px;
  white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
@media (min-width: 640px) { .subtab { flex: none; } }
.subtab[aria-selected="true"] { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.panel { padding-bottom: 40px; }
.panel-title { font: 500 1.6rem var(--serif); margin: 0; }
.panel > .panel-title { margin: 28px 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-soft); }

.agenda-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg-btn { border: 0; background: transparent; color: var(--muted); font: 500 .88rem var(--sans); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-range { font: 500 1.45rem var(--serif); margin: 16px 0 10px; }
.agenda-day { margin-bottom: 20px; }
.agenda-day-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 500; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.bk {
  display: grid; grid-template-columns: 64px 1fr; gap: 4px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 8px; box-shadow: var(--shadow-soft);
}
.bk-time { font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.bk-time small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.bk-main { min-width: 0; }
.bk-name { font-weight: 600; margin: 0; }
.bk-line { margin: 2px 0 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.bk-line a { color: var(--text); }
/* Ícones finos de telefone e email (máscara SVG: herdam a cor do texto) */
.bk-ico { display: flex; align-items: center; gap: 7px; }
.bk-ico::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--accent); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.bk-phone { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E"); }
.bk-mail { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.badge { display: inline-block; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; padding: 2px 9px; border-radius: 999px; vertical-align: 2px; margin-left: 6px; }
.badge-online { background: var(--gold-soft); color: var(--accent); }
.badge-manual { background: var(--accent-soft); color: var(--accent); }
.badge-warn { background: var(--danger-soft); color: var(--danger); }
.badge-pending { background: var(--creme); color: var(--cafe); box-shadow: inset 0 0 0 1px var(--taupe); }
.bk.bk-pending { border-color: var(--taupe); border-style: dashed; }
.approval-list { display: grid; gap: 14px; margin-top: 4px; }
.approval-item .bk { margin: 0; }
.approval-item .bk-dialog-date { margin-bottom: 8px; }
.ticket-pending { margin: -6px 0 16px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.bk-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }

.svc-row { display: grid; gap: 10px; }
.svc-row .grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.svc-row .row-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.svc-row.inactive { opacity: .6; }
.svc-tools { border-top: 1px solid var(--line); padding-top: 10px; }
.svc-move { display: flex; gap: 8px; }
.icon-btn.small { width: 38px; height: 38px; font-size: 1.05rem; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }

.hours-rows { display: grid; gap: 10px; }
.hours-row { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.hours-row-head { display: flex; justify-content: space-between; align-items: center; }
.hours-row-head strong { font-weight: 600; }
.hours-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hours-times label { font-size: .76rem; color: var(--muted); font-weight: 500; }
.hours-times input { background: var(--surface); }
.hours-row.closed .hours-times { display: none; }

.log summary { cursor: pointer; color: var(--muted); font-weight: 500; padding: 8px 0; }
.log table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.log td, .log th { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.log th { font-weight: 600; color: var(--muted); }

/* ---------- Rodapé, diálogo, toast ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; padding-bottom: 20px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

dialog {
  width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); color: var(--text); padding: 24px; box-shadow: 0 24px 60px rgba(59, 43, 47, .14);
}
dialog::backdrop { background: rgba(59, 43, 47, .22); backdrop-filter: blur(3px); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%);
  background: var(--primary); color: var(--primary-ink); padding: 12px 20px; border-radius: 999px; font-weight: 500;
  box-shadow: var(--shadow); transition: transform .3s, visibility .3s; z-index: 60; visibility: hidden; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.error { background: var(--danger); color: #fff; }

/* Páginas simples (opt-out) */
.simple-page { max-width: 560px; margin: 0 auto; padding: 56px 22px; }
.simple-page h1 { font: 400 2.2rem/1.15 var(--serif); }
.brand-mark { color: var(--accent); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: .76rem; }

/* ---------- Ecrãs maiores ---------- */
@media (min-width: 640px) {
  .service-list { grid-template-columns: 1fr 1fr; }
  .bk { grid-template-columns: 80px 1fr auto; }
  .bk-actions { grid-column: auto; flex-direction: column; align-items: stretch; margin-top: 0; }
  .hours-row { grid-template-columns: 160px 1fr; align-items: center; }
  .hours-times { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 380px) {
  .grid-2, .svc-row .grid-3 { grid-template-columns: 1fr; }
}
.simple-logo { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }

/* ---------- Notificações da app (Gestão) ---------- */
.push-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.push-text { min-width: 0; flex: 1 1 200px; }
.push-title { margin: 0 0 2px; font-weight: 600; }
.push-text p.muted { margin: 0; }
.push-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.push-card.on { border-color: var(--accent-line); }

/* Marcação acabada de chegar (atualização automática da agenda) */
.bk-new { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.bk-new .bk-name::after { content: "nova"; margin-left: 8px; font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; background: var(--accent-soft); color: var(--accent); padding: 2px 9px; border-radius: 999px; vertical-align: 2px; }
.agenda-nav[hidden] { display: none !important; }

.agenda-day-title { gap: 10px; }
.agenda-day-title span:last-child { white-space: nowrap; }

/* ---------- Agenda: vista de mês ---------- */
.seg-btn { padding: 8px 13px; }
.month-card { padding: 14px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-wd { text-align: center; font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 2px 0 4px; }
.month-day {
  position: relative; aspect-ratio: 1; min-height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 .92rem var(--sans); cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.month-num { line-height: 1; }
.month-day:hover { border-color: var(--line-strong); }
.month-day.has { background: var(--accent-soft); border-color: var(--accent-line); }
.month-day.off { background: transparent; color: var(--disabled); border-style: dashed; }
.month-day.past { opacity: .5; }
.month-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.month-count {
  min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 600 .64rem/16px var(--sans); text-align: center;
}
.month-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 2px 4px; }
.month-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); vertical-align: -1px; }
.lg-has { background: var(--accent-soft); border-color: var(--accent-line); }
.lg-free { background: var(--surface); }
.lg-off { border-style: dashed; }
.month-total { margin: 4px 2px 0; }

/* ---------- Janela de confirmação ---------- */
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #a52c22; }
.confirm-text { margin: 0; color: var(--text); line-height: 1.55; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.confirm-actions .btn { flex: 1 1 140px; }

/* ---------- Conta ---------- */
.account-sessions { display: grid; gap: 10px; }
.account-sessions .panel-title { margin: 0; }
.account-sessions p { margin: 0; }

/* ---------- Verificação em dois passos ---------- */
.twofa { display: grid; gap: 12px; }
.twofa .panel-title { margin: 0; }
.twofa-status { margin: 0; font-weight: 600; color: var(--muted); }
.twofa-status.on { color: var(--ok); }
.twofa-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.55; }
.twofa-qr { display: block; width: 200px; height: 200px; margin: 10px 0 6px; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--line); }
.twofa-secret, .twofa-code-list code {
  font: 500 .92rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; word-break: break-all;
}
.twofa-code-list { margin: 0; padding-left: 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; }
.otp-input { font: 500 1.4rem ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .2em; text-align: center; }

/* ---------- Definições (roda dentada) ---------- */
.settings-btn { display: grid; place-items: center; color: var(--text); }
.settings-btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.subtabs[hidden] { display: none !important; }
.settings-menu { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 24px; box-shadow: var(--shadow-soft); }
.settings-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 16px 18px; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: 66px;
}
.settings-item:last-child { border-bottom: 0; }
.settings-item:hover { background: var(--surface-2); }
.settings-item span { display: grid; gap: 2px; }
.settings-item strong { font-weight: 600; }
.settings-item small { color: var(--muted); font-size: .84rem; }
.settings-item svg { color: var(--muted); flex: none; }
.logout-btn { margin-top: 8px; }

/* Interruptor (ligar/desligar) nas Definições */
.settings-switch { cursor: pointer; }
.settings-switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
  width: 48px; height: 28px; border-radius: 999px; background: var(--line); border: 1px solid var(--line);
  cursor: pointer; transition: background .2s;
}
.settings-switch input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(59, 43, 47, .2); transition: transform .2s;
}
.settings-switch input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.settings-switch input[type="checkbox"]:checked::after { transform: translateX(20px); }
.settings-switch input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-switch input[type="checkbox"]:disabled { opacity: .5; }

/* ---------- Pedidos de avaliação ---------- */
.review-card { display: grid; gap: 8px; border-color: var(--accent-line); }
.review-card p { margin: 0; }
.review-title { margin: 0; font: 500 1.4rem var(--serif); display: flex; align-items: center; gap: 10px; }
.review-count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 .8rem/24px var(--sans); text-align: center; }
.review-count:empty { display: none; }
.review-req-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.review-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.review-who { display: grid; gap: 2px; min-width: 0; }
.review-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-done { opacity: .8; }
.bk-done .bk-time { color: var(--muted); }

/* Crédito no rodapé */
.footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
.credit { margin: 0; font-size: .76rem; color: var(--muted); opacity: .8; }
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--accent); }
.simple-page .credit { margin-top: 40px; }

/* Página de termos e privacidade */
.legal-page h2 { font: 500 1.4rem var(--serif); margin: 28px 0 6px; color: var(--text); }
.legal-page p, .legal-page li { line-height: 1.65; }
.legal-page ul { padding-left: 20px; margin: 6px 0; display: grid; gap: 6px; }
.legal-page li::marker { color: var(--accent-line); }
.field-check label a { color: var(--accent); }

/* ---------- Campos de data/hora no iPhone (Safari dá-lhes largura mínima própria) ---------- */
input[type="date"], input[type="time"] {
  -webkit-appearance: none; appearance: none;
  display: block; min-width: 0; max-width: 100%; width: 100%; text-align: left;
}
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.grid-2 > *, .hours-times > *, .field { min-width: 0; }
/* Mensagens dentro de grelhas de horas ocupam a largura toda */
.slot-grid > p, .slots-note { grid-column: 1 / -1; margin: 0; }

/* ---------- Guardar no calendário (ecrã final) ---------- */
.cal-add { margin: 0 0 20px; }
.cal-add-title { margin: 0 0 8px; font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.cal-add-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-cal { min-height: 46px; padding: 8px 10px; font-size: .84rem; gap: 6px; line-height: 1.25; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-cal:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-cal svg { flex: none; color: var(--accent); }
@media (max-width: 340px) { .cal-add-btns { grid-template-columns: 1fr; } }

/* ---------- Passo 1 compacto: cabe no ecrã do telemóvel sem deslizar ---------- */
html, body { overscroll-behavior: none; } /* sem o "salto" ao arrastar uma página que já cabe no ecrã */
body { min-height: 100dvh; }
.step-float { min-height: 0; padding: 18px 0; place-items: start center; }
.float-card { padding: 24px 20px 20px; gap: 12px; }
.float-card .field { gap: 4px; }
.float-card input:not([type="checkbox"]) { min-height: 46px; padding: 8px 14px; }
.float-title { font-size: 2rem; }
.float-title::after { margin-top: 10px; }
.float-lede { font-size: .88rem; line-height: 1.45; }
.float-card .field-check label { font-size: .86rem; }
.float-card .btn-block { margin-top: 4px; min-height: 50px; }
.site-footer { margin-top: 8px; }
.footer-inner { padding-top: 12px; padding-bottom: 14px; gap: 2px; }

.cal-add-note { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.cal-add-btns > [hidden] { display: none !important; }

/* Sem zoom nenhum (pinça ou toque duplo), sobretudo na app instalada: "pan-x pan-y" só deixa deslizar.
   ("manipulation" bloqueava o toque duplo mas ainda deixava fazer zoom com dois dedos.) */
/* Só na app instalada: sem duplo toque para dar zoom (no site, o zoom fica livre) */
html.is-app *, html.is-app { touch-action: pan-x pan-y; }
/* Campos com letra < 16px fazem o iPhone aproximar ao escrever: garantir 16px */
input, select, textarea { font-size: max(16px, 1em); }

/* Registo de notificações por páginas */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.pager-info { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager .icon-btn { width: 40px; height: 40px; font-size: 1.3rem; }

/* Agenda: botão do período (meio das setas). Fora do período atual fica realçado: tocar volta a hoje. */
#ag-today { min-width: 7.5rem; white-space: nowrap; }
#ag-today.is-away { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }

/* =====================================================================
   Tema do salão: claro, sóbrio e profissional
   ===================================================================== */
body { background: var(--bg); }
.site-header { background: rgba(251, 243, 241, .94); border-bottom: 1px solid var(--line); box-shadow: none; }
.site-footer { background: var(--bg); border-top-color: var(--line); }
.back-btn { border-color: var(--line-strong); color: var(--text); background: var(--surface); }

/* Selo + nome do salão no topo */
.brand { gap: 11px; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; background: none; box-shadow: none; }
.brand-name { font: 400 1.42rem/1 var(--display); letter-spacing: .01em; color: var(--text); }

/* Selo, nome e frase por cima do formulário (passo 1) */
.step-float { gap: 14px; }
.hero-mark { width: 100%; max-width: 440px; text-align: center; padding: 6px 0 2px; animation: float-in .6s cubic-bezier(.2, .8, .2, 1); }
.hero-logo { display: block; width: 68px; height: 68px; margin: 0 auto; border-radius: 18px; box-shadow: 0 10px 26px rgba(59, 43, 47, .18); }
.hero-name { margin: 14px 0 0; font: 400 2.3rem/1.05 var(--display); color: var(--text); letter-spacing: .005em; }
.hero-tag { margin: 8px 0 0; font: 600 .66rem/1.5 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .hero-mark { animation: none; } }

.float-card { border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px; background: var(--surface); }
.float-title { font: 400 1.75rem/1.1 var(--display); letter-spacing: .01em; color: var(--text); }
.float-title::after { width: 40px; height: 2px; border-radius: 2px; background: var(--brass-light); margin-top: 12px; }

/* Títulos dos passos: elegantes e centrados, com filete fino */
.step-eyebrow, .step-sub { margin: 0; text-align: center; }
.step-eyebrow { font: 700 .64rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.step-title { font: 400 2.15rem/1.1 var(--display); letter-spacing: .005em; color: var(--text); text-align: center; margin: 10px 0 6px; }
.step:not(.step-float) > .step-title::after { content: ""; display: block; width: 40px; height: 2px; border-radius: 2px; background: var(--brass-light); margin: 14px auto 0; }
.step-sub { color: var(--muted); font-size: .88rem; margin: 0 0 18px; }
.step:not(.step-float) > .step-title:not(:has(+ .step-sub)) { margin-bottom: 20px; }
#slots-date { display: block; text-align: center; margin: 0 0 14px; font-size: .88rem; color: var(--muted); }
.summary-bar { justify-content: center; }
.summary-bar .chip { background: var(--surface); border-color: var(--line); color: var(--text); font-weight: 500; letter-spacing: .02em; }

/* Serviços */
.service { border: 1px solid var(--line); box-shadow: none; background: var(--surface); }
.service:hover { border-color: var(--bege); }
.service[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.service-name { font: 600 1rem/1.3 var(--sans); color: var(--text); letter-spacing: .005em; }
.service-price { font: 700 1rem var(--sans); color: var(--accent); letter-spacing: .01em; }

/* Calendário e horas */
.calendar { border: 1px solid var(--line); box-shadow: none; background: var(--surface); }
.cal-month { font: 400 1.5rem var(--display); text-transform: capitalize; letter-spacing: .01em; color: var(--text); }
.cal-weekdays span { font-weight: 500; }
.cal-day[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.cal-day.today { border-color: var(--bege); }
.slot { border-color: var(--line); background: var(--surface); font-weight: 500; }
.slot:hover { border-color: var(--bege); }
.slot[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.slot-group-label { color: var(--accent); font-weight: 700; letter-spacing: .26em; }
.empty { background: var(--surface); border-color: var(--line-strong); }
.card { border: 1px solid var(--line); box-shadow: none; background: var(--surface); }

.btn { font: 500 .95rem/1 var(--sans); letter-spacing: .04em; text-transform: none; }
.btn-primary { box-shadow: none; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-small, .btn-cal { text-transform: none; letter-spacing: .01em; font-size: .84rem; font-weight: 600; }
.btn-ghost { background: var(--surface); }
input, select { background: var(--surface-2); border-color: var(--line); }
input:focus, select:focus { border-color: var(--bege); background: var(--surface); }

/* Confirmação: bilhete com um visto numa faixa café */
.ticket { border: 1px solid var(--line); padding-top: 0; background: var(--surface); }
.ticket::before { display: none; }
.ticket-band { margin: 0 -24px 20px; padding: 26px 0 22px; text-align: center; background: var(--ink); }
.ticket-check { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--brass-light); color: var(--brass-light); }
.ticket-eyebrow { color: var(--accent); letter-spacing: .3em; font-weight: 700; }
.ticket .step-title { font-size: 2.2rem; text-align: left; margin: 8px 0 18px; }
.ticket .step-title::after { display: none; }
.script { display: block; font: 400 1.6rem/1.2 var(--display); font-style: italic; text-transform: none; color: var(--accent); letter-spacing: .01em; margin-top: 4px; }

/* Gestão */
.admin-h1 { font: 400 2.4rem var(--display); letter-spacing: .005em; color: var(--text); }
.panel-title, .agenda-range, .review-title { font-family: var(--display); font-weight: 400; color: var(--text); font-size: 1.6rem; letter-spacing: .005em; }
.agenda-day-title { color: var(--accent); font-weight: 700; letter-spacing: .18em; border-bottom-color: var(--line); }
.bk { border: 1px solid var(--line); box-shadow: none; background: var(--surface); }
.plain-list li { border-color: var(--line); background: var(--surface); }
.settings-menu { border-color: var(--line); box-shadow: none; }
.subtab { background: var(--surface); }
.seg-btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.badge-online { background: var(--accent-soft); color: var(--accent); }
.badge-manual { background: var(--creme); color: var(--text); }
.month-day.has { background: var(--accent-soft); border-color: var(--bege); }
.simple-page { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; margin-top: 30px; margin-bottom: 30px; padding: 40px 24px; }
.simple-page h1, .legal-page h2 { font-family: var(--display); font-weight: 400; color: var(--text); letter-spacing: .005em; }
.simple-page h1 { font-size: 2rem; }
.legal-page h2 { font-size: 1.25rem; }
.simple-logo { width: 64px; height: 64px; border-radius: 16px; box-shadow: none; }
.cal-legend, .month-legend, .month-total { color: var(--muted); }

/* ---------- Agenda: semana em grelha horária ---------- */
/* Ocupa mais largura do que o resto da página (no iPad/computador cabe a semana toda) */
.wk-outer { position: relative; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100vw - 24px)); }
/* Desliza só com o dedo (ou trackpad): sem barra de deslocamento visível */
.wk-scroll {
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.wk-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.wk { display: grid; grid-template-columns: 48px repeat(7, minmax(118px, 1fr)); width: max(100%, calc(48px + 7 * 118px)); }
.wk-corner, .wk-times { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); }
.wk-h { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 8px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wk-corner { border-bottom: 1px solid var(--line); }
.wk-wd { font: 700 .6rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.wk-dn { font: 400 1.35rem/1.1 var(--display); color: var(--text); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.wk-h.today .wk-dn { background: var(--cafe); color: var(--primary-ink); }
.wk-h.today .wk-wd { color: var(--text); }
.wk-h.past { opacity: .55; }
.wk-times { position: sticky; }
.wk-times span { position: absolute; right: 6px; transform: translateY(-50%); font: 500 .62rem/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.wk-times span:first-child { transform: translateY(2px); }
/* Coluna do dia: linhas de hora (cheias) e de meia hora (tracejado claro) */
.wk-day {
  position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(to bottom, transparent 0 44px, #f1e9de 44px 45px, transparent 45px 88px);
}
.wk-day.today { background-color: #fcf8f2; }
.wk-off {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(135deg, #f6e6e3 0 7px, #ecd6d2 7px 14px);
  display: flex; align-items: flex-start; justify-content: center; overflow: hidden;
}
.wk-off span { margin-top: 8px; font: 500 .6rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .88); padding: 4px 7px; border-radius: 6px; }
.wk-bk {
  position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 5px 7px; overflow: hidden;
  border: 0; border-radius: 9px; background: var(--bk, var(--ink)); color: #fff; text-align: left; cursor: pointer;
  font: 400 .7rem/1.25 var(--sans); box-shadow: 0 2px 6px rgba(59, 43, 47, .18);
}
.wk-bk.done { opacity: .6; }
/* Pedido por aceitar: claro, com contorno tracejado (vê-se logo que falta decidir) */
.wk-bk.pending { background: var(--creme); color: var(--cafe); box-shadow: inset 0 0 0 1.5px var(--taupe); outline: 1px dashed var(--taupe); outline-offset: -4px; }
.wk-bk.new { box-shadow: 0 0 0 2px var(--bege), 0 2px 6px rgba(59, 43, 47, .18); }
.wk-bk b { font-weight: 600; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-t { font-variant-numeric: tabular-nums; opacity: .9; }
.wk-s { opacity: .85; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wk-now { position: absolute; left: -4px; right: 0; z-index: 3; height: 2px; background: var(--danger); pointer-events: none; }
.wk-now::before { content: ""; position: absolute; left: 0; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.wk-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 10px 4px 0; }
.wk-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wk-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.lg-online { background: var(--taupe); }
.lg-manual { background: var(--cafe); }
.lg-pending { background: var(--creme); box-shadow: inset 0 0 0 1.5px var(--taupe); }
.wk-legend .lg-off { background: repeating-linear-gradient(135deg, #f6e6e3 0 3px, #ecd6d2 3px 6px); border: 1px solid var(--line); }
.wk-hint { margin-left: auto; font-style: italic; }
@media (max-width: 640px) { .wk-hint { margin-left: 0; } }

/* Detalhe da marcação aberto a partir da grelha */
.bk-dialog { padding: 18px; width: min(460px, calc(100vw - 24px)); }
.bk-dialog .bk { margin: 0 0 12px; box-shadow: none; }
/* A janela é estreita mesmo em ecrãs largos: os botões ficam por baixo, como no telemóvel */
@media (min-width: 640px) {
  .bk-dialog .bk { grid-template-columns: 80px 1fr; }
  .bk-dialog .bk-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; margin-top: 8px; }
}
.bk-dialog-date { margin: 0 0 10px; font: 700 .64rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }

/* Vista Dia: a mesma grelha, uma só coluna à largura da página (sem deslizar) */
.wk-outer-single { left: auto; transform: none; width: 100%; }
.wk.wk-single { grid-template-columns: 48px minmax(0, 1fr); width: 100%; }
.wk-single .wk-bk { font-size: .78rem; padding: 6px 10px; }
.wk-single .wk-bk b { font-size: .84rem; }

/* =====================================================================
   Cabeleireiras: escolha da cliente, avatares, filtro da agenda e gestão
   ===================================================================== */
.avatar {
  --av: var(--ink);
  flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--av); color: #fff; font: 700 .95rem/1 var(--sans); letter-spacing: .04em;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line);
}
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; box-shadow: none; }
.avatar-any { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--accent-line); }

/* Passo "Com quem quer cortar?" */
.barber-list { display: grid; gap: 10px; }
.barber {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; font: inherit; transition: border-color .2s, background .2s, transform .2s;
}
.barber:hover { border-color: var(--accent-line); }
.barber:active { transform: scale(.99); }
.barber[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.barber-any { border-style: dashed; border-color: var(--accent-line); }
.barber-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.barber-name { font: 600 1.06rem/1.25 var(--sans); }
.barber-spec { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.barber-go { color: var(--line-strong); font: 300 1.7rem/1 var(--sans); }
.barber:hover .barber-go { color: var(--accent); }
@media (min-width: 640px) { .barber-list { grid-template-columns: 1fr 1fr; } .barber-any { grid-column: 1 / -1; } }
.chip-barber::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brass-light); }

/* Filtro de cabeleireira na agenda */
.barber-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 2px; }
.bf-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 .84rem var(--sans); cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.bf-chip:hover { border-color: var(--line-strong); color: var(--text); }
.bf-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bf-dot { --av: var(--ink); display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--av); }
.bf-chip[aria-pressed="true"] .bf-dot { box-shadow: 0 0 0 2px #fff; }

/* Cartão de marcação: cabeleireira */
.bk-barber { display: flex; align-items: center; gap: 7px; color: var(--text); font-weight: 600; }

/* Grelha: cabeçalho com a cabeleireira e etiqueta da cabeleireira na semana */
.wk-h-barber { flex-direction: row; justify-content: center; gap: 8px; padding: 10px 6px; }
.wk-bn { font: 700 .82rem/1.2 var(--sans); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-br { margin-top: auto; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.wk-bk.pending { --bk: var(--accent-soft); color: var(--ink); }
.wk-team .wk-day { min-width: 0; }

/* Bloqueios: para quem */
.block-who { display: flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.plain-list li > span:first-child { display: grid; }

/* Gestão das cabeleireiras */
.panel-lede { margin: 0 0 14px; }
.br-row { display: grid; gap: 12px; }
.br-row.inactive { opacity: .6; }
.br-head { display: flex; align-items: flex-end; gap: 14px; }
.br-head .avatar { margin-bottom: 4px; }
.br-fields { flex: 1; min-width: 0; }
.br-row .row-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.days-off { display: grid; gap: 8px; }
.days-off legend { margin-bottom: 8px; }
.days-off-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-chip { position: relative; display: block; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day-chip span {
  display: grid; place-items: center; min-height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); font: 600 .78rem var(--sans); transition: background .2s, color .2s, border-color .2s;
}
.day-chip input:checked + span { background: var(--danger-soft); border-color: #e8bcb1; color: var(--danger); text-decoration: line-through; }
.day-chip input:focus-visible + span { box-shadow: var(--focus); }
@media (max-width: 420px) { .br-head { flex-direction: column; align-items: stretch; } .br-head .avatar { align-self: flex-start; } }
.wk-team .wk-h-barber { gap: 6px; padding: 10px 4px; }
.wk-team .avatar-sm { width: 24px; height: 24px; font-size: .6rem; }

/* =====================================================================
   Cantos retos, ligeiramente arredondados (estilo de salão clássica)
   Para mudar o arredondamento de tudo, basta mudar estas três variáveis.
   ===================================================================== */
:root {
  --r-btn: 6px;     /* botões, horas, separadores, campos */
  --radius: 8px;    /* cartões */
  --radius-sm: 6px; /* cartões pequenos e campos */
}
.btn, .slot, .subtab, .tab, .seg, .bf-chip, .chip, .icon-btn, .back-btn, .skip-link,
input, select, .day-chip span, .btn-cal { border-radius: var(--r-btn); }
.seg-btn { border-radius: 4px; }
.cal-day, .month-day, .wk-dn { border-radius: var(--r-btn); }
.float-card, .ticket, dialog, .simple-page, .calendar, .card, .service, .barber, .empty, .settings-menu, .wk-scroll { border-radius: var(--radius); }
.toast { border-radius: var(--r-btn); }
.badge, .review-count, .month-count, .wk-off span { border-radius: 3px; }
.wk-bk { border-radius: 4px; }
.avatar { border-radius: var(--r-btn); }
.ticket-check { border-radius: var(--r-btn); }
.brand-logo { border-radius: 8px; }
.hero-logo { border-radius: 12px; }

/* Marca por cima dos serviços (primeiro ecrã) e dados da cliente no passo de confirmar */
#step-2 .hero-mark { margin: 6px auto 22px; }
.client-card { margin-top: 4px; }
.client-title { margin: 0; font: 400 1.35rem/1.2 var(--display); color: var(--text); }
.client-card .btn-block { margin-top: 2px; }
/* ---------- Separadores da equipa (Equipa = visão da dona, depois um por cabeleireira) ---------- */
.team-tabs {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 16px; padding: 2px 20px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.team-tabs::-webkit-scrollbar { display: none; }
.team-tab {
  flex: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px 8px 9px;
  border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
}
.team-tab:hover { border-color: var(--line-strong); }
.team-tab[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--brass-light); }
.tt-text { display: grid; gap: 1px; }
.tt-name { font: 700 .9rem/1.2 var(--sans); white-space: nowrap; }
.tt-sub { font: 600 .62rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.team-tab .avatar-sm { width: 32px; height: 32px; font-size: .72rem; box-shadow: none; }
.avatar-team { background: var(--accent-soft); color: var(--accent); font-size: .9rem !important; }
@media (min-width: 640px) { .team-tabs { margin: 0 0 16px; padding: 2px 0 6px; flex-wrap: wrap; } }

/* Resumo do período por cabeleireira */
.ag-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0 0 14px; }
.sm-cell { display: grid; gap: 2px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sm-cell:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }
.sm-cell:first-child .sm-who, .sm-cell:first-child .sm-money { color: rgba(255, 255, 255, .75); }
.sm-who { display: flex; align-items: center; gap: 6px; font: 700 .62rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sm-n { font: 700 1rem/1.3 var(--sans); }
.sm-money { font: 600 .86rem/1.3 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }

/* Cabeleireiras: dona */
.br-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.avatar { position: relative; }
.owner-mark {
  position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brass-light); color: var(--ink); font-size: .66rem;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Fim: resumo do pedido ---------- */
.done-title { margin-bottom: 14px; }
.done-title::after { display: none !important; }
#step-7 .ticket-pending { text-align: center; margin: 0 auto 16px; max-width: 380px; }
.done-card { max-width: 380px; margin: 8px auto 24px; }
.done-eyebrow { margin: 0 0 14px; text-align: center; font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.done-actions { max-width: 360px; margin: 0 auto; }
.done-actions .muted { text-align: center; }

/* ---------- Contas: a cabeleireira não vê as definições da dona ---------- */
.role-barber .owner-only { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.br-access { display: grid; gap: 8px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.br-access.on { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }
.br-access-status { margin: 0; font: 600 .86rem/1.4 var(--sans); }
.br-access.on .br-access-status::before { content: "✓ "; color: var(--ok); }
.br-access-row { display: flex; gap: 8px; }
.br-access-row input { flex: 1; min-width: 0; min-height: 40px; }
.br-access .link-btn { justify-self: start; padding: 0; color: var(--danger); }
select:disabled { opacity: .75; }

/* ---------- Avaliações no Google ---------- */
.rv-card { display: grid; gap: 12px; }
.rv-card .panel-title { margin: 0; }
.rv-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.rv-switch span { display: grid; gap: 2px; }
.rv-switch strong { font-weight: 700; }
.rv-switch small { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.rv-status { margin: 0; font-size: .86rem; font-weight: 600; }
.rv-status.ok { color: var(--ok); }
.rv-status.ok::before { content: "✓ "; }
.rv-status.warn { color: #9a5a1e; }
.rv-preview summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--accent); }
.rv-preview pre { margin: 8px 0 0; padding: 12px; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 400 .84rem/1.55 var(--sans); }
.rv-subject { margin: 8px 0 0; font-weight: 700; font-size: .86rem; }
.rv-stats { margin: 0; text-align: center; }

/* ---------- Fotos das cabeleireiras ---------- */
.avatar.has-photo { background: var(--bg-2); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.1rem; }
.barber .avatar { width: 56px; height: 56px; }
.br-photo { display: grid; justify-items: center; gap: 2px; flex: none; }
.br-photo .link-btn { padding: 2px 4px; font-size: .78rem; font-weight: 700; }
.br-photo-btn { color: var(--accent); }
.br-photo-del { color: var(--danger); }
.br-head { align-items: flex-start; }
.br-head .br-fields { padding-top: 2px; }
body:not(.role-barber) .barber-only { display: none !important; }
.my-photo { display: grid; gap: 10px; }
.my-photo .panel-title, .my-photo p { margin: 0; }
.my-photo-row { display: flex; align-items: center; gap: 16px; }
.my-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Editor de foto */
.photo-dialog { width: min(420px, calc(100vw - 24px)); padding: 20px; }
.photo-dialog .panel-title { margin: 0 0 4px; }
.photo-help { margin: 0 0 14px; }
.crop-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: var(--r-btn); overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); }
#crop-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#crop-canvas:active { cursor: grabbing; }
/* Linhas de ajuda (terços) para centrar a cara */
.crop-guides { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.55) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.55) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.55) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.55) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(300px, 100%); margin: 14px auto 6px; }
.crop-zoom input[type="range"] { flex: 1; min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--ink); }
.photo-dialog .confirm-actions { margin-top: 10px; }
.photo-cancel { margin-top: 8px; min-height: 46px; }

/* ---------- A sua marcação (link do email) ---------- */
.mg-card { margin-top: 6px; }
.mg-note { margin: 4px 0 14px; text-align: center; color: var(--muted); font-size: .9rem; }
.mg-note:empty { display: none; }
.mg-actions { display: grid; gap: 10px; margin-bottom: 18px; }
.mg-cancel { color: var(--danger); border-color: #ecc6bd; }
#step-manage .cal-add { margin-bottom: 16px; }
.done-manage { margin: 0 0 6px; }
.barber-price { font-size: .8rem; font-weight: 700; color: var(--accent); }
/* A remarcar: sem os campos dos dados (já existem), só a confirmação da nova hora */
.client-card .resched-note { display: none; margin: 0; }
.client-card.rescheduling .resched-note { display: block; }
.client-card.rescheduling .field, .client-card.rescheduling .client-title { display: none; }

/* ---------- Faltas ---------- */
.badge-noshow { background: var(--danger); color: #fff; }
.bk.bk-noshow { border-color: #ecc6bd; background: #fdf6f3; }

/* ---------- Ficha da cabeleireira: horário próprio e serviços ---------- */
.br-section { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 0 14px; }
.br-section[open] { padding-bottom: 14px; }
.br-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; cursor: pointer; font-weight: 700; list-style: none; }
.br-section > summary::-webkit-details-marker { display: none; }
.br-section > summary::after { content: "›"; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.br-section[open] > summary::after { transform: rotate(90deg); }
.br-section > summary small { margin-left: auto; font-weight: 600; color: var(--muted); font-size: .8rem; }
.br-section > p { margin: 0 0 10px; }
.br-hours-row { background: var(--surface); }
.br-hours-row.same .hours-times { display: none; }
.br-svcs { display: grid; gap: 6px; }
.br-svc { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.br-svc.off { opacity: .55; }
.br-svc.off .br-svc-vals { visibility: hidden; }
.br-svc-name { font-weight: 600; min-width: 0; }
.br-svc-vals { display: flex; align-items: center; gap: 4px; }
.br-svc-vals input { width: 74px; min-height: 38px; padding: 6px 8px; text-align: right; }
.br-svc-unit { font-size: .8rem; color: var(--muted); margin-right: 4px; }

/* O meu perfil */
#profile-form { gap: 14px; }

/* ---------- Separadores da gestão: 6 em duas linhas no telemóvel ---------- */
.subtabs { grid-template-columns: repeat(3, 1fr); }
.subtab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .68rem; }
.subtab-count:empty { display: none; }

/* ---------- Caixa ---------- */
.badge-paid { background: #e6efe5; color: var(--ok); }
.pay-dialog { width: min(420px, calc(100vw - 24px)); }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pay-methods legend { margin-bottom: 8px; }
.pay-methods label { position: relative; display: block; cursor: pointer; }
.pay-methods input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.pay-methods span { display: grid; place-items: center; min-height: 48px; border: 1.5px solid var(--accent-line); border-radius: var(--r-btn); font-weight: 700; background: var(--surface); }
.pay-methods input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pay-methods input:focus-visible + span { box-shadow: var(--focus); }
.pay-undo { justify-self: center; color: var(--danger); }
.choice-actions { display: grid; gap: 8px; margin-top: 6px; }

/* ---------- Clientes ---------- */
.client-search input { min-height: 50px; }
.client-list { display: grid; gap: 8px; }
.client-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.client-row:hover { border-color: var(--accent-line); }
.cr-main { display: grid; gap: 2px; min-width: 0; }
.cr-main strong { font-weight: 700; }
.cr-note { color: var(--accent); }
.cr-meta { display: grid; justify-items: end; gap: 2px; text-align: right; font-size: .84rem; font-weight: 600; flex: none; }
.bk-client { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.cl-back { padding: 4px 0; margin-bottom: 10px; color: var(--accent); font-weight: 700; }
.cl-card { display: grid; gap: 10px; }
.cl-card .panel-title { margin: 0; }
.cl-contacts { margin: 0; font-weight: 600; }
.cl-contacts a { color: var(--accent); }
.cl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cl-stat { display: grid; gap: 2px; padding: 10px 6px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cl-stat strong { font-size: 1rem; }
.cl-stat span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.cl-actions { display: grid; gap: 8px; justify-items: start; }
.cl-fav { margin: 0; }
.cl-notes { display: grid; gap: 8px; }
.cl-notes-title { font-weight: 700; }
.cl-notes textarea, #ex-about { width: 100%; padding: 10px 14px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 1rem/1.5 var(--sans); resize: vertical; }
.cl-notes-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-hist-title { font: 400 1.35rem var(--display); margin: 18px 0 8px; }
.cl-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-h { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cl-h-date { display: grid; font-weight: 700; font-size: .86rem; flex: none; min-width: 84px; font-variant-numeric: tabular-nums; }
.cl-h-date small { font-weight: 500; color: var(--muted); }
.cl-h-main { display: grid; gap: 1px; flex: 1; min-width: 0; }
.cl-h-cancelled, .cl-h-no_show { opacity: .75; }
@media (max-width: 420px) { .cl-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Lista de espera ---------- */

/* ---------- Relatórios ---------- */
.rp-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.rp-periods { display: flex; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.kpi { display: grid; gap: 2px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.kpi:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi strong { font: 700 1.3rem/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.kpi span { font: 700 .66rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi:first-child span, .kpi:first-child small { color: rgba(255, 255, 255, .75); }
.kpi small { font-size: .78rem; color: var(--muted); }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.rp-card h3 { margin: 0 0 8px; font: 400 1.3rem var(--display); }
.rp-table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.rp-table th { text-align: left; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.rp-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.rp-table td:not(:first-child), .rp-table th:not(:first-child) { text-align: right; }
.rp-export { margin-top: 6px; }
.br-commission input { width: 64px; min-height: 36px; padding: 4px 8px; text-align: right; }

/* ---------- Página de apresentação ---------- */
.home { padding-top: 10px; padding-bottom: 90px; }
.home-hero { text-align: center; padding: 16px 0 6px; }
.home-logo { display: block; width: 76px; height: 76px; margin: 0 auto; border-radius: 16px; box-shadow: 0 10px 26px rgba(59, 43, 47, .18); }
.home-name { margin: 14px 0 2px; font: 400 2.5rem/1.05 var(--display); outline: none; }
.home-about { max-width: 520px; margin: 14px auto 0; color: var(--muted); line-height: 1.6; white-space: pre-line; }
.home-about:empty { display: none; }
.home-cta { margin-top: 20px; min-width: 220px; }
.home-perks { display: grid; gap: 8px; margin: 22px 0 6px; }
.home-perks:empty { display: none; }
.perk { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; }
.perk span { color: rgba(255, 255, 255, .75); font-size: .88rem; }
.perk:nth-child(2) { background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent-line); }
.perk:nth-child(2) span { color: var(--muted); }
@media (min-width: 640px) { .home-perks { grid-template-columns: 1fr 1fr; } }
.home-sec { margin-top: 30px; }
.home-h2 { margin: 0 0 12px; font: 400 1.7rem/1.1 var(--display); }
.home-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.home-photo { padding: 0; border: 0; background: var(--bg-2); border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.home-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.home-photo:hover img { transform: scale(1.04); }
.home-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.home-member { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.avatar-xl { width: 76px; height: 76px; font-size: 1.3rem; margin-bottom: 6px; }
.home-prices, .home-hours { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.home-prices li { display: flex; align-items: baseline; gap: 8px; }
.hp-name { font-weight: 600; }
.hp-dots { flex: 1; border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-4px); min-width: 12px; }
.hp-meta { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.home-prices strong { color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-hours li { display: flex; justify-content: space-between; gap: 10px; text-transform: capitalize; }
.home-hours li strong { text-transform: none; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.home-hours li.today { color: var(--accent); }
.home-hours li.today span::after { content: " · hoje"; text-transform: none; font-size: .8rem; }
.home-address { margin: 0 0 10px; font-weight: 600; }
.home-address:empty { display: none; }
.home-map { margin-bottom: 10px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); aspect-ratio: 16 / 10; }
.home-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.home-map-btn { display: grid; place-items: center; align-content: center; gap: 4px; width: 100%; height: 100%; border: 0; cursor: pointer; font: inherit; color: var(--text);
  background: repeating-linear-gradient(45deg, var(--bg-2) 0 14px, var(--surface-2) 14px 28px); }
.home-map-btn span { font-size: 1.8rem; }
.home-map-btn small { color: var(--muted); }
.home-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-links .btn-cal { min-height: 48px; font-size: .9rem; }
.home-links a[href^="tel:"] { white-space: nowrap; }
.home-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(251, 243, 241, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.home-sticky .btn { max-width: 720px; margin: 0 auto; display: flex; }
.has-landing #step-2 .hero-mark { display: none; }
.photo-view { padding: 10px; width: min(640px, calc(100vw - 20px)); }
.photo-view img { display: block; width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; }

/* ---------- Vários serviços ---------- */
.svc-bar { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 10px 10px 16px;
  background: var(--ink); color: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.svc-bar-text { font-weight: 700; font-size: .9rem; }
.svc-bar .btn { background: #fff; color: var(--ink); min-height: 44px; }

/* ---------- Cartão de fidelização ---------- */
.loyalty-card { text-align: center; }
.ly-title { margin: 0 0 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .74rem; }
.ly-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.ly-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .5; }
.ly-dot.on { background: currentColor; opacity: 1; }
.ly-gift { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; border-radius: 50%; border: 1.5px dashed currentColor; font-size: .7rem; opacity: .6; }
.ly-gift.on { background: var(--brass-light); border: 0; color: var(--ink); opacity: 1; }
.ly-text { margin: 8px 0 0; font-size: .82rem; }

/* ---------- Gestão: fidelização, vales e galeria ---------- */
.badge-gift { background: var(--brass-light); color: var(--ink); }
.pay-loyalty { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--accent-line); font-weight: 600; }
.pay-voucher-line { display: flex; gap: 8px; }
.pay-voucher-line input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .06em; }
#pay-voucher-info.ok { color: var(--ok); font-weight: 600; }
.using-loyalty .pay-methods, .using-loyalty .pay-voucher { opacity: .4; pointer-events: none; }
.cl-seg { margin-bottom: 12px; }
.vo-item { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 8px; }
.vo-item p { margin: 0; }
.vo-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vo-code { font: 700 1rem ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.vo-value { font: 700 1.3rem var(--sans); }
.vo-used, .vo-expired, .vo-void { opacity: .6; }
.gallery-admin { display: grid; gap: 10px; }
.gallery-admin .panel-title, .gallery-admin p { margin: 0; }
.ga-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ga-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.ga-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ga-del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(59, 43, 47, .75); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }

/* Página do vale de oferta (para imprimir) */
.voucher { margin: 10px 0 18px; padding: 26px 20px; text-align: center; color: #fff; border-radius: 14px;
  background: radial-gradient(circle at 20% 0%, #4a3727, var(--ink) 70%); box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--brass-light); }
.voucher p { margin: 0; }
.voucher-shop { font: 400 1.4rem var(--display); }
.voucher-kind { margin-top: 4px !important; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--brass-light); font-weight: 700; }
.voucher-value { margin: 14px 0 8px !important; font: 700 2.8rem/1 var(--sans); }
.voucher-for { font-size: 1.05rem; }
.voucher-from { color: rgba(255, 255, 255, .75); font-size: .9rem; }
.voucher-code { margin-top: 16px !important; display: inline-block; padding: 6px 14px; border: 1.5px dashed var(--brass-light); border-radius: 8px; font: 700 1.1rem ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.voucher-meta { margin-top: 8px !important; color: rgba(255, 255, 255, .75); font-size: .82rem; }
.voucher-off { filter: grayscale(1); opacity: .7; }
@media print { .voucher-page .credit, .voucher-page a.link { display: none; } }

/* Títulos que recebem o foco ao mudar de passo (para leitores de ecrã): sem contorno visível */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { box-shadow: none; outline: none; }

/* =====================================================================
   Botões: retângulo de cantos suaves, texto em negrito sem maiúsculas
   ===================================================================== */
:root { --r-btn: 12px; }
.btn { font: 700 1rem/1.2 var(--sans); letter-spacing: 0; text-transform: none; min-height: 54px; padding: 14px 24px; }
.btn-small { font-size: .88rem; min-height: 40px; padding: 8px 16px; border-radius: 10px; }
.btn-primary { background: #3b2b2f; color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { border-color: var(--accent-line); }
.btn-cal {
  min-height: 56px; gap: 10px; font: 700 1rem/1 var(--sans); letter-spacing: 0;
  background: transparent; color: var(--text); border: 1.5px solid var(--accent-line); border-radius: var(--r-btn);
}
.btn-cal svg { color: var(--text); width: 20px; height: 20px; }
.btn-cal:hover { background: var(--surface); border-color: var(--brass-light); }
.done-contact { text-align: center; color: var(--muted); font-size: .95rem; margin: 18px 0; }
.done-contact a { color: #7a3a2c; text-underline-offset: 4px; }

/* =====================================================================
   Botões da gestão iguais aos restantes: cantos suaves, negrito, contorno bege
   ===================================================================== */
.subtab, .seg-btn, #ag-today, .bf-chip, .team-tab, .icon-btn, .back-btn, .settings-btn {
  font-family: var(--sans); font-weight: 700; letter-spacing: 0; text-transform: none;
}
.subtab, .icon-btn, .back-btn, .settings-btn, #ag-today, .bf-chip, .team-tab {
  border: 1.5px solid var(--accent-line); background: var(--surface); color: var(--text); border-radius: var(--r-btn);
}
.subtab { min-height: 46px; padding: 10px 16px; font-size: .92rem; }
.subtab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.subtab:hover:not([aria-selected="true"]) { border-color: var(--brass-light); }
/* Seletor Próximas/Dia/Semana/Mês: uma barra com o mesmo contorno, opção ativa preenchida */
.seg { border: 1.5px solid var(--accent-line); border-radius: var(--r-btn); padding: 4px; background: var(--surface); }
.seg-btn { min-height: 38px; padding: 8px 14px; font-size: .92rem; color: var(--muted); border-radius: 8px; }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg-btn:hover:not([aria-pressed="true"]) { color: var(--text); }
/* Setas e botão do dia */
.agenda-nav { gap: 8px; margin-top: 10px; }
.icon-btn { width: 46px; height: 46px; display: inline-grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.icon-btn:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--brass-light); background: var(--surface); }
#ag-today { min-height: 46px; padding: 10px 18px; font-size: .92rem; }
#ag-today.is-away { background: var(--accent-soft); border-color: var(--brass-light); color: var(--accent); }
.settings-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bf-chip[aria-pressed="true"], .team-tab[aria-pressed="true"] { border-color: var(--ink); }
/* Agenda / Nova marcação / Bloqueios sempre numa linha */
.subtabs { display: grid; grid-template-columns: .8fr 1.25fr 1fr; gap: 6px; }
.subtab { padding: 10px 6px; font-size: .88rem; white-space: nowrap; min-width: 0; }
@media (min-width: 640px) { .subtabs { display: flex; } .subtab { padding: 10px 18px; } }
@media (max-width: 420px) {
  .br-head { align-items: stretch; }
  .br-photo { justify-items: start; grid-template-columns: auto auto auto; align-items: center; gap: 4px 12px; }
}
.br-hours-row .hours-row-head { flex-wrap: wrap; gap: 4px 14px; }
.br-hours-row .hours-row-head strong { min-width: 74px; text-transform: capitalize; }
.br-hours-row .check-inline { font-size: .84rem; color: var(--muted); }

/* Modo de pedidos: aviso de que a marcação ainda vai ser confirmada pelo salão */
.request-note {
  margin: 0 0 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--line); color: var(--text); font-size: .9rem; line-height: 1.5;
}
.bk-warn { color: var(--danger); font-weight: 600; }
.bk-barber-name { white-space: nowrap; }
.bk-nopref { margin-top: -2px; padding-left: 15px; font-size: .8rem; color: var(--muted); }

/* ---------- Fundo de mármore (site das clientes e gestão) ---------- */
/* O mármore vai numa camada fixa atrás de tudo: 'background-attachment: fixed' falha no iPhone e no Android
   (a imagem corta-se no fim da página e aparece uma faixa lisa). Assim cobre sempre o ecrã inteiro. */
html { background: #fbf3f1; }
body { background: transparent; position: relative; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("/img/marmore.png") center / cover no-repeat;
}
/* Cabeçalho: vidro fosco quase transparente, sem cor-de-rosa, para o mármore se ver através */
.site-header { background: rgba(255, 255, 255, .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .55); box-shadow: none; }
.site-header .brand-name, .site-header .back-btn, .site-header .settings-btn { text-shadow: 0 0 8px rgba(255, 255, 255, .9); }
.card,
.service,
.barber,
.calendar { background: rgba(255, 255, 255, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Ficha de cliente: alerta de alergias e nota por visita */
.cl-alert { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: .92rem; white-space: pre-wrap; }
.cr-alert { color: var(--danger); }
.cl-owed { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: .92rem; }
.cl-debts { display: grid; gap: 8px; margin-bottom: 14px; border-color: var(--danger); }
.cl-debts h2 { margin: 0; color: var(--danger); }
.pay-owe { color: var(--danger); }
.cl-h-owed { display: block; width: fit-content; margin: 4px 0; }
.cl-notes .cl-notes-title:not(:first-child) { margin-top: 6px; }
.cl-vnote { display: grid; gap: 4px; justify-items: start; margin-top: 2px; }
.cl-vnote-text { font-size: .86rem; color: var(--text); white-space: pre-wrap; }
.cl-vnote-btn { font-size: .8rem; color: var(--accent); font-weight: 600; padding: 0; }
.cl-vnote textarea { width: 100%; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 .95rem/1.4 var(--sans); resize: vertical; }
.cl-vnote-actions { display: flex; gap: 8px; }
/* Histórico da cliente em ecrãs estreitos: o estado passa para baixo, para o texto ter largura */
@media (max-width: 480px) {
  .cl-h { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 6px 12px; }
  .cl-h-date { min-width: 76px; }
  .cl-h > .badge { grid-column: 2; justify-self: start; }
}
.cl-more { margin-top: 12px; }

/* Rodapé do site das clientes: sem fundo nem linha, o texto fica diretamente sobre o mármore */
.site-footer { background: transparent; border-top-color: transparent; }
.site-footer .muted, .site-footer a { color: var(--text); }
.site-footer p { text-shadow: 0 0 6px rgba(255, 255, 255, .95), 0 0 2px rgba(255, 255, 255, .9); }
.site-footer p, .site-footer p a { color: var(--text); }
.site-footer .credit { opacity: 1; font-size: .8rem; }

/* Cabeçalho numa só linha em telemóveis: o nome do salão encolhe (com reticências) em vez de empurrar o botão das definições para baixo */
.header-inner { flex-wrap: nowrap; }
.header-left { flex: 1 1 auto; }
.tabs { flex: none; }
.brand-logo { flex: none; }
@media (max-width: 480px) {
  .brand-name { font-size: 1.2rem; }
  .brand { gap: 8px; }
  .header-inner { gap: 8px; }
}

/* Plano básico: sem página de apresentação, galeria, fidelização nem vales */
body:not(.plan-has-extras) .plan-extras { display: none !important; }

/* Cabeçalho sem linha: o vidro fosco desvanece-se para o mármore (sem borda nem aresta) */
.site-header { background: none; border-bottom: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -22px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .62), rgba(255, 255, 255, .3) 60%, rgba(255, 255, 255, 0));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 62%, transparent 100%);
}

/* Relatórios: as tabelas nunca saem do cartão */
.rp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; padding: 0 2px; }
.rp-table th, .rp-table td { white-space: nowrap; }
@media (max-width: 560px) {
  /* "Por cabeleireira": cada linha é um bloco, com o nome em cima e um valor por linha */
  .rp-stack thead { display: none; }
  .rp-stack, .rp-stack tbody, .rp-stack tr { display: block; width: 100%; }
  .rp-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .rp-stack tr:last-child { border-bottom: 0; }
  .rp-stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; white-space: normal; }
  .rp-stack td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-align: left; align-self: center; }
  .rp-stack td:first-child { font-weight: 700; font-size: 1rem; padding-bottom: 6px; justify-content: flex-start; text-align: left; }
  .rp-stack td:first-child::before { content: none; }
}

/* Logótipo sem caixa: só as ondas e a faísca, sobre o fundo */
.brand-logo, .home-logo, .hero-logo { background: none; box-shadow: none; border-radius: 0; filter: drop-shadow(0 1px 2px rgba(255, 255, 255, .8)); }

/* =====================================================================
   Acabamento: botões dourados, pontos dos passos, transições,
   confirmação animada e calendário
   ===================================================================== */
:root { --gold-1: #f3dfa6; --gold-2: #d4af5f; --gold-3: #b8923f; --gold-ink: #2a1c22; --ease-out: cubic-bezier(.22, 1, .36, 1); }

/* 1. Botão principal em ouro, com brilho ao passar/tocar */
.btn-primary {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%);
  color: var(--gold-ink); border: 1px solid rgba(154, 116, 36, .45);
  box-shadow: 0 6px 16px rgba(154, 116, 36, .22), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .15s var(--ease-out), box-shadow .2s, filter .2s;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .7s var(--ease-out);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%); filter: brightness(1.04); box-shadow: 0 8px 22px rgba(154, 116, 36, .3), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-primary:hover::after, .btn-primary:focus-visible::after { transform: translateX(130%); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { filter: saturate(.6); opacity: .6; }

/* 2. Indicador de passos: nós ligados por uma linha fina que se enche de ouro */
.step-eyebrow.js-step-count { display: flex; justify-content: center; margin-top: 12px; min-height: 18px; }
.step-track { display: inline-flex; align-items: center; }
.step-track .sn { flex: none; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid rgba(154, 116, 36, .8); background: rgba(255, 255, 255, .85); transition: all .45s var(--ease-out); }
.step-track .sn.done { background: linear-gradient(135deg, var(--gold-1), var(--gold-3)); border-color: transparent; }
.step-track .sn.on { width: 18px; height: 18px; border: 2px solid var(--gold-2); background: radial-gradient(circle, var(--gold-3) 0 34%, #fff 38% 100%); box-shadow: 0 0 0 5px rgba(212, 175, 95, .2); }
.step-track .sl { flex: none; width: 30px; height: 2px; border-radius: 2px; background: rgba(154, 116, 36, .35); position: relative; overflow: hidden; }
.step-track .sl::after { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--gold-2), var(--gold-3)); transition: transform .55s var(--ease-out); }
.step-track .sl.done::after { transform: scaleX(1); }

/* 3. Transição entre passos: os blocos entram a desvanecer e a subir, um a seguir ao outro */
@keyframes step-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.step { animation: none; }
.step:not([hidden]) > * { animation: step-in .55s var(--ease-out) both; }
.step:not([hidden]) > *:nth-child(2) { animation-delay: .05s; }
.step:not([hidden]) > *:nth-child(3) { animation-delay: .1s; }
.step:not([hidden]) > *:nth-child(4) { animation-delay: .15s; }
.step:not([hidden]) > *:nth-child(n+5) { animation-delay: .2s; }
.step:not([hidden]) .service-list > * { animation: step-in .5s var(--ease-out) both; }
.step:not([hidden]) .service-list > *:nth-child(2) { animation-delay: .04s; }
.step:not([hidden]) .service-list > *:nth-child(3) { animation-delay: .08s; }
.step:not([hidden]) .service-list > *:nth-child(4) { animation-delay: .12s; }
.step:not([hidden]) .service-list > *:nth-child(5) { animation-delay: .16s; }
.step:not([hidden]) .service-list > *:nth-child(n+6) { animation-delay: .2s; }

/* 4. Confirmação: o círculo e o visto desenham-se, as faíscas acendem */
.done-mark { display: flex; justify-content: center; margin: 4px 0 6px; }
.dm-ring { stroke-dasharray: 189; stroke-dashoffset: 189; animation: dm-draw .8s var(--ease-out) .15s forwards; transform: rotate(-90deg); transform-origin: 40px 40px; }
.dm-check { stroke-dasharray: 44; stroke-dashoffset: 44; animation: dm-draw .45s var(--ease-out) .8s forwards; }
.dm-spark { opacity: 0; transform-box: fill-box; transform-origin: center; animation: dm-spark .7s var(--ease-out) forwards; }
.dm-spark-1 { animation-delay: 1.05s; }
.dm-spark-2 { animation-delay: 1.2s; }
@keyframes dm-draw { to { stroke-dashoffset: 0; } }
@keyframes dm-spark { 0% { opacity: 0; transform: scale(.2) rotate(-30deg); } 60% { opacity: 1; transform: scale(1.15) rotate(8deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }

/* 5. Calendário: o dia escolhido num círculo dourado; dias sem horário bem apagados */
.cal-day::after { background: var(--gold-3); opacity: .8; }
.cal-day[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 50%, var(--gold-3));
  color: var(--gold-ink); font-weight: 700; border-color: transparent;
  box-shadow: 0 4px 12px rgba(154, 116, 36, .3); animation: day-pick .35s var(--ease-out);
}
.cal-day[aria-pressed="true"]::after { background: var(--gold-ink); opacity: .6; }
.cal-day:disabled { opacity: .35; }
.cal-day.today:not([aria-pressed="true"]) { border-color: var(--gold-2); }
@keyframes day-pick { from { transform: scale(.8); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .step:not([hidden]) > *, .step:not([hidden]) .service-list > *, .cal-day[aria-pressed="true"] { animation: none; }
  .dm-ring, .dm-check { animation: none; stroke-dashoffset: 0; }
  .dm-spark { animation: none; opacity: 1; }
  .btn-primary::after { display: none; }
}

/* Serviços em grupos, como um menu de salão: título dourado e descrição curta */
/* Título do grupo ocupa a linha toda na grelha de 2 colunas (no PC), para os grupos não ficarem tortos */
.service-list > .svc-group { grid-column: 1 / -1; }
.svc-group { margin: 18px 2px 2px; font: 400 1.25rem/1.2 var(--display); color: var(--gold-ink); display: flex; align-items: center; gap: 12px; }
.svc-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-2), transparent); opacity: .7; }
.svc-group:first-child { margin-top: 0; }
.service-desc { grid-column: 1; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.service-price { grid-row: 1 / span 3; align-self: center; }
.svc-extra { margin-top: 2px; }
.svc-bar .btn { background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 50%, var(--gold-3)); color: var(--gold-ink); border: 0; }

.svc-groupbox { display: grid; gap: 8px; }
.svc-newgroup { border-style: dashed; }

/* Grupos de serviços (gestão) */
.groups-admin { display: grid; gap: 8px; margin-bottom: 14px; }
.groups-admin .panel-title { margin: 0; }
.ga-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.ga-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ga-row:first-child { border-top: 0; }
.ga-name { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ga-name small { font-size: .78rem; }
.svc-admin-group { margin: 18px 2px 8px; font: 400 1.25rem/1.2 var(--display); color: var(--gold-ink); }
.svc-admin-group:first-child { margin-top: 0; }

/* ---------- Fotos das visitas (ficha da cliente) ---------- */
.cl-vphotos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.cl-vphoto { position: relative; }
.cl-vphoto-img { display: block; width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.cl-vphoto-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-vphoto .ga-del { top: -6px; right: -6px; width: 24px; height: 24px; font-size: 1rem; }
.cl-vphoto-add { font-size: .85rem; }
#cl-evolution { margin-top: 6px; }
.cl-evo-lede { margin: -4px 0 10px; }
.cl-evo { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.cl-evo-item { flex: 0 0 132px; scroll-snap-align: end; display: grid; gap: 2px; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; font: inherit; color: inherit; }
.cl-evo-item img { width: 132px; height: 170px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(70, 40, 40, .12); }
.cl-evo-date { font-weight: 600; font-size: .82rem; margin-top: 4px; }
.cl-evo-svc { color: var(--muted); font-size: .76rem; line-height: 1.25; }

/* ---------- Comparar duas datas (antes / depois com linha que desliza) ---------- */
.cl-compare-btn { margin: 0 0 12px; }
.compare-dialog { padding: 16px; width: min(560px, calc(100vw - 20px)); }
.cmp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; align-items: start; }
.cmp-pick select { width: 100%; min-width: 0; }
.cmp-frame { position: relative; aspect-ratio: 3 / 4; max-height: 62vh; width: 100%; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #e9e1dc;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize; border: 1px solid var(--line); outline-offset: 3px; }
.cmp-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: linear-gradient(180deg, #e7cd85, #b8923a); box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 0 14px rgba(0, 0, 0, .35); pointer-events: none; }
.cmp-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #8a6a25; font-weight: 700; font-size: .95rem; letter-spacing: -1px; box-shadow: 0 0 0 2px #b8923a, 0 6px 16px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.cmp-frame.dragging .cmp-knob { transform: translate(-50%, -50%) scale(1.12); }
.cmp-tag { position: absolute; top: 10px; max-width: 46%; padding: 5px 10px; border-radius: 999px; background: rgba(40, 28, 32, .72); color: #fff; font-size: .78rem; line-height: 1.2; pointer-events: none; }
.cmp-tag-a { left: 10px; }
.cmp-tag-b { right: 10px; }
.cmp-hint { text-align: center; margin: 10px 0; }
@media (prefers-reduced-motion: reduce) { .cmp-knob { transition: none; } }
.cmp-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cmp-thumb { width: 42px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: none; cursor: pointer; opacity: .75; }
.cmp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cmp-thumb[aria-pressed="true"] { border-color: #b8923a; opacity: 1; box-shadow: 0 0 0 1px #fff inset; }

/* ---------- Stock de produtos ---------- */
body:not(.plan-has-stock) .plan-stock { display: none !important; }
.stock-summary { margin-bottom: 12px; grid-template-columns: repeat(3, 1fr); }
.stock-summary .stock-warn strong { color: #b3404f; }
.stock-tools { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.stock-tools input { flex: 1; min-width: 0; }
.stock-list { display: grid; gap: 10px; }
.stock-item { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.stock-item.low { border-color: #d9a441; background: linear-gradient(#fff8e8, var(--surface)); }
.stock-item.out { border-color: #c4505f; background: linear-gradient(#fff0f2, var(--surface)); }
.si-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.si-name { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.si-name strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.si-qty { display: grid; text-align: right; flex: none; }
.si-qty strong { font: 500 2rem/1 var(--display); }
.si-qty span { color: var(--muted); font-size: .8rem; }
.si-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.si-step { min-width: 54px; font-weight: 600; }
.stock-hist { list-style: none; margin: 10px 0 12px; padding: 0; max-height: 52vh; overflow: auto; }
.stock-hist li { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sh-when { color: var(--muted); font-size: .78rem; }
.sh-main { display: grid; min-width: 0; overflow-wrap: anywhere; }
.sh-delta { font-weight: 600; }
.sh-delta.pos { color: #2e7d4f; }
.sh-delta.neg { color: #b3404f; }
.si-actions { gap: 8px 16px; }
.si-btns, .si-links { display: flex; align-items: center; gap: 8px; }
.si-links { gap: 16px; }

/* ---------- Produtos usados numa visita ---------- */
.cl-vprods { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.cl-vprod { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: #f7f0e6; font-size: .82rem; line-height: 1.3; }
.cl-vprod-x { border: 0; background: none; color: #8a6a25; font-size: 1.05rem; line-height: 1; padding: 0 6px; cursor: pointer; }
.cl-vprod-add { font-size: .85rem; }

/* ---------- Propor outra hora ---------- */
.bk-proposal { color: #8a6a25; font-weight: 600; }
#pp-slots { margin-bottom: 10px; }
.mg-proposal { border: 2px solid #d9b865; background: linear-gradient(#fffaf0, var(--surface)); text-align: center; }
.mg-proposal-eyebrow { margin: 0; color: #8a6a25; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.mg-proposal-when { margin: 6px 0 4px; font: 500 1.35rem/1.25 var(--display); }
.mg-proposal-actions { display: grid; gap: 8px; margin-top: 12px; }

/* ---------- Ficha de anamnese capilar (página da cliente e ficha na gestão) ---------- */
.anam-body { background: var(--bg); }
.anam { max-width: 640px; margin: 0 auto; padding: 28px 18px 56px; }
.anam-head { text-align: center; margin-bottom: 18px; }
.anam-logo { border-radius: 14px; }
.anam-title { font: 400 1.9rem/1.15 var(--serif); margin: 4px 0 0; }
.anam-section-title { font: 400 1.4rem/1.2 var(--serif); margin: 2px 0 6px; outline: none; }
.anam-form { display: grid; gap: 14px; }
.anam-progress { display: flex; gap: 6px; }
.anam-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.anam-progress span.on { background: var(--primary); }
.anam-fields { display: grid; gap: 18px; margin-top: 6px; }
.anam textarea, .anam-notes textarea { width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 1rem var(--sans); resize: vertical; }
.anam textarea:focus { border-color: var(--accent-line); background: var(--surface); outline: none; }
.anam-options { display: grid; gap: 4px; }
.anam-legend { font-weight: 500; font-size: .9rem; padding: 0; margin-bottom: 6px; float: none; width: 100%; }
.anam-opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 400; font-size: .95rem; cursor: pointer; }
.anam-opt:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); }
.anam-opt input { margin: 0; }
.anam-other { margin: 2px 0 4px 32px; width: calc(100% - 32px); }
.anam .req { color: var(--danger); }
.anam-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 6px; }
.anam-actions .btn { flex: 1; }
.anam-privacy { text-align: center; margin-top: 26px; }
.anam-done { padding: 22px; text-align: center; }

.anam-view { display: grid; gap: 10px; margin-top: 8px; }
.anam-view h4 { margin: 12px 0 4px; font: 500 .92rem var(--sans); color: var(--primary); }
.anam-view dl { margin: 0; display: grid; gap: 8px; }
.anam-view dt { font-size: .8rem; color: var(--muted); }
.anam-view dd { margin: 1px 0 0; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.anam-view-empty { margin: 4px 0; }
.anam-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.anam-first { padding: 14px 16px; margin: 0 0 14px; font-size: .92rem; border-color: var(--accent-line); background: var(--accent-soft); }
