@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --ink: #101658;
  --ink-soft: #4f579d;
  --muted: #7179b8;
  --line: rgba(95, 101, 188, .16);
  --panel: rgba(255, 255, 255, .94);
  --panel-solid: #fff;
  --lavender: #eee9ff;
  --lavender-strong: #e5dcff;
  --purple: #743cff;
  --purple-dark: #4a25d7;
  --blue: #2c84ee;
  --teal: #12b28a;
  --red: #f14562;
  --amber: #ec9d15;
  --shadow: 0 16px 46px rgba(68, 64, 147, .10);
  --radius: 16px;
  /* Avisos e respostas do paciente (briefing, sino, faixa de avisos, central): o mesmo gradiente branco → azul → roxo
     da identidade do produto, sem vermelho nem amarelo (decisão do usuário, 12/10/2026). */
  --notice-bg: linear-gradient(135deg,#ffffff 0%,#e2edff 50%,#ebe0ff 100%);
  --notice-border: #d6d0fa;
}

/* Relatórios operacionais e leitura assistida por IA */
.reports-heading { align-items:flex-end; gap:20px; }
.reports-toolbar { display:flex; align-items:flex-end; gap:9px; }
.reports-toolbar label { display:grid; gap:5px; color:var(--ink-soft); font-size:10px; }
.reports-toolbar select { height:39px; min-width:145px; padding:0 10px; border:1px solid #ded8f3; border-radius:10px; color:var(--ink); background:rgba(255,255,255,.76); outline:0; font-size:11px; }
.reports-toolbar .button { min-height:39px; }
.reports-period-note { display:flex; align-items:center; gap:7px; margin:-8px 0 16px; color:var(--ink-soft); font-size:11px; }
.reports-period-note svg { width:15px; height:15px; color:var(--purple); }
.reports-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.report-kpi-card { min-height:116px; display:flex; align-items:center; gap:12px; padding:17px; border:1px solid rgba(255,255,255,.9); border-radius:15px; background:rgba(255,255,255,.76); box-shadow:var(--shadow); backdrop-filter:blur(16px); }
.report-kpi-card > div:last-child { min-width:0; display:grid; gap:4px; }
.report-kpi-card span { color:var(--ink-soft); font-size:11px; }
.report-kpi-card strong { color:var(--ink); font:800 26px Manrope; letter-spacing:-.8px; }
.report-kpi-card small { color:var(--muted); font-size:10px; line-height:1.25; }
.report-kpi-icon { width:39px; height:39px; display:grid; place-items:center; flex:0 0 auto; color:var(--purple); border-radius:50%; background:#eee8ff; }
.report-kpi-icon svg { width:19px; height:19px; }
.report-kpi-icon.teal { color:#0b9d7d; background:#e0f7f0; }
.report-kpi-icon.amber { color:#ca8110; background:#fff0d2; }
.report-kpi-icon.blue { color:#337bdd; background:#e5efff; }
.reports-main-grid { display:grid; grid-template-columns:1.12fr .88fr; gap:14px; margin-bottom:14px; }
.reports-secondary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.report-card { min-width:0; padding:19px; }
.report-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:18px; }
.report-card-heading > div { min-width:0; }
.report-card-heading h2 { margin:0; color:var(--ink); font:800 15px Manrope; letter-spacing:-.3px; }
.report-card-heading p { margin:5px 0 0; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.report-badge { flex:0 0 auto; padding:5px 8px; color:var(--purple-dark); border-radius:999px; background:#f0ebff; font-size:9px; white-space:nowrap; }
.report-day-chart { height:164px; display:flex; align-items:flex-end; justify-content:space-around; gap:10px; padding:8px 4px 0; border-bottom:1px solid var(--line); }
.report-day-column { min-width:30px; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:5px; color:var(--ink-soft); font-size:10px; }
.report-day-column strong { color:var(--ink); font-size:11px; }
.report-day-column span { text-transform:capitalize; }
.report-day-track { width:28px; height:108px; display:flex; align-items:flex-end; justify-content:center; border-radius:9px 9px 2px 2px; background:linear-gradient(180deg,rgba(238,233,255,.56),rgba(246,244,255,.4)); overflow:hidden; }
.report-day-track i { width:100%; min-height:2px; display:block; border-radius:9px 9px 2px 2px; background:linear-gradient(180deg,#a878ff,#6841e7); }
.report-chart-legend { display:flex; justify-content:space-between; gap:12px; padding-top:12px; color:var(--muted); font-size:9px; }
.report-chart-legend span { display:flex; align-items:center; gap:5px; }
.legend-dot { width:7px; height:7px; display:inline-block; border-radius:50%; background:#7746ed; }
.report-ranking { display:grid; gap:13px; }
.report-ranking-item { display:grid; gap:6px; }
.report-ranking-head { display:flex; justify-content:space-between; gap:10px; color:var(--ink-soft); font-size:10px; }
.report-ranking-head strong { color:var(--ink); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-progress { height:7px; overflow:hidden; border-radius:99px; background:#eeeaff; }
.report-progress i { height:100%; display:block; min-width:3px; border-radius:inherit; background:linear-gradient(90deg,#8958f7,#b18aff); }
.report-empty-inline { padding:15px 0; color:var(--muted); font-size:11px; }
.report-other-data .report-card-heading { margin-bottom:7px; }
.report-stat-list { display:grid; }
.report-stat-list > div { display:flex; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); color:var(--ink-soft); font-size:10px; }
.report-stat-list > div:last-child { border-bottom:0; }
.report-stat-list strong { color:var(--ink); font-size:12px; }
.report-ai-card { padding:20px; margin-bottom:18px; border-color:#ded3ff; background:linear-gradient(135deg,rgba(252,250,255,.9),rgba(241,236,255,.82)); }
.report-ai-card .report-card-heading { align-items:center; margin-bottom:13px; }
.report-ai-heading { display:flex; align-items:center; gap:10px; }
.report-ai-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; color:var(--purple); border-radius:12px; background:#e9e0ff; }
.report-ai-icon svg { width:20px; height:20px; }
.report-ai-note { display:flex; align-items:flex-start; gap:7px; padding:10px 11px; margin-bottom:14px; color:var(--ink-soft); border:1px solid rgba(125,94,226,.13); border-radius:10px; background:rgba(255,255,255,.55); font-size:10px; line-height:1.4; }
.report-ai-note svg { width:15px; height:15px; flex:0 0 auto; color:var(--purple); }
.report-insight-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 18px; padding:0; margin:0; list-style:none; }
.report-insight-list li { display:flex; align-items:flex-start; gap:8px; color:var(--ink); font-size:11px; line-height:1.45; }
.report-insight-list svg { width:15px; height:15px; flex:0 0 auto; margin-top:1px; color:var(--purple); }
.report-ai-source { display:block; margin-top:15px; color:var(--muted); font-size:9px; }
html[data-theme="dark"] .report-kpi-card,
html[data-theme="dark"] .report-ai-card { border-color:rgba(196,192,255,.14); background:rgba(25,29,65,.82); }
html[data-theme="dark"] .reports-toolbar select { border-color:#4a4f7d; background:#202448; color:var(--ink); }
html[data-theme="dark"] .report-day-track { background:rgba(49,45,93,.8); }
html[data-theme="dark"] .report-progress { background:#302b5e; }
html[data-theme="dark"] .report-ai-note { border-color:rgba(196,192,255,.14); background:rgba(35,39,79,.72); }
@media (max-width: 920px) {
  .reports-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reports-main-grid, .reports-secondary-grid { grid-template-columns:1fr; }
}
@media (max-width: 650px) {
  .reports-heading { align-items:stretch; }
  .reports-toolbar { align-items:stretch; }
  .reports-toolbar label { flex:1; }
  .reports-toolbar select { width:100%; min-width:0; }
  .reports-toolbar .button { white-space:nowrap; }
  .reports-kpi-grid { grid-template-columns:1fr; }
  .report-insight-list { grid-template-columns:1fr; }
}

html[data-theme="dark"] {
  --notice-bg: linear-gradient(135deg,#262a52 0%,#1f3263 50%,#33285f 100%);
  --notice-border: rgba(176,183,240,.24);
  --ink: #eef0ff;
  --ink-soft: #b8bfdf;
  --muted: #8e97c0;
  --line: rgba(176, 183, 240, .18);
  --panel: rgba(25, 29, 65, .82);
  --panel-solid: #171b3d;
  --lavender: #292650;
  --lavender-strong: #393264;
  --shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 23% 18%, rgba(78, 61, 145, .22) 0, rgba(78, 61, 145, 0) 34%),
    radial-gradient(ellipse at 80% 0%, rgba(63, 52, 113, .24) 0, rgba(32, 35, 78, .14) 34%, transparent 62%),
    linear-gradient(115deg, rgba(13,16,40,.65) 0%, rgba(18,22,50,.62) 45%, rgba(16,17,41,.65) 100%),
    url('/waiting-room-background.jpg') center/cover fixed no-repeat;
}
html[data-theme="dark"] .sidebar { background: rgba(17, 20, 50, .88); border-color: rgba(196, 192, 255, .14); }
html[data-theme="dark"] .nav-item { color: #c2c8eb; }
html[data-theme="dark"] .nav-item svg { color: #9aa6df; }
html[data-theme="dark"] .nav-item:hover { background: rgba(89, 73, 160, .28); }
html[data-theme="dark"] .nav-item.active { color: #e7ddff; background: linear-gradient(100deg, rgba(104, 73, 207, .45), rgba(65, 75, 164, .42)); }
html[data-theme="dark"] .sidebar-quote { border-color: rgba(196, 192, 255, .14); background: linear-gradient(145deg, rgba(49, 46, 92, .8), rgba(31, 38, 82, .76)); }
html[data-theme="dark"] .sidebar-quote p { color: #dce0ff; }
html[data-theme="dark"] .profile-switcher:hover { background: rgba(89, 73, 160, .28); }
html[data-theme="dark"] .global-search { border-color: rgba(196, 192, 255, .16); background: rgba(28, 32, 70, .76); }
html[data-theme="dark"] kbd { border-color: rgba(196, 192, 255, .18); background: rgba(37, 40, 81, .82); color: #c5c9ef; }
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .card { border-color: rgba(196, 192, 255, .14); }
html[data-theme="dark"] .button { border-color: rgba(180, 171, 255, .22); background: rgba(40, 43, 83, .82); color: #d9d2ff; }
html[data-theme="dark"] .button.ghost { background: rgba(40, 43, 83, .56); }
html[data-theme="dark"] .metric-icon,
html[data-theme="dark"] .settings-icon { background: linear-gradient(145deg, #302d5c, #252b5c); }
html[data-theme="dark"] .progress { background: #2b2e5c; }
html[data-theme="dark"] .appointment-time { color: #c0c9ff; }
html[data-theme="dark"] .avatar.patient-avatar { background: linear-gradient(145deg, #38336d, #2a3567); color: #d8d6ff; }
html[data-theme="dark"] .status.white { color: #c3c9e8; background: #262b56; border-color: #454a7b; }
html[data-theme="dark"] .header-popover,
html[data-theme="dark"] .profile-modal { border-color: rgba(196, 192, 255, .18); background: linear-gradient(145deg, #202448, #171a38); }
html[data-theme="dark"] .profile-popover::before { border-color: rgba(196, 192, 255, .18); background: #202448; }
html[data-theme="dark"] .google-account-card,
html[data-theme="dark"] .header-popover footer,
html[data-theme="dark"] .profile-menu-note { background: rgba(35, 39, 79, .8); border-color: rgba(196, 192, 255, .14); }
html[data-theme="dark"] .setting-field input,
html[data-theme="dark"] .setting-field select,
html[data-theme="dark"] .day-setting,
html[data-theme="dark"] .day-setting input { border-color: #4a4f7d; background: #202448; color: var(--ink); }
html[data-theme="dark"] .day-setting:has(input:checked) { border-color: #8e70ff; background: #30295d; color: #e2d9ff; }
html[data-theme="dark"] .patient-menu,
html[data-theme="dark"] .patient-record-menu,
html[data-theme="dark"] .search-results { border-color: rgba(196, 192, 255, .18); background: #202448; }
html[data-theme="dark"] .search-result:hover,
html[data-theme="dark"] .profile-menu-item:hover,
html[data-theme="dark"] .popover-close:hover { background: #302b5e; }
html[data-theme="dark"] .record-section-card,
html[data-theme="dark"] .settings-preview { background: rgba(25, 29, 65, .82); }
html[data-theme="dark"] .settings-hint,
html[data-theme="dark"] .settings-card-heading p { color: #a7afd4; }
html[data-theme="dark"] .prescription-name-mode-card,
html[data-theme="dark"] .medication-preference-row { border-color:rgba(196,192,255,.18); background:rgba(35,39,79,.72); }
html[data-theme="dark"] .prescription-name-mode-toggle i { border-color:#5e5a8b; background:#3b3962; }
html[data-theme="dark"] .prescription-name-preview { border-color:#4a4f7d; background:#25294f; }
html[data-theme="dark"] .prescription-name-preview strong { color:#ddd4ff; }
html[data-theme="dark"] .medication-preference-row input,
html[data-theme="dark"] .medication-catalog-search input { border-color:#4a4f7d; background:#202448; color:var(--ink); }
html[data-theme="dark"] .medication-catalog-note,
html[data-theme="dark"] .medication-catalog-item { border-color:rgba(196,192,255,.16); background:rgba(35,39,79,.78); }
html[data-theme="dark"] .medication-catalog-option { border-color:#514b82; background:#292950; color:#e3dcff; }
html[data-theme="dark"] .medication-catalog-option.active-option { color:#c5c9ef; background:#303253; }
html[data-theme="dark"] .slot strong,
html[data-theme="dark"] .week-slot strong { color: #10152d; }
html[data-theme="dark"] .slot > span:first-child,
html[data-theme="dark"] .week-slot small,
html[data-theme="dark"] .slot small { color: #384365; }
html[data-theme="dark"] .week-slot.is-off { background:repeating-linear-gradient(135deg,#22243f,#22243f 6px,#282a4a 6px,#282a4a 12px); border-left-color:#454870; }
html[data-theme="dark"] .week-slot.is-off span { color:#8a90b8; }
html[data-theme="dark"] .week-head > div.is-off-day { background:#20223d; color:#8a90b8; }
html[data-theme="dark"] .week-head > div.is-off-day strong { color:#8a90b8; }
html[data-theme="dark"] .month-day { background: rgba(39, 43, 84, .88); }
html[data-theme="dark"] .month-day:hover { background: #343064; }
html[data-theme="dark"] .month-day.selected { background: #332b63; }

/* Entrada protegida e configuração inicial do profissional */
#app-gate-root { min-height:100vh; }
.app-shell[hidden] { display:none !important; }
.app-gated { min-height:100vh; }
.app-gate-screen { min-height:100vh; padding:clamp(22px,5vw,70px); display:grid; place-items:center; position:relative; overflow:hidden; background:#050318; }
.auth-gate-screen { display:block; min-height:100vh; padding:0; color:#fff; }
.simple-gate { position:relative; min-height:100vh; min-height:100dvh; background:#050506; display:flex; align-items:center; justify-content:center; }
.simple-gate::before { content:''; position:absolute; inset:0; pointer-events:none; background:radial-gradient(circle at 18% 14%,rgba(128,82,255,.16),transparent 30%),radial-gradient(circle at 82% 20%,rgba(84,167,255,.13),transparent 28%),radial-gradient(circle at 50% 92%,rgba(21,132,110,.10),transparent 34%); }
.simple-gate-content { position:relative; z-index:1; display:grid; justify-items:center; gap:6px; max-width:560px; padding:0 24px; text-align:center; }
.simple-gate-title { margin:0; font:700 clamp(56px,10.5vw,96px)/1 Manrope,sans-serif; letter-spacing:-.02em; background:linear-gradient(90deg,#8052ff,#9c76ff 25%,#54a7ff 64%,#15846e); -webkit-background-clip:text; background-clip:text; color:transparent; }
.simple-gate-subtitle { margin:16px 0 0; color:#fff; font-size:clamp(17px,2.6vw,22px); font-weight:500; }
.simple-gate-tagline { margin:18px 0 0; color:#8e8e96; font-size:14px; line-height:1.6; }
.simple-gate .google-connect-button { max-width:300px; margin-top:56px; }
.simple-gate .gate-feedback { max-width:320px; }
/* Mesma altura do botão de login + a nota abaixo dele: o título não pula quando o botão entra no lugar. */
.gate-boot-status { margin:56px 0 0; min-height:105px; color:#8e8e96; font-size:14px; line-height:56px; }
.gate-eyebrow { display:inline-block; color:#ffb829; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.google-connect-button { width:100%; min-height:56px; display:inline-flex; align-items:center; justify-content:center; gap:11px; margin:28px 0 13px; padding:0 20px; border:0; border-radius:999px; background:#fff; color:#1f1f1f; font-size:14px; font-weight:600; letter-spacing:-.01em; box-shadow:0 0 0 1px rgba(255,255,255,.14),0 18px 60px rgba(128,82,255,.20); transition:transform .3s ease,box-shadow .3s ease; }
.google-connect-button:hover { transform:translateY(-2px); box-shadow:0 0 0 1px rgba(255,255,255,.2),0 24px 70px rgba(128,82,255,.32); }
.google-connect-button > svg { width:16px; height:16px; margin-left:auto; color:#8e8e96; }
.google-mark { width:19px; height:19px; display:grid; place-items:center; }
.google-mark svg { width:100%; height:100%; display:block; }
.gate-feedback { min-height:30px; margin:0; color:#8e8e96; text-align:center; font-size:10px; line-height:1.45; }
.gate-feedback[data-tone="error"] { color:var(--red); }
.setup-gate-screen { background:radial-gradient(ellipse at 80% 5%,rgba(224,212,255,.7),transparent 42%),linear-gradient(120deg,#f0edff,#fbfaff 56%,#f0ebff); }
.setup-card { width:min(680px,100%); padding:clamp(24px,5vw,44px); border:1px solid rgba(255,255,255,.96); border-radius:26px; background:rgba(255,255,255,.84); box-shadow:0 22px 65px rgba(68,64,147,.14); backdrop-filter:blur(24px); }
.clinic-setup-card { width:min(600px,100%); }
.setup-heading { display:flex; align-items:flex-start; gap:13px; }
.setup-heading > div:nth-child(2) { flex:1; }
.setup-heading h1 { margin:8px 0 8px; color:var(--ink); font:800 clamp(25px,4vw,36px)/1.1 Manrope,sans-serif; letter-spacing:-1px; }
.setup-heading p { margin:0; color:var(--ink-soft); font-size:13px; line-height:1.5; }
.gate-progress { display:flex; align-items:center; gap:8px; margin:32px 0 25px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.gate-progress span { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; font-weight:700; white-space:nowrap; }
.gate-progress span + span::before { content:'›'; margin-right:5px; color:#c3b9e8; font-size:15px; }
.gate-progress b { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:#eeeaff; color:var(--muted); font-size:10px; }
.gate-progress .active { color:var(--purple-dark); }
.gate-progress .active b { color:#fff; background:var(--purple); }
.setup-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.setup-fields label { display:grid; gap:7px; color:var(--ink-soft); font-size:11px; font-weight:700; }
.setup-fields label.full { grid-column:1/-1; }
.setup-fields input { width:100%; height:44px; padding:0 12px; border:1px solid #ded8f3; border-radius:10px; outline:0; color:var(--ink); background:rgba(255,255,255,.9); font-size:13px; }
.setup-fields input:focus { border-color:#8b5cf6; box-shadow:0 0 0 3px rgba(139,92,246,.12); }
.setup-fields input[readonly] { color:var(--ink-soft); background:#f7f5ff; }
.setup-actions { display:flex; justify-content:space-between; gap:10px; margin-top:28px; padding-top:20px; border-top:1px solid var(--line); }
.setup-actions .button.primary { min-width:220px; }

@media (max-width: 820px) {
  /* Só `padding:0`: o `display:block` que ficava aqui anulava o flex de .simple-gate abaixo de 820px (celular e
     janelas estreitas), colando o bloco de login no topo com o título cortado; acima disso continuava centrado. */
  .auth-gate-screen { padding:0; }
  .simple-gate-content { padding:32px 24px; }
}
@media (max-width: 560px) {
  .app-gate-screen { padding:14px; }
  .auth-gate-screen { padding:0; }
  .setup-card { padding:22px 18px; border-radius:20px; }
  .setup-fields { grid-template-columns:1fr; }
  .setup-fields label.full { grid-column:auto; }
  .gate-progress { gap:4px; justify-content:space-between; }
  .gate-progress span { font-size:9px; }
  .gate-progress span + span::before { margin-right:1px; }
  .setup-actions { display:grid; grid-template-columns:1fr; }
  .setup-actions .button.primary { width:100%; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  /* Modo claro branco de verdade (pedido do usuário, 17/10/2026): a foto de fundo, de tom quente, deixava a tela rosada através
     dos boxes translúcidos. Um véu branco neutro (sem lavanda) quase cobre a foto; o roxo fica só nos destaques. */
  background:
    linear-gradient(rgba(250,250,252,.95), rgba(250,250,252,.95)),
    url('/waiting-room-background.jpg') center/cover fixed no-repeat;
  background-color: #fafafc;
}
button, input, textarea { font: inherit; }
button { color: inherit; border: 0; cursor: pointer; }
svg { width: 19px; height: 19px; display: block; flex: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); position: relative; overflow: hidden; }
.sidebar {
  margin: 14px 0 14px 14px; min-height: calc(100vh - 28px); padding: 25px 13px 14px;
  background: rgba(255,255,255,.94); border: 1px solid #ececf2; border-radius: 28px;
  box-shadow: var(--shadow); backdrop-filter: blur(22px); display: flex; flex-direction: column; z-index: 3;
  transition: opacity .22s ease, transform .22s ease;
}
.results-open .sidebar { opacity:0; transform:translateX(-30px); pointer-events:none; visibility:hidden; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 0 13px 31px; }
.brand strong, .brand small, .profile-switcher strong, .profile-switcher small { display: block; }
.brand strong { font: 700 18px Manrope, sans-serif; letter-spacing: -.5px; }
.brand small { color: var(--ink-soft); font-size: 12px; margin-top: 3px; }
.brand-logo { width: 50px; height: 50px; display: block; object-fit: contain; border-radius: 13px; box-shadow: 0 5px 14px rgba(77,34,117,.22); flex: 0 0 auto; filter: drop-shadow(0 4px 8px rgba(77,34,117,.18)); }
.brand-logo.profile-photo { width:68px; height:68px; border-radius:50%; object-fit:cover; filter:none; }
.patient-consent-brand .consent-logo { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 18px rgba(82,65,145,.22); filter: drop-shadow(0 5px 10px rgba(82,65,145,.18)); }
.doctor-meta span { display:block; }
.doctor-meta span + span { margin-top:2px; color:var(--muted); font-size:10px; }
.brand-mark { width: 31px; height: 34px; position: relative; transform: rotate(-10deg); }
.brand-mark span { position: absolute; display:block; border-radius: 100% 0 100% 0; transform: rotate(-18deg); }
.brand-mark span:nth-child(1){width:18px;height:30px;left:12px;top:0;background:linear-gradient(140deg,#b496ff,#6440e6);}
.brand-mark span:nth-child(2){width:15px;height:25px;left:3px;top:9px;background:linear-gradient(140deg,#d8cfff,#8772ff);}
.brand-mark span:nth-child(3){width:14px;height:18px;left:0;top:19px;background:linear-gradient(140deg,#f1eaff,#8e89e9);}
.nav-list { display: grid; gap: 5px; }
.nav-item { min-height: 47px; border-radius: 13px; padding: 0 15px; display: flex; gap: 17px; align-items: center; background: transparent; color: #36408a; font-size: 14px; text-align: left; transition: .2s ease; }
.nav-item svg { color: #4e5ab6; stroke-width: 2; }
.nav-item:hover { background: rgba(241,238,255,.9); color: var(--purple-dark); }
.nav-item.active { color: var(--purple-dark); background: linear-gradient(100deg,#f2edff,#e8e0ff); box-shadow: inset 0 0 0 1px rgba(126, 93, 255, .04); }
.nav-item.active svg { color: var(--purple); }
.sidebar-quote { margin: auto 0 22px; min-height: 165px; border: 1px solid rgba(255,255,255,.92); border-radius: 17px; overflow: hidden; padding: 58px 17px 18px; position: relative; background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(235,231,255,.65)); }
.quote-shape { position: absolute; width: 165px; height: 76px; right: -37px; top: 18px; border-radius: 100% 0 100% 0; transform: rotate(-20deg); background: linear-gradient(135deg, #d5c6ff, #eff4ff); opacity:.84; }
.sidebar-quote p { margin: 0; position: relative; font-size: 14px; line-height: 1.52; color: #202879; }
.profile-switcher { border-radius: 13px; padding: 10px; display: grid; grid-template-columns: 46px 1fr 17px; align-items: center; gap: 8px; background: transparent; text-align: left; }
.profile-switcher:hover { background: rgba(241,238,255,.8); }
.profile-switcher strong { font-size: 12px; }
.profile-switcher small { color: var(--ink-soft); font-size: 11px; margin-top: 2px; }
.profile-switcher svg { color: var(--purple); }
.avatar, .top-avatar { border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.doctor-avatar { width: 46px; height: 46px; color: #fff; font-size: 14px; background: linear-gradient(145deg,#5c6da7,#283163); box-shadow: inset 0 0 0 3px #fff; overflow:hidden; }
.doctor-avatar.photo { background:#fff; }
.doctor-avatar img, .top-avatar img { width:100%; height:100%; display:block; object-fit:cover; }

.main-area { min-width: 0; position: relative; z-index: 1; }
.topbar { height: 80px; padding: 20px 28px 0; max-width: 1250px; margin: 0 auto; display: grid; grid-template-columns: max-content minmax(290px,405px) 1fr minmax(140px,max-content); align-items: start; gap: 18px; }
.breadcrumb { color: var(--ink-soft); font-size: 12px; display: flex; align-items: center; gap: 8px; padding-top: 12px; opacity: .9; }
.breadcrumb svg { width: 16px; height: 16px; color: var(--purple); }
.global-search { height: 43px; border: 1px solid rgba(255,255,255,.95); border-radius: 10px; background: rgba(255,255,255,.67); display:flex; align-items:center; gap: 10px; padding: 0 11px; box-shadow: 0 6px 18px rgba(93, 84, 177, .06); position: relative; }
.global-search > svg { color: #5263c0; width: 18px; }
.global-search input { min-width: 0; flex:1; border:0; outline:0; background: transparent; color: var(--ink); font-size: 12px; }
.global-search input::placeholder { color: #7079b6; }
kbd { border: 1px solid rgba(108,102,193,.15); background: rgba(255,255,255,.72); border-radius: 5px; padding: 3px 7px; color: #4a54a5; font-size: 11px; white-space: nowrap; }
.global-clock { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding-top: 10px; text-align: right; }
.global-clock span { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.global-clock strong { color: var(--ink); font-size: 16px; font-weight: 800; }
/* grid-column:-2/-1 (a última faixa declarada, sempre) em vez de contar na posição natural: o .mobile-menu
   (1ª coluna) fica display:none no desktop, então some do fluxo do grid e os 3 itens visíveis ocupavam as
   colunas 1-3 em vez de 2-4 — sobrava a faixa da direita (140px) vazia e o avatar/sino ficavam presos mais
   à esquerda do que a borda real do conteúdo. -2/-1 vale tanto para o grid de 4 colunas do desktop quanto
   para os de 3 do mobile, sem depender de quantos itens anteriores estão visíveis. */
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; grid-column: -2 / -1; }
.icon-button { background: transparent; color: #5261b7; position: relative; padding: 10px 3px; }
.icon-button i { position:absolute; right: 0; top: 7px; width: 6px; height: 6px; background: #ec3a75; border: 2px solid #f6f2ff; border-radius: 50%; }
.top-avatar { width: 48px; height: 48px; background: #e6e0ff; color: #19206a; font-size: 16px; border:0; overflow:hidden; padding:0; }
.top-avatar.photo { background:#fff; }
/* Seletor de clínicas (parte 5): o botão do perfil mostra onde o médico está — roxo no consultório, azul na clínica. */
#top-profile { flex:0 0 auto; width:auto; max-width:260px; height:48px; display:flex; align-items:center; gap:8px; padding:0 6px 0 14px; border-radius:999px; border:1px solid #d6d0fa; background:#eee9ff; }
#top-profile .top-place { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 12px Manrope; color:var(--ink); }
#top-profile .top-initials { flex:0 0 36px; width:36px; height:36px; display:grid; place-items:center; border-radius:50%; border:2px solid var(--purple); background:#e5dcff; color:var(--purple-dark); font:800 13px Manrope; }
#top-profile.in-clinic { border-color:var(--blue); background:#e2edff; }
#top-profile.in-clinic .top-initials { border-color:var(--blue); }
.place-selector { display:flex; flex-direction:column; gap:4px; padding:12px 12px 10px; border-bottom:1px solid var(--line); }
.place-title { padding:0 6px; color:var(--ink-soft); font:800 10px Manrope; letter-spacing:.06em; text-transform:uppercase; }
.place-group { padding:6px 6px 2px; color:var(--ink-soft); font-size:10px; }
.place-empty { padding:4px 6px; color:var(--muted); font-size:11px; }
.place-option { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:8px 10px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--ink); text-align:left; font:500 12px Manrope; cursor:pointer; }
.place-option > span { display:grid; flex:1; gap:1px; min-width:0; }
.place-option > span > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.place-option small { color:var(--ink-soft); font-size:10px; }
.place-option:hover { background:#f6f3ff; }
.place-option.is-active { border-color:var(--purple); background:var(--lavender); }
.place-option[data-place-team].is-active { border-color:var(--blue); background:#e2edff; }
.place-option:disabled { opacity:.6; cursor:progress; }
.place-check { display:grid; place-items:center; color:var(--purple-dark); font-style:normal; }
.place-new { display:flex; align-items:center; gap:8px; min-height:40px; margin-top:4px; padding:8px 10px; border:1px dashed #d6d0fa; border-radius:10px; background:transparent; color:var(--purple); font:600 12px Manrope; cursor:pointer; }
.place-new:disabled { opacity:.55; cursor:not-allowed; }
html[data-theme="dark"] #top-profile { background:#2a2f63; border-color:rgba(196,192,255,.24); }
html[data-theme="dark"] #top-profile.in-clinic { background:#1f3a66; border-color:#5b9bf0; }
html[data-theme="dark"] .place-option:hover { background:rgba(196,192,255,.08); }
html[data-theme="dark"] .place-option.is-active { background:rgba(116,60,255,.22); }
html[data-theme="dark"] .place-option[data-place-team].is-active { background:rgba(44,132,238,.22); }
.mobile-menu { display: none; background: transparent; color: var(--purple); }
#header-popover-root { position:absolute; top:68px; right:24px; z-index:20; }
.header-popover { width:min(360px,calc(100vw - 34px)); border:1px solid #e0d9f8; border-radius:16px; background:rgba(255,255,255,.97); box-shadow:0 20px 50px rgba(45,31,120,.18); backdrop-filter:blur(18px); overflow:hidden; }
.header-popover header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 17px; border-bottom:1px solid var(--line); }
.header-popover header > div { display:grid; gap:4px; }
.header-popover header strong { color:var(--ink); font:800 14px Manrope; }
.header-popover header small { color:var(--ink-soft); font-size:10px; }
.popover-close { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; color:var(--ink-soft); background:#f6f3ff; font-size:18px; }
.popover-close:hover { color:var(--purple); background:#eee8ff; }
.notification-popover { width:min(390px,calc(100vw - 34px)); }
.notification-patricia-section { padding:15px 16px 16px; }
.notification-patricia-section .pat-sub { margin:0 0 9px; display:flex; align-items:center; gap:7px; }
.notification-patricia-list { max-height:280px; overflow:auto; padding-right:2px; }
.notification-patricia-list .pat-booking { align-items:flex-start; }
.pat-new-count { display:inline-flex; align-items:center; padding:2px 8px; border-radius:99px; font:700 10px Manrope,'DM Sans',system-ui,sans-serif; background:#ece6ff; color:#5a2fd0; }
.pat-history-link { display:block; text-align:center; color:var(--purple); font:700 11px Manrope,'DM Sans',system-ui,sans-serif; text-decoration:none; }
.pat-history-link:hover { text-decoration:underline; }
.notification-patricia-list .pat-alert-icon { flex:none; width:26px; height:26px; display:grid; place-items:center; border-radius:50%; background:#f2edff; color:var(--purple); }
.notification-patricia-list .pat-alert-icon svg { width:14px; height:14px; }
.header-popover footer { padding:11px 16px; color:var(--muted); background:#f8f6ff; font-size:10px; }
.profile-popover { width:min(340px,calc(100vw - 34px)); position:relative; }
.profile-popover::before { content:""; position:absolute; top:-7px; right:18px; width:13px; height:13px; border-top:1px solid #e0d9f8; border-left:1px solid #e0d9f8; background:rgba(255,255,255,.97); transform:rotate(45deg); }
.profile-popover-heading { align-items:center !important; }
.profile-popover-heading > div:first-child { flex:1; }
.profile-popover-heading .avatar { width:42px; height:42px; background:#e6e0ff; color:var(--purple-dark); font-size:13px; }
.profile-popover-heading .avatar.photo { background:#fff; }
.profile-popover-heading > div:nth-child(2) { flex:1; }
.profile-header-clinic { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.profile-photo-control { display:grid; justify-items:center; gap:9px; padding:18px 16px 17px; text-align:center; border-bottom:1px solid var(--line); }
.profile-photo-picker { display:inline-flex; border-radius:50%; cursor:pointer; outline:0; }
.profile-photo-picker:focus-visible { box-shadow:0 0 0 4px rgba(139,92,246,.2); }
.profile-photo-preview { width:88px; height:88px; display:grid; place-items:center; position:relative; overflow:hidden; border:3px solid #eee8ff; border-radius:50%; color:#fff; font-size:22px; font-weight:700; background:linear-gradient(145deg,#5c6da7,#283163); box-shadow:0 8px 18px rgba(71,49,159,.16); }
.profile-photo-preview.has-photo { background:#fff; }
.profile-photo-preview img { width:100%; height:100%; display:block; object-fit:cover; }
.profile-photo-upload-overlay { position:absolute; inset:0; display:grid; place-items:center; color:#fff; background:rgba(74,48,175,.72); opacity:0; transition:opacity .18s ease; pointer-events:none; }
.profile-photo-upload-overlay svg { width:23px; height:23px; stroke-width:2.2; }
.profile-photo-picker:hover .profile-photo-upload-overlay, .profile-photo-picker:focus-within .profile-photo-upload-overlay { opacity:1; }
.profile-photo-input { position:absolute; inset:0; width:100%; height:100%; cursor:pointer; opacity:0; }
.profile-photo-copy { display:grid; min-width:0; gap:2px; text-align:center; }
.profile-photo-copy strong { color:var(--ink); font:800 13px Manrope; }
.profile-photo-copy small { max-width:245px; color:var(--ink-soft); font-size:10px; line-height:1.35; }
.profile-photo-copy .profile-photo-clinic { color:var(--muted); }
.profile-menu-item { width:100%; display:flex; align-items:center; gap:9px; padding:12px 16px; color:var(--ink-soft); background:transparent; text-align:left; font-size:11px; }
.profile-menu-item:hover { color:var(--purple-dark); background:#f7f3ff; }
.profile-menu-item svg { width:16px; height:16px; color:var(--purple); }
.google-auth-button { width:calc(100% - 26px); margin:13px; display:flex; align-items:center; gap:10px; padding:11px 12px; border:1px solid #ddd4ff; border-radius:12px; color:var(--purple-dark); background:linear-gradient(135deg,#fbf9ff,#f2edff); text-align:left; }
.google-auth-button:hover { border-color:#a879ff; background:#f5efff; }
.google-auth-button > svg { flex:0 0 auto; width:18px; height:18px; color:var(--purple); }
.google-auth-button > span { display:grid; flex:1; gap:2px; }
.google-auth-button strong { font-size:11px; font-weight:800; }
.google-auth-button small { color:var(--ink-soft); font-size:9px; line-height:1.35; }
.google-auth-button > svg:last-child { width:14px; height:14px; color:var(--ink-soft); }
.google-account-card { display:flex; align-items:center; gap:9px; margin:13px; padding:9px 10px; border:1px solid #ded8f3; border-radius:12px; background:#faf9ff; }
.google-account-avatar { width:30px; height:30px; display:grid; place-items:center; overflow:hidden; border-radius:50%; color:var(--purple); background:#ebe5ff; }
.google-account-avatar img { width:100%; height:100%; object-fit:cover; }
.google-account-avatar svg { width:15px; height:15px; }
.google-account-card > div:nth-child(2) { display:grid; flex:1; min-width:0; gap:2px; }
.google-account-card strong { font-size:10px; color:var(--ink); }
.google-account-card small { overflow:hidden; color:var(--ink-soft); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.profile-google-logout { padding:5px 6px; border:0; border-radius:7px; color:var(--purple); background:transparent; font-size:9px; }
.profile-google-logout:hover { background:#eee8ff; }
.profile-menu-note { padding:11px 16px; color:var(--muted); background:#f8f6ff; font-size:10px; }
.profile-modal-backdrop { position:fixed; inset:0; z-index:40; display:grid; place-items:center; padding:24px; background:rgba(47,39,105,.26); backdrop-filter:blur(5px); }
body.medication-catalog-open { overflow:hidden; }
.profile-modal { width:min(600px,100%); max-height:calc(100vh - 48px); overflow:auto; padding:22px; border:1px solid rgba(255,255,255,.95); border-radius:20px; background:linear-gradient(145deg,#fff,#f8f6ff); box-shadow:0 24px 70px rgba(39,27,113,.25); }
.profile-modal.compact { width:min(420px,100%); }
.profile-modal-header { display:flex; align-items:flex-start; gap:12px; }
.profile-modal-header > div:nth-child(2) { flex:1; }
.profile-modal-header h2 { margin:0 0 5px; color:var(--ink); font:800 19px Manrope; }
.profile-modal-header p { margin:0; color:var(--ink-soft); font-size:11px; line-height:1.4; }
.profile-modal-header .dialog-close { margin-left:auto; }
.content { padding: 5px 28px 30px; max-width: 1250px; margin: 0 auto; }
.page-heading { display:flex; justify-content: space-between; align-items:flex-end; gap: 20px; margin: 0 2px 21px; }
.page-heading h1 { margin:0; font: 800 30px/1.15 Manrope, sans-serif; letter-spacing: -1.3px; }
.page-heading p { margin: 7px 0 0; color: var(--ink-soft); font-size: 15px; }
.date-note { color: var(--ink-soft); font-size:12px; font-weight:600; text-align:right; }
.date-note strong { display:block; font-size: 20px; color: var(--ink); margin-top: 3px; }
.page-actions { display:flex; gap: 10px; align-items:center; }
.button { min-height: 40px; border: 1px solid rgba(105,90,216,.14); padding: 0 17px; border-radius: 10px; background: rgba(255,255,255,.66); color: var(--purple-dark); display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:13px; font-weight:600; transition:.2s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(85,55,200,.12); }
.button.primary { color:#fff; border:0; background: linear-gradient(100deg,#be4df3,#4b78ed); box-shadow: 0 8px 22px rgba(117,64,235,.23); }
.button.primary:hover { filter: brightness(1.03); }
.button.ghost { background: rgba(255,255,255,.46); }
.button.danger { color: var(--red); }
.button.small { min-height: 33px; padding: 0 12px; font-size: 12px; }

.metric-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.metric-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-card, .card { background: var(--panel); border: 1px solid #ececf2; border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.metric-card { min-height: 101px; display:grid; grid-template-columns: 56px 1fr; align-items:center; padding: 15px; gap: 12px; }
.metric-icon { width: 52px; height: 52px; border-radius: 50%; display:grid; place-items:center; background: linear-gradient(145deg,#faf8ff,#ece6ff); color: var(--purple); }
.metric-icon svg { width:25px; height:25px; }
.metric-card strong { font: 800 22px Manrope, sans-serif; display:block; letter-spacing:-.5px; }
.metric-card span { display:block; color: var(--ink-soft); font-size: 12px; margin-top: 4px; line-height:1.35; }
.progress { height: 5px; background: #e8e3fb; border-radius:99px; margin-top:8px; display:flex; align-items:center; gap: 7px; }
.progress i { display:block; height:100%; width:100%; background:linear-gradient(90deg,#633cff,#a55eff); border-radius:99px; }
.progress em { color: var(--ink-soft); font-size:10px; font-style:normal; margin-top:-1px; }
.dashboard-grid, .waiting-layout { display:grid; grid-template-columns: minmax(0, 1.55fr) minmax(265px, .65fr); gap: 14px; }
/* Sala de espera: os 3 blocos de métrica + o card "Sala de espera" ficam empilhados na coluna da esquerda
   (mesma largura do card "Sala de espera"); "Próximo paciente" é o item da direita, que por padrão do grid
   (align-items:stretch) já cresce para acompanhar a altura dessa coluna inteira, sem precisar de altura fixa. */
.waiting-main { display:grid; gap:14px; }
.waiting-main .metric-grid { margin-bottom:0; }
.card { padding: 17px 18px; }
.card-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.card-heading h2 { margin:0; font:700 16px Manrope, sans-serif; letter-spacing:-.4px; }
.card-heading a, .link-button { color: var(--purple-dark); background:transparent; font-size:12px; }
.settings-back-link { display:inline-block; margin-bottom:8px; padding:0; font-weight:700; }
.appointment-list { border-top: 1px solid var(--line); }
.appointment-row { min-height: 62px; display:grid; grid-template-columns: 55px minmax(130px,1fr) 125px 97px 24px; gap: 10px; align-items:center; border-bottom:1px solid var(--line); font-size:12px; }
.appointment-row.waiting-room-row, .appointment-row.dashboard-row:has(.waiting-start) { grid-template-columns:55px minmax(130px,1fr) 125px 165px 24px; }
.arrival-time { color:var(--purple) !important; font-weight:700; }
.appointment-row:last-child { border-bottom:0; }
.appointment-time { color: #23317f; font-weight:600; }
.patient-cell { display:flex; gap:10px; align-items:center; min-width:0; }
.patient-cell > div:last-child { min-width:0; }
.avatar.patient-avatar { width:34px; height:34px; background: linear-gradient(145deg,#efeaff,#dcd3ff); color:#4f40bf; font-size:11px; }
.patient-avatar.photo { background: linear-gradient(145deg,#efeaff,#dcd3ff); color:#4f40bf; }
.patient-cell strong { display:block; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.patient-cell small { color:var(--ink-soft); display:block; margin-top:3px; }
.status { display:inline-flex; align-items:center; gap:7px; border-radius:99px; padding:6px 9px; white-space:nowrap; font-size:11px; color:#16876f; background:#def6ee; }
.status::before { content:''; width:7px; height:7px; border-radius:50%; background:currentColor; }
.status.blue { color:#216ed5; background:#e0edff; }
.status.purple { color:#7132e7; background:#eee5ff; }
.status.amber { color:#c77d00; background:#fff0d5; }
.status.red { color:#db3050; background:#ffe1e9; }
.status.gray { color:#6c7090; background:#edeef6; }
.status.white { color:#6c7090; background:#fff; border:1px solid #dfe0ec; }
.row-more { background:transparent; color:#4554ad; font-size:17px; letter-spacing:2px; }
.next-card { min-height: 430px; }
.next-patient { display:flex; align-items:center; gap:10px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.next-patient .patient-avatar { width: 48px; height:48px; }
.next-patient strong { font-size:14px; display:block; }
.next-patient small { color:var(--ink-soft); display:block; margin-top:4px; }
.next-time { margin-left:auto; color: var(--ink-soft); font-size:11px; text-align:right; }
.next-time strong { display:block; color:var(--ink); font-size:15px; margin-top:4px; }
.quick-info { padding:15px 0; border-bottom: 1px solid var(--line); }
.quick-info h3, .mini-heading { font:700 13px Manrope, sans-serif; margin:0 0 10px; }
.quick-info h3 small { float:right; color:var(--purple); font:700 10px Manrope, sans-serif; }
.quick-info p { margin:8px 0; color:var(--ink-soft); font-size:12px; display:flex; align-items:center; gap:8px; }
.quick-info p svg { width:15px; height:15px; color:var(--purple); }
.preconsultation-briefing { margin:14px 0 0; padding:13px 0 14px; border-bottom:1px solid var(--line); }
.preconsultation-briefing.empty { padding-bottom:14px; }
.preconsultation-heading { display:flex; align-items:center; gap:9px; min-width:0; }
.preconsultation-heading > div { min-width:0; flex:1; }
.briefing-icon { width:29px; height:29px; display:grid; place-items:center; flex:0 0 auto; border-radius:10px; color:var(--purple); background:#eee8ff; }
.briefing-icon svg { width:16px; height:16px; }
.preconsultation-heading h3 { margin:0; color:var(--ink); font:700 12px Manrope, sans-serif; }
.preconsultation-heading small { display:block; margin-top:3px; color:var(--purple); font:700 9px Manrope, sans-serif; }
.briefing-date { flex:0 0 auto; color:var(--muted); font-size:9px; white-space:nowrap; }
.preconsultation-summary { margin:10px 0 9px; color:var(--ink); font-size:11px; line-height:1.45; }
.preconsultation-facts { display:grid; gap:6px; }
.preconsultation-facts span { display:grid; gap:2px; color:var(--ink-soft); font-size:10px; line-height:1.3; }
.preconsultation-facts strong { color:var(--ink); font:700 10px Manrope, sans-serif; }
.preconsultation-focus { margin-top:10px; padding:9px 10px; border:1px solid #e3dcff; border-radius:10px; background:rgba(244,240,255,.62); }
.preconsultation-focus > span { display:flex; align-items:center; gap:5px; color:var(--purple-dark); font:700 10px Manrope, sans-serif; }
.preconsultation-focus > span svg { width:13px; height:13px; }
.preconsultation-focus ul { margin:6px 0 0 16px; padding:0; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.preconsultation-focus li + li { margin-top:3px; }
.preconsultation-update { margin-top:10px; padding:9px 10px; border:1px solid var(--notice-border); border-radius:10px; background:var(--notice-bg); }
.preconsultation-update > span { display:flex; align-items:center; gap:5px; color:var(--purple-dark); font:700 10px Manrope, sans-serif; }
.preconsultation-update-date { margin:2px 0 0 18px; color:var(--ink); font:700 11px Manrope, sans-serif; }
.preconsultation-update > span svg { width:13px; height:13px; }
.preconsultation-update ul { display:grid; gap:6px; margin:7px 0 0; padding:0; list-style:none; }
.preconsultation-update li { display:grid; gap:1px; color:var(--ink); font-size:10.5px; line-height:1.4; }
.preconsultation-update li strong { color:var(--ink-soft); font:700 9.5px Manrope, sans-serif; text-transform:uppercase; letter-spacing:.2px; }
.preconsultation-empty-copy { margin:10px 0 0; color:var(--ink-soft); font-size:11px; line-height:1.45; }
.next-card .button { width:100%; margin-top:11px; }
.next-patient-hint { display:flex; align-items:center; gap:6px; margin-top:11px; padding:10px 11px; border:1px dashed var(--line); border-radius:10px; color:var(--muted); font-size:10.5px; line-height:1.4; }
.next-patient-hint svg { width:14px; height:14px; flex:none; }
.lower-grid { display:grid; grid-template-columns: 1fr 1fr; gap:14px; margin-top:14px; }
.dashboard-followup-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.dashboard-followup-card { min-width:0; }
.dashboard-followup-card .card-heading { align-items:flex-start; margin-bottom:13px; }
.dashboard-followup-card .card-heading > div { min-width:0; }
.dashboard-followup-card .card-heading p { margin:5px 0 0; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.dashboard-card-count { min-width:27px; height:27px; display:grid; place-items:center; flex:0 0 auto; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:rgba(255,255,255,.38); font:800 12px Manrope; }
.dashboard-card-count.has-items { color:var(--purple-dark); border-color:#d9cffb; background:#f0ebff; }
.dashboard-followup-list { display:grid; gap:8px; }
.dashboard-followup-item { min-width:0; display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px 10px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.34); }
.dashboard-followup-icon { width:31px; height:31px; display:grid; place-items:center; border-radius:10px; color:var(--purple); background:#eee8ff; }
.dashboard-followup-icon svg { width:16px; height:16px; }
.dashboard-followup-icon.danger { color:#cb3d58; background:#ffe9ef; }
.dashboard-followup-icon.attention { color:#c27b08; background:#fff2d9; }
.dashboard-followup-item > div { min-width:0; display:grid; gap:3px; }
.dashboard-followup-item strong { overflow:hidden; color:var(--ink); font:700 11px Manrope; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-followup-item small { overflow:hidden; color:var(--ink-soft); font-size:10px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-followup-tag { max-width:150px; overflow:hidden; padding:5px 7px; border-radius:99px; color:var(--purple-dark); background:#f0ebff; font-size:9px; font-weight:700; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-followup-tag.pending { color:#7652d4; background:#f1ebff; }
.dashboard-followup-tag.danger { color:#bd3c56; background:#ffe8ee; }
.dashboard-followup-tag.attention { color:#a86b08; background:#fff1d6; }
.dashboard-followup-empty { display:flex; align-items:flex-start; gap:9px; min-height:76px; padding:13px; border:1px dashed #cfc8ee; border-radius:11px; color:var(--muted); background:rgba(250,248,255,.44); }
.dashboard-followup-empty > svg { width:17px; height:17px; flex:none; margin-top:1px; color:var(--teal); }
.dashboard-followup-empty div { display:grid; gap:4px; }
.dashboard-followup-empty strong { color:var(--ink); font:700 11px Manrope; }
.dashboard-followup-empty span { font-size:10px; line-height:1.4; }
html[data-theme="dark"] .dashboard-card-count { background:rgba(40,43,83,.72); }
html[data-theme="dark"] .dashboard-card-count.has-items { color:#ded7ff; border-color:#514a82; background:#332b63; }
html[data-theme="dark"] .dashboard-followup-item { border-color:rgba(196,192,255,.16); background:rgba(35,39,79,.58); }
html[data-theme="dark"] .dashboard-followup-empty { border-color:#514a82; background:rgba(35,39,79,.46); }
html[data-theme="dark"] .dashboard-followup-tag.pending { color:#ddd4ff; background:#332b63; }
html[data-theme="dark"] .dashboard-followup-tag.danger { color:#ffc3d0; background:#532c4a; }
html[data-theme="dark"] .dashboard-followup-tag.attention { color:#ffda91; background:#4d3b26; }
html[data-theme="dark"] .dashboard-followup-icon.danger { color:#ff9aae; background:#532c4a; }
html[data-theme="dark"] .dashboard-followup-icon.attention { color:#ffd27f; background:#4d3b26; }
.donut-wrap { display:flex; align-items:center; gap:17px; }
.donut { width:110px; height:110px; flex:none; border-radius:50%; background: conic-gradient(#7754f5 0 32%,#8e9dfa 32% 60%,#b4b8ff 60% 78%,#e6e8ff 78% 100%); position:relative; display:grid; place-items:center; }
.donut::after { content:''; width:74px; height:74px; border-radius:50%; background:#f9f8ff; position:absolute; }
.donut-label { position:relative; z-index:1; text-align:center; }
.donut-label strong { font:700 18px Manrope; display:block; }
.donut-label small { color:var(--ink-soft); font-size:10px; }
.legend-list { display:grid; gap:8px; width:100%; }
.legend-list div { display:grid; grid-template-columns: 10px 1fr auto; gap:8px; align-items:center; color:var(--ink-soft); font-size:11px; }
.legend-list i { width:9px; height:9px; border-radius:50%; background:#7f56f5; }
.legend-list b { color:var(--ink); font-weight:500; }
.bar-chart { height:142px; display:flex; align-items:flex-end; justify-content:space-around; padding: 18px 2px 0; border-bottom:1px solid var(--line); }
.bar-chart .chart-bar { height:100%; min-width:30px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:7px; color:var(--ink-soft); font-size:10px; position:relative; outline:0; }
.bar-chart .chart-bar i { width:24px; height:var(--h); border-radius:6px 6px 0 0; background:linear-gradient(#dbd6fb,#cbc9f9); transition:filter .2s ease, transform .2s ease; }
.bar-chart .chart-bar i.highlight { background:linear-gradient(#b760f1,#8150ee); }
.bar-chart .chart-bar:hover i, .bar-chart .chart-bar:focus i { filter:brightness(1.04); transform:translateY(-2px); }
.chart-tooltip { position:absolute; bottom:calc(var(--h) + 25px); left:50%; transform:translateX(-50%) translateY(4px); opacity:0; pointer-events:none; white-space:nowrap; color:#fff; background:#1a216d; border-radius:7px; padding:7px 9px; font-size:10px; font-weight:600; box-shadow:0 8px 18px rgba(31,32,113,.2); transition:.18s ease; z-index:2; }
.chart-tooltip::after { content:''; position:absolute; left:50%; bottom:-4px; width:8px; height:8px; background:#1a216d; transform:translateX(-50%) rotate(45deg); }
.bar-chart .chart-bar:hover .chart-tooltip, .bar-chart .chart-bar:focus .chart-tooltip { opacity:1; transform:translateX(-50%) translateY(0); }
.task-list { display:grid; gap:10px; }
.task-row { display:flex; align-items:center; gap:7px; min-width:0; }
.task { display:flex; gap:8px; align-items:center; color:var(--ink-soft); font-size:12px; cursor:pointer; }
.task span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.task span.done { color:#969ac4; text-decoration:line-through; }
.task input { appearance:none; width:18px; height:18px; border:1px solid #9a9de0; border-radius:4px; background:#fff; position:relative; flex:none; }
.task input:checked { border-color:#7450e9; background:#7450e9; }
.task input:checked::after { content:'✓'; color:#fff; position:absolute; left:3px; top:-1px; font-size:14px; }
.task-row .task { min-width:0; flex:1; }
.reminder-actions { display:flex; gap:2px; opacity:0; transition:.18s ease; }
.task-row:hover .reminder-actions, .task-row.editing .reminder-actions { opacity:1; }
.reminder-action { width:26px; height:26px; display:grid; place-items:center; border-radius:6px; color:#7378b4; background:transparent; }
.reminder-action:hover { color:var(--purple-dark); background:#eee9ff; }
.reminder-action.delete:hover { color:var(--red); background:#ffe8ef; }
.reminder-action.save { color:var(--teal); }
.reminder-action svg { width:14px; height:14px; }
.reminder-edit-input { min-width:0; flex:1; height:31px; border:1px solid #cfc9f1; border-radius:7px; padding:0 9px; outline:0; background:#fff; color:var(--ink); font-size:12px; }
.reminder-edit-input:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.add-reminder { margin-top:12px; border:1px dashed #bcb6e9; border-radius:8px; padding:8px 10px; background:transparent; color:var(--purple-dark); display:inline-flex; align-items:center; gap:6px; font-size:11px; }
.add-reminder:hover { background:#f3efff; }
.add-reminder svg { width:14px; height:14px; }

.agenda-toolbar { display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.date-control { height:43px; display:flex; align-items:center; gap:12px; padding:0 12px; border-radius:10px; background:rgba(255,255,255,.66); border:1px solid rgba(255,255,255,.9); color:var(--ink); font-size:12px; font-weight:600; }
.date-control button { background:transparent; color:var(--purple-dark); display:grid; place-items:center; }
.view-switch { margin-left:auto; display:flex; padding:2px; background:rgba(255,255,255,.65); border:1px solid rgba(255,255,255,.9); border-radius:10px; }
.view-switch button { padding:9px 17px; background:transparent; color:var(--ink-soft); border-radius:8px; font-size:12px; }
.view-switch button.active { background:#eee7ff; color:var(--purple-dark); box-shadow:0 2px 6px rgba(90,65,207,.10); }
.agenda-layout { display:grid; grid-template-columns:minmax(0, 1fr) 258px; gap:14px; }
.list-board { padding:0; overflow:hidden; }
.list-board .card-heading { padding:17px 18px 0; }
.month-board { padding:18px; }
.month-board-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:18px; }
.month-board-head h2 { margin:0; font:700 16px Manrope, sans-serif; }
.month-board-head span { color:var(--ink-soft); font-size:11px; }
.month-board-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.month-day { min-height:72px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.55); text-align:left; padding:9px; color:var(--ink); }
.month-day:hover { background:#f1ecff; border-color:#cfc5ff; }
.month-day strong { display:block; font-size:12px; }
.month-day small { display:block; color:var(--purple-dark); font-size:10px; margin-top:22px; }
.month-day.muted { color:#b0b3ce; background:rgba(245,244,252,.42); }
.month-day.selected { border:2px solid var(--purple); background:#efe8ff; }
.day-grid { padding: 0; overflow:hidden; }
.day-grid-header { display:grid; grid-template-columns:72px 1fr; padding:14px 16px 8px; border-bottom:1px solid var(--line); color:var(--ink-soft); font-size:11px; }
.day-grid-header strong { color:var(--ink); font-size:13px; }
.time-list { position:relative; }
.time-row { min-height:55px; display:grid; grid-template-columns:72px 1fr; border-bottom:1px solid var(--line); }
.time-row > span { padding:14px 0 0 16px; color:var(--ink-soft); font-size:11px; }
.slot { margin:5px 8px 5px 0; min-height:45px; border-radius:5px; display:grid; grid-template-columns:42px minmax(80px,1fr) auto; gap:8px; align-items:center; padding:4px 10px; background:linear-gradient(90deg,#dff7f0,#d7f0ed); border-left:3px solid var(--teal); font-size:11px; }
.slot.blue { background:linear-gradient(90deg,#e0edff,#d6eaff); border-left-color:var(--blue); }
.slot.purple { background:linear-gradient(90deg,#eee5ff,#e9defd); border-left-color:var(--purple); }
.slot.amber { background:linear-gradient(90deg,#fff5e6,#ffecd6); border-left-color:var(--amber); }
.slot.red { background:linear-gradient(90deg,#ffe5ed,#ffdce8); border-left-color:var(--red); }
.slot.white { background:#fff; border-left-color:#cfd1df; box-shadow:inset 0 0 0 1px #e5e6ef; }
.slot > span:first-child { color:var(--ink-soft); }
.slot strong { display:block; font-size:11px; }
.slot small { display:block; color:var(--ink-soft); margin-top:2px; }
.slot .status { justify-self:end; font-size:10px; padding:5px 7px; }
.lunch { min-height:44px; margin:5px 8px 5px 0; border-radius:5px; background:#e4e5f2; color:#65709f; display:flex; align-items:center; gap:10px; padding:4px 15px; font-size:11px; }
.mini-calendar { padding: 16px; }
.mini-calendar .month-title { display:flex; justify-content:space-between; align-items:center; font:700 14px Manrope; margin-bottom:14px; }
.mini-calendar .month-title div { display:flex; gap:5px; }
.calendar-nav { width:26px; height:26px; border:1px solid var(--line); border-radius:50%; background:rgba(255,255,255,.6); display:grid; place-items:center; color:var(--purple); }
.calendar-days, .calendar-dates { display:grid; grid-template-columns:repeat(7,1fr); gap:7px 3px; text-align:center; }
.calendar-days { color:var(--ink-soft); font-size:9px; margin-bottom:8px; }
.calendar-dates button { width:26px; height:26px; background:transparent; color:var(--ink); font-size:11px; border-radius:50%; margin:auto; }
.calendar-dates button:hover { background:#eee8ff; }
.calendar-dates button.selected { background:linear-gradient(145deg,#9960f0,#653ce8); color:#fff; box-shadow:0 4px 9px rgba(95,57,216,.24); }
.calendar-dates button.muted { color:#b0b3ce; }
.side-info { margin-top:14px; }
.side-info .mini-heading { margin-bottom:14px; }
.status-legend { display:grid; gap:10px; }
.status-legend div { display:grid; grid-template-columns:12px 1fr auto; gap:7px; align-items:center; font-size:10px; color:var(--ink-soft); }
.status-legend i { width:10px; height:10px; border-radius:50%; background:#12b28a; box-shadow:0 0 0 4px #d9f5ec; }
.status-legend i.purple { background:#743cff; box-shadow:0 0 0 4px #eee3ff; }
.status-legend i.blue { background:#2d82ef; box-shadow:0 0 0 4px #e0edff; }
.status-legend i.amber { background:#eca016; box-shadow:0 0 0 4px #fff0d4; }
.status-legend i.red { background:#f14562; box-shadow:0 0 0 4px #ffe0e8; }
.status-legend i.gray { background:#6d7190; box-shadow:0 0 0 4px #e7e8f0; }
.status-legend strong { font-size:10px; color:var(--ink); }

.week-board { padding: 0; overflow:hidden; }
.week-head { display:grid; grid-template-columns:55px repeat(5,1fr); border-bottom:1px solid var(--line); }
.week-head > div { padding:13px 7px 10px; text-align:center; color:var(--ink-soft); font-size:10px; border-left:1px solid var(--line); }
.week-head strong { display:block; color:var(--ink); font-size:12px; margin-top:4px; }
.week-body { display:grid; grid-template-columns:55px repeat(5,1fr); min-height: 590px; }
.week-times { display:grid; grid-template-rows:repeat(9,1fr); color:var(--ink-soft); font-size:10px; }
.week-times span { padding:13px 0 0 11px; border-bottom:1px solid var(--line); }
.week-column { border-left:1px solid var(--line); display:grid; grid-template-rows:repeat(9,1fr); }
.week-column > div { border-bottom:1px solid var(--line); padding:5px; }
.week-slot { border-radius:5px; border-left:3px solid var(--teal); background:#ddf5ef; padding:7px 6px; font-size:10px; min-height:42px; }
.week-slot.blue { border-left-color:var(--blue); background:#e0edff; }
.week-slot.purple { border-left-color:var(--purple); background:#eee5ff; }
.week-slot.white { border-left-color:#cfd1df; background:#fff; box-shadow:inset 0 0 0 1px #e5e6ef; }
.week-slot strong { display:block; font-size:10px; }
.week-slot small { display:block; color:var(--ink-soft); margin-top:3px; }
.week-slot.lunch { min-height:42px; padding:7px 5px; background:#e7e8f2; border-left:0; display:block; }
.week-slot.is-off { min-height:42px; padding:7px 6px; background:repeating-linear-gradient(135deg,#f1f1f6,#f1f1f6 6px,#e8e8ef 6px,#e8e8ef 12px); border-left:3px solid #cfd1df; display:flex; align-items:center; }
.week-slot.is-off span { color:var(--muted); font-size:10px; }
.week-head > div.is-off-day { color:var(--muted); background:#f7f7fb; }
.week-head > div.is-off-day strong { color:var(--muted); }

.patients-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.inner-search { min-width:240px; height:40px; border:1px solid rgba(255,255,255,.92); background:rgba(255,255,255,.67); border-radius:10px; display:flex; align-items:center; padding:0 11px; gap:8px; }
.inner-search svg { color:var(--purple); }
.inner-search input { border:0; background:transparent; outline:0; flex:1; min-width:0; color:var(--ink); font-size:12px; }
.filter-pill { height:40px; border:1px solid rgba(255,255,255,.92); background:rgba(255,255,255,.55); border-radius:10px; padding:0 14px; color:var(--ink-soft); font-size:12px; }
.patients-table { padding:0; overflow:hidden; }
.table-head, .patient-table-row { display:grid; grid-template-columns: 2.1fr 1fr 1fr 1.15fr 1fr 26px; gap:12px; align-items:center; padding:0 17px; }
.table-head { min-height:42px; background:rgba(245,243,255,.74); color:var(--ink-soft); font-size:10px; text-transform:uppercase; letter-spacing:.4px; }
.patient-table-row { min-height:73px; border-top:1px solid var(--line); font-size:12px; }
.patient-table-row:hover { background:rgba(245,242,255,.45); }
.patient-table-row .patient-cell { font-size:12px; }
.patient-table-row .muted { color:var(--ink-soft); font-size:11px; }
.patient-directory-head, .patient-directory-row { grid-template-columns: 2.1fr 1fr 1fr; }
.patient-directory-head > span:first-child { padding-left:14px; }
.patient-directory-row > .patient-cell { padding-left:14px; }
.patient-directory-row { cursor:pointer; }
.patient-directory-row:hover { background:rgba(245,242,255,.45); }
.waiting-actions { position:relative; justify-self:end; }
.waiting-action-menu { position:absolute; top:calc(100% + 7px); right:0; z-index:20; min-width:168px; padding:5px; border:1px solid #e2dcfb; border-radius:11px; background:rgba(255,255,255,.98); box-shadow:0 14px 30px rgba(55,43,135,.16); }
.waiting-action-menu[hidden] { display:none; }
.waiting-action-menu button { width:100%; display:flex; align-items:center; gap:7px; padding:9px 10px; border-radius:8px; color:#6e2db7; background:transparent; text-align:left; font-size:11px; }
.waiting-action-menu button:hover { background:#f5efff; }
.waiting-action-menu svg { width:15px; height:15px; }
.patient-edit-backdrop { position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:20px; background:rgba(36,32,82,.43); backdrop-filter:blur(9px); }
.patient-edit-dialog { width:min(720px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:1px solid rgba(255,255,255,.95); border-radius:22px; background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,246,255,.96)); box-shadow:0 24px 70px rgba(40,27,122,.22); }
.patient-edit-header { display:flex; align-items:flex-start; gap:12px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.patient-edit-header h2 { margin:0 0 5px; font:800 20px Manrope; color:var(--ink); }
.patient-edit-header p { margin:0; color:var(--ink-soft); font-size:12px; }
.patient-edit-header .dialog-close { margin-left:auto; }
.history-backdrop { position:fixed; inset:0; z-index:65; display:grid; place-items:center; padding:20px; background:rgba(36,32,82,.43); backdrop-filter:blur(9px); }
.history-dialog { width:min(760px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:1px solid rgba(255,255,255,.95); border-radius:22px; background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,246,255,.96)); box-shadow:0 24px 70px rgba(40,27,122,.22); scrollbar-width:thin; scrollbar-color:#8d72f4 rgba(229,224,255,.62); }
.history-dialog::-webkit-scrollbar { width:10px; }
.history-dialog::-webkit-scrollbar-track { background:#f0ecff; border-radius:99px; margin:9px 0; }
.history-dialog::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:99px; background:linear-gradient(180deg,#c084fc,#765ee8); background-clip:padding-box; }
.history-header { display:flex; align-items:flex-start; gap:12px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.history-header h2 { margin:0 0 5px; font:800 20px Manrope; color:var(--ink); }
.history-header p { margin:0; color:var(--ink-soft); font-size:12px; }
.history-header .dialog-close { margin-left:auto; }
.history-list { display:grid; gap:12px; padding:18px 0; }
.history-visit { padding:16px; border:1px solid #e2ddf6; border-radius:16px; background:linear-gradient(135deg,#fff,#faf8ff); }
.history-visit-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid #ece9f7; }
.history-visit-head div { display:grid; gap:3px; }
.history-visit-head span:first-child { color:var(--purple); font-size:11px; font-weight:700; }
.history-visit-head strong { color:var(--ink); font:800 15px Manrope; }
.history-badge { color:#16876f; background:#def6ee; border-radius:99px; padding:5px 9px; font-size:10px; white-space:nowrap; }
.history-edited-note { margin:8px 0 0; color:#8a621e; font-size:10px; }
.history-versions { margin:8px 0 0; color:#8a621e; font-size:10px; }
.history-versions summary { cursor:pointer; font-size:10px; }
.history-versions ul { list-style:none; margin:6px 0 0; padding:0 0 0 10px; border-left:2px solid #f0e4c8; display:grid; gap:8px; }
.history-versions li small { color:var(--ink-soft); font-size:10px; }
.history-version-notes { margin:2px 0 0; color:var(--ink-soft); font-size:11px; }
.history-version-change { margin:4px 0 0; font-size:12px; }
.history-version-change small { color:var(--ink-soft); }
.history-version-change p { margin:2px 0 0; white-space:pre-wrap; padding:6px 8px; border-left:2px solid var(--line, #d9dcec); }
.history-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:14px 0; }
.history-fields div { display:grid; gap:4px; }
.history-fields small, .history-transcript small { color:var(--ink-soft); font-size:10px; }
.history-fields strong { color:var(--ink); font-size:12px; }
.history-full-record { margin:2px 0 14px; padding:13px 14px; border:1px solid #e2dcf8; border-radius:13px; background:#fbfaff; }
.history-full-record h3 { margin:0 0 10px; color:var(--purple-dark); font:800 12px Manrope; }
.history-full-field { display:grid; gap:4px; padding:9px 0; border-top:1px solid #ece9f7; }
.history-full-field:first-of-type { padding-top:0; border-top:0; }
.history-full-field small { color:var(--ink-soft); font-size:10px; font-weight:700; }
.history-full-field p { margin:0; color:var(--ink-soft); font-size:11px; line-height:1.55; }
.history-insights { padding-top:11px; border-top:1px solid #ece9f7; }
.history-insights h3 { margin:0 0 7px; color:var(--ink); font:700 12px Manrope; }
.history-insights ul { margin:0; padding-left:17px; color:var(--ink-soft); font-size:11px; line-height:1.55; }
.history-transcript { margin-top:12px; padding:11px 12px; border-radius:11px; background:#f5f1ff; }
.history-transcript p { margin:5px 0 0; color:var(--ink-soft); font-size:11px; line-height:1.5; }
.history-empty { padding:38px 18px; text-align:center; color:var(--ink-soft); }
.history-empty .dialog-heading-icon { margin:0 auto 10px; }
.history-empty h3 { margin:0 0 5px; color:var(--ink); font:800 15px Manrope; }
.history-empty p { margin:0; font-size:12px; }
.history-footer { display:flex; justify-content:flex-end; gap:9px; padding-top:15px; border-top:1px solid var(--line); }
.patient-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:20px 0; }
.patient-edit-grid label { display:grid; gap:7px; color:var(--ink-soft); font-size:11px; }
.patient-edit-grid label[data-minor-fields][hidden] { display:none !important; }
.patient-identity-lookup { min-height:16px; margin-top:-7px; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.patient-identity-lookup.success { color:#078c75; }
.patient-identity-lookup.loading { color:#6441d8; }
.patient-identity-lookup.error { color:#c63b50; }
.patient-identity-lookup.hint { color:#6d6b9c; }
.patient-address-lookup { min-height:16px; margin-top:-7px; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.patient-address-lookup.success { color:#078c75; }
.patient-address-lookup.loading { color:#6441d8; }
.patient-address-lookup.error { color:#c63b50; }
.patient-address-lookup.hint { color:#6d6b9c; }
.patient-edit-grid label.full, .patient-identity-lookup.full { grid-column:1 / -1; }
.patient-address-lookup.full { grid-column:1 / -1; }
.patient-edit-grid input, .patient-edit-grid select { width:100%; height:42px; padding:0 12px; border:1px solid #ddd8f6; border-radius:10px; outline:0; color:var(--ink); background:rgba(255,255,255,.8); font:500 12px Manrope; }
.patient-edit-grid input:focus, .patient-edit-grid select:focus { border-color:#8b5cf6; box-shadow:0 0 0 3px rgba(139,92,246,.12); }
.birth-date-picker { position:relative; }
.birth-date-control { display:flex; align-items:center; gap:6px; }
.birth-date-control input { flex:1; cursor:pointer; }
.birth-date-control button { width:42px; height:42px; display:grid; place-items:center; flex:none; border:1px solid #ddd8f6; border-radius:10px; color:var(--purple); background:linear-gradient(145deg,#faf8ff,#eeeaff); cursor:pointer; }
.birth-date-control button:hover { border-color:#9a7cf2; background:#f1edff; }
.birth-date-control button svg { width:17px; height:17px; }
.birth-date-popover { position:absolute; top:calc(100% + 8px); left:0; z-index:4; width:min(290px,calc(100vw - 64px)); padding:13px; border:1px solid #ded8f6; border-radius:16px; background:linear-gradient(145deg,#fff,#f8f6ff); box-shadow:0 18px 45px rgba(45,31,120,.2); }
.birth-date-popover[hidden] { display:none; }
.birth-calendar-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:11px; color:var(--ink); }
.birth-calendar-title { display:flex; align-items:center; gap:6px; }
.birth-calendar-head strong { font:800 12px Manrope; }
.birth-calendar-head select { height:27px; padding:0 22px 0 7px; border:1px solid #e2dcf8; border-radius:8px; outline:0; color:var(--purple-dark); background:#fff; font:800 11px Manrope; cursor:pointer; }
.birth-calendar-head select:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.birth-calendar-head > div { display:flex; gap:4px; }
.birth-calendar-head button { width:27px; height:27px; display:grid; place-items:center; border:1px solid #e2dcf8; border-radius:8px; color:var(--purple); background:#fff; cursor:pointer; }
.birth-calendar-head button:hover { background:#f0ecff; }
.birth-calendar-head button svg { width:14px; height:14px; }
.birth-calendar-weekdays, .birth-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
.birth-calendar-weekdays { margin-bottom:5px; color:var(--ink-soft); font-size:9px; }
.birth-calendar-grid button { height:29px; border:0; border-radius:9px; color:var(--ink); background:transparent; font:600 11px Manrope; cursor:pointer; }
.birth-calendar-grid button:hover { background:#eee9ff; color:var(--purple); }
.birth-calendar-grid button.muted { color:#c0bbd5; }
.birth-calendar-grid button.selected { color:#fff; background:linear-gradient(135deg,#a855f7,#6655e9); box-shadow:0 5px 13px rgba(103,76,223,.25); }
.patient-edit-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:16px; border-top:1px solid var(--line); }
.patient-edit-actions > div { display:flex; gap:9px; }
.patient-edit-actions svg { width:15px; height:15px; }
.attention { display:inline-flex; color:#ca4193; background:#ffe9f5; border-radius:99px; font-size:10px; padding:5px 8px; }

.record-top { display:flex; align-items:center; gap:14px; margin-bottom:11px; color:var(--purple-dark); }
.back-button { display:flex; align-items:center; gap:7px; background:transparent; color:var(--ink-soft); font-size:12px; }
.record-layout { display:grid; grid-template-columns:minmax(0,1fr) 292px; gap:14px; }
.record-main { min-width:0; }
.record-consultation-timer { display:flex; justify-content:flex-end; margin:0 0 8px; }
.consultation-header-timer { display:grid; gap:3px; min-width:112px; padding:8px 12px; border:1px solid #d8cff9; border-radius:11px; color:var(--purple-dark); background:linear-gradient(145deg,#faf8ff,#f0eaff); box-shadow:0 5px 15px rgba(91,75,220,.08); }
.consultation-header-timer span { color:var(--muted); font-size:9px; font-weight:700; line-height:1; text-transform:uppercase; letter-spacing:.35px; }
.consultation-header-timer strong { font:800 16px Manrope; letter-spacing:.4px; }
.patient-banner { min-height:112px; display:flex; align-items:center; padding:18px; gap:14px; margin-bottom:11px; }
.patient-banner > .patient-avatar { width:70px; height:70px; font-size:22px; }
.patient-banner h1 { margin:0; font:800 23px Manrope; letter-spacing:-.8px; }
.patient-banner p { margin:5px 0 0; color:var(--ink-soft); font-size:12px; }
.tag-list { display:flex; gap:7px; margin-top:10px; flex-wrap:wrap; }
.tag { padding:5px 9px; border-radius:7px; color:#4d32c6; background:#eee7ff; font-size:10px; }
.banner-actions { display:flex; gap:9px; margin-left:auto; align-self:flex-start; }
.patient-menu-anchor { position:relative; }
.patient-record-menu { position:absolute; top:43px; right:0; z-index:18; min-width:190px; padding:6px; border:1px solid #e1daf8; border-radius:12px; background:rgba(255,255,255,.98); box-shadow:0 16px 35px rgba(56,39,137,.18); }
.patient-record-menu button { width:100%; display:flex; align-items:center; gap:8px; padding:10px 11px; border:0; border-radius:8px; color:var(--ink-soft); background:transparent; text-align:left; font-size:12px; }
.patient-record-menu button:hover { color:var(--purple-dark); background:#f5f1ff; }
.patient-record-menu svg { width:15px; height:15px; color:var(--purple); }
.tabbar { min-height:51px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; padding:0 15px; margin-bottom:11px; overflow:visible; }
.tabbar button { min-height:51px; background:transparent; color:var(--ink-soft); padding:0 14px; display:flex; align-items:center; justify-content:flex-start; gap:8px; font-size:11px; border-bottom:2px solid transparent; white-space:normal; text-align:left; line-height:1.25; }
.tabbar button.active { color:var(--purple-dark); border-bottom-color:var(--purple); }
.tabbar button svg { width:16px; height:16px; }
.record-section-card { min-height:405px; padding:24px; }
.record-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.record-section-heading h2 { margin:0 0 5px; color:var(--ink); font:800 20px Manrope; }
.record-section-heading p { margin:0; color:var(--ink-soft); font-size:12px; line-height:1.5; }
.ai-pill { display:inline-flex; align-items:center; gap:6px; flex:none; padding:7px 10px; border:1px solid #ded5ff; border-radius:99px; color:var(--purple-dark); background:#f5f1ff; font-size:10px; white-space:nowrap; }
.ai-pill svg { width:14px; height:14px; }
.scale-safety-note { display:flex; align-items:flex-start; gap:9px; margin:17px 0 14px; padding:12px 13px; border:1px solid #e2dcf8; border-radius:11px; color:var(--purple-dark); background:#f8f6ff; font-size:11px; line-height:1.45; }
.scale-safety-note svg { flex:none; width:18px; height:18px; }
.scale-ai-panel { display:flex; align-items:center; gap:11px; margin:14px 0; padding:13px 14px; border:1px solid #e3dcfb; border-radius:12px; color:var(--purple-dark); background:linear-gradient(110deg,#faf8ff,#f4f0ff); }
.scale-ai-panel > svg { flex:none; width:18px; height:18px; }
.scale-ai-panel > div { display:grid; gap:3px; flex:1; }
.scale-ai-panel strong { color:var(--ink); font-size:12px; }
.scale-ai-panel span { color:var(--ink-soft); font-size:10px; line-height:1.45; }
.scale-ai-panel.is-warning { border-color:#f0d8b1; background:#fffaf2; }
.scale-ai-panel.is-warning > svg { color:#a46a22; }
.scale-ai-panel.is-ready > svg { color:var(--purple); }
.scale-ai-spinner { width:15px; height:15px; flex:none; border:2px solid #ddd4fb; border-top-color:var(--purple); border-radius:50%; animation:scale-spin .8s linear infinite; }
@keyframes scale-spin { to { transform:rotate(360deg); } }
.scale-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.scale-card { display:grid; gap:7px; padding:14px; border:1px solid #e4def9; border-radius:12px; background:linear-gradient(145deg,#fff,#fbfaff); }
.scale-card.is-blocked { opacity:.78; border-style:dashed; background:#faf9ff; }
.scale-card.is-retained { border-color:#cfe9e2; background:linear-gradient(145deg,#fff,#f8fffd); }
.scale-card-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.scale-card-heading strong { color:var(--ink); font:800 15px Manrope; }
.scale-card-title { display:flex; align-items:center; gap:6px; }
.scale-help-icon { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; border-radius:99px; border:1px solid var(--purple-dark); background:none; color:var(--purple-dark); font:800 10px Manrope; line-height:1; cursor:help; padding:0; }
.scale-help-icon:hover, .scale-help-icon:focus-visible { background:var(--purple-dark); color:#fff; }
html[data-theme="dark"] .scale-help-icon { border-color:#cabfff; color:#cabfff; }
html[data-theme="dark"] .scale-help-icon:hover, html[data-theme="dark"] .scale-help-icon:focus-visible { background:#cabfff; color:#221c46; }
.scale-interpretation-dialog { max-width:420px; }
.scale-interpretation-bands { list-style:none; margin:14px 25px 0; padding:0; display:grid; gap:7px; }
.scale-interpretation-bands li { display:flex; align-items:baseline; justify-content:space-between; gap:10px; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.55); }
.scale-interpretation-bands strong { color:var(--purple-dark); font:800 11px Manrope; white-space:nowrap; }
.scale-interpretation-bands span { color:var(--ink); font:600 11px 'DM Sans',system-ui,sans-serif; text-align:right; }
.scale-interpretation-note { margin:12px 25px 0; color:var(--muted); font-size:10.5px; line-height:1.5; }
html[data-theme="dark"] .scale-interpretation-bands li { background:rgba(40,43,83,.4); border-color:rgba(196,192,255,.16); }
.scale-status { color:var(--muted); background:#f1eff8; border-radius:99px; padding:4px 7px; font-size:9px; }
.scale-status.active { color:#168b78; background:#e6f7f1; }
.scale-status.blocked { color:#9a5b1c; background:#fff0dc; }
.scale-card h3 { margin:0; color:var(--ink); font:700 12px Manrope; }
.scale-card p { min-height:31px; margin:0; color:var(--ink-soft); font-size:10px; line-height:1.45; }
.scale-recommendation { display:grid; gap:3px; padding:8px 9px; border-radius:9px; background:#f6f2ff; border:1px solid #e8e0ff; }
.scale-recommendation strong { color:var(--purple-dark); font-size:10px; }
.scale-recommendation span { color:var(--ink-soft); font-size:10px; line-height:1.4; }
.scale-recommendation small { color:var(--muted); font-size:9px; text-transform:capitalize; }
.scale-retained-note { padding:8px 9px; border-radius:9px; color:#168b78; background:#edf9f5; border:1px solid #d7efe8; font-size:10px; line-height:1.4; }
.scale-paused-note { display:flex; align-items:flex-start; gap:6px; padding:8px 9px; border-radius:9px; color:#9a6b15; background:#fdf6e7; border:1px solid #f2e3bd; font-size:10px; line-height:1.4; }
.scale-paused-note svg { width:13px; height:13px; flex:none; margin-top:1px; }
.scale-latest-result { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 9px; padding:8px 9px; border-radius:9px; background:#f4f0ff; border:1px solid #e1daf7; }
.scale-latest-result strong { color:var(--ink); font:800 13px Manrope; }
.scale-latest-interpretation { flex:1; min-width:0; color:var(--purple-dark); font:700 10.5px Manrope; }
.scale-latest-result small { margin-left:auto; color:var(--muted); font-size:9px; white-space:nowrap; }
html[data-theme="dark"] .scale-latest-result { background:#2a2650; border-color:#4a4483; }
html[data-theme="dark"] .scale-latest-result strong { color:#eef0ff; }
html[data-theme="dark"] .scale-latest-interpretation { color:#cabfff; }
/* Sem isso, um escore grave (ou com sinal de segurança) ficava com a mesma cor neutra de um escore leve
   assim que o aviso na faixa de alertas era dispensado. */
.scale-latest-result.is-alert { background:#fffaf2; border-color:#f0d8b1; }
.scale-latest-result.is-safety { background:#fff1f3; border-color:rgba(241,69,98,.35); }
.scale-latest-flag { flex:0 0 100%; display:inline-flex; align-items:center; gap:4px; font:700 9.5px Manrope; text-transform:uppercase; letter-spacing:.02em; }
.scale-latest-result.is-alert .scale-latest-flag { color:#a46a22; }
.scale-latest-result.is-safety .scale-latest-flag { color:#c22346; }
.scale-latest-flag svg { width:11px; height:11px; }
html[data-theme="dark"] .scale-latest-result.is-alert { background:#3a2f1a; border-color:#6b5326; }
html[data-theme="dark"] .scale-latest-result.is-safety { background:#3a1b21; border-color:#7a2f3d; }
.scale-meta { display:flex; flex-wrap:wrap; gap:5px 9px; color:var(--muted); font-size:9px; line-height:1.35; }
.scale-frequency { display:grid; gap:5px; color:var(--ink-soft); font-size:10px; }
.scale-frequency select { width:100%; height:34px; padding:0 9px; border:1px solid #ded8f3; border-radius:9px; color:var(--ink); background:#fff; font:500 10px Manrope; outline:0; }
.scale-frequency select:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.scale-library-summary { display:grid; grid-template-columns:160px minmax(0,1fr); gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.scale-library-summary div { display:grid; gap:4px; }
.scale-library-summary small { color:var(--muted); font-size:10px; }
.scale-library-summary strong { color:var(--ink); font-size:12px; line-height:1.4; }
.scale-rights { display:block; min-height:27px; color:var(--muted); font-size:9px; line-height:1.35; }
.scale-card .button { justify-self:start; margin-top:3px; }
.scale-card .button svg { width:14px; height:14px; }
.scale-retained-heading { display:flex; align-items:baseline; gap:8px; margin:19px 0 9px; }
.scale-retained-heading strong { color:var(--ink); font:800 12px Manrope; }
.scale-retained-heading span { color:var(--muted); font-size:10px; }
.scale-library-footnote { margin-top:16px; color:var(--muted); font-size:10px; line-height:1.45; }
.scale-trend-panel { --scale-chart-surface:#fff; margin:16px 0 18px; padding:16px; border:1px solid #e1d9fa; border-radius:16px; background:linear-gradient(145deg,rgba(252,250,255,.96),rgba(244,240,255,.82)); box-shadow:0 10px 28px rgba(84,66,176,.07); }
.scale-trend-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.scale-trend-heading > div { display:grid; gap:4px; min-width:0; }
.scale-trend-kicker { color:var(--purple); font-size:9px; font-weight:800; letter-spacing:.65px; text-transform:uppercase; }
.scale-trend-heading h3 { margin:0; color:var(--ink); font:800 15px Manrope; }
.scale-trend-heading p { margin:0; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.scale-trend-badge { display:inline-flex; align-items:center; gap:5px; flex:none; padding:6px 9px; border:1px solid #ded3ff; border-radius:99px; color:var(--purple-dark); background:#f5f0ff; font-size:9px; white-space:nowrap; }
.scale-trend-badge svg { width:13px; height:13px; }
.scale-trend-selector { display:grid; gap:10px; margin-top:15px; padding:12px; border:1px solid #e5def9; border-radius:12px; background:rgba(255,255,255,.64); }
.scale-trend-selector > div:first-child { display:grid; gap:3px; }
.scale-trend-selector strong { color:var(--ink); font-size:11px; }
.scale-trend-selector span { color:var(--muted); font-size:9px; line-height:1.35; }
.scale-trend-selector-list { display:flex; flex-wrap:wrap; gap:7px; }
.scale-trend-option { min-width:145px; display:flex; align-items:center; gap:7px; padding:7px 8px; border:1px solid #e3ddf5; border-radius:10px; background:rgba(255,255,255,.76); cursor:pointer; transition:.18s ease; }
.scale-trend-option:hover { border-color:#b7a6f4; transform:translateY(-1px); }
.scale-trend-option input { width:14px; height:14px; flex:none; margin:0; accent-color:var(--purple); }
.scale-trend-option i, .scale-trend-latest > i { width:9px; height:9px; flex:none; display:block; border-radius:50%; background:var(--scale-chart-color); box-shadow:0 0 0 3px color-mix(in srgb,var(--scale-chart-color) 16%,transparent); }
.scale-trend-option > span { display:grid; gap:2px; min-width:0; }
.scale-trend-option > span strong { color:var(--ink); font-size:10px; }
.scale-trend-option > span small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.scale-trend-chart-wrap { min-width:0; margin-top:14px; padding:10px 8px 12px; border:1px solid #e8e2fa; border-radius:13px; background:rgba(255,255,255,.72); overflow:hidden; }
.scale-trend-chart { width:100%; min-height:220px; display:block; overflow:visible; }
.scale-chart-grid-line { stroke:rgba(111,95,191,.14); stroke-width:1; stroke-dasharray:3 4; }
.scale-chart-axis-line { stroke:rgba(111,95,191,.28); stroke-width:1; }
.scale-chart-axis-label, .scale-chart-date-label { fill:var(--muted); font:500 9px Manrope; }
.scale-chart-point-label { fill:var(--ink); font:800 9px Manrope; }
.scale-chart-series circle { transition:r .18s ease; cursor:help; }
.scale-chart-series circle:hover { r:7; }
.scale-trend-latest-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:8px; margin-top:8px; }
.scale-trend-latest { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:2px 7px; padding:8px 9px; border:1px solid #e6e0f7; border-radius:10px; background:rgba(255,255,255,.68); }
.scale-trend-latest > i { grid-row:span 2; }
.scale-trend-latest > div { min-width:0; display:grid; gap:2px; }
.scale-trend-latest strong { color:var(--ink); font-size:10px; }
.scale-trend-latest small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.scale-trend-latest b { color:var(--ink); font:800 11px Manrope; }
.scale-trend-latest > span { grid-column:2 / 4; color:var(--muted); font-size:8px; }
.scale-trend-empty { min-height:148px; display:flex; align-items:center; justify-content:center; gap:11px; margin-top:14px; padding:18px; border:1px dashed #d8cef4; border-radius:13px; color:var(--purple); background:rgba(255,255,255,.46); }
.scale-trend-empty > svg { width:23px; height:23px; flex:none; }
.scale-trend-empty > div { display:grid; gap:4px; }
.scale-trend-empty strong { color:var(--ink); font:800 12px Manrope; }
.scale-trend-empty span { color:var(--ink-soft); font-size:10px; line-height:1.45; }
.scale-trend-empty.is-filtered { min-height:130px; }
.scale-trend-note { margin:10px 2px 0; color:var(--muted); font-size:9px; line-height:1.45; }
html[data-theme="dark"] .scale-trend-panel { --scale-chart-surface:#191d41; border-color:rgba(196,192,255,.18); background:linear-gradient(145deg,rgba(31,35,76,.92),rgba(29,27,64,.9)); }
html[data-theme="dark"] .scale-trend-badge { border-color:rgba(177,157,255,.3); color:#ded7ff; background:#332b63; }
html[data-theme="dark"] .scale-trend-selector,
html[data-theme="dark"] .scale-trend-chart-wrap { border-color:rgba(196,192,255,.16); background:rgba(22,26,58,.68); }
html[data-theme="dark"] .scale-trend-option,
html[data-theme="dark"] .scale-trend-latest { border-color:rgba(196,192,255,.16); background:rgba(40,43,83,.62); }
html[data-theme="dark"] .scale-chart-grid-line { stroke:rgba(196,192,255,.16); }
html[data-theme="dark"] .scale-chart-axis-line { stroke:rgba(196,192,255,.32); }
html[data-theme="dark"] .scale-chart-axis-label,
html[data-theme="dark"] .scale-chart-date-label { fill:#aeb6e1; }
html[data-theme="dark"] .scale-chart-point-label { fill:#e4e7ff; }
html[data-theme="dark"] .scale-trend-empty { border-color:rgba(177,157,255,.32); background:rgba(35,39,79,.5); }
.source-status { display:flex; align-items:center; gap:8px; margin:17px 0 12px; color:var(--ink-soft); font-size:11px; }
.source-status svg { width:15px; height:15px; color:var(--purple); }
.extraction-grid { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:14px; margin-top:17px; }
.extraction-card { display:grid; gap:6px; padding:15px; border:1px solid #e4def9; border-radius:12px; background:#fbfaff; }
.extraction-card small { color:var(--ink-soft); font-size:10px; }
.extraction-card strong { color:var(--ink); font-size:13px; }
.document-generator { display:flex; align-items:end; gap:12px; margin-top:20px; }
.document-generator label { display:grid; flex:1; gap:7px; color:var(--ink-soft); font-size:11px; }
.document-generator select { height:42px; padding:0 12px; border:1px solid #ded8f3; border-radius:10px; color:var(--ink); background:#fff; font:500 12px Manrope; outline:0; }
.document-type-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:20px; }
.document-type-option { display:flex; align-items:center; gap:11px; min-height:72px; padding:12px 13px; border:1px solid #e3ddf6; border-radius:14px; color:var(--ink-soft); background:linear-gradient(145deg,#fff,#fbf9ff); text-align:left; cursor:pointer; transition:.18s ease; }
.document-type-option:hover { border-color:#b9a8f2; transform:translateY(-1px); box-shadow:0 8px 22px rgba(87,66,166,.08); }
.document-type-option.selected { border-color:var(--purple); background:linear-gradient(145deg,#f8f3ff,#eee8ff); box-shadow:0 0 0 3px rgba(124,88,235,.09); }
.document-type-option > svg:first-child { width:21px; height:21px; flex:none; color:var(--purple); }
.document-type-option > span { display:grid; gap:3px; min-width:0; flex:1; }
.document-type-option strong { color:var(--ink); font:800 11px Manrope; }
.document-type-option small { color:var(--muted); font-size:10px; line-height:1.35; }
.document-type-option > svg:last-child { width:15px; height:15px; flex:none; color:var(--purple); }
.document-selected-type { display:grid; gap:4px; flex:1; padding:10px 12px; border:1px solid #e3ddf6; border-radius:11px; background:#faf8ff; }
.document-selected-type span { color:var(--muted); font-size:10px; }
.document-selected-type strong { color:var(--ink); font:800 12px Manrope; }
.referral-suggestions { display:grid; gap:12px; margin-top:18px; padding:14px; border:1px solid #e3dcfb; border-radius:14px; background:#faf8ff; }
.referral-suggestions-heading { display:flex; align-items:center; gap:10px; }
.referral-suggestions-heading > svg { flex:none; width:18px; height:18px; color:var(--purple); }
.referral-suggestions-heading div { display:grid; gap:2px; }
.referral-suggestions-heading strong { color:var(--ink); font-size:12px; }
.referral-suggestions-heading span { color:var(--ink-soft); font-size:10.5px; }
.referral-suggestion-list { display:flex; flex-wrap:wrap; gap:8px; }
.referral-suggestion-chip { display:inline-flex; align-items:center; gap:8px; max-width:100%; padding:9px 13px; border:1px solid #d9cdfb; border-radius:99px; color:var(--purple-dark); background:#fff; font:700 11.5px Manrope; text-align:left; cursor:pointer; transition:.18s ease; }
.referral-suggestion-chip:hover { border-color:var(--purple); box-shadow:0 6px 16px rgba(87,66,166,.1); transform:translateY(-1px); }
.referral-suggestion-chip svg { flex:none; width:16px; height:16px; color:var(--purple); }
.referral-suggestion-chip small { flex:none; padding:2px 7px; border-radius:99px; color:var(--purple-dark); background:#efe9ff; font:700 9px Manrope; }
.referral-suggestion-chip.is-confirmed small { color:#23744f; background:#e3f6ee; }
.record-output.referral-output.is-highlighted { box-shadow:0 0 0 3px rgba(124,88,235,.28); transition:box-shadow .3s ease; }
.referral-option-tag { justify-self:start; margin-top:4px; padding:2px 8px; border-radius:99px; color:var(--purple-dark); background:#efe9ff; font:700 9.5px Manrope; font-style:normal; }
.referral-specialty-field { display:grid; gap:7px; width:min(100%,420px); margin:18px auto 0; color:var(--ink-soft); font-size:11px; }
.referral-specialty-field input { height:42px; padding:0 12px; border:1px solid #ded8f3; border-radius:10px; color:var(--ink); background:#fff; font:500 12px Manrope; outline:0; }
.referral-specialty-field input:focus { border-color:#b9a8f2; box-shadow:0 0 0 3px rgba(124,88,235,.09); }
.referral-generate { display:flex; justify-content:center; margin-top:22px; }
.referral-generate .button { min-width:230px; justify-content:center; }
.record-output.referral-output textarea { min-height:300px; }
.standalone-documents { display:grid; gap:12px; margin-top:26px; padding-top:18px; border-top:1px solid var(--line); }
.standalone-documents-heading { display:grid; gap:2px; }
.standalone-documents-heading strong { color:var(--ink); font-size:13px; }
.standalone-documents-heading span { color:var(--ink-soft); font-size:10.5px; }
.prescription-actions.is-centered { justify-content:center; }
.rx-timeline { position:relative; display:grid; gap:16px; margin:6px 0 0; padding:0 0 0 18px; list-style:none; }
.rx-timeline::before { content:''; position:absolute; left:5px; top:6px; bottom:6px; width:2px; border-radius:2px; background:linear-gradient(180deg,#be4df3,#4b78ed); opacity:.55; }
.rx-timeline-item { position:relative; display:grid; grid-template-columns:118px minmax(0,340px); align-items:start; gap:14px; }
.rx-timeline-date { position:relative; display:grid; gap:1px; padding-top:8px; }
.rx-timeline-dot { position:absolute; left:-18px; top:11px; width:12px; height:12px; border-radius:50%; background:linear-gradient(135deg,#be4df3,#4b78ed); box-shadow:0 0 0 4px var(--lavender); }
.rx-timeline-date::after { content:''; position:absolute; left:-6px; right:-14px; top:16px; height:1px; background:var(--notice-border); z-index:-1; }
.rx-timeline-date strong { color:var(--ink); font:800 12px Manrope; }
.rx-timeline-date small { color:var(--muted); font-size:10.5px; }
.rx-mini { overflow:hidden; border:1px solid var(--notice-border); border-radius:12px; background:var(--panel-solid); box-shadow:0 6px 18px rgba(68,64,147,.08); }
.rx-mini header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 12px; color:#fff; background:linear-gradient(100deg,#be4df3,#4b78ed); }
.rx-mini header span { display:flex; align-items:center; gap:6px; font:800 11px Manrope; }
.rx-mini header svg { width:13px; height:13px; }
.rx-mini header small { font-size:10px; opacity:.9; }
.rx-mini-text { padding:10px 12px 12px; color:var(--ink-soft); font:500 10.5px/1.55 Manrope; white-space:pre-wrap; overflow-wrap:anywhere; }
.rx-timeline-empty { color:var(--muted); }
.rx-mini-meta { display:flex; align-items:center; gap:8px; }
.rx-mini header .rx-renew { display:inline-flex; align-items:center; gap:3px; border:1px solid rgba(255,255,255,.55); border-radius:999px; padding:2px 8px; background:rgba(255,255,255,.16); color:#fff; font:700 10px Manrope; cursor:pointer; }
.rx-mini header .rx-renew svg { width:11px; height:11px; }
.rx-mini header .rx-renew:hover, .rx-mini header .rx-renew:focus-visible { background:rgba(255,255,255,.3); }
html[data-theme="dark"] .rx-timeline-dot { box-shadow:0 0 0 4px var(--lavender-strong); }
@media (max-width:560px) { .rx-timeline-item { grid-template-columns:1fr; gap:6px; } .rx-timeline-date::after { display:none; } }
.referral-action-buttons { display:flex; gap:8px; flex:none; }
.document-editor-backdrop, .document-package-dialog-backdrop { position:fixed; inset:0; z-index:130; display:grid; place-items:center; padding:20px; background:rgba(38,33,84,.42); backdrop-filter:blur(9px); }
.document-editor-modal, .document-package-dialog { width:min(720px,100%); max-height:calc(100vh - 40px); overflow:auto; border:1px solid rgba(255,255,255,.96); border-radius:22px; background:linear-gradient(145deg,#fff,#faf8ff); box-shadow:0 26px 90px rgba(36,25,101,.29); }
.document-editor-header, .document-modal-brand { display:flex; align-items:flex-start; gap:13px; }
.document-editor-header { padding:23px 24px 18px; border-bottom:1px solid rgba(125,98,222,.12); background:linear-gradient(135deg,#fff8ff,#f1ebff 68%,#f7fbff); }
.document-editor-header > .dialog-close { margin-left:auto; }
.document-modal-brand { flex:1; }
.document-modal-brand > div:last-child { display:grid; gap:4px; min-width:0; }
.document-modal-brand h2 { margin:1px 0 0; color:var(--ink); font:800 19px Manrope; letter-spacing:-.3px; }
.document-modal-brand p { margin:0; color:var(--ink-soft); font-size:11px; line-height:1.45; }
.document-modal-icon { display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:13px; color:#fff; background:linear-gradient(135deg,#a855f7,#5b5ce2); box-shadow:0 8px 20px rgba(112,76,213,.2); }
.document-modal-icon.success { background:linear-gradient(135deg,#22b58b,#168b78); }
.document-modal-icon.warning { background:linear-gradient(135deg,#dd9a39,#b46b17); }
.document-thinking { display:flex; align-items:center; gap:13px; margin:24px; padding:18px; border:1px solid #ded5fb; border-radius:15px; color:var(--ink-soft); background:linear-gradient(145deg,#fbfaff,#f3efff); }
.document-thinking > div { display:grid; gap:4px; }
.document-thinking strong { color:var(--ink); font:800 13px Manrope; }
.document-thinking p { margin:0; font-size:11px; line-height:1.45; }
.document-processing-steps { display:grid; gap:9px; margin:0 24px 24px; padding:14px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.document-processing-steps span { display:flex; align-items:center; gap:7px; }
.document-processing-steps svg { width:14px; height:14px; }
.document-processing-steps .complete { color:#168b78; }
.document-processing-steps .active { color:var(--purple-dark); font-weight:800; }
.document-review-note, .document-dialog-warning, .document-confirmed-copy { display:flex; align-items:flex-start; gap:8px; margin:17px 24px 0; padding:11px 12px; border:1px solid #e0d8f8; border-radius:12px; color:var(--ink-soft); background:#faf8ff; font-size:11px; line-height:1.45; }
.document-review-note svg, .document-dialog-warning svg, .document-confirmed-copy svg { width:16px; height:16px; flex:none; color:var(--purple); }
.document-draft-field { display:grid; gap:7px; margin:17px 24px 0; color:var(--ink); font:800 11px Manrope; }
.document-draft-field textarea { min-height:280px; resize:vertical; padding:13px 14px; border:1px solid #d9d1f5; border-radius:13px; color:var(--ink-soft); background:#fff; font:500 13px/1.55 Manrope; outline:0; }
.document-draft-field textarea:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.document-editor-footer { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; padding:16px 24px 21px; border-top:1px solid var(--line); background:#fcfbff; }
.document-confirmed-copy { align-items:center; margin-top:20px; color:#18785f; border-color:#c9eadc; background:#effaf5; }
.document-confirmed-copy div { display:grid; gap:3px; }
.document-confirmed-copy strong { color:#16785d; font:800 12px Manrope; }
.document-confirmed-copy span { font-size:10px; }
.document-package-patient { display:grid; gap:3px; margin:19px 24px 0; padding:12px 13px; border-radius:12px; color:var(--ink-soft); background:#faf8ff; }
.document-package-patient strong { color:var(--ink); font:800 13px Manrope; }
.document-package-patient span { font-size:10px; }
.document-package-link { display:grid; gap:7px; margin:17px 24px 0; color:var(--ink); font:800 11px Manrope; }
.document-package-link > div { display:flex; gap:8px; }
.document-package-link input { min-width:0; flex:1; height:42px; padding:0 12px; border:1px solid #d9d1f5; border-radius:11px; color:var(--ink-soft); background:#fff; font:500 10px Manrope; }
.document-package-delivery { display:flex; align-items:flex-start; gap:8px; margin:14px 24px 0; padding:11px 12px; border-radius:11px; color:#8a621e; background:#fff8e9; font-size:10px; line-height:1.4; }
.document-package-delivery svg { width:15px; height:15px; flex:none; }
.document-package-list { display:grid; gap:7px; margin:17px 24px 0; padding:0; list-style:none; }
.document-package-list li { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid #e6e0f5; border-radius:10px; color:var(--ink-soft); background:#fff; font-size:11px; }
.document-package-list li svg { width:15px; height:15px; color:var(--purple); }
.document-package-list li span { flex:1; }
.document-package-list li small { color:#168b78; font-size:9px; }
.document-package-dialog .document-editor-footer { margin-top:19px; }
.document-button-spinner { display:inline-block; width:12px; height:12px; margin-right:6px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .8s linear infinite; vertical-align:-2px; }
.document-package-page { min-height:100vh; margin:0; background:radial-gradient(circle at 20% 0%,#f0eaff 0,#f8f7ff 44%,#edf2ff 100%); }
.patient-document-screen { display:grid; justify-items:center; gap:18px; min-height:100vh; padding:46px 20px 28px; color:var(--ink); }
.patient-document-brand { display:flex; align-items:center; gap:10px; }
.patient-document-brand img { width:42px; height:42px; object-fit:contain; border-radius:12px; box-shadow:0 8px 20px rgba(82,65,145,.16); }
.patient-document-brand strong { display:block; color:var(--ink); font:800 18px Manrope; }
.patient-document-brand small { display:block; color:var(--muted); font-size:11px; }
.patient-document-card { width:min(620px,100%); padding:30px; border:1px solid rgba(143,116,229,.18); border-radius:24px; background:rgba(255,255,255,.9); box-shadow:0 24px 70px rgba(82,65,145,.14); }
.patient-document-heading { display:flex; align-items:flex-start; gap:13px; }
.patient-document-heading h1 { margin:2px 0 0; color:var(--ink); font:800 24px/1.18 Manrope; }
.patient-document-icon, .patient-document-success-icon { display:grid; place-items:center; width:43px; height:43px; flex:none; border-radius:14px; color:#fff; background:linear-gradient(135deg,#a855f7,#5b5ce2); }
.patient-document-success-icon { border-radius:50%; background:linear-gradient(135deg,#22b58b,#168b78); }
.patient-document-eyebrow { color:var(--purple-dark); font:800 10px Manrope; letter-spacing:.07em; text-transform:uppercase; }
.patient-document-greeting { margin:23px 0 5px; color:var(--ink); font:800 17px Manrope; }
.patient-document-copy { margin:0 0 17px; color:var(--ink-soft); font-size:13px; line-height:1.6; }
.patient-document-security { display:flex; align-items:flex-start; gap:8px; margin:16px 0; padding:11px 12px; border:1px solid #e0d8f8; border-radius:12px; color:var(--ink-soft); background:#faf8ff; font-size:11px; line-height:1.4; }
.patient-document-security svg { width:15px; height:15px; flex:none; color:var(--purple); }
.patient-document-form { display:grid; gap:14px; }
.patient-document-form label { display:grid; gap:7px; color:var(--ink); font:800 11px Manrope; }
.patient-document-form input { height:44px; padding:0 13px; border:1px solid #d9d1f5; border-radius:11px; color:var(--ink); background:#fff; font:500 14px Manrope; outline:0; }
.patient-document-form input:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.patient-document-error-message { min-height:18px; color:#bd3548; font-size:11px; }
.document-primary-button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; border:0; border-radius:11px; color:#fff; background:linear-gradient(135deg,#7c3aed,#5b5ce2); font:800 12px Manrope; cursor:pointer; }
.document-primary-button:disabled { opacity:.7; cursor:wait; }
.patient-document-expiry, .patient-document-legal { color:var(--muted); font-size:10px; text-align:center; }
.patient-document-files-card { padding-bottom:23px; }
.patient-document-files-card .patient-document-copy { margin-top:18px; }
.patient-document-file-list { display:grid; gap:9px; }
.patient-document-file { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid #e3ddf6; border-radius:13px; background:#fff; }
.patient-document-file-icon { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:10px; color:var(--purple); background:#f1ecff; }
.patient-document-file > div:nth-child(2) { display:grid; gap:3px; min-width:0; flex:1; }
.patient-document-file strong { color:var(--ink); font:800 11px Manrope; }
.patient-document-file small { color:var(--muted); font-size:9px; }
.document-download-button { display:flex; align-items:center; gap:5px; padding:8px 9px; border:1px solid #d9d0fb; border-radius:9px; color:var(--purple-dark); background:#faf8ff; font:800 10px Manrope; cursor:pointer; white-space:nowrap; }
.document-download-button svg { width:13px; height:13px; }
.patient-document-error, .patient-document-loading { display:grid; justify-items:center; gap:12px; text-align:center; }
.patient-document-error h1, .patient-document-loading h1 { margin:0; color:var(--ink); font:800 22px Manrope; }
.patient-document-error p, .patient-document-loading p { max-width:440px; margin:0; color:var(--ink-soft); font-size:13px; line-height:1.55; }
.patient-document-error small { color:var(--muted); font-size:11px; }
.patient-document-error-icon { display:grid; place-items:center; width:56px; height:56px; border-radius:50%; color:#fff; background:linear-gradient(135deg,#e56b7a,#b52d4b); font:800 25px Manrope; }
.document-package-spinner { display:block; width:42px; height:42px; border:4px solid #e6ddff; border-top-color:var(--purple); border-radius:50%; animation:spin .8s linear infinite; }
.patient-document-empty { padding:14px; border-radius:11px; color:var(--muted); background:#faf8ff; font-size:11px; text-align:center; }
.pdf-analyzer { margin-top:20px; }
.pdf-dropzone { position:relative; min-height:92px; display:flex; align-items:center; gap:13px; padding:15px 17px; border:1px dashed #bca8f4; border-radius:14px; color:var(--ink); background:linear-gradient(135deg,#fbf9ff,#f5f0ff); cursor:pointer; transition:border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.pdf-dropzone:hover, .pdf-dropzone.is-dragging { border-color:#7b4df2; background:linear-gradient(135deg,#f7f1ff,#eee8ff); box-shadow:0 8px 22px rgba(107,72,220,.1); }
.pdf-dropzone.is-busy { cursor:progress; opacity:.65; pointer-events:none; }
.neuropsi-status { display:flex; align-items:center; gap:14px; margin-top:16px; padding:16px 18px; border-radius:16px; background:var(--notice-bg); border:1px solid var(--notice-border); }
.neuropsi-status strong { display:block; color:var(--ink); font:800 13px Manrope; }
.neuropsi-status p { margin:2px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.5; }
.neuropsi-status > svg { flex:none; width:24px; height:24px; color:var(--red); }
.neuropsi-status.is-error { border-color:rgba(241,69,98,.35); }
/* Análise neuropsicológica: tons por nível (classificação, status do tópico, sustentação do diagnóstico). */
.tone-good { --tone:#12b28a; --tone-ink:#0a7a5e; --tone-bg:rgba(18,178,138,.11); }
.tone-warn { --tone:#ec9d15; --tone-ink:#935c00; --tone-bg:rgba(236,157,21,.13); }
.tone-risk { --tone:#f07a2a; --tone-ink:#ad4708; --tone-bg:rgba(240,122,42,.13); }
.tone-bad { --tone:#f14562; --tone-ink:#c21f3f; --tone-bg:rgba(241,69,98,.11); }
.tone-neutral { --tone:#743cff; --tone-ink:#4a25d7; --tone-bg:rgba(116,60,255,.09); }
html[data-theme="dark"] .tone-good { --tone-ink:#5fe0bd; --tone-bg:rgba(18,178,138,.18); }
html[data-theme="dark"] .tone-warn { --tone-ink:#ffc966; --tone-bg:rgba(236,157,21,.2); }
html[data-theme="dark"] .tone-risk { --tone-ink:#ffa76b; --tone-bg:rgba(240,122,42,.2); }
html[data-theme="dark"] .tone-bad { --tone-ink:#ff8aa0; --tone-bg:rgba(241,69,98,.2); }
html[data-theme="dark"] .tone-neutral { --tone-ink:#c4b0ff; --tone-bg:rgba(116,60,255,.2); }
/* Escala de letra da aba (pedido do usuário, 15/10/2026): classificação 24px, títulos dos cartões 14px, todo texto de leitura 13px e
   rótulos pequenos (selos, contagem, autoria) 11px. */
.neuropsi-analysis { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; margin-top:18px; }
.neuropsi-analysis.warning { padding:17px; border:1px solid var(--line); border-radius:14px; color:var(--ink-soft); background:var(--panel-solid); }
.neuropsi-analysis-heading { display:flex; align-items:center; gap:10px; padding:12px 16px; border-radius:14px; background:var(--lavender); color:var(--purple-dark); }
.neuropsi-analysis-heading > svg { width:20px; height:20px; flex:none; }
.neuropsi-analysis-heading > div { display:grid; gap:3px; min-width:0; }
.neuropsi-analysis-heading strong { color:var(--ink); font:800 13px Manrope; }
.neuropsi-analysis-heading small { color:var(--ink-soft); font-size:11px; }
.neuropsi-analysis-heading > span { margin-left:auto; padding:6px 10px; border-radius:99px; color:var(--purple-dark); background:var(--lavender-strong); font-size:11px; font-weight:700; white-space:nowrap; }
html[data-theme="dark"] .neuropsi-analysis-heading > span { color:#d7c9ff; }
.neuropsi-verdict { display:flex; align-items:flex-start; gap:16px; padding:20px 22px; border:1px solid var(--line); border-radius:16px; background:var(--panel-solid); }
.neuropsi-verdict-icon { display:grid; place-items:center; flex:none; width:44px; height:44px; border-radius:50%; color:var(--tone-ink); background:var(--tone-bg); }
.neuropsi-verdict-icon svg { width:26px; height:26px; }
.neuropsi-verdict-body { display:grid; gap:4px; min-width:0; }
.neuropsi-verdict-body small { color:var(--ink-soft); font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.neuropsi-verdict-body strong { color:var(--ink); font:800 24px/1.15 Manrope; overflow-wrap:anywhere; }
.neuropsi-verdict-body p { margin:2px 0 0; color:var(--ink); font-size:13px; line-height:1.5; }
.neuropsi-tally { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.neuropsi-chip { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:99px; color:var(--tone-ink); background:var(--tone-bg); font-size:11px; font-weight:700; white-space:nowrap; }
.neuropsi-chip svg { width:12px; height:12px; }
.neuropsi-sections { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.neuropsi-section { padding:14px 18px 16px; border:1px solid var(--line); border-radius:14px; background:var(--panel-solid); }
.neuropsi-section header { display:flex; align-items:center; gap:10px; }
.neuropsi-section-icon { display:grid; place-items:center; flex:none; width:30px; height:30px; border-radius:9px; color:var(--purple); background:var(--lavender); }
.neuropsi-section-icon svg { width:17px; height:17px; }
.neuropsi-section h3 { flex:1 1 auto; min-width:0; margin:0; color:var(--ink); font:800 14px Manrope; }
.neuropsi-section header .neuropsi-chip { margin-left:auto; }
.neuropsi-section p { margin:10px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.6; }
.neuropsi-block { padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:var(--panel-solid); }
.neuropsi-block h3 { display:flex; align-items:center; gap:8px; margin:0; color:var(--ink); font:800 14px Manrope; }
.neuropsi-block h3 svg { width:17px; height:17px; color:var(--purple); }
.neuropsi-block > p { margin:8px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.6; }
.neuropsi-diagnoses { display:grid; gap:8px; margin-top:10px; }
/* Diagnósticos propostos em destaque (pedido do usuário, 15/10/2026): o bloco inteiro fica roxo, sem cartão branco por dentro. */
.neuropsi-diagnoses-block { border-color:#a98cff; background:linear-gradient(135deg,#f1e9ff,#e2d5ff); box-shadow:0 8px 22px rgba(107,72,220,.14); }
.neuropsi-diagnoses-block h3 { color:var(--purple-dark); }
.neuropsi-diagnoses-block h3 svg { box-sizing:content-box; padding:6px; border-radius:9px; color:#fff; background:var(--purple); }
.neuropsi-diagnoses-block .neuropsi-diagnoses { gap:0; }
.neuropsi-diagnoses-block .neuropsi-diagnosis { padding:12px 0 0; border:0; border-radius:0; background:transparent; }
.neuropsi-diagnoses-block .neuropsi-diagnosis + .neuropsi-diagnosis { margin-top:12px; border-top:1px solid #c9b6ff; }
.neuropsi-diagnoses-block .neuropsi-diagnosis strong { font-size:14px; }
html[data-theme="dark"] .neuropsi-diagnoses-block { border-color:rgba(160,130,255,.5); background:linear-gradient(135deg,#2f2766,#251f55); box-shadow:none; }
html[data-theme="dark"] .neuropsi-diagnoses-block h3 { color:#d7c9ff; }
html[data-theme="dark"] .neuropsi-diagnoses-block .neuropsi-diagnosis + .neuropsi-diagnosis { border-top-color:rgba(176,183,240,.25); }
.neuropsi-diagnosis { padding:11px 14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.neuropsi-diagnosis > div { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.neuropsi-diagnosis strong { color:var(--ink); font:800 13px Manrope; }
.neuropsi-diagnosis p { margin:6px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.6; }
.neuropsi-opinion-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.neuropsi-opinion-head small { color:var(--muted); font-size:11px; }
.neuropsi-opinion-hint { margin:6px 0 0; color:var(--ink-soft); font-size:13px; }
.neuropsi-opinion-text { display:block; box-sizing:border-box; width:100%; min-height:96px; margin-top:10px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; resize:none; overflow:hidden; outline:0; color:var(--ink); background:var(--panel); font-family:inherit; font-size:13px; line-height:1.6; }
.neuropsi-opinion-text:not([readonly]) { border-color:#c9b8ff; background:var(--panel-solid); }
.neuropsi-opinion-text:not([readonly]):focus { border-color:var(--purple); box-shadow:0 0 0 3px rgba(116,60,255,.14); }
.neuropsi-attach { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:10px; }
.neuropsi-attach small { flex:1 1 220px; color:var(--ink-soft); font-size:13px; line-height:1.5; }
.neuropsi-attach.is-attached { color:var(--purple-dark); font-size:13px; font-weight:700; }
.neuropsi-attached { margin-top:14px; padding:14px 16px; border:1px solid #d9cdf8; border-radius:14px; background:#fbf9ff; }
.neuropsi-attached h3 { display:flex; align-items:center; gap:6px; margin:0 0 8px; font:700 13px Manrope; color:var(--purple-dark); }
.neuropsi-attached article + article { margin-top:10px; padding-top:10px; border-top:1px solid #ebe2ff; }
.neuropsi-attached small { color:var(--ink-soft); font-size:11px; }
.neuropsi-attached p { margin:4px 0 0; font-size:13px; line-height:1.6; white-space:pre-wrap; }
.pdf-file-input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.pdf-dropzone-icon { width:40px; height:40px; display:grid; place-items:center; flex:none; border-radius:12px; color:#7b45ee; background:#ebe2ff; }
.pdf-dropzone-icon svg { width:21px; height:21px; }
.pdf-dropzone span:not(.pdf-dropzone-icon) { display:grid; gap:4px; min-width:0; }
.pdf-dropzone strong { font:700 13px Manrope; }
.pdf-dropzone small { color:var(--ink-soft); font-size:11px; line-height:1.4; }
.pdf-dropzone em { margin-left:auto; padding:8px 11px; border:1px solid #d9cdf8; border-radius:9px; color:var(--purple-dark); background:#fff; font-style:normal; font-size:11px; white-space:nowrap; }
.pdf-file-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; padding:10px 12px; border:1px solid var(--line); border-radius:11px; background:var(--panel-solid); }
.pdf-file-meta > div { display:flex; align-items:center; gap:9px; min-width:0; color:var(--purple); }
.pdf-file-meta > div > svg { width:18px; height:18px; flex:none; }
.pdf-file-meta div div { display:grid; gap:3px; min-width:0; }
.pdf-file-meta strong { overflow:hidden; color:var(--ink); font:700 13px Manrope; text-overflow:ellipsis; white-space:nowrap; }
.pdf-file-meta small { color:var(--ink-soft); font-size:11px; }
.neuropsi-transcript-action { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; padding:11px 13px; border:1px solid #e3ddf7; border-radius:10px; color:var(--ink-soft); font-size:13px; }
.neuropsi-transcript-action span { display:flex; align-items:center; gap:7px; }
.neuropsi-transcript-action svg { width:14px; height:14px; color:var(--purple); }
.neuropsi-transcript-action .button { flex:none; }
.record-output { margin-top:20px; border:1px solid #e1daf8; border-radius:13px; overflow:hidden; background:#fff; }
.record-output-heading { display:grid; gap:4px; padding:12px 14px; background:#f5f1ff; }
.record-output-heading span { display:flex; align-items:center; gap:7px; color:var(--purple-dark); font:700 12px Manrope; }
.record-output-heading span svg { width:16px; height:16px; }
.record-output-heading small { color:var(--muted); font-size:10px; }
.record-output textarea { display:block; width:100%; min-height:150px; padding:15px; border:0; resize:vertical; outline:0; color:var(--ink-soft); background:#fff; font:500 12px/1.6 Manrope; }
.prescription-ai-status { display:flex; align-items:center; gap:11px; margin:14px 0 18px; padding:13px 14px; border:1px solid #e3dcfb; border-radius:12px; background:#faf8ff; }
.prescription-ai-status > svg { flex:none; width:18px; height:18px; color:var(--purple); }
.prescription-ai-status > div { display:grid; gap:3px; flex:1; }
.prescription-ai-status strong { color:var(--ink); font-size:12px; }
.prescription-ai-status span { color:var(--ink-soft); font-size:10px; line-height:1.45; }
.prescription-ai-status.is-warning { border-color:#f0d8b1; background:#fffaf2; }
.prescription-ai-status.is-warning > svg { color:#a46a22; }
.prescription-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0 10px; }
.prescription-editor-heading div { display:grid; gap:3px; }
.prescription-editor-heading strong { color:var(--ink); font:800 13px Manrope; }
.prescription-editor-heading span { color:var(--muted); font-size:10px; }
.prescription-rows { display:grid; gap:12px; }
.prescription-row { padding:14px; border:1px solid #e4def9; border-radius:12px; background:linear-gradient(145deg,#fff,#fbfaff); }
.prescription-row-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:11px; }
.prescription-row-heading strong { color:var(--purple-dark); font:800 12px Manrope; }
.prescription-row-heading .icon-button { width:28px; height:28px; color:#a15b70; }
.prescription-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.prescription-fields label { display:grid; gap:5px; color:var(--ink-soft); font-size:10px; }
.prescription-fields label.full { grid-column:1 / -1; }
.prescription-fields input, .prescription-fields textarea { width:100%; padding:9px 10px; border:1px solid #ded8f3; border-radius:9px; color:var(--ink); background:#fff; font:500 11px/1.4 Manrope; outline:0; }
.prescription-fields input:focus, .prescription-fields textarea:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.prescription-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:15px; }
.prescription-name-mode-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; margin:0 0 17px; padding:14px 15px; border:1px solid #e1daf8; border-radius:13px; background:linear-gradient(135deg,#fbf9ff,#f5f1ff); }
.prescription-name-mode-copy { display:grid; gap:4px; }
.prescription-name-mode-copy strong { color:var(--ink); font:800 12px Manrope; }
.prescription-name-mode-copy span { color:var(--ink-soft); font-size:10px; line-height:1.4; }
.prescription-name-mode-toggle { display:flex; align-items:center; gap:9px; color:var(--ink-soft); font-size:10px; white-space:nowrap; cursor:pointer; }
.prescription-name-mode-toggle strong { color:var(--purple-dark); font-size:10px; }
.prescription-name-mode-toggle input { position:absolute; opacity:0; pointer-events:none; }
.prescription-name-mode-toggle i { position:relative; width:42px; height:24px; flex:none; border:1px solid #cfc6f2; border-radius:999px; background:#ded9ee; transition:.2s ease; }
.prescription-name-mode-toggle i::after { content:''; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(42,30,112,.2); transition:.2s ease; }
.prescription-name-mode-toggle input:checked + i { border-color:#895cff; background:linear-gradient(90deg,#a26bff,#6749eb); }
.prescription-name-mode-toggle input:checked + i::after { transform:translateX(18px); }
.prescription-name-mode-toggle input:focus-visible + i { outline:2px solid var(--purple); outline-offset:3px; }
.prescription-name-mode-card .settings-hint { grid-column:1 / -1; margin-top:0; }
.prescription-name-preview { display:grid; gap:4px; align-content:center; min-height:58px; padding:9px 11px; border:1px solid #ded8f3; border-radius:9px; background:#f8f6ff; }
.prescription-name-preview span { color:var(--muted); font-size:9px; }
.prescription-name-preview strong { overflow:hidden; color:var(--purple-dark); font:800 11px Manrope; text-overflow:ellipsis; white-space:nowrap; }
.signature-output-actions, .signature-output-status { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 14px; border-top:1px solid #e8e2f7; color:var(--muted); font-size:10px; line-height:1.4; }
.signature-output-actions > span { display:flex; align-items:center; gap:6px; }
.signature-output-actions svg, .signature-output-status > svg { width:15px; height:15px; flex:none; color:var(--purple); }
.signature-output-status { color:#168b78; background:#edf9f5; }
.signature-output-status.is-loading { color:var(--purple-dark); background:#faf8ff; }
.signature-output-status button { margin-left:auto; }
.record-empty { display:grid; place-items:center; min-height:180px; padding:24px; text-align:center; color:var(--ink-soft); font-size:12px; }
.record-timeline { position:relative; display:grid; gap:16px; padding:22px 0 4px 23px; }
.record-timeline::before { content:''; position:absolute; top:26px; bottom:16px; left:5px; width:1px; background:#ddd5f7; }
.timeline-item { position:relative; }
.timeline-item-clickable { cursor:pointer; }
.timeline-item-clickable:hover .timeline-content { border-color:#bca7ff; box-shadow:0 12px 26px rgba(108,78,218,.12); transform:translateY(-1px); }
.timeline-item-clickable:focus-visible { outline:2px solid var(--purple); outline-offset:4px; border-radius:14px; }
.timeline-dot { position:absolute; top:17px; left:-23px; width:11px; height:11px; border:3px solid #fff; border-radius:50%; background:linear-gradient(135deg,#b46cff,#6257ed); box-shadow:0 0 0 1px #cfc4f5; }
.timeline-content { padding:14px 16px; border:1px solid #e3ddf6; border-radius:13px; background:linear-gradient(135deg,#fff,#fbfaff); transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.timeline-item.current .timeline-content { border-color:#bca7ff; box-shadow:0 7px 22px rgba(108,78,218,.08); }
.timeline-head { display:flex; justify-content:space-between; gap:10px; color:var(--ink); }
.timeline-head strong { font:700 12px Manrope; }
.timeline-head span { color:var(--ink-soft); font-size:10px; }
.timeline-content p { margin:9px 0; color:var(--ink-soft); font-size:12px; line-height:1.55; }
.timeline-meta { display:flex; flex-wrap:wrap; gap:7px 14px; color:var(--purple-dark); font-size:10px; }
.timeline-open-hint { display:block; margin-top:9px; color:var(--purple-dark); font:700 10px Manrope; }
.transcribe-card { min-height:405px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; position:relative; overflow:hidden; padding:35px; }
.transcribe-card::before, .transcribe-card::after { content:''; position:absolute; width:56%; height:88px; border-top:2px solid rgba(151,121,255,.1); border-radius:50%; transform:rotate(-12deg); top:31px; left:-4%; }
.transcribe-card::after { top:45px; left:55%; transform:rotate(13deg); }
.mic-disc { width:76px; height:76px; border-radius:50%; display:grid; place-items:center; color:#7943f5; background:linear-gradient(145deg,#f3edff,#e9e0ff); position:relative; z-index:1; }
.mic-disc svg { width:34px; height:34px; }
.transcribe-card h2 { font:800 24px Manrope; letter-spacing:-.8px; margin:18px 0 6px; position:relative; z-index:1; }
.transcribe-card > p { color:var(--ink-soft); margin:0; font-size:14px; line-height:1.6; position:relative; z-index:1; }
.transcribe-card .button { margin-top:18px; min-width:260px; min-height:51px; font-size:15px; position:relative; z-index:1; }
.transcribe-card .transcription-cta { isolation:isolate; overflow:visible; color:#fff !important; border:1px solid rgba(255,255,255,.34) !important; background:linear-gradient(100deg,#c04df5 0%,#7959ff 48%,#389ff7 100%) !important; box-shadow:0 8px 22px rgba(117,64,235,.28); }
.transcribe-card .transcription-cta::after { content:''; position:absolute; inset:-9px; z-index:-1; border-radius:inherit; background:linear-gradient(100deg,rgba(192,77,245,.82),rgba(121,89,255,.78),rgba(56,159,247,.82)); filter:blur(13px); opacity:.38; transform:none; animation:transcription-cta-halo 2.6s ease-in-out infinite; pointer-events:none; }
.transcribe-card .transcription-cta:hover { filter:brightness(1.08); }
@keyframes transcription-cta-halo { 0%,100% { opacity:.3; filter:blur(12px); } 50% { opacity:.72; filter:blur(18px); } }
html[data-theme="dark"] .transcribe-card .transcription-cta { color:#fff !important; background:linear-gradient(100deg,#b94cf2 0%,#7057ff 48%,#329cf2 100%) !important; border-color:rgba(255,255,255,.38) !important; }
@media (prefers-reduced-motion: reduce) { .transcribe-card .transcription-cta, .transcribe-card .transcription-cta::after { animation:none; } }
.feature-cards { width:100%; display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:20px; position:relative; z-index:1; }
.feature-card { border:1px solid rgba(119,95,228,.14); border-radius:10px; padding:14px; text-align:left; display:grid; grid-template-columns:39px 1fr; gap:10px; }
.feature-card .feature-icon { width:39px; height:39px; display:grid; place-items:center; border-radius:50%; background:#f0eaff; color:var(--purple); }
.feature-card strong { font-size:12px; display:block; }
.feature-card span { display:block; color:var(--ink-soft); font-size:11px; line-height:1.45; margin-top:5px; }
.notes-card { margin-top:11px; padding:14px 17px 16px; }
.editor { border:1px solid #d9d8f3; border-radius:10px; overflow:hidden; background:rgba(255,255,255,.53); }
.editor-toolbar { height:42px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:16px; padding:0 16px; color:#5160b9; }
.editor-toolbar button { background:transparent; color:inherit; font-weight:700; }
.editor textarea { width:100%; min-height:100px; resize:vertical; border:0; outline:0; padding:15px 16px; background:transparent; color:var(--ink); font-size:12px; }
.editor textarea::placeholder { color:#7a80c0; }
.save-state { text-align:right; color:#6873ad; font-size:11px; margin:-23px 16px 9px 0; position:relative; pointer-events:none; }
.save-state::before { content:'✓'; color:#0dad9b; font-size:15px; margin-right:7px; }
.save-state-error { color:#c0392b; }
.storage-size-notice { margin:0 24px 12px; padding:10px 14px; border-radius:10px; font-size:14px; line-height:1.4; }
.storage-size-notice[hidden] { display:none; }
.clinic-drawer-notice { margin:0 24px 12px; padding:10px 14px; border-radius:10px; font-size:14px; line-height:1.4; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; justify-content:space-between; background:#eef4ff; border:1px solid #b9cdf5; color:#1d3a6b; }
.clinic-drawer-notice[hidden] { display:none; }
.storage-size-warning { background:#fff7e0; border:1px solid #e6b800; color:#6b5200; }
.storage-size-error { background:#fdecea; border:1px solid #c0392b; color:#8e1b10; font-weight:600; }
.unsaved-conflict-notice { margin:0 24px 12px; padding:10px 14px; border-radius:10px; font-size:14px; line-height:1.5; background:#fdecea; border:1px solid #c0392b; color:#8e1b10; }
.unsaved-conflict-notice[hidden] { display:none; }
.session-expired-notice { position:sticky; top:0; z-index:40; margin:0 24px 12px; padding:10px 14px; border-radius:10px; font-size:14px; line-height:1.5; background:#fdecea; border:1px solid #c0392b; color:#8e1b10; }
.session-expired-notice[hidden] { display:none; }
.consultation-elsewhere-notice { background:#fff7e0; border-color:#e6b800; color:#6b5200; }
.save-state-error::before { content:'⚠'; color:#c0392b; }
.saved-consultation-save-state { margin:10px 0 0; text-align:left; }
.settings-save-state { margin:0 0 4px; font-size:12px; flex:none; white-space:nowrap; }
.record-sidebar { display:flex; flex-direction:column; gap:11px; }
.record-sidebar .card { padding:16px; }
.side-tabs { display:grid; grid-template-columns:repeat(3,1fr) 35px; gap:2px; border-bottom:1px solid var(--line); margin:-2px -3px 16px; }
.side-tabs button { background:transparent; color:var(--ink-soft); padding:10px 2px; font-size:10px; border-bottom:2px solid transparent; }
.side-tabs button.active { color:var(--purple-dark); border-bottom-color:var(--purple); }
.info-section { padding:0 0 14px; border-bottom:1px solid var(--line); margin-bottom:14px; }
.info-section:last-child { border-bottom:0; margin-bottom:0; padding-bottom:0; }
.info-section h3 { margin:0 0 11px; font:700 12px Manrope; }
.info-line { display:flex; gap:9px; align-items:flex-start; color:var(--ink-soft); font-size:11px; margin:9px 0; }
.info-line svg { width:15px; height:15px; color:var(--purple); }
.info-line b { display:block; color:var(--ink); font-weight:500; margin-top:3px; }
.mini-tags { display:flex; flex-wrap:wrap; gap:6px; }
.mini-tags .tag { font-size:10px; }
.alert-box { border-radius:10px; padding:11px; color:#6068ab; background:#f0efff; font-size:10px; line-height:1.5; display:flex; gap:7px; }
.alert-box svg { color:var(--purple); width:15px; }

.live-card { padding:12px 16px 15px; margin-bottom:11px; }
.tabbar button:disabled { opacity:.45; cursor:not-allowed; color:#9692ba; }
.processing-results-card { display:grid; grid-template-columns:64px minmax(0,1fr); align-items:start; gap:18px; padding:28px; margin-bottom:11px; background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(245,240,255,.9)); border:1px solid rgba(126,91,230,.16); }
.processing-results-icon { width:64px; height:64px; display:grid; place-items:center; border-radius:22px; color:#713cff; background:linear-gradient(135deg,#f3e8ff,#e0e7ff); }
.processing-results-icon svg { width:30px; height:30px; }
.processing-results-icon .synthesis-spinner { position:absolute; width:48px; height:48px; border:3px solid rgba(113,60,255,.16); border-top-color:#713cff; border-right-color:#a34dff; border-radius:50%; animation:synthesis-spin .85s linear infinite; }
.processing-results-icon { position:relative; }
.processing-results-icon .synthesis-spinner + svg { position:relative; z-index:1; }
.processing-results-card h2 { margin:4px 0 7px; color:var(--ink); font-size:22px; }
.processing-results-card p { margin:0; color:var(--ink-soft); line-height:1.6; }
.processing-live { display:flex; align-items:center; gap:8px; margin-top:16px; color:#6436d8; font-size:12px; }
.processing-live span:last-child { color:#8a86ae; }
.synthesis-spinner.small { display:inline-block; width:14px; height:14px; border:2px solid rgba(113,60,255,.2); border-top-color:#713cff; border-radius:50%; animation:synthesis-spin .85s linear infinite; }
@keyframes synthesis-spin { to { transform:rotate(360deg); } }
.processing-steps { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.processing-steps span { display:inline-flex; align-items:center; gap:6px; padding:8px 11px; border-radius:999px; color:#74739a; background:#f2f0fb; font-size:12px; }
.processing-steps svg { width:14px; height:14px; }
.processing-steps .complete { color:#168b78; background:#e6f7f1; }
.processing-steps .active { color:#6436d8; background:#eee7ff; }
.processing-steps span:last-child { color:var(--purple-dark); background:#eee7ff; }
.recording-strip { min-height:64px; display:flex; align-items:center; gap:14px; padding:0 13px; border-radius:11px; background:rgba(249,248,255,.7); }
.recording-dot { width:10px; height:10px; border-radius:50%; background:var(--teal); box-shadow:0 0 0 5px #daf5ec; flex:none; }
.recording-text { font-weight:600; white-space:nowrap; font-size:13px; }
.recording-text small { color:var(--purple-dark); font-size:12px; margin-left:8px; }
.timer-readouts { display:flex; align-items:center; gap:8px; flex:none; }
.timer-readout { display:grid; gap:2px; min-width:74px; padding:6px 9px; border:1px solid #ded8f7; border-radius:9px; background:#fff; }
.timer-readout span { color:var(--muted); font-size:9px; font-weight:700; line-height:1; text-transform:uppercase; letter-spacing:.35px; }
.timer-readout strong { color:var(--purple-dark); font:800 12px Manrope; letter-spacing:.35px; }
.timer-readout.recording-readout { border-color:#d7c9ff; background:#f7f3ff; }
.timer-readout.recording-readout strong { color:var(--purple-dark); }
.recording-strip .timer-readout:not(.recording-readout), .footer-timers .timer-readout:not(.recording-readout) { display:none; }
.recording-timer-inline { flex:none; }
.footer-timers { margin-right:auto; }
.capture-mode { flex:none; padding:5px 8px; border-radius:99px; color:#5370a6; background:#edf3ff; font-size:10px; white-space:nowrap; }
.wave { flex:1; height:35px; display:flex; align-items:center; justify-content:center; gap:2px; overflow:hidden; }
.wave i { width:2px; height:var(--h); background:linear-gradient(#a798ff,#6746f4); border-radius:2px; animation:pulse 1.15s ease-in-out infinite alternate; }
.wave i:nth-child(3n){ animation-delay:.2s;}.wave i:nth-child(4n){ animation-delay:.45s;}
@keyframes pulse { from{transform:scaleY(.55);opacity:.46} to{transform:scaleY(1.15);opacity:1} }
.recording-actions { display:flex; gap:8px; }
.round-action { width:45px; height:45px; border:1px solid #dad7f2; border-radius:50%; display:grid; place-items:center; background:#fff; color:var(--purple); }
.round-action:disabled { opacity:.35; cursor:default; }
.round-action.stop { color:#f13f5e; border-color:#ffbdca; background:#fff8f9; }
.live-transcript-card { margin-top:11px; padding:0; overflow:hidden; }
.live-transcript-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 17px; border-bottom:1px solid var(--line); }
.live-transcript-heading div { display:grid; gap:4px; }
.live-transcript-heading strong { color:var(--ink); font:700 13px Manrope; }
.live-transcript-heading span { color:var(--muted); font-size:11px; }
.transcript-status { padding:5px 9px; border-radius:99px; color:#168c78 !important; background:#e7f8f2; font-size:10px !important; }
.transcript-body { min-height:112px; max-height:190px; overflow:auto; padding:15px 17px 17px; color:var(--ink-soft); font-size:13px; line-height:1.6; }
.transcript-body p { margin:0; }
.transcript-body .interim-transcript { color:#8b84ba; font-style:italic; margin-top:7px; }
.live-work { display:grid; grid-template-columns:minmax(0,1fr) 292px; gap:11px; }
.copilot-card { margin-top:11px; }
.copilot-tip { padding:13px; border-radius:10px; background:#f4f1ff; color:var(--ink-soft); font-size:11px; line-height:1.55; display:flex; gap:10px; }
.copilot-tip > svg { flex:none; width:21px; height:21px; color:var(--purple); }
.copilot-tip > div { flex:1; min-width:0; position:relative; z-index:1; }
.copilot-tip strong { display:block; color:var(--purple-dark); margin-bottom:4px; }
.copilot-tip span { display:block; color:var(--ink-soft); }
.insight-bullet-list { margin:0; padding-left:17px; color:var(--ink-soft); }
.insight-bullet-list li { padding-left:2px; font-size:13px; font-weight:700; }
.insight-bullet-list strong, .copilot-message strong { color:var(--ink); font-weight:800; }
.copilot-tip.has-insights { position:relative; box-shadow:0 5px 0 -2px #e8e1ff, 0 10px 0 -4px #f0ebff; }
.copilot-tip:not(.has-insights) { display:none; }
.copilot-tip.has-insights { font-size:13px; line-height:1.6; }
.copilot-tip.has-insights > div > strong { font-size:14px; font-weight:800; }
.copilot-tip.has-insights::before,
.copilot-tip.has-insights::after { content:""; position:absolute; inset:5px 7px -5px; border:1px solid #e8e1ff; border-radius:10px; background:#faf9ff; z-index:0; }
.copilot-tip.has-insights::after { inset:10px 13px -10px; background:#fdfcff; border-color:#f0ebff; z-index:-1; }
.insight-card-nav { display:flex; align-items:center; gap:7px; margin-top:9px; }
.insight-card-nav button { width:23px; height:23px; display:grid; place-items:center; border:1px solid #d9d3ff; border-radius:7px; color:var(--purple-dark); background:#fff; padding:0; }
.insight-card-nav button:disabled { opacity:.35; cursor:default; }
.insight-card-nav button svg { width:13px; height:13px; }
.insight-card-nav small { color:var(--muted); font-size:10px; }
.copilot-chat { display:grid; gap:8px; max-height:none; overflow:visible; margin-top:11px; padding-right:3px; }
.copilot-message { max-width:88%; padding:9px 11px; border-radius:11px; font-size:11px; line-height:1.45; }
.copilot-message span { display:block; margin-bottom:3px; color:var(--purple-dark); font:700 10px Manrope; }
.copilot-message p { margin:0; color:var(--ink-soft); }
.copilot-message.user { justify-self:end; background:#ede9ff; border-bottom-right-radius:4px; }
.copilot-message.assistant { justify-self:start; background:#f6f8ff; border:1px solid #e7e4ff; border-bottom-left-radius:4px; }
.copilot-empty { padding:9px 11px; border:1px dashed #d9d3ff; border-radius:10px; color:var(--muted); font-size:11px; line-height:1.45; }
.suggestions { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.suggestions button { border:1px solid #d9d3ff; color:var(--purple-dark); background:transparent; border-radius:99px; padding:7px 10px; font-size:10px; }
.copilot-input { margin-top:11px; height:43px; border:1px solid #d8d5f4; border-radius:8px; display:flex; align-items:center; gap:8px; padding:0 10px; }
.copilot-input input { border:0; outline:0; flex:1; min-width:0; background:transparent; font-size:11px; }
.copilot-input button { background:transparent; color:var(--purple); }
.record-footer { display:flex; align-items:center; gap:17px; margin-top:11px; }
.record-footer .button.primary { margin-left:auto; min-width:183px; }
.record-footer .timer { color:var(--purple-dark); font-size:12px; }
.ai-summary h2 { font:700 14px Manrope; margin:0; }
.ai-summary h3 { font:700 11px Manrope; margin:17px 0 8px; }
.ai-summary ul { padding-left:16px; margin:0; color:var(--ink-soft); font-size:11px; line-height:1.7; }
.risk-line { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--line); padding-top:13px; margin-top:13px; gap:10px; }
.risk-line strong { color:#139d7b; display:block; font-size:13px; }
.risk-line span { color:var(--ink-soft); font-size:10px; }

.empty-card { text-align:center; min-height:360px; display:grid; place-items:center; }
.empty-card h2 { margin:14px 0 6px; font:700 20px Manrope; }
.empty-card p { color:var(--ink-soft); font-size:13px; max-width:420px; margin:0 auto 18px; line-height:1.6; }
.saved-session-card { display:flex; align-items:center; gap:14px; padding:22px; }
.saved-consultation-card { padding:24px; }
.saved-consultation-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding-bottom:20px; border-bottom:1px solid rgba(115,93,210,.12); }
.saved-consultation-heading h2 { margin:4px 0 6px; color:var(--ink); font:800 22px Manrope; }
.saved-consultation-heading p { margin:0; color:var(--ink-soft); }
.saved-consultation-badge { display:inline-flex; align-items:center; gap:6px; padding:8px 11px; color:#168b78; background:#e6f7f1; border-radius:999px; font-size:12px; white-space:nowrap; }
.saved-consultation-badge svg { width:14px; height:14px; }
.saved-consultation-document { max-height:520px; overflow:auto; padding:22px 4px 10px 0; scrollbar-width:thin; scrollbar-color:#8d72f4 rgba(229,224,255,.62); }
.saved-consultation-document h3 { margin:0 0 6px; color:var(--ink); font:800 15px Manrope; }
.saved-consultation-document p { margin:0 0 20px; color:#4c4c84; font-size:14px; line-height:1.65; }
.saved-consultation-notes { margin-top:18px; padding-top:18px; border-top:1px solid rgba(115,93,210,.12); }
.saved-consultation-notes h3 { margin:0 0 7px; color:var(--ink); font:800 14px Manrope; }
.saved-consultation-notes p { margin:0; color:var(--ink-soft); font-size:14px; line-height:1.65; }
.saved-consultation-note { display:flex; align-items:center; gap:8px; margin-top:12px; padding:12px 14px; color:#69659d; background:#f3f0ff; border-radius:12px; font-size:12px; }
.saved-consultation-note svg { flex:none; width:18px; height:18px; color:#7545e8; }
.saved-consultation-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px; padding-top:16px; border-top:1px solid rgba(115,93,210,.12); }
.saved-consultation-actions span { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; line-height:1.45; }
.saved-consultation-actions span svg { flex:none; width:17px; height:17px; color:var(--purple); }
.saved-session-icon { width:46px; height:46px; display:grid; place-items:center; flex:none; border-radius:15px; color:var(--purple); background:linear-gradient(145deg,#f2e9ff,#e4e4ff); }
.saved-session-icon svg { width:23px; height:23px; }
.saved-session-card h2 { margin:0 0 5px; font:800 16px Manrope; }
.saved-session-card p { margin:0; color:var(--ink-soft); font-size:12px; }
.saved-session-actions { display:flex; gap:9px; margin-left:auto; }
.waiting-start { justify-self:end; gap:6px; margin-right:14px; color:var(--purple-dark); border-color:#d8cff9; background:#f8f5ff; white-space:nowrap; }
.waiting-start:hover { color:#fff; border-color:transparent; background:linear-gradient(135deg,#a855f7,#5b5ce2); }
.waiting-start svg { width:15px; height:15px; }
.consultation-started-card { display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:15px; padding:24px; }
.started-consultation-icon { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; color:#fff; background:linear-gradient(145deg,#a855f7,#5b5ce2); box-shadow:0 8px 22px rgba(91,75,220,.22); }
.started-consultation-icon svg { width:25px; height:25px; }
.started-consultation-copy { min-width:0; }
.started-eyebrow { color:var(--purple); font-size:11px; font-weight:700; }
.consultation-ready-card > .started-eyebrow { margin-bottom:18px; }
.started-consultation-copy h2 { margin:4px 0; color:var(--ink); font:800 18px Manrope; }
.started-consultation-copy p { margin:0; color:var(--ink-soft); font-size:12px; line-height:1.45; }
.consultation-timer { display:grid; gap:4px; min-width:108px; padding:9px 13px; border:1px solid #d8cff9; border-radius:11px; color:var(--purple-dark); background:#f5f1ff; }
.consultation-timer span { color:var(--muted); font-size:9px; font-weight:700; line-height:1; text-transform:uppercase; letter-spacing:.35px; }
.consultation-timer strong { font:800 17px Manrope; letter-spacing:.4px; }
.consultation-started-card > .button { grid-column:2 / -1; justify-self:end; }
.settings-layout { display:grid; grid-template-columns:1fr; gap:14px; align-items:start; }
/* Ordem das Configurações (pedido do usuário, 17/10/2026), em grupos com título: a agenda e o atendimento (como a agenda
   funciona, depois quem fala com o paciente, convênios e o registro da agenda) -> documentos clínicos -> clínica e equipe ->
   conta e privacidade. O formulário some do layout (display:contents) para os boxes de dentro e de fora dele seguirem uma ordem só. */
.settings-page { display:grid; grid-template-columns:1fr; gap:14px; align-items:start; }
.settings-page > .settings-layout { display:contents; }
.settings-page > .settings-card, .settings-page > .settings-layout > .card { margin-top:0; }
.settings-group-title { margin:10px 0 -4px; color:var(--muted); font:800 11px Manrope,'DM Sans',system-ui,sans-serif; letter-spacing:.6px; text-transform:uppercase; }
.settings-group-agenda { order:10; margin-top:0; }
.settings-layout > .settings-duration-card { order:11; }
.settings-layout > .settings-main { order:12; }
.settings-layout > .settings-days { order:13; }
.settings-layout > .settings-preview { order:14; }
.settings-page > .reminders-settings-card { order:15; }
.settings-page > .patricia-settings-card { order:16; }
.settings-page > .insurance-settings-card { order:17; }
.settings-page > .agenda-audit-card { order:18; }
.settings-group-documents { order:20; }
.settings-layout > .medication-preferences-card { order:21; }
.settings-layout > .signature-settings-card { order:22; }
.settings-page > .layout-editor-summary-card { order:23; }
.settings-group-clinic { order:30; }
.settings-page > .clinic-team-settings-card { order:31; }
.settings-group-account { order:40; }
.settings-layout > .privacy-settings-card { order:41; }
.settings-layout > .appearance-settings-card { order:42; }
.settings-card, .settings-preview { padding:20px; }
/* .card usa backdrop-filter, que cria um contexto de empilhamento próprio — o z-index do painel do seletor
   (.csel-panel) só vale DENTRO desse contexto, então um card mais abaixo no HTML (sem z-index nenhum) ainda
   pinta por cima dele. Sem isso, abrir "Aparência" mostrava o painel nascendo escondido atrás do card de
   "Duração das consultas" logo abaixo — parecia estar fechando sozinho. */
.settings-card { position:relative; }
.settings-card:has(.csel-panel:not([hidden])) { z-index:50; }
.settings-card-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:20px; }
.settings-card-heading h2 { margin:1px 0 5px; font:700 16px Manrope; color:var(--ink); }
.settings-card-heading p { margin:0; color:var(--ink-soft); font-size:12px; line-height:1.45; }
.settings-icon { width:40px; height:40px; border-radius:13px; flex:none; display:grid; place-items:center; color:var(--purple); background:linear-gradient(145deg,#faf8ff,#e9e2ff); }
.settings-icon svg { width:21px; height:21px; }
.settings-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.setting-field { display:grid; gap:7px; color:var(--ink-soft); font-size:11px; }
.settings-card .setting-field.full { grid-column:1 / -1; }
.setting-field input, .setting-field select { width:100%; height:40px; border:1px solid #d8d4f0; border-radius:9px; padding:0 11px; outline:0; background-color:rgba(255,255,255,.78); color:var(--ink); font-size:13px; }
.setting-field input:focus, .setting-field select:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.setting-field select { appearance:none; -webkit-appearance:none; -moz-appearance:none; padding-right:36px; cursor:pointer; background-repeat:no-repeat; background-position:right 12px center; background-size:16px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23743cff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.setting-field select:disabled { cursor:not-allowed; opacity:.65; }
html[data-theme="dark"] .setting-field select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23743cff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
/* Seletor personalizado (csel): substitui o <select> nativo por um gatilho + painel no estilo do seletor de paciente da agenda. */
.csel { position:relative; }
.csel-native { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.csel-trigger { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; height:40px; padding:0 12px; border:1px solid #d8d4f0; border-radius:9px; background:rgba(255,255,255,.78); color:var(--ink); font:700 12.5px Manrope,'DM Sans',system-ui,sans-serif; text-align:left; cursor:pointer; }
.csel-trigger span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.csel-trigger svg { width:15px; height:15px; flex:none; color:var(--purple); transition:transform .18s ease; }
.csel.is-open .csel-trigger svg { transform:rotate(180deg); }
.csel-trigger:hover { border-color:#c5b5ff; }
.csel-trigger:focus-visible, .csel.is-open .csel-trigger { outline:0; border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.csel-trigger:disabled { opacity:.55; cursor:not-allowed; }
.csel-panel { position:absolute; z-index:45; left:0; right:0; top:calc(100% + 7px); display:grid; gap:5px; max-height:250px; overflow:auto; margin:0; padding:7px; border:1px solid #e3ddfa; border-radius:14px; background:#fff; box-shadow:0 20px 45px rgba(38,31,108,.18); }
/* O atributo `hidden` sozinho não vence a regra acima (mesma especificidade, mas o CSS do site sempre
   ganha do estilo padrão do navegador) — sem isso, todo painel de seleção customizado renderiza sempre
   aberto, mesmo antes de qualquer clique. */
.csel-panel[hidden] { display:none; }
.csel-option { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:9px 11px; border:1px solid transparent; border-radius:10px; color:var(--ink); background:#fff; text-align:left; font:600 12px Manrope,'DM Sans',system-ui,sans-serif; }
.csel-option:hover { border-color:#c5b5ff; background:#f2edff; }
.csel-option.selected { border-color:#c5b5ff; background:#eee8ff; color:var(--purple-dark); }
.csel-option svg { width:14px; height:14px; flex:none; color:var(--purple); }
.csel-panel::-webkit-scrollbar { width:8px; }
.csel-panel::-webkit-scrollbar-track { background:transparent; }
.csel-panel::-webkit-scrollbar-thumb { border-radius:99px; background:#c9bdf2; }
html[data-theme="dark"] .csel-trigger { border-color:#4a4f7d; background:#202448; color:var(--ink); }
html[data-theme="dark"] .csel-panel { border-color:#4a4f7d; background:#20244a; box-shadow:0 20px 45px rgba(0,0,0,.4); }
html[data-theme="dark"] .csel-option { background:#20244a; color:var(--ink); }
html[data-theme="dark"] .csel-option:hover { border-color:#5b5399; background:#302b5e; }
html[data-theme="dark"] .csel-option.selected { border-color:#5b5399; background:#392f6e; color:#cabfff; }
/* Roda de horário (wheel): seletor de rolagem no estilo "picker" para os campos de horário. */
.wheel { position:relative; border:1px solid #d8d4f0; border-radius:12px; background:rgba(255,255,255,.78); overflow:hidden; }
.wheel-track { overflow-y:auto; scroll-snap-type:y mandatory; scrollbar-width:none; -ms-overflow-style:none; outline:0; }
.wheel-track:focus-visible { box-shadow:inset 0 0 0 2px var(--purple); }
.wheel-track::-webkit-scrollbar { display:none; }
.wheel-item { height:34px; display:flex; align-items:center; justify-content:center; scroll-snap-align:center; color:var(--muted); font:600 13px Manrope,'DM Sans',system-ui,sans-serif; cursor:pointer; }
.wheel-item.is-selected { color:var(--purple-dark); font:800 15px Manrope,'DM Sans',system-ui,sans-serif; }
.wheel-highlight { position:absolute; left:0; right:0; pointer-events:none; border-top:1px solid #d8c9ff; border-bottom:1px solid #d8c9ff; background:linear-gradient(180deg,rgba(238,232,255,.55),rgba(238,232,255,.25)); }
html[data-theme="dark"] .wheel { border-color:#4a4f7d; background:#202448; }
html[data-theme="dark"] .wheel-item { color:#8e97c0; }
html[data-theme="dark"] .wheel-item.is-selected { color:#cabfff; }
html[data-theme="dark"] .wheel-highlight { border-color:#5b5399; background:linear-gradient(180deg,rgba(57,47,110,.6),rgba(57,47,110,.25)); }
.whatsapp-settings-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:14px; }
.signature-settings-status { display:flex; align-items:flex-start; gap:9px; margin-bottom:16px; }
.signature-settings-status > div { display:grid; gap:3px; }
.signature-settings-status strong { color:var(--ink); font-size:12px; }
.signature-settings-status small { color:var(--muted); font-size:10px; line-height:1.4; }
.signature-settings-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:14px; }
/* Assinatura estilizada (só visual): as mesmas fontes que o PDF usa (assets/fonts/signature, SIGNATURE_STYLES). */
@font-face { font-family:'iPsiquiatra Assinatura Rapida'; src:url('/assets/fonts/signature/HerrVonMuellerhoff-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:'iPsiquiatra Assinatura Leve'; src:url('/assets/fonts/signature/Allura-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:'iPsiquiatra Assinatura Continuo'; src:url('/assets/fonts/signature/Sacramento-Regular.ttf') format('truetype'); font-display:swap; }
@font-face { font-family:'iPsiquiatra Assinatura Manuscrita'; src:url('/assets/fonts/signature/MrsSaintDelafield-Regular.ttf') format('truetype'); font-display:swap; }
.signature-style-picker { display:grid; gap:10px; margin-top:18px; padding-top:16px; border-top:1px solid #ece7f9; }
.signature-style-heading { display:grid; gap:3px; }
.signature-style-heading strong { color:var(--ink); font-size:12px; }
.signature-style-heading small { color:var(--muted); font-size:10px; line-height:1.4; }
.signature-style-options { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:9px; }
.signature-style-option { display:grid; gap:6px; justify-items:center; min-height:86px; padding:12px 10px 9px; border:1px solid #e1dcf5; border-radius:12px; background:rgba(255,255,255,.8); color:var(--ink); cursor:pointer; text-align:center; }
.signature-style-option:hover { border-color:#cabfff; }
.signature-style-option.active { border-color:var(--purple); box-shadow:0 0 0 2px rgba(116,60,255,.18); }
.signature-style-option small { color:var(--muted); font-size:10px; }
.signature-style-option.active small { color:var(--purple-dark); font-weight:700; }
.signature-style-sample { display:block; width:100%; padding-bottom:4px; border-bottom:1px solid #b9b5cc; color:#141414; font-size:26px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.signature-style-sample.is-none { align-self:center; border-bottom:none; color:var(--muted); font:500 11px 'DM Sans', system-ui, sans-serif; white-space:normal; }
.signature-style-sample.style-rapida { font-family:'iPsiquiatra Assinatura Rapida', cursive; }
.signature-style-sample.style-leve { font-family:'iPsiquiatra Assinatura Leve', cursive; }
.signature-style-sample.style-continuo { font-family:'iPsiquiatra Assinatura Continuo', cursive; }
.signature-style-sample.style-manuscrita { font-family:'iPsiquiatra Assinatura Manuscrita', cursive; }
html[data-theme="dark"] .signature-style-option { border-color:#4a4f7d; background:#202448; }
html[data-theme="dark"] .signature-style-sample { color:#f1efff; border-bottom-color:#5b5f8f; }
/* Sessão do certificado digital em nuvem (painel no estilo dos gestores de certificado dos prescritores) */
.signature-session-panel { display:grid; gap:0; border:1px solid #e1dcf5; border-radius:14px; background:rgba(250,249,255,.7); padding:4px 14px; }
.signature-session-row { display:flex; align-items:center; gap:12px; padding:13px 2px; border-bottom:1px solid #ece7f9; }
.signature-session-row:last-of-type { border-bottom:none; }
.signature-session-icon { display:grid; place-items:center; width:38px; height:38px; flex:none; border-radius:12px; background:#f2eefc; color:var(--purple-dark); }
.signature-session-icon svg { width:18px; height:18px; }
.signature-session-info { display:grid; gap:2px; flex:1; min-width:0; }
.signature-session-info strong { color:var(--ink); font-size:12px; }
.signature-session-info small { color:var(--muted); font-size:10px; }
.signature-session-state { flex:none; font:700 11px Manrope; }
.signature-session-state.is-active { color:#15a77d; }
.signature-session-state.is-expired { color:#c22346; }
.signature-session-row .link-button { flex:none; font-size:11px; }
.signature-session-panel .signature-settings-actions { justify-content:flex-end; margin:2px 0 12px; }
.signature-session-panel .settings-hint { margin:0 0 10px; }
/* Modal "Selecione o certificado" */
.certificate-dialog { width:min(560px,92vw); }
.certificate-dialog .profile-modal-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.certificate-dialog .profile-modal-heading p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.certificate-provider-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin:16px 0 14px; }
.certificate-provider-card { position:relative; display:grid; justify-items:center; gap:6px; padding:18px 14px 14px; border:2px solid #e1dcf5; border-radius:16px; background:#fff; cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease; }
.certificate-provider-card:hover { border-color:#c9bdf3; }
.certificate-provider-card.is-selected { border-color:var(--purple); box-shadow:0 6px 18px rgba(103,74,215,.14); background:#faf8ff; }
.certificate-provider-logo { display:grid; place-items:center; min-width:64px; padding:10px 12px; border-radius:12px; font:800 12px Manrope; letter-spacing:.02em; }
.certificate-provider-logo.is-vidaas { color:#fff; background:linear-gradient(135deg,#0f7cc0,#0b5e94); }
.certificate-provider-logo.is-safeid { color:#fff; background:linear-gradient(135deg,#2aa5e0,#1479b8); }
.certificate-provider-card strong { color:var(--ink); font-size:13px; }
.certificate-provider-card small { color:var(--muted); font-size:10px; }
.certificate-provider-badge { margin-top:4px; padding:5px 12px; border-radius:999px; font:700 10px Manrope; color:var(--purple-dark); background:#efeafd; }
.certificate-provider-badge.is-on { color:#fff; background:var(--purple); }
.certificate-cpf-field { margin-top:2px; }
.certificate-authorizing { display:flex; align-items:center; gap:14px; margin:18px 0 6px; padding:14px; border:1px solid #e1dcf5; border-radius:14px; background:rgba(250,249,255,.75); }
.certificate-authorizing strong { display:block; color:var(--ink); font-size:12px; }
.certificate-authorizing p { margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
html[data-theme="dark"] .signature-session-panel, html[data-theme="dark"] .certificate-authorizing { border-color:rgba(196,192,255,.16); background:rgba(25,29,65,.65); }
html[data-theme="dark"] .signature-session-row { border-color:rgba(196,192,255,.12); }
html[data-theme="dark"] .signature-session-icon { background:rgba(103,74,215,.24); color:#cfc4ff; }
html[data-theme="dark"] .certificate-provider-card { border-color:rgba(196,192,255,.18); background:rgba(25,29,65,.72); }
html[data-theme="dark"] .certificate-provider-card.is-selected { border-color:#a48dff; background:rgba(103,74,215,.2); }
html[data-theme="dark"] .certificate-provider-badge { color:#cfc4ff; background:rgba(103,74,215,.28); }
.settings-hint { display:block; margin-top:10px; color:var(--muted); font-size:10px; line-height:1.45; }
.settings-hint-error { color:#c22346; font-weight:700; }
.medication-preference-list { display:grid; gap:10px; margin-top:14px; }
.medication-preference-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:10px; align-items:end; padding:12px; border:1px solid #e1dcf5; border-radius:12px; background:rgba(250,249,255,.78); }
.medication-preference-row label { display:grid; gap:6px; color:var(--ink-soft); font-size:10px; }
.medication-preference-row input { width:100%; height:38px; padding:0 10px; border:1px solid #d8d4f0; border-radius:9px; outline:0; background:rgba(255,255,255,.8); color:var(--ink); font-size:12px; }
.medication-preference-row input:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.medication-preference-row-actions { display:flex; align-items:center; gap:8px; grid-column:1 / -1; }
.medication-preference-row-actions .button { min-height:31px; }
.medication-preference-row-actions .button svg { width:14px; height:14px; }
.medication-preference-row-actions .icon-button { width:30px; height:30px; margin-left:auto; color:#a15b70; }
.medication-preference-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:10px; }
.medication-catalog-modal { width:min(760px,100%); height:min(760px,calc(100vh - 48px)); max-height:calc(100vh - 48px); overflow:hidden; display:flex; flex-direction:column; }
.medication-catalog-modal > * { flex-shrink:0; }
.medication-catalog-note { margin:17px 0 15px; padding:11px 12px; border:1px solid #e1daf7; border-radius:11px; color:var(--ink-soft); background:#faf8ff; font-size:10px; line-height:1.45; }
.medication-catalog-search { display:grid; gap:6px; color:var(--ink-soft); font-size:10px; }
.medication-catalog-search input { width:100%; height:40px; padding:0 11px; border:1px solid #d8d4f0; border-radius:9px; outline:0; color:var(--ink); background:#fff; font-size:12px; }
.medication-catalog-search input:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.medication-catalog-count { margin:10px 0 8px; color:var(--muted); font-size:10px; }
.medication-catalog-list { display:grid; gap:8px; flex:1 1 auto; min-height:0; max-height:none; overflow-y:auto; overflow-x:hidden; padding-right:8px; }
.medication-catalog-item { display:grid; grid-template-columns:minmax(150px,.7fr) minmax(0,1.3fr); gap:12px; align-items:center; padding:11px 12px; border:1px solid #e3ddf6; border-radius:11px; background:rgba(255,255,255,.7); }
.medication-catalog-item[hidden] { display:none; }
.medication-catalog-item-heading { display:grid; gap:3px; }
.medication-catalog-item-heading strong { color:var(--ink); font:800 11px Manrope; }
.medication-catalog-item-heading small { color:var(--muted); font-size:9px; line-height:1.3; }
.medication-catalog-options { display:flex; flex-wrap:wrap; gap:6px; }
.medication-catalog-option { min-height:29px; padding:0 9px; border:1px solid #ddd5f5; border-radius:999px; color:var(--purple-dark); background:#faf8ff; font-size:10px; text-align:left; }
.medication-catalog-option:hover { border-color:#9a7aff; background:#f0eaff; }
.medication-catalog-option.active-option { color:var(--ink-soft); background:#f5f4fb; }
.medication-catalog-option.is-selected { border-color:#7c55ec; color:#fff; background:linear-gradient(135deg,#9d5cff,#5b5ce2); box-shadow:0 4px 10px rgba(101,75,220,.18); }
.day-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.day-setting { display:flex; align-items:center; gap:9px; min-height:40px; padding:0 11px; border:1px solid #e1def5; border-radius:9px; background:rgba(255,255,255,.45); color:var(--ink); font-size:12px; cursor:pointer; }
.day-setting:has(input:checked) { border-color:#bca8ff; background:#f2edff; color:var(--purple-dark); }
.day-setting input { appearance:none; width:17px; height:17px; border:1px solid #aaa8d6; border-radius:5px; background:#fff; position:relative; flex:none; }
.day-setting input:checked { border-color:var(--purple); background:var(--purple); }
.day-setting input:checked::after { content:'✓'; color:#fff; position:absolute; left:3px; top:-1px; font-size:13px; }
.settings-preview { min-height:100%; }
.preview-stat { display:flex; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); color:var(--ink-soft); font-size:11px; }
.preview-stat:last-child { border-bottom:0; }
.preview-stat strong { color:var(--ink); font-size:12px; text-align:right; }
.orientation-types { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.orientation-type { display:inline-flex; align-items:center; min-height:34px; padding:0 12px; border:1px solid #ded8f4; border-radius:999px; background:rgba(255,255,255,.58); color:var(--ink-soft); font-size:11px; }
.orientation-type.active { border-color:#bca8ff; background:#f2edff; color:var(--purple-dark); font-weight:700; }
html[data-theme="dark"] .orientation-type { border-color:#484276; background:rgba(45,40,89,.72); color:#c5c9e8; }
html[data-theme="dark"] .orientation-type.active { border-color:#9582e9; background:#352e70; color:#eeeaff; }

.ambient-panel { position:relative; overflow:hidden; background: linear-gradient(90deg, rgba(237,232,255,.65), rgba(255,247,250,.22)), url('/waiting-room-background.jpg') center/cover no-repeat; border-left:1px solid rgba(255,255,255,.76); }
.ambient-panel::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 55% 46%, rgba(255,255,255,.61), transparent 45%), linear-gradient(180deg,rgba(241,235,255,.45),rgba(215,194,217,.2)); opacity:.52; }
.ambient-letters { position:absolute; z-index:2; top:205px; left:26px; color:#6c65a7; font:500 13px/2.25 Manrope; letter-spacing:2px; transform:rotate(-4deg); opacity:.84; }
.ambient-plant { position:absolute; z-index:1; width:35px; height:170px; border-radius:100% 0 100% 0; border-left:4px solid rgba(94,131,106,.5); background:linear-gradient(135deg,rgba(107,170,135,.38),rgba(202,225,188,.05)); transform:rotate(25deg); right:24px; bottom:216px; }
.ambient-plant-two { width:44px; height:225px; right:7px; bottom:144px; transform:rotate(-20deg); opacity:.75; }
.ambient-plant, .ambient-plant-two, .ambient-table { display:none; }

.search-results { display:none; position:absolute; top:48px; left:0; right:0; z-index:9; background:#fff; border:1px solid var(--line); border-radius:12px; padding:6px; box-shadow:0 16px 35px rgba(44,34,114,.15); }
.search-results.open { display:block; }
.search-result { display:flex; gap:9px; align-items:center; padding:9px; border-radius:8px; text-align:left; background:transparent; width:100%; }
.search-result:hover { background:#f4f0ff; }
.search-result span { color:var(--ink-soft); font-size:11px; display:block; margin-top:2px; }
.toast { position:fixed; right:26px; bottom:22px; z-index:140; background:#161c66; color:#fff; padding:12px 16px; border-radius:10px; box-shadow:0 10px 30px rgba(26,21,90,.24); font-size:12px; opacity:0; transform:translateY(15px); pointer-events:none; transition:.25s ease; }
.toast.show { opacity:1; transform:translateY(0); }

.results-modal-backdrop { position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(37,34,77,.44); backdrop-filter:blur(9px); }
.results-modal { width:min(1350px,calc(100vw - 110px)); max-height:calc(100vh - 70px); overflow:auto; background:linear-gradient(145deg,rgba(255,253,255,.98),rgba(249,248,255,.98)); border:1px solid rgba(255,255,255,.95); border-radius:16px; box-shadow:0 25px 80px rgba(26,26,78,.28); }
.results-header { position:relative; display:flex; justify-content:space-between; overflow:hidden; padding:26px 30px 18px; background:linear-gradient(135deg,#fff8ff,#f5efff 58%,#fbfcff); }
.results-header::after { content:''; position:absolute; width:54%; height:95px; right:4%; top:8px; border-radius:55% 45% 50% 42%; background:linear-gradient(135deg,rgba(201,178,255,.18),rgba(255,255,255,0)); transform:rotate(-9deg); border:1px solid rgba(184,151,255,.16); }
.results-title { position:relative; z-index:1; display:flex; align-items:flex-start; gap:17px; }
.results-sparkle { width:45px; height:45px; display:grid; place-items:center; color:var(--purple); }
.results-sparkle svg { width:34px; height:34px; }
.results-title h1 { margin:0; color:var(--ink); font:800 22px Manrope; letter-spacing:-.7px; }
.results-title p { margin:8px 0 0; color:var(--ink-soft); font-size:13px; }
.results-close { position:relative; z-index:2; align-self:flex-start; background:transparent; color:#56609a; font-size:30px; line-height:1; }
.results-tabs { display:flex; max-width:650px; margin:0 28px; overflow:hidden; border:1px solid var(--line); border-radius:14px 14px 0 0; background:rgba(247,244,255,.75); }
.results-tabs button { min-width:310px; display:flex; align-items:center; gap:12px; padding:15px 22px; background:transparent; color:var(--ink-soft); text-align:left; border-bottom:3px solid transparent; }
.results-tabs button.active { background:#fff; color:var(--ink); border-bottom-color:var(--purple); }
.results-tabs svg { width:25px; height:25px; color:var(--purple); }
.results-tabs span { display:grid; gap:4px; }
.results-tabs strong { font:700 13px Manrope; }
.results-tabs small { color:var(--muted); font-size:11px; }
.results-editor-shell { margin:0 28px; overflow:hidden; border:1px solid var(--line); border-radius:0 14px 14px 14px; background:rgba(255,255,255,.9); }
.results-toolbar { height:56px; display:flex; align-items:center; gap:16px; padding:0 20px; color:#4f579d; border-bottom:1px solid var(--line); }
.results-toolbar button { display:inline-flex; align-items:center; gap:7px; background:transparent; color:inherit; font-size:14px; }
.results-toolbar button svg { width:17px; height:17px; }
.style-select, .results-model, .results-ai { padding:9px 11px; border:1px solid var(--line) !important; border-radius:9px; font-size:12px !important; }
.results-model-anchor { position:relative; margin-left:auto; }
.results-model { margin-left:0; }
.results-template-menu { position:absolute; top:calc(100% + 7px); right:0; z-index:25; min-width:150px; padding:6px; border:1px solid #ddd4ff; border-radius:11px; background:#fff; box-shadow:0 12px 28px rgba(56,42,137,.16); }
.results-template-menu[hidden] { display:none; }
.results-template-menu button { display:flex; width:100%; padding:9px 10px; border-radius:8px; color:var(--ink-soft); text-align:left; font:600 12px Manrope; }
.results-template-menu button:hover, .results-template-menu button.active { color:var(--purple-dark); background:#f2edff; }
.results-ai { color:var(--purple-dark) !important; background:#f0eaff !important; }
.toolbar-divider { width:1px; height:24px; background:var(--line); }
.results-document, .results-transcription { min-height:370px; max-height:470px; overflow:auto; outline:0; padding:20px 26px 28px; color:#4c568f; font-size:15px; line-height:1.45; }
.results-modal, .results-document, .results-transcription { scrollbar-width:thin; scrollbar-color:#8d72f4 rgba(229,224,255,.62); scrollbar-gutter:stable; }
.results-modal::-webkit-scrollbar, .results-document::-webkit-scrollbar, .results-transcription::-webkit-scrollbar { width:11px; height:11px; }
.results-modal::-webkit-scrollbar-track, .results-document::-webkit-scrollbar-track, .results-transcription::-webkit-scrollbar-track { margin:9px 0; border-radius:99px; background:linear-gradient(180deg,rgba(247,244,255,.82),rgba(232,226,255,.62)); }
.results-modal::-webkit-scrollbar-thumb, .results-document::-webkit-scrollbar-thumb, .results-transcription::-webkit-scrollbar-thumb { min-height:58px; border:3px solid transparent; border-radius:99px; background:linear-gradient(180deg,#c084fc 0%,#8b5cf6 48%,#5b5ce2 100%); background-clip:padding-box; box-shadow:inset 0 0 0 1px rgba(255,255,255,.48),0 3px 9px rgba(101,76,211,.22); }
.results-modal::-webkit-scrollbar-thumb:hover, .results-document::-webkit-scrollbar-thumb:hover, .results-transcription::-webkit-scrollbar-thumb:hover { background:linear-gradient(180deg,#d09aff 0%,#986cff 48%,#6265ec 100%); background-clip:padding-box; }
.results-document h3 { margin:0 0 3px; color:var(--ink); font:700 15px Manrope; }
.results-document p { margin:0 0 22px; padding-bottom:18px; border-bottom:1px solid rgba(95,101,188,.1); }
.ai-extraction-note { display:flex; align-items:flex-start; gap:10px; margin:4px 0 18px; padding:11px 13px; border:1px solid #ddd4ff; border-radius:10px; color:var(--purple-dark); background:linear-gradient(135deg,#faf8ff,#f1edff); }
.ai-extraction-note > svg { flex:0 0 auto; width:20px; height:20px; }
.ai-extraction-note > div { display:grid; gap:3px; }
.ai-extraction-note strong { font:700 12px Manrope; }
.ai-extraction-note span { color:var(--muted); font-size:11px; line-height:1.35; }
.results-transcription p { margin:0 0 18px; }
.results-template-status { display:flex; align-items:center; gap:8px; margin:10px 28px 0; font-size:12px; font-weight:600; color:var(--ink-soft); }
.results-template-status.ready { color:var(--purple-dark); }
.results-template-status.fallback { color:#8a5a00; }
.review-banner { display:flex; align-items:center; gap:11px; margin:13px 28px 0; padding:13px 18px; border:1px solid #e3dcff; border-radius:10px; color:var(--purple-dark); background:#f4f1ff; }
.review-banner > svg { width:25px; height:25px; }
.review-banner > div { display:grid; flex:1; gap:4px; }
.review-banner strong { font:700 13px Manrope; }
.review-banner span { color:var(--muted); font-size:11px; }
.review-banner button { display:flex; align-items:center; gap:6px; min-height:37px; padding:0 12px; border:1px solid #d8d0ff; border-radius:9px; color:var(--purple-dark); background:#fff; font-size:11px; }
.review-banner button svg { width:15px; height:15px; }
.results-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:23px 28px 22px; }
.results-footer-left, .results-footer-right { display:flex; align-items:center; gap:12px; }
.results-footer-right { display:flex; gap:12px; }
.results-footer .button svg { width:17px; height:17px; }
.results-audio-bar { display:flex; align-items:center; gap:11px; margin:12px 28px 0; padding:11px 14px; border:1px solid #ded7fb; border-radius:11px; color:var(--purple-dark); background:linear-gradient(135deg,#faf8ff,#f0ecff); }
.results-audio-bar > svg { width:22px; height:22px; }
.results-audio-bar > div { display:grid; flex:1; gap:3px; }
.results-audio-bar strong { font:700 12px Manrope; }
.results-audio-bar span, .results-audio-bar small { color:var(--muted); font-size:10px; }
.results-audio-bar audio { width:min(290px,38%); height:32px; accent-color:var(--purple); }

.agenda-slot { cursor:pointer; border-radius:10px; transition:background .18s ease; }
.agenda-slot:hover { background:rgba(237,232,255,.56); }
.agenda-slot:hover .slot, .agenda-slot:hover .lunch, .agenda-slot:hover .week-slot { filter:saturate(1.08); box-shadow:0 5px 16px rgba(91,76,190,.1); }
.week-slot { transition:.18s ease; }
.agenda-dialog-backdrop { position:fixed; inset:0; z-index:55; display:grid; place-items:center; padding:20px; background:rgba(36,32,82,.43); backdrop-filter:blur(9px); }
.agenda-dialog { width:min(760px,100%); max-height:min(790px,calc(100vh - 40px)); overflow:auto; padding:24px; border:1px solid rgba(255,255,255,.95); border-radius:24px; background:linear-gradient(145deg,rgba(255,253,255,.98),rgba(247,246,255,.98)); box-shadow:0 25px 80px rgba(38,31,108,.3); scrollbar-width:thin; scrollbar-color:#8d72f4 rgba(229,224,255,.62); }
.agenda-dialog::-webkit-scrollbar { width:10px; }
.agenda-dialog::-webkit-scrollbar-track { background:#f0ecff; border-radius:99px; margin:9px 0; }
.agenda-dialog::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:99px; background:linear-gradient(180deg,#c084fc,#765ee8); background-clip:padding-box; }
.agenda-dialog-header { display:flex; align-items:flex-start; gap:13px; position:relative; padding-bottom:21px; border-bottom:1px solid var(--line); }
.dialog-heading-icon { width:42px; height:42px; display:grid; place-items:center; flex:none; color:var(--purple); border-radius:14px; background:linear-gradient(145deg,#f5eaff,#e7e4ff); }
.dialog-heading-icon svg { width:22px; height:22px; }
.agenda-dialog-header h2 { margin:2px 0 5px; color:var(--ink); font:800 19px Manrope; letter-spacing:-.4px; }
.agenda-dialog-header p { margin:0; color:var(--ink-soft); font-size:12px; line-height:1.45; }
.dialog-close { margin-left:auto; width:32px; height:32px; color:#59629b; background:transparent; font-size:27px; line-height:1; }
.agenda-dialog-patient { display:flex; align-items:center; gap:12px; margin:18px 0; padding:14px; border:1px solid #e3ddfa; border-radius:16px; background:linear-gradient(135deg,#fbfaff,#f4f0ff); }
.agenda-dialog-patient > div:nth-child(2) { display:grid; gap:3px; flex:1; }
.agenda-dialog-patient strong { color:var(--ink); font:700 14px Manrope; }
.agenda-dialog-patient span, .agenda-dialog-patient small { color:var(--ink-soft); font-size:11px; }
.agenda-dialog-patient small { margin-top:2px; }
.dialog-status { align-self:flex-start; padding:7px 10px; border-radius:99px; color:var(--purple-dark) !important; background:#e9e1ff; }
.agenda-dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.agenda-dialog-actions .button { min-height:42px; }
.button.danger { color:#d64662; border-color:#f5c8d0; background:#fff8fa; }
.button.danger:hover { background:#fff0f3; }
.agenda-dialog-grid { display:grid; grid-template-columns:minmax(300px,1fr) minmax(220px,.8fr); gap:18px; padding:20px 0; }
.agenda-dialog-calendar { padding:15px; border:1px solid #e3ddfa; border-radius:16px; background:rgba(255,255,255,.62); }
.dialog-calendar-head, .dialog-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dialog-calendar-head { color:var(--ink); font:700 13px Manrope; margin-bottom:13px; }
.dialog-calendar-head div { display:flex; gap:4px; }
.dialog-calendar-head button { width:27px; height:27px; display:grid; place-items:center; border:1px solid #e4def8; border-radius:8px; color:var(--purple-dark); background:#fff; }
.dialog-calendar-head svg { width:14px; height:14px; }
.dialog-calendar-week, .dialog-calendar-dates { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; text-align:center; }
.dialog-calendar-week { margin-bottom:6px; color:var(--muted); font-size:9px; }
.dialog-calendar-dates button { min-height:31px; border-radius:9px; color:var(--ink-soft); background:transparent; font-size:11px; }
.dialog-calendar-dates button:hover { color:var(--purple-dark); background:#f0eaff; }
.dialog-calendar-dates button.muted { color:#bebbd3; }
.dialog-calendar-dates button.selected { color:#fff; background:linear-gradient(145deg,#a855f7,#5b5ce2); box-shadow:0 5px 13px rgba(108,75,220,.25); }
.available-times { padding:15px; border:1px solid #e3ddfa; border-radius:16px; background:rgba(255,255,255,.62); }
.dialog-section-title { margin-bottom:13px; }
.dialog-section-title strong { color:var(--ink); font:700 12px Manrope; }
.dialog-section-title span { color:var(--muted); font-size:10px; text-align:right; }
.time-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:260px; overflow:auto; padding-right:3px; }
.available-time { display:flex; align-items:center; justify-content:center; gap:6px; min-height:38px; border:1px solid #ded8f7; border-radius:10px; color:var(--purple-dark); background:#fff; font:700 12px Manrope; }
.available-time:hover, .available-time.selected { border-color:#9c7bfa; color:#fff; background:linear-gradient(135deg,#a855f7,#5b5ce2); box-shadow:0 5px 13px rgba(108,75,220,.2); }
.available-time svg { width:15px; height:15px; }
.assignment-time-options { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:-4px 0 19px; max-height:150px; overflow:auto; padding:3px; }
.agenda-dialog-footer { display:flex; justify-content:flex-end; gap:10px; padding-top:18px; margin-top:3px; border-top:1px solid var(--line); }
.agenda-dialog-footer .button[disabled] { opacity:.42; pointer-events:none; }
.assignment-summary { display:flex; justify-content:space-between; align-items:center; margin:20px 0 18px; padding:13px 15px; border:1px solid #e2dcfb; border-radius:13px; color:var(--purple-dark); background:#f4f0ff; font-size:11px; }
.assignment-summary span { display:flex; align-items:center; gap:7px; }
.assignment-summary svg { width:16px; height:16px; }
.assignment-summary strong { font:800 15px Manrope; }
.assignment-time-fixed { display:flex; align-items:center; justify-content:space-between; margin:-4px 0 19px; padding:12px 15px; border:1px solid #d9d0ff; border-radius:12px; color:var(--purple-dark); background:linear-gradient(135deg,#f7f3ff,#eef4ff); font-size:11px; }
.assignment-time-fixed span { display:flex; align-items:center; gap:7px; color:var(--muted); }
.assignment-time-fixed svg { width:16px; height:16px; color:var(--purple); }
.assignment-time-fixed strong { font:800 15px Manrope; color:var(--purple-dark); }
.dialog-search { display:flex; align-items:center; gap:9px; height:45px; padding:0 13px; border:1px solid #dcd6f5; border-radius:11px; color:var(--purple); background:#fff; }
.dialog-search:focus-within { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.dialog-search svg { width:17px; height:17px; }
.dialog-search input { width:100%; border:0; outline:0; color:var(--ink); background:transparent; font-size:12px; }
.dialog-patient-results { display:grid; gap:7px; max-height:220px; overflow:auto; margin-top:11px; padding-right:3px; }
.dialog-search-hint { padding:19px 12px; border:1px dashed #d8d1f2; border-radius:11px; color:var(--muted); text-align:center; font-size:11px; }
.dialog-patient-option { display:flex; align-items:center; gap:10px; width:100%; padding:9px 11px; border:1px solid transparent; border-radius:11px; color:var(--ink); background:#fff; text-align:left; }
.dialog-patient-option:hover, .dialog-patient-option.selected { border-color:#c5b5ff; background:#f2edff; }
.dialog-patient-option > span { display:grid; gap:3px; flex:1; }
.dialog-patient-option strong { font:700 12px Manrope; }
.dialog-patient-option small { color:var(--ink-soft); font-size:10px; }
.dialog-patient-option > svg { width:16px; height:16px; color:var(--purple); }
.selected-patient { display:flex; align-items:center; gap:10px; margin-top:12px; padding:10px; border-radius:11px; color:var(--purple-dark); background:#eee8ff; }
.selected-patient > span { display:grid; gap:3px; flex:1; }
.selected-patient strong { font:700 12px Manrope; }
.selected-patient small { color:var(--ink-soft); font-size:10px; }
.selected-patient-clear { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; border:1px solid #cfc1ff; border-radius:9px; color:var(--purple-dark); background:#fff; font:700 19px/1 Manrope; }
.selected-patient-clear:hover { border-color:var(--purple); color:#fff; background:linear-gradient(135deg,#a855f7,#5b5ce2); }
.agenda-status-panel { margin:18px 0; padding:14px; border:1px solid #e2dcfb; border-radius:15px; background:linear-gradient(145deg,#fbfaff,#f4f0ff); }
.agenda-status-panel.doctor-controlled { background:linear-gradient(145deg,#f3efff,#eef5ff); }
.agenda-status-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.agenda-status-panel-head > div { display:grid; gap:4px; }
.agenda-status-panel-head strong { color:var(--ink); font:700 12px Manrope; }
.agenda-status-panel-head small { color:var(--muted); font-size:10px; }
.agenda-status-panel-head .status { white-space:nowrap; }
.agenda-status-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(190px,1fr); gap:10px; margin-top:13px; }
.agenda-status-select, .waiting-switch { display:flex; align-items:center; gap:9px; min-height:43px; padding:8px 10px; border:1px solid #ded8f7; border-radius:11px; background:#fff; }
.agenda-status-select { flex-direction:column; align-items:stretch; gap:4px; }
.agenda-status-select > span { color:var(--muted); font-size:10px; }
.agenda-status-select select { width:100%; border:0; outline:0; color:var(--purple-dark); background:transparent; font:700 12px Manrope; }
.waiting-switch { cursor:pointer; }
.waiting-switch input { position:absolute; opacity:0; pointer-events:none; }
.waiting-switch > span:last-child { display:grid; gap:3px; }
.waiting-switch strong { color:var(--ink); font:700 11px Manrope; }
.waiting-switch small { color:var(--muted); font-size:10px; }
.switch-visual { width:40px; height:23px; flex:none; padding:3px; border-radius:99px; background:#d9d7e8; transition:.2s ease; }
.switch-visual i { display:block; width:17px; height:17px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(35,32,92,.18); transition:.2s ease; }
.waiting-switch input:checked + .switch-visual { background:linear-gradient(135deg,#a855f7,#5b5ce2); }
.waiting-switch input:checked + .switch-visual i { transform:translateX(17px); }
.privacy-consent-backdrop { z-index:120; }
.privacy-consent-modal { width:min(540px,calc(100vw - 32px)); }
.privacy-consent-copy { display:grid; grid-template-columns:42px 1fr; gap:12px; margin:18px 0; color:var(--ink-soft); line-height:1.55; }
.privacy-consent-copy .settings-icon { grid-row:span 3; }
.privacy-consent-copy p { margin:0; }
.privacy-consent-copy small { grid-column:2; color:var(--muted); font-size:12px; }
.privacy-settings-card { grid-column:1 / -1; }
.privacy-status { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:1px solid #e5defc; border-radius:13px; background:linear-gradient(145deg,#fbfaff,#f4f0ff); }
.privacy-status > div { display:grid; gap:3px; }
.privacy-status strong { color:var(--ink); font:700 12px Manrope; }
.privacy-status small, .privacy-actions small { color:var(--muted); font-size:11px; line-height:1.45; }
.status-dot { width:10px; height:10px; margin-top:3px; border-radius:50%; background:#15a77d; box-shadow:0 0 0 5px rgba(21,167,125,.12); }
.status-dot.warning { background:#db8b16; box-shadow:0 0 0 5px rgba(219,139,22,.12); }
.privacy-actions { display:flex; align-items:center; gap:12px; margin-top:13px; }
.privacy-actions .button { flex:none; }
.consent-request { display:flex; align-items:center; gap:11px; width:min(100%,520px); margin:16px auto 0; padding:13px 15px; border:1px solid #d9d0fb; border-radius:14px; color:var(--purple-dark); background:linear-gradient(135deg,#faf8ff,#f1edff); text-align:left; cursor:pointer; }
.consent-request > svg:first-child { width:20px; height:20px; flex:none; color:var(--purple); }
.consent-request > span { display:grid; gap:3px; flex:1; }
.consent-request strong { font:700 12px Manrope; }
.consent-request small { color:var(--muted); font-size:11px; line-height:1.4; }
.consent-request > svg:last-child { width:16px; height:16px; }
.consent-request:hover { border-color:var(--purple); transform:translateY(-1px); }
.consent-footer { display:flex; align-items:center; gap:10px; width:min(100%,520px); margin:16px auto 0; padding:11px 13px; border-radius:13px; background:#f5fbf8; color:#167b61; text-align:left; }
.consent-footer.pending { background:#fff9ed; color:#a36b13; }
.consent-footer.locked { background:#fdeef0; color:#c0392b; }
.consent-footer > svg { width:18px; height:18px; flex:none; }
.consent-footer > span { display:grid; gap:3px; flex:1; }
.consent-footer strong { font:700 11px Manrope; }
.consent-footer small { color:var(--muted); font-size:10px; line-height:1.4; }
.consent-footer .button { flex:none; }
.consent-signed-badge { display:inline-flex; align-items:center; gap:4px; margin-left:8px; padding:5px 8px; border:1px solid #ddd0ff; border-radius:999px; color:var(--purple-dark); background:#f5f0ff; font:700 10px Manrope; vertical-align:middle; white-space:nowrap; }
.consent-dialog-backdrop { z-index:120; background:rgba(36,32,82,.46); backdrop-filter:blur(10px); }
.consent-dialog { width:min(650px,calc(100vw - 32px)); max-height:calc(100vh - 48px); padding:0; overflow:auto; scrollbar-width:thin; scrollbar-color:#8d72f4 rgba(229,224,255,.62); }
.consent-dialog::-webkit-scrollbar { width:9px; }
.consent-dialog::-webkit-scrollbar-track { background:#f0ecff; border-radius:99px; margin:12px 0; }
.consent-dialog::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:99px; background:linear-gradient(180deg,#c084fc,#765ee8); background-clip:padding-box; }
.consent-dialog-header { display:flex; align-items:flex-start; gap:13px; padding:25px 25px 20px; background:linear-gradient(135deg,#fff8ff,#f1ebff 68%,#f7fbff); border-bottom:1px solid rgba(125,98,222,.12); }
.consent-dialog-header > div:nth-child(2) { flex:1; }
.consent-dialog-header h2 { margin:3px 0 5px; color:var(--ink); font:800 20px Manrope; letter-spacing:-.35px; }
.consent-dialog-header p { margin:0; color:var(--ink-soft); font-size:11px; line-height:1.45; }
.consent-dialog-header .dialog-close { margin-left:auto; }
.consent-dialog-copy { display:grid; grid-template-columns:42px 1fr; gap:10px 12px; margin:20px 25px 17px; padding:15px; border:1px solid #e3dcfa; border-radius:15px; color:var(--ink-soft); background:linear-gradient(145deg,#fbfaff,#f4f1ff); line-height:1.5; }
.consent-dialog-copy .settings-icon { grid-row:span 3; }
.consent-dialog-copy p, .consent-dialog-copy strong { margin:0; }
.consent-dialog-copy > div:nth-child(2) { display:grid; gap:6px; }
.consent-dialog-copy strong { color:var(--ink); font:800 12px Manrope; }
.consent-link-field { display:grid; gap:8px; margin:0 25px; color:var(--ink); font:700 11px Manrope; }
.consent-link-field > div { display:flex; gap:8px; align-items:stretch; }
.consent-link-field input { min-width:0; flex:1; height:42px; padding:0 12px; border:1px solid #d9d1f5; border-radius:11px; color:var(--ink-soft); background:#fff; font:500 11px Manrope; outline:0; }
.consent-link-field input:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.consent-link-field .button { min-height:42px; white-space:nowrap; }
.consent-delivery { margin:15px 25px 0; padding:12px 13px; border:1px solid #f0dfb8; border-radius:11px; color:#8a621e; background:#fff8e9; font-size:11px; line-height:1.45; }
.consent-delivery.sent { border-color:#c9eadc; color:#18785f; background:#effaf5; }
.consent-dialog-footer { display:flex; justify-content:flex-end; gap:9px; margin-top:21px; padding:16px 25px 22px; border-top:1px solid var(--line); background:#fcfbff; }
.consent-link-field { display:grid; gap:7px; color:var(--ink); font:700 11px Manrope; }
.consent-link-field > div { display:flex; gap:8px; }
.consent-link-field input { min-width:0; flex:1; padding:11px 12px; border:1px solid #ddd6f7; border-radius:11px; color:var(--ink-soft); background:#faf9ff; font:500 11px Manrope; }
.consent-delivery { margin-top:13px; padding:11px 12px; border-radius:11px; color:#8a621e; background:#fff7e8; font-size:11px; line-height:1.45; }
.consent-delivery.sent { color:#18785f; background:#effaf5; }
.consent-page { min-height:100vh; margin:0; background:radial-gradient(circle at 20% 0%,#f0eaff 0,#f8f7ff 44%,#edf2ff 100%); }
.patient-consent-screen { display:grid; justify-items:center; gap:18px; min-height:100vh; padding:48px 20px 28px; color:var(--ink); }
.patient-consent-brand { display:flex; align-items:center; gap:10px; color:var(--ink); }
.patient-consent-brand strong { display:block; font:800 18px Manrope; }
.patient-consent-brand small { display:block; color:var(--muted); font-size:12px; }
.patient-consent-card { width:min(620px,100%); padding:30px; border:1px solid rgba(143,116,229,.18); border-radius:24px; background:rgba(255,255,255,.88); box-shadow:0 24px 70px rgba(82,65,145,.14); }
.patient-consent-heading { display:flex; align-items:flex-start; gap:14px; }
.patient-consent-heading h1, .patient-consent-success h1, .patient-consent-loading h1 { margin:4px 0 0; color:var(--ink); font:800 25px/1.16 Manrope; }
.patient-consent-text { margin:24px 0; color:var(--ink-soft); font-size:15px; line-height:1.65; }
.patient-consent-text p { margin:0 0 14px; }
.patient-consent-form { display:grid; gap:15px; }
.patient-consent-form .consent-identity-note { display:grid; gap:3px; padding:11px 12px; border:1px solid #ddd6f7; border-radius:11px; color:var(--ink-soft); background:#faf9ff; font-size:12px; line-height:1.45; }
.patient-consent-form .consent-identity-note strong { color:var(--ink); font:700 12px Manrope; }
.patient-consent-form .consent-identity-choice { padding:10px 11px; border:1px solid #d9d0fb; border-radius:11px; background:#f7f3ff; color:var(--purple-dark); }
.patient-consent-form label:not(.patient-consent-check) { display:grid; gap:7px; color:var(--ink); font:700 12px Manrope; }
.patient-consent-form input:not([type="checkbox"]) { width:100%; min-height:48px; padding:13px 14px; border:1px solid #dcd5f7; border-radius:12px; color:var(--ink); background:#fff; font:500 15px Manrope; }
.patient-consent-form input:not([type="checkbox"]):focus { outline:0; border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }
.patient-consent-check { display:flex; align-items:flex-start; gap:9px; color:var(--ink-soft); font-size:13px; line-height:1.45; }
.patient-consent-check input { margin-top:3px; accent-color:var(--purple); }
.patient-consent-form-error { min-height:18px; color:#bd3548; font-size:12px; }
.patient-consent-success, .patient-consent-loading { display:grid; justify-items:center; gap:13px; padding:20px 8px; text-align:center; }
.patient-consent-success p, .patient-consent-loading p { max-width:460px; margin:0; color:var(--ink-soft); font-size:15px; line-height:1.6; }
.patient-consent-success small, .patient-consent-loading p { color:var(--muted); }
.consent-success-icon, .consent-error-icon { display:grid; place-items:center; width:58px; height:58px; border-radius:50%; color:#fff; background:linear-gradient(135deg,#a855f7,#5b5ce2); font:800 27px Manrope; }
.consent-error-icon { background:linear-gradient(135deg,#e56b7a,#b52d4b); }
.patient-consent-legal { margin:0; color:var(--muted); font-size:11px; text-align:center; }
/* Validação de documentos pela farmácia (/validar) */
.validation-facts { display:grid; gap:0; margin:22px 0 4px; border:1px solid #e1daf8; border-radius:14px; background:#fff; overflow:hidden; }
.validation-facts > div { display:grid; grid-template-columns:minmax(120px,34%) 1fr; gap:12px; padding:11px 14px; border-bottom:1px solid #f0ecfb; }
.validation-facts > div:last-child { border-bottom:none; }
.validation-facts dt { color:var(--muted); font:700 11px Manrope; letter-spacing:.3px; text-transform:uppercase; }
.validation-facts dd { margin:0; color:var(--ink); font-size:14px; line-height:1.45; overflow-wrap:anywhere; }
.validation-access { margin-top:20px; padding-top:18px; border-top:1px solid #ece7f9; }
.validation-access h2 { margin:0; color:var(--ink); font:800 16px Manrope; }
.validation-access p { margin:0; color:var(--ink-soft); font-size:13px; line-height:1.5; }
.validation-ready { display:grid; gap:8px; }
.validation-actions { display:flex; gap:9px; flex-wrap:wrap; justify-content:center; margin-top:18px; }
.validation-actions a.button { text-decoration:none; }
.validation-note { margin:18px 0 0; color:var(--ink-soft); font-size:13px; line-height:1.5; }
.validation-registered-icon { background:linear-gradient(135deg,#8e8aa8,#5d5a7e); }
.validation-registered-icon svg { width:28px; height:28px; }
.validation-unsigned { margin:18px 0 0; padding:12px 14px; border:1px solid #f0d58c; border-radius:12px; background:#fff8e5; color:#5f4700; font-size:13px; line-height:1.5; }
.validation-code-form input[name="code"] { font:800 20px Manrope; letter-spacing:4px; text-transform:uppercase; }
html[data-theme="dark"] .validation-facts { border-color:#4a4f7d; background:#202448; }
html[data-theme="dark"] .validation-facts > div { border-bottom-color:#33386a; }
html[data-theme="dark"] .validation-unsigned { border-color:#7a6326; background:#3a3218; color:#f3e2ad; }
.patient-consent-safety .patient-consent-text { text-align:left; margin-top:4px; }
.patient-consent-safety .patient-consent-text p { color:var(--ink); }
.baseline-questionnaires { margin-bottom:14px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.baseline-questionnaires h3 { margin:0; font-size:13px; color:var(--ink); }
.baseline-questionnaires .record-section-heading p { margin:2px 0 0; font-size:10px; color:var(--muted); }
.baseline-questionnaire-list { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:6px; }
.baseline-questionnaire-row { display:flex; align-items:center; gap:8px; padding:8px 9px; border-radius:9px; background:var(--surface-soft,#f7f6fd); font-size:10px; }
.baseline-questionnaire-row svg { width:15px; height:15px; flex:none; color:var(--purple); }
.baseline-questionnaire-row strong { display:block; font-size:11px; color:var(--ink); }
.baseline-questionnaire-row small { color:var(--muted); }
.baseline-questionnaire-row.has-safety-alert { background:#fdecee; }
.baseline-questionnaire-row.has-safety-alert svg { color:#b52d4b; }
.baseline-questionnaire-row.has-review-alert { background:#fff6e5; }
.baseline-questionnaire-row.has-review-alert svg { color:#a9720c; }
.baseline-safety-pill { margin-left:auto; display:flex; align-items:center; gap:4px; padding:3px 8px; border-radius:999px; background:#b52d4b; color:#fff; font:700 9px Manrope; }
.baseline-safety-pill svg { width:11px; height:11px; }
.baseline-review-pill { background:#a9720c; }
.triage-summary-text { margin:10px 0 0; font-size:11px; line-height:1.5; color:var(--ink); }
.no-ai-report-text { white-space:pre-wrap; }
.triage-summary-label { display:inline-block; margin-top:8px; padding:1px 8px; border-radius:999px; font-size:10px; font-weight:600; color:var(--muted, #64748b); background:var(--surface-2, rgba(100,116,139,.12)); }
.validate-instruments-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.validate-instruments-actions .button { flex:1 1 auto; }
html[data-theme="dark"] .baseline-questionnaire-row { background:#2a2740; }
html[data-theme="dark"] .baseline-questionnaire-row.has-safety-alert { background:#4a2430; }
html[data-theme="dark"] .baseline-questionnaire-row.has-review-alert { background:#4a3a1c; }
.baseline-questionnaire-row.is-clickable { cursor:pointer; }
.baseline-questionnaire-row.is-clickable > svg:last-child { flex:none; margin-left:auto; color:var(--muted); }
.baseline-questionnaire-row.is-clickable:hover, .baseline-questionnaire-row.is-clickable:focus-visible { background:#ece6fb; outline:0; }
html[data-theme="dark"] .baseline-questionnaire-row.is-clickable:hover, html[data-theme="dark"] .baseline-questionnaire-row.is-clickable:focus-visible { background:#342f5c; }
.questionnaire-tools { margin-top:14px; padding:17px; }
.questionnaire-tools .record-section-heading { margin-bottom:12px; }
.questionnaire-tools .record-section-heading h2 { font-size:14px; }
.questionnaire-tools .record-section-heading p { font-size:10px; }
.questionnaire-tools .ai-pill { font-size:9px; }
.questionnaire-safety-note { display:flex; align-items:flex-start; gap:7px; margin:0 0 11px; padding:9px 10px; border:1px solid #e2dafb; border-radius:10px; color:var(--ink-soft); background:#faf8ff; font-size:10px; line-height:1.4; }
.questionnaire-safety-note svg { width:14px; height:14px; flex:none; color:var(--purple); }
.questionnaire-list { display:grid; gap:7px; }
.questionnaire-option { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:10px 11px; border:1px solid #e1dbf6; border-radius:11px; color:var(--ink); background:#fff; text-align:left; cursor:pointer; transition:.18s ease; }
.questionnaire-option:hover { border-color:var(--purple); background:#fbf9ff; transform:translateY(-1px); }
.questionnaire-option span { display:grid; gap:3px; min-width:0; }
.questionnaire-option strong { font:700 11px Manrope; }
.questionnaire-option small { color:var(--muted); font-size:9px; line-height:1.35; }
.questionnaire-option > svg { width:15px; height:15px; flex:none; color:var(--purple); }
.questionnaire-last-status { margin-top:10px; padding:9px 10px; border-radius:10px; color:#8a621e; background:#fff8e9; font-size:10px; }
.questionnaire-last-status.completed { color:#18785f; background:#effaf5; }
.questionnaire-last-status > span { display:grid; grid-template-columns:16px 1fr; gap:2px 6px; }
.questionnaire-last-status svg { width:15px; height:15px; grid-row:span 2; }
.questionnaire-last-status small { color:inherit; opacity:.82; font-size:9px; }
.questionnaire-last-status.is-clickable { display:flex; align-items:center; justify-content:space-between; gap:8px; cursor:pointer; }
.questionnaire-last-status.is-clickable > svg:last-child { flex:none; color:inherit; opacity:.7; }
.questionnaire-last-status.is-clickable:hover, .questionnaire-last-status.is-clickable:focus-visible { filter:brightness(.96); outline:0; }
.questionnaire-invites-list .questionnaire-last-status:first-child { margin-top:0; }
.questionnaire-whatsapp-status { display:block; margin-top:9px; color:var(--muted); font-size:9px; line-height:1.4; }
.questionnaire-answers-nav { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:14px 25px 0; padding-top:14px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.questionnaire-answers-nav .button svg { width:13px; height:13px; }
.questionnaire-answers-nav .button[disabled] { opacity:.4; pointer-events:none; }
.questionnaire-safety-note.bad { border-color:#f3c3cf; background:#fdecee; color:#8a1f37; }
.questionnaire-safety-note.bad svg { color:#b52d4b; }
.questionnaire-safety-note.warn { border-color:#f3ddab; background:#fff6e5; color:#7a5610; }
.questionnaire-safety-note.warn svg { color:#a9720c; }
.baseline-answer-list { list-style:none; margin:14px 25px 0; padding:0; display:grid; gap:8px; max-height:320px; overflow:auto; }
.baseline-answer-list li { padding:10px 12px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.55); }
.baseline-answer-list strong { display:block; margin-bottom:3px; font:700 11.5px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); line-height:1.4; }
.baseline-answer-list span { display:block; color:var(--purple-dark); font:700 11px 'DM Sans',system-ui,sans-serif; }
html[data-theme="dark"] .baseline-answer-list li { background:rgba(40,43,83,.4); border-color:rgba(196,192,255,.16); }
.questionnaire-dialog { width:min(560px,calc(100vw - 32px)); }
.questionnaire-review-box, .questionnaire-result-copy { margin:18px 25px 0; padding:13px; border:1px solid #e1daf7; border-radius:13px; color:var(--ink-soft); background:#faf8ff; font-size:11px; line-height:1.5; }
.questionnaire-review-box strong, .questionnaire-result-copy strong { display:block; color:var(--ink); font:800 12px Manrope; margin-bottom:4px; }
.questionnaire-review-box p, .questionnaire-result-copy p { margin:0; }
.questionnaire-dialog form { padding:18px 25px 0; }
.questionnaire-dialog .profile-modal-actions { padding:18px 0 0; }
.questionnaire-link-field { margin-top:16px; }
.patient-questionnaire-note { margin:18px 0; padding:12px 13px; border:1px solid #e1daf7; border-radius:12px; color:var(--ink-soft); background:#faf8ff; font-size:12px; line-height:1.5; }
.patient-progress { margin-top:18px; }
.patient-progress-track { height:8px; border-radius:99px; background:#ece6fb; overflow:hidden; }
.patient-progress-fill { height:100%; border-radius:99px; background:linear-gradient(90deg,#8a5cf6,#be4df3); transition:width .3s ease; }
.patient-progress-label { display:flex; justify-content:space-between; margin-top:6px; color:var(--ink-soft); font:700 11px Manrope; }
.patient-progress-note { display:flex; align-items:flex-start; gap:8px; margin:14px 0 0; padding:11px 13px; border:1px solid #cfe9e2; border-radius:12px; color:#157a61; background:rgba(237,250,245,.65); font-size:12px; line-height:1.5; }
.patient-progress-note svg { width:15px; height:15px; flex:none; margin-top:1px; }
.patient-question { display:grid; gap:7px; color:var(--ink); font:700 12px Manrope; }
.patient-question[hidden] { display:none; }
.patient-question-header { margin:4px 0 0; font:700 12px Manrope; color:var(--ink); }
.patient-question textarea, .patient-question select { width:100%; min-height:44px; padding:11px 12px; border:1px solid #dcd5f7; border-radius:11px; color:var(--ink); background:#fff; font:500 13px/1.4 Manrope; outline:0; }
.patient-question textarea { min-height:76px; resize:vertical; }
.patient-question textarea:focus, .patient-question select:focus { border-color:var(--purple); box-shadow:0 0 0 3px #eee9ff; }

@media (max-width: 1200px) {
  .app-shell { grid-template-columns:220px minmax(0,1fr); }
  .ambient-panel { display:none; }
  .topbar { grid-template-columns:max-content minmax(260px, 360px) 1fr minmax(90px,max-content); padding-right:22px; }
  .content { padding-left:22px; padding-right:22px; }
}
@media (max-width: 920px) {
  .app-shell { display:block; }
  .sidebar { position:fixed; left:-262px; top:0; bottom:0; width:250px; height:100vh; margin:0; border-radius:0 25px 25px 0; transition:.25s ease; }
  .sidebar.open { left:0; }
  .topbar { height:72px; padding:16px 18px 0; grid-template-columns:32px minmax(0,1fr) auto; gap:10px; }
  .mobile-menu { display:grid; place-items:center; }
  .breadcrumb { display:none; }
  .content { padding: 9px 18px 25px; }
  .dashboard-grid, .waiting-layout, .dashboard-followup-grid, .record-layout, .live-work, .agenda-layout { grid-template-columns:1fr; }
  .record-sidebar { display:grid; grid-template-columns:repeat(2,1fr); }
  .agenda-layout .side-info { margin-top:0; }
  .metric-grid { grid-template-columns:repeat(2,1fr); }
  .lower-grid { grid-template-columns:1fr 1fr; }
  .next-card { min-height: unset; }
  .agenda-status-actions { grid-template-columns:1fr; }
  .scale-grid { grid-template-columns:1fr; }
  .scale-library-summary { grid-template-columns:1fr; }
  .scale-trend-selector-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .scale-trend-option { min-width:0; }
  #header-popover-root { position:fixed; top:60px; right:18px; }
}
@media (max-width: 650px) {
  .topbar { grid-template-columns:28px minmax(0,1fr) auto; }
  .global-search { min-width:0; }
  .global-search kbd { display:none; }
  .top-actions { gap:0; }
  .top-actions .icon-button { display:none; }
  .top-avatar { width:38px; height:38px; font-size:13px; }
  #top-profile { height:40px; max-width:150px; padding-left:10px; }
  #top-profile .top-initials { flex-basis:30px; width:30px; height:30px; font-size:11px; }
  #header-popover-root { position:fixed; top:56px; right:10px; }
  .profile-modal-backdrop { padding:10px; }
  .profile-modal { max-height:calc(100vh - 20px); padding:18px; border-radius:18px; }
  .page-heading { display:block; }
  .date-note { text-align:left; margin-top:10px; }
  .page-heading .page-actions { margin-top:13px; }
  .scale-trend-panel { padding:13px; }
  .scale-trend-heading { display:grid; }
  .scale-trend-selector-list { grid-template-columns:1fr; }
  .scale-trend-chart-wrap { padding-left:2px; padding-right:2px; }
  .scale-trend-chart { min-height:190px; }
  .results-modal-backdrop { padding:10px; }
  .results-modal { width:100%; max-height:calc(100vh - 20px); }
  .results-header { padding:20px; }
  .results-title h1 { font-size:18px; }
  .results-title p { font-size:11px; }
  .results-tabs { max-width:none; margin:0 14px; overflow:auto; }
  .results-tabs button { min-width:245px; padding:13px; }
  .results-editor-shell { margin:0 14px; }
  .results-toolbar { gap:10px; overflow:auto; }
  .results-document, .results-transcription { min-height:330px; max-height:420px; padding:17px; font-size:13px; }
  .review-banner { flex-wrap:wrap; align-items:flex-start; margin:12px 14px 0; }
  .review-banner button { margin-left:36px; }
  .record-section-heading { flex-direction:column; }
  .prescription-name-mode-card { grid-template-columns:1fr; }
  .prescription-name-mode-toggle { justify-content:space-between; }
  .medication-preference-row { grid-template-columns:1fr; }
  .medication-preference-row-actions { grid-column:auto; }
  .medication-catalog-item { grid-template-columns:1fr; }
  .document-generator, .extraction-grid { grid-template-columns:1fr; display:grid; align-items:stretch; }
  .prescription-fields { grid-template-columns:1fr; }
  .prescription-fields label.full { grid-column:auto; }
  .prescription-editor-heading, .prescription-actions, .signature-output-actions, .signature-output-status { align-items:stretch; flex-direction:column; }
  .document-generator .button, .extraction-grid .button { width:100%; justify-content:center; }
  .pdf-dropzone { align-items:flex-start; flex-wrap:wrap; }
  .pdf-dropzone em { margin-left:53px; }
  .pdf-file-meta { align-items:flex-start; flex-direction:column; }
  .pdf-file-meta .button { width:100%; justify-content:center; }
  .neuropsi-analysis-heading { align-items:flex-start; flex-wrap:wrap; }
  .neuropsi-analysis-heading > span { margin-left:31px; }
  .neuropsi-transcript-action { align-items:stretch; flex-direction:column; }
  .neuropsi-verdict { gap:12px; padding:16px; }
  .neuropsi-verdict-icon { width:38px; height:38px; }
  .neuropsi-verdict-icon svg { width:21px; height:21px; }
  .neuropsi-verdict-body strong { font-size:20px; }
  .neuropsi-section { padding:12px 14px 14px; }
  .neuropsi-attach .button { width:100%; justify-content:center; }
  .neuropsi-transcript-action .button { width:100%; justify-content:center; }
  .results-footer { display:grid; padding:17px 14px; }
  .results-footer-left, .results-footer-right { display:grid; grid-template-columns:1fr 1fr; }
  .results-footer-right { display:grid; grid-template-columns:1fr 1.5fr; }
  .results-footer-right .button { padding:0 10px; font-size:11px; }
  .results-audio-bar { margin:10px 14px 0; flex-wrap:wrap; }
  .results-audio-bar audio { width:100%; }
  .metric-grid, .lower-grid, .dashboard-followup-grid, .feature-cards, .record-sidebar { grid-template-columns:1fr; }
  .settings-layout { grid-template-columns:1fr; }
  .settings-fields, .day-settings-grid { grid-template-columns:1fr; }
  .saved-session-card { align-items:flex-start; flex-wrap:wrap; }
  .saved-session-actions { width:100%; margin-left:0; }
  .saved-session-actions .button { flex:1; }
  .consultation-started-card { grid-template-columns:44px minmax(0,1fr); padding:18px; }
  .started-consultation-icon { width:44px; height:44px; }
  .consultation-timer { grid-column:2; justify-self:start; }
  .consultation-started-card > .button { grid-column:1 / -1; justify-self:stretch; }
  .appointment-row { grid-template-columns:45px minmax(0,1fr) 24px; }
  .appointment-row > .status, .appointment-row > .button { display:none; }
  .appointment-row.waiting-room-row > .waiting-start, .appointment-row.dashboard-row > .waiting-start { display:flex; grid-column:2; grid-row:2; justify-self:start; }
  .appointment-row .row-more { grid-column:3; grid-row:1; }
  .agenda-toolbar { overflow:auto; }
  .view-switch { margin-left:0; }
  .view-switch button { padding:9px 12px; }
  .agenda-layout { gap:10px; }
  .day-grid-header, .time-row { grid-template-columns:55px 1fr; }
  .time-row > span { padding-left:10px; }
  .slot { grid-template-columns:38px minmax(0,1fr); }
  .slot .status { display:none; }
  .patients-toolbar { flex-wrap:wrap; }
  .inner-search { width:100%; }
  .table-head { display:none; }
  .patient-table-row { grid-template-columns:1fr 26px; padding:13px; }
  .patient-table-row > *:not(.patient-cell):not(.row-more) { display:none; }
  .patient-table-row .row-more { grid-column:2; grid-row:1; }
  .patient-directory-row { grid-template-columns:1fr; }
  .patient-directory-row > .muted { display:block; grid-column:1; padding-left:44px; }
  .patient-edit-dialog { padding:18px; border-radius:18px; max-height:calc(100vh - 20px); }
  .saved-consultation-card { padding:18px; }
  .saved-consultation-heading { flex-direction:column; }
  .saved-consultation-badge { align-self:flex-start; }
  .saved-consultation-actions { flex-direction:column; align-items:stretch; }
  .history-backdrop { padding:10px; }
  .history-dialog { padding:18px; border-radius:18px; max-height:calc(100vh - 20px); }
  .history-fields { grid-template-columns:1fr; }
  .patient-edit-grid { grid-template-columns:1fr; }
  .patient-edit-grid label.full { grid-column:auto; }
  .patient-edit-actions, .patient-edit-actions > div { display:grid; grid-template-columns:1fr; }
  .patient-banner { flex-wrap:wrap; }
  .banner-actions { width:100%; margin-left:84px; margin-top:-25px; }
  .tabbar { margin-left:-5px; margin-right:-5px; grid-template-columns:repeat(2,minmax(0,1fr)); padding:0 8px; }
  .tabbar button { padding:0 9px; }
  .transcribe-card { padding:25px 14px; }
  .transcribe-card .button { min-width:220px; }
  .record-footer { flex-wrap:wrap; }
  .record-footer .button.primary { width:100%; margin-left:0; }
  .recording-strip { flex-wrap:wrap; padding:10px; }
  .timer-readouts { order:3; width:100%; }
  .timer-readout { flex:1; }
  .recording-strip .capture-mode { order:2; }
  .recording-strip .wave { order:4; }
  .recording-strip .recording-timer-inline { order:5; width:auto; }
  .recording-strip .recording-timer-inline .timer-readout { flex:none; }
  .recording-strip .recording-actions { order:6; margin-left:auto; }
  .footer-timers { width:100%; margin-right:0; }
  .capture-mode { margin-left:auto; }
  .wave { min-width:130px; order:3; flex-basis:100%; }
  .agenda-dialog-backdrop { padding:10px; }
  .agenda-dialog { padding:17px; border-radius:19px; max-height:calc(100vh - 20px); }
  .agenda-dialog-grid { grid-template-columns:1fr; gap:11px; }
  .agenda-dialog-actions, .agenda-dialog-footer { display:grid; grid-template-columns:1fr; }
  .agenda-dialog-actions .button, .agenda-dialog-footer .button { width:100%; }
  .time-options { max-height:180px; }
  .assignment-time-options { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .document-type-picker { grid-template-columns:1fr; }
  .referral-generate .button { width:100%; }
  .referral-action-buttons { flex-direction:column; }
  .document-editor-backdrop, .document-package-dialog-backdrop { padding:10px; }
  .document-editor-modal, .document-package-dialog { max-height:calc(100vh - 20px); border-radius:18px; }
  .document-editor-header { padding:18px; }
  .document-editor-footer { display:grid; grid-template-columns:1fr; padding:15px 18px 18px; }
  .document-editor-footer .button { width:100%; justify-content:center; }
  .document-review-note, .document-dialog-warning, .document-confirmed-copy, .document-thinking, .document-draft-field, .document-package-patient, .document-package-link, .document-package-delivery, .document-package-list { margin-left:18px; margin-right:18px; }
  .document-package-link > div { display:grid; }
  .document-package-link .button { width:100%; justify-content:center; }
  .patient-document-screen { padding:28px 14px 20px; }
  .patient-document-card { padding:22px 18px; border-radius:19px; }
  .patient-document-file { align-items:flex-start; flex-wrap:wrap; }
  .document-download-button { width:100%; justify-content:center; }
}

/* ---- Documentos para o paciente ---- */
.record-output.is-released { border-color:#bfe8d8; }
.record-output textarea[data-record-output-text] { border-bottom:1px solid #eee9ff; }
.record-output textarea[data-record-output-text]:focus { background:#fdfcff; box-shadow:inset 0 0 0 2px #eee9ff; }
.record-output-release { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 14px; border-top:1px solid #e1daf8; background:#faf8ff; }
.record-output-release.is-released { border-top-color:#c9eadc; background:#f2fbf7; }
.record-output-release small { color:var(--muted); font-size:10.5px; line-height:1.45; }
.record-output-release .button { flex:none; }
.record-output-review { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 14px; border-top:1px solid #e1daf8; background:#fff; }
.record-output-review.is-reviewed { border-top-color:#c9eadc; background:#f2fbf7; }
.record-output-review small { color:var(--muted); font-size:10.5px; line-height:1.45; }
.record-output-review .button { flex:none; }
.documents-send-bar { margin-top:16px; padding:20px; }
.documents-chip-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
.documents-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border:1px solid #c9eadc; border-radius:999px; color:#18785f; background:#effaf5; font:700 11px Manrope; }
.documents-chip svg { width:14px; height:14px; }
.documents-empty { color:var(--muted); font-size:11px; line-height:1.5; }
.documents-send-bar .questionnaire-last-status { margin-top:14px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.documents-send-bar .questionnaire-last-status .button { flex:none; }
.documents-send-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:16px; }
.documents-send-actions .settings-hint { margin:0; }

.branding-settings-card { margin-top:16px; }
.branding-logo-row { display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.branding-logo-preview { display:grid; place-items:center; width:84px; height:84px; flex:none; overflow:hidden; border:1px dashed #cfc6f3; border-radius:14px; color:var(--muted); background:#fff; font-size:11px; }
.branding-logo-preview img { max-width:100%; max-height:100%; object-fit:contain; }
.branding-logo-actions { display:grid; gap:8px; }
.branding-logo-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.branding-logo-buttons label.button { cursor:pointer; }
.branding-swatches { display:flex; flex-wrap:wrap; gap:12px; padding:2px; }
.branding-swatch { width:32px; height:32px; padding:0; border:2px solid #fff; border-radius:50%; background:var(--swatch); box-shadow:0 0 0 1px rgba(16,22,88,.18); cursor:pointer; transition:transform .15s ease; }
.branding-swatch:hover { transform:scale(1.08); }
.branding-swatch.active { box-shadow:0 0 0 2px var(--swatch),0 0 0 5px rgba(116,60,255,.18); }

.patient-documents-list { display:grid; gap:18px; margin-top:20px; }
.patient-documents-group h2 { margin:0 0 8px; color:var(--ink-soft); font:800 11px Manrope; letter-spacing:.6px; text-transform:uppercase; }
.patient-document-row { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid #e1daf8; border-radius:13px; background:#fff; }
.patient-document-row + .patient-document-row { margin-top:8px; }
.patient-document-row > div { display:grid; gap:2px; flex:1; min-width:0; }
.patient-document-row strong { color:var(--ink); font:700 13px Manrope; overflow-wrap:anywhere; }
.patient-document-row small { color:var(--muted); font-size:10px; }
.patient-document-icon { display:grid; place-items:center; width:38px; height:38px; flex:none; border-radius:10px; color:var(--purple); background:#f1ecff; }
.patient-document-icon svg { width:18px; height:18px; }
.patient-document-row .button { flex:none; }
.patient-documents-expiry { display:block; margin-top:16px; color:var(--muted); font-size:11px; text-align:center; }
@media (max-width:560px) {
  .record-output-release, .record-output-review { flex-direction:column; align-items:stretch; }
  .branding-logo-row { align-items:flex-start; }
}

/* Editor de layout dos documentos */
.layout-editor-card { margin-top:16px; padding:22px; }
.layout-editor-summary-card { margin-top:14px; }
.le-loading { padding:24px; color:var(--muted); font-size:13px; text-align:center; }
.le-toolbar { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; margin:6px 0 18px; }
.le-toolbar .le-clinic-select { flex:1 1 240px; max-width:360px; }
.le-toolbar .button.primary { margin-left:auto; }
.le-dirty { align-self:center; padding:5px 10px; border-radius:999px; color:#946200; background:#fff4d6; font:700 11px Manrope; }
.le-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,500px); gap:22px; align-items:start; }
.le-controls { display:grid; gap:10px; min-width:0; }
.le-preview { position:sticky; top:16px; display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:16px; background:#f3f1fb; min-width:0; }
.le-preview-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.le-preview-head strong { color:var(--ink); font:800 13px Manrope; }
.le-preview-head small { color:var(--muted); font-size:11px; }
.le-preview-head select { min-width:0; max-width:100%; padding:5px 8px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font:600 11px Manrope; }
.le-status { margin-left:auto; color:var(--muted); font-size:11px; }
.le-pages { display:grid; min-height:520px; border-radius:8px; overflow:hidden; box-shadow:0 6px 22px rgba(38,32,94,.16); }
.le-pdf-frame { display:block; width:100%; height:520px; border:0; background:#fff; }
.le-error { color:var(--red); font-size:11px; line-height:1.45; }
.le-error:empty { display:none; }
.le-scope-note { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:10px 12px; border-radius:11px; color:var(--ink-soft); background:#faf8ff; border:1px solid #e1daf8; font-size:11.5px; line-height:1.5; }
.le-group { border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.6); }
.le-group > summary { padding:12px 14px; color:var(--ink); font:800 12.5px Manrope; cursor:pointer; list-style:none; display:flex; align-items:center; justify-content:space-between; }
.le-group > summary::-webkit-details-marker { display:none; }
.le-group > summary::after { content:'+'; color:var(--muted); font-size:16px; }
.le-group[open] > summary::after { content:'–'; }
.le-group-body { display:grid; gap:14px; padding:2px 14px 16px; }
.le-field { display:grid; gap:6px; min-width:0; }
.le-field.is-disabled { opacity:.5; }
.le-label { color:var(--ink-soft); font:700 11px Manrope; }
.le-field input[type="text"], .le-field input[type="number"], .le-field select { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font:500 13px 'DM Sans',system-ui,sans-serif; box-sizing:border-box; }
.le-seg { display:flex; flex-wrap:wrap; gap:4px; padding:3px; border:1px solid var(--line); border-radius:10px; background:#f6f4fd; width:fit-content; max-width:100%; }
.le-seg button { padding:6px 11px; border:0; border-radius:7px; background:transparent; color:var(--ink-soft); font:700 11.5px Manrope; cursor:pointer; }
.le-seg button.active { color:var(--purple-dark); background:#fff; box-shadow:0 1px 4px rgba(38,32,94,.16); }
.le-seg button:disabled { cursor:not-allowed; }
.le-check { display:flex; align-items:center; gap:9px; color:var(--ink); font:600 12.5px Manrope; cursor:pointer; }
.le-check input { width:16px; height:16px; accent-color:var(--purple); flex:none; }
.le-check.is-disabled { opacity:.5; cursor:not-allowed; }
.le-checks { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px 12px; }
.le-check.compact { font-weight:600; font-size:12px; }
.le-range { display:flex; align-items:center; gap:12px; }
.le-range input { flex:1; accent-color:var(--purple); }
.le-range output { min-width:44px; color:var(--ink-soft); font:700 12px Manrope; text-align:right; }
.le-margins { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.le-margins label { display:grid; gap:3px; }
.le-margins small { color:var(--muted); font-size:10.5px; }
.le-color-custom { position:relative; display:inline-grid; place-items:center; width:32px; height:32px; overflow:hidden; border-radius:50%; background:conic-gradient(#f14562,#ec9d15,#12b28a,#2c84ee,#743cff,#f14562); box-shadow:0 0 0 1px rgba(16,22,88,.18); cursor:pointer; }
.le-color-custom.active { box-shadow:0 0 0 2px var(--purple),0 0 0 5px rgba(116,60,255,.18); }
.le-color-custom input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.le-rgb { display:grid; grid-template-columns:repeat(3,64px) minmax(96px,1fr); gap:8px; align-items:end; margin-top:8px; }
.le-rgb label { display:grid; gap:3px; min-width:0; }
.le-rgb small { color:var(--muted); font-size:10.5px; }
.le-rgb .le-hex input { text-transform:uppercase; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.le-contrast { grid-column:1 / -1; color:var(--muted); font-size:11.5px; }
.le-contrast.level-ok { color:#9a6b00; }
.le-contrast.level-low { color:#b42318; font-weight:600; }
html[data-theme="dark"] .le-contrast.level-ok { color:#f2c34c; }
html[data-theme="dark"] .le-contrast.level-low { color:#ff8a80; }
.le-logo-row { display:flex; align-items:center; gap:16px; }
.le-clinic-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.le-clinic-fields .le-field:nth-child(1), .le-clinic-fields .le-field:nth-child(2) { grid-column:1 / -1; }
.le-extras { display:grid; gap:8px; }
.le-extra-row { display:grid; grid-template-columns:minmax(0,1fr) 130px 34px; gap:8px; align-items:center; }
.le-extra-row .button { padding:0; height:34px; }
.le-extras > .button { justify-self:start; }
@media (max-width:1080px) {
  .le-grid { grid-template-columns:1fr; }
  .le-preview { position:static; }
}
@media (max-width:560px) {
  .layout-editor-card { padding:16px; }
  .le-toolbar .button.primary { margin-left:0; width:100%; }
  .le-clinic-fields { grid-template-columns:1fr; }
  .le-margins { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .le-extra-row { grid-template-columns:1fr 34px; }
  .le-extra-row select { grid-column:1 / 2; }
}
html[data-theme="dark"] .le-preview { background:#171a38; }
html[data-theme="dark"] .le-group, html[data-theme="dark"] .le-seg { background:rgba(40,43,83,.5); }
html[data-theme="dark"] .le-seg button.active { background:#3a3572; color:#e7ddff; }
html[data-theme="dark"] .le-scope-note { background:rgba(40,43,83,.5); border-color:rgba(196,192,255,.16); }
html[data-theme="dark"] .le-field input[type="text"], html[data-theme="dark"] .le-field input[type="number"], html[data-theme="dark"] .le-field select, html[data-theme="dark"] .le-preview-head select { background:#20244a; color:#e3e6ff; border-color:rgba(196,192,255,.2); }
html[data-theme="dark"] .le-dirty { background:#4a3a10; color:#ffd98a; }

/* Aviso de vias da receita (controle especial) */
.documents-vias { display:flex; align-items:center; gap:12px; margin-top:14px; padding:12px 14px; border:1px solid #e1daf8; border-radius:13px; background:#faf8ff; }
.documents-vias.is-controlled { border-color:var(--notice-border); background:var(--notice-bg); }
.documents-vias-icon { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:10px; color:var(--purple); background:#f1ecff; }
.documents-vias.is-controlled .documents-vias-icon { color:#fff; background:linear-gradient(135deg,#be4df3,#4b78ed); }
.documents-vias-icon svg { width:17px; height:17px; }
.documents-vias-copy { display:grid; gap:3px; flex:1; min-width:0; }
.documents-vias-copy strong { color:var(--ink); font:800 12px Manrope; overflow-wrap:anywhere; }
.documents-vias-copy small { color:var(--ink-soft); font-size:11px; line-height:1.45; }
.documents-vias-warning { color:var(--purple-dark) !important; font-weight:700; }
.documents-vias-select { display:grid; gap:3px; flex:none; }
.documents-vias-select span { color:var(--muted); font:700 10px Manrope; }
.documents-vias-select select { padding:7px 9px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font:600 12px 'DM Sans',system-ui,sans-serif; }
@media (max-width:560px) { .documents-vias { flex-wrap:wrap; } .documents-vias-select { width:100%; } }
html[data-theme="dark"] .documents-vias { background:rgba(40,43,83,.5); border-color:rgba(196,192,255,.16); }
html[data-theme="dark"] .documents-vias.is-controlled { background:var(--notice-bg); border-color:var(--notice-border); }
html[data-theme="dark"] .documents-vias-warning { color:#c9b6ff !important; }
html[data-theme="dark"] .documents-vias-select select { background:#20244a; color:#e3e6ff; border-color:rgba(196,192,255,.2); }

/* Biblioteca de modelos personalizados */
.templates-heading { align-items:end; }
.templates-library { padding:22px; }
.templates-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.templates-section-heading h2 { margin:0; color:var(--ink); font:800 18px Manrope; }
.templates-section-heading p { margin:5px 0 0; color:var(--ink-soft); font-size:12px; }
.templates-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.template-card { min-width:0; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:12px; align-items:start; padding:15px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.68); transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.template-card:hover { border-color:#c9baff; box-shadow:0 10px 24px rgba(83,56,190,.1); transform:translateY(-1px); }
.template-card-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; color:var(--purple); background:#f0eaff; }
.template-card-icon svg { width:20px; height:20px; }
.template-card-copy { min-width:0; }
.template-card-title { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.template-card-title h3 { margin:0; color:var(--ink); font:800 13px Manrope; }
.template-card-copy p { margin:7px 0 8px; color:var(--ink-soft); font-size:11px; line-height:1.5; }
.template-card-copy small { color:var(--muted); font-size:10px; }
.template-badge { display:inline-flex; align-items:center; padding:4px 7px; border-radius:999px; color:#6351b7; background:#f1edff; font:700 9px Manrope; }
.template-badge.custom { color:#14735e; background:#e3f6ef; }
.template-card-actions { display:flex; align-items:center; gap:5px; }
.template-card-actions .button.small { white-space:nowrap; }
.danger-icon { color:#c74d65 !important; }
.template-empty { grid-column:1 / -1; display:flex; align-items:center; gap:12px; padding:18px; border:1px dashed #d7cff5; border-radius:14px; color:var(--ink-soft); background:#fcfbff; }
.template-empty-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; color:var(--purple); background:#f0eaff; }
.template-empty-icon svg { width:18px; height:18px; }
.template-empty strong { display:block; color:var(--ink); font:800 12px Manrope; }
.template-empty p { margin:4px 0 0; font-size:11px; }
.template-modal-backdrop { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:22px; background:rgba(28,21,65,.34); backdrop-filter:blur(8px); }
.template-modal { width:min(620px,100%); max-height:min(760px,calc(100vh - 44px)); overflow:auto; border:1px solid rgba(255,255,255,.85); border-radius:22px; background:linear-gradient(145deg,#fff,#f8f6ff); box-shadow:0 24px 70px rgba(37,22,98,.28); }
.template-modal-header { display:flex; justify-content:space-between; gap:16px; padding:22px 24px 16px; border-bottom:1px solid var(--line); }
.template-modal-header h2 { margin:5px 0 0; color:var(--ink); font:800 20px Manrope; }
.template-modal-header p { margin:5px 0 0; color:var(--ink-soft); font-size:12px; }
.template-modal form { display:grid; gap:15px; padding:20px 24px 24px; }
.template-modal label { display:grid; gap:7px; }
.template-modal label > span { color:var(--ink); font:800 11px Manrope; }
.template-modal input, .template-modal textarea { width:100%; box-sizing:border-box; border:1px solid var(--line); border-radius:11px; padding:11px 12px; color:var(--ink); background:#fff; font:500 12px 'DM Sans',system-ui,sans-serif; outline:none; }
.template-modal input:focus, .template-modal textarea:focus { border-color:var(--purple); box-shadow:0 0 0 3px rgba(119,86,235,.13); }
.template-modal textarea { min-height:210px; resize:vertical; line-height:1.55; }
.template-modal-footer { display:flex; justify-content:flex-end; gap:9px; padding-top:4px; }
html[data-theme="dark"] .template-card { background:rgba(32,36,74,.58); border-color:rgba(196,192,255,.16); }
html[data-theme="dark"] .template-card:hover { border-color:#6358a9; }
html[data-theme="dark"] .template-card-icon, html[data-theme="dark"] .template-empty-icon { background:#302b5b; }
html[data-theme="dark"] .template-badge { color:#d8ccff; background:#3a3572; }
html[data-theme="dark"] .template-badge.custom { color:#baf0dd; background:#1e5548; }
html[data-theme="dark"] .template-empty { border-color:rgba(196,192,255,.22); background:rgba(32,36,74,.4); }
html[data-theme="dark"] .template-modal input, html[data-theme="dark"] .template-modal textarea { background:#20244a; border-color:rgba(196,192,255,.2); color:#e3e6ff; }
@media (max-width:760px) { .templates-section-heading { display:grid; } .templates-grid { grid-template-columns:1fr; } .template-card { grid-template-columns:42px minmax(0,1fr); } .template-card-actions { grid-column:2; justify-content:flex-start; } }

/* Revisão global de contraste do tema escuro.
   Mantém as áreas coloridas da agenda com texto escuro intencionalmente,
   mas reforça textos, bordas, campos, cartões e modais do restante da aplicação. */
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .card-heading p,
html[data-theme="dark"] .date-note,
html[data-theme="dark"] .date-note strong,
html[data-theme="dark"] .patient-cell small,
html[data-theme="dark"] .next-patient small,
html[data-theme="dark"] .quick-info p,
html[data-theme="dark"] .quick-info small,
html[data-theme="dark"] .briefing-date,
html[data-theme="dark"] .preconsultation-facts span,
html[data-theme="dark"] .preconsultation-focus ul,
html[data-theme="dark"] .preconsultation-empty-copy,
html[data-theme="dark"] .metric-card span,
html[data-theme="dark"] .metric-card small,
html[data-theme="dark"] .report-card-heading p,
html[data-theme="dark"] .report-kpi-card span,
html[data-theme="dark"] .report-kpi-card small,
html[data-theme="dark"] .report-ranking-head,
html[data-theme="dark"] .report-chart-legend,
html[data-theme="dark"] .report-empty-inline,
html[data-theme="dark"] .report-ai-source,
html[data-theme="dark"] .scale-meta,
html[data-theme="dark"] .scale-rights,
html[data-theme="dark"] .history-fields small,
html[data-theme="dark"] .history-transcript small,
html[data-theme="dark"] .document-processing-steps,
html[data-theme="dark"] .patient-document-copy,
html[data-theme="dark"] .patient-document-expiry,
html[data-theme="dark"] .patient-document-legal,
html[data-theme="dark"] .patient-document-row small {
  color: #c4cbed;
}

html[data-theme="dark"] .briefing-icon { color:#d4c8ff; background:#302b5b; }
html[data-theme="dark"] .preconsultation-focus { border-color:rgba(196,192,255,.2); background:rgba(48,43,91,.58); }
html[data-theme="dark"] .preconsultation-focus > span { color:#d4c8ff; }
html[data-theme="dark"] .preconsultation-update > span { color:#d4c8ff; }
html[data-theme="dark"] .preconsultation-update li strong { color:#b8c4f0; }

html[data-theme="dark"] .inner-search,
html[data-theme="dark"] .filter-pill,
html[data-theme="dark"] .date-control,
html[data-theme="dark"] .view-switch,
html[data-theme="dark"] .calendar-nav,
html[data-theme="dark"] .table-head,
html[data-theme="dark"] .history-visit,
html[data-theme="dark"] .history-full-record,
html[data-theme="dark"] .history-transcript,
html[data-theme="dark"] .birth-date-popover,
html[data-theme="dark"] .patient-edit-dialog,
html[data-theme="dark"] .history-dialog,
html[data-theme="dark"] .waiting-action-menu,
html[data-theme="dark"] .patient-record-menu,
html[data-theme="dark"] .scale-card,
html[data-theme="dark"] .scale-recommendation,
html[data-theme="dark"] .extraction-card,
html[data-theme="dark"] .document-selected-type,
html[data-theme="dark"] .document-thinking,
html[data-theme="dark"] .document-review-note,
html[data-theme="dark"] .document-dialog-warning,
html[data-theme="dark"] .document-draft-field textarea,
html[data-theme="dark"] .document-package-patient,
html[data-theme="dark"] .document-package-list li,
html[data-theme="dark"] .patient-document-security,
html[data-theme="dark"] .patient-document-file,
html[data-theme="dark"] .patient-document-row {
  border-color: rgba(196, 192, 255, .22);
  background: #202448;
  color: var(--ink);
}

html[data-theme="dark"] .inner-search input,
html[data-theme="dark"] .filter-pill,
html[data-theme="dark"] .date-control,
html[data-theme="dark"] .view-switch button,
html[data-theme="dark"] .calendar-nav,
html[data-theme="dark"] .table-head,
html[data-theme="dark"] .history-visit,
html[data-theme="dark"] .history-full-record,
html[data-theme="dark"] .history-transcript,
html[data-theme="dark"] .birth-date-popover,
html[data-theme="dark"] .patient-edit-dialog,
html[data-theme="dark"] .history-dialog,
html[data-theme="dark"] .waiting-action-menu button,
html[data-theme="dark"] .patient-record-menu button,
html[data-theme="dark"] .scale-card,
html[data-theme="dark"] .scale-recommendation,
html[data-theme="dark"] .extraction-card,
html[data-theme="dark"] .document-selected-type,
html[data-theme="dark"] .document-thinking,
html[data-theme="dark"] .document-review-note,
html[data-theme="dark"] .document-dialog-warning,
html[data-theme="dark"] .document-draft-field textarea,
html[data-theme="dark"] .document-package-patient,
html[data-theme="dark"] .document-package-list li,
html[data-theme="dark"] .patient-document-security,
html[data-theme="dark"] .patient-document-file,
html[data-theme="dark"] .patient-document-row {
  color: #eef0ff;
}

html[data-theme="dark"] .table-head,
html[data-theme="dark"] .patient-table-row:hover,
html[data-theme="dark"] .history-full-record,
html[data-theme="dark"] .history-transcript,
html[data-theme="dark"] .scale-recommendation,
html[data-theme="dark"] .document-selected-type,
html[data-theme="dark"] .document-review-note,
html[data-theme="dark"] .document-dialog-warning,
html[data-theme="dark"] .patient-document-security {
  background: #272b55;
}

html[data-theme="dark"] .date-control button,
html[data-theme="dark"] .calendar-nav,
html[data-theme="dark"] .birth-calendar-head button,
html[data-theme="dark"] .birth-calendar-head select {
  border-color: #515783;
  background: #292d58;
  color: #ddd8ff;
}
html[data-theme="dark"] .view-switch button.active {
  background: #4a3c88;
  color: #f0eaff;
}
html[data-theme="dark"] .birth-calendar-grid button:hover,
html[data-theme="dark"] .patient-record-menu button:hover,
html[data-theme="dark"] .waiting-action-menu button:hover {
  background: #373369;
  color: #fff;
}
/* Links e botões-link em roxo escuro (--purple-dark) ficam quase ilegíveis sobre o fundo escuro dos cartões,
   porque o texto não tem um fundo claro próprio (diferente dos "badges"/chips, que mantêm fundo claro e por
   isso já são legíveis nos dois temas). */
html[data-theme="dark"] .card-heading a,
html[data-theme="dark"] .link-button,
html[data-theme="dark"] .add-reminder {
  color: #c9bfff;
}
html[data-theme="dark"] .add-reminder:hover { background: rgba(196, 192, 255, .14); }
html[data-theme="dark"] .birth-calendar-grid button.muted { color: #777fae; }

html[data-theme="dark"] .content input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .content select,
html[data-theme="dark"] .content textarea,
html[data-theme="dark"] .profile-modal input,
html[data-theme="dark"] .profile-modal select,
html[data-theme="dark"] .profile-modal textarea,
html[data-theme="dark"] .header-popover input,
html[data-theme="dark"] .header-popover select,
html[data-theme="dark"] .header-popover textarea,
html[data-theme="dark"] .document-generator select,
html[data-theme="dark"] .referral-specialty-field input,
html[data-theme="dark"] .scale-frequency select,
html[data-theme="dark"] .patient-document-form input {
  border-color: #565d8e;
  background: #202448;
  color: #eef0ff;
}
html[data-theme="dark"] .content input::placeholder,
html[data-theme="dark"] .content textarea::placeholder,
html[data-theme="dark"] .profile-modal input::placeholder,
html[data-theme="dark"] .profile-modal textarea::placeholder,
html[data-theme="dark"] .inner-search input::placeholder,
html[data-theme="dark"] .global-search input::placeholder {
  color: #aeb7df;
  opacity: 1;
}
html[data-theme="dark"] .document-draft-field textarea { color: #e7eaff; }
html[data-theme="dark"] .setting-field label,
html[data-theme="dark"] .profile-modal label,
html[data-theme="dark"] .document-generator label,
html[data-theme="dark"] .referral-specialty-field,
html[data-theme="dark"] .scale-frequency label,
html[data-theme="dark"] .patient-document-form label {
  color: #e0e4ff;
}

html[data-theme="dark"] .status.blue { color: #b7d4ff; background: #23416e; }
html[data-theme="dark"] .status.purple { color: #e0c9ff; background: #4b3471; }
html[data-theme="dark"] .status.amber { color: #ffdc91; background: #59451e; }
html[data-theme="dark"] .status.red { color: #ffb9c8; background: #5a2d47; }
html[data-theme="dark"] .status.gray { color: #d0d5f0; background: #3a4165; }
html[data-theme="dark"] .status.white { color: #d6dcf5; background: #343b63; border-color: #565d8e; }
html[data-theme="dark"] .tag { color: #e1d8ff; background: #3c3270; }
html[data-theme="dark"] .attention { color: #ffc4e2; background: #543251; }
html[data-theme="dark"] .consultation-header-timer { border-color: #615b9c; background: linear-gradient(145deg, #302b5b, #25294f); color: #e4ddff; }
html[data-theme="dark"] .consultation-header-timer span { color: #bec6e7; }

html[data-theme="dark"] .document-editor-modal,
html[data-theme="dark"] .document-package-dialog,
html[data-theme="dark"] .results-modal,
html[data-theme="dark"] .medication-catalog-modal,
html[data-theme="dark"] .template-modal {
  border-color: rgba(196, 192, 255, .24);
  background: linear-gradient(145deg, #202448, #171a38);
}
html[data-theme="dark"] .document-editor-header {
  border-bottom-color: rgba(196, 192, 255, .18);
  background: linear-gradient(135deg, #2c2958, #30275b 68%, #26345d);
}
html[data-theme="dark"] .document-editor-footer,
html[data-theme="dark"] .header-popover footer {
  border-top-color: rgba(196, 192, 255, .18);
  background: #1a1e40;
}
html[data-theme="dark"] .document-processing-steps .active { color: #d4c7ff; }
html[data-theme="dark"] .document-processing-steps .complete { color: #8de5cf; }
html[data-theme="dark"] .document-package-link input { border-color: #565d8e; background: #202448; color: #eef0ff; }
html[data-theme="dark"] .document-package-delivery { border-color: rgba(240, 217, 168, .25); color: #ffe0a0; background: #4a391c; }
html[data-theme="dark"] .document-confirmed-copy { border-color: rgba(101, 218, 177, .25); color: #a5efd8; background: #1d4a42; }
html[data-theme="dark"] .document-confirmed-copy strong { color: #baf4e2; }
html[data-theme="dark"] .patient-document-file-icon { color: #d9ccff; background: #38316d; }
html[data-theme="dark"] .patient-document-empty { color: #bec6e7; background: #272b55; }
html[data-theme="dark"] .patient-document-error p,
html[data-theme="dark"] .patient-document-loading p { color: #c4cbed; }

html[data-theme="dark"] .questionnaire-last-status.completed { color: #a6efd9; background: #1d4d44; }
html[data-theme="dark"] .template-card-copy small,
html[data-theme="dark"] .template-section-heading p,
html[data-theme="dark"] .reports-toolbar label,
html[data-theme="dark"] .reports-period-note,
html[data-theme="dark"] .birth-calendar-weekdays {
  color: #c4cbed;
}

/* Indicadores financeiros e demanda da agenda */
.report-section-label { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:20px 0 10px; }
.report-section-label span { color:var(--ink); font:800 13px Manrope; }
.report-section-label small { color:var(--muted); font-size:10px; }
.reports-financial-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.financial-card { min-height:124px; }
.report-kpi-icon.purple { color:#8654f1; background:#eee5ff; }
.report-trend.positive { color:#128b70; }
.report-trend.negative { color:#bd4662; }
.report-trend.neutral { color:var(--muted); font-size:16px !important; letter-spacing:-.2px !important; }
.reports-financial-detail-grid,
.reports-demand-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:14px; margin-bottom:14px; }
.report-source-list { display:grid; gap:4px; }
.report-source-row { position:relative; display:flex; align-items:center; gap:12px; padding:12px 0 12px 13px; border-bottom:1px solid var(--line); }
.report-source-row:last-child { border-bottom:0; }
.report-source-row > div { display:grid; gap:4px; min-width:0; flex:1; }
.report-source-row strong { color:var(--ink); font:800 12px Manrope; }
.report-source-row small { color:var(--ink-soft); font-size:10px; line-height:1.4; }
.report-source-row b { color:var(--ink); font:800 15px Manrope; white-space:nowrap; }
.report-source-row b.source-count { color:var(--blue); }
.source-dot { width:9px; height:9px; flex:none; border-radius:50%; background:#8c5bf2; box-shadow:0 0 0 4px rgba(140,91,242,.12); }
.source-dot.convenio { background:#3987e9; box-shadow:0 0 0 4px rgba(57,135,233,.12); }
.report-financial-note .report-stat-list > div { padding:12px 0; }
.report-ranking-meta { display:block; color:var(--muted); font-size:9px; }
.report-weekday-ranking .report-ranking-item { gap:4px; }

.agenda-billing-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; margin-top:17px; padding-top:17px; border-top:1px solid var(--line); }
.agenda-dialog-field { display:grid; gap:6px; min-width:0; }
.agenda-dialog-field > span { color:var(--ink); font:800 10px Manrope; }
.agenda-dialog-field select,
.agenda-dialog-field input { width:100%; box-sizing:border-box; height:40px; padding:0 10px; border:1px solid #ded8f3; border-radius:10px; color:var(--ink); background:#fff; font:500 12px 'DM Sans',system-ui,sans-serif; outline:0; }
.agenda-dialog-field select:focus,
.agenda-dialog-field input:focus { border-color:var(--purple); box-shadow:0 0 0 3px rgba(119,86,235,.12); }
.agenda-dialog-field small { color:var(--muted); font-size:9px; line-height:1.35; }
.agenda-value-field { grid-column:1 / -1; }
.agenda-convenio-note { grid-column:1 / -1; display:flex; align-items:flex-start; gap:8px; padding:10px 11px; border:1px solid #dce6fb; border-radius:10px; color:#4f6598; background:#f4f8ff; font-size:10px; line-height:1.4; }
.agenda-convenio-note svg { width:15px; height:15px; flex:none; color:#3987e9; }
.appointment-billing { color:var(--purple-dark) !important; font-weight:700; }
@media (max-width: 1100px) {
  .reports-financial-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .reports-financial-detail-grid, .reports-demand-grid { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .report-section-label { display:grid; gap:4px; }
  .reports-financial-grid { grid-template-columns:1fr; }
  .agenda-billing-fields { grid-template-columns:1fr; }
  .agenda-value-field, .agenda-convenio-note { grid-column:auto; }
}
html[data-theme="dark"] .report-kpi-icon.purple { color:#d7c4ff; background:#3e3474; }
html[data-theme="dark"] .report-trend.positive { color:#9ae8d1; }
html[data-theme="dark"] .report-trend.negative { color:#ffb9c8; }
html[data-theme="dark"] .report-source-row small,
html[data-theme="dark"] .report-ranking-meta,
html[data-theme="dark"] .report-section-label small { color:#c4cbed; }
html[data-theme="dark"] .agenda-billing-fields { border-top-color:rgba(196,192,255,.2); }
html[data-theme="dark"] .agenda-dialog-field > span { color:#e5e9ff; }
html[data-theme="dark"] .agenda-dialog-field select,
html[data-theme="dark"] .agenda-dialog-field input { border-color:#565d8e; background:#202448; color:#eef0ff; }
html[data-theme="dark"] .agenda-convenio-note { border-color:rgba(116,164,245,.25); color:#c5d8ff; background:#26395f; }
html[data-theme="dark"] .appointment-billing { color:#d6c8ff !important; }

/* Revisão das abas e editor único da prescrição */
.record-tab-label { min-width:0; }
.record-tab-alert { display:inline-grid; place-items:center; width:17px; height:17px; margin-left:auto; border-radius:50%; background:#d75a77; color:#fff; font:800 11px/1 Manrope; box-shadow:0 0 0 3px rgba(215,90,119,.12); }
.tabbar button.active .record-tab-alert { background:#bd4566; }
/* Sugestão da IA na aba Prescrição (decisão do usuário, 16/10/2026): marca pequena com o gradiente do iPsiquiatra. */
.record-tab-suggestion { display:inline-grid; place-items:center; width:17px; height:17px; margin-left:auto; border-radius:50%; background:linear-gradient(100deg,#be4df3,#4b78ed); color:#fff; box-shadow:0 0 0 3px rgba(150,98,240,.14); }
.record-tab-alert + .record-tab-suggestion { margin-left:4px; }
.record-tab-suggestion svg { width:10px; height:10px; }
.prescription-confirmed { display:flex; align-items:center; gap:8px; margin-top:12px; padding:10px 13px; border:1px solid #cfe9d9; border-radius:11px; background:#f3fbf6; color:#26704a; font:700 11px/1.4 Manrope; }
.prescription-confirmed svg { flex:none; width:15px; height:15px; }
html[data-theme="dark"] .prescription-confirmed { border-color:#2f6b4f; background:#1d3a30; color:#bfeed4; }
.prescription-text-editor { display:grid; gap:7px; margin-top:2px; }
.prescription-text-editor > span { color:var(--ink); font:800 11px Manrope; }
.prescription-text-editor textarea { width:100%; min-height:330px; box-sizing:border-box; resize:vertical; padding:16px; border:1px solid #ded8f3; border-radius:13px; color:var(--ink); background:linear-gradient(145deg,#fff,#fbfaff); font:500 13px/1.7 'DM Sans',system-ui,sans-serif; outline:0; white-space:pre-wrap; }
.prescription-text-editor textarea:focus { border-color:var(--purple); box-shadow:0 0 0 3px rgba(119,86,235,.12); }
.prescription-text-editor textarea:disabled { opacity:.72; cursor:wait; }
.prescription-text-editor small { color:var(--muted); font-size:10px; line-height:1.4; }
.prescription-name-mode-summary, .medication-preference-mode { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; margin:0 0 17px; padding:14px 15px; border:1px solid #e1daf8; border-radius:13px; background:linear-gradient(135deg,#fbf9ff,#f5f1ff); }
.medication-preference-mode { margin-top:2px; }
.medication-library-launch { display:flex; align-items:center; gap:12px; padding:14px 15px; border:1px solid #e1daf8; border-radius:13px; background:linear-gradient(135deg,#fbf9ff,#f5f1ff); }
.medication-library-launch > .settings-icon { width:34px; height:34px; flex:none; }
.medication-library-launch > div:nth-child(2) { display:grid; gap:4px; flex:1; min-width:0; }
.medication-library-launch strong { color:var(--ink); font:800 12px Manrope; }
.medication-library-launch span { color:var(--muted); font-size:10px; line-height:1.4; }
.prescription-name-mode-values { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.prescription-name-mode-values span { color:#9a96ad; font:700 10px Manrope; transition:color .2s ease; }
.prescription-name-mode-values span.is-active { color:var(--purple-dark); }
.prescription-name-mode-summary .settings-hint, .medication-preference-mode .settings-hint { grid-column:1 / -1; margin:0; }
html[data-theme="dark"] .prescription-name-mode-summary, html[data-theme="dark"] .medication-preference-mode { border-color:#4a4f7d; background:linear-gradient(135deg,#262751,#222548); }
html[data-theme="dark"] .medication-library-launch { border-color:#4a4f7d; background:linear-gradient(135deg,#262751,#222548); }
html[data-theme="dark"] .medication-library-launch strong { color:#eef0ff; }
html[data-theme="dark"] .medication-library-launch span { color:#c4cbed; }
html[data-theme="dark"] .medication-catalog-option.is-selected { border-color:#ab91ff; background:linear-gradient(135deg,#8451db,#5557d8); }
html[data-theme="dark"] .prescription-name-mode-values span { color:#9da4c9; }
html[data-theme="dark"] .prescription-name-mode-values span.is-active { color:#d7c4ff; }
@media (max-width: 760px) { .prescription-name-mode-summary, .medication-preference-mode { grid-template-columns:1fr; } .prescription-name-mode-values { justify-content:space-between; } .prescription-name-mode-summary .button, .medication-preference-mode .prescription-name-mode-toggle { justify-self:start; } .medication-library-launch { align-items:stretch; flex-direction:column; } }
html[data-theme="dark"] .record-tab-alert { background:#d86888; color:#180d20; box-shadow:0 0 0 3px rgba(216,104,136,.18); }
html[data-theme="dark"] .prescription-text-editor textarea { border-color:#565d8e; background:#202448; color:#eef0ff; }
html[data-theme="dark"] .prescription-text-editor textarea:focus { border-color:#a68cff; box-shadow:0 0 0 3px rgba(166,140,255,.2); }
html[data-theme="dark"] .prescription-text-editor small { color:#c4cbed; }
.orientation-approval { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.orientation-approval small { color:var(--muted); font-size:10px; line-height:1.4; }
html[data-theme="dark"] .orientation-approval { border-top-color:rgba(196,192,255,.2); }
html[data-theme="dark"] .orientation-approval small { color:#c4cbed; }
@media (max-width: 560px) { .orientation-approval { align-items:stretch; flex-direction:column; } }
/* Patrícia — painel do médico e avisos da agenda */
.patricia-settings-card { display:grid; gap:14px; margin-top:14px; }
.pat-form { display:grid; gap:14px; }
.pat-badge { display:inline-flex; align-items:center; gap:4px; margin-left:6px; padding:3px 8px; border-radius:99px; font:700 10px Manrope,'DM Sans',system-ui,sans-serif; white-space:nowrap; background:#ece6ff; color:#5a2fd0; }
.pat-badge svg { flex:none; width:11px; height:11px; position:relative; left:1px; }
.setting-field textarea { width:100%; min-height:78px; resize:vertical; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.7); color:var(--ink); font:500 13px 'DM Sans',system-ui,sans-serif; line-height:1.5; }
.setting-field textarea:focus { outline:2px solid rgba(116,60,255,.35); outline-offset:1px; }
.pat-save-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.pat-message { font:600 12px 'DM Sans',system-ui,sans-serif; color:var(--muted); }
.pat-message.ok { color:#0b7a58; } .pat-message.bad { color:#c22346; }
.pat-link-box { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:11px 14px; border:1px solid var(--line); border-radius:13px; background:var(--lavender); }
.pat-link-box code { color:var(--ink); font:700 12.5px 'DM Sans',system-ui,sans-serif; overflow-wrap:anywhere; }
.pat-link-box > div { display:flex; gap:8px; }
.pat-empty, .pat-usage { color:var(--muted); font-size:12px; line-height:1.5; }
.pat-form [hidden] { display:none !important; }
.pat-conditional { display:grid; gap:6px; }
.pat-sub { margin:4px 0 0; font:700 12px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.pat-list { display:grid; gap:8px; }
.pat-booking { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid var(--notice-border); border-radius:12px; background:var(--notice-bg); }
.pat-booking strong { display:block; font:700 12.5px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.pat-booking small { display:block; color:var(--ink-soft); font-size:11.5px; line-height:1.45; }
.pat-booking small.pat-warn, .pat-older small.pat-warn { color:var(--purple-dark); font-weight:600; }
.pat-crisis-identity { display:block; color:var(--ink); font-size:11.5px; }
.pat-alert-body .pat-crisis-identity { margin-top:2px; }
/* Crise: mesma paleta, destacada pela barra roxa à esquerda e pelo selo "Urgente" (sem vermelho). */
.pat-booking.crisis { border-color:#b9a6f5; box-shadow:inset 3px 0 0 var(--purple-dark); }
.pat-urgent { display:inline-flex; align-items:center; margin-left:6px; padding:2px 8px; border-radius:99px; background:var(--purple-dark); color:#fff; font:700 10px Manrope,'DM Sans',system-ui,sans-serif; vertical-align:middle; }
.pat-crisis-chat-text { margin:4px 0 0; color:var(--ink); font-size:11.5px; line-height:1.5; }
.pat-crisis-excerpt-line { display:block; margin-top:3px; }
.pat-history-row { align-items:flex-start; }
/* Ícone com tamanho fixo e texto ocupando o resto: sem isso, o texto dos avisos da central ficava empurrado para o meio. */
.pat-booking > div:not(.pat-alert-icon):not(.pat-history-status) { flex:1; min-width:0; }
.pat-booking .pat-alert-icon { flex:none; width:28px; height:28px; display:grid; place-items:center; border-radius:9px; background:#e6e0ff; color:#5a2fd0; }
.pat-booking .pat-alert-icon svg { width:14px; height:14px; }
.pat-booking.crisis .pat-alert-icon { background:var(--purple-dark); color:#fff; }
.pat-history-status { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:none; }
.pat-read-status { padding:3px 9px; border-radius:99px; font:700 10px Manrope,'DM Sans',system-ui,sans-serif; white-space:nowrap; }
.pat-read-status.unread { background:#ece6ff; color:#5a2fd0; }
.pat-read-status.read { background:#eceffd; color:#6b7195; }
/* Um scroll só na central de notificações: o do próprio diálogo (decisão do usuário, 12/10/2026). */
.pat-history-list { padding-right:2px; gap:18px; }
/* Avisos agrupados por paciente ("Pendências de fulano"), na central e no sino. */
.pat-group { display:grid; gap:8px; }
.notification-patricia-list { display:grid; gap:14px; }
.pat-group-head { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; padding:0 2px; }
.pat-group-head strong { display:block; color:var(--ink); font:800 12.5px Manrope,'DM Sans',system-ui,sans-serif; }
.pat-group-hint { display:block; margin-top:1px; color:var(--ink-soft); font-size:11px; line-height:1.4; }
.pat-group-count { flex:none; padding:2px 9px; border-radius:99px; background:#ece6ff; color:#5a2fd0; font:700 10px Manrope,'DM Sans',system-ui,sans-serif; white-space:nowrap; }
.pat-convo { border-top:1px dashed var(--line); padding-top:8px; font-size:12px; color:var(--ink-soft); }
.pat-convo summary { cursor:pointer; font:700 12px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.pat-convo p { margin:6px 0 0; line-height:1.5; overflow-wrap:anywhere; }
.agenda-audit-card { margin-top:14px; }
.agenda-audit-list { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:8px; max-height:360px; overflow-y:auto; }
.agenda-audit-row { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.55); }
.agenda-audit-row strong { display:block; font:700 12.5px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.agenda-audit-row span { display:block; color:var(--muted); font-size:11.5px; line-height:1.45; }
.agenda-audit-icon { display:flex; align-items:center; justify-content:center; width:26px; height:26px; flex:none; border-radius:50%; background:var(--surface-2,rgba(0,0,0,.05)); color:var(--ink-soft); }
html[data-theme="dark"] .agenda-audit-row { background:rgba(255,255,255,.04); }
.pat-convo p.patient b { color:#5a2fd0; }
@keyframes pat-alert-in { from { opacity:0; transform:translateY(-12px) scale(.97); } to { opacity:1; transform:none; } }
#pat-alert-bar { position:fixed; top:16px; right:16px; z-index:1200; width:min(400px,calc(100vw - 28px)); max-height:calc(100vh - 32px); overflow:auto; display:grid; gap:10px; padding:16px; border-radius:20px; background:linear-gradient(180deg,#fff,#fbfaff); border:1px solid rgba(116,60,255,.22); box-shadow:0 26px 60px rgba(45,31,120,.22), 0 3px 10px rgba(45,31,120,.08); animation:pat-alert-in .32s cubic-bezier(.2,.8,.2,1); }
#pat-alert-bar .pat-alert-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:2px; border-bottom:1px solid rgba(116,60,255,.14); }
#pat-alert-bar .pat-alert-head strong { display:flex; align-items:center; gap:7px; color:var(--purple-dark); font:800 13px Manrope,'DM Sans',system-ui,sans-serif; letter-spacing:.1px; }
#pat-alert-bar .pat-alert-head strong svg { width:15px; height:15px; flex:none; }
#pat-alert-bar .pat-alert-head button { border:0; background:rgba(74,37,215,.09); color:var(--purple-dark); border-radius:99px; padding:6px 12px; font:700 10.5px Manrope,'DM Sans',system-ui,sans-serif; cursor:pointer; white-space:nowrap; transition:.15s ease; }
#pat-alert-bar .pat-alert-head button:hover { background:rgba(74,37,215,.16); }
#pat-alert-bar .pat-alert { display:flex; align-items:flex-start; gap:11px; padding:12px; border-radius:14px; background:var(--notice-bg); border:1px solid var(--notice-border); transition:.15s ease; }
#pat-alert-bar .pat-alert:hover { border-color:#b9a6f5; }
#pat-alert-bar .pat-alert.crisis { border-color:#b9a6f5; box-shadow:inset 3px 0 0 var(--purple-dark); }
#pat-alert-bar .pat-alert-icon { flex:none; width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:#e6e0ff; color:#5a2fd0; }
#pat-alert-bar .pat-alert-icon svg { width:16px; height:16px; }
#pat-alert-bar .pat-alert.crisis .pat-alert-icon { background:var(--purple-dark); color:#fff; }
#pat-alert-bar .pat-alert-body { flex:1; min-width:0; }
#pat-alert-bar .pat-alert strong { display:block; font:800 12.5px Manrope,'DM Sans',system-ui,sans-serif; color:#101658; }
#pat-alert-bar .pat-alert small, #pat-alert-bar .pat-more { color:var(--ink-soft); font-size:11px; }
#pat-alert-bar .pat-more { text-align:center; padding-top:2px; }
#pat-alert-bar .pat-alert p { margin:5px 0 0; font-size:12px; line-height:1.5; color:#33397a; overflow-wrap:anywhere; }
.pat-alert-btn { display:inline-flex; align-items:center; gap:5px; margin-top:8px; margin-right:6px; padding:5px 11px; border:1px solid #d8d0ff; border-radius:99px; background:#fff; color:#5a2fd0; font:700 11px Manrope,'DM Sans',system-ui,sans-serif; cursor:pointer; align-self:flex-start; transition:.15s ease; }
.pat-alert-btn svg { width:12px; height:12px; flex:none; }
.pat-alert-btn:hover { background:#f4f0ff; border-color:#c3b6f5; }
.pat-report { margin-top:8px; padding:8px 10px; border:1px solid #d8d0ff; border-radius:10px; background:#fff; }
.pat-report > small { display:block; font-weight:700; color:#5a2fd0; }
.pat-report .pat-report-text, #pat-alert-bar .pat-alert .pat-report-text { margin:5px 0 0; max-height:260px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.5; color:#242a66; }
html[data-theme="dark"] .pat-report { background:#1f2250; border-color:rgba(207,195,255,.25); }
html[data-theme="dark"] .pat-report > small { color:#cfc3ff; }
html[data-theme="dark"] .pat-report .pat-report-text, html[data-theme="dark"] #pat-alert-bar .pat-alert .pat-report-text { color:#e3e6ff; }
.rem-checklist { display:grid; gap:8px; padding:12px 14px; border:1px solid #e5defc; border-radius:13px; background:linear-gradient(145deg,#fbfaff,#f4f0ff); }
.rem-check { display:flex; align-items:flex-start; gap:10px; }
.rem-check > div { display:grid; gap:2px; }
.rem-check strong { color:var(--ink); font:700 12px Manrope; }
.rem-check small { color:var(--muted); font-size:11px; line-height:1.45; }
.rem-dot { display:inline-block; width:9px; height:9px; margin-top:4px; border-radius:50%; background:#b9bcd9; flex:none; }
.rem-dot.ok { background:#15a77d; } .rem-dot.bad { background:var(--red); } .rem-dot.warn { background:var(--amber); } .rem-dot.wait { background:#8b93c9; }
.rem-toggle { display:flex; align-items:flex-start; gap:10px; cursor:pointer; }
.rem-toggle input { position:absolute; opacity:0; pointer-events:none; }
.rem-toggle > span:last-child { display:grid; gap:3px; }
.rem-toggle strong { color:var(--ink); font:700 12px Manrope; }
.rem-toggle small { color:var(--muted); font-size:11px; line-height:1.45; }
.rem-toggle input:checked + .switch-visual { background:linear-gradient(135deg,#a855f7,#5b5ce2); }
.rem-toggle input:checked + .switch-visual i { transform:translateX(17px); }
.rem-toggle input:focus-visible + .switch-visual { outline:2px solid var(--purple); outline-offset:2px; }
.rem-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.rem-setup { border:1px dashed var(--line); border-radius:13px; padding:10px 14px; color:var(--ink-soft); font-size:12px; line-height:1.55; }
.rem-setup summary { cursor:pointer; color:var(--ink); font:700 12px Manrope; }
.rem-setup ol { margin:10px 0 8px; padding-left:18px; display:grid; gap:8px; }
@media (max-width:640px) { .pat-link-box { flex-direction:column; align-items:stretch; } .rem-grid { grid-template-columns:1fr; } }
html[data-theme="dark"] .pat-badge { background:#332a6b; color:#cfc3ff; }
html[data-theme="dark"] .pat-new-count { background:#332a6b; color:#cfc3ff; }
html[data-theme="dark"] .setting-field textarea { background:rgba(40,43,83,.5); }
html[data-theme="dark"] .pat-booking.crisis { border-color:#7d6cc9; box-shadow:inset 3px 0 0 #cfc3ff; }
html[data-theme="dark"] .pat-booking small.pat-warn, html[data-theme="dark"] .pat-older small.pat-warn { color:#d4c8ff; }
html[data-theme="dark"] .pat-urgent { background:#cfc3ff; color:#1b1f45; }
html[data-theme="dark"] .pat-group-count { background:#332a6b; color:#cfc3ff; }
html[data-theme="dark"] .pat-booking .pat-alert-icon { background:#3a3670; color:#cfc3ff; }
html[data-theme="dark"] .pat-booking.crisis .pat-alert-icon { background:#cfc3ff; color:#1b1f45; }
html[data-theme="dark"] .pat-crisis-chat-text { color:#e5e2f7; }
html[data-theme="dark"] .pat-read-status.unread { background:#332a6b; color:#cfc3ff; }
html[data-theme="dark"] .pat-read-status.read { background:#2b3060; color:#c3c9e8; }
html[data-theme="dark"] .pat-message.ok { color:#7fe0bd; } html[data-theme="dark"] .pat-message.bad { color:#ff9fb4; }
html[data-theme="dark"] .pat-convo p.patient b { color:#cfc3ff; }
html[data-theme="dark"] #pat-alert-bar { background:linear-gradient(180deg,#1b1f45,#181c3d); border-color:rgba(176,183,240,.24); }
html[data-theme="dark"] #pat-alert-bar .pat-alert-head { border-bottom-color:rgba(176,183,240,.18); }
html[data-theme="dark"] #pat-alert-bar .pat-alert-head strong { color:#d4c8ff; }
html[data-theme="dark"] #pat-alert-bar .pat-alert.crisis { border-color:#7d6cc9; box-shadow:inset 3px 0 0 #cfc3ff; }
html[data-theme="dark"] #pat-alert-bar .pat-alert-icon { background:#3a3670; color:#cfc3ff; } html[data-theme="dark"] #pat-alert-bar .pat-alert.crisis .pat-alert-icon { background:#cfc3ff; color:#1b1f45; }
html[data-theme="dark"] #pat-alert-bar .pat-alert strong { color:#eef0ff; } html[data-theme="dark"] #pat-alert-bar .pat-alert p, html[data-theme="dark"] #pat-alert-bar .pat-alert small, html[data-theme="dark"] #pat-alert-bar .pat-more { color:#c9cff0; }
html[data-theme="dark"] #pat-alert-bar .pat-alert-head button { background:rgba(207,195,255,.14); color:#d4c8ff; }
html[data-theme="dark"] .pat-alert-btn { background:#292650; color:#cfc3ff; border-color:#4a4483; }
html[data-theme="dark"] .rem-checklist { background:rgba(40,43,83,.5); border-color:rgba(196,192,255,.16); }

/* ---- Lembretes e SMS (reminders-ui.js) ---- */
.reminders-settings-card { display:grid; gap:14px; margin-top:14px; }
.reminders-settings-card .settings-card-heading { margin-bottom:2px; }
.rem-toggle.is-disabled { opacity:.55; cursor:not-allowed; }
.rem-group { display:grid; gap:10px; padding:12px 14px; border:1px solid var(--line); border-radius:13px; }
.rem-setup code { display:inline-block; max-width:100%; padding:1px 6px; border-radius:6px; background:var(--lavender); color:var(--ink); font-size:11px; overflow-wrap:anywhere; }
.rem-badge { display:inline-flex; align-items:center; margin-left:6px; padding:3px 8px; border-radius:99px; font:700 10px Manrope; white-space:nowrap; background:#eceffd; color:#4f579d; }
.rem-badge.ok { background:#dcf6ec; color:#0b7a58; } .rem-badge.warn { background:#fff0d6; color:#9a6206; } .rem-badge.bad { background:#ffe1e8; color:#c22346; } .rem-badge.wait { background:#eceffd; color:#4f579d; }
.rem-dot.ok, .rem-dot.bad, .rem-dot.warn, .rem-dot.wait { vertical-align:middle; }
.rem-block { display:grid; gap:9px; margin:12px 0; padding:12px 14px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.55); }
.rem-block-head strong { display:block; color:var(--ink); font:700 12px Manrope; }
.rem-block-head small, .rem-hint { color:var(--muted); font-size:11px; line-height:1.45; }
.rem-line { display:flex; justify-content:space-between; gap:12px; font-size:12px; color:var(--ink-soft); }
.rem-line strong { text-align:right; font:600 12px 'DM Sans',system-ui,sans-serif; color:var(--ink); }
.rem-line strong.ok { color:#0b7a58; } .rem-line strong.bad { color:#c22346; }
.rem-response { display:grid; gap:2px; padding:9px 11px; border-radius:10px; }
.rem-response strong { font:700 12px Manrope; } .rem-response small { font-size:11px; opacity:.85; }
.rem-response.ok { background:#dcf6ec; color:#0b7a58; } .rem-response.warn { background:#fff0d6; color:#9a6206; } .rem-response.bad { background:#ffe1e8; color:#c22346; }
.rem-optout { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 11px; border-radius:10px; background:#fff0d6; color:#9a6206; font-size:12px; }
.rem-actions { display:flex; flex-wrap:wrap; gap:8px; }
.rem-actions .button { flex:1 1 170px; justify-content:center; }
@media (max-width:640px) { .rem-grid { grid-template-columns:1fr; } }
html[data-theme="dark"] .rem-block { background:rgba(40,43,83,.4); }
html[data-theme="dark"] .rem-badge { background:#2b3060; color:#c3c9e8; }
html[data-theme="dark"] .rem-badge.ok, html[data-theme="dark"] .rem-response.ok { background:#123d31; color:#7fe0bd; }
html[data-theme="dark"] .rem-badge.warn, html[data-theme="dark"] .rem-response.warn, html[data-theme="dark"] .rem-optout { background:#4a3a10; color:#f0d9a8; }
html[data-theme="dark"] .rem-badge.bad, html[data-theme="dark"] .rem-response.bad { background:#4a1a2a; color:#ff9fb4; }
html[data-theme="dark"] .rem-line strong.ok { color:#7fe0bd; } html[data-theme="dark"] .rem-line strong.bad { color:#ff9fb4; }
html[data-theme="dark"] .rem-setup code { background:#292650; }

/* Prontuário → Auditoria & Consultoria (decisão do usuário, 15/10/2026): o relatório no gradiente do iPsiquiatra, como o briefing */
.audit-generator { align-items:center; flex-wrap:wrap; margin-top:18px; }
.audit-note { color:var(--ink-soft); font-size:13px; }
.audit-generator.is-start { flex-direction:column; align-items:center; gap:10px; margin:26px 0 8px; text-align:center; }
.audit-generator.is-start .audit-note { max-width:440px; font-size:11px; line-height:1.5; }
.audit-loading { display:flex; align-items:center; gap:14px; margin-top:16px; padding:16px 18px; border-radius:16px; background:var(--notice-bg); border:1px solid var(--notice-border); }
.audit-loading strong { display:block; color:var(--ink); }
.audit-loading p { margin:2px 0 0; color:var(--ink-soft); font-size:13px; }
.audit-spinner { flex:none; width:28px; height:28px; border:3px solid rgba(113,60,255,.16); border-top-color:#713cff; border-right-color:#a34dff; border-radius:50%; animation:synthesis-spin .85s linear infinite; }
.audit-report { margin-top:16px; padding:18px 20px; border-radius:16px; background:var(--notice-bg); border:1px solid var(--notice-border); color:var(--ink); line-height:1.55; }
.audit-report h3 { margin:18px 0 8px; font:700 15px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.audit-report h3:first-child { margin-top:0; }
.audit-report p, .audit-report ul, .audit-report ol { margin:0 0 10px; font-size:14px; color:var(--ink); }
.audit-report ul, .audit-report ol { padding-left:20px; }
.audit-report li + li { margin-top:4px; }
.audit-table-wrap { overflow-x:auto; margin:0 0 12px; border-radius:12px; border:1px solid var(--line); background:rgba(255,255,255,.7); }
.audit-table-wrap table { width:100%; border-collapse:collapse; font-size:13px; }
.audit-table-wrap th, .audit-table-wrap td { padding:9px 12px; text-align:left; vertical-align:top; border-bottom:1px solid var(--line); color:var(--ink); }
.audit-table-wrap th { font-weight:700; background:rgba(116,60,255,.07); }
.audit-table-wrap tr:last-child td { border-bottom:0; }
.audit-score { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.audit-stars { display:inline-flex; gap:2px; font-size:20px; line-height:1; }
.audit-stars .is-full { color:#6a2ff0; }
.audit-stars .is-empty { color:rgba(106,47,240,.2); }
.audit-legacy-score { font-size:13px; font-weight:600; color:#6a2ff0; }
.audit-disclaimer { display:flex; gap:8px; align-items:flex-start; margin:12px 0 0; color:var(--ink-soft); font-size:12.5px; }
.audit-error p { color:var(--ink-soft); }
.audit-history { margin-top:22px; }
.audit-history h3 { display:flex; align-items:center; gap:8px; margin:0 0 10px; font:700 15px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.audit-history h3 span { padding:1px 9px; border-radius:999px; background:var(--notice-bg); border:1px solid var(--notice-border); font-size:12px; color:var(--ink-soft); }
.audit-history-item { border:1px solid var(--line); border-radius:14px; }
.audit-history-item + .audit-history-item { margin-top:8px; }
.audit-history-item summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; cursor:pointer; color:var(--ink); font-size:14px; }
.audit-history-item summary > span:not(.audit-stars) { display:flex; align-items:center; gap:8px; }
.audit-history-item summary .audit-stars { flex:none; font-size:17px; }
.audit-history-item[open] summary { border-bottom:1px solid var(--line); }
.audit-history-item .audit-report { margin:12px; }
html[data-theme="dark"] .audit-table-wrap { background:rgba(255,255,255,.04); }
html[data-theme="dark"] .audit-stars .is-full { color:#c9b8ff; }
html[data-theme="dark"] .audit-stars .is-empty { color:rgba(201,184,255,.22); }

/* Configurações → Convênios e repasses */
/* Mesmo espaço dos outros boxes soltos depois do formulário (Layout, Auditoria, Lembretes, Patrícia): sem ele, encostava no Layout */
.insurance-settings-card { margin-top:14px; }
.insurance-plan-list { display:grid; gap:10px; }
.insurance-plan-row { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto; gap:12px; align-items:end; }
.insurance-plan-row .setting-field { min-width:0; }
.insurance-plan-remove { height:40px; padding:0 12px; }
.insurance-plan-actions { margin-top:12px; }
.report-source-row.report-source-plan { padding-left:26px; }
.report-source-row.report-source-plan strong { font-weight:600; }
@media (max-width:640px) { .insurance-plan-row { grid-template-columns:1fr; } .insurance-plan-remove { justify-self:end; } }

/* ===== Prontuários (memória clínica longitudinal) — identidade própria da área: verde-petróleo como cor primária,
   azul para tratamentos, âmbar para escalas/pendências e vermelho reservado a risco. Escopo em .records-area para não
   alterar o tema global do app. ===== */
.records-area { --rec-primary:#0f6e6a; --rec-primary-soft:rgba(15,110,106,.12); --rec-primary-line:rgba(15,110,106,.28); --rec-treat:#2c84ee; --rec-treat-soft:rgba(44,132,238,.12); --rec-attn:#c47a05; --rec-attn-soft:rgba(236,157,21,.14); --rec-risk:#d22f4b; --rec-risk-soft:rgba(241,69,98,.12); --rec-surface:rgba(255,255,255,.78); }
html[data-theme="dark"] .records-area { --rec-primary:#4fd1c5; --rec-primary-soft:rgba(79,209,197,.14); --rec-primary-line:rgba(79,209,197,.32); --rec-treat:#6fb2ff; --rec-treat-soft:rgba(111,178,255,.14); --rec-attn:#f0b74a; --rec-attn-soft:rgba(240,183,74,.16); --rec-risk:#ff7a8f; --rec-risk-soft:rgba(255,122,143,.14); --rec-surface:rgba(25,29,65,.82); }
.records-area .started-eyebrow { color:var(--rec-primary); }
.records-heading { margin-bottom:18px; }
.records-back { display:inline-flex; align-items:center; gap:4px; border:0; background:transparent; color:var(--rec-primary); font:700 12px/1 Manrope,sans-serif; cursor:pointer; padding:0; margin-bottom:6px; }
.records-back svg { width:16px; height:16px; }
.records-entry { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; max-width:820px; margin:18px auto 0; }
.records-mode-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; min-height:240px; border:1px solid var(--rec-primary-line); border-radius:22px; background:var(--rec-surface); color:var(--ink); cursor:pointer; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.records-mode-tile:hover, .records-mode-tile:focus-visible { transform:translateY(-2px); border-color:var(--rec-primary); box-shadow:0 14px 34px rgba(15,110,106,.16); outline:0; }
.records-mode-icon { width:72px; height:72px; border-radius:50%; display:grid; place-items:center; background:var(--rec-primary-soft); color:var(--rec-primary); }
.records-mode-icon svg { width:34px; height:34px; }
.records-mode-label { font:800 20px/1.2 Manrope,sans-serif; letter-spacing:-.4px; }
.records-search { margin-bottom:14px; }
.records-search svg { color:var(--rec-primary); }
.records-patient-list { display:flex; flex-direction:column; gap:8px; }
.records-patient-row { display:flex; align-items:center; gap:12px; width:100%; text-align:left; border:1px solid var(--line); border-radius:14px; background:var(--rec-surface); padding:10px 12px; color:var(--ink); cursor:pointer; }
.records-patient-row:hover, .records-patient-row:focus-visible { border-color:var(--rec-primary); outline:0; }
.records-patient-row > svg:last-child { margin-left:auto; color:var(--muted); width:18px; height:18px; }
.records-patient-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.records-patient-copy strong { font-size:14px; }
.records-patient-copy small { color:var(--muted); font-size:12px; }
.records-empty { color:var(--muted); font-size:13px; padding:12px 2px; }
.records-opening { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:280px; color:var(--ink); animation:records-fade .35s ease both; }
.records-opening strong { font:800 18px/1.2 Manrope,sans-serif; }
.records-opening span { color:var(--muted); font-size:13px; }
.records-opening-disc { width:64px; height:64px; border-radius:50%; display:grid; place-items:center; background:var(--rec-primary-soft); color:var(--rec-primary); animation:records-pulse 1.1s ease-in-out infinite; }
.records-opening-disc svg { width:28px; height:28px; }
@keyframes records-pulse { 0%,100% { transform:scale(1); opacity:.85; } 50% { transform:scale(1.08); opacity:1; } }
@keyframes records-fade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .records-opening, .records-opening-disc { animation:none; } .records-mode-tile { transition:none; } }
.records-tabs { display:flex; gap:6px; border-bottom:1px solid var(--line); margin-bottom:16px; }
.records-tabs button { display:inline-flex; align-items:center; gap:6px; border:0; background:transparent; color:var(--muted); font:700 13px/1 Manrope,sans-serif; padding:10px 12px 12px; border-bottom:2px solid transparent; margin-bottom:-1px; cursor:pointer; }
.records-tabs button svg { width:16px; height:16px; }
.records-tabs button.active { color:var(--rec-primary); border-bottom-color:var(--rec-primary); }
.records-version-stamp { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; font-size:12px; color:var(--muted); margin-bottom:14px; }
.records-version-stamp > span { display:inline-flex; align-items:center; gap:5px; }
.records-version-stamp svg { width:14px; height:14px; }
.records-version-pending { color:var(--rec-attn); font-weight:700; }
.records-version-loading { color:var(--rec-primary); font-weight:700; }
.records-process { height:32px; padding:0 12px; font-size:12px; border-color:var(--rec-primary-line); color:var(--rec-primary); background:var(--rec-primary-soft); }
.records-ask { margin-bottom:18px; }
.records-ask label { display:flex; align-items:center; gap:6px; font:700 14px/1.2 Manrope,sans-serif; color:var(--rec-primary); margin-bottom:10px; }
.records-ask label svg { width:16px; height:16px; }
.records-ask-row { display:flex; gap:8px; }
.records-ask-row input { flex:1; min-width:0; height:42px; border:1px solid var(--line); border-radius:11px; padding:0 12px; background:var(--rec-surface); color:var(--ink); font-size:14px; outline:0; }
.records-ask-row input:focus { border-color:var(--rec-primary); }
.records-area .button.primary { background:var(--rec-primary); border-color:var(--rec-primary); color:#fff; box-shadow:none; }
.records-area .button.primary:disabled { opacity:.6; }
.records-ask-hint { display:block; margin-top:8px; color:var(--muted); font-size:12px; }
.records-ask-result { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); font-size:14px; line-height:1.5; }
.records-ask-result.loading { color:var(--rec-primary); display:flex; align-items:center; gap:6px; }
.records-ask-result.error { color:var(--rec-risk); display:flex; align-items:center; gap:6px; }
.records-ask-result svg { width:16px; height:16px; flex:none; }
.records-ask-answer { margin:0 0 12px; }
.records-ask-facts { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.records-ask-facts li { border-left:3px solid var(--rec-primary); padding:6px 10px; background:var(--rec-primary-soft); border-radius:0 10px 10px 0; font-size:13px; }
.records-fact-meta { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.records-ask-interpretation { margin:12px 0 0; color:var(--ink-soft); font-size:13px; }
.records-ask-interpretation::before { content:'Interpretação da IA · '; font-weight:700; color:var(--rec-primary); }
.records-ask-notfound { margin:8px 0 0; color:var(--rec-attn); font-size:13px; }
.records-ask-unsupported { margin:10px 0 0; padding:8px 10px; border:1px dashed var(--rec-attn); border-radius:10px; color:var(--muted); font-size:13px; }
.records-ask-unsupported small { display:block; font-weight:700; color:var(--rec-attn); margin-bottom:4px; }
.records-ask-unsupported p { margin:0; }
.records-section-title { font:800 17px/1.2 Manrope,sans-serif; letter-spacing:-.4px; margin:6px 0 12px; }
.records-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; margin-bottom:18px; }
.records-card { border:1px solid var(--line); border-left:4px solid var(--rec-primary); border-radius:14px; background:var(--rec-surface); padding:14px 16px; }
.records-card header { display:flex; align-items:center; gap:8px; margin-bottom:8px; color:var(--rec-primary); }
.records-card header svg { width:16px; height:16px; }
.records-card h3 { margin:0; font:800 14px/1.2 Manrope,sans-serif; color:var(--ink); }
.records-card ul { margin:0; padding-left:18px; font-size:13px; line-height:1.5; }
.records-card li + li { margin-top:4px; }
.records-card-empty { margin:0; color:var(--muted); font-size:13px; }
.records-tabs { flex-wrap:wrap; }
/* Registro externo importado ("Antes do acompanhamento"). */
.external-records-intro { margin:0 0 14px; color:var(--muted); font-size:13px; }
.external-import, .external-record { padding:16px; margin-bottom:14px; }
.external-import h2 { display:flex; align-items:center; gap:8px; margin:0 0 6px; font-size:16px; }
.external-import h2 svg { width:18px; height:18px; }
.external-import p { margin:0 0 12px; color:var(--muted); font-size:13px; }
.external-import .external-import-chosen { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; color:var(--ink); }
.external-import-chosen svg { width:15px; height:15px; }
.external-import-chosen .records-link { margin-top:0; }
.external-import form, .external-record-origin { display:grid; gap:10px; }
.external-import label, .external-record-origin label { display:grid; gap:4px; font-size:12px; font-weight:700; }
.external-import textarea, .external-record-editor input[type="text"], .external-record-editor select { width:100%; box-sizing:border-box; border:1px solid var(--line); border-radius:8px; padding:8px; font:inherit; font-size:13px; }
.external-record header { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin-bottom:8px; }
.external-record header small, .external-record footer small { color:var(--muted); font-size:12px; }
.external-record-badge { display:inline-block; padding:3px 8px; border-radius:999px; background:rgba(95,101,188,.12); color:var(--rec-primary); font-size:11px; font-weight:800; }
.external-record.is-draft .external-record-badge { background:rgba(214,140,40,.16); color:#8a5a12; }
.external-record footer { display:grid; gap:2px; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
.external-record-items { display:grid; gap:8px; margin:0; }
.external-record-items dt { font-size:12px; font-weight:800; color:var(--muted); }
.external-record-items dd { margin:2px 0 0; font-size:13px; }
.external-record-hint { margin:12px 0 8px; color:var(--muted); font-size:12px; }
.external-items { list-style:none; margin:0 0 10px; padding:0; display:grid; gap:8px; }
.external-item { display:grid; grid-template-columns:minmax(120px,150px) 1fr auto auto; gap:6px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:10px; }
.external-item input[data-external-field="text"] { grid-column:2 / -1; }
.external-item-ai { grid-column:1 / -1; display:inline-flex; align-items:center; gap:4px; color:#7a3fc4; font-size:11px; font-weight:800; }
.external-item-ai svg { width:12px; height:12px; }
.external-item.is-ai:not(.is-accepted) { border-color:rgba(122,63,196,.4); background:rgba(122,63,196,.05); }
.records-before-followup { padding:16px; margin-top:16px; }
.records-before-followup h2 { display:flex; align-items:center; gap:8px; margin-top:0; }
.records-before-followup h2 svg { width:18px; height:18px; }
.records-before-followup ul { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.records-before-followup li > small { color:var(--muted); }
.external-item.is-accepted { border-color:rgba(46,150,90,.45); background:rgba(46,150,90,.06); }
.external-item-accept { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; white-space:nowrap; }
.external-record-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:12px; }
.external-record-versions { margin:8px 0 0; padding-left:18px; display:grid; gap:10px; }
.external-record-versions p { margin:2px 0; font-size:13px; }
@media (max-width: 640px) { .external-item { grid-template-columns:1fr auto; } .external-item input[data-external-field="text"] { grid-column:1 / -1; } }
.records-card-note { margin:8px 0 0; color:#8a5a00; font-size:12px; display:flex; gap:6px; align-items:flex-start; }
.records-card-note svg { width:14px; height:14px; flex:none; margin-top:1px; }
.records-alerts { margin-bottom:18px; border-left:4px solid var(--rec-attn); }
.records-alerts h2 { margin:0 0 6px; display:flex; align-items:center; gap:8px; font:800 16px/1.2 Manrope,sans-serif; color:var(--rec-attn); }
.records-alerts h2 svg { width:18px; height:18px; }
.records-alerts-hint { margin:0 0 12px; color:var(--muted); font-size:13px; line-height:1.5; }
.records-alert-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.records-alert { border:1px solid var(--line); border-radius:12px; background:var(--rec-attn-soft); padding:10px 12px; }
.records-alert.answered { background:var(--rec-surface); }
.records-alert p { margin:0 0 8px; font-size:14px; line-height:1.5; }
.records-alert-kind { display:inline-block; font:700 11px/1 Manrope,sans-serif; letter-spacing:.3px; text-transform:uppercase; color:var(--rec-attn); margin-bottom:6px; }
.records-alert-options { display:flex; flex-wrap:wrap; gap:6px; }
.records-alert-answer { display:flex; align-items:center; gap:6px; color:var(--rec-primary); font-size:13px; }
.records-alert-answer svg { width:14px; height:14px; }
.records-facts { margin-top:12px; }
.records-facts summary { cursor:pointer; display:flex; align-items:center; gap:6px; font:700 13px/1 Manrope,sans-serif; color:var(--rec-primary); margin-bottom:10px; }
.records-facts summary svg { width:14px; height:14px; }
.records-card.tone-treatment { border-left-color:var(--rec-treat); }
.records-card.tone-treatment header { color:var(--rec-treat); }
.records-card.tone-attention { border-left-color:var(--rec-attn); background:var(--rec-attn-soft); }
.records-card.tone-attention header { color:var(--rec-attn); }
.records-card.tone-risk { border-left-color:var(--rec-risk); background:var(--rec-risk-soft); }
.records-card.tone-risk header { color:var(--rec-risk); }
.records-synthesis h2 { margin:0 0 8px; font:800 16px/1.2 Manrope,sans-serif; }
.records-synthesis p { margin:0; font-size:14px; line-height:1.6; }
.records-track-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin:16px 0 12px; font-size:12px; font-weight:700; }
.records-track-legend span { display:inline-flex; align-items:center; gap:5px; }
.records-track-legend svg { width:14px; height:14px; }
.records-area .track-consultation { color:var(--rec-primary); }
.records-area .track-medication { color:var(--rec-treat); }
.records-area .track-scale { color:var(--rec-attn); }
.records-area .track-risk { color:var(--rec-risk); }
.records-area .track-document { color:var(--muted); }
.records-periods { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--rec-surface); }
.records-periods > small { color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.4px; font-size:10px; }
.records-period { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; font-size:13px; padding:6px 10px; border-left:3px solid var(--rec-treat); background:var(--rec-treat-soft); border-radius:0 10px 10px 0; }
.records-period-name { font-weight:700; }
.records-period-range { color:var(--muted); font-size:12px; }
.records-period-notes { flex-basis:100%; color:var(--ink-soft); font-size:12px; }
.records-timeline { list-style:none; margin:0; padding:0 0 0 12px; border-left:2px solid var(--rec-primary-line); display:flex; flex-direction:column; gap:6px; }
.records-event { position:relative; }
.records-event-toggle { display:grid; grid-template-columns:82px 28px 1fr; align-items:start; gap:10px; width:100%; text-align:left; border:1px solid transparent; background:transparent; color:var(--ink); padding:8px 10px; border-radius:12px; cursor:pointer; }
.records-event-toggle:hover, .records-event-toggle:focus-visible { background:var(--rec-surface); border-color:var(--line); outline:0; }
.records-event.open .records-event-toggle { background:var(--rec-surface); border-color:var(--rec-primary-line); }
.records-event-date { font-size:12px; color:var(--muted); padding-top:5px; }
.records-event-dot { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:currentColor; position:relative; }
.records-event-dot svg { width:14px; height:14px; color:#fff; }
.records-event-copy { display:flex; flex-direction:column; gap:2px; color:var(--ink); min-width:0; }
.records-event-track { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; }
.records-event-copy strong { font-size:14px; }
.records-event-copy small, .records-event-range { color:var(--muted); font-size:12px; }
.records-event-expanded { margin:4px 0 6px 130px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--rec-surface); color:var(--ink); font-size:13px; }
.records-event-expanded-head { color:var(--muted); font-size:12px; font-weight:700; margin-bottom:8px; }
.records-event-expanded dl { margin:0; display:grid; gap:8px; }
.records-event-expanded dt { font-weight:700; font-size:12px; color:var(--rec-primary); }
.records-event-expanded dd { margin:2px 0 0; white-space:pre-wrap; line-height:1.5; }
.records-link { border:0; background:transparent; color:var(--rec-primary); font-weight:700; font-size:12px; cursor:pointer; padding:0; margin-top:10px; text-decoration:underline; }
.records-filters { display:flex; flex-wrap:wrap; gap:10px 18px; margin-top:12px; font-size:13px; }
.records-filters label { display:inline-flex; align-items:center; gap:8px; color:var(--ink-soft); }
.records-filters select { height:34px; border:1px solid var(--line); border-radius:9px; background:var(--rec-surface); color:var(--ink); padding:0 8px; }
.records-filter-check input { accent-color:var(--rec-primary); }
.records-population-results { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:12px; }
.records-population-summary { margin:0; color:var(--muted); font-size:13px; }
.records-match { border:1px solid var(--line); border-left:4px solid var(--rec-primary); border-radius:14px; background:var(--rec-surface); padding:12px 14px; }
.records-match-head { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.records-match-head > div { display:flex; flex-direction:column; min-width:0; }
.records-match-head strong { font-size:14px; }
.records-match-head small { color:var(--muted); font-size:12px; }
.records-match-head .button { margin-left:auto; height:34px; padding:0 12px; font-size:12px; }
.records-match dl { margin:0; display:grid; gap:6px; font-size:13px; }
.records-match dt { font-weight:700; font-size:11px; color:var(--rec-primary); text-transform:uppercase; letter-spacing:.4px; }
.records-match dd { margin:2px 0 0; line-height:1.5; }
@media (max-width:760px) { .records-entry { grid-template-columns:1fr; } .records-mode-tile { min-height:160px; } .records-event-toggle { grid-template-columns:28px 1fr; } .records-event-date { grid-column:1 / -1; padding-top:0; } .records-event-expanded { margin-left:0; } .records-ask-row { flex-direction:column; } }
.records-match.unsupported { border-left-color:var(--rec-attn); border-style:dashed; }
.records-match-unsupported { color:var(--rec-attn); display:flex; align-items:center; gap:6px; }
.records-match-unsupported svg { width:14px; height:14px; flex:none; }
.records-unsupported-title { color:var(--rec-attn); display:flex; align-items:center; gap:6px; margin-top:8px; font-size:14px; }
.records-unsupported-title svg { width:16px; height:16px; }

/* Spec §6.5/6.6 — a mesma versão clínica no dashboard (boxes resumidos) e no briefing pré-consulta (duas camadas). */
.dashboard-clinical { margin-top:14px; --rec-primary:#0f6e6a; --rec-treat:#2c84ee; --rec-attn:#c47d00; --rec-risk:#c62828; }
html[data-theme="dark"] .dashboard-clinical { --rec-primary:#4fd1c5; --rec-treat:#6fb2ff; --rec-attn:#f3b04a; --rec-risk:#ff7b7b; }
.dashboard-clinical .card-heading p { margin:5px 0 0; color:var(--ink-soft); font-size:10px; line-height:1.4; }
.dashboard-clinical-boxes { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
.dashboard-box { display:grid; gap:6px; align-content:start; text-align:left; padding:10px 12px; border:1px solid var(--line); border-left:4px solid var(--rec-primary); border-radius:12px; background:var(--panel-solid); color:var(--ink); cursor:pointer; font:inherit; }
.dashboard-box:hover, .dashboard-box:focus-visible { outline:none; box-shadow:0 0 0 2px var(--rec-primary); }
.dashboard-box.tone-treatment { border-left-color:var(--rec-treat); }
.dashboard-box.tone-attention { border-left-color:var(--rec-attn); }
.dashboard-box.tone-risk { border-left-color:var(--rec-risk); }
.dashboard-box-title { display:flex; align-items:center; gap:6px; font:800 11px Manrope,sans-serif; color:var(--rec-primary); }
.dashboard-box.tone-treatment .dashboard-box-title { color:var(--rec-treat); }
.dashboard-box.tone-attention .dashboard-box-title { color:var(--rec-attn); }
.dashboard-box.tone-risk .dashboard-box-title { color:var(--rec-risk); }
.dashboard-box-title svg { width:14px; height:14px; }
/* Lista dentro do botão feita com <span>: <ul> não é conteúdo válido de <button> (BAIXO 13 da auditoria Fable). */
.dashboard-box-list { display:grid; gap:2px; font-size:11px; line-height:1.4; }
.dashboard-box-item { display:block; position:relative; padding-left:12px; }
.dashboard-box-item::before { content:"•"; position:absolute; left:2px; }
.dashboard-box-more, .briefing-block li.briefing-more { color:var(--muted); font-style:italic; }
.dashboard-box-more::before { content:none; }
.briefing-block li.briefing-more { list-style:none; margin-left:-16px; }
.dashboard-box small { color:var(--muted); font-size:10.5px; }
.briefing-layer { margin-top:10px; padding-top:9px; border-top:1px dashed var(--line); }
.briefing-layer-title { display:flex; align-items:center; gap:5px; color:var(--ink-soft); font:700 9.5px Manrope,sans-serif; text-transform:uppercase; letter-spacing:.2px; }
.briefing-layer-title svg { width:13px; height:13px; }
.briefing-block { margin-top:8px; padding-left:8px; border-left:3px solid #0f6e6a; }
.briefing-block.tone-treatment { border-left-color:#2c84ee; }
.briefing-block.tone-attention { border-left-color:#c47d00; }
.briefing-block.tone-risk { border-left-color:#c62828; }
.briefing-block strong { display:block; color:var(--ink-soft); font:700 9.5px Manrope,sans-serif; text-transform:uppercase; letter-spacing:.2px; }
.briefing-block ul, .briefing-novelties { margin:4px 0 0; padding-left:16px; font-size:11px; line-height:1.4; color:var(--ink); }
.briefing-empty { margin:6px 0 0; color:var(--muted); font-size:10.5px; }
.briefing-return { display:flex; align-items:center; gap:5px; margin:8px 0 0; font-size:11px; color:var(--ink); }
.briefing-return svg { width:13px; height:13px; }
.briefing-pending { display:flex; align-items:center; gap:5px; margin-top:8px; color:#8a5a00; font-size:10.5px; }
.briefing-pending svg { width:13px; height:13px; }
html[data-theme="dark"] .briefing-pending { color:#f3b04a; }
.briefing-open { margin-top:10px; }
.records-card.focus { box-shadow:0 0 0 2px var(--rec-primary); }
/* Spec §3.4 — "Agendar retorno" na consulta concluída. */
.return-scheduler { margin-top:18px; padding-top:18px; border-top:1px solid rgba(115,93,210,.12); }
.return-scheduler-title { display:flex; align-items:center; gap:6px; color:var(--purple); font:800 12px Manrope,sans-serif; text-transform:uppercase; letter-spacing:.3px; }
.return-scheduler-title svg { width:15px; height:15px; }
.return-scheduler-hint, .return-scheduler-empty { margin:8px 0 0; color:var(--ink-soft); font-size:12px; line-height:1.5; }
.return-scheduler-done { display:flex; align-items:center; gap:8px; margin:8px 0 0; color:var(--ink); font-size:13px; }
.return-scheduler-done svg { width:16px; height:16px; color:#157a61; flex:none; }
.return-chips { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; }
.return-chip { padding:6px 12px; border:1px solid var(--line); border-radius:999px; background:var(--panel-solid); color:var(--ink); font:700 12px Manrope,sans-serif; cursor:pointer; }
.return-chip.active { background:var(--purple); border-color:var(--purple); color:#fff; }
.return-date { display:flex; align-items:center; gap:6px; margin-left:auto; color:var(--ink-soft); font-size:12px; }
.return-date input { padding:5px 8px; border:1px solid var(--line); border-radius:8px; background:var(--panel-solid); color:var(--ink); font:600 12px Manrope,sans-serif; }
.return-slots { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.return-slot { display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border:1px solid var(--purple); border-radius:10px; background:rgba(115,93,210,.08); color:var(--ink); font:700 12px Manrope,sans-serif; cursor:pointer; }
.return-slot:hover, .return-slot:focus-visible { outline:none; background:rgba(115,93,210,.18); }
.return-slot svg { width:14px; height:14px; color:var(--purple); }
@media (max-width:640px) { .return-date { margin-left:0; width:100%; } }
.agenda-conflict-notice { display:flex; gap:12px; align-items:flex-start; margin:0 0 16px; padding:14px 16px; border-left:4px solid var(--red); }
.agenda-conflict-notice ul { margin:6px 0 0; padding-left:18px; }
.agenda-conflict-notice p { margin:4px 0 0; }

/* Panorama do dia (2026-09-29): modal do relatório diário, botão na Agenda e marca no calendário. */
.agenda-panorama-button { display:inline-flex; align-items:center; gap:6px; }
.agenda-panorama-button svg { width:16px; height:16px; }
.agenda-panorama-button.saved { border-color:var(--purple); color:var(--purple-dark); }
html[data-theme="dark"] .agenda-panorama-button.saved { color:#c9b8ff; }
.calendar-dates button.has-panorama { position:relative; }
.calendar-dates button.has-panorama::after { content:''; position:absolute; left:50%; bottom:2px; width:5px; height:5px; margin-left:-2.5px; border-radius:50%; background:var(--purple); }
.calendar-dates button.selected.has-panorama::after { background:#fff; }
.month-day.has-panorama { position:relative; }
.month-day-panorama { position:absolute; top:6px; right:6px; color:var(--purple); display:inline-flex; }
.month-day-panorama svg { width:14px; height:14px; }
.panorama-backdrop { position:fixed; inset:0; z-index:135; display:grid; place-items:center; padding:20px; background:rgba(38,33,84,.42); backdrop-filter:blur(9px); }
.panorama-dialog { width:min(980px,100%); max-height:calc(100vh - 40px); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:22px; background:var(--panel-solid); color:var(--ink); box-shadow:0 26px 90px rgba(36,25,101,.29); }
.panorama-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:20px 24px 16px; border-bottom:1px solid var(--line); }
.panorama-brand { display:flex; gap:14px; align-items:center; min-width:0; }
.panorama-icon { width:44px; height:44px; flex:none; border-radius:14px; display:grid; place-items:center; background:var(--lavender); color:var(--purple); }
.panorama-icon svg { width:22px; height:22px; }
.panorama-header .eyebrow { display:block; font-size:11.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--purple); }
.panorama-header h2 { margin:2px 0; font-size:22px; }
.panorama-header p { margin:0; color:var(--muted); font-size:13px; }
.panorama-actions { display:flex; gap:8px; align-items:center; flex:none; }
.panorama-actions .button { display:inline-flex; align-items:center; gap:6px; }
.panorama-body { overflow:auto; padding:18px 24px 24px; display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
.panorama-section { min-width:0; border:1px solid var(--line); border-radius:16px; padding:14px 16px; }
.panorama-section h3 { display:flex; align-items:center; gap:10px; margin:0 0 8px; font-size:16px; }
.panorama-section h3 span { width:26px; height:26px; flex:none; border-radius:8px; display:grid; place-items:center; background:var(--lavender); color:var(--purple); font-size:12px; }
.panorama-section h4 { margin:12px 0 6px; font-size:13.5px; }
.panorama-note { margin:0 0 10px; color:var(--muted); font-size:12.5px; }
.panorama-stats { margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:8px; }
.panorama-section .panorama-rank + .panorama-stats { margin-top:8px; }
.panorama-stats div { padding:10px 12px; border-radius:12px; background:var(--lavender); }
.panorama-stats dt { font-size:12.5px; color:var(--ink-soft); }
.panorama-stats dd { margin:3px 0 0; font-weight:700; font-variant-numeric:tabular-nums; }
.panorama-rank { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.panorama-rank li { position:relative; display:grid; grid-template-columns:48px 1fr auto; gap:10px; align-items:center; padding:8px 12px 10px; border-radius:10px; background:var(--lavender); overflow:hidden; }
.panorama-rank li.no-position { grid-template-columns:1fr auto; }
.panorama-rank-pos { display:flex; flex-direction:column; font-weight:700; line-height:1.1; }
.panorama-rank-pos small { font-size:10.5px; font-weight:600; color:var(--amber); }
.panorama-rank-value { font-size:13px; color:var(--ink-soft); font-variant-numeric:tabular-nums; text-align:right; }
.panorama-rank-bar { position:absolute; left:0; bottom:0; height:3px; border-radius:0 3px 3px 0; background:var(--purple); }
.panorama-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.panorama-table th, .panorama-table td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
.panorama-table th { font-size:12.5px; color:var(--ink-soft); }
.panorama-table td:nth-child(n+2) { font-variant-numeric:tabular-nums; }
.panorama-facts { margin:0; padding-left:18px; display:grid; gap:6px; line-height:1.45; }
.panorama-profile { margin:0; line-height:1.55; }
.panorama-empty { margin:0; color:var(--muted); font-size:13.5px; }
.panorama-empty-state { padding:24px 0; text-align:center; }
.panorama-alert { display:flex; gap:10px; align-items:flex-start; padding:10px 14px; border-radius:12px; font-size:13.5px; line-height:1.45; }
.panorama-alert svg { width:18px; height:18px; flex:none; margin-top:1px; }
.panorama-alert.warning { background:#fff6e6; color:#7a4a00; border:1px solid #f5d8a3; }
.panorama-alert.info { background:#eef4ff; color:#243e7a; border:1px solid #cddcff; }
.panorama-alert.error { background:#fff0f0; color:#8a1f1f; border:1px solid #f3c2c2; }
html[data-theme="dark"] .panorama-alert.warning { background:rgba(236,157,21,.14); color:#ffd99a; border-color:rgba(236,157,21,.35); }
html[data-theme="dark"] .panorama-alert.info { background:rgba(44,132,238,.14); color:#bcd6ff; border-color:rgba(44,132,238,.35); }
html[data-theme="dark"] .panorama-alert.error { background:rgba(241,69,98,.14); color:#ffc2cc; border-color:rgba(241,69,98,.35); }
.panorama-loading { display:grid; justify-items:center; gap:10px; padding:32px 0; text-align:center; }
.panorama-loading p { margin:0; font-weight:600; }
.panorama-loading small { color:var(--muted); }
.panorama-spinner { width:30px; height:30px; border-radius:50%; border:3px solid var(--lavender-strong); border-top-color:var(--purple); animation:panorama-spin .9s linear infinite; }
@keyframes panorama-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .panorama-spinner { animation:none; } }
.panorama-progress { width:min(360px,100%); height:6px; border-radius:6px; background:var(--lavender-strong); overflow:hidden; }
.panorama-progress i { display:block; height:100%; background:var(--purple); }
.panorama-disclaimer { margin:4px 0 0; font-size:12px; color:var(--muted); font-style:italic; }
@media (max-width:720px) {
  .panorama-backdrop { padding:10px; }
  .panorama-dialog { max-height:calc(100vh - 20px); border-radius:18px; }
  .panorama-header { padding:14px 16px; gap:10px; }
  .panorama-brand { flex:1; }
  .panorama-icon { display:none; }
  .panorama-header h2 { font-size:19px; }
  .panorama-actions .button { padding:8px 10px; }
  .panorama-actions .button span { display:none; }
  .panorama-body { padding:14px 16px 18px; }
  .panorama-table { font-size:12.5px; display:block; overflow-x:auto; }
  .panorama-table th, .panorama-table td { padding:6px; }
  .panorama-rank li { grid-template-columns:40px 1fr; }
  .panorama-rank li.no-position { grid-template-columns:1fr; }
  .panorama-rank-value { grid-column:2; text-align:left; }
  .panorama-rank li.no-position .panorama-rank-value { grid-column:1; }
}

/* Panorama: texto corrido alternado com cards (lote P1) */
.panorama-narrative { margin:0 0 12px; line-height:1.6; font-size:14px; color:var(--ink); }
.panorama-report-head { display:grid; gap:8px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft, rgba(127,127,160,.06)); }
.panorama-report-head.partial { border-color:rgba(200,140,20,.45); }
.panorama-insights { padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft, rgba(127,127,160,.06)); }
.panorama-insights h3 { margin:0 0 8px; font-size:14px; }
.panorama-insights ul { margin:0; padding-left:18px; display:grid; gap:6px; line-height:1.5; font-size:13.5px; }
.panorama-table tfoot td { font-weight:700; border-top:2px solid var(--line); }
.panorama-principal { margin:0 0 10px; padding:10px 14px; border-left:4px solid var(--accent, #6b5bd2); background:var(--surface-soft, rgba(127,127,160,.08)); border-radius:0 10px 10px 0; display:grid; gap:2px; }
.panorama-principal span { font-size:15px; font-weight:700; }
.panorama-day-sentence { margin:0 0 8px; line-height:1.5; }
.panorama-portrait { margin:8px 0 0; line-height:1.55; font-size:13.5px; }
.panorama-rank-pos { min-width:2.4em; }
.prescription-parse-notice, .prescription-legal-notice { margin:8px 0 0; padding:8px 10px; border-radius:8px; font-size:12px; color:#7a4b00; background:#fff4dc; border:1px solid #f0d49a; }
html[data-theme="dark"] .prescription-parse-notice, html[data-theme="dark"] .prescription-legal-notice { color:#ffd27f; background:rgba(255,210,127,.1); border-color:rgba(255,210,127,.35); }
/* Policlínica — cartão "Clínica e equipe" (clinic-team-ui.js) */
.clinic-team-settings-card { display:grid; gap:14px; margin-top:14px; }
.clinic-team-intro { margin:0; color:var(--ink-soft); font-size:13px; line-height:1.55; }
.clinic-team-form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; }
.clinic-team-form .setting-field { flex:1 1 260px; }
.clinic-team-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:13px; background:var(--lavender); }
.clinic-team-summary strong { display:block; font:800 15px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.clinic-team-summary small, .clinic-team-member small, .clinic-team-invite small { display:block; color:var(--ink-soft); font-size:11.5px; line-height:1.45; }
.clinic-team-kicker { display:block; color:var(--muted); font:700 10.5px Manrope,'DM Sans',system-ui,sans-serif; text-transform:uppercase; letter-spacing:.06em; }
.clinic-team-list { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.clinic-team-member, .clinic-team-invite { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; }
.clinic-team-member strong, .clinic-team-invite strong { display:block; font:700 12.5px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.clinic-team-badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; }
.clinic-team-badge { display:inline-flex; align-items:center; padding:2px 8px; border-radius:99px; background:#ece6ff; color:#5a2fd0; font:700 10px Manrope,'DM Sans',system-ui,sans-serif; }
.clinic-team-badge.me { background:var(--purple-dark); color:#fff; }
.clinic-team-badge.ok { background:#e2f6ee; color:#0b7a58; }
.clinic-team-badge.pending { background:#fff4dc; color:#8a5a00; }
.clinic-team-badge.off { background:transparent; color:var(--muted); border:1px solid var(--line); }
.clinic-team-invites { display:grid; gap:8px; }
.clinic-team-invite { border-color:var(--notice-border); background:var(--notice-bg); }
.clinic-team-actions { display:flex; gap:8px; }
.clinic-team-events { display:grid; gap:4px; margin:8px 0 0; padding:0 0 0 2px; list-style:none; font-size:12px; color:var(--ink-soft); }
.clinic-team-footer { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px; padding-top:4px; border-top:1px solid var(--line); }
.clinic-team-footer .clinic-team-form { flex:1 1 320px; }
.issue-clinic-field { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0; font-size:12.5px; color:var(--ink-soft); }
.issue-clinic-field select { min-width:180px; max-width:100%; }
.clinic-report-list { display:grid; gap:10px; margin:0; padding:0; list-style:none; }
.clinic-report-doctor { padding:12px 14px; border:1px solid var(--line); border-radius:12px; }
.clinic-report-doctor > strong { display:block; font:700 13px Manrope,'DM Sans',system-ui,sans-serif; color:var(--ink); }
.clinic-report-doctor > small { display:block; color:var(--ink-soft); font-size:11.5px; line-height:1.45; }
.clinic-report-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px 14px; margin:10px 0 0; }
.clinic-report-grid dt { color:var(--muted); font-size:11px; line-height:1.35; }
.clinic-report-grid dd { margin:2px 0 0; color:var(--ink); font:800 14px Manrope,'DM Sans',system-ui,sans-serif; }
.clinic-team-error { color:#c22346; font-size:12.5px; font-weight:600; }
@media (max-width:640px) { .clinic-team-member, .clinic-team-invite { flex-direction:column; align-items:stretch; } .clinic-team-actions { justify-content:flex-start; } }
html[data-theme="dark"] .clinic-team-badge { background:#332a6b; color:#cfc3ff; }
html[data-theme="dark"] .clinic-team-badge.me { background:#6b4dff; color:#fff; }
html[data-theme="dark"] .clinic-team-badge.ok { background:#163b33; color:#8ee0c2; }
html[data-theme="dark"] .clinic-team-badge.pending { background:#3d3016; color:#f2cf86; }
html[data-theme="dark"] .clinic-team-badge.off { background:transparent; color:var(--muted); }
html[data-theme="dark"] .clinic-team-error { color:#ff9db0; }
