/* Prime Care · paleta azul bebê + verde menta, tipografia Lora (títulos) e Figtree (texto) */
:root {
  --paper: #f5fafd;
  --surface: #ffffff;
  --baby: #d6ecf8;
  --baby-soft: #eaf5fc;
  --sky: #9ccfea;
  --blue: #2c78a5;
  --mint: #d7f2e6;
  --mint-soft: #edf9f3;
  --green: #4caa84;
  --green-deep: #2b7f5d;
  --ink: #1d4257;
  --muted: #557789;
  --line: #d9e9f1;
  --warn-bg: #fdf3dc; --warn: #8a6214;
  --bad-bg: #fbe6e6;  --bad: #a43d3d;
  --info-bg: #e3f0fb; --info: #245f8a;
  --ok-bg: #dcf3e8;   --ok: #22704f;
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(29, 66, 87, .06), 0 8px 24px rgba(44, 120, 165, .07);
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Lora', Georgia, 'Times New Roman', serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
}
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; margin: 0 0 .2em; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(245, 250, 253, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; }
.brand svg { width: 34px; height: 34px; flex: none; }
.topnav { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.topnav a { white-space: nowrap; text-decoration: none; color: var(--ink); padding: .5rem .8rem; border-radius: 999px; font-weight: 500; }
.topnav a:hover { background: var(--baby-soft); }
.topnav .short { display: none; }
@media (max-width: 560px) { .topnav .long { display: none; } .topnav .short { display: inline; } .topnav a { padding: .5rem .7rem; } .topbar .wrap { flex-wrap: nowrap; } .topnav { flex-wrap: nowrap; } }
.topnav a.pill { background: var(--green-deep); color: #fff; }
.topnav a.pill:hover { background: #236c4f; }

/* ---------- Botões e formulários ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: 600 .98rem/1 var(--font-body); padding: .8rem 1.2rem; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--green-deep); color: #fff; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s;
  min-height: 44px;
}
.btn:hover { background: #236c4f; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--baby-soft); }
.btn.blue { background: var(--blue); }
.btn.blue:hover { background: #23668e; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #efc9c9; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: .5rem .85rem; min-height: 36px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.linklike { background: none; border: 0; color: var(--blue); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .84rem; margin-top: .25rem; }
input, select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .85rem; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px var(--baby); }
.field { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500; cursor: pointer; padding: .35rem 0; }
.check input { width: 20px; height: 20px; min-height: 0; margin: .15rem 0 0; accent-color: var(--green-deep); flex: none; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; background: var(--line); border: 0; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch span { font-weight: 500; }

/* ---------- Superfícies ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.1rem, 3vw, 1.75rem); }
.panel + .panel { margin-top: 1.25rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2, .panel-head h3 { margin: 0; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #eef2f4; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--baby-soft); border: 1px solid var(--line); color: var(--ink); padding: .3rem .7rem; border-radius: 999px; font-size: .86rem; }
.chip.green { background: var(--mint-soft); border-color: #c5ead8; }
.chip svg { width: 14px; height: 14px; color: var(--blue); }

.notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--info-bg); color: var(--info); margin-bottom: 1.25rem; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice p { margin: 0; }
.notice > svg { width: 22px; height: 22px; flex: none; margin-top: .1rem; }
.notice .btn { margin-left: auto; flex: none; }
@media (max-width: 640px) { .notice { flex-direction: column; } .notice .btn { margin-left: 0; } }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* ---------- Início ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--baby) 0%, var(--paper) 100%); }
.hero::after { /* onda suave entre azul e verde */
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -120px; height: 220px;
  background: var(--mint); border-radius: 50%; opacity: .55; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero h1 { max-width: 15ch; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 2rem; } }

.searchbox { display: grid; grid-template-columns: 96px 1fr auto; gap: .5rem; background: var(--surface); padding: .5rem; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); margin-top: 1.5rem; }
.searchbox input, .searchbox select { border: 0; min-height: 48px; }
.searchbox .q { grid-column: 1 / -1; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.searchbox input:focus, .searchbox select:focus { box-shadow: none; background: var(--baby-soft); }
@media (max-width: 520px) { .searchbox { grid-template-columns: 96px 1fr; } .searchbox .btn { grid-column: 1 / -1; } }

/* Cartão de agenda ilustrativo do topo */
.daycard { background: var(--surface); border-radius: 26px; padding: 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--line); max-width: 400px; justify-self: center; width: 100%; }
.daycard .who { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.1rem; }
.daycard .strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: 1rem; }
.daycard .d { text-align: center; padding: .5rem 0; border-radius: 12px; background: var(--baby-soft); font-size: .78rem; color: var(--muted); }
.daycard .d b { display: block; font-size: 1.15rem; color: var(--ink); }
.daycard .d.on { background: var(--blue); color: #dcefff; }
.daycard .d.on b { color: #fff; }
.daycard .times { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.daycard .t { text-align: center; padding: .55rem 0; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 600; font-size: .92rem; }
.daycard .t.on { background: var(--green); border-color: var(--green); color: #fff; }
.daycard .t.off { color: #b3c6d0; text-decoration: line-through; }
.daycard .paid { margin-top: 1rem; display: flex; gap: .5rem; align-items: center; color: var(--ok); font-weight: 600; font-size: .92rem; }
.daycard .paid svg { width: 20px; height: 20px; flex: none; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.pro { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: start; }
.pro ul { padding-left: 1.1rem; margin: 0; }
.pro li { margin-bottom: .7rem; }
.pricecard { background: var(--mint); border-radius: var(--radius-lg); padding: 1.75rem; }
.pricecard .price { font-family: var(--font-head); font-size: 2.6rem; font-weight: 600; line-height: 1; }
.pricecard .price small { font-family: var(--font-body); font-size: 1rem; font-weight: 500; color: var(--muted); }
@media (max-width: 860px) { .pro { grid-template-columns: 1fr; } }

/* ---------- Busca / cartões de profissional ---------- */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.doc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem; display: flex; flex-direction: column; gap: .8rem; }
.doc-card .top { display: flex; gap: .85rem; align-items: center; }
.doc-card h3 { margin: 0; font-size: 1.12rem; }
.doc-card .foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--line); }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--mint); color: var(--green-deep); display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); font-size: 1.15rem; flex: none; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.6rem; }
.price-tag { font-weight: 700; font-size: 1.05rem; }

/* ---------- Perfil público + agendamento ---------- */
.profile-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: 2rem 0 4rem; }
.profile-layout aside { position: sticky; top: 84px; }
@media (max-width: 920px) { .profile-layout { grid-template-columns: minmax(0, 1fr); } .profile-layout aside { position: static; } }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .65rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.info-list li svg { width: 20px; height: 20px; color: var(--blue); flex: none; margin-top: .1rem; }

.step { padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.step:last-of-type { border-bottom: 0; }
.step-title { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; }
.step-title .n { width: 30px; height: 30px; border-radius: 50%; background: var(--baby); color: var(--blue); font-weight: 700; display: grid; place-items: center; flex: none; font-size: .92rem; }
.step-title h3 { margin: 0; font-family: var(--font-body); font-size: 1.08rem; font-weight: 700; }
.step.done .n { background: var(--green); color: #fff; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; min-height: 0; cursor: pointer; }
.option span { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; cursor: pointer; height: 100%; }
.option span small { font-weight: 400; color: var(--muted); font-size: .82rem; }
.option input:checked + span { border-color: var(--green); background: var(--mint-soft); box-shadow: inset 0 0 0 1px var(--green); }
.option input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.option input:disabled + span { opacity: .45; cursor: not-allowed; }

.datebar { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.dates { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: .4rem; overflow-x: auto; padding: .2rem; flex: 1; min-width: 0; scrollbar-width: thin; }
.date-btn { border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: .5rem .2rem; cursor: pointer; text-align: center; font: inherit; color: var(--muted); font-size: .78rem; line-height: 1.25; }
.date-btn b { display: block; font-size: 1.2rem; color: var(--ink); }
.date-btn:hover:not(:disabled) { background: var(--baby-soft); }
.date-btn[aria-pressed='true'] { background: var(--blue); border-color: var(--blue); color: #dcefff; }
.date-btn[aria-pressed='true'] b { color: #fff; }
.date-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--ink); flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .45rem; margin-top: 1rem; }
.time-btn { border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: .65rem 0; font: 600 .95rem var(--font-body); color: var(--ink); cursor: pointer; }
.time-btn:hover { border-color: var(--green); }
.time-btn[aria-pressed='true'] { background: var(--green); border-color: var(--green); color: #fff; }

.summary { background: var(--baby-soft); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.summary .row { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; font-weight: 700; font-size: 1.1rem; }

/* ---------- Status da consulta ---------- */
.status-page { max-width: 620px; margin: 2.5rem auto 4rem; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1rem; }
.status-icon svg { width: 32px; height: 32px; }
.status-icon.ok { background: var(--ok-bg); color: var(--ok); }
.status-icon.warn { background: var(--warn-bg); color: var(--warn); }
.status-icon.info { background: var(--info-bg); color: var(--info); }
.status-icon.bad { background: var(--bad-bg); color: var(--bad); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .45rem 1rem; margin: 1rem 0 1.4rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .5rem; } }

/* ---------- Autenticação ---------- */
.auth { max-width: 480px; margin: 2.5rem auto 4rem; }

/* ---------- Painel do profissional ---------- */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0 4rem; align-items: start; }
.sidenav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: .2rem; }
.sidenav a { display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; white-space: nowrap; }
.sidenav a svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sidenav a:hover { background: var(--baby-soft); }
.sidenav a[aria-current='page'] { background: var(--baby); color: var(--blue); font-weight: 700; }
.sidenav a[aria-current='page'] svg { color: var(--blue); }
.sidenav .count { margin-left: auto; background: var(--green); color: #fff; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); padding-top: .75rem; }
  .sidenav { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 10; flex-direction: row; overflow-x: auto; background: var(--paper); padding: .5rem 0; margin: 0 -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .sidenav::-webkit-scrollbar { display: none; }
  .sidenav a { padding: .55rem .85rem; background: var(--surface); border: 1px solid var(--line); }
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; }
.stat .v { font-family: var(--font-head); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .9rem; }
.stat.mint { background: var(--mint-soft); border-color: #c5ead8; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bar { height: 10px; background: var(--baby-soft); border-radius: 999px; overflow: hidden; margin-top: .6rem; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--green)); border-radius: inherit; }

.appt { display: grid; grid-template-columns: 92px 1fr auto; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.appt:first-child { border-top: 0; }
.appt-time strong { display: block; font-family: var(--font-head); font-size: 1.35rem; }
.appt-time span { color: var(--muted); font-size: .84rem; }
.appt-body p { margin: .15rem 0; font-size: .93rem; }
.appt > .badge { align-self: start; justify-self: end; }
.appt-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
@media (max-width: 640px) { .appt { grid-template-columns: 1fr; gap: .4rem; } .appt > .badge { justify-self: start; grid-row: 1; } }

.day-group h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin: 1.4rem 0 .2rem; color: var(--blue); }
.day-group:first-child h3 { margin-top: 0; }

.week-row { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: start; }
.week-row:first-of-type { border-top: 0; }
.interval { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.interval input { max-width: 130px; min-width: 0; flex: 1; }
@media (max-width: 640px) { .week-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; } }

.area-row { display: grid; grid-template-columns: 110px 1fr 1fr 44px; gap: .5rem; margin-bottom: .5rem; }
@media (max-width: 640px) { .area-row { grid-template-columns: 1fr 1fr; } .area-row .icon-btn { justify-self: end; } }

.linkbox { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; }
.linkbox input { flex: 1 1 260px; background: var(--baby-soft); font-size: .93rem; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list-row:first-child { border-top: 0; }

/* ---------- Pagamento simulado ---------- */
.demo-pay { max-width: 460px; margin: 3rem auto; text-align: center; }

/* ---------- Toasts e diálogo ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; width: min(440px, 100% - 2rem); }
.toast { background: var(--ink); color: #fff; padding: .85rem 1.1rem; border-radius: 14px; box-shadow: var(--shadow); font-weight: 500; animation: toast-in .2s ease-out; }
.toast.bad { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
dialog { border: 0; border-radius: var(--radius-lg); padding: 1.5rem; width: min(440px, 100% - 2rem); color: var(--ink); box-shadow: 0 20px 60px rgba(29, 66, 87, .25); }
dialog::backdrop { background: rgba(29, 66, 87, .35); }
dialog .actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

.footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; color: var(--muted); font-size: .88rem; }
.footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.loading { padding: 4rem 0; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--baby); border-top-color: var(--blue); border-radius: 50%; margin: 0 auto .8rem; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pix na página da consulta */
.pixbox { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.pixbox img { border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--line); }
@media (max-width: 560px) { .pixbox { grid-template-columns: minmax(0, 1fr); justify-items: center; } .pixbox > div { width: 100%; } }

/* ================= Calendários ================= */
.fade-in { animation: fade-in .2s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
.flash { animation: flash 1.6s ease-out; border-radius: var(--radius); }
@keyframes flash { 0%, 30% { background: var(--mint); } 100% { background: transparent; } }

/* --- calendário compacto (paciente) --- */
.booker { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
@media (max-width: 760px) { .booker { grid-template-columns: minmax(0, 1fr); } }
.cal { transition: opacity .15s; }
.cal.busy { opacity: .5; pointer-events: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.cal-head strong { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.cal-week { text-align: center; font-size: .76rem; color: var(--muted); margin-bottom: .35rem; }
.cal-day {
  aspect-ratio: 1 / 1; min-height: 40px; border: 0; border-radius: 12px; background: transparent; color: #a7bac4;
  font: 600 .98rem var(--font-body); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  position: relative; transition: background .12s, color .12s, transform .1s;
}
.cal-day:disabled { cursor: default; }
.cal-day.has { background: var(--mint-soft); color: var(--ink); cursor: pointer; }
.cal-day.has:hover { background: var(--mint); }
.cal-day.has:active { transform: scale(.96); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--sky); }
.cal-day[aria-pressed='true'] { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(44, 120, 165, .3); }
.cal-day .dots { display: flex; gap: 3px; height: 5px; }
.cal-day .dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.cal-day[aria-pressed='true'] .dots b { background: #fff; }
.cal-day .dots b.st-warn { background: #d39b2a; }
.cal-day .dots b.st-info { background: var(--blue); }
.cal-day .dots b.st-bad, .cal-day .dots b.st-muted { background: #c4a0a0; }

.times-panel { background: var(--baby-soft); border-radius: var(--radius-lg); padding: 1.1rem; min-height: 280px; }
.times-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; margin: 0 0 .2rem; }
.slot-group h5 { margin: .9rem 0 .45rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.times-panel .times { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
.times-empty { height: 100%; min-height: 240px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.times-empty svg { width: 32px; height: 32px; color: var(--sky); margin: 0 auto .5rem; display: block; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; min-height: 1px; }
.chip-btn { border: 1.5px solid #c5ead8; background: var(--mint-soft); color: var(--green-deep); border-radius: 999px; padding: .4rem .8rem; font: 600 .86rem var(--font-body); cursor: pointer; }
.chip-btn:hover { background: var(--mint); }

/* --- agenda do médico --- */
.agenda-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.agenda-nav { display: flex; gap: .4rem; align-items: center; }
.agenda-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.agenda-title h2 { margin: 0; }
.agenda-title .check { font-size: .88rem; font-weight: 500; }
.seg { display: inline-flex; background: var(--baby-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: .5rem 1rem; border-radius: 999px; font: 600 .9rem var(--font-body); color: var(--muted); cursor: pointer; min-height: 36px; }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--blue); box-shadow: 0 1px 4px rgba(29, 66, 87, .12); }

.ev-pending_approval { --ev: var(--blue); --ev-bg: var(--info-bg); }
.ev-awaiting_payment { --ev: #b9851c; --ev-bg: var(--warn-bg); }
.ev-confirmed { --ev: var(--green); --ev-bg: var(--ok-bg); }
.ev-completed { --ev: #8fb8a6; --ev-bg: #eef5f1; }
.ev-rejected, .ev-cancelled, .ev-expired { --ev: #c99; --ev-bg: #f6eeee; }

.mcal-week, .mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mcal-week { font-size: .78rem; color: var(--muted); text-align: center; padding-bottom: .4rem; }
.mcal-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mcal-day {
  min-height: 104px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface);
  text-align: left; padding: .4rem; display: flex; flex-direction: column; gap: .25rem; cursor: pointer; font: inherit; color: var(--ink); min-width: 0;
}
.mcal-day:hover { background: var(--baby-soft); }
.mcal-day .num { font-weight: 600; font-size: .9rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.mcal-day.today .num { background: var(--blue); color: #fff; }
.mcal-day.sel { box-shadow: inset 0 0 0 2px var(--green); background: var(--mint-soft); }
.mcal-day.out { background: #fafcfd; }
.mcal-day.out .num, .mcal-day.past .num { color: #a7bac4; }
.mcal-day.today.past .num { color: #fff; }
.mcal-day.off, .mcal-day.blocked { background: repeating-linear-gradient(135deg, #f7fafb 0 6px, #eef4f7 6px 12px); }
.mcal-day .tag { font-size: .7rem; color: var(--bad); font-weight: 600; }
.evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev { display: block; font-size: .74rem; line-height: 1.3; padding: .12rem .35rem; border-radius: 6px; background: var(--ev-bg); color: var(--ink); border-left: 3px solid var(--ev); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more { font-size: .72rem; color: var(--muted); font-weight: 600; padding-left: .2rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .9rem; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .35rem; vertical-align: -1px; background: var(--ev-bg); border-left: 3px solid var(--ev); }
.legend i.hatch { background: repeating-linear-gradient(135deg, #f7fafb 0 3px, #dfe9ee 3px 6px); border: 1px solid var(--line); }
@media (max-width: 700px) {
  .mcal-day { min-height: 62px; padding: .25rem; align-items: center; }
  .mcal-day .tag { display: none; }
  .evs { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .ev { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--ev); font-size: 0; }
  .more { font-size: .65rem; padding: 0; }
}

.wk-scroll { overflow-x: auto; margin: 0 -.25rem; padding: 0 .25rem; }
.wk { min-width: 720px; }
.wk-head, .wk-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.wk-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding-bottom: .4rem; }
.wk-dh { border: 0; background: transparent; cursor: pointer; padding: .3rem 0; border-radius: 10px; font: inherit; color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.wk-dh b { font-size: 1.15rem; color: var(--ink); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.wk-dh.today b { background: var(--blue); color: #fff; }
.wk-dh.sel { background: var(--mint-soft); }
.wk-body { position: relative; border-top: 1px solid var(--line); }
.wk-times { position: relative; }
.wk-times span { position: absolute; right: .5rem; transform: translateY(-50%); font-size: .72rem; color: var(--muted); }
.wk-times span:first-child { transform: none; }
.wk-col {
  position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background: repeating-linear-gradient(135deg, #f7fafb 0 6px, #eef4f7 6px 12px);
}
.wk-col::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px) var(--hour)); }
.wk-open { position: absolute; left: 0; right: 0; background: var(--surface); }
.wk-blocked { position: absolute; top: .5rem; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--bad); font-weight: 600; z-index: 1; }
.wk-ev {
  position: absolute; left: 3px; right: 3px; z-index: 1; border: 0; border-left: 3px solid var(--ev); background: var(--ev-bg);
  border-radius: 8px; padding: .2rem .35rem; text-align: left; font: .76rem/1.25 var(--font-body); color: var(--ink); cursor: pointer; overflow: hidden;
  box-shadow: 0 1px 3px rgba(29, 66, 87, .1); transition: transform .1s, box-shadow .1s;
}
.wk-ev:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(29, 66, 87, .15); }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: #e06666; z-index: 2; }
.wk-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #e06666; }

/* --- minhas consultas (paciente) --- */
.mine { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: 2rem 0 4rem; }
.mine .panel + .panel { margin-top: 0; }
@media (max-width: 860px) { .mine { grid-template-columns: minmax(0, 1fr); } }
.next-appt { display: grid; gap: .15rem; background: var(--mint-soft); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1.1rem; }
.next-appt .badge { justify-self: start; margin-top: .3rem; }
.mine-card { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .85rem .6rem; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); border-radius: 12px; }
.mine-card:hover { background: var(--baby-soft); }
.mine-card .when b { display: block; font-family: var(--font-head); font-size: 1.25rem; }
.mine-card .when span, .mine-card .who span { font-size: .84rem; color: var(--muted); }
.mine-card .who { display: grid; }
@media (max-width: 480px) { .mine-card { grid-template-columns: 70px minmax(0, 1fr); } .mine-card .badge { grid-column: 2; justify-self: start; } }
.past { margin-top: 1rem; }
.past summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: .5rem 0; }
@media (prefers-reduced-motion: reduce) { .fade-in, .flash { animation: none; } }
.step, .appt, #dayPanel { scroll-margin-top: calc(84px + env(safe-area-inset-top, 0px)); }
.wk-ev { white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 420px) { .brand span { display: none; } .topnav { gap: 0; } }
@media (max-width: 480px) { .mine-card .badge { white-space: normal; text-align: left; } }

/* Verificação */
.vbadge { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; padding: .18rem .55rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: .78rem; font-weight: 700; }
.vbadge svg { width: 14px; height: 14px; }
.v-overall { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.v-overall .status-icon { margin: 0; flex: none; }
.v-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; margin: 1rem 0 1.25rem; }
.v-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--paper); }
.v-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.v-item p { margin: .4rem 0 0; }
.v-item .kv { grid-template-columns: 110px 1fr; }
.v-item .kv dd { font-weight: 500; }
.v-num { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; margin-top: .2rem; }
.icp-steps { display: grid; gap: .8rem; margin-top: 1rem; }
.icp-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.icp-step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--baby); color: var(--blue); font-weight: 700; display: grid; place-items: center; }
.icp-step p { margin: .25rem 0 .6rem; }
.mcal-day .tag-special { color: var(--blue); }

/* Domicílio: deslocamento, mapa e valor */
.quote-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--baby-soft); padding: .9rem; margin-bottom: 1rem; }
.quote-head { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .7rem; }
.quote-head svg { width: 20px; height: 20px; color: var(--blue); flex: none; margin-top: .15rem; }
.route-map { height: 230px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #e8f1f6; }
.quote-price { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--line); font-size: .9rem; }
.quote-price strong { font-size: 1.2rem; color: var(--green-deep); white-space: nowrap; }
.map-pin span { display: block; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--green-deep); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.travel-line { background: var(--baby-soft); border-radius: 10px; padding: .45rem .6rem; }
@media (max-width: 560px) { .quote-price { flex-direction: column; align-items: flex-start; } }

/* Vídeos explicativos */
.video-box { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: #0f2a38; box-shadow: var(--shadow); }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.vb-poster {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; color: #fff; font: inherit; text-align: center; padding: 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  background: radial-gradient(120% 120% at 15% 10%, #3f93c4 0%, #2c78a5 38%, #2b7f5d 100%);
}
.vb-poster strong { font-family: var(--font-head); font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 600; }
.vb-poster span { font-size: .9rem; opacity: .85; }
.vb-poster svg { width: 30px; height: 30px; }
.vb-btn { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.7); margin-bottom: .4rem; transition: transform .15s, background .15s; }
.vb-poster:hover .vb-btn { transform: scale(1.06); background: rgba(255,255,255,.28); }
.vb-poster:focus-visible { outline: 3px solid var(--sky); outline-offset: -6px; }
.video-box.is-placeholder { background: var(--baby-soft); box-shadow: none; border: 2px dashed var(--sky); }
.video-box.is-placeholder .vb-poster { background: none; color: var(--blue); cursor: default; }
.video-box.is-placeholder .vb-poster svg { width: 46px; height: 46px; opacity: .7; }
.video-box.is-placeholder .vb-poster span { color: var(--muted); opacity: 1; }
.how { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: center; }
.how-steps { padding-left: 1.2rem; margin: 0 0 1.5rem; }
.how-steps li { margin-bottom: .8rem; }
.help-video .video-box { max-width: 760px; }
@media (max-width: 860px) { .how-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* Planos */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { position: relative; display: block; }
.plan-body { position: relative; height: 100%; display: flex; flex-direction: column; gap: .35rem; padding: 1.3rem 1.2rem 1.2rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); }
.plan.is-highlight .plan-body { border-color: var(--green); box-shadow: 0 10px 30px rgba(43, 127, 93, .14); }
.plan-flag { position: absolute; top: -.7rem; left: 1rem; background: var(--green-deep); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.plan-flag.current { left: auto; right: 1rem; background: var(--blue); }
.plan-name { font-weight: 700; font-size: 1.05rem; }
.plan-price { font-family: var(--font-head); font-size: 2.1rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.plan-price small { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }
.plan-price em { font-style: normal; font-size: .9rem; font-family: var(--font-body); color: var(--muted); font-weight: 500; margin-left: .2rem; }
.plan-quota { font-weight: 600; color: var(--green-deep); }
.plan-desc { color: var(--muted); font-size: .88rem; flex: 1; margin-bottom: .6rem; }
.plans-pick .plan input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.plans-pick .plan-body { cursor: pointer; padding: 1.1rem 1rem 1rem; }
.plans-pick .plan-price { font-size: 1.7rem; }
.plans-pick .plan-desc { display: none; }
.plans-pick .plan input:checked + .plan-body { border-color: var(--blue); background: var(--baby-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.plans-pick .plan input:focus-visible + .plan-body { outline: 3px solid var(--sky); outline-offset: 2px; }
.plans-section { background: var(--baby-soft); border-top: 1px solid var(--line); }
.plan-field { border: 0; padding: 0; margin: 0 0 1.2rem; }
.plan-field legend { font-weight: 600; font-size: .92rem; margin-bottom: .9rem; }
.plan-field .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pay-box { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--mint-soft); border: 1px solid #c5ead8; }
.pay-box > div:first-child { flex: 1 1 320px; }
.pay-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Vídeo de boas-vindas (após pagamento e verificação) */
dialog.video-dialog { width: min(820px, 100% - 2rem); padding: 1.4rem; }
dialog.video-dialog::backdrop { background: rgba(29, 66, 87, .55); }
.vd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.danger-zone { border-color: #efc9c9; }
.footer a { color: inherit; }
.legal { max-width: 760px; margin: 2.5rem auto 4rem; }
.legal h2 { margin-top: 1.6rem; font-size: 1.3rem; }
.legal li { margin-bottom: .4rem; }
