*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--brand-1) 22%, transparent); }
.mono { font-family: var(--font-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
button:disabled, .btn:disabled, [aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.crow .acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; row-gap: 7px; min-width: 0; }
.rowmenu { position: relative; flex: none; }
.rowmenu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; color: var(--muted-foreground);
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu summary:hover, .rowmenu[open] summary { background: color-mix(in srgb, var(--foreground) 7%, transparent); color: var(--foreground); }
.rowmenu summary:active { transform: scale(.94); }
.rowmenu:not([open]) .rowmenu-pop { display: none; }
.rowmenu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 196px;
  display: grid; padding: 5px; border-radius: 13px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 20px 48px -20px rgba(0,0,0,.42);
  animation: menu-in var(--dur-1) var(--ease-out) both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .rowmenu-pop { animation: none; } }
.rowmenu-pop > * { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 0; border-radius: 9px;
  background: transparent; color: var(--foreground); font: inherit; font-size: 13.5px; text-align: left;
  cursor: pointer; white-space: nowrap; }
.rowmenu-pop > *:hover { background: color-mix(in srgb, var(--foreground) 6%, transparent); }
.rowmenu-pop svg { flex: none; color: var(--muted-foreground); }
.rowmenu-pop .perigo { color: var(--danger-text, var(--danger)); }
.rowmenu-pop .perigo svg { color: inherit; }
.rowmenu-pop .perigo:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
@media (max-width: 560px) {
  .rowmenu summary { width: 38px; height: 38px; }
  .rowmenu-pop { position: fixed; left: 10px; right: 10px; top: auto; bottom: 88px; min-width: 0; }
  .rowmenu-pop > * { padding: 13px 12px; font-size: 15px; }
}
.abc-live .ld.parcial { opacity: .4; }
.is-riscado { opacity: .35; text-decoration: line-through; }
.hcard { padding: 16px 18px; }
.hcard-dia { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; margin: 0 0 12px; }
.hslots { display: grid; gap: 8px; }
.hslot { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 11px; padding: 10px 14px; }
.hslot .hh { font-family: var(--font-mono); font-size: 14px; }
.hslot .acts { display: flex; align-items: center; gap: 8px; }
.hslot .icon-btn { padding: 7px; }
.rotulo-fino { font-size: 10.5px; color: var(--faint-foreground); }
.rotulo-centro { font-family: var(--font-label); font-weight: 600; font-size: 10.5px;
  letter-spacing: .05em; text-align: center; color: var(--faint-foreground); }
/* A pílula da letra carrega texto branco, então o fundo vem do par legível:
   com a rampa decorativa, o branco sobre `s` ficava em 3,36:1. */
[data-abc="a"] { background: var(--abc-a-texto); }
[data-abc="b"] { background: var(--abc-b-texto); }
[data-abc="c"] { background: var(--abc-c-texto); }
[data-abc="d"] { background: var(--abc-d-texto); }
[data-abc="e"] { background: var(--abc-e-texto); }
[data-abc="f"] { background: var(--abc-f-texto); }
[data-abc="s"] { background: var(--abc-s-texto); }
.editor-livre { width: 100%; min-height: 170px; border: 0; background: transparent; font: inherit;
  line-height: 1.8; color: inherit; outline: none; resize: vertical; }
.is-off { opacity: .5; }
h1,h2,h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; margin: 0; }
.kpi .val, .crow .time, .presc .p .hrs, .mtime, .macros, .dk-time, .tm { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

:root { --side-w: 248px; --side-rotulo: block; --side-marca: none; --side-lockup: block;
  --side-pad: 16px; --side-user-pad: 10px; --side-eixo: flex-start; --side-nav-pad: 10px 12px; }
@media (max-width: 860px) { :root { --side-w: 76px; --side-rotulo: none; --side-marca: block; --side-lockup: none;
  --side-pad: 10px; --side-user-pad: 8px; --side-eixo: center; --side-nav-pad: 10px 0; --side-link-flex: none; } }
[data-side="rail"] { --side-w: 76px; --side-rotulo: none; --side-marca: block; --side-lockup: none;
  --side-pad: 10px; --side-user-pad: 8px; --side-eixo: center; --side-nav-pad: 10px 0; --side-link-flex: none; }

.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

.side { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 20px var(--side-pad); position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; align-items: center; justify-content: var(--side-eixo); gap: 10px; padding: 4px 8px 22px; }
.side .brand img { height: 33px; width: auto; }
.side .brand .full { display: var(--side-lockup); } .side .brand .mk { display: var(--side-marca); height: 34px; }
.side .brand img[hidden] { display: none !important; }
.side .navlbl, .side .nav a span, .side .user .u-meta { display: var(--side-rotulo); }
.side .navlbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted-foreground); padding: 8px; margin-top: 6px; font-weight: 600; }
.side .nav { display: flex; flex-direction: column; gap: 3px; }
.side .nav a { display: flex; align-items: center; justify-content: var(--side-eixo); gap: 12px; padding: var(--side-nav-pad); border-radius: 11px; color: var(--muted-foreground);
  font-size: 14.5px; font-weight: 500; transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.side .nav a svg { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }
.side .nav a:hover { background: color-mix(in srgb, var(--foreground) 6%, transparent); color: var(--foreground); }
.side .nav a.active { color: #fff; background: var(--brand-grad); box-shadow: var(--shadow-warm); }
.side .spacer { flex: 1; }
.side-meio { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
:root:not([data-side="rail"]) .side-meio { overflow-y: auto; }
@media (max-height: 560px) { [data-side="rail"] .side-meio { overflow-y: auto; } }
.side-meio::-webkit-scrollbar { width: 6px; }
.side-meio::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.side .brand, .side .user { flex: none; }
.side-toggle { position: absolute; top: 18px; right: 14px; width: 30px; height: 30px; padding: 0; border: 0;
  border-radius: 9px; background: transparent; color: var(--faint-foreground); cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.side-toggle:hover { background: color-mix(in srgb, var(--foreground) 7%, transparent); color: var(--foreground); }
.side-toggle:active { transform: scale(.94); }
.side-toggle svg { transition: transform var(--dur-2) var(--ease-out); }
[data-side="rail"] .side-toggle { position: static; margin: 12px auto 0; width: 34px; height: 34px;
  border: 1px solid var(--border); background: var(--card); }
[data-side="rail"] .side .user { border: 0; padding: 0; }
[data-side="rail"] .side-toggle svg { transform: rotate(180deg); }
@media (max-width: 860px) { .side-toggle { display: none; } }

[data-side="rail"] .side .nav a { position: relative; }
[data-side="rail"] .side .nav a::after { content: attr(data-rotulo); position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateX(-4px); z-index: 60; padding: 6px 10px; border-radius: 9px; white-space: nowrap;
  background: var(--plum-bg); color: var(--plum-fg); font-size: 12.5px; font-weight: 500; letter-spacing: 0;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  [data-side="rail"] .side .nav a:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
}
[data-side="rail"] .side .nav a:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.side .user { display: flex; align-items: center; justify-content: var(--side-eixo); gap: 10px; padding: var(--side-user-pad); border-radius: 12px; }
.side .user .u-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: var(--side-link-flex, 1); border-radius: 9px; color: inherit; }
.side .user .u-link:hover .n { color: var(--brand-texto); }
.side .user .u-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.side .nav a[aria-current="page"], .side .user .u-link[aria-current="page"] { cursor: default; }
.side .user .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 13px; flex: none; }
.side .user .u-meta .n { font-size: 13.5px; font-weight: 600; } .side .user .u-meta .r { font-size: 11.5px; color: var(--muted-foreground); }
.side .user .u-meta { min-width: 0; } .side .user .u-meta .n, .side .user .u-meta .r { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side { position: relative; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  position: sticky; top: 0; z-index: 20; }
.topbar .search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 8px 14px; width: min(320px, 40vw); color: var(--muted-foreground); }
.topbar .search input { border: none; background: transparent; outline: none; font: inherit; color: var(--foreground); width: 100%; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }
.topbar .actions #theme { flex: none; }
.icon-btn { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 9px;
  cursor: pointer; color: var(--muted-foreground); display: grid; place-items: center;
  transition: color var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.icon-btn:hover { color: var(--foreground); }
.icon-btn:active { transform: scale(.94); }
.btn { font: 600 14px var(--font-sans); cursor: pointer; border: none; border-radius: var(--radius-pill); padding: 9px 16px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), background-position var(--dur-3) var(--ease-out); }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--brand-grad); background-size: 170% 100%; background-position: 0 0; color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: var(--shadow-warm), inset 0 1px 0 rgba(255,255,255,.22); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { transform: translateY(-1px); background-position: 96% 0; } }
.btn-soft { background: var(--card); border: 1px solid var(--border-strong); color: var(--foreground); }
.btn-mini { padding: 6px 12px; font-size: 12.5px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:active { transform: scale(.97); }
.btn-primary:active { transform: translateY(-1px) scale(.97); }
.seg button:active, .load-more:active, .flist .act .paybtn:active,
.abctab:active, .plist .acts a:active, .plist .acts button:active { transform: scale(.97); }

.content { padding: 30px 32px 56px; max-width: 1280px; width: 100%; }
@media (max-width: 620px) { .content, .topbar { padding-left: 18px; padding-right: 18px; } }
.page-head { margin-bottom: 26px; }
.page-head .ey { font-family: var(--font-label); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.page-head h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-top: 6px; }
.page-head h1 em { font-style: italic; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kpi-grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.kpi { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.kpi .top { display: flex; align-items: center; justify-content: space-between; }
.kpi .lbl { font-family: var(--font-label); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.kpi .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-grad-soft); color: var(--brand-texto); }
.kpi .ic svg { width: 15px; height: 15px; stroke-width: 1.9; }
.kpi .val { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; margin-top: 16px; }
.kpi .sub { font-size: 12px; color: var(--muted-foreground); margin-top: 6px; }
/* Tom de TEXTO, nao o cheio: `--success` sobre branco da 3,91:1 num numero
   de 11,5px, e ele e justamente o que a medica le de relance. */
.kpi .sub b.up { color: var(--success-text); } .kpi .sub b.down { color: var(--danger-text); }

.panels { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.panels.uma { grid-template-columns: 1fr; }
a.card.kpi { color: inherit; display: block; transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
a.card.kpi:hover { border-color: color-mix(in srgb, var(--brand-1) 45%, var(--border)); transform: translateY(-1px); }
a.card.kpi:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
@media (max-width: 960px) { .panels { grid-template-columns: 1fr; } }
.panel { padding: 20px; container-type: inline-size; }
.panel .ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel .ph h2 { font-size: 1.2rem; }
.panel .ph .lnk { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-texto); font-weight: 600; }

.rank { display: grid; gap: 12px; }
.rank .row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.rank .row .nm { font-size: 13.5px; }
.rank .row .ct { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.rank .bar { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--foreground) 7%, transparent); overflow: hidden; }
.rank .bar span { display: block; height: 100%; width: var(--w, 0); border-radius: 999px; background: var(--brand-grad); }
.rank .bar span.bom { background: var(--success); }
.rank .bar span.atencao { background: var(--warning); }
.panels + .panels { margin-top: 16px; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tri > div { border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px 12px; background: var(--surface); }
.tri .com-anel { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tri .com-anel > div { min-width: 0; }
.tri .anel { width: 46px; height: 46px; flex: none; transform: rotate(-90deg); }
.tri .anel .fundo { fill: none; stroke: var(--border); stroke-width: 3.4; }
.tri .anel .valor { fill: none; stroke: var(--success); stroke-width: 3.4; stroke-linecap: round; }
.tri .mini-trilho { display: block; margin-top: 8px; height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--foreground) 7%, transparent); overflow: hidden; }
.tri .mini-trilho i { display: block; height: 100%; width: 8%; border-radius: 999px; background: var(--warning); }
.tri .n { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.tri .n small { font-size: .5em; color: var(--muted-foreground); margin-left: 3px; }
.tri .l { display: block; font-size: 11.5px; color: var(--muted-foreground); line-height: 1.4; margin-top: 7px; }
.tri .d { display: block; font-size: 11px; color: var(--faint-foreground); margin-top: 4px; }
@container (max-width: 430px) {
  .tri { grid-template-columns: repeat(2, 1fr); }
  .tri > div:last-child { grid-column: 1 / -1; }
}
@container (max-width: 300px) { .tri { grid-template-columns: 1fr; } .tri > div:last-child { grid-column: auto; } }
.sumiu { display: grid; gap: 2px; }
.sumiu .lin { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 11px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--border); }
.sumiu .lin:first-child { border-top: 0; }
.sumiu .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11.5px; background: var(--brand-grad-soft); color: var(--brand-texto); }
.sumiu .nm { font-size: 13.5px; }
.sumiu .mt { font-size: 11.5px; color: var(--faint-foreground); }
.sumiu .lnk2 { font-family: var(--font-label); font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 600; color: var(--brand-texto); white-space: nowrap; }

.consultas { display: grid; gap: 8px; }
.crow { display: grid; grid-template-columns: 52px minmax(148px, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--background); transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.crow:hover { border-color: var(--border-strong); }
@media (hover: hover) and (pointer: fine) { .crow:hover { transform: translateX(3px); } }
.crow .time { font-family: var(--font-mono); font-size: 13px; color: var(--foreground); text-align: center; line-height: 1.2; }
.crow .time small { display: block; font-size: 9.5px; color: var(--faint-foreground); letter-spacing: .1em; }
.crow[data-cols="2"] { grid-template-columns: minmax(148px, 1fr) auto; }
.crow[data-cols="3"] { grid-template-columns: auto minmax(148px, 1fr) auto; }
.crow .who { min-width: 0; }
.crow .who .nm { font-size: 14.5px; font-weight: 600; overflow-wrap: break-word; }
.crow .who .mt { font-size: 12px; color: var(--muted-foreground); overflow-wrap: break-word; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid; white-space: nowrap; width: fit-content; justify-self: start; align-self: center; }
.chip i { flex: none; width: 6px; height: 6px; border-radius: 50%; }
.chip.mini { font-size: 11.5px; }
.chip.done   { color: var(--success-text); border-color: color-mix(in srgb, var(--success) 34%, transparent); background: color-mix(in srgb, var(--success) 10%, transparent); }
.chip.done i { background: var(--success); }
.chip.live   { color: var(--info-text); border-color: color-mix(in srgb, var(--info) 38%, transparent); background: color-mix(in srgb, var(--info) 10%, transparent); }
.chip.live i { background: var(--info); }
.chip.conf   { color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 34%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.chip.conf i { background: var(--warning); }
.chip.late   { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 34%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.chip.late i { background: var(--danger); }
.chip.muted  { color: var(--muted-foreground); border-color: var(--border-strong); }
.chip.muted i { background: var(--faint-foreground); }

.spectrum-rule { height: 3px; border: 0; border-radius: 999px; margin: 0;
  background: linear-gradient(90deg, var(--abc-a), var(--abc-b), var(--abc-c), var(--abc-d), var(--abc-e), var(--abc-f), var(--abc-s)); }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar .count { font-family: var(--font-label); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; }
.seg button { border: none; background: transparent; font: 500 12.5px var(--font-sans); color: var(--muted-foreground); padding: 6px 13px; border-radius: var(--radius-pill); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand-grad); color: #fff; }

.plist { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.plist .head, .plist .prow {
  display: grid; grid-template-columns: 46px minmax(150px, 1fr) minmax(0, 130px) minmax(0, 116px) minmax(0, 300px);
  gap: 16px; align-items: center; padding: 12px 20px;
}
.plist .head { font-family: var(--font-label); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint-foreground); border-bottom: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.plist .prow { border-bottom: 1px solid var(--border); transition: background var(--dur-1) var(--ease-out); position: relative; }
.plist .prow:last-child { border-bottom: 0; }
.plist .prow:hover { background: color-mix(in srgb, var(--foreground) 3.5%, transparent); }
.plist .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  color: var(--brand-texto); background: var(--brand-grad-soft); border: 1px solid var(--border); }
.plist .who { min-width: 0; }
.plist .cell { min-width: 0; white-space: nowrap; }
.plist .who .em { overflow-wrap: anywhere; }
.plist .who .nm { font-size: 15px; font-weight: 600; line-height: 1.28;
  display: flex; align-items: center; gap: 4px 9px; flex-wrap: wrap; }
.plist .who .em { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.35; }
.plist .cell { font-family: var(--font-mono); font-size: 13px; color: var(--muted-foreground); }
.plist .cell.faint { color: var(--faint-foreground); }
.plist .acts { display: flex; justify-content: flex-end; align-items: center; gap: 4px 6px;
  flex-wrap: wrap; min-width: 0; }
.plist .acts a, .plist .acts button { display: inline-flex; align-items: center; gap: 5px; border: none; background: transparent; cursor: pointer;
  color: var(--muted-foreground); border-radius: 9px; padding: 7px 9px; font: 600 13px var(--font-sans); white-space: nowrap; }
.plist .acts a:hover { color: var(--brand-texto); background: color-mix(in srgb, var(--brand-1) 8%, transparent); }
.plist .acts .del:hover { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 8%, transparent); }
@media (max-width: 780px) {
  .plist .head { display: none; }
  .plist .prow { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 10px; padding: 12px 14px; }
  .plist .prow .cell { display: none; }
  .plist .prow .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .plist .cell { display: none; }
  .plist .av { width: 34px; height: 34px; }
}

.actionbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.agenda-grid { display: grid; grid-template-columns: 1fr .92fr; gap: 16px; margin-bottom: 26px; }
@media (max-width: 940px) { .agenda-grid { grid-template-columns: 1fr; } }

.cal { padding: 20px; display: flex; flex-direction: column; }
.cal .cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal .cal-head .mo { font-family: var(--font-display); font-size: 1.35rem; }
.cal .nav-mo { display: flex; gap: 6px; }
.cal .dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal .dow span { text-align: center; font-family: var(--font-label); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.cal .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .cal-pe { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--faint-foreground); }
.cal .cal-pe .lg { display: inline-flex; align-items: center; gap: 6px; }
.cal .cal-pe .lg i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-2); }
.cal .cal-pe a { color: var(--brand-texto); font-weight: 600; font-size: 12.5px; }
.cal .day { aspect-ratio: 1; border: 1px solid transparent; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 14px; color: var(--foreground); cursor: pointer; background: transparent; position: relative; transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out); }
.cal .day.pad { color: var(--faint-foreground); opacity: .4; cursor: default; }
.cal .day:not(.pad):hover { background: color-mix(in srgb, var(--foreground) 6%, transparent); }
.cal .day .dots { display: flex; gap: 3px; height: 5px; }
.cal .day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-2); }
.cal .day.sel { background: var(--brand-grad); color: #fff; border-color: transparent; }
.cal .day.sel .dots i { background: rgba(255,255,255,.9); }
.cal .day.today { border-color: var(--border-strong); font-weight: 700; }

.idx { padding: 20px; }
.idx .idx-head, .idx .irow { display: grid; grid-template-columns: 96px 1fr 120px 132px 96px 132px; gap: 14px; align-items: center; }
.idx .idx-head { font-family: var(--font-label); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint-foreground);
  padding: 0 12px 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
.idx .irow { padding: 12px; border-bottom: 1px solid var(--border); border-radius: 10px; transition: background var(--dur-1) var(--ease-out); }
.idx .irow:last-child { border-bottom: 0; }
.idx .irow:hover { background: color-mix(in srgb, var(--foreground) 3.5%, transparent); }
.idx .d { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 5px 0; line-height: 1.1; }
.idx .d .dd { font-family: var(--font-display); font-size: 17px; } .idx .d .mm { font-family: var(--font-label); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.idx .nm { font-size: 14.5px; font-weight: 600; } .idx .who .mt { font-size: 12px; color: var(--muted-foreground); }
.idx .t { font-family: var(--font-mono); font-size: 13px; color: var(--muted-foreground); }
.idx .v { font-family: var(--font-mono); font-size: 13px; text-align: right; }
.idx .go { justify-self: end; }
@media (max-width: 860px) {
  .idx .idx-head { display: none; }
  .idx .irow { grid-template-columns: 52px 1fr auto; gap: 10px; }
  .idx .t, .idx .v { display: none; }
}
.load-more { display: block; width: 100%; margin-top: 14px; padding: 11px; border: 1px dashed var(--border-strong); background: transparent;
  border-radius: 12px; color: var(--muted-foreground); font: 600 13px var(--font-sans); cursor: pointer; }
.load-more:hover { color: var(--foreground); border-color: var(--foreground); }

.fbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.select { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 8px 8px 8px 14px; }
.select select { border: none; background: transparent; font: 600 14px var(--font-sans); color: var(--foreground); outline: none; cursor: pointer; padding-right: 4px; }
.flist { padding: 8px 0; container-type: inline-size; }
.flist .fh, .flist .frow { display: grid; grid-template-columns: minmax(0, 1.4fr) 110px 110px 130px 130px 120px 196px; gap: 12px; align-items: center; padding: 12px 20px; }
.flist .fh { font-family: var(--font-label); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-foreground); border-bottom: 1px solid var(--border); font-weight: 600; }
.flist .frow { border-bottom: 1px solid var(--border); transition: background var(--dur-1) var(--ease-out); }
.flist .frow:last-child { border-bottom: 0; }
.flist .frow:hover { background: color-mix(in srgb, var(--foreground) 3.5%, transparent); }
.flist .pac { font-size: 14.5px; font-weight: 600; }
.flist .mono-c { font-family: var(--font-mono); font-size: 13px; color: var(--muted-foreground); }
.flist .val { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--foreground); }
.flist .act { justify-self: end; }
.flist .act .paybtn { font: 600 12.5px var(--font-sans); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); color: var(--success-text);
  background: color-mix(in srgb, var(--success) 8%, transparent); border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.flist .fr-acoes .remind { font-size: 12.5px; padding: 6px 12px; }
.flist .act .paybtn:hover { background: color-mix(in srgb, var(--success) 16%, transparent); }
.flist .act .done-mark { font-family: var(--font-label); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.chip.paid { color: var(--success-text); border-color: color-mix(in srgb, var(--success) 34%, transparent); background: color-mix(in srgb, var(--success) 10%, transparent); }
.chip.paid i { background: var(--success); }
.chip.pend { color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 34%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.chip.pend i { background: var(--warning); }
@container (max-width: 1020px) {
  .flist .fh, .flist .frow { grid-template-columns: minmax(0, 1.4fr) 110px 110px 130px 196px; }
  .flist .metodo, .flist .datapg { display: none; }
}
@container (max-width: 720px) {
  .flist .fh { display: none; }
  .flist .frow { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; }
  .flist .dataco { display: none; }
  .flist .val { text-align: right; }
}

.form-card { padding: 24px; max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--input); background: var(--background); color: var(--foreground); border-radius: 10px;
  padding: 11px 13px; font: inherit; outline: none; transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); width: 100%;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 16%, transparent); }
.field .hint { font-size: 12px; color: var(--faint-foreground); }
.field .hint.erro { color: var(--danger-text); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
/* Alinha a direita, como `dialog.confirm .foot` mais abaixo: o rodape ocupa a
   largura da grade inteira, e ai o grupo vai para o fim. O primario fica por
   ultimo tambem no HTML, para a ordem que se ve ser a que o Tab percorre. */
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-md); position: relative; z-index: 1; }

.auth-card .auth-logo { height: 30px; width: auto; display: block; margin: 0 auto 24px; }
.auth-card h1 { font-size: 1.9rem; margin: 0 0 6px; text-align: center; }
.auth-card .auth-sub { color: var(--muted-foreground); font-size: 14px; margin: 0 0 24px;
  text-align: center; text-wrap: balance; }
.auth-card .campo { margin-bottom: 16px; }
.auth-card .campo-justo { margin-bottom: 8px; }
.auth-card .linha-topo { display: flex; justify-content: space-between; align-items: baseline; }
.auth-card .btn-bloco { width: 100%; justify-content: center; padding: 12px; }
.auth-card .auth-rodape { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px;
  font-family: var(--font-label); font-weight: 600; font-size: 11.5px; }
.auth-card .auth-rodape span { color: var(--faint-foreground); }
.auth-card .auth-rodape a { color: var(--brand-texto); }
.senha-caixa { position: relative; }
.senha-caixa input { padding-right: 44px; width: 100%; }
.olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
  border: 0; background: transparent; border-radius: 9px; cursor: pointer; display: grid; place-items: center;
  color: var(--faint-foreground); transition: color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.olho:hover { color: var(--foreground); background: color-mix(in srgb, var(--foreground) 6%, transparent); }
.olho svg { width: 18px; height: 18px; stroke-width: 1.7; fill: none; stroke: currentColor; }
.olho .fechado { display: none; }
.olho[aria-pressed="true"] .aberto { display: none; }
.olho[aria-pressed="true"] .fechado { display: block; }

.record-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
@media (max-width: 940px) { .record-grid { grid-template-columns: 1fr; } }
.abc-record { border: 1px solid var(--border); border-radius: 14px; background: var(--card); overflow: hidden; }
.abc-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 13px 16px; }
.abc-item + .abc-item { border-top: 1px solid var(--border); }
/* A coluna do atalho so existe na linha que tem atalho.

   O atalho era `position: absolute` no canto, fora do fluxo, entao a coluna
   do texto seguia contando com a largura inteira. A 390px ele passava POR
   CIMA do rotulo e do texto em tres linhas (B, C e D). Reservar a coluna e o
   que faz o texto ceder em vez de ser coberto.

   As tres posicoes vao fixadas porque no HTML o atalho vem ANTES do bloco de
   texto: deixado no automatico ele cairia na coluna do meio e jogaria o
   texto para uma segunda linha da grade. */
.abc-item:has(.ir) { grid-template-columns: 40px minmax(0, 1fr) auto; }
.abc-item .letter { grid-area: 1 / 1; }
.abc-item > div { grid-area: 1 / 2; }
.abc-item .ir { grid-area: 1 / 3; align-self: start; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--brand-texto);
  opacity: 0; transform: translateX(-4px); transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.abc-item:hover .ir, .abc-item .ir:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .abc-item .ir { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .abc-item .ir { transition: none; transform: none; } }
.abc-item .letter { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 18px; }
/* Flex, e nao bloco: a pilula "pede atencao" fica ao lado enquanto houver
   largura e desce alinhada quando nao houver. Com margem ela descia com 8px
   de recuo pendurado. */
.abc-item .k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--font-label); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.abc-item .txt { font-size: 13.5px; color: var(--foreground); margin-top: 3px; line-height: 1.5; }
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 16px 1fr; gap: 12px; }
.tl-item .tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-item .tl-rail .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-grad); margin-top: 5px; flex: none; }
.tl-item .tl-rail .line { width: 2px; flex: 1; background: var(--border); margin: 3px 0 0; }
.tl-item:last-child .tl-rail .line { display: none; }
.tl-item:last-child .body { padding-bottom: 0; }
.tl-item .body { padding-bottom: 16px; }
.tl-item .when { font-family: var(--font-mono); font-size: 11px; color: var(--faint-foreground); }
.tl-item .what { font-size: 14px; font-weight: 600; margin-top: 2px; }
.tl-item .desc { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.peso-linha { padding-top: 6px; }
.peso-linha svg { display: block; width: 100%; height: auto; color: var(--success-text); }
.peso-linha .gl { stroke: var(--border); stroke-width: 1; }
.peso-linha .area { fill: color-mix(in srgb, var(--success) 9%, transparent); }
.peso-linha .tr { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.peso-linha .pt { fill: currentColor; }
.peso-linha .pt.fim { stroke: var(--card); stroke-width: 2; }
.peso-linha .vl { font: 600 11px var(--font-mono); fill: var(--muted-foreground); }
.peso-linha .vl.fim { fill: var(--success-text); }
.peso-linha .meses { display: flex; justify-content: space-between; padding: 4px 3.5% 0; font-family: var(--font-mono); font-size: 9px; color: var(--faint-foreground); }

.pt-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.pav { width: 58px; height: 58px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 22px; flex: none; }
.pt-head .pmeta { min-width: 0; flex: 1; }

.pt-head .pt-menu { align-self: start; margin-left: auto; }
.pt-head .pt-menu summary { width: 34px; height: 34px; }
.pt-head .pt-menu .rowmenu-pop { right: 0; left: auto; }
.pt-head .pname a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.pt-head .pname a:hover { border-bottom-color: color-mix(in srgb, var(--brand-1) 55%, transparent); }
.pt-head .pname { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 400; margin: 0; }
.pt-head .pname .age { font-style: italic; color: var(--muted-foreground); font-size: 1rem; margin-left: 8px; }
.pt-head .prow2 { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.pt-head .alerg { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  color: var(--warning-text); border: 1px solid color-mix(in srgb, var(--warning) 34%, transparent); background: color-mix(in srgb, var(--warning) 9%, transparent); }
.pt-head .rel { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; font-style: italic; font-family: var(--font-display); color: var(--muted-foreground); font-size: 14px; max-width: 60ch; }
.pt-head .rel svg { color: var(--brand-texto); flex: none; margin-top: 3px; }

.phases { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; border: 1px solid var(--border); border-radius: 16px; padding: 6px; background: var(--card);
  container-type: inline-size; }
.phase-tab { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: none; background: transparent; cursor: pointer;
  border-radius: 11px; text-align: left; color: var(--muted-foreground); transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.phase-tab .pn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; flex: none; }
.phase-tab .pt-lbl { font-family: var(--font-display); font-size: 1.05rem; } .phase-tab .pt-sub { font-size: 11px; font-family: var(--font-label); letter-spacing: .05em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.phase-tab[aria-selected="true"] { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-warm); }
.phase-tab[aria-selected="true"] .pn { border-color: rgba(255,255,255,.7); }
@container (max-width: 680px) { .phase-tab { flex: 1 0 100%; } .phase-tab .pt-sub { display: none; } }
.palco { display: block; }
.palco-fluxo { min-width: 0; }

.gio { position: fixed; z-index: 45; right: 20px; top: 92px; bottom: 96px;
  width: min(392px, calc(100vw - 40px)); display: flex; align-items: stretch; pointer-events: none; }
.gio > * { pointer-events: auto; }
.palco[data-gio="fechado"] .gio { top: auto; width: auto; }
.gio.largo { width: min(640px, calc(100vw - 40px)); }
.gio-caixa { border: 1px solid var(--border); border-radius: 16px; background: var(--card); overflow: hidden;
  display: flex; flex-direction: column; width: 100%; min-height: 0;
  box-shadow: 0 1px 2px rgba(23,16,27,.04), 0 34px 70px -30px rgba(23,16,27,.42); }
.gio-topo { display: flex; align-items: center; gap: 9px; padding: 12px 13px; border-bottom: 1px solid var(--border); }
.gio-marca { flex: none; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-grad-soft); color: var(--brand-texto); position: relative; }
.gio-marca svg { width: 14px; height: 14px; }
.gio-nome { font-family: var(--font-display); font-size: 1rem; line-height: 1; }
.gio-topo .sp { flex: 1; }
.gio-fechar { flex: none; border: 0; background: none; cursor: pointer; color: var(--faint-foreground);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; }
.gio-fechar:hover { color: var(--foreground); background: var(--surface); }
.gio-agora { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12.5px;
  color: var(--muted-foreground); background: var(--surface); border-bottom: 1px solid var(--border); }
.gio-agora .rec-dot { width: 7px; height: 7px; flex: none; }
.gio-corpo { flex: 1 1 42%; min-height: 0; overflow-y: auto;
  mask-image: linear-gradient(180deg, #000 calc(100% - 20px), transparent);
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.gio-corpo::-webkit-scrollbar { width: 6px; }
.gio-corpo::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.gio-grupo[hidden] { display: none; }
.gio-fim { padding: 14px; display: grid; gap: 9px; }
.gio-fim .ok { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted-foreground);
  line-height: 1.5; }
.gio-fim .ok svg { flex: none; color: var(--success-text); margin-top: 2px; }


.gio-escuta { padding: 13px 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--border); }
.gio-escuta[hidden] { display: none; }
.ge-k { font-family: var(--font-label); font-size: 9px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; }
.ge-fala { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 14.5px;
  line-height: 1.5; color: var(--foreground); }
.ge-pe { font-size: 11.5px; color: var(--muted-foreground); }
.ge-pe b { font-weight: 600; color: var(--brand-texto); }
.gio .abc-live, .gio .preread { border: 0; border-radius: 0; margin: 0; background: transparent; padding: 13px 14px; }
.gio .preread { border-bottom: 0; }
.gio .preread .f { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 6px 10px;
  align-items: start; padding: 10px 11px; }
.gio .preread .f i { grid-row: 1; margin-top: 6px; }
.gio .preread .f .tx { grid-column: 2 / -1; font-size: 12.5px; line-height: 1.5; }
.gio .preread .f .ver { grid-column: 2; justify-self: start; }
.gio .preread .f [data-desfazer] { grid-column: 3; justify-self: end; }
.gio .preread .okline { padding: 0 2px; }
.gio .abc-live .ld { width: 27px; height: 27px; }
.gio .chat { border: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; flex: 1 1 58%; min-height: 0; }
.gio .chat .msgs { flex: 1 1 auto; min-height: 0; max-height: none; padding: 14px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.gio .chat .msgs::-webkit-scrollbar { width: 6px; }
.gio .chat .msgs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.gio .chat .m { max-width: 100%; }
.gio .chat .m.user { max-width: 88%; }
.gio .chat .inbar { flex: none; padding: 10px 12px; }
.gio .chat .inbar input { font-size: 13px; padding: 8px 12px; }
.gio-largar { flex: none; border: 0; background: none; cursor: pointer; color: var(--faint-foreground);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; }
.gio-largar:hover { color: var(--foreground); background: var(--surface); }
.gio-largar:active { transform: scale(.94); }
.gio-largar .i-on { display: none; }
.gio-largar[aria-pressed="true"] .i-off { display: none; }
.gio-largar[aria-pressed="true"] .i-on { display: grid; }

@media (min-width: 1240px) {
  body[data-gio="aberto"] .gio-veu { display: none; }
}
.gio-veu { position: fixed; inset: 0; z-index: 44; background: rgba(18,37,53,.34);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-3) var(--ease-out); }
@media (max-width: 1180px) {
  .palco[data-gio="aberto"] .gio-veu { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .gio-veu { transition: none; } }

.gio-alca { display: none; }
.palco[data-gio="fechado"] .gio-caixa { display: none; }
.palco[data-gio="fechado"] .gio { pointer-events: none; }
.palco[data-gio="fechado"] .gio-alca { display: grid; gap: 11px; justify-items: center; width: 54px;
  padding: 11px 0 13px; border: 1px solid color-mix(in srgb, var(--brand-1) 26%, transparent);
  border-radius: 18px; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-1) 11%, var(--card)), var(--card) 70%);
  box-shadow: 0 1px 2px rgba(23,16,27,.05), 0 14px 30px -18px color-mix(in srgb, var(--brand-1) 55%, transparent);
  transition: transform var(--dur-2, .16s) ease-out, box-shadow var(--dur-3, .24s) ease-out; }
.gio-alca:hover { transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(23,16,27,.05), 0 20px 38px -18px color-mix(in srgb, var(--brand-1) 70%, transparent); }
.gio-alca:active { transform: scale(.97); }
.gio-alca .gio-marca { width: 34px; height: 34px; background: var(--brand-grad); color: #fff;
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand-1) 70%, transparent); }
.gio-alca .gio-marca svg { width: 17px; height: 17px; }
.gio-pend { display: grid; gap: 5px; justify-items: center; }
.gio-pend span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-size: 11px; color: #fff; }
.gio-pend span.mais { background: none; color: var(--faint-foreground); font-family: var(--font-mono);
  font-style: normal; font-size: 10px; }
.gio-pend:empty { display: none; }
.gio-n { position: absolute; top: -5px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff; font-family: var(--font-mono); font-size: 10px;
  display: grid; place-items: center; border: 2px solid var(--card); }
.gio-n[hidden] { display: none; }

.ab-gio { display: none; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  position: relative; border: 0; background: #f6f2ef; color: #2a1a20; font: 600 13.5px var(--font-sans);
  box-shadow: 0 1px 2px rgba(0,0,0,.28), 0 10px 22px -10px rgba(0,0,0,.6);
  transition: transform var(--dur-2, .16s) ease-out, box-shadow var(--dur-3, .24s) ease-out; }
.ab-gio svg { color: var(--brand-texto); }
.ab-gio:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 30px -12px rgba(0,0,0,.7); }
.ab-gio:active { transform: scale(.97); }
.ab-gio .gio-n { top: -6px; right: -6px; border-color: #16293c; }
.ab-gio[aria-expanded="true"] { background: var(--brand-grad); color: #fff; }
.ab-gio[aria-expanded="true"] svg { color: #fff; }

@keyframes gio-mao { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-1) 42%, transparent); }
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand-1) 0%, transparent); } }
.gio-alca.acenou .gio-marca, .ab-gio.acenou { animation: gio-mao 1.1s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .gio-alca.acenou .gio-marca, .ab-gio.acenou { animation: none; } }

@media (max-width: 1180px) {
  .ab-gio { display: inline-flex; }
  .gio-alca { display: none !important; }
  .gio, .gio.largo { left: 16px; right: 16px; top: 84px; bottom: 92px; width: auto; }
  .palco[data-gio="fechado"] .gio { top: auto; }
}
@media (max-width: 620px) {
  .gio, .gio.largo { left: 10px; right: 10px; top: 14vh; bottom: 10px; }
  .gio-caixa { box-shadow: 0 26px 60px -18px rgba(23,16,27,.55); }
}

.phase-panel { display: none; } .phase-panel.on { display: block; animation: surge var(--dur-3) var(--ease-out) both; }
@keyframes surge { from { opacity: 0; transform: translateY(6px); } }
.prow-conf, .ctx .doc-conf, .add-colhe, .exam-ana[id^="ras-"] { animation: surge var(--dur-2) var(--ease-out) both; }
.sem-consulta { animation: surge var(--dur-3) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .phase-panel.on, .prow-conf, .ctx .doc-conf, .add-colhe, .exam-ana[id^="ras-"], .sem-consulta { animation: none; }
}
.phase-panel .sec { margin-bottom: 16px; }
.sec-title { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint-foreground); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.frozen-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted-foreground); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 16px; }
.frozen-note svg { color: var(--brand-texto); flex: none; }
.frozen-note.pende { border-color: color-mix(in srgb, var(--warning) 45%, transparent); background: color-mix(in srgb, var(--warning) 9%, transparent); }
.frozen-note.pende svg { color: var(--warning-text); }
.frozen-note.pende .btn-tiny { margin-left: auto; }

body[data-consulta="vazia"] .pt-head, body[data-consulta="vazia"] .phases,
body[data-consulta="vazia"] #palco, body[data-consulta="vazia"] .topbar .chip { display: none; }
.sem-consulta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 84px 24px; }
.sem-consulta .ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad-soft); color: var(--brand-texto); margin-bottom: 8px; }
.sem-consulta h1 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 500; margin: 0; }
.sem-consulta p { margin: 0 0 14px; color: var(--muted-foreground); font-size: 14px; }
.sem-consulta .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sem-consulta #agBtn svg { transition: transform var(--dur-2) var(--ease-out); }
.sem-consulta #agBtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.ag-abre { width: min(430px, 100%); margin-top: 16px; padding: 8px; text-align: left;
  border: 1px solid var(--border); border-radius: 14px; background: var(--card);
  box-shadow: 0 18px 44px -26px rgba(18,25,32,.34); display: grid; gap: 2px; }
.ag-abre[hidden] { display: none; }
.ag-k { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; padding: 8px 8px 4px; }
.ag-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 9px; border-radius: 10px; text-decoration: none; color: var(--foreground);
  transition: background var(--dur-1) var(--ease-out); }
a.ag-row:hover { background: var(--surface); }
.ag-h { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.ag-tx { min-width: 0; display: grid; gap: 1px; }
.ag-tx b { font-size: 13.5px; font-weight: 600; }
.ag-tx i { font-style: normal; font-size: 12px; color: var(--muted-foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row.atual { background: color-mix(in srgb, var(--brand-1) 7%, transparent); }
.ag-m { font-family: var(--font-label); font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-texto); font-weight: 600; white-space: nowrap; }
.ag-pe { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 4px; padding: 10px 9px 4px; border-top: 1px solid var(--border); }
.ag-novo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--brand-texto); text-decoration: none; }
.ag-novo:hover { text-decoration: underline; }
.ag-tudo { font-size: 12.5px; color: var(--muted-foreground); text-decoration: none; }
.ag-tudo:hover { color: var(--foreground); }


.rec-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent); animation: rec 1.6s infinite; }
@keyframes rec { 0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--danger) 55%,transparent);} 70%{box-shadow:0 0 0 7px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
@media (prefers-reduced-motion: reduce){ .rec-dot{ animation:none; } }
.rec-bar .rec-t { font-family: var(--font-mono); font-size: 13px; } .rec-bar .consent { margin-left: auto; font-family: var(--font-label); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--success-text); display: inline-flex; gap: 5px; align-items: center; font-weight: 600; }
.bubbles { display: grid; gap: 10px; max-height: 300px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.bubble .sp { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; opacity: .6; display: block; margin-bottom: 3px; font-weight: 600; }
.bubble.doc { background: var(--brand-grad-soft); border: 1px solid var(--border); justify-self: start; }
.bubble.pac { background: var(--surface); border: 1px solid var(--border); justify-self: end; }

.abctabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.abctab { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 7px 13px; cursor: pointer; font: 500 13px var(--font-sans); color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 7px; }
.abctab .l { font-family: var(--font-display); font-style: italic; font-weight: 600; }
.abctab[aria-selected="true"] { color: #fff; border-color: transparent; }
.abctab .fill { width: 5px; height: 5px; border-radius: 50%; }
.abc-body { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); }
.abc-body textarea { width: 100%; border: none; background: transparent; resize: vertical; min-height: 120px; font: inherit; color: var(--foreground); outline: none; line-height: 1.6; }
.ai-tag { font-family: var(--font-label); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-texto); display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }

.ai-card { border: 1px solid color-mix(in srgb, var(--brand-1) 22%, var(--border)); border-radius: 14px; padding: 18px 20px; background: var(--brand-grad-soft); }
.ai-card .ai-txt { font-family: var(--font-display); font-size: 15.5px; line-height: 1.7; color: var(--foreground); white-space: pre-wrap; }
.ai-card .ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }

.plano { display: grid; gap: 10px; }
.meal { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.meal .mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.meal .mt2 { font-weight: 600; font-size: 14px; } .meal .mtime { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.meal .items { display: grid; gap: 4px; } .meal .it { font-size: 13.5px; color: var(--muted-foreground); display: flex; justify-content: space-between; gap: 12px; }
.meal .macros { display: flex; gap: 14px; margin-top: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--faint-foreground); }
.meal .macros b { color: var(--foreground); }

.presc { display: grid; gap: 8px; }
.presc .p { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; background: var(--card); }
.presc .p .ord { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-grad-soft); color: var(--brand-texto); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; }
.presc .p .med { font-size: 14px; font-weight: 600; } .presc .p .obs { font-size: 12.5px; color: var(--muted-foreground); }
.presc .p .hrs { font-family: var(--font-mono); font-size: 11px; color: var(--brand-texto); }

.chat { border: 1px solid var(--border); border-radius: 14px; background: var(--card); display: flex; flex-direction: column; overflow: hidden; }
.chat .msgs { padding: 16px; display: grid; gap: 10px; max-height: 280px; overflow-y: auto; }
.chat .m { max-width: 84%; padding: 9px 13px; border-radius: 13px; font-size: 13.5px; line-height: 1.5; }
.chat .m.user { background: var(--brand-grad); color: #fff; justify-self: end; }
.chat .m.ai { background: var(--surface); border: 1px solid var(--border); justify-self: start; }
.chat .m.ai .tool { display: flex; align-items: center; gap: 5px; font-family: var(--font-label); font-size: 10px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--success-text); font-weight: 600;
  margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border); }
.chat .m.ai .tool svg { flex: none; }
.chat .inbar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat .inbar input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 10px 14px; font: inherit; background: var(--background); color: var(--foreground); outline: none; }
.chat .inbar input:focus { border-color: var(--ring); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 980px){ .two-col { grid-template-columns: 1fr; } }

dialog.confirm { border: none; border-radius: 18px; padding: 0; max-width: 420px; width: 92vw; background: var(--card); color: var(--foreground);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  opacity: 0; transform: scale(.96);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out),
              overlay var(--dur-2) var(--ease-out) allow-discrete, display var(--dur-2) var(--ease-out) allow-discrete; }
dialog.confirm[open] { opacity: 1; transform: scale(1); }
@starting-style { dialog.confirm[open] { opacity: 0; transform: scale(.96); } }
dialog.confirm::backdrop { background: color-mix(in srgb, #1F1815 55%, transparent); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity var(--dur-2) var(--ease-out), overlay var(--dur-2) var(--ease-out) allow-discrete, display var(--dur-2) var(--ease-out) allow-discrete; }
dialog.confirm[open]::backdrop { opacity: 1; }
@starting-style { dialog.confirm[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  dialog.confirm, dialog.confirm[open], dialog.confirm::backdrop { transform: none; }
}
dialog.confirm .body { padding: 24px 24px 8px; }
dialog.confirm .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  color: var(--danger-text); background: color-mix(in srgb, var(--danger) 10%, transparent); }
dialog.confirm h3 { font-size: 1.4rem; }
dialog.confirm p { color: var(--muted-foreground); font-size: 14px; margin: 8px 0 0; }
dialog.confirm .foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 22px; }

/* ---- O dialogo dos passos da consulta -------------------------------- */
/* Herda `.confirm` mas NAO herda o `.ic`: aquele quadrado e tingido de
   `--danger`, e nenhum destes passos destroi dado. Vestir de destrutivo o que
   nao e ensina a ignorar o que e, e o icone generico ali dentro era lido como
   um relogio.

   No lugar dele vai a trilha das quatro etapas, que e a unica figura que
   responde a pergunta do dialogo: de onde a consulta sai, e em qual etapa ela
   entra. A animacao E a explicacao, nao enfeite. */
dialog.confirm.passo { max-width: 460px; }
dialog.confirm.passo .ic { display: none; }

.passo-trilha { margin: 2px 0 20px; }
.passo-trilha ol { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); }
/* A linha do no tem altura FIXA: o no que entra e maior que os outros, e sem
   isso o centro dele descia e o trilho chegava torto. */
.passo-trilha li { position: relative; display: grid; grid-template-rows: 16px auto;
  justify-items: center; align-items: center; gap: 9px; }

/* O trilho que CHEGA neste no: base apagada no ::before, avanco da marca no
   ::after, os dois na mesma caixa. So o no que entra anima o ::after. */
.passo-trilha li::before,
.passo-trilha li::after {
  content: ''; position: absolute; top: 7px; right: 50%; left: -50%;
  height: 2px; border-radius: 2px;
}
/* `--border-strong` aqui dava 1,53:1: a etapa futura precisa ser VISTA, senao
   a trilha nao diz "2 de 4". Desenho pede 3:1, e este chega a 3,3 no claro. */
.passo-trilha li::before { background: color-mix(in srgb, var(--faint-foreground) 78%, transparent); }
.passo-trilha li::after { background: var(--brand-texto);
  transform: scaleX(1); transform-origin: left center; }
/* O primeiro no nao tem de onde vir, e etapa futura ainda nao tem avanco. */
.passo-trilha li:first-child::before,
.passo-trilha li:first-child::after,
.passo-trilha li[data-estado="futuro"]::after { content: none; }

.passo-trilha .pt-no { width: 11px; height: 11px; border-radius: 999px;
  box-sizing: border-box; display: grid; place-items: center; }
/* Percorrido tambem e da marca: com o no apagado e o trilho colorido, o
   caminho ja andado lia como duas coisas diferentes. */
.passo-trilha li[data-estado="feito"] .pt-no { background: var(--brand-texto); }
.passo-trilha li[data-estado="futuro"] .pt-no { border: 2px solid color-mix(in srgb, var(--faint-foreground) 78%, transparent); }
.passo-trilha li[data-estado="entrando"] .pt-no { width: 15px; height: 15px;
  background: var(--brand-texto);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-texto) 16%, transparent); }

/* O visto so aparece no no que ENCERRA. A cor dele e a do proprio cartao, e nao
   branco: no escuro `--brand-texto` e claro, e branco sobre claro daria 2:1
   num desenho que precisa de 3. Contra o cartao ele separa nos dois temas. */
.passo-trilha .pt-ok { display: none; }
.passo-trilha li[data-estado="entrando"][data-conclui] .pt-no { width: 21px; height: 21px; }
.passo-trilha li[data-estado="entrando"][data-conclui] .pt-ok { display: block;
  width: 12px; height: 12px; color: var(--card); }
.passo-trilha .pt-ok path { stroke-dasharray: 24; stroke-dashoffset: 0; }

.passo-trilha .pt-rot { font-size: 10px; font-weight: 600; letter-spacing: .03em;
  line-height: 1.2; text-align: center; color: var(--faint-foreground); }
.passo-trilha li[data-estado="entrando"] .pt-rot { color: var(--brand-texto); }

/* O trilho desenha, o no chega, o visto se fecha: 720ms do inicio ao fim, na
   ordem em que a consulta anda. Estado final e o de REPOUSO, entao sem
   animacao (ou com movimento reduzido) a trilha nasce pronta. */
/* O trecho da gravacao que vai para o Gio.

   E a figura que o titulo nao consegue dar: "fechar a anamnese" e abstrato, e
   ver que ha 40 segundos gravados nao e. Some no encerrar, porque ali nenhum
   trecho e mandado para a IA, e uma barra que aparecesse ali estaria mentindo. */
.passo-trecho { display: grid; gap: 8px; margin: -4px 0 18px; }
/* Explicito porque `display` em regra vence o atributo `hidden`. */
.passo-trecho[hidden] { display: none; }

/* Uma onda, e nao uma barra.

   A primeira versao era uma barra cheia, e ficava logo abaixo do trilho da
   trilha: duas reguas horizontais vermelhas empilhadas, e a de baixo era lida
   como o progresso da de cima. Tracinhos leem como AUDIO, que e o que a figura
   descreve, e ainda mostram a divisao quando ha duas fatias. */
/* Tracos FINOS e muitos: com 24 tracos de 11px eles viravam blocos, e a figura
   voltava a parecer uma barra picada em vez de audio. */
.ptr-onda { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.ptr-onda i { flex: 0 0 3px; border-radius: 2px;
  transform-origin: center center;
  height: calc(5px + var(--h) * 17px);
  background: color-mix(in srgb, var(--faint-foreground) 78%, transparent); }
.ptr-onda i[data-alvo] { background: var(--brand-texto); }
.ptr-nota { margin: 0; font-size: 12px; color: var(--muted-foreground); }

/* A trilha desenha, o no chega, o trecho preenche, o visto se fecha: 720ms na
   ordem em que a consulta anda. O estado final e o de REPOUSO, entao sem
   animacao (ou com movimento reduzido) tudo nasce pronto, sem pular. */
@media (prefers-reduced-motion: no-preference) {
  dialog.passo[data-anima] .passo-trilha li[data-estado="entrando"]::after {
    animation: pt-fio 280ms var(--ease-out) 80ms both; }
  dialog.passo[data-anima] .passo-trilha li[data-estado="entrando"] .pt-no {
    animation: pt-no 240ms var(--ease-out) 320ms both; }
  /* Os tracinhos sobem da esquerda para a direita, no mesmo sentido em que a
     fala foi gravada. 44 x 8ms = 352ms de cauda, atras do no que acabou de
     chegar. */
  dialog.passo[data-anima] .ptr-onda i {
    animation: pt-onda 240ms var(--ease-out) calc(340ms + var(--i) * 8ms) both; }
  dialog.passo[data-anima] .passo-trilha li[data-estado="entrando"] .pt-ok path {
    animation: pt-ok 200ms var(--ease-out) 520ms both; }
}
@keyframes pt-fio { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Nunca de `scale(0)`: nada no mundo aparece do nada. */
@keyframes pt-no {
  from { transform: scale(.5); opacity: .3; }
  62%  { transform: scale(1.14); opacity: 1; }
  to   { transform: scale(1); }
}
@keyframes pt-ok { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes pt-onda {
  from { transform: scaleY(.26); opacity: .25; }
  to   { transform: scaleY(1); opacity: 1; }
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost2 { background: transparent; border: 1px solid var(--border-strong); color: var(--foreground); }

@media (prefers-reduced-motion: no-preference) {
  .content > *:not(.palco) { animation: content-rise var(--dur-3) var(--ease-out) both; }
  .palco-fluxo { animation: content-rise var(--dur-3) var(--ease-out) both; animation-delay: 120ms; }
  .content > *:nth-child(1) { animation-delay: 20ms; }
  .content > *:nth-child(2) { animation-delay: 70ms; }
  .content > *:nth-child(3) { animation-delay: 120ms; }
  .content > *:nth-child(4) { animation-delay: 170ms; }
  .content > *:nth-child(n+5) { animation-delay: 210ms; }
}
@keyframes content-rise { from { opacity: 0; transform: translateY(12px); } }

.state { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-label); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; font-weight: 600; }
.state i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state.draft { color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 38%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.state.valid { color: var(--success-text); border-color: color-mix(in srgb, var(--success) 38%, transparent); background: color-mix(in srgb, var(--success) 10%, transparent); }

.consent-note { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.consent-note summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-foreground); }
.consent-note summary::-webkit-details-marker { display: none; }
.consent-note summary::after { content: "+"; margin-left: auto; color: var(--brand-texto); font-size: 1.1rem; line-height: 1; transition: transform var(--dur-3) var(--ease-out); }
.consent-note[open] summary::after { transform: rotate(45deg); }
.consent-note p { font-size: 13px; color: var(--muted-foreground); line-height: 1.6; margin: 10px 0 0; max-width: 68ch; }
.consent-note b { color: var(--foreground); font-weight: 600; }

.ai-stamp { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; border: 1px solid var(--border);
  border-left: 3px solid var(--brand-1); border-radius: 12px; padding: 14px 16px; background: var(--card); margin-bottom: 14px; }
.ai-stamp .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--brand-texto);
  background: var(--brand-grad-soft); }
.ai-stamp .t { font-size: 13.5px; font-weight: 600; }
.ai-stamp .d { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); line-height: 1.7; margin-top: 5px; }
.ai-stamp .d.mao { color: var(--brand-texto); margin-top: 2px; }
.ai-stamp .law { font-size: 11.5px; color: var(--muted-foreground); margin-top: 7px; }

.sec-title .spacer { flex: 1; }
.btn-tiny { font: 600 12px var(--font-sans); cursor: pointer; border: 1px solid var(--border-strong); background: transparent;
  color: var(--muted-foreground); border-radius: 999px; padding: 4px 11px; display: inline-flex; align-items: center; gap: 5px;
  transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.btn-tiny:hover { color: var(--foreground); border-color: var(--foreground); }
.btn-tiny:active { transform: scale(.97); }
.btn-tiny[aria-pressed="true"] { color: var(--brand-texto); border-color: color-mix(in srgb, var(--brand-1) 45%, transparent);
  background: color-mix(in srgb, var(--brand-1) 8%, transparent); }
.btn-tiny.ico { width: 30px; height: 30px; padding: 0; justify-content: center; gap: 0; border-radius: 50%; }
.btn-tiny.ico svg { display: block; }
#theme .i-sol, #theme .i-lua { display: none; }
#theme .i-lua { display: inline-flex; }
[data-theme="dark"] #theme .i-lua { display: none; }
[data-theme="dark"] #theme .i-sol { display: inline-flex; }

.icopar .i-on, .icopar .i-off { display: inline-flex; }
.icopar .i-on { display: none; }
.icopar[aria-pressed="true"] .i-off { display: none; }
.icopar[aria-pressed="true"] .i-on { display: inline-flex; }

.abc-live { border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; background: var(--card); margin-top: 12px; }
.abc-live .hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.abc-live .hd .lbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.abc-live .hd .count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.abc-live .hd .count b { color: var(--foreground); }
.abc-live .dots { display: flex; gap: 6px; flex-wrap: wrap; }
.abc-live .ld { width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-family: var(--font-display); font-style: italic;
  font-weight: 600; font-size: 14px; display: grid; place-items: center; position: relative;
  border: 1.5px dashed var(--border-strong); background: transparent; color: var(--muted-foreground);
  transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.abc-live .ld:hover { border-color: var(--muted-foreground); color: var(--muted-foreground); }
.abc-live .ld:active { transform: scale(.94); }
.abc-live .ld.ok { border-style: solid; border-color: transparent; color: #fff; }
.abc-live .ld.ok::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--success); border: 2px solid var(--card); }
.abc-live .ld[aria-pressed="true"] { outline: 2px solid var(--ring); outline-offset: 2px; }
.abc-live .hint { font-size: 12.5px; color: var(--muted-foreground); margin: 10px 0 0; }
.abc-live .hint b { color: var(--foreground); }
.abc-live .ask { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; font-size: 13.5px; }
.abc-live .ask .q { font-family: var(--font-display); font-style: italic; color: var(--foreground); }
.abc-live .ask .w { display: block; font-family: var(--font-label); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint-foreground); margin-bottom: 5px; font-weight: 600; }

.evidence { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.evidence .lbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.evidence blockquote { margin: 7px 0 0; padding-left: 12px; border-left: 2px solid var(--brand-2); font-size: 13.5px;
  color: var(--muted-foreground); font-style: italic; }
.evidence .play { margin-top: 9px; font: 600 12px var(--font-sans); cursor: pointer; border: 1px solid var(--border-strong);
  background: transparent; color: var(--muted-foreground); border-radius: 999px; padding: 4px 11px;
  display: inline-flex; align-items: center; gap: 6px; transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.evidence .play:hover { color: var(--brand-texto); border-color: color-mix(in srgb, var(--brand-1) 45%, transparent); }
.evidence .play:active { transform: scale(.97); }
.evidence .none { font-size: 13px; color: var(--faint-foreground); margin: 7px 0 0; font-style: italic; }
.bubble.cited { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.ctx { display: grid; gap: 8px; }
.ctx .doc { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px; background: var(--card); }
.ctx .doc .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-grad-soft); color: var(--brand-texto); }
.ctx .doc .nm { font-size: 14px; font-weight: 600; }
.ctx .doc .mt { font-size: 12px; color: var(--muted-foreground); }
.ctx .doc .rd { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--success-text); white-space: nowrap; font-weight: 600; }
.ctx .add { border: 1px dashed var(--border-strong); border-radius: 11px; padding: 11px; text-align: center;
  font: 600 13px var(--font-sans); color: var(--muted-foreground); background: transparent; cursor: pointer; width: 100%; }
.ctx .add:hover { color: var(--foreground); border-color: var(--foreground); }

.anthro { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.anthro .rowk { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.anthro .rowk .k { color: var(--muted-foreground); min-width: 108px; }
.anthro .rowk .v { font-family: var(--font-mono); font-size: 13px; }
.anthro .rowk .src { margin-left: auto; font-family: var(--font-label); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }

/* ── O TOPO DO PAINEL, portado do app ─────────────────────────────────────

   Vinham quatro cartões de KPI (Pacientes, Consultas hoje, Nesta semana,
   Receita) e três cartões de pendência, e o app perdeu os sete: a primeira
   tela devolvia números que ninguém usa para decidir nada e empurrava a
   agenda para 426px do topo. No lugar: a fita do dia, uma linha para a
   pendência que existe, e a próxima consulta CRESCIDA dentro da lista, em
   vez de um cartão `.next-up` repetindo a linha logo abaixo dela.

   Medido no app: a agenda passou de 426px para 119px num dia vazio.

   🔴 `.kpi*` fica: `financeiro.html` usa. `.pendencias*` ficou sem leitor e
   sai na varredura de CSS morto, que é commit próprio. */

/* A fita: uma consulta por segmento, na ordem do relógio. `flex: 1` é o que
   faz ela responder “quanto falta” pela PROPORÇÃO — oito consultas dividem a
   mesma largura que três, e o olho compara área, não contagem. */
.fita { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 0 2px; }
.fita .trilho { display: flex; min-width: 0; flex: 1; gap: 3px; align-items: stretch; height: 8px; }
/* Sem estado = cancelada ou falta: mais apagada que “por vir”, porque saiu do
   dia em vez de estar esperando. */
.fita .trilho i { min-width: 3px; flex: 1; border-radius: 3px; background: color-mix(in srgb, var(--border-strong) 55%, transparent); }
.fita .trilho i[data-estado="porvir"] { background: var(--border-strong); }
.fita .trilho i[data-estado="feito"]  { background: var(--success); }
.fita .trilho i[data-estado="agora"]  { background: var(--primary); }
.fita .conta { flex: none; color: var(--muted-foreground); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fita .conta b { color: var(--foreground); font-weight: 600; }

/* Linha, e não cartão: a pendência é a terceira coisa da tela em importância,
   e cartão igual ao herói diria que as duas pesam o mesmo. */
.pendlinha { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 26%, var(--border)); background: color-mix(in srgb, var(--warning) 6%, var(--card));
  color: var(--foreground); text-decoration: none; transition: border-color var(--dur-1) var(--ease-out); }
.pendlinha:hover { border-color: color-mix(in srgb, var(--warning) 48%, var(--border)); }
.pendlinha b { flex: none; min-width: 26px; text-align: center; color: var(--warning-text); font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.pendlinha > span { min-width: 0; flex: 1; font-size: 13.5px; }
.pendlinha > svg { flex: none; color: var(--faint-foreground); }

/* A PRÓXIMA CONSULTA, crescida. Não é cartão diferente: é a mesma `.crow`,
   com a coluna do meio mais alta. Fio coral à esquerda em vez de fundo
   próprio, porque fundo diria “linha de outro tipo”, e ela é do mesmo tipo:
   só é a próxima.

   `align-items: start` porque com quatro linhas de texto no meio o centrado
   deixava a hora flutuando na metade da altura, longe do nome que ela nomeia. */
.crow[data-aseguir] { position: relative; align-items: start; border-color: var(--border-strong); padding-left: 18px; }
.crow[data-aseguir]::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 7px; width: 2px; border-radius: 2px; background: var(--primary); }
.crow[data-aseguir] .time, .crow[data-aseguir] .rt, .crow[data-aseguir] > .chip { padding-top: 2px; }
.crow .who .rot { display: block; margin-bottom: 2px; color: var(--primary); font-family: var(--font-label); font-size: 9.5px;
  font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
/* O nome da próxima em serifada, no corpo de um título: é a informação mais
   importante da tela, e o tipo tem de dizer isso antes da leitura. */
.crow[data-aseguir] .who .nm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-family: var(--font-display);
  font-size: 1.32rem; font-weight: 500; letter-spacing: -.022em; line-height: 1.14; }
.crow .who .nm em { color: var(--muted-foreground); font-size: .6em; font-style: italic; }
/* A nota da última consulta em serifada itálica, que é como o produto escreve
   fala de paciente em toda tela. Até duas linhas: nota longa aqui empurra a
   agenda para baixo, e o texto inteiro está na ficha. */
.crow .who .nota { display: -webkit-box; overflow: hidden; margin-top: 4px; color: var(--muted-foreground); font-family: var(--font-display);
  font-size: 13px; font-style: italic; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.pendencias { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .pendencias { grid-template-columns: 1fr; } }
.pendencias > * { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); text-decoration: none; color: var(--foreground);
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.pendencias > a:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pendencias .n { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; min-width: 26px; text-align: center; }
.pendencias .warn .n, .pendencias .warn > .n { color: var(--warning-text); }
.pendencias .info .n, .pendencias .info > .n { color: var(--info-text); }
.pendencias .ok .n, .pendencias .ok > .n { color: var(--success-text); }
.pendencias .tx b { display: block; font-size: 13.5px; }
.pendencias .tx span { color: var(--muted-foreground); font-size: 12.5px; }
.pendencias .go { margin-left: auto; color: var(--faint-foreground); flex: none; }
.pendencias .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pendencias .warn .ic, .pendencias .warn > .ic { background: color-mix(in srgb, var(--warning) 13%, transparent); color: var(--warning-text); }
.pendencias .info .ic, .pendencias .info > .ic { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info-text); }
.pendencias .ok .ic, .pendencias .ok > .ic { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success-text); }

.next-up { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px;
  background: var(--brand-grad-soft); border: 1px solid var(--border); margin-bottom: 12px; }
.next-up .tm { font-family: var(--font-mono); font-size: 12px; color: var(--brand-texto); white-space: nowrap; padding-top: 2px; }
.next-up .nm { font-weight: 600; font-size: 14.5px; }
.next-up .ctx2 { font-size: 12.5px; color: var(--muted-foreground); margin-top: 3px; max-width: 44ch; }
.next-up .lnk2 { font: 600 12.5px var(--font-sans); color: var(--brand-texto); white-space: nowrap; margin-left: auto; padding-top: 2px; text-decoration: none; }
.next-up .lnk2:hover { text-decoration: underline; }

.gap-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px dashed var(--border-strong);
  border-radius: 12px; font-size: 12.5px; color: var(--muted-foreground); }
.gap-row .t2 { font-family: var(--font-mono); font-size: 11.5px; }
.gap-row a { margin-left: auto; font-weight: 600; color: var(--brand-texto); font-size: 12.5px; text-decoration: none; }
.gap-row a:hover { text-decoration: underline; }

.crow .rt { display: flex; align-items: center; gap: 8px 8px; justify-content: flex-end;
  flex-wrap: wrap; row-gap: 7px; min-width: 0; }
.remind { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px var(--font-sans); color: var(--success-text);
  border: 1px solid color-mix(in srgb, var(--success) 38%, transparent); border-radius: 999px; padding: 4px 10px;
  background: none; cursor: pointer; text-decoration: none; transition: background var(--dur-1) var(--ease-out); }
.remind.g { padding: 7px 13px; font-size: 12.5px; }
.remind:hover { background: color-mix(in srgb, var(--success) 10%, transparent); }


@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  .topbar .search { order: 2; flex: 1 1 100%; }
  .topbar .actions { margin-left: auto; }
}
@media (max-width: 620px) {
  .crow { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .crow .rt { flex-direction: column; align-items: flex-end; gap: 6px; }
  .next-up { flex-wrap: wrap; }
  .next-up > div { min-width: 0; flex: 1 1 200px; }
  .gap-row { flex-wrap: wrap; }
  .pt-head { flex-wrap: wrap; }
  .chip { font-size: 11px; padding: 4px 9px; }
  .idx .irow { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .idx .d { padding: 4px 0; }
}
@media (max-width: 780px) {
  .plist .acts { flex-wrap: wrap; row-gap: 6px; }
}

.kpi-grid.kpi-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .kpi-grid.kpi-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kpi-grid.kpi-3 { grid-template-columns: 1fr; } }

.mg-cap { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 10px; }
.mg-cap .k { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; }
.mg-cap b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }

.mg { position: relative; display: grid; align-items: center; padding-top: 17px; margin: 2px 0 4px;
  --lt-sz: clamp(30px, min(var(--lt-bloco, 8cqw), 20cqw), 200px);
  --lt-col: calc(var(--lt-sz) * .74);
  grid-template-columns: minmax(76px, 158px) minmax(88px, auto) minmax(0, 1fr) var(--lt-col);
  column-gap: 16px; row-gap: 7px; }
.mg .rot { grid-column: 1; font-size: 12.5px; color: var(--muted-foreground); padding-top: 10px; line-height: 1.3; }
.mg .val { grid-column: 2; font-family: var(--font-mono); font-size: 13px; color: var(--foreground);
  white-space: nowrap; padding-top: 10px; }
.mg .val small { color: var(--faint-foreground); font-size: .84em; margin-left: 2px; }
.mg .val .pc { color: var(--faint-foreground); margin-left: 6px; }
.mg .tr { grid-column: 3; position: relative; z-index: 1; height: 10px; margin-top: 10px; min-width: 0;
  border-radius: 999px; background: color-mix(in srgb, var(--foreground) 7%, transparent); }
.mg .tr i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 40%); border-radius: inherit;
  background: var(--danger); }
.mg .tr.bom i { background: var(--success); }
.mg .esc { grid-column: 3; position: relative; z-index: 1; height: 16px; min-width: 0;
  font-family: var(--font-mono); font-size: 8.5px; color: var(--faint-foreground); }
.mg .esc span { position: absolute; top: 3px; left: var(--x); transform: translateX(-50%); }
.mg .esc span:first-child { transform: none; }
.mg .esc span:last-child { transform: translateX(-100%); }
.mg .esc span.cem { color: var(--muted-foreground); }
.mg .letra { position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  pointer-events: none; z-index: 1;
  font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: -.03em;
  font-size: var(--lt-sz); color: var(--brand-texto); }

.mg .faixa, .mg .grade, .mg .forma { position: absolute; pointer-events: none; }
.mg .faixa { top: 0; height: 14px; display: grid; grid-template-columns: 25% 25% 1fr;
  font-family: var(--font-label); font-size: 9px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint-foreground); }
.mg .faixa span { text-align: center; min-width: 0; overflow: hidden; }
.mg .grade { top: 17px; bottom: 0; z-index: 0;
  background:
    linear-gradient(90deg, transparent 0 calc(25% - .5px), var(--border-strong) calc(25% - .5px) calc(25% + .5px), transparent calc(25% + .5px)),
    linear-gradient(90deg, transparent 0 calc(50% - .5px), var(--border-strong) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(90deg, transparent 25%, color-mix(in srgb, var(--success) 7%, transparent) 25% 50%, transparent 50%); }
.mg .forma { top: 17px; bottom: 0; z-index: 2; }
.mg .forma svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mg .forma polyline { fill: none; stroke: var(--brand-1); stroke-width: 1.5; stroke-linejoin: round;
  stroke-linecap: round; opacity: .5; }
.mg .forma circle { fill: var(--card); stroke: var(--brand-1); stroke-width: 2; }

.card:has(.mg), .exam-ana:has(.mg), .pane:has(.mg) { container-type: inline-size; }
@container (max-width: 620px) { .mg .esc span:not(.forte) { display: none; } }
@container (max-width: 560px) {
  .mg { grid-template-columns: minmax(0, 1fr) auto var(--lt-col); column-gap: 10px; row-gap: 6px; }
  .mg .rot { grid-column: 1; font-size: 12px; padding-top: 9px; }
  .mg .val { grid-column: 2; font-size: 12px; padding-top: 9px; }
  .mg .tr { grid-column: 1 / span 2; margin-top: 5px; }
  .mg .esc { grid-column: 1 / span 2; }
}

.exam-ana { margin: -4px 16px 10px 70px; border: 1px solid var(--border); border-left: 3px solid var(--brand-1);
  border-radius: 12px; background: color-mix(in srgb, var(--brand-1) 3%, var(--card)); padding: 13px 16px; }
.exam-ana .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.exam-ana p { margin: 0 0 8px; font-size: 13.5px; color: var(--foreground); max-width: 74ch; }
.exam-ana .ft { font-size: 12.5px; color: var(--muted-foreground); }
.exam-ana .ft a { color: var(--brand-texto); }
@media (max-width: 780px) { .exam-ana { margin-left: 14px; margin-right: 14px; } }
.ras-linhas { display: grid; gap: 9px; margin: 12px 0 14px; }
.ras-linhas .li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.ras-linhas .li .lt2 { font-size: 12px; font-weight: 700; }
.exam-ana .ras-ft { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted-foreground); }

.decis .dh .btn-tiny { margin-left: auto; }
.med-caixa { display: grid; gap: 11px; margin-top: 13px; padding: 13px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.med-caixa[hidden] { display: none; }
.mc-k { font-family: var(--font-label); font-size: 9px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; }
.mc-campos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mc-campos label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 0 7px; padding: 7px 11px; border: 1px solid var(--input); border-radius: 10px; background: var(--card); }
.mc-campos label span { grid-column: 1 / -1; font-family: var(--font-label); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.mc-campos input { border: 0; background: transparent; outline: none; min-width: 0; color: inherit;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
.mc-campos i { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.mc-campos label:focus-within { border-color: var(--ring); }
.mc-acoes { display: flex; gap: 9px; flex-wrap: wrap; }
@media (max-width: 620px) { .mc-campos { grid-template-columns: 1fr; } }

.phase-tab.travada { opacity: .5; cursor: default; }
.phase-tab.travada .pn { background: transparent; border: 1px dashed var(--border-strong); color: var(--faint-foreground); }
.ab-mudo { display: none; }
.actbar[data-state="analise"] .tm,
.actbar[data-state="paused"] .tm { display: none; }
.actbar[data-state="analise"] .ab-mudo,
.actbar[data-state="paused"] .ab-mudo { display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: color-mix(in srgb, var(--warning) 82%, #fff); }
.actbar[data-state="analise"] .pz.ico { display: none; }


.actbar[data-state="analise"] .eq i { background: color-mix(in srgb, var(--warning) 82%, #fff);
  animation: eq-varre 1.15s ease-in-out infinite; }
.actbar[data-state="analise"] .eq i:nth-child(1) { animation-delay: 0s; }
.actbar[data-state="analise"] .eq i:nth-child(2) { animation-delay: .09s; }
.actbar[data-state="analise"] .eq i:nth-child(3) { animation-delay: .18s; }
.actbar[data-state="analise"] .eq i:nth-child(4) { animation-delay: .27s; }
@keyframes eq-varre { 0%, 100% { transform: scaleY(.2); opacity: .45; }
  40% { transform: scaleY(1); opacity: 1; } }

.actbar[data-state="paused"] .eq i, .actbar[data-state="divisa"] .eq i {
  animation: none; transform: scaleY(.24); background: color-mix(in srgb, var(--warning) 70%, #fff); }


.actbar::after { content: ""; position: absolute; left: 28px; right: 28px; bottom: 4px; height: 2px;
  border-radius: 999px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 0 20%,
    color-mix(in srgb, var(--warning) 90%, #fff) 50%, transparent 80% 100%);
  background-size: 220% 100%; background-position: 100% 0; }
.actbar[data-state="analise"]::after { opacity: 1; animation: fio-corre 1.4s linear infinite; }
@keyframes fio-corre { to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) {
  .actbar[data-state="analise"] .eq i { animation: none; transform: scaleY(.55); }
  .actbar[data-state="analise"]::after { animation: none; background-position: 50% 0; }
}
.actbar .go:disabled { cursor: default; background: rgba(234,240,245,.13);
  color: color-mix(in srgb, var(--plum-fg) 78%, transparent); box-shadow: none; }
.actbar .go.chama { animation: chama-go 1s var(--ease-out) 2; }
.actbar .go-curto { display: none; }
@keyframes chama-go { 0%, 100% { transform: none; } 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .actbar .go.chama { animation: none; } }

body:has(.app) .recstrip { left: calc(var(--side-w) + min(100% - var(--side-w), 1280px) / 2); }
.recstrip { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 15px; border-radius: 999px;
  color: var(--rec-fg); font-size: 13px; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--rec-linha); border-top-color: var(--rec-linha-topo);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.55);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
  animation: strip-in var(--dur-2) var(--ease-out) both; }
a.recstrip:hover { transform: translate(-50%, -2px); box-shadow: 0 26px 56px -20px rgba(0,0,0,.62); }
a.recstrip:hover .rs-go { background: var(--brand-grad); border-color: transparent; color: #fff; }
a.recstrip:active { transform: translate(-50%, 0) scale(.98); }
@keyframes strip-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .recstrip { animation: none; } }
.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; width: 17px; height: 15px; flex: none; }
.eq i { flex: 1; height: 100%; border-radius: 2px; background: var(--brand-1); transform-origin: bottom; }
.eq i:nth-child(1) { animation: eq-vai .92s ease-in-out -.4s infinite; }
.eq i:nth-child(2) { animation: eq-vai .68s ease-in-out -.15s infinite; }
.eq i:nth-child(3) { animation: eq-vai 1.16s ease-in-out -.62s infinite; }
.eq i:nth-child(4) { animation: eq-vai .8s ease-in-out -.3s infinite; }
@keyframes eq-vai { 0%, 100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; } }
.recstrip .rs-tx { display: grid; gap: 1px; line-height: 1.2; min-width: 0; }
.recstrip .st { font-weight: 600; font-size: 12.5px; }
.recstrip .tm { font-family: var(--font-mono); font-size: 12.5px; color: var(--rec-fg-2);
  font-variant-numeric: tabular-nums; padding-left: 10px; margin-left: 2px;
  border-left: 1px solid var(--rec-linha); }
.recstrip .who { font-size: 11.5px; color: var(--rec-fg-3); }
.recstrip .rs-go { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 1px solid var(--rec-linha); color: var(--rec-fg-2);
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out); }
.recstrip .rs-pz { display: grid; place-items: center; width: 30px; height: 30px; flex: none;
  border-radius: 50%; border: 1px solid var(--rec-linha); background: transparent; cursor: pointer;
  color: var(--rec-fg-2); padding: 0;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.recstrip .rs-pz:hover { background: color-mix(in srgb, var(--rec-fg) 12%, transparent); color: var(--rec-fg); }
.recstrip .rs-pz:active { transform: scale(.94); }
.recstrip .rs-pz .i-on { display: none; }
.recstrip .rs-pz[aria-pressed="true"] .i-off { display: none; }
.recstrip .rs-pz[aria-pressed="true"] .i-on { display: grid; }
.recstrip .back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: var(--brand-grad); color: #fff; font-weight: 600; font-size: 12.5px; text-decoration: none; }
.recstrip .back:active { transform: scale(.97); }
.recstrip input { width: 150px; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 12.5px; color: var(--rec-fg);
  outline: none; background: var(--rec-campo); border: 1px solid var(--rec-linha); }
.recstrip input::placeholder { color: var(--rec-fg-3); }
.recstrip input:focus { border-color: var(--rec-fg-3); }
.recstrip button.back { border: 0; cursor: pointer; font-family: var(--font-sans); }
.recstrip[data-state="paused"] .eq i { animation-play-state: paused; background: var(--warning); }
.recstrip[data-state="offline"] .eq i { animation-play-state: paused; background: var(--faint-foreground); }
.recstrip[data-state="divisa"] .eq i { animation: none; transform: scaleY(.3); background: var(--warning); }
@media (max-width: 620px) { .recstrip { max-width: calc(100vw - 20px); }
  .recstrip .who { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
  .recstrip input { flex: 1 1 90px; width: auto; min-width: 0; }
  .recstrip .back { flex: none; } }

.actbar { position: sticky; bottom: 14px; z-index: 30; margin: 22px auto 0;
  width: fit-content; max-width: 100%;
  display: flex; align-items: center; gap: 14px; padding: 7px 8px 7px 14px; border-radius: 999px;
  color: var(--plum-fg);
  border: 1px solid rgba(234,240,245,.2); border-top-color: rgba(234,240,245,.46);
  box-shadow: 0 22px 55px -20px rgba(0,0,0,.58),
              inset 0 1px 0 rgba(234,240,245,.34),
              inset 0 -1px 0 rgba(0,0,0,.3),
              inset 0 0 30px -10px rgba(234,240,245,.2); }
.actbar .ab-estado { display: flex; align-items: center; gap: 10px; padding-right: 14px;
  border-right: 1px solid rgba(234,240,245,.14); }
.actbar .ab-acoes { display: flex; align-items: center; gap: 8px; }
.actbar .ab-tx { display: grid; gap: 1px; line-height: 1.15; }
.actbar .st { font-weight: 600; font-size: 12.5px; }
.actbar .tm { font-family: var(--font-mono); font-size: 11.5px; color: rgba(234,240,245,.88); }
.actbar .pz { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(234,240,245,.08); border: 1px solid rgba(234,240,245,.18); color: var(--plum-fg);
  font: 600 12.5px var(--font-sans); transition: background var(--dur-1) var(--ease-out); }
.actbar .pz.ico { width: 32px; height: 32px; padding: 0; justify-content: center; gap: 0; }
.actbar .pz:hover { background: rgba(234,240,245,.16); }
.actbar .pz:active { transform: scale(.97); }
.actbar .go { display: inline-flex; align-items: center; gap: 7px; padding: 9px 17px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--brand-grad); background-size: 170% 100%; color: #fff; font: 600 13px var(--font-sans);
  box-shadow: var(--shadow-warm); transition: background-position var(--dur-3) var(--ease-out); text-decoration: none; }
.actbar .go .go-ico { display: none; }
.actbar .go:hover { background-position: 100% 0; }
.actbar .go:active { transform: scale(.97); }
.actbar .pz:focus-visible, .actbar .go:focus-visible { outline: 2px solid var(--plum-fg); outline-offset: 2px; }
.actbar[data-state="paused"] .eq i { animation-play-state: paused; background: var(--warning); }
@media (max-width: 620px) {
  .actbar .ab-acoes { flex: 1 1 100%; }
}

.preread { padding: 14px 16px; border-bottom: 1px solid var(--border); display: grid; gap: 8px; }
.preread .hd { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); font-weight: 600; }
.preread .f { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; }
.preread .f i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.preread .f.warn i { background: var(--warning); }
.preread .f.gap i { background: var(--danger); }
.preread .f span { flex: 1; color: var(--foreground); }
.preread .f .btn-tiny { flex: none; }
.preread.wide { border: 1px solid var(--border); border-radius: 14px; background: var(--card); margin-bottom: 16px; }
.preread .ver { flex: none; font-size: 12px; font-weight: 600; color: var(--brand-texto); cursor: pointer; }
.preread .ver:hover { text-decoration: underline; }
.flash { animation: flash-alvo 1.4s var(--ease-out) both; }
@keyframes flash-alvo { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 45%, transparent); }
  100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }
.preread .f.done { border-color: color-mix(in srgb, var(--success) 34%, var(--border)); }
.preread .f.done i { background: var(--success); }
.preread .f.done .tx { color: var(--foreground); }
.preread .hd { display: flex; align-items: center; gap: 7px; }
.preread .hd .rec-dot { width: 7px; height: 7px; flex: none; }
.preread [data-desfazer] { color: var(--muted-foreground); }
.gatilho { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 11px;
  background: color-mix(in srgb, var(--brand-1) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-1) 18%, transparent);
  font-size: 12.5px; color: var(--muted-foreground); line-height: 1.6; }
.gatilho svg { flex: none; margin-top: 2px; color: var(--brand-texto); }
.gatilho b { color: var(--foreground); font-weight: 500; font-style: italic; }
.preread [data-desfazer]:hover { color: var(--danger-text, var(--danger)); }
.preread .okline { font-size: 12.5px; color: var(--faint-foreground); display: flex; align-items: center; gap: 7px; }
.preread .okline svg { color: var(--success-text); flex: none; }

[data-ai="processing"] .ai-txt, [data-ai="failed"] .ai-txt, [data-ai="processing"] .ft, [data-ai="failed"] .ft,
[data-ai="processing"] .ai-foot, [data-ai="failed"] .ai-foot { display: none; }
.plano[hidden] { display: none; }
.ai-gen { display: none; gap: 9px; }
[data-ai="processing"] .ai-gen { display: grid; }
.ai-gen .ln { height: 11px; border-radius: 6px; background: linear-gradient(90deg,
  color-mix(in srgb, var(--foreground) 8%, transparent), color-mix(in srgb, var(--foreground) 16%, transparent),
  color-mix(in srgb, var(--foreground) 8%, transparent)) 0 0 / 220% 100%; animation: sheen 1.4s linear infinite; }
.ai-gen .ln:nth-child(2) { width: 88%; } .ai-gen .ln:nth-child(3) { width: 62%; }
@keyframes sheen { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-gen .ln { animation: none; } }
.ai-gen .st { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-foreground); font-weight: 600; }

.ai-fail { display: none; gap: 8px; }
[data-ai="failed"] .ai-fail { display: grid; }
.ai-fail .hd { display: flex; align-items: center; gap: 8px; color: var(--danger-text); font-weight: 600; }
.ai-fail p { font-size: 13.5px; color: var(--muted-foreground); margin: 0; line-height: 1.55; }
.ai-fail .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

.swap { display: inline-flex; gap: 3px; padding: 3px; margin: 0 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--foreground) 5%, transparent); border: 1px solid var(--border); }
.swap button { border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 6px 13px;
  font: 600 12.5px var(--font-sans); color: var(--muted-foreground);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.swap button[aria-selected="true"] { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-sm); }
.swap button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.meal.told { border-style: dashed; }

.prato { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); padding: 14px 16px; }
.prato .pr-topo { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.prato .pr-topo .lbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.prato .pr-nota { font-size: 11.5px; color: var(--faint-foreground); margin-left: auto; }
.prato .pr-corpo { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 26px; }
.prato-un { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pr-disco { flex: none; width: 126px; height: 126px; }
.pr-svg { display: block; width: 126px; height: 126px; }
.pr-aro { fill: var(--background); stroke: var(--border-strong); stroke-width: 1.5; }
.pr-fatia { stroke: var(--card); stroke-width: 2.5; stroke-linejoin: round; }
/* 🔴 A cor vem da POSIÇÃO da fatia, não do nome do grupo.

   Portado do app. Eram quatro grupos fixos — `g-verdura`, `g-carbo`,
   `g-prot`, `g-legume` — com um tom para cada. Desde que a médica escreve o
   nome da fatia, “Arroz e feijão” não tem cor própria: quem escolhe o tom é
   a posição no prato, e a identidade fica na legenda, que nomeia cada fatia
   ao lado do seu tom. Cor nunca carrega sozinha.

   São seis porque seis é onde a paleta ainda separa: medido no app com o
   validador de paletas, a partir daí os pares adjacentes caem abaixo do piso
   de distinção. E prato com nove fatias não é prato, é gráfico de pizza — o
   desenho existe justamente para não ser isso. */
.pr-fatia[data-fatia="0"] { fill: var(--gr-1); }
.pr-fatia[data-fatia="1"] { fill: var(--gr-2); }
.pr-fatia[data-fatia="2"] { fill: var(--gr-3); }
.pr-fatia[data-fatia="3"] { fill: var(--gr-4); }
.pr-fatia[data-fatia="4"] { fill: var(--gr-5); }
.pr-fatia[data-fatia="5"] { fill: var(--gr-6); }
.pr-info { min-width: 0; flex: 1; display: grid; gap: 8px; align-content: center; }
.pr-tit { font-weight: 600; font-size: 14px; }
.pr-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pr-leg li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center;
  gap: 9px; font-size: 13px; }
.pr-leg li:has(.pr-step) { grid-template-columns: 10px minmax(0, 1fr) auto auto; }
.pr-leg li:has(.pr-tira) { grid-template-columns: 10px minmax(0, 1fr) auto auto auto; }

/* O NOME É EDITÁVEL, e é o pedido dela no app: os quatro grupos do método
   são um começo, não um vocabulário fechado. Clicar no nome abre o campo;
   sair dele grava. Fora do modo de edição o nome é texto, e não botão. */
.pr-leg .pt-nome-btn { border: 0; background: none; padding: 0; margin: 0; text-align: left;
  font: inherit; color: var(--muted-foreground); line-height: 1.3; cursor: text;
  border-bottom: 1px dashed transparent; }
.pr-leg .pt-nome-btn:hover { color: var(--foreground); border-bottom-color: var(--border-strong); }
.pr-leg .pt-nome-campo { font: inherit; width: 100%; min-width: 0; color: var(--foreground);
  background: var(--background); border: 1px solid var(--ring); border-radius: 6px; padding: 1px 5px; }
.pr-leg .pt-nome-campo:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 16%, transparent); }

/* Tirar a fatia, e não zerá-la: zerada ela sai do desenho mas continua
   ocupando linha na legenda e uma cor na paleta. */
.pr-leg .pt-tira { width: 22px; height: 22px; border-radius: 50%; border: 1px solid transparent;
  background: none; cursor: pointer; color: var(--faint-foreground); display: grid; place-items: center;
  padding: 0; line-height: 1; font: 600 13px var(--font-sans); }
.pr-leg .pt-tira:hover { color: var(--danger-text); border-color: var(--border-strong); }

/* Acrescentar fatia, até o teto da paleta. Tracejado porque não é uma fatia:
   é o lugar de uma. */
.pr-mais { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px;
  border: 1px dashed var(--border-strong); border-radius: 8px; background: none; padding: 5px 10px;
  color: var(--muted-foreground); font: 600 12px var(--font-sans); cursor: pointer; }
.pr-mais:hover { border-color: var(--brand-1); color: var(--foreground); }
.pr-leg .pt-cor { width: 10px; height: 10px; border-radius: 3px; }
.pr-leg li[data-fatia="0"] .pt-cor { background: var(--gr-1); }
.pr-leg li[data-fatia="1"] .pt-cor { background: var(--gr-2); }
.pr-leg li[data-fatia="2"] .pt-cor { background: var(--gr-3); }
.pr-leg li[data-fatia="3"] .pt-cor { background: var(--gr-4); }
.pr-leg li[data-fatia="4"] .pt-cor { background: var(--gr-5); }
.pr-leg li[data-fatia="5"] .pt-cor { background: var(--gr-6); }
.pr-leg .pt-nome { color: var(--muted-foreground); line-height: 1.3; }
.pr-leg .pt-fr { font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.pr-step { display: inline-flex; gap: 4px; }
.pr-step button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--card); cursor: pointer; color: var(--muted-foreground);
  font: 600 13px var(--font-sans); display: grid; place-items: center; padding: 0; line-height: 1; }
.pr-step button:hover { color: var(--foreground); border-color: var(--foreground); }
.pr-step button:active { transform: scale(.92); }
.doc-pratos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 22px; margin-top: 16px; }
.doc-pratos .prato-un { gap: 13px; }
.doc-pratos .pr-disco, .doc-pratos .pr-svg { width: 104px; height: 104px; }
.doc-pratos .pr-aro { fill: #fff; }
.doc-pratos .pr-fatia { stroke: #fff; }
.meal .macros b input { width: 46px; font: inherit; font-family: var(--font-mono); color: var(--foreground);
  background: var(--background); border: 1px solid var(--input); border-radius: 6px; padding: 1px 4px;
  text-align: right; -moz-appearance: textfield; }
.meal .macros b input::-webkit-outer-spin-button,
.meal .macros b input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.meal .macros b input:focus { outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 16%, transparent); }
.meal .flag { font-family: var(--font-label); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--warning-text); font-weight: 600; }

.docs-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 12px; }
.doc-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card);
  padding: 14px 15px 13px; display: grid; gap: 4px; align-content: start;
  transition: border-color var(--dur-2) var(--ease-out); }
.doc-card:hover { border-color: var(--border-strong); }
.doc-card.ficha { background: var(--surface); }
.doc-card .dc-sel { color: var(--faint-foreground); letter-spacing: .12em; }
.doc-card h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; }
.doc-card .dc-mt { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted-foreground); }
.doc-card .dc-acoes { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.doc-card .dc-acoes .btn-sm { padding: 6px 12px; font-size: 12.5px; gap: 6px; }
.doc-card .dc-acoes .btn-tiny.ico { margin-left: auto; }

.law-mais { margin-top: 8px; }
.law-mais > summary { font-size: 11.5px; color: var(--muted-foreground); cursor: pointer;
  list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.law-mais > summary::-webkit-details-marker { display: none; }
.law-mais > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform var(--dur-2) var(--ease-out); }
.law-mais[open] > summary::before { transform: rotate(45deg); }
.law-mais > summary:hover { color: var(--foreground); }

.ex-vals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.ex-vals .v { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline;
  padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.ex-vals .v span { font-size: 12.5px; color: var(--muted-foreground); min-width: 0; }
.ex-vals .v b { font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.ex-vals .v i { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: var(--faint-foreground); }
.ex-vals .v.alerta b, .ex-vals .v.alerta i { color: var(--danger-text); }
.ex-vals .v.limite b, .ex-vals .v.limite i { color: var(--warning-text); }
.ex-vals .v.vazio b, .ex-vals .v.vazio i { color: var(--faint-foreground); }
.labx { margin-top: 14px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.labx .ex-vals { padding: 12px 14px; }
.labx-nota { margin: 0; padding: 0 14px 13px; font-size: 11.5px; font-weight: 600;
  color: var(--warning-text); }

.rx24 { margin-top: 14px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.rx-item { list-style: none; }
.r24-h.livre { font-family: var(--font-label); font-size: 9px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; padding-top: 4px; }
.rx-dose { margin: 0; font-size: 12px; color: var(--muted-foreground); }
.rx-ad { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-ad .ad { padding: 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  font: inherit; font-size: 12px; color: var(--muted-foreground);
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.rx-ad .ad:hover { border-color: var(--border-strong); color: var(--foreground); }
.rx-ad .ad[aria-pressed="true"] { border-color: transparent; background: var(--brand-1);
  color: #fff; font-weight: 600; }
.rx-item.respondida .r24-h::after { background: var(--success); }
.rx-item:not(.respondida) .r24-h::after { background: var(--card);
  border: 1px dashed var(--border-strong); }
@media (pointer: coarse) { .rx-ad .ad { min-height: 44px; padding: 4px 15px; } }
.tagrx { font-family: var(--font-label); font-size: 8.5px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 600; padding: 2px 7px; border-radius: 999px; vertical-align: 1px;
  color: var(--muted-foreground); background: var(--surface); border: 1px solid var(--border); }
.tagrx.nova { color: #fff; border-color: transparent; background: var(--brand-1); }

.enc-conta { font-size: 12.5px; color: var(--muted-foreground); margin: 10px 0 0; }
.enc-conta b { font-family: var(--font-mono); font-weight: 600; color: var(--foreground); }
.intro.colado { margin-top: 10px; }

.enc-rodape { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.enc-rodape .tx { flex: 1 1 190px; min-width: 0; font-size: 13.5px; }
.enc-rodape .tx .sub { font-size: 11.5px; color: var(--faint-foreground); }
.enc-rodape .valor { font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
@media (max-width: 560px) { .enc-rodape .valor { margin-left: auto; } }

.conduta-fio { display: grid; gap: 16px; }
.conduta-fio .decis { padding: 16px 18px 18px; }
.conduta-fio .decis .dpar { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.conduta-fio .decis .dpar > .from { margin: 0; border-radius: 0; border-left: 0;
  border-right: 1px solid var(--border); display: grid; gap: 6px; align-content: start; padding: 12px 14px; }
.conduta-fio .decis .dpar > .to { padding: 12px 15px; background: var(--card); }
.conduta-fio .decis .dpar > .to::before { content: "o que fazer"; display: block;
  font-family: var(--font-label); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; margin-bottom: 6px; }
.conduta-fio .decis.larga .dpar { display: block; border: 0; border-radius: 0; }
.conduta-fio .decis.larga .dpar > .from { border: 0; border-left: 2px solid var(--border-strong);
  border-radius: 10px; margin-bottom: 13px; display: flex; }
.conduta-fio .decis.larga .dpar > .to { padding: 0; background: none; }
.conduta-fio .decis.larga .dpar > .to::before { display: none; }
@media (max-width: 860px) {
  .conduta-fio .decis .dpar { grid-template-columns: 1fr; }
  .conduta-fio .decis .dpar > .from { border-right: 0; border-bottom: 1px solid var(--border); }
}

.cond-indice { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
  position: sticky; top: 78px; z-index: 12; padding: 8px 0; background: var(--background); }
.cond-indice a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 12px;
  color: var(--muted-foreground); transition: border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.cond-indice a:hover { color: var(--foreground); border-color: var(--border-strong); }
.cond-indice a b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-size: 11px; color: #fff; background: var(--lc); }
.cond-indice a[aria-current="true"] { color: var(--foreground); border-color: var(--lc);
  background: color-mix(in srgb, var(--lc) 8%, var(--card)); }
@media (max-width: 720px) {
  .cond-indice { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain; scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
  .cond-indice::-webkit-scrollbar { display: none; }
  .cond-indice a { flex: none; }
}

.modes { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--foreground) 5%, transparent);
  border: 1px solid var(--border); margin-top: 14px; }
.modes button { border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 7px 14px; display: inline-flex; align-items: center; gap: 7px;
  font: 600 13px var(--font-sans); color: var(--muted-foreground);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.modes button[aria-pressed="true"] { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-sm); }
.modes button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.mode-note { font-size: 12.5px; color: var(--muted-foreground); margin-top: 9px; max-width: 54ch; }
.chat .msgs:empty { display: none; }

.docview { border: none; border-radius: 18px; padding: 0; background: transparent; max-width: min(680px, 94vw); width: 100%;
  opacity: 0; transform: scale(.97) translateY(6px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out),
              overlay var(--dur-2) var(--ease-out) allow-discrete, display var(--dur-2) var(--ease-out) allow-discrete; }
.docview[open] { opacity: 1; transform: none; }
@starting-style { .docview[open] { opacity: 0; transform: scale(.97) translateY(6px); } }
.docview::backdrop { background: rgba(18,25,32,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity var(--dur-2) var(--ease-out), overlay var(--dur-2) var(--ease-out) allow-discrete, display var(--dur-2) var(--ease-out) allow-discrete; }
.docview[open]::backdrop { opacity: 1; }
@starting-style { .docview[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .docview, .docview[open] { transform: none; }
}
.docview .frame { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0,0,0,.5); }
.docview .bar2 { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.docview .bar2 .t { font-weight: 600; font-size: 14px; flex: 1; }
.docview .paper-wrap { max-height: min(72vh, 700px); overflow-y: auto; padding: 22px; background: color-mix(in srgb, var(--foreground) 5%, var(--background)); }
@media (max-width: 620px) {
  .docview { max-width: calc(100vw - 18px); }
  .docview .paper-wrap { max-height: calc(100dvh - 150px); padding: 12px; }
  .docview .bar2 { padding: 10px 12px; }
}

.paper { position: relative; isolation: isolate; background: #fff; color: #2A2320; border-radius: 4px;
  padding: 0 0 30px; margin: 0 auto; max-width: 560px; overflow: hidden;
  box-shadow: 0 14px 40px -18px rgba(42,35,32,.35); font-size: 13.5px; line-height: 1.6;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper > * { position: relative; z-index: 1; }

.paper::before { content: ""; position: absolute; z-index: 0; right: -80px; top: 168px;
  width: 340px; height: 340px; opacity: .045; pointer-events: none;
  background: url("img/gio-care-mark.png") center / contain no-repeat; }
.paper::after { content: ""; position: absolute; z-index: 0; left: -96px; bottom: -70px;
  width: 260px; height: 260px; opacity: .03; pointer-events: none;
  background: url("img/gio-care-mark.png") center / contain no-repeat; }

.paper .rule { height: 6px; border: 0; margin: 0; border-radius: 0;
  background: linear-gradient(90deg, var(--abc-a), var(--abc-b), var(--abc-c), var(--abc-d), var(--abc-e), var(--abc-f), var(--abc-s)); }

.paper .dhead { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start;
  padding: 26px 38px 20px; border-bottom: 1px solid #EFE7DD; }
.paper .dhead .id { display: flex; gap: 12px; align-items: center; }
.paper .dhead .mk { width: 38px; height: 38px; flex: none; }
.paper .dhead .dr { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.15; color: #2A2320; }
.paper .dhead .crm { font-family: var(--font-label); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #6B615B; margin-top: 3px; font-weight: 600; }
.paper .dhead .dt { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.7; color: #6B615B; text-align: right; flex: none; }
.paper .dhead .dt b { display: block; color: #2A2320; letter-spacing: .06em; }

.paper .band { padding: 22px 38px 0; }
.paper h2.dtitle { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.05; margin: 0; color: #2A2320; letter-spacing: -.015em; }
.paper .kicker { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: #B0704F; margin: 0 0 6px; font-weight: 600; }
.paper .pfor { display: inline-flex; flex-wrap: wrap; gap: 4px 20px; margin: 14px 0 0; padding: 9px 16px;
  background: #FAF6F1; border-radius: 9px; font-size: 12.5px; color: #6B615B; max-width: 66%; }
.paper .pfor .c { display: flex; flex-direction: column; gap: 1px; }
.paper .pfor .c span { font-family: var(--font-label); font-size: 8.5px; letter-spacing: .09em; text-transform: uppercase; color: #A2958A; font-weight: 600; }
.paper .pfor .c b { font-size: 13px; color: #2A2320; font-weight: 600; white-space: nowrap; }

.paper .body { padding: 22px 38px 0; }

.paper ol.rx { margin: 0; padding: 0; list-style: none; counter-reset: rx; display: grid; gap: 0; }
.paper ol.rx li { counter-increment: rx; display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid #F2EBE2; }
.paper ol.rx li:last-child { border-bottom: 0; }
.paper ol.rx li::before { content: counter(rx, decimal-leading-zero); flex: none; font-family: var(--font-mono);
  font-size: 11px; color: #B0704F; padding-top: 3px; letter-spacing: .06em; }
.paper ol.rx .rxi b { display: block; font-size: 14.5px; letter-spacing: -.005em; }
.paper ol.rx .rxi span { color: #6B615B; font-size: 12.5px; }

.paper table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.paper table th { font-family: var(--font-label); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; color: #A2958A;
  text-align: left; padding: 0 10px 8px; border-bottom: 1px solid #2A2320; font-weight: 600; }
.paper table th.n, .paper table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.paper table td { padding: 11px 10px; border-bottom: 1px solid #F2EBE2; vertical-align: top; }
.paper table td .sub { color: #A2958A; font-family: var(--font-mono); font-size: 10.5px; margin-top: 2px; }
.paper table tr.total td { border-bottom: 0; border-top: 1px solid #2A2320; font-weight: 600; padding-top: 12px; }

.paper .obsl { margin: 22px 0 0; padding: 15px 18px; background: #FAF6F1; border-radius: 12px;
  font-size: 12.5px; color: #5A5049; line-height: 1.65; }
.paper .obsl b { color: #2A2320; display: block; font-family: var(--font-label); font-size: 9px;
  letter-spacing: .09em; text-transform: uppercase; margin-bottom: 5px; font-weight: 600; }

.paper .sig { margin: 42px 38px 0; display: flex; justify-content: flex-end; }
.paper .sig .line { text-align: center; font-size: 11px; color: #6B615B; font-family: var(--font-mono); letter-spacing: .04em; }
.paper .sig .line::before { content: ""; display: block; width: 230px; border-top: 1px solid #2A2320; margin: 0 auto 7px; }

.paper .dfoot { margin: 26px 38px 0; padding-top: 13px; border-top: 1px solid #EFE7DD;
  display: flex; align-items: center; gap: 10px; }
.paper .dfoot .mk2 { width: 15px; height: 15px; flex: none; opacity: .8; }
.paper .dfoot .l { flex: 1; font-family: var(--font-label); font-size: 8.5px; letter-spacing: .06em;
  text-transform: uppercase; color: #A2958A; line-height: 1.7; font-weight: 600; }
.paper .dfoot .l b { color: #6B615B; }

@media (max-width: 560px) { .paper .dhead, .paper .band, .paper .body { padding-left: 22px; padding-right: 22px; }
  .paper .sig, .paper .dfoot { margin-left: 22px; margin-right: 22px; } .docview .paper-wrap { padding: 12px; } }

.paper .fc-h { font-family: var(--font-label); font-size: 9px; letter-spacing: .09em; text-transform: uppercase;
  color: #A2958A; font-weight: 600; margin: 0 0 9px; }
.fc-cab { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; margin-bottom: 26px; }
.fc-cab .aranha { flex: none; }
.fc-evo { flex: 1 1 220px; }
/* A aranha ABRE, do centro da malha para fora, como no app.
   O polígono é o achado: a forma dele diz quais das sete áreas foram
   conversadas. `transform-origin` é o centro da malha (150,128 em `gioAranha`),
   e não o meio da caixa do polígono, senão uma aranha torta escorrega para o
   lado enquanto abre. Estado final é o de repouso: com movimento reduzido, ou
   no papel, ela nasce pronta. */
@media (prefers-reduced-motion: no-preference) {
  .aranha .area { transform-origin: 150px 128px;
    animation: aranha-abre 360ms var(--ease-out) both; }
  .aranha .no { animation: aranha-no 200ms var(--ease-out)
    calc(200ms + var(--i, 0) * 40ms) both; }
}
@keyframes aranha-abre {
  from { opacity: 0; transform: scale(.72); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes aranha-no { from { opacity: 0; } to { opacity: 1; } }
@media print {
  .aranha .area, .aranha .no { animation: none; opacity: 1; transform: none; }
}

.ficha-p .aranha { margin: 0; justify-items: start; }
.ficha-p .aranha svg { width: 288px; }
.ficha-p .aranha .anel { stroke: #EFE7DD; }
.ficha-p .aranha .eixo { stroke: #F2EBE2; }
.ficha-p .aranha .area { fill: rgba(176,112,79,.13); stroke: #B0704F; }
.ficha-p .aranha .no { fill: #B0704F; }
.ficha-p .aranha .no.baixo { fill: #fff; stroke: #B0704F; stroke-width: 1.3; }
.ficha-p .aranha .lt3 { fill: #2A2320; }
.ficha-p .aranha .legenda { color: #A2958A; font-size: 10.5px; max-width: 300px; }
.fc-evo { display: flex; flex-wrap: wrap; gap: 16px 28px; align-content: center; }
.fc-evo .e { display: grid; gap: 3px; flex: 1 1 150px; }
.fc-evo .e span { font-family: var(--font-label); font-size: 9px; letter-spacing: .09em;
  text-transform: uppercase; color: #A2958A; font-weight: 600; }
.fc-evo .e b { font-family: var(--font-display); font-weight: 500; font-size: 21px; line-height: 1;
  color: #2A2320; letter-spacing: -.01em; }
.fc-evo .e i { font-style: normal; font-size: 11px; color: #B0704F; }
.fc-dia { margin: 26px 0 22px; }
.fc-dia svg { width: 100%; display: block; }
.fc-dia .fd-linha, .fc-dia .fd-tick { stroke: #E9DFD2; stroke-width: 1.2; }
.fc-dia .fd-dot { fill: #B0704F; }
.fc-dia .fd-rot { font-size: 8.6px; fill: #5A5049; text-anchor: middle; font-family: var(--font-sans); font-weight: 600; }
.fc-dia .fd-hr { font-size: 7.8px; fill: #A2958A; text-anchor: middle; font-family: var(--font-mono); }
.fc-blocos { display: grid; gap: 0; margin-bottom: 24px; }
.fc-blocos .fb { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px;
  padding: 13px 0; border-bottom: 1px solid #F2EBE2; }
.fc-blocos .fb:last-child { border-bottom: 0; }
.fc-blocos .fb > b { width: 22px; text-align: center; font-family: var(--font-display); font-style: italic;
  font-weight: 500; font-size: 17px; line-height: 1.2; color: #B0704F; }
.fc-blocos .fb.falta > b { color: #D8CCBE; }
.fc-blocos .fb .fn { font-size: 13.5px; font-weight: 600; color: #2A2320; }
.fc-blocos .fb .ft { font-size: 12.5px; color: #5A5049; line-height: 1.6; margin-top: 2px; }
.fc-blocos .fb .fe { font-size: 11px; color: #A2958A; font-style: italic; margin-top: 4px; }
.fc-blocos .fb .fmao { font-family: var(--font-label); font-size: 8.5px; letter-spacing: .08em;
  text-transform: uppercase; color: #B0704F; font-weight: 600; margin-top: 5px; }
.fc-cond { margin-bottom: 4px; }
.fc-cond .fk { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 9px 0;
  border-bottom: 1px solid #F2EBE2; font-size: 12.5px; color: #5A5049; line-height: 1.6; }
.fc-cond .fk:last-child { border-bottom: 0; }
.fc-cond .fk b { width: 22px; text-align: center; font-family: var(--font-display); font-style: italic;
  font-weight: 500; font-size: 15px; line-height: 1.3; color: #B0704F; }
.paper .obsl span { display: block; }

.spine { display: grid; grid-template-columns: 268px 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) { .spine { grid-template-columns: 1fr; } }

.rail { position: sticky; top: 84px; display: grid; gap: 4px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--card); padding: 8px; }
@media (max-width: 980px) { .rail { position: static; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  overflow-x: auto; scroll-snap-type: x mandatory; } .rail .rl { scroll-snap-align: start; } }
.rail .rl { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; text-align: left;
  border: 0; background: none; cursor: pointer; border-radius: 10px; padding: 9px 10px; color: var(--foreground);
  transition: background var(--dur-1) var(--ease-out); }
.rail .rl:hover { background: var(--surface); }
.rail .rl[aria-selected="true"] { background: var(--surface); box-shadow: inset 2px 0 0 var(--brand-1); }
.rail .rl:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.rail .rl .lt { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 13px; }
.rail .rl.miss .lt { background: transparent !important; color: var(--faint-foreground); border: 1.5px dashed var(--border-strong); }
.rail .rl .nm { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.rail .rl .pv { font-size: 11.5px; color: var(--muted-foreground); line-height: 1.3; margin-top: 1px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rail .rl .dt { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.rail .rl.ok .dt { background: var(--success); }
.rail .rl.half .dt { background: var(--warning); }
.rail .rl.miss .dt { background: transparent; border: 1.5px solid var(--danger); }

.pane { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 18px 20px 20px; }
.pane .ph2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.pane .ph2 .lt { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-style: italic; font-weight: 600; }
.pane .ph2 h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.pane .ph2 .sp { flex: 1; }
.pane .lock { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint-foreground); display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.pane .como { margin-top: 14px; }
.pane .como.seu { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.pane .como.seu .bx { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--brand-1) 26%, var(--border)); }
.pane .como.seu .lbl { color: var(--faint-foreground); }
.pane .seu-rm { border: 0; background: transparent; padding: 4px; border-radius: 50%; cursor: pointer;
  color: var(--danger-text); display: inline-flex; line-height: 0;
  transition: color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.pane .seu-rm:hover { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.pane .seu-rm:active { transform: scale(.94); }
/* O cartao da conduta emprestado ao painel da letra. Ele ja vem com a propria
   moldura (`.decis`), entao a caixa daqui so o segura: sem isto ficava borda
   dentro de borda, com dois fundos e dois raios diferentes. */
.pane .como.feito .bx { border: 0; padding: 0; background: none; }
.pane .como.feito .decis { margin: 0; }
.pane .como.feito .decis .dh .lt { display: none; }

.pane .como .lbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.pane .como .bx { margin-top: 7px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); padding: 13px 15px; }
.pane .como textarea { width: 100%; border: 0; background: transparent; resize: vertical; min-height: 62px; font: inherit;
  color: var(--foreground); outline: none; line-height: 1.6; }
.pane .como textarea[readonly] { color: var(--muted-foreground); cursor: default; }
.fd-fora { margin: 8px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--faint-foreground); }

.rec24 { margin-top: 14px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.r24-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.r24-cab .k { font-family: var(--font-label); font-size: 9px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; }
.r24-cab .f { font-size: 11.5px; color: var(--muted-foreground); }
.r24-lista { list-style: none; margin: 0; padding: 12px 14px 14px; display: grid; gap: 0; }
.r24-ref, .rx-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 22px;
  padding: 9px 0; position: relative; }
.r24-ref::before, .rx-item::before { content: ""; position: absolute; left: 56px; top: 0; bottom: 0; width: 1px;
  background: var(--border); }
.r24-ref:first-child::before, .rx-item:first-child::before { top: 14px; }
.r24-ref:last-child::before, .rx-item:last-child::before { bottom: calc(100% - 14px); }
.r24-h { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground);
  position: relative; padding-top: 1px; text-align: right; }
.r24-h::after { content: ""; position: absolute; left: 53px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand-1); box-shadow: 0 0 0 3px var(--card); }
.r24-corpo { min-width: 0; display: grid; gap: 7px; }
.r24-topo { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.r24-topo b { font-size: 13.5px; font-weight: 600; }
.r24-tag { font-family: var(--font-label); font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint-foreground); font-weight: 600; }
.r24-itens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.r24-itens .it { position: relative; display: inline-flex; align-items: center; cursor: text;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 12.5px; color: var(--foreground);
  transition: border-color var(--dur-1) var(--ease-out); }
.r24-itens .it:hover, .r24-itens .it:focus-visible { border-color: var(--border-strong); }
.r24-itens .it input { border: 0; background: transparent; font: inherit; color: inherit; outline: none;
  width: 8.5em; min-width: 60px; }
.r24-itens .it .it-rm { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--danger); color: #fff; opacity: 0; padding: 0;
  transition: opacity var(--dur-1) var(--ease-out); }
.r24-itens .it:hover .it-rm, .r24-itens .it:focus-within .it-rm { opacity: 1; }
.r24-add { width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
  border: 1px dashed var(--border-strong); border-radius: 50%; background: transparent;
  color: var(--muted-foreground); font-size: 15px; line-height: 1; padding: 0 0 2px; }
.r24-add:hover { color: var(--brand-texto); border-color: var(--brand-1); }
.r24-vao { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 22px; position: relative; }
.r24-vao::before { content: ""; position: absolute; left: 56px; top: 0; bottom: 0; width: 1px;
  background: repeating-linear-gradient(var(--border-strong) 0 3px, transparent 3px 7px); }
.r24-vao span { grid-column: 2; font-size: 11px; color: var(--warning-text); font-weight: 600;
  padding: 5px 0; }
.r24-ref.ausente .r24-topo b { color: var(--faint-foreground); font-weight: 500; }
.r24-ref.ausente .r24-h::after { background: var(--card); border: 1px dashed var(--border-strong); }
.r24-nada { margin: 0; font-size: 12.5px; color: var(--faint-foreground); line-height: 1.5; }
.r24-ref.alerta .r24-h::after { background: var(--warning); }
@media (pointer: coarse) { .r24-itens .it .it-rm { opacity: 1; } }
@media (max-width: 620px) { .r24-ref, .r24-vao, .rx-item { grid-template-columns: 40px minmax(0, 1fr); gap: 18px; }
  .r24-ref::before, .r24-vao::before, .rx-item::before { left: 48px; }
  .r24-h::after { left: 45px; }
  .rx-ad .ad { padding: 4px 10px; } }

.pane .miss-box { margin-top: 14px; border: 1px dashed var(--border-strong); border-radius: 11px; padding: 15px; }
.pane .miss-box .t { font-weight: 600; font-size: 14px; }
.pane .miss-box .q { font-family: var(--font-display); font-style: italic; font-size: 15px; margin: 9px 0 12px; color: var(--foreground); }
.pane .miss-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.pane .kept { margin-top: 12px; font-size: 12.5px; color: var(--warning-text); display: flex; align-items: center; gap: 7px; }

.decis { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 16px 18px 18px; }
.decis .dh { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; flex-wrap: wrap; row-gap: 8px; }
.decis .dh h3 { min-width: 0; }
.decis .dh .swap { flex-wrap: wrap; }
.decis .dh .lt { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 12px; flex: none; }
.decis .dh h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 0; }
.decis .dh .sp { flex: 1; }
.decis .from { display: flex; gap: 9px; align-items: flex-start; border-radius: 10px; padding: 9px 12px; margin-bottom: 13px;
  background: var(--surface); border-left: 2px solid var(--border-strong); font-size: 12.5px; color: var(--muted-foreground); line-height: 1.5; }
.decis .from .w { font-family: var(--font-label); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint-foreground); flex: none; padding-top: 2px; font-weight: 600; }
.decis .from.alert { border-left-color: var(--warning); color: var(--warning-text); }
.decis .to { font-size: 14px; line-height: 1.6; }
.decis .to .none { color: var(--faint-foreground); font-style: italic; font-size: 13.5px; }
.decis .dh .sp { flex: 1; }
.decis[data-editado] { border-color: color-mix(in srgb, var(--brand-1) 34%, transparent); }
.decis .mao-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-label); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--brand-texto);
  border: 1px solid color-mix(in srgb, var(--brand-1) 30%, transparent); border-radius: 999px; padding: 3px 8px;
  background: color-mix(in srgb, var(--brand-1) 7%, transparent); }
.decis.editando { border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 10%, transparent); }
.decis[data-gio] { border-color: color-mix(in srgb, var(--brand-1) 30%, transparent); }
.gio-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-label); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--brand-texto);
  border: 1px solid color-mix(in srgb, var(--brand-1) 30%, transparent); border-radius: 999px; padding: 3px 4px 3px 9px;
  background: color-mix(in srgb, var(--brand-1) 8%, transparent); }
.gio-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-1); flex: none; }
.gio-undo { border: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--muted-foreground); background: var(--card); border-radius: 999px; padding: 3px 8px; }
.gio-undo:hover { color: var(--foreground); }
@keyframes gio-tocou { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 26%, transparent); }
  to { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-1) 0%, transparent); } }
.decis.gio-tocou { animation: gio-tocou 1.3s ease-out; }
@media (prefers-reduced-motion: reduce) { .decis.gio-tocou { animation: none; } }
.gio-poder { padding: 0 12px 10px; font-size: 11.5px; color: var(--faint-foreground); line-height: 1.45; }
.gio-poder[hidden] { display: none; }
.ai-stamp .d.gio { color: var(--brand-texto); margin-top: 2px; }
.decis [contenteditable] { border-radius: 6px; outline: 0; }
.decis.editando [contenteditable] { background: color-mix(in srgb, var(--brand-1) 6%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-1) 22%, transparent); padding: 1px 5px; margin: -1px -5px; }
.decis.editando [contenteditable]:focus { background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--brand-1); }
.decis .to textarea { width: 100%; min-height: 92px; resize: vertical; font: inherit; line-height: 1.6;
  color: inherit; border: 1px solid var(--brand-1); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.decis.editando .presc .p { grid-template-columns: 26px minmax(0, 1fr) auto auto; }
.decis .p-rm { border: 0; background: none; cursor: pointer; color: var(--faint-foreground); font-size: 16px;
  line-height: 1; padding: 2px 4px; align-self: center; }
.decis .p-rm:hover { color: var(--danger-text); }
.lt2 { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none;
  font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 12px; }

.drop { border: 1.5px dashed var(--border-strong); border-radius: 16px; padding: 22px; text-align: center; cursor: pointer;
  background: var(--card); display: block; width: 100%; font: inherit; color: inherit;
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); }
.drop:hover, .drop.over { border-color: var(--brand-1); background: var(--brand-grad-soft); }
.drop:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.drop .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-grad-soft); display: grid; place-items: center;
  margin: 0 auto 10px; color: var(--brand-texto); }
.drop .t { font-weight: 600; }
.drop .d { font-size: 13px; color: var(--muted-foreground); margin-top: 4px; }
.drop .f { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint-foreground); margin-top: 9px; font-weight: 600; }

.tipo-pick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.tipo-pick label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; background: var(--card); }
.tipo-pick label:has(input:checked) { border-color: var(--brand-1); background: var(--brand-grad-soft); color: var(--brand-texto); font-weight: 600; }
.tipo-pick input { accent-color: var(--brand-1); }
.tipo-pick .fed { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; opacity: .75; }

.chip.tipo { color: var(--muted-foreground); border-color: var(--border-strong); background: transparent; }
.chip.tipo i { display: none; }

.warn-row { display: flex; gap: 9px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
  background: color-mix(in srgb, var(--warning) 9%, transparent); border-radius: 11px; padding: 11px 14px; margin-top: 12px;
  font-size: 13px; color: var(--warning-text); line-height: 1.5; }
.warn-row svg { flex: none; margin-top: 2px; }
.warn-row .row2 { display: flex; gap: 8px; margin-top: 8px; }

.vals { display: grid; gap: 0; margin-top: 12px; }
.vals .v { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.vals .v:last-child { border-bottom: 0; }
.vals .v .n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.vals .v .ref { font-family: var(--font-mono); font-size: 11px; color: var(--faint-foreground); }
.vals .v.alto .n, .vals .v.baixo .n { color: var(--danger-text); font-weight: 700; }
.vals .v.limitrofe .n { color: var(--warning-text); font-weight: 700; }
.vals .v.empty .n { color: var(--faint-foreground); font-style: italic; }
.vals .v .tag { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.vals .v.alto .tag, .vals .v.baixo .tag { color: var(--danger-text); }
.vals .v.limitrofe .tag { color: var(--warning-text); }
.vals .v.empty .tag { color: var(--faint-foreground); }
.vals .coment { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted-foreground); margin-top: 4px; line-height: 1.5; }

.toast { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--piso, 8px) + 14px); z-index: 70;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  background: var(--plum-bg); color: var(--plum-fg); font-size: 13.5px; font-weight: 500;
  border: 1px solid rgba(234,240,245,.18); box-shadow: 0 20px 50px -20px rgba(0,0,0,.55);
  animation: toast-in var(--dur-2) var(--ease-out) both; }
.toast svg { color: var(--success-text); flex: none; }
/* Sai DESCENDO, pela mesma borda em que subiu. Antes ela entrava e saía só com
   opacidade: chegava por um caminho e ia embora por outro.
   O movimento vai na propriedade `translate`, não em `transform`: o `transform`
   aqui é a centralização (`translateX(-50%)`), e no celular ela é trocada por
   `transform: none` com `left/right: 12px`. `translate` compõe separado, então
   a mesma regra serve nos dois casos sem redefinir keyframe por media query. */
.toast.out { opacity: 0; translate: 0 100%;
  transition: opacity var(--dur-2) var(--ease-out), translate var(--dur-2) var(--ease-out); }
.toast.neutro svg { color: var(--info-text); }
.toast.aviso svg { color: var(--warning-text); }
.toast-acao { margin-left: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(234,240,245,.35);
  background: transparent; color: #fff; font: 600 12.5px var(--font-sans); cursor: pointer; flex: none;
  transition: background var(--dur-1) var(--ease-out); }
.toast-acao:hover { background: rgba(234,240,245,.12); }
.vazio { padding: 30px 16px; text-align: center; color: var(--muted-foreground); font-size: 13.5px; }
.add-colhe { display: flex; gap: 8px; margin-top: 8px; }
.add-colhe input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--input);
  background: var(--card); color: var(--foreground); font: 400 13.5px var(--font-sans); }
.add-colhe input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
@keyframes toast-in { from { opacity: 0; translate: 0 100%; } }
@media (max-width: 620px) { .toast { left: 12px; right: 12px; transform: none; } }

.bia { margin-top: 14px; }
.bia .grp { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint-foreground); margin: 16px 0 8px; font-weight: 600; }
.bia .grp:first-child { margin-top: 0; }
.bia .row3 { display: grid; grid-template-columns: 1fr auto 118px; gap: 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.bia .row3:last-child { border-bottom: 0; }
.bia .row3 .n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.bia .row3 .fx { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint-foreground); text-align: right; }
.bia .row3.alto .n, .bia .row3.baixo .n { color: var(--danger-text); font-weight: 700; }
.bia .row3.alto .fx, .bia .row3.baixo .fx { color: var(--danger-text); }
.bia .row3.limitrofe .n, .bia .row3.limitrofe .fx { color: var(--warning-text); font-weight: 700; }
.bia .row3.vazio .n { color: var(--faint-foreground); font-style: italic; }
.bia .seg { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 13px; padding: 7px 0;
  border-bottom: 1px solid var(--border); }
.bia .seg:last-child { border-bottom: 0; }
.bia .seg .n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.bia .seg .pc { font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); min-width: 74px; text-align: right; }
.bia .seg .pc.acima { color: var(--warning-text); }
.bia .fonte { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint-foreground); margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 600; }

.alvo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 15px; background: var(--surface); margin-bottom: 12px; font-size: 13px; }
.alvo .lbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.alvo .n { font-family: var(--font-display); font-size: 1.15rem; }
.alvo .regra { flex-basis: 100%; order: 9; font-size: 11.5px; color: var(--faint-foreground); line-height: 1.5; }
[data-food-panel="relato"] .it { position: relative; cursor: pointer; border-radius: 7px;
  transition: background var(--dur-1) var(--ease-out); }
[data-food-panel="relato"] .it:hover, [data-food-panel="relato"] .it:focus-visible { background: color-mix(in srgb, var(--brand-1) 7%, transparent); }
[data-food-panel="relato"] .it input { border: 0; background: transparent; font: inherit; color: inherit; outline: none;
  border-bottom: 1.5px solid var(--brand-1); min-width: 150px; }
.it-rm { position: absolute; top: -7px; right: -7px; width: 17px; height: 17px; border: 0; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; padding: 0;
  opacity: 0; transition: opacity var(--dur-1) var(--ease-out); }
[data-food-panel="relato"] .it:hover .it-rm, [data-food-panel="relato"] .it:focus-within .it-rm { opacity: 1; }
.add-item { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1.5px dashed var(--border-strong);
  border-radius: 10px; background: transparent; color: var(--faint-foreground); font: inherit; font-size: 12.5px;
  text-align: left; cursor: pointer; transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.add-item:hover { border-color: var(--brand-1); color: var(--brand-texto); }
.pend-vazio { font-size: 13px; color: var(--success-text); margin: 4px 0; }
.crow .who .nm .pq { font-weight: 400; font-size: 12px; color: var(--muted-foreground); }
@media (pointer: coarse) { .it-rm { opacity: 1; } }
.alvo .bar { flex: 1; min-width: 130px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.alvo .bar i { display: block; height: 100%; width: 99%; border-radius: 3px; background: var(--brand-grad); }
.alvo.abaixo .bar i { width: 49%; }
.alvo .gap { font-family: var(--font-mono); font-size: 11px; }
.alvo.abaixo { border-color: color-mix(in srgb, var(--warning) 42%, transparent); background: color-mix(in srgb, var(--warning) 8%, transparent); }
.alvo.abaixo .gap { color: var(--warning-text); font-weight: 700; }

.fila { margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); overflow: hidden; }
.fila .fh { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--border); }
.fila .fh .t { flex: 1; font-family: var(--font-label); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-foreground); font-weight: 600; }
.fila .fh .pg { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); }

.fq { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 15px; border-bottom: 1px solid var(--border); }
.fq:last-child { border-bottom: 0; }
.fq .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--border-strong); color: var(--faint-foreground); }
.fq[data-st="lendo"] .st { border-color: var(--brand-1); border-top-color: transparent; animation: spin .7s linear infinite; }
.fq[data-st="pronto"] .st { border-color: transparent; background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success-text); }
.fq[data-st="falhou"] .st { border-color: transparent; background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger-text); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fq[data-st="lendo"] .st { animation-duration: 2s; } }
.fq .nm2 { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fq .mt2 { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.fq select { border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px;
  background: var(--background); color: var(--foreground); outline: none; }
.fq select:focus { border-color: var(--ring); }
.fq .fed2 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--brand-texto); min-width: 62px; text-align: right; }
.fq[data-st="pronto"] .mt2 b { color: var(--foreground); }

.fila .resumo { padding: 13px 15px; background: var(--surface); border-top: 1px solid var(--border); font-size: 13px; line-height: 1.55; }
.fila .resumo b { color: var(--foreground); }
.fila .resumo .dup { display: flex; gap: 8px; align-items: flex-start; margin-top: 9px; padding-top: 9px;
  border-top: 1px dashed var(--border); color: var(--warning-text); }
.fila .resumo .dup svg { flex: none; margin-top: 2px; }

.crow .acao { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  font: 600 12.5px var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--foreground);
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); }
.crow .acao:hover { border-color: var(--brand-1); color: var(--brand-texto); }
.crow .acao:active { transform: scale(.97); }
.crow .acao:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.crow .acao.forte { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-warm); }
.crow .acao.forte:hover { color: #fff; }
.crow .acao.fraca { border-color: transparent; color: var(--muted-foreground); background: transparent; }
.panel, .agenda-grid { container-type: inline-size; }
.crow .modo { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-label); font-size: 9.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground); white-space: nowrap; font-weight: 600; }
.crow .modo svg { color: var(--brand-texto); }
@container (max-width: 620px) { .crow .modo { display: none; } }
@container (max-width: 540px) {
  .crow { grid-template-columns: 52px minmax(0, 1fr); row-gap: 10px; }
  .crow > .acts, .crow > .rt, .crow > .chip { grid-column: 1 / -1; justify-self: start;
    justify-content: flex-start; }
}
@media (max-width: 820px) {
  .crow { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .crow > .acts { grid-column: 1 / -1; justify-content: flex-start !important; flex-wrap: wrap; }
  .crow > .rt, .crow > .chip { grid-column: 1 / -1; justify-self: start; }
  .crow .acao { white-space: normal; }
}
@media (max-width: 620px) { .crow .modo { display: none; } }

.dois { display: grid; grid-template-columns: 1.35fr .95fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .dois { grid-template-columns: 1fr; } }
.dois > .col { display: grid; gap: 16px; min-width: 0; }
.dois > .col > * { min-width: 0; }
.dois .col.lado { position: sticky; top: 84px; }
@media (max-width: 1080px) { .dois .col.lado { position: static; } }

.dois .decis { padding: 14px 16px 16px; }
.dois .decis .from { padding: 8px 11px; margin-bottom: 11px; }
.dois .plano { gap: 8px; }
.dois .meal { padding: 11px 13px; }

.fim-doc { display: grid; gap: 12px; }
.fim-doc .card { padding: 6px 16px; }

.topbar { background: color-mix(in srgb, var(--surface) 72%, transparent) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent); }
.recstrip { background: color-mix(in srgb, var(--rec-bg) 94%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.toast { background: color-mix(in srgb, var(--plum-bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.actbar { background:
    linear-gradient(180deg, rgba(234,240,245,.16), rgba(234,240,245,.02) 34%, rgba(0,0,0,.1)),
    color-mix(in srgb, var(--plum-bg) 96%, transparent);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); }
.rail { background: color-mix(in srgb, var(--card) 78%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.cond-indice { background: color-mix(in srgb, var(--background) 76%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
.side { background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-1) 6%, transparent), transparent 220px),
    color-mix(in srgb, var(--surface) 76%, transparent);
  border-right-color: color-mix(in srgb, var(--border) 70%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }

.gio-caixa { background: color-mix(in srgb, var(--card) 84%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
.gio-agora { background: color-mix(in srgb, var(--surface) 68%, transparent); }
.gio-veu { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.palco[data-gio="fechado"] .gio-alca {
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.cmdk { background: color-mix(in srgb, var(--card) 80%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.cmdk::backdrop, .confirm::backdrop, .docview::backdrop { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.docview .bar2 { background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 2; }
@supports not (backdrop-filter: blur(1px)) {
  .topbar { background: var(--surface) !important; }
  .rail, .cmdk, .docview .bar2 { background: var(--card); }
  .actbar, .toast { background: var(--plum-bg); }
  .recstrip { background: var(--rec-bg); }
}

@media (max-width: 560px) {
  .app { grid-template-columns: 1fr; }

  .side { position: fixed; inset: auto 0 0 0; height: auto; z-index: 50;
    flex-direction: row; align-items: stretch; gap: 0; padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
  .side .brand, .side .navlbl, .side .spacer { display: none; }
  .side-meio { display: contents; }
  .side .user { display: contents; }
  .side .user .u-link { display: none; }
  .side .nav { display: contents; }
  .side .nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 0;
    padding: 0; min-height: 48px; border-radius: 11px; }
  .side .nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
  .side .nav a svg { width: 21px; height: 21px; }
  .main { padding-bottom: 78px; }
  .gio, .gio.largo { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .recstrip { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(var(--piso, 78px) + 12px + env(safe-area-inset-bottom, 0px)); }
  body:has(.app) .recstrip { left: 50%; }

  .content { padding: 18px 14px 40px; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; }
  .topbar .search { order: 1; flex: 1 1 auto; width: auto; min-width: 0; padding: 9px 12px; font-size: 13.5px; }
  .topbar .search input { min-width: 0; }
  .topbar .actions { order: 2; flex: none; }
  .topbar .actions .btn-primary { padding: 0; width: 42px; height: 42px; justify-content: center; gap: 0; flex: none; }
  .topbar .actions .btn-primary span.rot { display: none; }
  .topbar > .btn-soft { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
  .topbar .actions .btn-soft { padding: 0; width: 42px; height: 42px; justify-content: center; gap: 0; flex: none; }
  .topbar .actions .btn-soft span.rot { display: none; }
  .card { border-radius: 14px; }

  /* O piso do dedo.
     Medido no dashboard a 375px: dez dos vinte e dois alvos ficavam abaixo de
     40px — "Iniciar" com 85x31, "Ver tudo" com 73x16, "Abrir ficha" com 77x19.
     O minimo confortavel e 40px de altura, e o alvo cresce por PADDING, nao por
     `height` fixo: alguns destes sao `a` em linha, e altura fixa neles nao faz
     nada. `align-items: center` mantem o texto no meio da area nova. */
  .crow .acts a.acao, .crow .rt a.remind,
  .ph a.lnk, .next-up a.lnk2, .next-up .acao {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  /* O alvo e o INPUT, nao a caixa em volta: clicar na borda da caixa nao
     foca o campo. Entao e o input que cresce, e a caixa encolhe o padding. */
  .topbar .search { min-height: 44px; padding-top: 2px; padding-bottom: 2px; }
  .topbar .search input { min-height: 40px; }

  .page-head h1, h1, .h1 { font-size: 25px; line-height: 1.15; }
  .page-head { margin-bottom: 18px; }
  h2 { font-size: 18.5px; }
  h3 { font-size: 17px; }
  .kpi .val { font-size: 25px; }
  .kpi { padding: 13px 12px; }
  .kpi-grid, .kpi-grid.kpi-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
  .kpi .lbl { font-size: 9px; letter-spacing: .07em; }
  .kpi .sub, .kpi .dt { font-size: 11.5px; }
  .kpi .ic { width: 26px; height: 26px; }
  .paper h2.dtitle { font-size: 21px; }
  .pt-head .pname { font-size: 19px; }
  .pav { width: 46px; height: 46px; font-size: 16px; }
  .cal .cal-head .mo { font-size: 18px; }
  .pendencias .n, .kpi .n { font-size: 20px; }
  .tt { font-size: 15.5px; }

  .crow, .prow { padding: 11px 12px; gap: 8px; }
  .crow[data-cols="2"], .crow[data-cols="3"] { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .crow[data-cols] > :not(.who) { justify-self: start; }
  .crow .nm, .prow .nm { font-size: 14px; }
  .crow .mt, .prow .em { font-size: 12px; }
  .crow .time { font-size: 12.5px; }
  .btn { min-height: 40px; }
  .btn-sm, .btn-mini { min-height: 36px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
  .chip { font-size: 11.5px; }

  .phases { gap: 4px; padding: 4px; border-radius: 13px; margin-bottom: 18px; }
  .phase-tab { padding: 8px 10px; gap: 8px; }
  .phase-tab .pt-lbl { font-size: 13px; }
  .phase-tab.travada { display: none; }
  .phase-tab.travada.proxima { display: flex; }
  .phase-tab.travada.proxima .pt-lbl { font-size: 12.5px; }

  /* Uma LINHA só. Em duas ela media 106px de altura numa tela de 780 — 13% do
     visor para a peça que acompanha a consulta inteira — e o "Analisar"
     sozinho levava 243 dos 362px. O estado encolhe até onde precisar
     (`min-width: 0`), os alvos vão a 40px, que ainda é toque confortável, e o
     primário para de esticar. */
  .actbar { bottom: 84px; gap: 6px; padding: 6px 8px 6px 10px; border-radius: 999px;
    width: 100%; flex-wrap: nowrap; }
  /* O estado ABRAÇA o próprio conteúdo (`flex: 0 1 auto`) em vez de esticar:
     assim o play fica colado no relógio, que é o par dele. Esticando, o
     `margin-left: auto` do play o jogava para a beira do bloco, encostado nos
     botões de ação — longe do que ele controla e perdido no meio deles. */
  .actbar .ab-estado { flex: 0 1 auto; min-width: 0; gap: 8px; padding: 0 4px 0 0;
    border-bottom: 0; }
  .actbar .ab-tx { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
  .actbar .st, .actbar .tm { white-space: nowrap; font-size: 11.5px; }
  /* "microfone em pausa" por extenso não cabe numa linha de 362px, e o ícone
     de mudo já diz o mesmo. A frase continua no DOM para leitor de tela.
     A especificidade acompanha a regra de `[data-state]`, senão ela vence. */
  .actbar[data-state="analise"] .ab-mudo,
  .actbar[data-state="paused"] .ab-mudo { gap: 0; font-size: 0; }
  .actbar[data-state="analise"] .ab-mudo svg,
  .actbar[data-state="paused"] .ab-mudo svg { width: 13px; height: 13px; flex: none; }
  /* `flex: none` porque o estado agora encolhe: sem isso o pausar era o que
     cedia espaço e virava 18px de largura — metade de um alvo de toque. */
  .actbar .ab-estado .pz.ico { margin-left: 2px; flex: none; width: 34px; height: 34px; }
  /* As ações vão para a outra ponta; o vazio fica entre os dois grupos. */
  .actbar .ab-acoes { flex: none; gap: 5px; margin-left: auto; }
  .actbar .pz span:not(.i-on):not(.i-off) { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .actbar .ab-gio span:not(.gio-n) { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .actbar .ab-acoes .pz, .actbar .ab-acoes .ab-gio { width: 40px; height: 40px; padding: 0;
    justify-content: center; flex: none; }
  /* Sem palavra grande no celular: o primário vira alvo redondo com a seta,
     do tamanho dos outros. "Analisar →" escrito levava 92px de uma barra de
     362 — e nesta largura o que a médica precisa é acertar o dedo, não ler. */
  .actbar .go { flex: none; justify-content: center; width: 40px; height: 40px;
    min-height: 40px; padding: 0; gap: 0; }
  .actbar .go .go-ico { display: block; }
  .actbar .go-longo, .actbar .go-curto { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  body[data-live-consulta] .content { padding-bottom: 128px; }
  .recstrip { bottom: 86px; padding: 7px 8px 7px 14px; gap: 10px; }
  .recstrip .rs-pz, .recstrip .rs-go { width: 40px; height: 40px; }
  .recstrip .rs-tx { flex: 1 1 auto; }
  .recstrip .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  dialog.confirm { width: 94vw; }
}


.mais-btn, .mais-folha { display: none; }
@media (max-width: 560px) {
  .side .nav a { display: none; }
  .side .nav a[href="consulta.html"], .side .nav a[href="agenda.html"],
  .side .nav a[href="pacientes.html"], .side .nav a[href="exames.html"] { display: flex; }
  .mais-btn { display: grid; place-items: center; flex: 1 1 0; min-width: 0; min-height: 48px;
    border: 0; background: transparent; border-radius: 11px; color: var(--muted-foreground);
    cursor: pointer; padding: 0; }
  .mais-btn svg { width: 21px; height: 21px; }
  .mais-btn[aria-expanded="true"], .mais-btn.tem-ativo { color: #fff; background: var(--brand-grad);
    box-shadow: var(--shadow-warm); }
  .mais-folha { display: block; position: fixed; inset: 0; z-index: 60;
    background: rgba(18,37,53,.4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  .mais-folha[hidden] { display: none; }
  .mf-caixa { position: absolute; left: 8px; right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
    padding: 10px; border-radius: 18px; border: 1px solid var(--border); background: var(--card);
    box-shadow: 0 30px 70px -24px rgba(0,0,0,.5);
    animation: mf-sobe var(--dur-2) var(--ease-out) both; }
  .mf-caixa a { display: flex; align-items: center; gap: 11px; padding: 13px 12px; border-radius: 12px;
    text-decoration: none; color: var(--foreground); font-size: 14px; font-weight: 600; min-height: 48px; }
  .mf-caixa a svg { width: 18px; height: 18px; flex: none; stroke-width: 1.8; color: var(--muted-foreground); }
  .mf-caixa a[aria-current="page"] { background: var(--brand-grad); color: #fff; }
  .mf-caixa a[aria-current="page"] svg { color: #fff; }
  @keyframes mf-sobe { from { opacity: 0; transform: translateY(12px); } }
}
@media (max-width: 560px) and (prefers-reduced-motion: reduce) { .mf-caixa { animation: none; } }

@media (max-width: 380px) {
  .content { padding-left: 11px; padding-right: 11px; }
}

@media (max-width: 340px) {
  .kpi-grid, .kpi-grid.kpi-3 { grid-template-columns: 1fr; }
  .page-head h1, h1, .h1 { font-size: 23px; }
  .kpi .val { font-size: 22px; }
}

.linha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.linha.entre { justify-content: space-between; }
.linha .tx { flex: 1; min-width: 200px; font-size: 14px; }
.linha .tx .sub { font-size: 12px; color: var(--faint-foreground); }
.linha .tx.suave { color: var(--muted-foreground); max-width: 56ch; }
.linha-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.card.pad { padding: 18px; }
.card.pad-h { padding: 14px 18px; }
.card.lista { padding: 6px 18px; }
.folga-baixo { margin-bottom: 14px; }
.folga-topo { margin-top: 14px; }
.micro { font-size: 10px; color: var(--faint-foreground); }
.grade-solta { display: grid; gap: 16px; }
.grade-solta.topo { align-content: start; }
.grade-dias { display: grid; gap: 16px; max-width: 760px; }
.panel .ph.meio { margin: 24px 0 14px; }
.ph h2.menor { font-size: 1.05rem; }
.ph.solto { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ph.solto h2 { font-size: 1.2rem; }
.ph.interno { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0; }
.val .un { font-size: 1.1rem; }
.kpi .ic.bom { color: var(--success-text); background: color-mix(in srgb, var(--success) 12%, transparent); }
.kpi .ic.atencao { color: var(--warning-text); background: color-mix(in srgb, var(--warning) 12%, transparent); }
.rank .ct.bom { color: var(--success-text); }
.rank .ct.atencao { color: var(--warning-text); }
.idx .idx-head .dir { text-align: right; }
.toolbar .sp, .exam-ana .hd .sp { flex: 1; }
.chip.tipo { font-size: 11px; }
.spectrum-rule.folga { margin: 6px 0 26px; opacity: .85; }
.brand.estatico { cursor: default; }
.envio { margin-bottom: 20px; }
.encaixe { padding: 13px 16px; margin-bottom: 18px; max-width: 760px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.encaixe .tx { flex: 1 1 260px; min-width: 0; }
.encaixe .btn { flex: none; }
.encaixe .tt { font-weight: 600; }
.encaixe .st { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.perfil-id { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.perfil-id .pav { width: 64px; height: 64px; font-size: 24px; }
.pmeta .linha-acoes { margin-top: 12px; }
.peso-nota { margin-top: 26px; font-size: 13px; color: var(--muted-foreground); }
.peso-nota b { color: var(--success-text); }
.rotulo-fino.sub { font-size: 12px; color: var(--faint-foreground); margin-bottom: 6px; }
.sec-title.colado { margin-bottom: 4px; }
.sec.zerado { margin: 0; }
.sec .intro { font-size: 13.5px; color: var(--muted-foreground); margin: 0 0 12px; max-width: 64ch; }
.rec-bar.fina { padding: 10px 14px; }
.rec-bar.fina .consent { margin-left: 0; }
.consent-note .meta { margin-top: 8px; color: var(--faint-foreground); }
.barra-validar { margin-top: 16px; }
.barra-validar .nota { font-size: 12.5px; color: var(--muted-foreground); }
.plano .rodape { font-size: 12.5px; color: var(--faint-foreground); margin: 2px 0 0; line-height: 1.55; }
.abc-body.claro { background: var(--surface); }
.abc-body .texto { font-size: 14.5px; line-height: 1.8; }
.acoes-envio { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.ok-msg { font-size: 13px; color: var(--success-text); }
.ok-linha { margin-top: 12px; font-size: 13px; color: var(--success-text); display: flex; align-items: center; gap: 7px; }
.ai-stamp .law a { color: var(--brand-texto); }
.dh.solta { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.ret-linha { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ret-linha .info { flex: 1; min-width: 260px; }
.ret-linha .just { font-size: 13px; color: var(--muted-foreground); margin-top: 4px; max-width: 56ch; }
.data-grande { font-family: var(--font-display); font-size: 1.35rem; }
.valor { font-family: var(--font-display); font-size: 1.15rem; }
.miss-box .row .btn { padding: 7px 14px; font-size: 13px; }
.flist .fr-acoes { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.topbar .btn.viva .rec-dot { width: 8px; height: 8px; }
.side .nav a.viva { color: var(--foreground); font-weight: 600; }
.side .nav a.viva .viva-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent); animation: rec 1.6s infinite; }
.side .nav a.active.viva .viva-dot { background: #fff; box-shadow: none; }
.crow.viva { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger) 4%, var(--card));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 9%, transparent); }
@media (prefers-reduced-motion: reduce) { .side .nav a.viva .viva-dot { animation: none; } }
@media (max-width: 860px) { .side .nav a { position: relative; } .side .nav a.viva .viva-dot { position: absolute; top: 7px; right: 9px; } }
[data-side="rail"] .side .nav a.viva .viva-dot { position: absolute; top: 7px; right: 9px; }

.doc-vazio { margin: 0 0 14px; padding: 13px 15px; border: 1px dashed var(--border-strong);
  border-radius: 12px; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }
.doc-vazio[hidden] { display: none; }

.rel-lista { display: grid; gap: 3px; min-width: 0; }
.rel-lista .rl { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 9px; align-items: baseline; }
.rel-lista .rl i { font-style: normal; font-family: var(--font-mono); font-size: 11px;
  color: var(--faint-foreground); }
.rel textarea { flex: 1; min-width: 220px; font: inherit; line-height: 1.6; color: var(--foreground);
  background: var(--card); border: 1px solid var(--input); border-radius: 9px; padding: 8px 11px;
  outline: none; resize: vertical; min-height: 76px; }
.rel textarea:focus { border-color: var(--ring); }
.rel .rel-edit { border: 0; background: none; color: var(--faint-foreground); cursor: pointer; padding: 3px 5px;
  border-radius: 7px; display: inline-flex; opacity: 0; transition: opacity .15s ease, color .15s ease; }
.rel:hover .rel-edit, .rel:focus-within .rel-edit { opacity: 1; }
.rel .rel-edit:hover { color: var(--brand-texto); }
.rel input { flex: 1; min-width: 200px; font: inherit; color: var(--foreground); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 4px 9px; }

.ctx .doc-acts { display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .15s ease; }
.ctx .doc:hover .doc-acts, .ctx .doc:focus-within .doc-acts { opacity: 1; }
.ctx .doc-acts select { font: inherit; font-size: 12px; color: var(--muted-foreground); background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; max-width: 132px; }
.ctx .doc-rm { border: 0; background: none; color: var(--faint-foreground); cursor: pointer; padding: 5px;
  border-radius: 7px; display: inline-flex; }
.ctx .doc-rm:hover { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.ctx .doc .nm { cursor: text; border-radius: 6px; }
.ctx .doc .nm:hover { background: color-mix(in srgb, var(--foreground) 5%, transparent); }
.ctx .doc .nm input { font: inherit; width: 100%; color: var(--foreground); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 7px; padding: 2px 7px; }


.nota-consulta { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 55; width: min(330px, calc(100vw - 44px)); color: var(--foreground); text-align: left; font-family: var(--font-sans);
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 12px 14px; }
.nota-consulta .nc-topo { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
.nota-consulta .nc-topo b { font-size: 13.5px; }
.nota-consulta .nc-topo span { font-size: 11.5px; color: var(--faint-foreground); }
.nota-consulta textarea { width: 100%; min-height: 110px; resize: vertical; font: inherit; font-size: 13.5px;
  line-height: 1.55; color: var(--foreground); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; }
.actbar .pz .nota-n { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-1); }

.nota-eco { display: grid; gap: 8px; margin-bottom: 16px; padding: 14px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--brand-1) 24%, var(--border)); }
.nota-eco[hidden] { display: none; }
.nota-eco .ne-topo { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nota-eco .ne-topo b { font-size: 13px; }
.nota-eco .ne-topo span { font-size: 11.5px; color: var(--faint-foreground); }
.nota-eco .ne-topo .btn-tiny { margin-left: auto; }
.nota-eco .ne-topo .btn-tiny ~ .btn-tiny { margin-left: 0; }
.nc-acoes { display: flex; gap: 8px; }
.nota-eco p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--foreground); white-space: pre-wrap; }

.pane-add, .pane-conf { display: grid; gap: 9px; margin: 10px 0 2px; padding: 12px 14px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }
.pane-add textarea { min-height: 74px; resize: vertical; font: inherit; font-size: 13.5px; color: var(--foreground);
  background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; }
.pane-add .pa-lbl { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted-foreground); font-weight: 600; }
.pane-add { border-color: color-mix(in srgb, var(--brand-1) 26%, var(--border)); }
.pane-add .row, .pane-conf .row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-tiny.apaga { color: var(--danger-text); }
.btn-tiny.apaga:hover { background: color-mix(in srgb, var(--danger) 9%, transparent); }
.btn-tiny.apaga svg { margin-right: 3px; }

.presc .p-rm svg, .it-rm svg { display: block; }
.ctx .doc { grid-template-columns: 34px minmax(0, 1fr) auto auto; }
[data-abc="a"] { --lc: var(--abc-a); --lc-texto: var(--abc-a-texto); }
[data-abc="b"] { --lc: var(--abc-b); --lc-texto: var(--abc-b-texto); }
[data-abc="c"] { --lc: var(--abc-c); --lc-texto: var(--abc-c-texto); }
[data-abc="d"] { --lc: var(--abc-d); --lc-texto: var(--abc-d-texto); }
[data-abc="e"] { --lc: var(--abc-e); --lc-texto: var(--abc-e-texto); }
[data-abc="f"] { --lc: var(--abc-f); --lc-texto: var(--abc-f-texto); }
[data-abc="s"] { --lc: var(--abc-s); --lc-texto: var(--abc-s-texto); }

.alavanca-linha { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border); }
.alavanca { flex: none; width: 40px; height: 23px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; position: relative; transition: background .18s ease, border-color .18s ease; }
.alavanca i { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border-strong); transition: transform .18s var(--ease-out, ease); }
.alavanca[aria-checked="true"] { background: var(--brand-grad); border-color: transparent; }
.alavanca[aria-checked="true"] i { transform: translateX(17px); border-color: transparent; }
@media (pointer: coarse) {
  .alavanca::after { content: ""; position: absolute; inset: -11px -8px; }
}
.alv-txt { display: grid; gap: 1px; }
.alv-txt b { font-size: 13.5px; font-weight: 600; }
.alv-txt span { font-size: 12.5px; color: var(--faint-foreground); }

.aranha { margin-top: 12px; display: grid; justify-items: center; gap: 4px; }
.aranha .no.baixo { fill: var(--warning); }
.ponto-atencao { font-family: var(--font-label); font-size: 9.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--warning-text);
  background: color-mix(in srgb, var(--warning) 14%, transparent); padding: 2px 7px; border-radius: 999px;
  align-self: center; }
.aranha svg { width: min(300px, 100%); }
.aranha .anel { fill: none; stroke: var(--border); }
.aranha .eixo { stroke: var(--border); }
.aranha .area { fill: color-mix(in srgb, var(--brand-1) 16%, transparent); stroke: var(--brand-1); stroke-width: 1.6; stroke-linejoin: round; }
.aranha .no { fill: var(--lc, var(--brand-1)); }
.aranha .lt3 { font-family: var(--font-label); font-size: 11px; font-weight: 700; fill: var(--lc, var(--muted-foreground)); text-anchor: middle; }
.aranha .legenda { font-size: 12px; color: var(--faint-foreground); margin: 2px 0 0; }
@media (max-width: 720px) { .nota-consulta { left: 0; right: 0; width: auto; } }

.fila .fq .fq-meio { min-width: 0; }
.fila .fq[data-st="duvida"] { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
.fila .fq[data-st="duvida"] .st { color: var(--warning-text); }
.fila .fq[data-st="duvida"] select { border-color: color-mix(in srgb, var(--warning) 55%, var(--border)); }
.prow.nova { animation: prow-nova 1.6s var(--ease-out, ease); }
@keyframes prow-nova { 0% { background: color-mix(in srgb, var(--brand-1) 10%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .prow.nova { animation: none; } }
.prow .cell .vincula { font: inherit; font-size: 13px; color: var(--muted-foreground); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 5px 7px; max-width: 100%; }
.prow .rm-exame { border: 0; background: none; color: var(--faint-foreground); cursor: pointer; padding: 6px;
  border-radius: 8px; display: inline-flex; opacity: 0; transition: opacity .15s ease; }
.prow:hover .rm-exame, .prow:focus-within .rm-exame { opacity: 1; }
.prow .rm-exame:hover { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.prow .who .nm { cursor: text; border-radius: 6px; }
.prow .who .nm:hover { background: color-mix(in srgb, var(--foreground) 5%, transparent); }
.prow .who .nm input { font: inherit; width: 100%; color: var(--foreground); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 7px; padding: 2px 7px; }
.prow-conf, .ctx .doc-conf { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted-foreground); padding-top: 3px; }

/* ---- porte de 01/09: o que mudou no app ---- */

/* As duas acoes do destaque "a seguir": a leitura e o verbo do estado. */
.next-up .acoes { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.next-up .acao { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--foreground); font: 600 12.5px var(--font-sans); text-decoration: none; white-space: nowrap; }
.next-up .acao.forte { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-warm); }
.next-up .acao:active { transform: scale(.97); }

/* O chip do recorte da agenda: diz por que a lista esta curta e tem a saida. */
.filtro-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 5px 8px 5px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-1) 34%, transparent); background: color-mix(in srgb, var(--brand-1) 7%, transparent);
  color: var(--foreground); font: 600 12.5px var(--font-sans); }
.filtro-chip a { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--muted-foreground); }
.filtro-chip a:hover { background: color-mix(in srgb, var(--foreground) 8%, transparent); color: var(--foreground); }

/* O cadeado da aba trancada, no lugar do numero. */
.phase-tab.travada .pn svg { opacity: .85; }

/* A barra de validar, agora com o botao a direita. */
.barra-validar .validar-btn { margin-left: auto; }
.barra-validar.feito { border-color: color-mix(in srgb, var(--success) 32%, transparent); background: color-mix(in srgb, var(--success) 7%, transparent); }
.barra-validar.feito .nota { color: var(--success-text); }
.validar-btn.chama { animation: chama 1s cubic-bezier(.23,1,.32,1) 2; }

/* O fecho da consulta, na secao que o promete. */
.encerrar-linha { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.encerrar-linha .tx { flex: 1 1 22ch; min-width: 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.55; }

/* O botao da barra quando so VOLTA de aba: vazado, porque o gradiente e o ato
   sobre a consulta, e este clique nao pratica nenhum. */
.actbar .go.volta { background: none; border: 1px solid var(--border); color: var(--foreground); box-shadow: none; }
.actbar .go.volta:hover { background: color-mix(in srgb, var(--foreground) 6%, transparent); }

@media (max-width: 560px) {
  .filtro-chip a { width: 40px; height: 40px; }
  .next-up .acoes { width: 100%; margin-left: 0; justify-content: space-between; }
}

/* ─── Piso de toque: a regra de base ─────────────────────────────────────────

   Portado do aplicativo, onde a medição foi feita. Lá o piso existia como dez
   remendos por componente, e o casco inteiro tinha ficado de fora: busca do
   topo com 21px de altura, botão de tema 35x35, "+/−" do prato com 26 de
   largura. Aqui o quadro era melhor, mas o mesmo tipo de buraco aparecia — os
   seis menus de linha (`.rowmenu summary`) paravam em 38x38.

   A régua é o ponteiro, e não a largura da janela: um iPad em retrato tem
   768px e é dedo. 40px, e não 44, porque 44 empurra a linha da agenda e a
   lista do prontuário para além da dobra. Os 44 já existentes ficam onde
   estão: quem foi medido individualmente sabe mais do que a regra geral. */
@media (pointer: coarse) {
  :is(
    button,
    [role="button"],
    [role="tab"],
    summary,
    select,
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"])
  ) {
    min-block-size: 40px;
  }

  /* Alvo sem rótulo precisa também de largura: o dedo não mira em 26px. */
  .rowmenu summary,
  .pt-head .pt-menu summary,
  .modo,
  .side-toggle,
  .plist .acts button {
    min-inline-size: 40px;
  }

  /* Link que age como botão. O link dentro de parágrafo continua sendo texto, e
     crescer ali abriria buraco no meio da frase — por isso a lista é de lugares
     onde o link é a ação da vez, e não de `a` em geral. */
  .acao,
  .ir,
  .crow-nm,
  .cal-pe a,
  .gap-row a,
  .panel-head a,
  .empty-state a,
  .plist .acts a,
  .crow .acts a,
  .hslot .acts a {
    display: inline-flex;
    align-items: center;
    min-block-size: 40px;
  }
}

/* ─── Celular: portado do app, onde a medição foi feita ──────────────────────

   O aplicativo é a base desde 02/09. Lá a consulta em 375px foi medida tela a
   tela e a estrutura mudou; aqui o protótipo reflete o que ficou decidido.

   Antes deste bloco, medido no ar em 375px: a barra de fases tinha 97px em
   três linhas, e as lembranças do paciente, 114px. No app são 49 e 65. */

/* A data quebra ENTRE as partes, nunca dentro de uma: "50 min" partia. */
.pt-head .prow2 > span {
  white-space: nowrap;
}

@media (max-width: 560px) {
  /* AS FASES EM UMA LINHA SÓ.

     Aqui as travadas sumiam e sobravam duas abas de 344px, uma por linha: a
     médica perdia o mapa das quatro etapas justamente onde a rolagem é longa.
     No app as quatro ficam, as inativas com o número e a ativa com o nome —
     metade da altura e o mapa inteiro. Quatro nomes não cabem em 375: "Dados
     do paciente" sozinho pede 130px. */
  .phases {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    border-radius: 999px;
    padding: 4px;
  }

  .phase-tab,
  .phase-tab.travada {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 999px;
    padding: 0 10px 0 6px;
  }

  .phase-tab[aria-selected="true"] {
    flex: 1 1 auto;
    min-width: 0;
  }

  .phase-tab .pn {
    width: 28px;
    height: 28px;
    flex: none;
    font-size: 12px;
  }

  .phase-tab .pt-lbl,
  .phase-tab .pt-sub {
    display: none;
  }

  .phase-tab[aria-selected="true"] .pt-lbl {
    display: block;
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* AS LEMBRANÇAS EM TEXTO CORRIDO. Três frases curtas viravam três parágrafos
     numa coluna de 170px, porque a lembrança sem data reservava os 42px da
     coluna da data. Bloco, e não flex: num flex os filhos viram itens e cada
     uma cai numa linha própria mesmo com `display: inline`. */
  .rel-lista {
    display: block;
    line-height: 1.55;
  }

  .rel-lista .rl {
    display: inline;
  }

  .rel-lista .rl:not(:last-child)::after {
    content: " · ";
    color: var(--faint-foreground);
    font-style: normal;
  }
}

/* A lembrança sem data não reserva a coluna da data. */
.rel-lista .rl:has(> i:empty) {
  grid-template-columns: minmax(0, 1fr);
}

.rel-lista .rl > i:empty {
  display: none;
}
