/* =========================================================================
   FACES × AUREA · PROPOSTAS CLÍNICAS — SISTEMA VISUAL
   CSS próprio (sem Tailwind CDN): mobile-first, sem dependências externas
   além das fontes editoriais já adotadas na versão anterior.
   ========================================================================= */
:root {
  --bg: #F3F0EA;
  --bg-2: #ECE7DF;
  --surface: #FCFBF8;
  --surface-2: #F7F4EE;
  --surface-3: #EFEAE1;
  --line: #E5DED2;
  --line-2: #D5CBBB;
  --ink: #1E1D1A;
  --ink-2: #4E4941;
  --ink-3: #686256;
  --gold: #85642F;
  --gold-2: #B4925A;
  --gold-soft: #C5A56E;
  --teal: #144B52;
  --teal-2: #0E383D;
  --teal-soft: #E3EDED;
  --dark: #141311;
  --dark-2: #23211D;
  --ok: #23563E;    --ok-bg: #E4EEE7;
  --warn: #774B0C;  --warn-bg: #F6EAD3;
  --bad: #8A2A2A;   --bad-bg: #F5E2DF;
  --info: #144B52;  --info-bg: #E2EDED;
  --neutral: #4E4941; --neutral-bg: #ECE8E1;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(30, 26, 20, .04), 0 10px 28px -18px rgba(30, 26, 20, .16);
  --sh-2: 0 2px 6px rgba(30, 26, 20, .06), 0 28px 60px -28px rgba(30, 26, 20, .30);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1280px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografia ---------- */
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 48px); line-height: 1.05; font-weight: 500; letter-spacing: -.01em; }
.h2 { font-family: var(--serif); font-size: clamp(26px, 4vw, 34px); line-height: 1.1; font-weight: 500; }
.h3 { font-family: var(--serif); font-size: 24px; line-height: 1.15; font-weight: 600; }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Estrutura ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.page { padding-top: 24px; padding-bottom: 56px; outline: none; }
@media (min-width: 768px) { .page { padding-top: 36px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.push-page { max-width: 900px; margin: 0 auto; }
.push-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.push-card { padding: clamp(20px, 4vw, 30px); }
.push-card h2 { margin: 0 0 8px; }
.push-card p { line-height: 1.55; }
.push-status-list { display: grid; gap: 0; margin: 20px 0; }
.push-status-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.push-status-row dt { color: var(--ink-2); }
.push-status-row dd { margin: 0; text-align: right; font-weight: 600; }
.push-device-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--ink-2); }
.push-device-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.push-device-list strong { color: var(--ink); text-align: right; }
.push-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.push-message { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); color: var(--ink); margin-top: 18px; overflow-wrap: anywhere; }
.push-message:empty { display: none; }
.push-help { color: var(--ink-2); font-size: 14px; margin-top: 14px; }
@media (min-width: 760px) { .push-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Cabeçalho do painel ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(252, 251, 248, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; margin-right: auto; padding: 6px 0; }
.brand-mono { width: 26px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.brand-name .x { color: var(--gold-2); font-weight: 500; padding: 0 1px; }
.brand-sub { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.main-nav { order: 3; width: 100%; display: flex; gap: 4px; margin: 0 -6px; padding-bottom: 8px; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px;
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.main-nav a:hover { background: var(--surface-3); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-3); }
.header-cta .label-long { display: none; }
@media (min-width: 420px) { .header-cta .label-long { display: inline; } .header-cta .label-short { display: none; } }
@media (min-width: 768px) {
  .header-row { flex-wrap: nowrap; }
  .brand { margin-right: 20px; }
  .main-nav { order: 0; width: auto; margin: 0 auto 0 0; padding: 0; }
}

.app-footer { padding-top: 8px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: var(--ink-3); font-size: 13px; }
.app-footer a { color: var(--ink-3); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 16px -10px rgba(20, 75, 82, .8); }
.btn-primary:hover { background: var(--teal-2); }
.btn-dark { background: var(--ink); color: #FBF8F2; }
.btn-dark:hover { background: #000; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #E3C6C1; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
@media (pointer: coarse), (hover: none), (max-width: 1023.98px) { .btn-sm { min-height: 44px; } }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* ---------- Selos de situação ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; max-width: 100%;
  background: var(--neutral-bg); color: var(--neutral);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; opacity: .85; }
.badge.plain::before { display: none; }
.t-ok { background: var(--ok-bg); color: var(--ok); }
.t-warn { background: var(--warn-bg); color: var(--warn); }
.t-bad { background: var(--bad-bg); color: var(--bad); }
.t-info { background: var(--info-bg); color: var(--info); }
.t-neutral { background: var(--neutral-bg); color: var(--neutral); }
.t-outline { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- Avisos ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); font-size: 14px; line-height: 1.5; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice strong { font-weight: 700; }
.notice.t-warn { background: var(--warn-bg); color: #5E3B08; }
.notice.t-bad { background: var(--bad-bg); color: #6E2020; }
.notice.t-ok { background: var(--ok-bg); color: #1C4532; }
.notice.t-info { background: var(--info-bg); color: #0F3A40; }
.notice.t-neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.notice .notice-body > * + * { margin-top: 6px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field .req { color: var(--gold); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px;
  background: #fff; font-size: 16px; line-height: 1.4; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea { min-height: 112px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 75, 82, .18); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.input[readonly] { background: var(--surface-2); }
@media (min-width: 1024px) { .input, .select, .textarea { font-size: 15px; } }
.hint { font-size: 13px; color: var(--ink-3); }
.error-msg { font-size: 13px; color: var(--bad); font-weight: 600; }
.error-msg:empty { display: none; }
.money { position: relative; }
.pct { position: relative; max-width: 180px; }
.pct .input { padding-right: 38px; font-variant-numeric: tabular-nums; }
.pct .pct-suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; pointer-events: none; }
.money .input { padding-left: 42px; font-variant-numeric: tabular-nums; }
.money::before { content: "R$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; font-weight: 600; pointer-events: none; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 28px; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14.5px; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal); flex: none; cursor: pointer; }
.check.disabled { cursor: not-allowed; opacity: .6; }

.switch { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text strong { font-size: 14.5px; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; margin: 0; cursor: pointer; transition: background-color .18s var(--ease); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s var(--ease); }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .15s var(--ease);
}
.segmented input:checked + span { background: var(--ink); color: #FBF8F2; border-color: var(--ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (pointer: coarse), (hover: none), (max-width: 1023.98px) { .segmented span { min-height: 44px; } }

/* ---------- Painel: cabeçalho da página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head .h1 { margin-top: 6px; outline: none; }
.page-head .sub { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Indicadores ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
.kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-width: 0;
  padding: 16px 18px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  transition: background-color .15s var(--ease); position: relative;
}
.kpi:nth-child(2n) { border-right: 0; }
.kpi:nth-last-child(-n+2) { border-bottom: 0; }
.kpi:hover { background: var(--surface-2); }
.kpi[aria-pressed="true"] { background: var(--surface-2); }
.kpi[aria-pressed="true"]::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: var(--gold-2); border-radius: 2px; }
.kpi-num { font-family: var(--serif); font-size: 36px; line-height: 1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.kpi-label { font-size: 13px; color: var(--ink-2); font-weight: 600; line-height: 1.3; }
.kpi.is-alert .kpi-num { color: var(--warn); }
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; }
  .kpi:nth-child(3n) { border-right: 0 !important; }
  .kpi:nth-last-child(-n+3) { border-bottom: 0 !important; }
}
@media (min-width: 1024px) {
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpi, .kpi:nth-child(n) { border-bottom: 0 !important; border-right: 1px solid var(--line) !important; padding: 20px 22px; }
  .kpi:last-child { border-right: 0 !important; }
  .kpi-num { font-size: 40px; }
}

.attention { margin-top: 16px; padding: 6px 16px; }
@media (min-width: 768px) { .attention { padding: 6px 20px; } }
.attention-title { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 10px 0 4px; }
.attention-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.attention-title + .attention-item { border-top: 0; }
.attention-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 7px; }
.attention-item .txt { flex: 1; min-width: 0; }
.attention-item .txt strong { display: block; }
.attention-item .txt span { color: var(--ink-2); }
.attention-item .link-btn { white-space: nowrap; flex: none; }

/* ---------- Lista de propostas ---------- */
.list-card { margin-top: 24px; }
.list-toolbar { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .list-toolbar { padding: 18px 20px; } }
@media (min-width: 1024px) { .list-toolbar { flex-direction: row; align-items: center; justify-content: space-between; } }
.search { position: relative; width: 100%; }
@media (min-width: 1024px) { .search { max-width: 320px; } }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 42px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips { display: none; }
.filter-select { display: flex; align-items: center; gap: 10px; }
.filter-select label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
@media (min-width: 768px) { .filter-chips { display: flex; } .filter-select { display: none; } }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FBF8F2; }
.chip .count { font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums; }
@media (pointer: coarse), (hover: none), (max-width: 1023.98px) { .chip { min-height: 44px; } }

.list-head { display: none; }
.rows { list-style: none; }
.row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row .c-main { grid-column: 1; min-width: 0; }
.row .c-actions { grid-column: 2; grid-row: 1; display: flex; align-items: flex-start; gap: 4px; }
.row .c-cells { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; }
.row .c-treat { grid-column: 1 / -1; }
.row .badge { white-space: normal; }
@media (max-width: 1023.98px) { .row.is-available .c-cells > :not(.c-status) { display: none; } }
.cell-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.row-title { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: none; border: 0; padding: 0; text-align: left; min-width: 0; max-width: 100%; color: var(--ink); }
.row-title:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }
.row-num { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.row-name { font-size: 16px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name.is-empty { color: var(--ink-3); font-weight: 500; font-style: italic; }
.cell-value { font-size: 14.5px; }
.cell-strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.cell-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.cell-sub.warn { color: var(--warn); font-weight: 600; }
.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
@media (min-width: 1024px) {
  .rows, .list-head { --row-cols: minmax(140px, 1.3fr) minmax(130px, 1.4fr) 112px minmax(150px, 1fr) 118px 148px; }
}
@media (min-width: 1280px) {
  .rows, .list-head { --row-cols: minmax(180px, 1.5fr) minmax(150px, 1.5fr) 128px 190px 140px 150px; }
}
@media (min-width: 1024px) {
  .list-head {
    display: grid; grid-template-columns: var(--row-cols); gap: 16px;
    padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2);
    font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  }
  .row { grid-template-columns: var(--row-cols); align-items: center; padding: 16px 20px; gap: 16px; }
  .row .c-main { grid-column: auto; }
  .row .c-cells { display: contents; }
  .row .c-treat { grid-column: auto; min-width: 0; }
  .row .c-actions { grid-column: auto; grid-row: auto; justify-content: flex-end; align-items: center; }
  .row .cell-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .list-head > :last-child { text-align: right; }
}
.empty { padding: 48px 20px; text-align: center; color: var(--ink-2); }
.empty .h3 { margin-bottom: 6px; }

/* ---------- Menu contextual ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 240px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); padding: 6px;
}
.menu.up { top: auto; bottom: calc(100% + 6px); }
.menu [role="menuitem"] {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; font-size: 14px; font-weight: 500; color: var(--ink);
}
.menu [role="menuitem"] svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus { background: var(--surface-2); outline: none; }
.menu [role="menuitem"]:focus-visible { box-shadow: inset 0 0 0 2px var(--teal); }
.menu [role="menuitem"].danger { color: var(--bad); }
.menu [role="menuitem"].danger svg { color: var(--bad); }
.menu [role="menuitem"][aria-disabled="true"] { color: var(--ink-3); cursor: not-allowed; }
.menu .menu-note { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* ---------- Painel lateral (detalhe) ---------- */
.overlay-backdrop { position: fixed; inset: 0; background: rgba(20, 19, 17, .38); z-index: 50; animation: fade .2s var(--ease); }
.drawer {
  position: fixed; inset: 0; z-index: 51; display: flex; flex-direction: column; background: var(--surface);
  animation: slide-in .26s var(--ease); outline: none;
}
@media (min-width: 768px) {
  .drawer { left: auto; width: min(600px, 92vw); border-left: 1px solid var(--line); box-shadow: var(--sh-2); }
}
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .drawer-head { padding: 22px 24px 14px; } }
.drawer-head .titles { flex: 1; min-width: 0; }
.drawer-title { font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; outline: none; }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .drawer-actions { padding: 14px 24px; } }
.tabs { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .tabs { padding: 0 16px; } }
.tab {
  position: relative; flex: none; min-height: 46px; padding: 0 12px; background: none; border: 0; font-size: 14px; font-weight: 600; color: var(--ink-3);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.tab .tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: middle; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 16px 40px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) { .drawer-body { padding: 24px 24px 48px; } }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: 1fr; column-gap: 24px; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.facts dd { margin: 3px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
@media (min-width: 480px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div.span-2 { grid-column: 1 / -1; }
}
.action-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.action-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.action-item:last-child { border-bottom: 0; }
.action-item .txt { flex: 1 1 220px; min-width: 0; }
.action-item .txt strong { display: block; font-size: 14.5px; }
.action-item .txt span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.service-line { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.service-line:last-child { border-bottom: 0; }
.service-line .name { font-weight: 600; }
.service-line .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.timeline { list-style: none; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 14px 18px; font-size: 13.5px; color: var(--ink-2); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold-2); }
.timeline time { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.mini-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.mini-card + .mini-card { margin-top: 10px; }
details.disclosure { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
details.disclosure + details.disclosure { margin-top: 10px; }
details.disclosure > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; min-height: 48px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s var(--ease); flex: none; margin-right: 4px; }
details.disclosure[open] > summary::after { transform: rotate(-135deg); }
details.disclosure > .disclosure-body { padding: 0 16px 16px; }

/* ---------- Diálogos ---------- */
.dialog {
  position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 24px; animation: pop .2s var(--ease); outline: none;
}
.dialog .h3 { margin-bottom: 8px; }
.dialog-actions { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.dialog-backdrop { z-index: 60; }

/* ---------- Notificações ---------- */
.toast-region { position: fixed; z-index: 80; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (min-width: 768px) { .toast-region { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast {
  pointer-events: auto; max-width: 440px; width: 100%; display: flex; gap: 10px; align-items: flex-start;
  background: var(--ink); color: #F7F3EC; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.45; box-shadow: var(--sh-2);
  animation: toast-in .24s var(--ease);
}
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--gold-soft); }

/* ---------- Assistente (5 etapas) ---------- */
.wizard { padding-bottom: 120px; }
.wiz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wiz-head .h1 { font-size: clamp(30px, 5vw, 42px); margin-top: 6px; outline: none; }
.wiz-head-actions { display: flex; gap: 4px; flex: none; }
.wiz-head-actions .save-draft-top { display: inline-flex; }
@media (min-width: 640px) { .wiz-head-actions .save-draft-top { display: none; } }
.is-wizard .header-cta { display: none; }
.stepper { list-style: none; display: none; gap: 0; margin-bottom: 24px; counter-reset: step; }
.stepper li { flex: 1; min-width: 0; }
.step-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 8px 12px 0; border: 0; border-bottom: 2px solid var(--line);
  background: none; text-align: left; color: var(--ink-3); font-size: 14px; font-weight: 600;
}
.step-btn .n { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--line-2); font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.step-btn[aria-current="step"] { color: var(--ink); border-bottom-color: var(--ink); }
.step-btn[aria-current="step"] .n { background: var(--ink); border-color: var(--ink); color: #fff; }
.step-btn.done { color: var(--ink-2); border-bottom-color: var(--gold-2); }
.step-btn.done .n { background: var(--gold-2); border-color: var(--gold-2); color: #fff; }
.step-btn:disabled { cursor: default; }
.step-progress { margin-bottom: 20px; }
.step-progress .meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.step-progress .bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.step-progress .bar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width .3s var(--ease); }
@media (min-width: 768px) { .stepper { display: flex; } .step-progress { display: none; } }
.wiz-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1024px) { .wiz-layout.has-aside { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; } }
.wiz-panel { padding: 20px 16px; }
@media (min-width: 768px) { .wiz-panel { padding: 28px; } }
.wiz-panel + .wiz-panel { margin-top: 16px; }
.wiz-panel-head { margin-bottom: 18px; }
.wiz-panel-head p { margin-top: 4px; color: var(--ink-2); font-size: 14px; }
.wiz-aside { position: sticky; top: 84px; padding: 20px; }
.wiz-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(252, 251, 248, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}
.wiz-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.wiz-bar .spacer { flex: 1; }
.wiz-bar .btn-primary { min-width: 140px; }
.wiz-bar .save-draft { display: none; }
@media (min-width: 640px) { .wiz-bar .save-draft { display: inline-flex; } }
.choice-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .choice-cards { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice .box { display: block; height: 100%; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); transition: all .15s var(--ease); }
.choice .box strong { display: block; font-size: 15px; }
.choice .box span { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.choice input:checked + .box { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.choice input:focus-visible + .box { outline: 3px solid var(--teal); outline-offset: 2px; }
.svc-group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.svc-group-title:first-child { margin-top: 0; }
.svc { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s var(--ease); }
.svc + .svc { margin-top: 8px; }
.svc.is-on { border-color: var(--line-2); background: #fff; box-shadow: var(--sh-1); }
.svc-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; }
.svc-row .check { flex: 1; min-width: 0; }
.svc-title { display: block; font-weight: 600; font-size: 15px; }
.svc-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; letter-spacing: .02em; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.svc-rec { flex: none; }
.svc-rec label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.svc-rec input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
.svc-rec label.on { border-color: var(--gold-2); color: var(--ink); background: #FAF8F4; }
.svc-rec label.locked { opacity: .55; cursor: not-allowed; }
.svc-extra { padding: 0 14px 14px; }
.compose { border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); padding: 14px; }
.compose-grid { display: grid; grid-template-columns: 1fr; gap: 6px 14px; max-height: 260px; overflow-y: auto; padding: 4px 2px; }
@media (min-width: 640px) { .compose-grid { grid-template-columns: 1fr 1fr; } }
.compose-grid .check { font-size: 13.5px; }
.price-row { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
@media (min-width: 640px) { .price-row { grid-template-columns: minmax(0, 1fr) 160px 160px; align-items: start; } }
.price-row .name strong { display: block; font-size: 15px; }
.totals { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.totals td { padding: 7px 0; vertical-align: top; }
.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.totals tr.total td { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; font-size: 16px; }
.totals .strike { text-decoration: line-through; color: var(--ink-3); }
.checklist { list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .ic { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.checklist .ic svg { width: 14px; height: 14px; }
.checklist .ic.ok { background: var(--ok-bg); color: var(--ok); }
.checklist .ic.warn { background: var(--warn-bg); color: var(--warn); }
.checklist .ic.bad { background: var(--bad-bg); color: var(--bad); }
.checklist .sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.preview-frame { border-radius: var(--r-lg); background: var(--bg-2); padding: 14px; overflow: hidden; }
.preview-device { margin: 0 auto; max-width: 100%; transition: width .3s var(--ease); background: var(--bg); border-radius: 18px; overflow: hidden; box-shadow: var(--sh-2); }
.preview-device.mobile { width: 390px; }
.preview-device.desktop { width: 100%; }
.preview-scroll { max-height: 720px; overflow-y: auto; }
.share-box { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) { .share-box { flex-direction: row; } .share-box .input { flex: 1; } }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; }
.success-mark svg { width: 28px; height: 28px; }

/* ---------- Catálogo ---------- */
.catalog-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
@media (min-width: 768px) { .catalog-tools { flex-direction: row; align-items: center; justify-content: space-between; } }
.code-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { font-weight: 700; color: var(--ink-2); font-size: 12.5px; letter-spacing: .04em; margin-top: 10px; }
.kv dd { margin: 0; }
@media (min-width: 768px) { .kv { grid-template-columns: 200px 1fr; } .kv dt { margin-top: 0; } }
.catalog-summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.catalog-summary .t { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.catalog-summary .s { font-size: 12px; color: var(--ink-3); font-weight: 500; letter-spacing: .03em; }

/* ---------- Área técnica ---------- */
.test-item { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.test-item:last-child { border-bottom: 0; }
.test-item .ev { grid-column: 2; font-size: 12.5px; color: var(--ink-3); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }

/* =========================================================================
   PROPOSTA DO PACIENTE — DOCUMENTO
   Usa container queries para que a prévia (no assistente) e a página
   pública se adaptem à largura real disponível.
   ========================================================================= */
.public-page { min-height: 100vh; background: var(--bg); }
.demo-bar { background: var(--dark); color: #E9E3D8; font-size: 13px; }
.demo-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.demo-bar a { color: #F1E3C6; font-weight: 600; display: inline-flex; align-items: center; min-height: 40px; }
.doc-wrap { container-type: inline-size; container-name: doc; padding: 0; outline: none; }
.public-page .doc-wrap { padding: 12px 10px 120px; }
@media (min-width: 768px) { .public-page .doc-wrap { padding: 36px 24px 96px; } }
.doc { max-width: 880px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--sh-1); }
.doc-brand { background: var(--dark); color: #EAE3D6; padding: 22px 20px 20px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-brand-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.doc-logos { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; min-width: 0; }
.doc-logos .logo-faces { height: 38px; width: auto; }
.doc-logos .logo-aurea { height: 34px; width: auto; }
.doc-logos .sep { width: 1px; height: 34px; background: rgba(234, 227, 214, .25); }
.doc-print { color: #EAE3D6; border-color: rgba(234, 227, 214, .3); background: transparent; }
.doc-print:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.doc-brand-meta .doc-print { margin-left: auto; letter-spacing: 0; text-transform: none; }
.doc-brand-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(234, 227, 214, .16); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #CFC6B6; font-weight: 600; }
.doc-section { padding: 30px 20px; border-top: 1px solid var(--line); }
.doc-section:first-of-type { border-top: 0; }
.doc-hero { padding: 34px 20px 30px; }
.doc-greet { font-family: var(--serif); font-size: 36px; line-height: 1.08; font-weight: 500; letter-spacing: -.01em; }
.doc-greet em { color: var(--gold); font-style: italic; }
.doc-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.doc-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.doc-hero-meta svg { width: 16px; height: 16px; color: var(--gold-2); }
.doc-campaign { display: inline-flex; margin-top: 16px; padding: 6px 12px; border-radius: 999px; background: var(--dark); color: var(--gold-soft); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-h2 { font-family: var(--serif); font-size: 30px; line-height: 1.12; font-weight: 500; margin-top: 8px; }
.doc-lead { margin-top: 10px; color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.doc-note { margin-top: 18px; padding: 4px 0 4px 18px; border-left: 2px solid var(--gold-2); font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--ink); font-style: italic; white-space: pre-line; }
.doc-sign { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.doc-sign strong { color: var(--ink); }
.opts { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
.opt { position: relative; border-radius: 18px; }
.opt-label { display: block; cursor: pointer; }
.opt-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-box { display: block; padding: 18px; border: 1px solid var(--line-2); border-radius: 18px; background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.opt-label:hover .opt-box { border-color: var(--ink-3); }
.opt-input:focus-visible + .opt-box { outline: 3px solid var(--teal); outline-offset: 2px; }
.opt-input:checked + .opt-box { border-color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold-2), 0 16px 32px -24px rgba(133, 100, 47, .55); background: #FFFDF8; }
.opt.is-included .opt-box { border-style: dashed; background: var(--surface-2); }
.opt.is-locked .opt-label { cursor: default; }
.opt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.opt-cat { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.opt-mark { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.opt-mark.square { border-radius: 7px; }
.opt-mark svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.opt-input:checked + .opt-box .opt-mark { background: var(--gold-2); border-color: var(--gold-2); }
.opt-input:checked + .opt-box .opt-mark svg { opacity: 1; }
.opt-title { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.12; font-weight: 600; margin-top: 8px; }
.opt-sub { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-top: 6px; line-height: 1.45; }
.opt-text { display: block; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.opt-purpose { display: block; margin-top: 12px; font-size: 14px; color: var(--ink); }
.opt-purpose b { font-weight: 700; color: var(--ink-2); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.opt-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.opt-price { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.opt-ref { font-size: 13px; color: var(--ink-3); text-decoration: line-through; }
.opt-state { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.opt-state.gold { color: var(--gold); }
.opt-details { margin: 0 4px; }
.opt-details > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px; font-size: 13.5px; font-weight: 600; color: var(--teal); }
.opt-details > summary::-webkit-details-marker { display: none; }
.opt-details > summary::after { content: "+"; font-size: 16px; line-height: 1; }
.opt-details[open] > summary::after { content: "–"; }
.opt-details .body { padding: 2px 14px 12px; font-size: 13.5px; color: var(--ink-2); }
.opt-details .body > * + * { margin-top: 8px; }
.inv-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.inv-table td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-table td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }
.inv-table .incl td { color: var(--ink-3); font-size: 13.5px; }
.inv-total { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-top: 18px; }
.inv-total .lbl { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.inv-total .val { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.inv-total .ref { font-size: 14px; color: var(--ink-3); }
.inv-total .ref s { color: var(--ink-3); }
.cond-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.cond { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; }
.cond .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cond .val { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.cond .sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.validity { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.validity svg { width: 22px; height: 22px; color: var(--gold-2); flex: none; margin-top: 2px; }
.confirm-card { margin-top: 18px; border-radius: 18px; border: 1px solid var(--line-2); background: #fff; padding: 18px; }
.confirm-choice { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; }
.confirm-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.confirm-actions .btn { width: 100%; min-height: 50px; white-space: normal; text-align: center; padding-top: 10px; padding-bottom: 10px; }
.doc-status { margin-top: 14px; }
.next-steps { list-style: none; display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; counter-reset: ns; }
.next-steps li { position: relative; padding: 16px 16px 16px 58px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.next-steps li strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.next-steps li::before { counter-increment: ns; content: counter(ns); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--dark); color: var(--gold-soft); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.care-list { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.care-list li { font-size: 14px; color: var(--ink-2); padding-left: 18px; position: relative; }
.care-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); }
.care-list strong { color: var(--ink); }
.doc-foot { padding: 22px 20px 26px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); text-align: center; }
.doc-foot strong { color: var(--ink-2); display: block; margin-bottom: 4px; font-size: 13px; }
.doc-blocked { padding: 48px 22px 44px; text-align: center; }
.doc-blocked .ic { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.doc-blocked .ic svg { width: 26px; height: 26px; }
.doc-blocked .doc-h2 { max-width: 22ch; margin: 8px auto 0; }
.doc-blocked p.lead { max-width: 52ch; margin: 12px auto 0; color: var(--ink-2); }
.doc-mobilebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(252, 251, 248, .97); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.doc-mobilebar .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.doc-mobilebar .val { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
@media (min-width: 900px) { .doc-mobilebar { display: none; } }
.doc.is-preview .opt-label { cursor: default; }

@container doc (min-width: 600px) {
  .doc-brand { padding: 30px 40px 24px; }
  .doc-logos { gap: 24px; }
  .doc-logos .logo-faces { height: 50px; }
  .doc-logos .logo-aurea { height: 44px; }
  .doc-logos .sep { height: 44px; }
  .doc-hero { padding: 52px 48px 44px; }
  .doc-greet { font-size: 52px; }
  .doc-section { padding: 44px 48px; }
  .doc-h2 { font-size: 38px; }
  .opts { grid-template-columns: 1fr 1fr; gap: 16px; }
  .opt-box { padding: 22px; }
  .cond-grid { grid-template-columns: 1fr 1fr 1fr; }
  .confirm-card { padding: 24px; }
  .confirm-actions { flex-direction: row; }
  .confirm-actions .btn { width: auto; flex: 1; }
  .next-steps { grid-template-columns: repeat(3, 1fr); }
  .next-steps li { padding: 58px 18px 18px; }
  .doc-foot { padding: 26px 48px 30px; }
  .inv-total .val { font-size: 56px; }
}
@container doc (max-width: 360px) {
  .doc-logos .logo-faces { height: 32px; }
  .doc-logos .logo-aurea { height: 28px; }
  .doc-greet { font-size: 31px; }
  .opt-title { font-size: 23px; }
  .inv-total .val { font-size: 38px; }
}

/* ---------- Animações ---------- */
.drawer.settled, .overlay-backdrop.settled, .dialog.settled { animation: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Impressão / PDF ---------- */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; font-size: 10.5pt; }
  .no-print, .app-header, .app-footer, .demo-bar, .doc-mobilebar, .toast-region, #overlay-root, .skip-link { display: none !important; }
  body.print-doc #app { display: none !important; }
  body.print-doc #print-root { display: block !important; }
  .public-page { min-height: 0 !important; background: #fff !important; }
  .public-page .doc-wrap, #print-root .doc-wrap { padding: 0 !important; }
  .doc { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; max-width: none; overflow: visible !important; }
  .doc-brand { border-radius: 10px; padding: 14px 18px 12px; break-after: avoid; page-break-after: avoid; }
  .doc-logos .logo-faces { height: 30px; }
  .doc-logos .logo-aurea { height: 27px; }
  .doc-logos .sep { height: 26px; }
  .doc-brand-meta { margin-top: 8px; padding-top: 7px; font-size: 8pt; }
  .doc-section, .doc-hero { padding: 9px 4px !important; }
  .doc-hero { padding-top: 9px !important; }
  .doc-hero-meta { margin-top: 8px; }
  .doc-greet { font-size: 20pt !important; }
  .doc-h2 { font-size: 14pt !important; margin-top: 1px; }
  .doc-lead { margin-top: 6px; font-size: 9.5pt; }
  .doc-note { font-size: 10.5pt; margin-top: 5px; padding-left: 12px; line-height: 1.35; }
  .doc-sign { margin-top: 5px; font-size: 8.5pt; }
  /* Títulos acompanham o conteúdo; blocos pequenos nunca são partidos. */
  .doc-section .eyebrow, .doc-h2, .doc-lead { break-after: avoid; page-break-after: avoid; }
  .doc-section { break-inside: auto; }
  .doc-section.keep, .opt, .cond, .validity, .confirm-card, .next-steps li, .inv-block, .inv-total, .doc-note, .doc-foot { break-inside: avoid; page-break-inside: avoid; }
  /* Cartões compactos: cabem dois por linha sem deixar a página vazia. */
  .opts { display: flex !important; flex-wrap: wrap; gap: 8px !important; margin-top: 8px !important; align-items: flex-start; }
  .opts > .opt { flex: 0 0 calc(50% - 4px); max-width: calc(50% - 4px); min-width: 0; }
  .opt-box { padding: 8px 10px !important; box-shadow: none !important; border-radius: 12px; }
  .opt-cat { font-size: 7pt; }
  .opt-mark { width: 18px; height: 18px; }
  .opt-mark svg { width: 11px; height: 11px; }
  .opt-title { font-size: 12pt; margin-top: 2px; line-height: 1.1; }
  .opt-sub { font-size: 6.8pt; margin-top: 3px; }
  .opt-text, .opt-purpose { font-size: 8pt; margin-top: 3px; line-height: 1.32; }
  .opt-purpose b { font-size: 6.8pt; }
  .opt-foot { margin-top: 5px; padding-top: 5px; gap: 4px 12px; }
  .opt-price { font-size: 12.5pt; }
  .opt-ref { font-size: 7.5pt; }
  .opt-state { font-size: 8pt; }
  .opt-details { margin: 0 2px; }
  .opt-details > summary { display: none; }
  .opt-details .body { padding: 3px 8px 0; font-size: 7.4pt; line-height: 1.32; }
  .opt-details .body > * + * { margin-top: 3px; }
  .tap-hint { display: none !important; }
  .inv-table { margin-top: 6px; font-size: 9.5pt; }
  .inv-table td { padding: 5px 0; }
  .inv-total { margin-top: 10px; }
  .inv-total .val { font-size: 24pt !important; }
  .cond-grid { grid-template-columns: 1fr 1fr 1fr !important; margin-top: 8px; gap: 8px; }
  .cond { padding: 9px 11px; border-radius: 12px; }
  .cond .val { font-size: 15pt; }
  .cond .lbl { font-size: 8.5pt; }
  .cond .sub { font-size: 8pt; }
  .validity, .confirm-card { margin-top: 8px; padding: 10px 12px; border-radius: 12px; }
  .confirm-choice { font-size: 14pt; }
  .doc-status { margin-top: 8px; }
  .next-steps { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; margin-top: 8px; }
  .next-steps li { padding: 42px 10px 10px !important; font-size: 8.5pt; border-radius: 12px; }
  .next-steps li::before { top: 10px; left: 10px; width: 24px; height: 24px; font-size: 11px; }
  .care-list { margin-top: 8px; gap: 3px; }
  .care-list li { font-size: 8.5pt; }
  .doc-foot { padding: 10px 4px; break-before: avoid; page-break-before: avoid; }
  a { color: inherit; text-decoration: none; }
}


/* =========================================================================
   Painel do profissional · Faces Liquid Glass (referência: Faces_AUREA_Liquid_Glass_3D_v3).
   Vale só no modo profissional; segue o tema do aparelho (escuro só quando o sistema pede).
   ========================================================================= */
/* ---- Tokens do painel: UMA declaração por tema (Manual Faces Clinic V0.2). O Night redeclara tudo o que o Day declara. ---- */
/* tokens neutros ao tema (estrutura e tipografia) */
html[data-mode="admin"] {
  --blur: 26px; --mx: 50%; --my: 0%;
  --spring: cubic-bezier(.32, 1.28, .36, 1); --out: cubic-bezier(.22, 1, .36, 1);
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --r-lg: 28px; --r-xl: 38px; --dark: #121212; --dark-2: #1A1B1B;
  --sh-1: var(--g-shadow); --sh-2: var(--pop-shadow);
}
/* @theme-day */
html[data-mode="admin"] {
  color-scheme: light;
  --bg: #F6F3EE; --bg-2: #FCF9F2; --surface: #FCF9F2; --surface-2: #FFFDF9; --surface-3: #F4ECDF;
  --line: rgba(230, 204, 165, .6); --line-2: rgba(56, 44, 30, .22);
  --ink: #121212; --ink-2: #3F3A33; --ink-3: #5E5A54;
  --acc: 230 204 165; --acc2: 212 186 146; --acc3: 184 162 126; --acc-d: 230 204 165; --acct: 111 88 52;
  --gold: #6F5834; --gold-2: #B8A27E; --gold-soft: #E6CCA5; --teal: #6F5834; --teal-2: #382C1E; --teal-soft: rgba(230, 204, 165, .24);
  --ok: #3E5B3B; --ok-bg: rgba(62, 91, 59, .12); --warn: #7A5A28; --warn-bg: rgba(230, 204, 165, .3); --bad: #8A3B2E; --bad-bg: rgba(138, 59, 46, .1);
  --info: #4A5560; --info-bg: rgba(74, 85, 96, .1); --neutral: #3F3A33; --neutral-bg: rgba(255, 253, 249, .6);
  /* vidro: corpo translúcido + reflexo direcional no canto superior esquerdo + filete que perde intensidade */
  --glass-body: linear-gradient(180deg, rgba(255, 253, 249, .74), rgba(250, 245, 236, .66));
  --glass-spec: radial-gradient(130% 100% at 0% 0%, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, 0) 42%);
  --glass-filet: inset 1px 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(230, 204, 165, .35), inset -1px -1px 0 rgba(230, 204, 165, .22);
  --glass-line: rgba(230, 204, 165, .45);
  --g-shadow: 0 26px 60px -30px rgba(56, 44, 30, .28), 0 2px 10px -6px rgba(56, 44, 30, .12);
  --fx-beambase: #121212; --fx-beamedge: rgba(230, 204, 165, .5); --fx-beam: #E6CCA5; --fx-beamcore: #FFFDF9;
  --fx-bglow: rgba(230, 204, 165, .5); --fx-bglow2: rgba(247, 231, 206, .4);
  --pop-1: rgba(255, 253, 249, .92); --pop-2: rgba(246, 243, 238, .97); --pop-shadow: 0 30px 60px -16px rgba(56, 44, 30, .32);
  --tile-a: rgba(255, 253, 249, .85); --tile-b: rgba(251, 233, 226, .45); --tile-edge: #FFFDF9;
  --input-bg: rgba(255, 253, 249, .7); --input-focus: rgba(255, 253, 249, .95);
  --fill: rgba(255, 253, 249, .5); --fill2: rgba(255, 253, 249, .75);
  --wall: radial-gradient(ellipse 70% 50% at 20% 0%, rgba(251, 233, 226, .75), transparent 70%), radial-gradient(ellipse 60% 45% at 90% 100%, rgba(247, 231, 206, .7), transparent 70%), #FDFBF7; --orb-o: .3;
  --o1: linear-gradient(45deg, #FBE9E2, #F7E7CE); --o2: linear-gradient(225deg, #FFFDF9, #F7E7CE); --o3: linear-gradient(90deg, rgba(255, 253, 249, .6), rgba(247, 231, 206, .4));
  --btn-bg: #121212; --btn-ink: #FCF9F2; --btn-glow: 18 18 18;
}
/* @theme-night */
@media (prefers-color-scheme: dark) {
  html[data-mode="admin"] {
    color-scheme: dark;
    --bg: #0E1419; --bg-2: #121C25; --surface: #16232D; --surface-2: #1A2A35; --surface-3: #1F3442;
    --line: rgba(201, 207, 211, .14); --line-2: rgba(201, 207, 211, .26);
    --ink: #EFE9DE; --ink-2: rgba(239, 233, 222, .88); --ink-3: #B7B9BC;
    --acc: 230 203 152; --acc2: 214 190 146; --acc3: 184 162 126; --acc-d: 238 215 174; --acct: 238 215 174;
    --gold: #EED7AE; --gold-2: #E6CB98; --gold-soft: #E6CB98; --teal: #EED7AE; --teal-2: #F3E3C2; --teal-soft: rgba(230, 203, 152, .12);
    --ok: #EED7AE; --ok-bg: rgba(230, 203, 152, .14); --warn: #E6CB98; --warn-bg: rgba(230, 203, 152, .14); --bad: #E8A898; --bad-bg: rgba(232, 168, 152, .13);
    --info: #D9DCDF; --info-bg: rgba(217, 220, 223, .1); --neutral: #D9DCDF; --neutral-bg: rgba(255, 255, 255, .05);
    --glass-body: linear-gradient(180deg, rgba(22, 37, 48, .82), rgba(13, 22, 30, .88));
    --glass-spec: radial-gradient(130% 100% at 0% 0%, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 38%);
    --glass-filet: inset 1px 1px 0 rgba(255, 255, 255, .20), inset 0 0 0 1px rgba(201, 207, 211, .06), inset -1px -1px 0 rgba(230, 203, 152, .06);
    --glass-line: rgba(201, 207, 211, .09);
    --g-shadow: 0 28px 60px -32px rgba(0, 0, 0, .85), 0 2px 12px -8px rgba(0, 0, 0, .6);
    --fx-beambase: rgba(14, 20, 25, .9); --fx-beamedge: rgba(217, 220, 223, .5); --fx-beam: rgba(239, 233, 222, .96); --fx-beamcore: #FFFFFF;
    --fx-bglow: rgba(239, 233, 222, .3); --fx-bglow2: rgba(230, 203, 152, .16);
    --pop-1: rgba(31, 52, 66, .94); --pop-2: rgba(16, 24, 31, .97); --pop-shadow: 0 34px 70px -24px rgba(0, 0, 0, .8);
    --tile-a: rgba(255, 255, 255, .09); --tile-b: rgba(255, 255, 255, .025); --tile-edge: rgba(255, 255, 255, .22);
    --input-bg: rgba(8, 13, 18, .5); --input-focus: rgba(255, 255, 255, .07);
    --fill: rgba(255, 255, 255, .045); --fill2: rgba(255, 255, 255, .085);
    --wall: radial-gradient(ellipse 70% 46% at 50% 0%, rgba(40, 72, 92, .55) 0%, rgba(26, 50, 66, .26) 46%, transparent 76%), linear-gradient(180deg, #14212C 0%, #0E1419 56%, #0A0F13 100%); --orb-o: .18;
    --o1: radial-gradient(circle, rgba(52, 88, 106, .5), transparent 70%); --o2: radial-gradient(circle, rgba(31, 52, 66, .7), transparent 70%); --o3: radial-gradient(circle, rgba(230, 203, 152, .12), transparent 70%);
    --btn-bg: linear-gradient(140deg, #FFFFFF 0%, #F7F2E8 32%, #EFE9DE 58%, #ECE3D2 80%, #E6D7BC 100%); --btn-ink: #121212; --btn-glow: 239 233 222;
  }
  html[data-mode="admin"] .eyebrow { color: #D9DCDF; }
}
/* @theme-end */
@property --fx-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --fx-b { syntax: "<angle>"; inherits: false; initial-value: 180deg; }
html[data-mode="admin"] body { background: var(--bg); color: var(--ink); font-family: var(--sans); }
/* Fundo vivo: parede com orbes champanhe desfocados e grão, sob o vidro. */
.fxi { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[data-mode="admin"] [tabindex="-1"]:focus { outline: none; }
.lg-wall { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--wall); }
.lg-wall i { position: absolute; border-radius: 50%; opacity: var(--orb-o); }
.lg-wall .o1 { top: 6%; left: -6%; width: 42vmax; height: 42vmax; background: var(--o1); filter: blur(60px); animation: lgorb1 18s ease-in-out infinite; }
.lg-wall .o2 { bottom: -8%; right: -8%; width: 46vmax; height: 46vmax; background: var(--o2); filter: blur(70px); animation: lgorb2 23s ease-in-out infinite; }
.lg-wall .o3 { top: 45%; left: 30%; width: 34vmax; height: 34vmax; background: var(--o3); filter: blur(70px); opacity: calc(var(--orb-o) * .7); animation: lgorb3 15s ease-in-out infinite; }
.lg-wall .grain { inset: 0; width: auto; height: auto; border-radius: 0; opacity: .06; background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1px); background-size: 22px 22px; }
@keyframes lgorb1 { 0%, 100% { transform: translate(-10%, -8%) scale(1); } 50% { transform: translate(14%, 10%) scale(1.15); } }
@keyframes lgorb2 { 0%, 100% { transform: translate(8%, 6%) scale(1.08); } 50% { transform: translate(-16%, -10%) scale(.9); } }
@keyframes lgorb3 { 0%, 100% { transform: translate(0, 18%) scale(.95); } 50% { transform: translate(12%, -16%) scale(1.2); } }
/* Vidro óptico (Manual V0.2): corpo translúcido e denso de petróleo (Night) ou marfim e madrepérola (Day), blur 26 px e saturação 1,15,
   reflexo direcional discreto no canto superior esquerdo e filetes de 1 px (claro em cima e à esquerda, quase nulo no lado oposto).
   Sem máscara, sem pseudo-elemento e sem animação no vidro (no Safari isso virava névoa e contorno grosso): a profundidade vem da
   composição das camadas (palco → vidro → peças internas). */
html[data-mode="admin"] :is(.glass, .card, .pcard) {
  position: relative; border: 1px solid var(--glass-line);
  background: var(--glass-spec), var(--glass-body);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.15); backdrop-filter: blur(var(--blur)) saturate(1.15);
  box-shadow: var(--g-shadow), var(--glass-filet);
}
html[data-mode="admin"] .card { border-radius: var(--r-lg); }
html[data-mode="admin"] .list-card { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-left: 0; padding-right: 0; }
html[data-mode="admin"] .list-card::before { display: none; }
/* Filtro ativo: botão do tema (preto no claro, champanhe no escuro), sempre legível. */
html[data-mode="admin"] .chip[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
html[data-mode="admin"] .chip { background: color-mix(in srgb, var(--surface) 40%, transparent); }
html[data-mode="admin"] .kpi[aria-pressed="true"] { background: rgb(var(--acc) / .14); }
/* Seções em cartão: respiro interno e espaço entre elas (nada encostado). */
html[data-mode="admin"] section.card[aria-labelledby="track-title"] { padding: 22px 22px 18px; margin-top: 18px; }
html[data-mode="admin"] .kpis { margin-bottom: 4px; }
/* Barra superior e tab bar: o conteúdo some num degradê ao passar por baixo, sem sobreposição. */
.lg-nav { background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); border-bottom: 1px solid var(--line); }
.lg-tabbar::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 130px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 88%, transparent) 55%, var(--bg)); }
.lg-field input:focus, .lg-field input:focus-visible { outline: none; box-shadow: none; }
/* Painéis sobrepostos (detalhes, menus, diálogos, avisos): vidro denso, legível. */
html[data-mode="admin"] :is(.drawer, .menu, .dialog, .toast) {
  background: linear-gradient(155deg, var(--pop-1), var(--pop-2)); -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: var(--pop-shadow), 0 0 0 .8px var(--line-2), inset 0 1px 0 var(--tile-edge); border-color: transparent; color: var(--ink);
}
/* Botões */
html[data-mode="admin"] .btn { border-radius: 18px; transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s, background .2s; }
html[data-mode="admin"] .btn:active { transform: scale(.96); }
html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new) {
  position: relative; isolation: isolate; background: var(--btn-bg); color: var(--btn-ink); border: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  box-shadow: 0 0 16px -6px var(--fx-bglow), 0 0 30px -16px var(--fx-bglow2), inset 0 1px 0 rgba(255, 255, 255, .6); animation: fxGlow 3.2s ease-in-out infinite; }
/* dois feixes de 1 px em sentidos opostos (3,4 s; o segundo defasado em 180°) */
html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new)::before, html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  background: conic-gradient(from var(--fx-a), transparent 0 76%, var(--fx-beamedge) 86%, var(--fx-beam) 93%, var(--fx-beamcore) 98%, transparent 100%); animation: fxBeamA 3.4s linear infinite; }
html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new)::after { background: conic-gradient(from var(--fx-b), transparent 0 76%, var(--fx-beamedge) 86%, var(--fx-beam) 93%, var(--fx-beamcore) 98%, transparent 100%); animation-name: fxBeamB; }
@keyframes fxBeamA { to { --fx-a: 360deg; } }
@keyframes fxBeamB { from { --fx-b: 180deg; } to { --fx-b: 540deg; } }
@keyframes fxGlow { 0%, 100% { box-shadow: 0 0 16px -6px var(--fx-bglow), 0 0 30px -16px var(--fx-bglow2), inset 0 1px 0 rgba(255, 255, 255, .6); } 50% { box-shadow: 0 0 22px -5px var(--fx-bglow), 0 0 40px -14px var(--fx-bglow2), inset 0 1px 0 rgba(255, 255, 255, .6); } }
html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new):is(:disabled, [aria-disabled="true"]) { animation: none; box-shadow: none; opacity: .45; }
html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new):is(:disabled, [aria-disabled="true"])::before, html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new):is(:disabled, [aria-disabled="true"])::after { display: none; }
@media (prefers-reduced-motion: reduce) { html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new), html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new)::before, html[data-mode="admin"] :is(.btn-primary, .btn-prom, .lg-cluster .cl-new)::after { animation: none; } }
html[data-mode="admin"] .btn-primary:focus-visible { box-shadow: 0 0 0 3px rgb(var(--acc) / .5); }
html[data-mode="admin"] .btn-primary:hover { transform: scale(1.015) translateY(-1px); }
html[data-mode="admin"] :is(.btn-secondary, .btn-ghost) { background: linear-gradient(145deg, var(--tile-a), var(--tile-b)); color: var(--ink); border: 0;
  box-shadow: inset 0 1px 1px var(--tile-edge), inset 0 -1px 1px rgba(255, 255, 255, .08), 0 6px 16px -8px rgba(0, 0, 0, .35); }
html[data-mode="admin"] .btn-ghost { background: transparent; box-shadow: none; }
html[data-mode="admin"] .btn-ghost:hover { background: var(--fill2); }
/* Campos */
html[data-mode="admin"] :is(.input, .select, .textarea) { border: 0; border-radius: 16px; background-color: var(--input-bg); color: var(--ink);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .12), inset 0 0 0 1px var(--line), 0 1px 0 rgba(255, 255, 255, .1); }
html[data-mode="admin"] :is(.input, .select, .textarea):focus { background-color: var(--input-focus); outline: none; box-shadow: 0 0 0 1.5px rgb(var(--acc) / .85), 0 0 22px rgb(var(--acc) / .3); }
html[data-mode="admin"] :focus-visible { outline: 2px solid rgb(var(--acc)); outline-offset: 2px; }
/* Títulos: Cormorant itálico leve, como na referência */
html[data-mode="admin"] :is(.h1, .doc-h2, .pcard-name) { font-family: var(--serif); font-style: italic; font-weight: 300; letter-spacing: -.005em; }
html[data-mode="admin"] .h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.03; }
html[data-mode="admin"] .eyebrow { color: rgb(var(--acct)); font-size: 10.5px; letter-spacing: .3em; font-weight: 500; text-transform: uppercase; }
/* Pré-visualização da proposta clássica dentro do painel: mantém o visual que o paciente vê. */
html[data-mode="admin"] :is(.drawer-body, .preview-scroll) .doc-wrap {
  color-scheme: light; --bg: #F3F0EA; --bg-2: #ECE7DF; --surface: #FCFBF8; --surface-2: #F7F4EE; --surface-3: #EFEAE1; --line: #E5DED2; --line-2: #D5CBBB;
  --ink: #1E1D1A; --ink-2: #4E4941; --ink-3: #686256; --gold: #85642F; --gold-2: #B4925A; --teal: #144B52; --teal-2: #0E383D; --teal-soft: #E3EDED;
  --ok: #23563E; --ok-bg: #E4EEE7; --warn: #774B0C; --warn-bg: #F6EAD3; --bad: #8A2A2A; --bad-bg: #F5E2DF; --info: #144B52; --info-bg: #E2EDED; --neutral: #4E4941; --neutral-bg: #ECE8E1;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--ink);
}

/* ---------- Barra superior flutuante: pílula da marca + grupo de ações ---------- */
html[data-mode="admin"] .app-header { display: none; }
.lg-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); max-width: 1240px; margin: 0 auto; }
.lg-pill { height: 48px; padding: 0 16px 0 14px; border-radius: 24px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lg-pill .bp-mark { width: 16px; height: 22px; color: rgb(var(--acct)); }
.lg-pill .bp-name { font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.lg-pill .bp-badge { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgb(var(--acc) / .22); color: rgb(var(--acct)); box-shadow: inset 0 0 0 1px rgb(var(--acc) / .32); }
.lg-seg { margin: 0 auto; height: 48px; padding: 4px; border-radius: 24px; display: none; gap: 2px; }
.lg-seg a { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; position: relative; z-index: 4; }
.lg-seg a[aria-current="page"] { color: rgb(var(--acct)); background: linear-gradient(135deg, var(--fill2), rgb(var(--acc) / .1)); box-shadow: 0 4px 18px rgb(var(--acc) / .2), inset 0 1.2px 1.5px rgba(255, 255, 255, .7); }
.lg-seg svg { width: 17px; height: 17px; }
.lg-cluster { margin-left: auto; height: 48px; padding: 3px; border-radius: 24px; display: flex; align-items: center; gap: 2px; }
.lg-cluster > * { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: none; border: 0; position: relative; z-index: 4; text-decoration: none; transition: background .2s, transform .3s var(--spring); }
.lg-cluster > *:hover { background: var(--fill2); } .lg-cluster > *:active { transform: scale(.9); }
.lg-cluster > *[aria-current="page"] { color: rgb(var(--acct)); }
.lg-cluster svg { width: 20px; height: 20px; }
.lg-cluster .cl-new { background: var(--btn-bg); color: var(--btn-ink); }
/* ---------- Tab bar flutuante (celular) ---------- */
.lg-tabbar { position: fixed; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; display: flex; gap: 10px; height: 62px; }
.lg-tabbar .tabs { flex: 1; border-radius: 31px; display: flex; padding: 4px; }
.lg-tabbar .tab { position: relative; z-index: 4; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 27px; font-size: 10.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.lg-tabbar .tab svg { width: 23px; height: 23px; }
.lg-tabbar .tab[aria-current="page"] { color: rgb(var(--acct)); background: linear-gradient(135deg, var(--fill2), rgb(var(--acc) / .1)); box-shadow: 0 4px 18px rgb(var(--acc) / .22), inset 0 1.2px 1.5px rgba(255, 255, 255, .7); }
.lg-tabbar .tab-search { width: 62px; height: 62px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink); border: 0; }
.lg-tabbar .tab-search svg { width: 22px; height: 22px; position: relative; z-index: 4; }
html[data-mode="admin"] .page { padding-bottom: calc(150px + env(safe-area-inset-bottom)); scroll-padding-bottom: 160px; }
@media (min-width: 900px) {
  .lg-seg { display: flex; }
  .lg-tabbar { display: none; }
  html[data-mode="admin"] .page { padding-bottom: 40px; }
}
.is-wizard .lg-tabbar, .is-wizard .lg-seg, .is-wizard .lg-cluster .cl-new { display: none; }
/* ---------- Login (cartão da referência) ---------- */
.lg-login { min-height: 100svh; display: grid; place-items: center; padding: 24px 18px; }
.lg-login .lcard { width: min(100%, 400px); border-radius: 38px; padding: 26px 22px 18px; overflow: hidden; }
.lg-login .shimmer { position: absolute; top: -50%; left: -50%; width: 80%; height: 200%; pointer-events: none; z-index: 1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .02) 35%, rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, .02) 65%, transparent); animation: lgsweep 7s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes lgsweep { 0% { transform: translateX(-150%) rotate(24deg); } 42%, 100% { transform: translateX(190%) rotate(24deg); } }
.lg-login .card-in { position: relative; z-index: 4; display: flex; flex-direction: column; gap: 16px; }
.lg-login .card-h { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lg-login .card-brand { height: 24px; width: auto; color: var(--ink); margin: 2px 0 16px; }
.lg-login .hero { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; margin-bottom: 10px; background: linear-gradient(145deg, var(--tile-a), var(--tile-b)); box-shadow: inset 0 1px 1px var(--tile-edge), 0 6px 16px -8px rgba(0, 0, 0, .45); }
.lg-login .hero svg { width: 27px; height: 27px; color: rgb(var(--acct)); }
.lg-login .kicker { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: rgb(var(--acct)); font-weight: 500; margin-bottom: 4px; }
.lg-login h1 { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 34px; line-height: 1.05; color: var(--ink); }
.lg-login .card-h p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.lg-login .card-h p b { color: rgb(var(--acct)); font-weight: 600; }
.lg-field { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 18px; background: var(--input-bg); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2), inset 0 0 0 1px var(--line), 0 1px 0 rgba(255, 255, 255, .1); transition: background .3s, box-shadow .3s, transform .3s var(--out); }
.lg-field:focus-within { background: var(--input-focus); box-shadow: 0 0 0 1.5px rgb(var(--acc) / .85), 0 0 24px rgb(var(--acc) / .32); transform: translateY(-1px); }
.lg-field > svg { width: 19px; height: 19px; color: rgb(var(--acct)); opacity: .85; flex: none; }
.lg-field .fx { flex: 1; min-width: 0; }
.lg-field label { display: block; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); }
.lg-field input { width: 100%; background: transparent; border: 0; outline: 0; font: inherit; font-size: 16px; font-weight: 500; padding: 0; margin-top: 1px; color: var(--ink); }
.lg-field .eye { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: none; border: 0; }
.lg-field .eye svg { width: 18px; height: 18px; }
.lg-fields { display: flex; flex-direction: column; gap: 10px; }
.btn-prom { position: relative; width: 100%; min-height: 52px; padding: 0 20px; border-radius: 20px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--btn-ink); background: var(--btn-bg);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  box-shadow: 0 12px 28px -8px rgb(var(--btn-glow) / .45), inset 0 1.5px 1.5px rgba(255, 255, 255, .5), inset 0 -2px 4px rgba(0, 0, 0, .16); transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), box-shadow .32s; }
.btn-prom:hover { transform: scale(1.015) translateY(-1px); } .btn-prom:active { transform: scale(.965); } .btn-prom:disabled { opacity: .55; transform: none; }
.btn-prom svg { width: 18px; height: 18px; }
.lg-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-reg { min-height: 46px; padding: 0 12px; border-radius: 18px; border: 0; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: linear-gradient(145deg, var(--tile-a), var(--tile-b)); box-shadow: inset 0 1px 1px var(--tile-edge), inset 0 -1px 1px rgba(255, 255, 255, .08), 0 6px 16px -8px rgba(0, 0, 0, .45); transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.btn-reg:hover { transform: scale(1.025); } .btn-reg:active { transform: scale(.95); }
.btn-reg svg { width: 17px; height: 17px; color: rgb(var(--acct)); }
.lg-login .card-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); }
.lg-login .card-f .last { display: flex; align-items: center; gap: 7px; }
.lg-login .card-f .last i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--acc)); }
.lg-login .err { font-size: 12px; color: var(--bad); text-align: center; }
/* Campo em foco: anel marfim/neutro (sem brilho champanhe) e sem o amarelo do preenchimento automático. */
.lg-field:focus-within { box-shadow: 0 0 0 1px rgba(18, 18, 18, .22), 0 0 0 5px rgba(18, 18, 18, .045), 0 10px 24px -14px rgba(0, 0, 0, .3); }
@media (prefers-color-scheme: dark) { html[data-mode="admin"] .lg-field:focus-within { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 0 5px rgba(255, 255, 255, .06), 0 12px 28px -14px rgba(0, 0, 0, .6); } }
.lg-field input:-webkit-autofill, .lg-field input:-webkit-autofill:hover, .lg-field input:-webkit-autofill:focus, .lg-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px transparent inset; box-shadow: 0 0 0 1000px transparent inset; transition: background-color 600000s 0s, color 600000s 0s; }
.lg-field input:autofill { background: transparent; }
/* Demais campos do painel (ex.: "Nova senha"): sem o amarelo do preenchimento automático do Safari/Chrome. */
html[data-mode="admin"] :is(input, textarea):is(:-webkit-autofill, :-webkit-autofill:hover, :-webkit-autofill:focus) {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--surface) inset; box-shadow: 0 0 0 1000px var(--surface) inset; transition: background-color 600000s 0s, color 600000s 0s; }
html[data-mode="admin"] :is(input, textarea):autofill { background: var(--input-bg); }
html[data-mode="admin"] .lg-field input:focus, html[data-mode="admin"] .lg-field input:focus-visible { outline: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .lg-wall i, .lg-login .shimmer { animation: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { html[data-mode="admin"] :is(.glass, .card, .pcard) { background: var(--surface); } }

/* ---------- Cartões de pacientes (tela inicial) ---------- */
.pcards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.pcard { position: relative; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.pcard:hover { transform: translateY(-2px); }
.pcard.is-open { grid-column: 1 / -1; transform: none; }
.pcard-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px 14px; color: inherit; border-radius: var(--r-lg); }
.pcard-num { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.pcard-name { grid-column: 1; font-family: var(--serif); font-size: 26px; line-height: 1.1; color: var(--ink); }
.pcard.is-free .pcard-name { color: var(--ink-3); font-style: italic; }
.pcard-treat { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; }
.pcard-side { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pcard-chev { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); transition: transform .3s var(--ease); }
.pcard.is-open .pcard-chev { transform: rotate(180deg); }
.pcard-step { grid-column: 1 / -1; margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pcard-step i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold-2) 22%, transparent); flex: none; }
.pcard-step.is-done i { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.pcard-foot { display: flex; align-items: center; gap: 8px; padding: 0 20px 16px; }
.pcard-foot .grow { margin-right: auto; font-size: 12.5px; color: var(--ink-3); }
.pcard-body { border-top: 1px solid var(--line); padding: 18px 20px 6px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.pcard-body > * { min-width: 0; }
.nudge .btns > * { flex: 1 1 auto; }

.journey { list-style: none; position: relative; display: grid; gap: 0; }
/* Percurso horizontal: trilho ———— com as etapas; no celular desliza para o lado. */
.journey.h { display: flex; gap: 0; overflow-x: auto; padding: 6px 2px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.journey.h::-webkit-scrollbar { display: none; }
.journey.h li { flex: 1 0 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 4px; scroll-snap-align: start; }
.journey.h li::before { left: calc(50% + 14px); right: calc(-50% + 14px); top: 10px; bottom: auto; width: auto; height: 2px; border-radius: 2px; }
.journey.h li.is-done::before { background: linear-gradient(90deg, var(--gold-2), color-mix(in srgb, var(--gold-2) 55%, transparent)); }
.journey.h .t { font-size: 12px; line-height: 1.25; }
.journey.h .w { font-size: 10.5px; }
.nudge .vars { display: flex; flex-wrap: wrap; gap: 6px; }
.nudge .vars button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; }
.nudge .vars button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
.journey li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 14px; }
.journey li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: -2px; width: 1px; background: var(--line-2); }
.journey li:last-child::before { display: none; }
.journey li.is-done::before { background: linear-gradient(180deg, var(--gold-2), color-mix(in srgb, var(--gold-2) 40%, transparent)); }
.journey .dot { width: 21px; height: 21px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 10px; color: var(--ink-3); background: var(--surface); position: relative; z-index: 1; }
.journey li.is-done .dot { background: var(--gold-2); border-color: var(--gold-2); color: #fff; }
.journey li.is-current .dot { border-color: var(--gold-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold-2) 25%, transparent); animation: jpulse 2.4s ease-in-out infinite; }
@keyframes jpulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold-2) 10%, transparent); } }
.journey .t { font-size: 14px; color: var(--ink); line-height: 1.3; }
.journey li:not(.is-done):not(.is-current) .t { color: var(--ink-3); }
.journey .w { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.nudge { border-radius: 20px; padding: 16px; background: linear-gradient(145deg, var(--tile-a, var(--surface)), var(--tile-b, var(--surface))); box-shadow: inset 0 1px 1px var(--tile-edge, transparent), 0 6px 16px -8px rgba(0, 0, 0, .35); border: 0; display: grid; gap: 10px; }
.nudge .eyebrow { font-size: 10.5px; }
.nudge p { font-size: 14px; color: var(--ink-2); }
.nudge .msg { font-size: 13px; font-style: italic; color: var(--ink-3); border-left: 2px solid var(--gold-2); padding-left: 10px; }
.nudge .btns { display: flex; flex-wrap: wrap; gap: 8px; }
html[data-mode="admin"] .textarea { background-color: color-mix(in srgb, var(--surface) 82%, transparent); }
html[data-mode="admin"] .wiz-bar { background: color-mix(in srgb, var(--bg) 86%, transparent); }
html[data-mode="admin"] :is(.svc.is-on, .cond, .confirm-card, .opt-box, .choice input:checked + .box) { background: var(--surface); }
@media (prefers-color-scheme: dark) {
  html[data-mode="admin"] .notice.t-warn { color: var(--warn); }
  html[data-mode="admin"] .notice.t-bad { color: var(--bad); }
  html[data-mode="admin"] .notice.t-ok { color: var(--ok); }
  html[data-mode="admin"] .notice.t-info { color: var(--info); }
  html[data-mode="admin"] .step-btn[aria-current="step"] .n { color: var(--bg); }
}
/* A lista não fica dentro de outra caixa: os cartões flutuam sobre o fundo. */
html[data-mode="admin"] .list-card { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-left: 0; padding-right: 0; }
.hdr-pass svg { width: 16px; height: 16px; }
.hdr-pass .hdr-label { display: none; }
@media (max-width: 767px) { html[data-mode="admin"] .header-cta .label-long { display: none; } html[data-mode="admin"] .header-cta .label-short { display: inline; } }
@media (max-width: 480px) { html[data-mode="admin"] .header-row { gap: 6px; } html[data-mode="admin"] .header-row > .btn-sm { padding-left: 10px; padding-right: 10px; } html[data-mode="admin"] .brand-name { font-size: 19px; } html[data-mode="admin"] .brand-sub { font-size: 9.5px; letter-spacing: .14em; } }
@media (min-width: 768px) { .hdr-pass svg { display: none; } .hdr-pass .hdr-label { display: inline; } }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard-chev { transition: none; } .journey li.is-current .dot { animation: none; } }

/* ---------- Cartões no modo claro: superfície do manual "Pérola Quente, Marfim & Champanhe" (cetim) ----------
   e luz de atenção no vidro (princípios do Liquid Glass): duas luzes deslizam pelas laterais e desenham o contorno,
   a luz entra pela borda e acende o cartão por dentro, e o brilho vaza para a sombra e para o vidro vizinho. */
html[data-mode="admin"] {
  --ivory-canvas: #FCF9F2; --ivory-warm-cream: #F6EFE2; --pearl-warm-base: #F9F3EC; --pearl-specular-light: #FFFDF9; --pearl-nacre-rose: #FBE9E2;
  --champagne-nectar: #F7E7CE; --champagne-satin: #E6CCA5; --champagne-deep-ink: #382C1E;
  --pearl-reflection-intensity: 1.00; --champagne-glow-intensity: 1.00; --nacre-iridescence: 1.00; --ivory-warmth: 0.50; --light-angle: 135deg;
  --card-surface: var(--glass-spec), var(--glass-body); --card-border: 1px solid var(--glass-line); --card-shadow: var(--g-shadow);
  /* Luz de atenção · dia: pérola quente */
  --lum: 224 202 195; --lum-hot: 255 253 249; --lum-in: 255 243 238; --lum-in-a: 1; --lum-tint: 218 190 181; --lum-blend: normal; --spill-a: .72; --lit-ink: #3D3B38;
}
@media (prefers-color-scheme: dark) {
  html[data-mode="admin"] {
    /* Luz de atenção · noite: marfim e branco, reflexo prata (manual Cartão Signature) */
    --lum: 239 233 222; --lum-hot: 255 255 255; --lum-in: 239 233 222; --lum-in-a: .5; --lum-tint: 217 220 223; --lum-blend: screen; --spill-a: .6; --lit-ink: #EFE9DE;
  }
}
html[data-mode="admin"] .pcard { background: var(--card-surface); border: var(--card-border); box-shadow: var(--card-shadow); }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --bloom { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.pcard-head, .pcard-body, .pcard-foot { position: relative; z-index: 2; }
.pcard-alert { grid-column: 1 / -1; margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; font-weight: 600; color: var(--lit-ink); }
.pcard-alert .t { flex-basis: 100%; padding-left: 16px; color: var(--ink-3); font-weight: 400; }
.spark { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--lum-hot)); box-shadow: 0 0 0 3px rgb(var(--lum) / .9), 0 0 14px 2px rgb(var(--lum-tint) / .8); flex: none; }
html[data-mode="admin"] .pcard.is-lit::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: 3; padding: 1.9px;
  background: conic-gradient(from var(--ang), transparent 0deg 50deg, rgb(var(--lum) / .9) 72deg, rgb(var(--lum-hot)) 90deg, rgb(var(--lum) / .9) 108deg, transparent 130deg 230deg, rgb(var(--lum) / .9) 252deg, rgb(var(--lum-hot)) 270deg, rgb(var(--lum) / .9) 288deg, transparent 310deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: litslide 4.2s ease-in-out infinite alternate; }
@keyframes litslide { from { --ang: -32deg; } to { --ang: 32deg; } }
.pcard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0; mix-blend-mode: var(--lum-blend);
  background:
    radial-gradient(var(--bloom) 95% at 0% 50%, rgb(var(--lum-in) / var(--lum-in-a)), rgb(var(--lum-in) / calc(var(--lum-in-a) * .35)) 45%, transparent 75%),
    radial-gradient(var(--bloom) 95% at 100% 50%, rgb(var(--lum-in) / var(--lum-in-a)), rgb(var(--lum-in) / calc(var(--lum-in-a) * .35)) 45%, transparent 75%),
    radial-gradient(60% 40% at 50% 0%, rgb(var(--lum-hot) / .35), transparent 70%);
  transition: opacity .8s ease; }
.pcard.is-lit::after { opacity: 1; animation: litignite 1.6s cubic-bezier(.22, 1, .36, 1) both, litpulse 3.6s ease-in-out 1.6s infinite; }
@keyframes litignite { from { --bloom: 0%; } to { --bloom: 72%; } }
@keyframes litpulse { 0%, 100% { --bloom: 72%; } 50% { --bloom: 52%; } }
html[data-mode="admin"] .pcard.is-lit { box-shadow: var(--card-shadow), -16px 0 42px -14px rgb(var(--lum-tint) / var(--spill-a)), 16px 0 42px -14px rgb(var(--lum-tint) / var(--spill-a)), 0 30px 60px -26px rgb(var(--lum-tint) / var(--spill-a)); }
@media (prefers-reduced-motion: reduce) { html[data-mode="admin"] .pcard.is-lit::before, .pcard.is-lit::after { animation: none; } .pcard.is-lit::after { --bloom: 70%; } }
/* Indicação por procedimento (assistente, catálogo e documento) */
.indication { white-space: pre-line; }
  

/* Agenda: mantém o vidro e as luzes do painel, com contraste próprio em cada tema. */
.faces-agenda-month { margin-top: 18px; }
html[data-mode="admin"] .faces-agenda-month { isolation: isolate; overflow: hidden; }
.faces-agenda-month > * { position: relative; z-index: 1; }
html[data-mode="admin"] .faces-agenda-month::after {
  content: ""; position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 16% 0%, rgba(255,255,255,.48), transparent 30%),
    radial-gradient(ellipse at 86% 100%, rgb(var(--acc-d) / .20), transparent 31%);
  animation: faces-agenda-light 20s ease-in-out infinite alternate;
}
@keyframes faces-agenda-light { from { transform: translate3d(-3%, -2%, 0); } to { transform: translate3d(3%, 2%, 0); } }
.faces-month-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.faces-month-head h2 { text-align: center; }
.faces-month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.faces-month-week { margin-bottom: 8px; text-align: center; color: var(--ink-2); font-size: 12px; }
.faces-month-day {
  min-width: 0; min-height: 92px; border-radius: 16px; border: 1px solid rgb(var(--acc3) / .20);
  background: rgb(var(--acc) / .06); color: var(--ink); padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.faces-month-day strong { font-weight: 500; font-size: 14px; }
.faces-month-day small { font-size: 11px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
.faces-month-day:hover { border-color: rgb(var(--acc3) / .6); background: rgb(var(--acc) / .12); }
.faces-month-day.selected {
  border-color: rgb(var(--acct) / .75); background: rgb(var(--acc-d) / .23);
  box-shadow: inset 0 0 0 1px rgb(var(--acc-d) / .38), 0 0 25px -8px rgb(var(--acc-d) / .7);
}
.faces-month-day:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.faces-month-legend { margin-top: 14px; color: var(--ink-2); }
.faces-agenda-warning { margin-top: 12px; }
.faces-agenda-events h2 { margin-bottom: 14px; }
.faces-agenda-event-list { display: grid; gap: 0; }
.faces-agenda-event { padding: 14px 4px; border-bottom: 1px solid var(--line-2); }
.faces-agenda-event:last-child { border-bottom: 0; }
.faces-agenda-event strong { font-size: 15px; }
.faces-agenda-event .subtle { margin-top: 4px; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) {
  html[data-mode="admin"] .faces-agenda-month::after {
    background: radial-gradient(ellipse at 16% 0%, rgba(255,255,255,.17), transparent 30%),
      radial-gradient(ellipse at 86% 100%, rgb(var(--acc-d) / .15), transparent 31%);
  }
  .faces-month-day { border-color: rgba(230, 233, 236, .18); background: rgba(12, 24, 32, .18); }
  .faces-month-day.selected { background: rgb(var(--acc-d) / .16); }
}
@media (max-width: 600px) {
  .faces-month-grid { gap: 4px; }
  .faces-month-day { min-height: 65px; padding: 6px; border-radius: 10px; }
  .faces-month-day small { font-size: 9px; line-height: 1.2; }
  .faces-month-head .btn { font-size: 11px; padding: 7px 8px; }
  .faces-month-head h2 { font-size: clamp(16px, 4.5vw, 22px); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-mode="admin"] .faces-agenda-month::after { animation: none; }
  .faces-month-day { transition: none; }
}

/* Navegação principal: cabe no iPad (paisagem) e em celulares estreitos, sem alterar o desenho dos itens. */
.lg-seg .nav-short { display: none; }
@media (min-width: 900px) and (max-width: 1279px) {
  .lg-seg .nav-full { display: none; }
  .lg-seg .nav-short { display: inline; }
  .lg-seg a { padding: 0 11px; gap: 6px; white-space: nowrap; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .lg-seg { margin: 0 auto; gap: 0; }
  .lg-seg a { padding: 0 7px; gap: 4px; font-size: 12px; }
  .lg-seg svg { width: 14px; height: 14px; }
}
@media (min-width: 900px) and (max-width: 979px) {
  .lg-seg svg { display: none; }
}
@media (max-width: 419px) {
  .lg-tabbar { gap: 8px; }
  .lg-tabbar .tabs { padding: 3px; }
  .lg-tabbar .tab { min-width: 0; font-size: 9.5px; letter-spacing: 0; padding: 0 1px; }
  .lg-tabbar .tab svg { width: 21px; height: 21px; }
  .lg-tabbar .tab-search { width: 54px; height: 54px; }
  .lg-tabbar .tab[href="#/nova"] { display: none; } /* a ação "Nova proposta" segue no botão + do cabeçalho */
}
/* ---- Tipografia oficial, assinatura, seletores marcados, agenda e funil ---- */
/* Corpo e títulos: Montserrat + Cormorant Garamond itálico leve (peso 300). */
html[data-mode="admin"] body { font-family: var(--sans); font-weight: 400; background: var(--bg); }
html[data-mode="admin"] :is(.h1, .h2, .h3, .doc-h2, .pcard-name, .drawer-title, .empty .h3, .kpi-num, .modal h2, .modal h3) { font-family: var(--serif); font-style: italic; font-weight: 300; letter-spacing: -.005em; }
html[data-mode="admin"] :is(.h2, .h3, .drawer-title, .empty .h3) { font-weight: 400; }
html[data-mode="admin"] .kpi-num { font-weight: 400; }
html[data-mode="admin"] .eyebrow { font-weight: 500; letter-spacing: .24em; }
html[data-mode="admin"] .kpi-label { font-weight: 500; }
/* Assinatura oficial (SVG do manual, cor do texto atual). */
.bp-sig { display: inline-block; background: currentColor; -webkit-mask: url("/assets/brand/faces-clinic-assinatura.svg") center / contain no-repeat; mask: url("/assets/brand/faces-clinic-assinatura.svg") center / contain no-repeat; }
.lg-pill .bp-sig { width: 118px; height: 12px; }
.bp-sig.bp-sig-lg { display: block; width: min(210px, 62%); height: 21px; margin: 0 auto 6px; color: var(--ink); }
@media (max-width: 420px) { .lg-pill .bp-sig { width: 92px; } .lg-pill .bp-badge { display: none; } }
/* iPad: alvos de toque de 44 px. */
@media (min-width: 744px) and (max-width: 1194px) and (pointer: coarse) {
  html[data-mode="admin"] :is(.btn, .input, .select) { min-height: 44px; }
  html[data-mode="admin"] .lg-seg a { min-height: 40px; }
}
/* Agenda: respiro interno dos cartões do mês e dos horários. */
.faces-agenda-month { padding: 22px; }
.faces-agenda-month .faces-month-legend { margin-bottom: 4px; }
/* Estágios do funil: vidro fino, nunca placa branca. */
html[data-mode="admin"] .funnel-stage { background: color-mix(in srgb, var(--surface-2) 55%, transparent) !important; border-color: var(--line) !important; }
html[data-mode="admin"] .funnel-stage .eyebrow { letter-spacing: .16em; line-height: 1.5; }
/* Seletores marcados: preenchimento do tema (marfim no Night, grafite no Day) com o texto do próprio tema, nunca claro sobre claro. */
html[data-mode="admin"] :is(.segmented input:checked + span, .btn-dark) { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
html[data-mode="admin"] .step-btn[aria-current="step"] .n { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
/* Benefícios: colunas iguais, campo de percentual na largura da coluna e a caixa de seleção alinhada ao campo ao lado. */
.coupon-grid .pct { max-width: none; }
.coupon-grid .field-check .lbl-sp { display: block; font-size: 13px; line-height: 1.4; margin-bottom: 6px; visibility: hidden; }
.coupon-grid .field-check .check { min-height: 48px; display: flex; align-items: center; gap: 12px; margin: 0; }
/* Menu superior em notebooks: sem ícones, para os itens caberem entre a marca e as ações sem rolagem horizontal. */
@media (min-width: 1200px) and (max-width: 1599px) { .lg-seg a svg { display: none; } .lg-seg a { padding: 0 16px; } }
/* Campos de data e grades: o iOS dá largura mínima própria ao campo de data; sem isso ele vaza da coluna e cobre o vizinho. */
html[data-mode="admin"] .grid-2 > *, html[data-mode="admin"] .field { min-width: 0; }
html[data-mode="admin"] input[type="date"].input { min-width: 0; width: 100%; max-width: 100%; -webkit-appearance: none; appearance: none; min-height: 48px; display: block; }
html[data-mode="admin"] input[type="date"].input::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }

/* ---------- Central de notificações: sino com contador, histórico, dispositivos e diagnóstico recolhível ---------- */
.bell-link { position: relative; }
.bell-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgb(var(--acc)); color: #1A1814; font: 700 10.5px/18px var(--sans); text-align: center; pointer-events: none; }
.bell-badge[hidden] { display: none; }
.nt-card { padding: clamp(20px, 4vw, 30px); }
.nt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nt-head p { margin: 4px 0 0; }
.nt-views, .nt-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nt-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 13px/1 var(--sans); cursor: pointer; }
.nt-chip.is-on { color: var(--ink); border-color: rgb(var(--acc)); background: rgb(var(--acc) / .14); }
.nt-count { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: rgb(var(--acc)); color: #1A1814; font-size: 11px; font-weight: 700; }
.nt-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.nt-item { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.nt-item:first-child { border-top: 0; }
.nt-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: transparent; border: 1px solid var(--line); }
.is-unread > .nt-dot, .is-unread .nt-dot { background: rgb(var(--acc)); border-color: rgb(var(--acc)); }
.nt-body { min-width: 0; flex: 1; }
.nt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nt-text { margin: 4px 0; line-height: 1.5; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* especificidade acima da regra de vidro do painel (que define position: relative) */
html[data-mode="admin"] .nt-pop { position: fixed; top: 74px; right: 12px; z-index: 70; width: min(380px, calc(100vw - 24px)); max-height: 72vh; overflow: auto; padding: 0; border-radius: var(--r-lg); }
.nt-pop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 8px; }
.nt-pop-list { list-style: none; margin: 0; padding: 0; }
.nt-pop-item { display: flex; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; border-top: 1px solid var(--line); font: inherit; }
.nt-pop-text { display: grid; gap: 2px; min-width: 0; } .nt-pop-text span { font-size: 12.5px; color: var(--ink-2); }
.nt-pop-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.push-stack { display: grid; gap: 16px; }
.push-device { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); }
.push-device:first-child { border-top: 0; }
.push-device-main { min-width: 0; flex: 1 1 240px; }
.push-device-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.push-advanced > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; align-items: center; }
.push-advanced > summary::-webkit-details-marker { display: none; }
.push-advanced > summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--ink-2); }
.push-advanced[open] > summary::after { content: "–"; }
