/* Elisa Acupuntura — estilos compartilhados (site, cliente e portal) */
:root {
  --bg: #F7F2EA;
  --surface: #FFFDF9;
  --ink: #3E3A35;
  --ink-soft: #8C8379;
  --line: #E6DED2;
  --green: #2F4A35;
  --green-ink: #FFFDF9;
  --gold: #B8893A;
  --sage: #E2EADF;
  --sage-strong: #7E9C76;
  --peach: #F3DCD4;
  --peach-strong: #C98F86;
  --lav: #E5E4F0;
  --lav-strong: #8C86BD;
  --danger: #B5483F;
  --danger-bg: #F8E1DD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(62, 58, 53, .06), 0 4px 16px rgba(62, 58, 53, .05);
  --serif: "Lora", Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--sans);
}
img, svg { max-width: 100%; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-soft); }
.muted { font-size: .9em; }

.wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px 48px; }
.wrap-wide { max-width: 1080px; }

/* ---------- marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.brand svg { width: 36px; height: 46px; flex: none; }
.brand span { color: #5F7F59; font-family: var(--serif); letter-spacing: .18em; font-size: .78rem; line-height: 1.3; text-transform: uppercase; }

/* ---------- cartões e listas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.card-title h2, .card-title h3 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--green); color: var(--green-ink); font: 500 .95rem var(--sans);
  text-decoration: none; cursor: pointer; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--green); border-color: var(--line); }
.btn.soft { background: var(--sage); color: var(--green); }
.btn.wa { background: #1F8F55; color: #fff; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger-bg); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.btn.block { display: flex; width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
button.link { background: none; border: 0; color: var(--green); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- formulários ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span, .field-label { display: block; font-size: .85rem; color: var(--ink-soft); margin-bottom: 4px; }
input[type=text], input[type=tel], input[type=date], input[type=time], input[type=number],
input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font: 400 16px var(--sans);
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage-strong); outline-offset: 1px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.error-box { background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.ok-box { background: var(--sage); color: var(--green); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.hp { position: absolute; left: -9999px; }

/* chips: checkbox/radio escondido + rótulo tocável */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: .88rem; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); }
.chip.warn input:checked + span { background: var(--danger); border-color: var(--danger); }
.chip small { display: block; }
.chip-hint { font-size: .75rem; opacity: .75; margin-left: 6px; }

/* escala 0-10 */
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (min-width: 420px) { .scale { grid-template-columns: repeat(11, 1fr); } }
.scale .chip span { width: 100%; justify-content: center; padding: 6px 0; font-weight: 500; }
.scale-legend { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- etiquetas ---------- */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; background: var(--sage); color: var(--green); white-space: nowrap; }
.tag.peach { background: var(--peach); color: #8A4D45; }
.tag.lav { background: var(--lav); color: #4F4A82; }
.tag.gray { background: #EEE9E2; color: var(--ink-soft); }
.tag.alert { background: var(--danger-bg); color: var(--danger); }
.tag.alert.strong { background: var(--danger); color: #fff; }

/* ---------- público ---------- */
.public-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; max-width: 680px; margin: 0 auto; }
.hero { text-align: center; padding: 32px 0 8px; }
.hero h1 { font-size: 2rem; }
.enso { width: 120px; height: 120px; margin: 0 auto 16px; display: block; color: var(--gold); }
.months { display: flex; gap: 6px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.months::-webkit-scrollbar { display: none; }
.month { flex: 1 1 0; min-width: 0; text-align: center; padding: 9px 6px; border-radius: 999px; text-decoration: none; color: var(--green);
  border: 1px solid var(--line); font-weight: 500; font-size: .9rem; white-space: nowrap; }
.month small { color: var(--ink-soft); font-weight: 400; }
.month.active { background: var(--green); color: #fff; border-color: var(--green); }
.month.active small { color: #DCE6D8; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.day {
  display: block; text-align: center; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; text-decoration: none; color: var(--ink);
}
.day b { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.day small { display: block; font-size: .75rem; }
.day.active { background: var(--green); color: #fff; border-color: var(--green); }
.day.active small { color: #DCE6D8; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { text-align: center; padding: 12px 0; border-radius: 12px; background: var(--sage); color: var(--green); text-decoration: none; font-weight: 500; border: 0; font: 500 1rem var(--sans); cursor: pointer; }
.footer { text-align: center; color: var(--ink-soft); font-size: .8rem; padding: 24px 16px 40px; }
.section-num { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--sage); color: var(--green); font: 500 .85rem var(--sans); align-items: center; justify-content: center; margin-right: 6px; }
.consent { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: .88rem; max-height: 220px; overflow: auto; margin-bottom: 12px; border: 1px solid var(--line); }

.big-options { display: grid; gap: 10px; }
.big-option {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; font: 500 1.05rem var(--sans); color: var(--ink); cursor: pointer; text-align: left;
}
.big-option .emoji { font-size: 1.8rem; }
.scale-buttons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (min-width: 440px) { .scale-buttons { grid-template-columns: repeat(11, 1fr); } }
.scale-buttons button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: 600 1.1rem var(--sans); color: var(--ink); cursor: pointer; }
.scale-buttons button:nth-child(-n+4) { background: #EAF1E6; }
.scale-buttons button:nth-child(n+8) { background: #F8E6E1; }

/* ---------- portal ---------- */
.portal-top {
  position: sticky; top: 0; z-index: 10; background: rgba(247, 242, 234, .94);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.portal-top .inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.portal-nav { display: none; gap: 4px; margin-left: auto; }
.portal-nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.portal-nav a.on { background: var(--sage); color: var(--green); }
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; font-size: .7rem; color: var(--ink-soft); text-decoration: none; }
.bottom-nav a.on { color: var(--green); }
.bottom-nav svg { width: 22px; height: 22px; }
body.portal .wrap { padding-bottom: 96px; }
@media (min-width: 860px) {
  .portal-nav { display: flex; }
  .bottom-nav { display: none; }
  body.portal .wrap { padding-bottom: 48px; }
}
.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .numbers { grid-template-columns: repeat(4, 1fr); } }
.number { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.number b { display: block; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--green); }
.number small { font-size: .78rem; }
.columns { display: grid; gap: 14px; }
@media (min-width: 860px) { .columns { grid-template-columns: 1.2fr 1fr; align-items: start; } }

.task { display: flex; align-items: center; gap: 10px; }
.task .grow b { display: block; font-weight: 500; }
.time { font-family: var(--serif); font-size: 1.15rem; color: var(--green); min-width: 52px; }
.status-agendado { } .status-cancelado { opacity: .5; text-decoration: line-through; }
.status-faltou .time { color: var(--danger); }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.tabs a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: .9rem; border: 1px solid var(--line); background: var(--surface); }
.tabs a.on { background: var(--green); color: #fff; border-color: var(--green); }

.alerts { display: flex; flex-wrap: wrap; gap: 6px; }
details.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
details.section > summary { cursor: pointer; list-style: none; padding: 16px 18px; font-family: var(--serif); font-size: 1.08rem; display: flex; align-items: center; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after { content: "+"; margin-left: auto; color: var(--ink-soft); font-family: var(--sans); }
details.section[open] > summary::after { content: "–"; }
details.section > .body { padding: 0 18px 18px; }
.group { margin-bottom: 14px; }
.group > .field-label { margin-bottom: 6px; }
.private-note { font-size: .78rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-family: var(--sans); }

.hints { background: var(--lav); border-radius: 10px; padding: 10px 14px; font-size: .88rem; margin-top: 8px; }
.hints:empty { display: none; }
.hints b { font-weight: 500; }

/* mapa da língua */
.tongue-map { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 560px) { .tongue-map { grid-template-columns: 200px 1fr; } }
.tongue-svg { width: 100%; max-width: 260px; margin: 0 auto; display: block; }
.tongue-svg .zone { fill: #F3DCD4; stroke: #FFFDF9; stroke-width: 2.5; transition: fill .15s; }
.tongue-svg[data-tongue] .zone { cursor: pointer; }
.tongue-svg .zone.on { fill: #D99A90; }
.tongue-svg .outline { fill: none; stroke: #C98F86; stroke-width: 2; }
.tongue-svg .leader { stroke: #C98F86; stroke-width: 1; stroke-dasharray: 2 2; }
.tongue-svg text { font: 500 11px var(--sans); fill: #6E4A44; pointer-events: none; text-anchor: middle; }
.tongue-svg text.side { font-size: 11px; fill: var(--ink); }
.pulse-svg { width: 100%; max-width: 340px; display: block; margin: 0 auto; }
.pulse-svg .hand rect { fill: #F3DCD4; stroke: #C98F86; stroke-width: 1.5; }
.pulse-svg .hand rect.palm:last-child { stroke: none; }
.pulse-svg .num { font: 600 10px var(--sans); fill: #fff; text-anchor: middle; }
.pulse-svg .organ { font: 500 12px var(--sans); fill: var(--ink); }
.pulse-svg .side-title { font: 500 13px var(--sans); fill: var(--ink); text-anchor: middle; }
.pulse-svg .leader { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 2 2; }
.pulse-guide { margin-bottom: 10px; }
.pulse-guide > summary { cursor: pointer; font-size: .85rem; margin-bottom: 6px; }

/* pulso */
.pulse-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .pulse-grid { grid-template-columns: 1fr 1fr; } }
.pulse-pos { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.pulse-pos h4 { margin: 0 0 6px; font: 500 .9rem var(--sans); }
.pulse-pos h4 small { font-weight: 400; }
.pulse-pos .chip span { min-height: 30px; padding: 3px 10px; font-size: .8rem; }

/* pontos */
.meridians { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.meridians button, .numgrid button, .recent button {
  min-width: 44px; min-height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font: 500 .9rem var(--sans); color: var(--ink); cursor: pointer;
}
.meridians button.on { background: var(--green); color: #fff; border-color: var(--green); }
.numgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 230px; overflow: auto; padding: 2px; }
.recent { display: flex; flex-wrap: wrap; gap: 6px; }
.recent button { background: var(--sage); color: var(--green); border-color: transparent; }
.selected-points { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.pt { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--green); color: #fff; font-weight: 500; font-size: .9rem; }
.pt button { background: rgba(255,255,255,.2); border: 0; color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }

/* evolução */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { font: 9px var(--sans); fill: var(--ink-soft); text-anchor: end; }
.chart .line { fill: none; stroke: var(--sage-strong); stroke-width: 2; stroke-linejoin: round; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--ink-soft); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.session-card { border-left: 3px solid var(--sage-strong); padding-left: 12px; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 2px 10px; font-size: .9rem; }
.kv dt { color: var(--ink-soft); } .kv dd { margin: 0; }
.photo-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* agenda semanal */
.week { display: grid; gap: 12px; }
.week-day h3 { font-family: var(--sans); font-size: .95rem; font-weight: 500; margin-bottom: 6px; }
.week-day.today h3 { color: var(--green); }
.free-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.free-slots button { border: 1px dashed var(--sage-strong); background: transparent; color: var(--green); border-radius: 8px; padding: 4px 10px; font: 400 .82rem var(--sans); cursor: pointer; }
dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(440px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(62, 58, 53, .35); }

/* referência */
.ref-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ref-table td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.ref-table td:first-child { font-weight: 500; width: 45%; }

@media print {
  .portal-top, .bottom-nav, .btn, .tabs { display: none !important; }
  body { background: #fff; }
  .card, details.section { box-shadow: none; break-inside: avoid; }
}

/* ---------- sugestões do livro ---------- */
.sg-panel > summary { color: var(--green); }
.sg-disclaimer { font-size: .78rem; color: var(--ink-soft); background: var(--lav); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.sg-cond { font: 500 .95rem var(--sans); margin: 14px 0 6px; }
.sg-card { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); padding: 10px 12px; margin-bottom: 8px; }
.sg-card > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.sg-card > summary::-webkit-details-marker { display: none; }
.sg-combined { background: rgba(226, 234, 223, .7); }
.sg-bar { flex: none; width: 46px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sg-bar i { display: block; height: 100%; background: var(--sage-strong); border-radius: 4px; }
.sg-why { font-size: .82rem; margin: 10px 0 6px; line-height: 1.8; }
.sg-book { font-size: .82rem; color: var(--ink-soft); border-left: 3px solid var(--peach); padding: 2px 0 2px 10px; margin: 6px 0 8px; }
.sg-points { display: flex; flex-wrap: wrap; gap: 5px; }
.sg-pt { display: inline-flex; align-items: baseline; gap: 3px; padding: 3px 9px; border-radius: 999px; background: var(--green); color: #fff; font-size: .82rem; font-weight: 500; }
.sg-pt small { font-size: .65rem; opacity: .8; }
.sg-pt.shared { box-shadow: 0 0 0 2px var(--gold); }
.sg-pt.shared::before { content: "★"; font-size: .7rem; color: #F3D58A; margin-right: 2px; }
.sg-pt.blocked { background: var(--danger-bg); color: var(--danger); text-decoration: line-through; }
.sg-mod { font-size: .82rem; margin-top: 6px; }
.sg-uncertain { font-size: .8rem; background: #FBF1DC; color: #7A5A17; border-radius: 8px; padding: 6px 10px; margin-top: 8px; }

/* avisos do site no portal */
.avisos { border-left: 3px solid var(--gold); }
.aviso-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .9rem;
  background: var(--sage); color: var(--green); }
.aviso-remarcado .aviso-ic { background: var(--lav); color: #5D578F; }
.aviso-cancelado .aviso-ic { background: var(--danger-bg); color: var(--danger); }
.bottom-nav a { position: relative; }
.nav-badge { font-style: normal; display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 600; line-height: 1; }
.bottom-nav .nav-badge { position: absolute; top: 4px; left: 54%; }

.booking-switch { border-left: 3px solid var(--sage-strong); }
.booking-switch.off { border-left-color: var(--peach-strong); }
