/* Agenda da Dra. Mabyan: base compartilhada (página de reserva + painel).
   Padrão das plataformas de agendamento, feito com capricho: branco, tinta grafite, um destaque cacau. */
:root {
  --bg: #ffffff;
  --bg-2: #f7f6f5;
  --bg-3: #f0eeec;
  --ink: #1f2328;
  --ink-2: #4f5661;
  --ink-3: #646b77;
  --line: #e8e7e5;
  --line-2: #d9d7d4;
  --accent: #8a6a5c;
  --accent-ink: #6c5043;
  --accent-soft: #f5efec;
  --accent-line: #e2d5ce;
  --ok: #1d7a4d;
  --ok-soft: #e7f4ec;
  --warn: #93590f;
  --warn-soft: #fcf2e4;
  --bad: #b42318;
  --bad-soft: #fdeceb;
  --evento: #a65468;
  --evento-ink: #97495d;
  --evento-soft: #f8ecef;
  --pro: #8a6a5c;
  --pro-soft: #f5efec;
  --pessoal: #3f7a73;
  --pessoal-ink: #356b64;
  --pessoal-soft: #e8f2f0;
  --wa: #0f7d42;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --pill: 999px;

  --sh-1: 0 1px 2px rgba(31, 35, 40, .05), 0 1px 3px rgba(31, 35, 40, .07);
  --sh-2: 0 2px 6px -1px rgba(31, 35, 40, .06), 0 10px 24px -6px rgba(31, 35, 40, .12);
  --sh-3: 0 6px 16px -4px rgba(31, 35, 40, .10), 0 24px 56px -12px rgba(31, 35, 40, .22);
  --ring: 0 0 0 3px rgba(138, 106, 92, .32);

  --f-ui: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-marca: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: 180ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--f-ui); font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: #ead9d0; color: var(--ink); }
input, textarea, select { caret-color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
.num, time, .tab { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
[hidden] { display: none !important; }

/* scrollbars discretos */
* { scrollbar-width: thin; scrollbar-color: #d4cfcb transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d9d4d0; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #c4bdb7; }

/* marca: o nome da Dra. em serifa itálica (a "assinatura" dela, como no post) */
.marca { font-family: var(--f-marca); font-style: italic; font-weight: 600; letter-spacing: 0; line-height: 1; }

.icone { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icone.cheio { fill: currentColor; stroke: none; }

/* ---------- botões ---------- */
.btn {
  --b-bg: var(--bg); --b-ink: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  background: var(--b-bg); color: var(--b-ink); border: 1px solid var(--b-line);
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform 120ms var(--ease), color var(--t);
}
.btn:hover { --b-bg: var(--bg-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .icone { width: 17px; height: 17px; }
.btn-primario { --b-bg: var(--ink); --b-ink: #fff; --b-line: var(--ink); box-shadow: 0 1px 2px rgba(31, 35, 40, .18); }
.btn-primario:hover { --b-bg: #33383e; --b-line: #33383e; }
.btn-wa { --b-bg: var(--wa); --b-ink: #fff; --b-line: var(--wa); }
.btn-wa:hover { --b-bg: #0c6b38; --b-line: #0c6b38; }
.btn-fantasma { --b-bg: transparent; --b-line: transparent; }
.btn-fantasma:hover { --b-bg: var(--bg-3); }
.btn-perigo { --b-ink: var(--bad); }
.btn-perigo:hover { --b-bg: var(--bad-soft); --b-line: #f3c3be; }
.btn-grande { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: var(--r); }
.btn-pequeno { min-height: 32px; padding: 0 11px; font-size: 13px; gap: 6px; }
.btn-icone { width: 40px; padding: 0; }
.btn-icone.btn-pequeno { width: 32px; }
.btn-bloco { width: 100%; }
.btn.carregando { color: transparent !important; position: relative; pointer-events: none; }
.btn.carregando::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--b-ink) transparent var(--b-ink) transparent; opacity: .9;
  animation: gira .7s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- campos ---------- */
.campo { display: grid; gap: 6px; align-content: start; }
.campo > label, .rotulo { font-size: 13px; font-weight: 600; color: var(--ink); }
.campo .ajuda { font-size: 12.5px; color: var(--ink-3); }
.campo .erro-campo { font-size: 12.5px; color: var(--bad); font-weight: 500; }
.entrada, .campo input:not([type='checkbox']):not([type='radio']), .campo textarea, .campo select {
  width: 100%; min-height: 44px; padding: 10px 13px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: 400 15px/1.4 var(--f-ui);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.campo textarea { min-height: 88px; resize: vertical; }
.campo select { appearance: none; padding-right: 38px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234f5661' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; }
.entrada::placeholder, .campo input::placeholder, .campo textarea::placeholder { color: var(--ink-3); }
.entrada:hover, .campo input:hover, .campo textarea:hover, .campo select:hover { border-color: #c5c2be; }
.entrada:focus, .campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.campo.invalido input, .campo.invalido textarea { border-color: var(--bad); }
.campo.invalido input:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .18); }
input[type='date'], input[type='time'] { font-variant-numeric: tabular-nums; }

/* interruptor */
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.interruptor input { appearance: none; flex: none; width: 40px; height: 24px; border-radius: 99px; background: #d6d3cf; position: relative; cursor: pointer; transition: background var(--t) var(--ease); margin: 0; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform var(--t) var(--ease); }
.interruptor input:checked { background: var(--accent); }
.interruptor input:checked::after { transform: translateX(16px); }
.interruptor input:focus-visible { box-shadow: var(--ring); }

/* ---------- pílulas ---------- */
.pilula { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--bg-3); color: var(--ink-2); white-space: nowrap; }
.pilula .ponto { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pilula.ok { background: var(--ok-soft); color: var(--ok); }
.pilula.alerta { background: var(--warn-soft); color: var(--warn); }
.pilula.perigo { background: var(--bad-soft); color: var(--bad); }
.pilula.destaque { background: var(--accent-soft); color: var(--accent-ink); }
.pilula.evento { background: var(--evento-soft); color: var(--evento-ink); }
.pilula.pessoal { background: var(--pessoal-soft); color: var(--pessoal-ink); }

/* ---------- aviso flutuante ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; background: var(--ink); color: #fff; border-radius: var(--r); box-shadow: var(--sh-3); font-size: 14px; font-weight: 500; animation: sobe 320ms var(--ease) both; }
.toast .icone { color: #9fd8b5; }
.toast.erro .icone { color: #ffb4ab; }
.toast button { margin-left: auto; background: none; border: 0; color: #e6d3c9; font-weight: 650; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.toast.saindo { animation: desce 220ms var(--ease) forwards; }
@keyframes sobe { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes desce { to { opacity: 0; transform: translateY(8px); } }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
