/* ---------- Tipos de letra (servidos localmente) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope/manrope-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}

/* ---------- Tokens ---------- */
/* Paleta do logótipo "A Loja d'Ele": verde-floresta, dourado e creme */
:root {
  --bg: #002102;            /* verde do logótipo */
  --bg-2: #032707;
  --surface: #062e0b;
  --surface-2: #0b3911;
  --line: rgba(201, 168, 98, .24);
  --text: #ebdfb8;          /* creme do monograma "LD" */
  --muted: #b7b08f;
  --accent: #c9a862;        /* dourado do lettering */
  --accent-ink: #002102;
  --accent-soft: rgba(201, 168, 98, .14);
  --ok: #d9c27f;
  --danger: #ffa494;
  --disabled: #5f7a5c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .4);
  --serif: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --focus: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
  color-scheme: dark;
}

*, *::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.55 var(--sans);
}
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%; }

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

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

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

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 33, 2, .94);
  backdrop-filter: blur(8px);
}
.site-header::after {
  /* filete dourado */
  content: ""; display: block; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  opacity: .7;
}
.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: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); cursor: pointer; transition: background .15s, border-color .15s;
}
.back-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brand-logo { width: 44px; height: 44px; border-radius: 10px; flex: none; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.brand-name { margin: 0; font: 600 1.35rem/1.05 var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; gap: 6px; }
.tab {
  font: 600 .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(--accent-ink); background: var(--accent); border-color: var(--accent); }
.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: 26px 22px 24px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(201, 168, 98, .38); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 0 rgba(235, 223, 184, .06) inset;
  animation: float-in .45s cubic-bezier(.2, .8, .2, 1);
}
.float-title { font: 600 2.1rem/1.05 var(--serif); margin: 0; outline: none; text-align: center; }
.float-title::after { content: ""; display: block; width: 52px; height: 1px; background: var(--accent); margin: 12px auto 0; }
.float-lede { margin: 0 0 4px; text-align: center; font-size: .95rem; }
@keyframes float-in { from { opacity: 0; transform: translateY(18px) scale(.98); } 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(--accent-soft); color: var(--text); border: 1px solid rgba(201,168,98,.4);
  padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}

.step { padding: 22px 0 30px; animation: rise .28s ease-out; }
.step-float { padding-top: 28px; }
.summary-bar:not([hidden]) + .step { padding-top: 10px; }
.step-title { font: 600 2rem/1.1 var(--serif); margin: 6px 0 16px; outline: none; }
@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: 10px 16px; margin: 0; }
.review-list dt { color: var(--muted); font-size: .9rem; }
.review-list dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.review-list dt:nth-of-type(5) { padding-top: 12px; border-top: 1px solid var(--line); }
.review-list dd:nth-of-type(5) { padding-top: 12px; border-top: 1px solid var(--line); }
#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: 4px 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 18px; font: inherit; transition: border-color .15s, transform .15s, background .15s;
}
.service:hover { border-color: var(--accent); background: var(--surface-2); }
.service:active { transform: scale(.99); }
.service[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.service-name { font: 600 1.6rem/1.15 var(--serif); }
.service-meta { color: var(--muted); font-size: .9rem; grid-column: 1; }
.service-price { grid-row: 1 / span 2; grid-column: 2; font-weight: 800; font-size: 1.2rem; color: var(--accent); }

/* ---------- Calendário ---------- */
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month { margin: 0; font: 600 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: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; min-height: 40px; border-radius: 10px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--text); font: 600 1rem var(--sans); cursor: pointer; position: relative;
}
.cal-day::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--ok); }
.cal-day:hover:not(:disabled) { border-color: var(--accent); }
.cal-day[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cal-day[aria-pressed="true"]::after { background: var(--accent-ink); }
.cal-day:disabled { background: transparent; color: var(--disabled); cursor: not-allowed; text-decoration: line-through; text-decoration-color: rgba(95, 122, 92, .7); }
.cal-day:disabled::after { display: none; }
.cal-day.today { border-color: var(--line); }
.cal-blank { aspect-ratio: 1; }
.cal-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8rem; margin: 12px 0 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-free { background: var(--ok); }
.dot-off { background: var(--disabled); margin-left: 10px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.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: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 800 1.05rem var(--sans); cursor: pointer; font-variant-numeric: tabular-nums;
}
.slot-grid-small .slot { min-height: 40px; font-size: .9rem; }
.slot:hover { border-color: var(--accent); }
.slot[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.slot-group-label { grid-column: 1 / -1; margin: 8px 0 0; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}
.empty strong { display: block; color: var(--text); font: 600 1.45rem var(--serif); margin-bottom: 4px; }
.loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px 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: 600; font-size: .95rem; 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(--bg-2); color: var(--text); font: 400 1rem var(--sans);
}
input:focus, select:focus { border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; 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: .88rem; font-weight: 600; }
.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 22px; border-radius: 999px; border: 1px solid transparent;
  font: 800 1rem var(--sans); cursor: pointer; text-decoration: none; letter-spacing: .01em;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 164, 148, .45); }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: .88rem; }
.link-btn { background: none; border: 0; color: var(--muted); font: 600 .85rem var(--sans); text-decoration: underline; cursor: pointer; padding: 8px; }
.link { color: var(--accent); }

/* ---------- Confirmação ---------- */
.ticket {
  background: var(--text); color: #002102; border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, #a5823f, var(--accent), #e3c784, var(--accent), #a5823f);
}
.ticket-eyebrow { margin: 6px 0 0; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; color: #7a5c22; }
.ticket .step-title { color: #002102; font-size: 2.2rem; }
.ticket .muted { color: #3d5a3c; }
.ticket-details { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 18px; padding: 16px 0; border-top: 1px dashed #b9a676; border-bottom: 1px dashed #b9a676; }
.ticket-details dt { color: #3d5a3c; font-size: .9rem; }
.ticket-details dd { margin: 0; font-weight: 800; text-align: right; }

/* ---------- Gestão ---------- */
.admin-h1 { font: 600 2.6rem var(--serif); margin: 28px 0 12px; }
/* Separadores sem deslocamento horizontal: no telemóvel quebram para uma segunda linha */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.subtab {
  flex: 1 1 auto; background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font: 600 .9rem var(--sans); cursor: pointer; min-height: 40px;
  white-space: nowrap;
}
@media (min-width: 640px) { .subtab { flex: none; } }
.subtab[aria-selected="true"] { color: var(--text); border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.panel { padding-bottom: 40px; }
.panel-title { font: 600 1.65rem var(--serif); margin: 0; }
.panel > .panel-title { margin: 26px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }

.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: 600 .9rem var(--sans); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-range { font: 600 1.45rem var(--serif); margin: 14px 0 10px; }
.agenda-day { margin-bottom: 18px; }
.agenda-day-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 8px; padding-bottom: 6px; 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; margin-bottom: 8px;
}
.bk-time { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bk-time small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.bk-main { min-width: 0; }
.bk-name { font-weight: 800; margin: 0; }
.bk-line { margin: 2px 0 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.bk-line a { color: var(--text); }
.badge { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 6px; }
.badge-online { background: rgba(235, 223, 184, .12); color: var(--ok); }
.badge-manual { background: var(--accent-soft); color: var(--accent); }
.badge-warn { background: rgba(255, 164, 148, .15); color: var(--danger); }
.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 14px; }

.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: .65; }
.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: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.hours-row-head { display: flex; justify-content: space-between; align-items: center; }
.hours-row-head strong { font-weight: 800; }
.hours-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hours-times label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.hours-row.closed .hours-times { display: none; }

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

/* ---------- 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: var(--radius);
  background: var(--surface); color: var(--text); padding: 22px; box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%);
  background: var(--text); color: #002102; padding: 12px 18px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow); transition: transform .25s, visibility .25s; 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); }

/* Páginas simples (opt-out) */
.simple-page { max-width: 520px; margin: 0 auto; padding: 60px 20px; }
.simple-page h1 { font: 600 2rem/1.15 var(--serif); }
.brand-mark { color: var(--accent); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; }

/* ---------- 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: 96px; height: 96px; border-radius: 16px; }

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

/* Marcação acabada de chegar (atualização automática da agenda) */
.bk-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(201, 168, 98, .18); }
.bk-new .bk-name::after { content: "nova"; margin-left: 8px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: var(--accent); color: var(--accent-ink); padding: 2px 8px; 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: 12px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-wd { text-align: center; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 2px 0 4px; }
.month-day {
  position: relative; aspect-ratio: 1; min-height: 42px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  font: 600 .95rem 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(--accent); }
.month-day.has { background: var(--accent-soft); border-color: rgba(201, 168, 98, .6); }
.month-day.off { background: transparent; color: var(--disabled); border-style: dashed; }
.month-day.past { opacity: .55; }
.month-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.month-count {
  min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 800 .68rem/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: rgba(201, 168, 98, .6); }
.lg-free { background: var(--bg-2); }
.lg-off { border-style: dashed; }
.month-total { margin: 4px 2px 0; }

/* ---------- Janela de confirmação ---------- */
.btn-danger-solid { background: #c4513f; color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.08); }
.confirm-text { margin: 0; color: var(--text); line-height: 1.5; }
.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: 700; color: var(--muted); }
.twofa-status.on { color: var(--accent); }
.twofa-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.5; }
.twofa-qr { display: block; width: 200px; height: 200px; margin: 10px 0 6px; border-radius: 12px; background: #fff; padding: 8px; }
.twofa-secret, .twofa-code-list code {
  font: 700 .95rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em;
  background: var(--bg-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: 700 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(--accent); }
.settings-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.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; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 16px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: 64px;
}
.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: 800; }
.settings-item small { color: var(--muted); font-size: .85rem; }
.settings-item svg { color: var(--accent); 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: 50px; height: 30px; 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: 24px; height: 24px; border-radius: 50%;
  background: var(--text); transition: transform .2s;
}
.settings-switch input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.settings-switch input[type="checkbox"]:checked::after { transform: translateX(20px); background: var(--accent-ink); }
.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: rgba(201, 168, 98, .5); }
.review-card p { margin: 0; }
.review-title { margin: 0; font: 600 1.4rem var(--serif); display: flex; align-items: center; gap: 10px; }
.review-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 800 .85rem/26px 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 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.review-who { display: grid; gap: 2px; min-width: 0; }
.review-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-done { opacity: .85; }
.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: .78rem; 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: 600 1.35rem var(--serif); margin: 26px 0 6px; color: var(--accent); }
.legal-page p, .legal-page li { line-height: 1.6; }
.legal-page ul { padding-left: 20px; margin: 6px 0; display: grid; gap: 6px; }
.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 18px; }
.cal-add-title { margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #7a5c22; }
.cal-add-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-cal { min-height: 46px; padding: 10px 12px; font-size: .88rem; background: transparent; color: #002102; border: 1.5px solid #b9a676; }
.btn-cal:hover { background: rgba(0, 33, 2, .06); }
.btn-cal svg { flex: none; }
@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: 14px 0; place-items: start center; }
.float-card { padding: 18px 18px 16px; gap: 10px; }
.float-card .field { gap: 4px; }
.float-card input:not([type="checkbox"]) { min-height: 44px; padding: 8px 12px; }
.float-title { font-size: 1.8rem; }
.float-title::after { margin-top: 8px; }
.float-lede { font-size: .88rem; line-height: 1.4; }
.float-card .field-check label { font-size: .88rem; }
.float-card .btn-block { margin-top: 2px; min-height: 48px; }
.site-footer { margin-top: 8px; }
.footer-inner { padding-top: 10px; padding-bottom: 12px; gap: 2px; }

.cal-add-note { margin: 8px 0 0; font-size: .82rem; color: #3d5a3c; }
.cal-add-btns > [hidden] { display: none !important; }

/* Sem zoom ao tocar duas vezes rápido (iPhone/Android). O zoom com dois dedos continua a funcionar. */
html, body, a, button, input, select, textarea, label, summary, [role="button"], [role="tab"] { touch-action: manipulation; }
/* 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: .88rem; 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); color: var(--accent); }
