:root {
  --bg: #F0FAF7; --surface: #FFFFFF; --surface-2: #F6FBF9; --ink: #1E2B29; --muted: #62726D; --line: #E6EFEC;
  --brand: #087A6A; --on-brand: #FFFFFF; --brand-soft: #D9F5EE; --voice: #5B3FD6; --on-voice: #FFFFFF; --voice-soft: #EEEAFC;
  --ok: #1B7A3E; --ok-bg: #E2F5E7; --warn: #855600; --warn-bg: #FFF3D6; --crit: #B3261E; --crit-bg: #FDE7E4;
  --hero: #087A6A; --hero-2: #0A6B5D; --on-hero: #FFFFFF; --hero-muted: #E6F7F2; --mint: #8CF0D0; --down: #FFD3C4;
  --sombra: 0 1px 2px rgba(16, 60, 52, .04), 0 10px 28px rgba(16, 60, 52, .07);
  --r: 22px; --r-s: 14px;
  --corpo: "Atkinson Hyperlegible", system-ui, sans-serif; --titulo: "Outfit", "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111B19; --surface: #1A2725; --surface-2: #22312E; --ink: #EDF4F2; --muted: #AEBFBA; --line: #314440;
    --brand: #4FD1B0; --on-brand: #06211C; --brand-soft: #143730; --voice: #A996FF; --on-voice: #150B3D; --voice-soft: #261F4A;
    --ok: #7EDB9B; --ok-bg: #12301C; --warn: #F2C867; --warn-bg: #3A2C08; --crit: #FF9A8F; --crit-bg: #431512;
    --hero: #22332F; --hero-2: #2D423D; --on-hero: #F2F7F5; --hero-muted: #B4C6C0; --mint: #6FE3BF; --down: #FF9B7A; --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111B19; --surface: #1A2725; --surface-2: #22312E; --ink: #EDF4F2; --muted: #AEBFBA; --line: #314440;
  --brand: #4FD1B0; --on-brand: #06211C; --brand-soft: #143730; --voice: #A996FF; --on-voice: #150B3D; --voice-soft: #261F4A;
  --ok: #7EDB9B; --ok-bg: #12301C; --warn: #F2C867; --warn-bg: #3A2C08; --crit: #FF9A8F; --crit-bg: #431512;
  --hero: #22332F; --hero-2: #2D423D; --on-hero: #F2F7F5; --hero-muted: #B4C6C0; --mint: #6FE3BF; --down: #FF9B7A; --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
}
:root[data-contraste="alto"] { --ink: #000000; --muted: #1F2B28; --line: #5F6F6A; --brand: #055A4E; --surface-2: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root[data-contraste="alto"]:not([data-theme="light"]) { --ink: #FFFFFF; --muted: #D5E0DC; --line: #8FA39D; --brand: #7BE8CB; --surface-2: #141F1D; } }
:root[data-contraste="alto"][data-theme="dark"] { --ink: #FFFFFF; --muted: #D5E0DC; --line: #8FA39D; --brand: #7BE8CB; --surface-2: #141F1D; }
:root[data-letra="1"] { font-size: 112.5%; } :root[data-letra="2"] { font-size: 125%; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--corpo); font-size: 1rem; line-height: 1.45; }
h1, h2, h3 { font-family: var(--titulo); line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-weight: 700; } h2 { font-weight: 600; } h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0; } button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
:focus-visible { outline: 3px solid var(--voice); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 1.4rem; height: 1.4rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.p { width: 1.05rem; height: 1.05rem; } .ic.g { width: 1.8rem; height: 1.8rem; } .ic.xg { width: 2.6rem; height: 2.6rem; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .centro { text-align: center; }
.rotulo { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* estrutura */
.app { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.topo { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.marca { color: inherit; text-decoration: none; display: flex; align-items: center; gap: .5rem; font-family: var(--titulo); font-weight: 700; font-size: 1.25rem; margin-right: auto; }
.marca i { background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.espaco { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.espaco button { min-height: 2.5rem; padding: 0 .8rem; border-radius: 999px; display: flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--muted); }
.espaco button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.redondo { width: 2.75rem; height: 2.75rem; flex: none; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; }
main { padding: .4rem 1rem 7.5rem; min-width: 0; }
.pagina { max-width: 1060px; margin: 0 auto; display: grid; gap: 1rem; }
.nav { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 5rem 1fr 1fr; padding: .3rem .4rem calc(.3rem + env(safe-area-inset-bottom)); }
.nav a { display: grid; justify-items: center; gap: .1rem; padding: .45rem .2rem; min-height: 3.4rem; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; border-radius: 14px; }
.nav a[aria-current="page"] { color: var(--brand); }
.nav a[aria-current="page"] .ic { stroke-width: 2.4; }
.fab { justify-self: center; margin-top: -1.6rem; border-radius: 50%; background: var(--voice); color: var(--on-voice); display: grid; place-items: center; box-shadow: 0 8px 22px color-mix(in srgb, var(--voice) 45%, transparent); border: 4px solid var(--bg); }
.fab span { font-size: .7rem; font-weight: 700; margin-top: -.5rem; }
@media (min-width: 900px) {
  .app { grid-template-columns: 15rem 1fr; grid-template-rows: auto 1fr; }
  .topo { grid-column: 2; padding: 1rem 2rem .6rem; }
  .nav { grid-row: 1 / 3; grid-column: 1; height: 100dvh; inset: auto; display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem .9rem; border-radius: 0; border-top: 0; border-right: 1px solid var(--line); box-shadow: none; }
  .nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; font-size: 1rem; min-height: 3rem; }
  .nav a[aria-current="page"] { background: var(--brand-soft); }
  .fab { order: -1; margin: 0 0 .8rem; border: 0; display: flex; justify-content: center; align-items: center; gap: .6rem; }
  .fab span { font-size: 1.05rem; margin: 0; }
  main { padding: .4rem 2rem 3rem; }
  .duas { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
}

/* blocos */
.cab { display: flex; align-items: center; gap: .7rem; }
.cab > div { min-width: 0; flex: 1; }
.cartao { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); border-radius: var(--r); padding: 1.1rem; display: grid; gap: .8rem; min-width: 0; }
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.sec button, .lig { color: var(--brand); font-weight: 700; min-height: 2.75rem; padding: 0 .3rem; }
.hero { background: var(--hero); color: var(--on-hero); padding: 1.3rem; display: grid; gap: 1rem; position: relative; overflow: hidden; }
.hero .rotulo { color: var(--hero-muted); } .hero .muted { color: var(--hero-muted); }
.hero::after { content: ""; position: absolute; right: -4rem; top: -4rem; width: 14rem; height: 14rem; border-radius: 50%; border: 2.2rem solid color-mix(in srgb, var(--mint) 18%, transparent); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.grande { font-family: var(--titulo); font-weight: 700; line-height: .95; letter-spacing: -.03em; }
.evo { font-family: var(--titulo); font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; gap: .2rem; }
.evo.sobe { color: var(--mint); } .evo.desce { color: var(--down); }
.pilula { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .35rem .8rem; font-weight: 700; font-size: .9rem; background: var(--hero-2); color: var(--on-hero); width: fit-content; }

.meses { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .6rem; align-items: end; height: 6.5rem; }
.meses div { display: grid; gap: .3rem; align-content: end; height: 100%; text-align: center; font-size: .85rem; color: var(--hero-muted); }
.meses i { display: block; border-radius: 10px; min-height: 6px; }
.meses .atual i { background: var(--mint); } .meses .atual.desce i { background: var(--down); } .meses .atual { font-weight: 700; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.mini > * { background: var(--hero-2); padding: .8rem; display: grid; gap: .15rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.stat { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); border-radius: 18px; padding: .8rem; display: grid; gap: .1rem; }
.stat b { font-family: var(--titulo); line-height: 1.1; } .stat span { font-size: .85rem; color: var(--muted); }
.stat.crit b { color: var(--crit); } .stat.warn b { color: var(--warn); } .stat.ok b { color: var(--ok); }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; white-space: nowrap; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; font-weight: 700; color: var(--muted); text-align: center; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.lista { display: grid; gap: .6rem; }
.linha { display: flex; align-items: center; gap: .8rem; width: 100%; background: var(--surface); border: 1px solid var(--line); padding: .8rem; min-height: 4.4rem; }
.linha > div { min-width: 0; flex: 1; display: grid; gap: .15rem; }
.linha strong { font-family: var(--titulo); font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.linha small { color: var(--muted); font-size: .9rem; }
.linha.crit { border-color: var(--crit); } .linha.warn { border-color: var(--warn); }
.avatar { width: 3rem; height: 3rem; flex: none; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-family: var(--titulo); font-weight: 700; }
.avatar.v { background: var(--voice-soft); color: var(--voice); }
.hora { flex: none; width: 3.6rem; font-family: var(--titulo); font-weight: 700; font-size: 1.1rem; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .2rem .65rem; font-weight: 700; border: 1px solid var(--line); }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.crit { background: var(--crit-bg); color: var(--crit); border-color: transparent; } .chip.info { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.voz { background: var(--voice-soft); color: var(--voice); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: 0 1.2rem; font-weight: 700; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.btn.p { background: var(--brand); color: var(--on-brand); border-color: transparent; } .btn.v { background: var(--voice); color: var(--on-voice); border-color: transparent; }
.btn.s { background: var(--brand-soft); color: var(--brand); border-color: transparent; } .btn.cheio { width: 100%; }
.btn.m { background: var(--mint); color: #06211C; border-color: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.acoes { display: flex; flex-wrap: wrap; gap: .6rem; } .acoes .btn { flex: 1 1 9rem; }
.busca { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 1rem; min-height: 3.2rem; color: var(--muted); }
.busca input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); min-height: 3rem; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr)); gap: .7rem; }
.cat { display: grid; justify-items: center; gap: .35rem; padding: .5rem .2rem; border-radius: 18px; font-weight: 700; font-size: .88rem; text-align: center; position: relative; }
.cat i { background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); }
.cat.feito i { background: var(--brand); color: var(--on-brand); border-color: transparent; }

.dias { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem 0 .4rem; scrollbar-width: none; }
.dia { flex: none; width: 3.7rem; min-height: 4.6rem; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; align-content: center; gap: .1rem; font-weight: 700; position: relative; }
.dia small { color: var(--muted); font-size: .8rem; font-weight: 700; } .dia b { font-family: var(--titulo); font-size: 1.25rem; }
.dia[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; } .dia[aria-pressed="true"] small { color: inherit; }
.dia.tem::after { content: ""; position: absolute; bottom: .45rem; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; opacity: .7; }
.vagas { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: .5rem; }
.vaga { min-height: 2.9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; text-align: center; }
.vaga[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.barra { height: .55rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.barra i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.barra.desce i { background: var(--crit); }
.notas { display: grid; gap: .7rem; }
.nota-l { display: grid; grid-template-columns: 7.5rem 1fr 2.4rem 2.6rem; gap: .6rem; align-items: center; }
.nota-l b { font-family: var(--titulo); font-size: 1.1rem; text-align: right; } .nota-l em { font-style: normal; font-weight: 700; font-size: .9rem; text-align: right; }
.sobe { color: var(--ok); } .desce { color: var(--crit); }
.spark { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: center; }
.spark svg { width: 100%; height: 3.4rem; grid-column: 1 / 3; overflow: visible; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ex { border: 1px solid var(--line); border-radius: 20px; padding: .9rem; display: grid; gap: .7rem; background: var(--surface); }
.ex.feito { border-color: var(--brand); }
.passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr)); gap: .5rem; }
.passo { display: grid; gap: .2rem; } .passo > span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.passo div { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.passo button { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; color: var(--brand); }
.passo b { font-family: var(--titulo); font-size: 1.15rem; }
.exec { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.exec button { display: grid; justify-items: center; gap: .25rem; padding: .6rem .3rem; min-height: 4.4rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: .86rem; text-align: center; }
.exec button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.exec button.comp[aria-pressed="true"] { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.exec button.ajuda[aria-pressed="true"] { background: var(--crit-bg); color: var(--crit); border-color: var(--crit); }
.escala { display: grid; grid-template-columns: repeat(11, 1fr); gap: .25rem; }
.escala button { min-height: 2.75rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; text-align: center; }
.escala button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: transparent; }
@media (max-width: 480px) { .escala { grid-template-columns: repeat(6, 1fr); } .nota-l { grid-template-columns: 6.2rem 1fr 2.2rem 2.4rem; gap: .4rem; } .grande { font-size: 4rem; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; }
.tile { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); border-radius: 20px; padding: 1rem; display: grid; gap: .5rem; min-height: 6.5rem; align-content: start; font-weight: 700; }
.tile i { width: 2.8rem; height: 2.8rem; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.tile small { color: var(--muted); font-weight: 400; }
.reg { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--line); }
.reg:first-child { border-top: 0; } .reg > div { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.reg i { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.reg.warn i { background: var(--warn-bg); color: var(--warn); } .reg.crit i { background: var(--crit-bg); color: var(--crit); }
.reg small, .orig { color: var(--muted); font-size: .88rem; } .orig { font-style: italic; }
.semana { display: grid; gap: .5rem; }
.semana > div { display: grid; grid-template-columns: 5.2rem auto 1fr; gap: .6rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .5rem .7rem; }
.semana .horas { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.liga { width: 3.2rem; height: 1.9rem; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.liga::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.9rem - 6px); height: calc(1.9rem - 6px); border-radius: 50%; background: var(--surface); transition: transform .15s; }
.liga[aria-pressed="true"] { background: var(--brand); } .liga[aria-pressed="true"]::after { transform: translateX(1.3rem); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* formulários e folhas */
.campo { display: grid; gap: .3rem; } .campo label, .campo > span { font-weight: 700; font-size: .92rem; }
.campo input, .campo select, .campo textarea, select.s { width: 100%; min-height: 3rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: .6rem .8rem; }
select.s { width: auto; }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.marca-op { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-weight: 700; } .marca-op input { width: 1.4rem; height: 1.4rem; min-height: 0; accent-color: var(--brand); }
dialog { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(100%, 36rem); max-width: 100%; max-height: 92dvh; margin: auto auto 0; overflow: auto; }
dialog::backdrop { background: rgba(6, 14, 13, .55); }
@media (min-width: 700px) { dialog { margin: auto; } }
.folha { padding: 1.2rem; display: grid; gap: 1rem; }
.folha-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.opcoes button { min-height: 4rem; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; padding: .5rem .8rem; text-align: center; }
.opcoes button.warn { border-color: var(--warn); color: var(--warn); } .opcoes button.crit { border-color: var(--crit); color: var(--crit); }
.opcoes button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.mic-grande { width: 7rem; height: 7rem; border-radius: 50%; background: var(--voice); color: var(--on-voice); display: grid; place-items: center; margin: 0 auto; box-shadow: 0 0 0 .7rem var(--voice-soft); }
.mic-grande.ouvir { animation: pulsa 1.4s ease-in-out infinite; }
@keyframes pulsa { 50% { box-shadow: 0 0 0 1.4rem var(--voice-soft); } }
.ao-vivo, .ouvi, .texto-ia { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: .8rem; min-height: 3rem; }
.ouvi { font-style: italic; color: var(--muted); } .parcial { color: var(--muted); } .texto-ia { white-space: pre-wrap; }
.exemplos { display: grid; gap: .4rem; } .exemplos button { text-align: left; padding: .7rem .9rem; border-radius: 14px; background: var(--voice-soft); color: var(--voice); font-weight: 700; min-height: 2.75rem; }
.proposta { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 18px; padding: .8rem; }
.proposta > div { flex: 1; min-width: 0; display: grid; gap: .4rem; } .proposta.warn { border-color: var(--warn); } .proposta.crit { border-color: var(--crit); }
.proposta select, .proposta input { min-height: 2.75rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 .5rem; width: 100%; }
.gira { width: 3rem; height: 3rem; border-radius: 50%; border: .35rem solid var(--voice-soft); border-top-color: var(--voice); margin: 1rem auto; animation: roda 1s linear infinite; }
@keyframes roda { to { transform: rotate(360deg); } }
.nota-pe { font-size: .86rem; color: var(--muted); }
#aviso { position: fixed; z-index: 30; left: 50%; bottom: 6.6rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 16px; padding: .7rem 1rem; display: flex; gap: .8rem; align-items: center; max-width: calc(100% - 2rem); transition: opacity .15s, transform .15s; font-weight: 700; }
#aviso.on { opacity: 1; transform: translate(-50%, 0); } #aviso.on button { pointer-events: auto; } #aviso button { color: var(--mint); font-weight: 700; min-height: 2.5rem; padding: 0 .4rem; }

/* cartão de evolução, sempre escuro */
.carta-fundo { background: #0D1211; color: #F2F7F5; padding: 1.2rem; display: grid; gap: 1rem; }
.carta-fundo .redondo { background: #232B29; border-color: #313B38; color: #F2F7F5; }
.carta-fundo .rotulo { color: #A9BDB7; }
.carta { border-radius: 26px; overflow: hidden; background: #171D1C; border: 1px solid #2B3432; max-width: 24rem; margin: 0 auto; width: 100%; }
.carta-cima { position: relative; padding: 1rem 1.1rem 1.3rem; min-height: 15rem; background: linear-gradient(135deg, #25403A 0%, #5E7F77 48%, #1E2A28 100%); display: grid; }
.carta-cima::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 22px 22px; }
.carta-cima > * { position: relative; }
.carta-topo { display: flex; justify-content: space-between; align-items: flex-start; }
.etapa { display: inline-flex; align-items: center; gap: .5rem; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 999px; padding: .25rem .8rem .25rem .3rem; font-weight: 700; letter-spacing: .14em; font-size: .78rem; text-transform: uppercase; }
.etapa b { width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #F2F7F5; color: #171D1C; display: grid; place-items: center; letter-spacing: 0; }
.carta-evo { border-radius: 999px; padding: .25rem .7rem; font-weight: 700; border: 1.5px solid currentColor; font-size: .9rem; }
.carta-evo.sobe { color: #6FE3BF; } .carta-evo.desce { color: #FF9B7A; }
.anel { width: 10.5rem; height: 10.5rem; justify-self: end; position: relative; margin-top: .3rem; }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 5; } .anel .f { stroke: rgba(255, 255, 255, .2); } .anel .v { stroke: #F2F7F5; stroke-linecap: round; }
.anel span { position: absolute; inset: .8rem; border-radius: 50%; background: #121817; display: grid; place-items: center; font-family: var(--titulo); font-size: 2.6rem; font-weight: 700; letter-spacing: .04em; }
.carta-num { position: absolute; left: 1.1rem; bottom: 1.1rem; font-family: var(--titulo); font-size: 4.4rem; font-weight: 600; line-height: 1; }
.carta-baixo { padding: 1.1rem; display: grid; gap: .9rem; }
.carta-nome { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-family: var(--titulo); letter-spacing: .08em; text-transform: uppercase; }
.carta-nome b { font-size: 1.2rem; font-weight: 500; } .carta-nome span, .carta-pe { font-size: .72rem; color: #A9BDB7; letter-spacing: .2em; }
.carta-attrs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem .9rem; }
.carta-attrs div { display: grid; grid-template-columns: auto 1fr; gap: .15rem .3rem; align-items: baseline; }
.carta-attrs small { color: #A9BDB7; letter-spacing: .14em; font-size: .72rem; font-weight: 700; }
.carta-attrs b { text-align: right; font-family: var(--titulo); font-weight: 500; font-size: 1.15rem; white-space: nowrap; }
.carta-attrs em { font-style: normal; font-size: .72rem; margin-left: .2rem; } .carta-attrs em.sobe { color: #6FE3BF; } .carta-attrs em.desce { color: #FF9B7A; }
.carta-attrs i { grid-column: 1 / 3; height: 3px; border-radius: 3px; background: #2B3432; overflow: hidden; display: block; } .carta-attrs i u { display: block; height: 100%; background: #C9D6D2; }
.carta-pe { display: flex; justify-content: space-between; border-top: 1px solid #2B3432; padding-top: .7rem; }
.carta-acoes { display: flex; gap: .6rem; flex-wrap: wrap; max-width: 24rem; margin: 0 auto; width: 100%; }
.carta-acoes .btn { background: #171D1C; border-color: #313B38; color: #F2F7F5; flex: 1; }

/* painel do backoffice */
.colunas { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; align-items: end; height: 8rem; }
.colunas div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .25rem; height: 100%; font-size: .82rem; color: var(--muted); font-weight: 700; }
.colunas i { display: block; width: 100%; border-radius: 10px 10px 4px 4px; background: var(--brand-soft); min-height: 4px; }
.colunas .hoje i { background: var(--brand); } .colunas .hoje { color: var(--ink); } .colunas b { font-family: var(--titulo); color: var(--ink); }
.afazer { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .7rem 0; border-top: 1px solid var(--line); min-height: 3.4rem; }
.afazer:first-of-type { border-top: 0; } .afazer b { font-family: var(--titulo); font-size: 1.5rem; min-width: 2.4rem; text-align: center; } .afazer span { flex: 1; }
.afazer i { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 12px; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; }

/* portal da família */
.conversa { display: grid; gap: .5rem; }
.msg { justify-self: start; max-width: 85%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: .6rem .8rem; display: grid; gap: .15rem; }
.msg.minha { justify-self: end; background: var(--brand-soft); border-color: transparent; border-radius: 18px 18px 6px 18px; }
.msg small { color: var(--muted); font-size: .8rem; }
@media (max-width: 560px) { .espaco button[aria-pressed="false"] span { display: none; } .espaco button { padding: 0 .7rem; } }

.matriz { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .88rem; }
.matriz th, .matriz td { border-bottom: 1px solid var(--line); padding: .5rem .4rem; text-align: center; vertical-align: middle; }
.matriz thead th { font-size: .74rem; color: var(--muted); font-weight: 700; vertical-align: bottom; }
.matriz tbody th, .matriz thead th:first-child { text-align: left; } .matriz tbody th small { display: block; font-weight: 400; color: var(--muted); }
.matriz td .ic { color: var(--brand); }
.pagina > *, .cartao > *, .duas > * { min-width: 0; }
.stat b { white-space: nowrap; font-size: 1.5rem; }

/* calendário por semana e por mês */
.sem-grade { display: grid; gap: .6rem; }
.sem-dia { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .5rem; display: grid; gap: .35rem; align-content: start; min-width: 0; box-shadow: var(--sombra); }
.sem-dia.hoje { border-color: var(--brand); }
.sem-cab { display: flex; justify-content: space-between; align-items: center; min-height: 2.75rem; padding: 0 .4rem; font-weight: 700; color: var(--muted); border-radius: 12px; }
.sem-cab b { font-family: var(--titulo); font-size: 1.2rem; color: var(--ink); } .sem-dia.hoje .sem-cab b { color: var(--brand); }
.sem-cab small { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 0 .5rem; font-weight: 700; }
.mini-m { display: flex; gap: .5rem; align-items: baseline; width: 100%; min-height: 2.75rem; padding: .35rem .5rem; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--line); font-size: .9rem; }
.mini-m span { min-width: 0; overflow-wrap: break-word; } .mini-m.info { border-left-color: var(--brand); } .mini-m.ok { border-left-color: var(--ok); } .mini-m.warn { border-left-color: var(--warn); } .mini-m.crit { border-left-color: var(--crit); }
@media (min-width: 900px) { .sem-grade { grid-template-columns: repeat(7, 1fr); } .mini-m { display: grid; gap: 0; } }
.mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.mes small { text-align: center; color: var(--muted); font-weight: 700; font-size: .78rem; padding: .2rem 0; }
.cel { min-height: 3.6rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; justify-items: center; align-content: center; gap: .15rem; padding: .25rem; }
.cel b { font-family: var(--titulo); font-weight: 600; } .cel.fora { opacity: .45; } .cel.hoje { border-color: var(--brand); border-width: 2px; }
.cel span { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 0 .45rem; font-size: .78rem; font-weight: 700; }
.cel[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: transparent; } .cel[aria-pressed="true"] span { background: var(--on-brand); }
@media (min-width: 900px) { .cel { min-height: 5.4rem; } }

/* entrada */
body.fora .nav { display: none; } body.fora main { padding-bottom: 2rem; }
@media (min-width: 900px) { body.fora .app { grid-template-columns: 1fr; } body.fora .topo { grid-column: 1; } }
.topo > .chip { min-height: 2.4rem; }
.proposta > div.lado { flex: none; align-content: start; }
.volta { justify-self: start; min-height: 2.9rem; padding: 0 1.1rem 0 .7rem; position: sticky; top: 4.3rem; z-index: 4; color: var(--brand); }
.comdot { position: relative; display: inline-grid; }
.dot { position: absolute; top: -3px; right: -5px; width: .72rem; height: .72rem; border-radius: 50%; background: #E5342B; border: 2px solid var(--surface); }
@media (max-width: 560px) { .topo { gap: .4rem; padding-left: .8rem; padding-right: .8rem; } }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.conta { display: inline-grid; place-items: center; min-width: 1.65rem; height: 1.65rem; padding: 0 .3rem; border: 1.5px solid currentColor; border-radius: 999px; font-size: .84rem; line-height: 1; }
.mini > button, .hero-b, button.stat { text-align: left; cursor: pointer; }
.hero-b { display: flex; align-items: flex-end; gap: .8rem; width: 100%; border-radius: 16px; } .hero-b .muted { padding-bottom: .6rem; flex: 1; } .hero-b .ic { margin-bottom: .7rem; opacity: .8; }
.hero button:active, button.stat:active { transform: scale(.98); }
.marca-op input { flex: none; }

/* acessibilidade: saltar blocos, foco nunca tapado, posição do botão de voz */
.salta { position: absolute; left: .5rem; top: -4rem; z-index: 40; background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; font-weight: 700; }
.salta:focus { top: .5rem; }
html { scroll-padding-top: 5.5rem; scroll-padding-bottom: 8rem; }
@media (max-width: 899px) {
  :root[data-falar="direita"] .nav, :root[data-falar="esquerda"] .nav { grid-template-columns: repeat(4, 1fr); }
  :root[data-falar="direita"] .fab, :root[data-falar="esquerda"] .fab { position: fixed; bottom: calc(5rem + env(safe-area-inset-bottom)); right: 1rem; margin: 0; z-index: 7; }
  :root[data-falar="esquerda"] .fab { right: auto; left: 1rem; }
  :root[data-falar="direita"] main, :root[data-falar="esquerda"] main { padding-bottom: 11.5rem; }
  :root[data-falar="direita"] #aviso, :root[data-falar="esquerda"] #aviso { bottom: 10.5rem; }
  :root[data-falar="direita"], :root[data-falar="esquerda"] { scroll-padding-bottom: 11rem; }
}

/* uso em telemóvel: nada cortado, alvos de toque com 44 px, cabeçalho que cabe */
.topo { padding-top: max(.7rem, env(safe-area-inset-top)); }
.espaco button, .marca, select.s, button.chip { min-height: 2.75rem; }
button.chip { padding-left: .9rem; padding-right: .9rem; }
.liga { overflow: visible; } .liga::before { content: ""; position: absolute; inset: -.55rem -.2rem; }
@media (max-width: 560px) {
  .seg { flex-wrap: wrap; overflow: visible; } .seg button { flex: 1 1 auto; padding: 0 .85rem; }
  .cab h1 { font-size: 1.5rem; overflow-wrap: anywhere; }
}
@media (max-width: 420px) { .topo > .chip { display: none; } main { padding-left: .8rem; padding-right: .8rem; } .cartao, .hero { padding: 1rem; } }
.espaco button { min-width: 2.75rem; justify-content: center; }
@media (max-width: 350px) { .marca { font-size: 0; gap: 0; } .topo { gap: .3rem; } }

/* histórico e evolução */
.hgrade { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .8rem; }
.hm { gap: .5rem; } .hm.melhora { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); } .hm.piora { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.hm h3 { display: flex; align-items: center; gap: .35rem; } .hval { font-family: var(--titulo); font-size: 1.7rem; line-height: 1.1; }
.hsvg { width: 100%; height: 2.8rem; overflow: visible; } .hsvg polyline { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.avatar { overflow: hidden; } .avatar img, .anel span img { width: 100%; height: 100%; object-fit: cover; display: block; } .anel span { overflow: hidden; }
label.btn:focus-within { outline: 3px solid var(--voice); outline-offset: 2px; }

/* revisão do registo por voz: correções discretas, guardar em destaque */
.corrige { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.corrige > span { font-weight: 700; font-size: .9rem; color: var(--muted); margin-right: .1rem; }
.corrige button { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: 0 .95rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--brand); font-weight: 700; font-size: .92rem; white-space: nowrap; }
@media (max-width: 560px) { .corrige { display: grid; grid-template-columns: repeat(3, 1fr); } .corrige > span { grid-column: 1 / -1; } .corrige button { justify-content: center; padding: 0 .4rem; font-size: .86rem; } }

/* ============ Hipótese A, Sereno, aplicada a toda a aplicação ============ */
:root {
  --bg: #F6F8F7; --surface: #FFFFFF; --surface-2: #F1F4F3; --ink: #14231F; --muted: #5A6B66; --line: #E3E9E6; --trilho: #E9EEEC;
  --brand: #0B6E5F; --on-brand: #FFFFFF; --brand-soft: #E3F2EE; --voice: #4B3BC4; --on-voice: #FFFFFF; --voice-soft: #ECEAFB;
  --ok: #1A6B3A; --ok-bg: #E1F3E6; --warn: #7A4E00; --warn-bg: #FFF1D6; --crit: #A3261E; --crit-bg: #FCE4E1;
  --hero: #FFFFFF; --hero-2: #F1F4F3; --on-hero: #14231F; --hero-muted: #5A6B66; --mint: #0B6E5F; --down: #A3261E;
  --sombra: 0 1px 2px rgba(20, 35, 31, .05); --r: 16px; --r-s: 12px; --titulo: "Figtree", "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0F1614; --surface: #18211F; --surface-2: #202B28; --ink: #EDF3F1; --muted: #A7B5B0; --line: #2A3633; --trilho: #0A100F;
  --brand: #4FD1B0; --on-brand: #06211C; --brand-soft: #17362F; --voice: #A996FF; --on-voice: #150B3D; --voice-soft: #261F4A;
  --ok: #7EDB9B; --ok-bg: #12301C; --warn: #F2C867; --warn-bg: #3A2C08; --crit: #FF9A8F; --crit-bg: #431512;
  --hero: #18211F; --hero-2: #202B28; --on-hero: #EDF3F1; --hero-muted: #A7B5B0; --mint: #4FD1B0; --down: #FF9A8F; --sombra: 0 1px 2px rgba(0, 0, 0, .3); } }
:root[data-theme="dark"] {
  --bg: #0F1614; --surface: #18211F; --surface-2: #202B28; --ink: #EDF3F1; --muted: #A7B5B0; --line: #2A3633; --trilho: #0A100F;
  --brand: #4FD1B0; --on-brand: #06211C; --brand-soft: #17362F; --voice: #A996FF; --on-voice: #150B3D; --voice-soft: #261F4A;
  --ok: #7EDB9B; --ok-bg: #12301C; --warn: #F2C867; --warn-bg: #3A2C08; --crit: #FF9A8F; --crit-bg: #431512;
  --hero: #18211F; --hero-2: #202B28; --on-hero: #EDF3F1; --hero-muted: #A7B5B0; --mint: #4FD1B0; --down: #FF9A8F; --sombra: 0 1px 2px rgba(0, 0, 0, .3); }
:root[data-contraste="alto"] { --trilho: #FFFFFF; --hero-muted: #1F2B28; --mint: #055A4E; }
:root[data-contraste="alto"] .cartao, :root[data-contraste="alto"] .linha, :root[data-contraste="alto"] .btn, :root[data-contraste="alto"] .seg, :root[data-contraste="alto"] .redondo, :root[data-contraste="alto"] .stat, :root[data-contraste="alto"] .tile, :root[data-contraste="alto"] .kpis button, :root[data-contraste="alto"] input, :root[data-contraste="alto"] select, :root[data-contraste="alto"] textarea { border: 2px solid var(--ink); }
h1 { font-size: 1.6rem; letter-spacing: -.02em; } h2 { font-size: 1.1rem; }
.topo { background: color-mix(in srgb, var(--bg) 94%, transparent); }
.marca i { border-radius: 10px; width: 2.25rem; height: 2.25rem; }
.redondo { border-radius: 12px; box-shadow: none; }
.cartao, .stat, .tile, .ex, .sem-dia { border-radius: 16px; box-shadow: var(--sombra); }
.linha { border-radius: 14px; box-shadow: none; } .avatar { border-radius: 12px; }
.btn { border-radius: 12px; min-height: 3rem; } .btn.cheio { min-height: 3.4rem; border-radius: 14px; }
.chip { border-color: transparent; font-size: .82rem; background: var(--surface-2); color: var(--muted); }
.chip.ok, .chip.warn, .chip.crit, .chip.info, .chip.voz { border-color: transparent; }
.busca, .campo input, .campo select, .campo textarea { border-radius: 12px; }
.hero { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--sombra); } .hero::after { display: none; }
.hero .pilula { color: var(--ink); } .mini > * { border: 1px solid var(--line); border-radius: 12px; } .grande { font-size: 3.4rem; }
.meses i { background: var(--trilho); } .meses .atual { color: var(--ink); }
.seg, .espaco { background: var(--trilho); border: 0; border-radius: 12px; padding: 4px; }
.seg button, .espaco button { border-radius: 9px; color: var(--muted); }
.seg button[aria-pressed="true"], .espaco button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 35, 31, .12); }
.seg button[aria-pressed="true"] .conta { border-color: var(--brand); color: var(--brand); }
@media (max-width: 560px) { .seg { border-radius: 12px; } }
.seg.abas { background: none; padding: 0; border-radius: 0; border-bottom: 1px solid var(--line); gap: 1.3rem; flex-wrap: nowrap; overflow-x: auto; }
.seg.abas button { flex: none; padding: .6rem 0; border-radius: 0; border-bottom: 3px solid transparent; box-shadow: none; background: none; }
.seg.abas button[aria-pressed="true"] { border-bottom-color: var(--brand); color: var(--ink); background: none; box-shadow: none; }
.nav { border-radius: 0; box-shadow: none; } .fab { width: 3.9rem; height: 3.9rem; }
@media (min-width: 900px) { .fab { width: 100%; height: 3.4rem; border-radius: 14px; } .nav a[aria-current="page"] { border-radius: 12px; } }
.cat i { border-radius: 18px; width: 3.8rem; height: 3.8rem; } .cat.falta i { border: 2px dashed #D9A441; } .cat small { font-weight: 400; font-size: .74rem; color: var(--muted); min-height: 1rem; }
.dia { border-radius: 14px; } .vaga, .cel { border-radius: 12px; } .opcoes button { border-radius: 14px; } dialog { border-radius: 20px 20px 0 0; } @media (min-width: 700px) { dialog { border-radius: 20px; } }
.volta { border-radius: 12px; box-shadow: var(--sombra); border: 1px solid var(--line); }
/* cartão do turno e passagem rápida entre utentes */
.turno { gap: .9rem; } .turno-topo { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; border-radius: 12px; }
.turno-topo > span { flex: 1; display: grid; gap: .15rem; } .turno-topo strong { font-family: var(--titulo); font-weight: 600; font-size: 1.08rem; line-height: 1.25; }
.anel-t { width: 4.5rem; height: 4.5rem; flex: none; } .anel-t circle { fill: none; stroke-width: 8; } .anel-t .f { stroke: var(--brand-soft); } .anel-t .v { stroke: var(--brand); stroke-linecap: round; }
.anel-t text { font-family: var(--titulo); font-weight: 700; font-size: 20px; fill: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.kpis button { text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem; min-height: 3.75rem; display: grid; gap: .05rem; align-content: center; }
.kpis b { font-family: var(--titulo); font-size: 1.3rem; line-height: 1.1; } .kpis span { font-size: .84rem; color: var(--muted); }
.kpis .warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); } .kpis .warn span { color: var(--warn); }
.viz { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.viz button { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.75rem; padding: 0 .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--brand); }
.viz span { color: var(--muted); font-size: .9rem; font-weight: 700; }
.seg.abas button { min-width: 2.75rem; }
.avatar { font-size: .95rem; letter-spacing: .02em; }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(4, 1fr); gap: .6rem .3rem; } .cat { font-size: .8rem; padding: .3rem 0; } .cat i { width: 3.6rem; height: 3.6rem; } }

/* listas para escala: várias colunas, grupos e filtros compactos */
.duasc { grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); align-items: start; }
@media (max-width: 420px) { .duasc { grid-template-columns: 1fr; } }
.grupo { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; margin-top: .5rem; } h3.grupo { font-size: .95rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
select.s { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 2.9rem; padding: 0 .7rem; font-weight: 700; }

/* estado dos objetivos do plano: ícone e cor próprios, em tons suaves */
.avatar.e-voz, .reg i.e-voz { background: var(--voice-soft); color: var(--voice); } .avatar.e-ok, .reg i.e-ok { background: var(--ok-bg); color: var(--ok); } .avatar.e-warn, .reg i.e-warn { background: var(--warn-bg); color: var(--warn); }
.linha.e-voz { border-color: color-mix(in srgb, var(--voice) 22%, var(--line)); background: color-mix(in srgb, var(--voice-soft) 28%, var(--surface)); }
.linha.e-ok { border-color: color-mix(in srgb, var(--ok) 28%, var(--line)); background: color-mix(in srgb, var(--ok-bg) 35%, var(--surface)); }
.linha.e-warn { border-color: color-mix(in srgb, var(--warn) 28%, var(--line)); background: color-mix(in srgb, var(--warn-bg) 35%, var(--surface)); } .linha.e-warn strong { color: var(--muted); }
.kpis .ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 28%, transparent); color: var(--ok); } .kpis .ok span { color: var(--ok); }
.kpis .crit { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 28%, transparent); color: var(--crit); } .kpis .crit span { color: var(--crit); }
.kpis button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.tile i.dot { position: absolute; top: -4px; right: -6px; width: .78rem; height: .78rem; border-radius: 50%; background: #E5342B; border: 2px solid var(--surface); display: block; }
.filtro-on { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
/* fotografia: reposicionar e cortar, moldura quadrada de cantos arredondados */
.cab > .avatar:has(img) { width: 3.75rem; height: 3.75rem; border-radius: 14px; }
.corte-ed { display: grid; gap: .8rem; justify-items: center; }
.corte { position: relative; width: min(100%, 17rem); aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #101614; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.corte:active { cursor: grabbing; } .corte:focus-visible { outline: 3px solid var(--voice); outline-offset: 3px; }
.corte img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.corte-mira { position: absolute; inset: 0; border-radius: 24%; box-shadow: 0 0 0 99rem rgba(10, 16, 14, .6), inset 0 0 0 2px #fff; pointer-events: none; }
.corte-ed .campo { width: 100%; } .campo input[type="range"] { padding: 0; border: 0; background: none; min-height: 2.75rem; accent-color: var(--brand); }
.apagar { display: grid; gap: .7rem; padding: 1rem; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--crit) 35%, transparent); background: var(--crit-bg); } .apagar[hidden] { display: none; }
.apagar strong, .apagar p { color: var(--crit); } .apagar .nota-pe { color: var(--ink); } .apagar .campo input { background: var(--surface); }
#fp-apagar-sim { background: var(--crit); color: #fff; border-color: var(--crit); } #fp-apagar-sim:disabled { opacity: .45; cursor: not-allowed; }
.evolu { gap: .45rem; padding: .7rem .9rem; }
.evolu-l { display: grid; grid-template-columns: 3.1rem repeat(3, minmax(0, 1fr)); gap: .4rem; align-items: stretch; }
.evolu-e { display: grid; justify-items: center; align-content: center; gap: .1rem; } .evolu-e strong { font-family: var(--titulo); font-size: .72rem; line-height: 1.1; white-space: nowrap; }
.evolu-i { width: 1.75rem; height: 1.75rem; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); } .evolu-i.fisio { background: var(--voice-soft); color: var(--voice); }
.evolu-l button { display: grid; justify-items: center; align-content: center; gap: 0; min-height: 2.9rem; padding: .2rem .25rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); line-height: 1.15; }
.evolu-l button b { font-family: var(--titulo); font-size: 1.05rem; } .evolu-l button span { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.evolu-l .ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 28%, transparent); color: var(--ok); } .evolu-l .crit { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 28%, transparent); color: var(--crit); } .evolu-l .ok span, .evolu-l .crit span { color: inherit; }
:root[data-contraste="alto"] .evolu-l button { border: 2px solid var(--ink); }
@media (min-width: 560px) { .evolu-l { grid-template-columns: 7rem repeat(3, minmax(0, 1fr)); gap: .5rem; } .evolu-e { display: flex; align-items: center; justify-content: flex-start; gap: .5rem; } .evolu-e strong { font-size: .95rem; }
  .evolu-l button { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; } .evolu-l button span { font-size: .88rem; } }
@media (max-width: 360px) { .evolu-l { grid-template-columns: 2.9rem repeat(3, minmax(0, 1fr)); gap: .3rem; } .evolu-l button span { font-size: .69rem; } }
.anel-t text.p { font-size: 10px; font-weight: 700; fill: var(--muted); font-family: var(--corpo); }
@media (min-width: 900px) { .nav { position: sticky; top: 0; align-self: start; height: 100dvh; overflow-y: auto; } }
.sem-h { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.sem-h button { position: relative; display: grid; justify-items: center; align-content: center; min-height: 3.2rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); line-height: 1.15; }
.sem-h small { font-size: .72rem; color: var(--muted); } .sem-h b { font-family: var(--titulo); font-size: 1.05rem; }
.sem-h button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); } .sem-h button[aria-pressed="true"] small { color: inherit; }
.sem-h .pt { position: absolute; top: .3rem; right: .35rem; width: .5rem; height: .5rem; border-radius: 50%; background: #D9822B; }
.viz button:disabled { opacity: .4; }
.duasc { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); } @media (max-width: 640px) { .duasc { grid-template-columns: 1fr; } }
.eq-l { display: flex; align-items: flex-start; gap: .45rem; color: var(--muted); font-size: .92rem; margin: 0; } .eq-l .ic { margin-top: .15rem; }
.eq-ops { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0 .8rem; } .eq-ops .marca-op { font-weight: 400; align-items: center; } .eq-ops .marca-op span { display: grid; line-height: 1.2; } .eq-ops small { color: var(--muted); font-size: .8rem; }
.chip-b { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; } .chip-b b { font-weight: 400; color: var(--muted); }
.chip-b[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); } .chip-b[aria-pressed="true"] b { color: inherit; }
/* revisão de alinhamentos e transbordos, incluindo campos de data no iPhone e no iPad */
input[type="date"], input[type="time"], input[type="month"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.par { align-items: end; } .par > *, .campo, .campo > *, .folha > *, .proposta > *, .acoes > *, .sec > *, .stats > *, .carta-baixo > *, .cab > div { min-width: 0; }
.campo input, .campo select, .campo textarea { max-width: 100%; }
.busca { min-width: 0; } .busca input { width: 100%; }
.stat, .tile, .linha strong, .reg strong, .cab h1, .folha h2 { overflow-wrap: anywhere; }
.carta-nome { flex-wrap: wrap; }
@media (max-width: 360px) {
  .cats { gap: .5rem .15rem; } .cat i { width: 3rem; height: 3rem; border-radius: 14px; } .cat { font-size: .74rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .corrige { grid-template-columns: 1fr 1fr; } .corrige button { min-width: 0; } .corrige button:last-child { grid-column: 1 / -1; }
  .folha { padding: 1rem .9rem; }
}
.carta-attrs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .carta-attrs > div { min-width: 0; }
@media (max-width: 400px) { .carta-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat b.lg { font-size: 1.15rem; white-space: normal; line-height: 1.25; }
@media (max-width: 430px) { .corrige { grid-template-columns: 1fr 1fr; } .corrige button { min-width: 0; } .corrige button:last-child { grid-column: 1 / -1; } }
.mes { grid-template-columns: repeat(7, minmax(0, 1fr)); } .cel { min-width: 0; }
@media (max-width: 380px) { .mes { gap: .2rem; } .cel { padding: .2rem .1rem; } .cel span { padding: 0 .3rem; font-size: .72rem; } }
.campo input[type="range"] { margin: 0; }
/* motor de IA */
.nivel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); } .nivel:first-of-type { border-top: 0; }
.nivel > b { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-family: var(--titulo); }
.nivel strong { display: block; } .nivel span:not(.chip) { color: var(--muted); font-size: .9rem; }
.saida { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; font-size: .86rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0; max-height: 18rem; overflow-y: auto; }
.saida-l { border-top: 1px solid var(--line); padding: .35rem 0; } .saida-l summary { cursor: pointer; min-height: 2.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; } .saida-l .saida { margin-top: .4rem; }
@media (max-width: 520px) { .nivel { grid-template-columns: auto minmax(0, 1fr); } .nivel .chip { grid-column: 2; justify-self: start; } }
.seg button small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); line-height: 1.15; } .seg button[aria-pressed="true"] small { color: inherit; opacity: .8; }
.seg button:has(small) { flex-direction: column; gap: 0; line-height: 1.15; }
.turno-h { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto minmax(0, 1fr); gap: .5rem; align-items: center; margin-bottom: .4rem; } .turno-h span { color: var(--muted); }
input.pin { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-family: var(--titulo); }
/* entrada: utilizadores em cartões, duas colunas no telemóvel, três no tablet e quatro no computador */
.cartoes-u { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } @media (min-width: 700px) { .cartoes-u { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (min-width: 1100px) { .cartoes-u { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cartao-u { display: grid; justify-items: center; align-content: start; gap: .35rem; text-align: center; padding: 1rem .6rem; min-height: 8.2rem; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.cartao-u .avatar { width: 3.4rem; height: 3.4rem; font-size: 1.05rem; margin-bottom: .2rem; } .cartao-u strong { font-family: var(--titulo); line-height: 1.2; overflow-wrap: anywhere; } .cartao-u small { color: var(--muted); font-size: .85rem; line-height: 1.2; }
.cartao-u:hover { border-color: var(--brand); } :root[data-contraste="alto"] .cartao-u { border: 2px solid var(--ink); }
.muda-inst { justify-self: start; }

/* demonstração limitada */
.faixa-demo { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: 0 auto 1rem; max-width: 64rem; padding: .6rem .9rem; border-radius: var(--r, 14px); background: var(--warn-bg, #fff4d6); color: var(--ink); font-size: .9rem; line-height: 1.35; }
.faixa-demo span { flex: 1 1 14rem; min-width: 0; }
.faixa-demo a { font-weight: 700; color: inherit; white-space: nowrap; }
a.btn { text-decoration: none; } a.btn:not(.p) { color: var(--ink); }

/* fotografia ampliada ao tocar no retrato */
.avatar[data-zoom] { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.25rem; background: rgba(15, 25, 22, .62); opacity: 0; transition: opacity .2s ease; cursor: zoom-out; }
.zoom[hidden] { display: none; } .zoom.aberto { opacity: 1; }
.zoom figure { margin: 0; display: grid; gap: .9rem; justify-items: center; text-align: center; background: var(--surface, #fff); color: var(--ink); padding: 1.1rem 1.1rem 1.2rem; border-radius: 28px; width: min(22rem, 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); transform: scale(.92); transition: transform .25s cubic-bezier(.2, .7, .2, 1); cursor: default; }
.zoom.aberto figure { transform: none; } .zoom img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; display: block; }
.zoom figcaption { display: grid; gap: .15rem; } .zoom figcaption strong { font-size: 1.25rem; } .zoom figcaption span { color: var(--muted, #5b6b66); }
@media (prefers-reduced-motion: reduce) { .zoom, .zoom figure { transition: none; } }

/* a carregar: uma roda, sem texto. No arranque usa o fundo do site de apresentação, para a passagem não se notar */
@view-transition { navigation: auto; }
.roda { width: 3rem; height: 3rem; border-radius: 50%; border: 4px solid rgba(11, 110, 95, .18); border-top-color: var(--brand, #0B6E5F); animation: roda .8s linear infinite; }
@keyframes roda { to { transform: rotate(360deg); } }
.carga-ecra { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: linear-gradient(180deg, #F5F0E8 0%, #E8DFD0 100%); }
.carga { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(245, 240, 232, .55); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }
.carga[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .carga { background: rgba(17, 27, 25, .55); } }
@media (prefers-reduced-motion: reduce) { .roda { animation-duration: 2.4s; } }

/* cuidados: barras de cumprimento, mapa corporal, balanço hídrico e presenças */
.barra-c { height: .7rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; flex: 1; min-width: 0; } .barra-c i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .4s ease; }
.linha-c { display: flex; align-items: center; gap: .75rem; margin-top: .7rem; } .linha-c span { flex: none; width: 3.6rem; font-weight: 700; } .linha-c b { flex: none; width: 3rem; text-align: right; }
.mapas { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 26rem; margin-inline: auto; } .mapa { position: relative; aspect-ratio: 1 / 1.6; } .boneco { position: absolute; inset: 0; width: 100%; height: 100%; } .mapa-c .rotulo { text-align: center; }
.zona { position: absolute; width: 1.7rem; height: 1.7rem; margin: -.85rem 0 0 -.85rem; border-radius: 50%; border: 2px dashed var(--line); background: transparent; color: #fff; font: 700 .85rem/1 inherit; cursor: pointer; padding: 0; } .zona:hover, .zona:focus-visible { border-color: var(--brand); border-style: solid; } .zona.com { background: #C0392B; border: 2px solid #fff; box-shadow: 0 0 0 2px #C0392B; }
.foto-f { display: block; width: 100%; max-width: 20rem; border-radius: 14px; margin-top: .6rem; }
.dias-b { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; text-align: center; } .col-b { height: 4.5rem; border-radius: 10px; background: var(--surface-2); display: flex; align-items: flex-end; overflow: hidden; } .col-b i { display: block; width: 100%; background: var(--brand); } .col-b i.warn { background: #D9A441; } .col-b i.crit { background: #C0392B; } .dias-b small { color: var(--muted); }
.grelha-p { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; } .pres { display: grid; justify-items: center; gap: .25rem; padding: .8rem .5rem; border-radius: var(--r, 14px); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: center; min-width: 0; } .pres span { font-weight: 700; overflow-wrap: anywhere; } .pres small { color: var(--muted); }
.pres.e-ok { border-color: #2E8B57; background: color-mix(in srgb, #2E8B57 12%, var(--surface)); } .pres.e-voz { border-color: var(--brand); } .pres.e-warn { border-color: #D9A441; background: color-mix(in srgb, #D9A441 14%, var(--surface)); }
.zona { min-width: 0; min-height: 0; box-sizing: border-box; display: grid; place-items: center; }
.mapas { width: 100%; } .mapa-c { min-width: 0; } .mapa { width: 100%; }
.seg.abas { overflow-x: auto; scrollbar-width: none; } .seg.abas::-webkit-scrollbar { display: none; } .seg.abas button { flex: 0 0 auto; }

.semrede { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); z-index: 70; max-width: min(92vw, 30rem); padding: .6rem 1rem; border-radius: 999px; background: #7A4B00; color: #fff; font-weight: 700; font-size: .9rem; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); } .semrede[hidden] { display: none; }
.codigo-f { font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-align: center; padding: 1rem; border-radius: var(--r, 14px); background: var(--surface-2); user-select: all; }

/* segurança e conformidade */
.faixa-crit { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .8rem; } .faixa-crit.vazia { margin-bottom: .4rem; } .faixa-crit button.chip { cursor: pointer; border: 1px dashed var(--line); background: transparent; font: inherit; font-weight: 700; color: var(--muted); }
.alerta-c { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; border: 1px solid var(--line); } .alerta-c > div { flex: 1; min-width: 0; display: grid; gap: .15rem; } .alerta-c > i { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--surface-2); }
.alerta-c.crit { border-color: #C0392B; } .alerta-c.crit > i { background: #C0392B; color: #fff; } .alerta-c.warn { border-color: #D9A441; } .alerta-c.warn > i { background: #D9A441; color: #fff; }
.tabela-r { overflow-x: auto; } .tabela-r table { width: 100%; border-collapse: collapse; font-size: .95rem; } .tabela-r th, .tabela-r td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; } .tabela-r .num { text-align: right; font-variant-numeric: tabular-nums; } .ficha-t th { width: 34%; color: var(--muted); font-weight: 700; }
.mes-f { align-self: center; padding-inline: .5rem; } .dossie h2 { margin-top: 1.4rem; font-size: 1.1rem; }
@media print { #topo, #nav, .sem-imp, .volta, .faixa-demo, #semrede, .fab, .falar-fixo { display: none !important; } body { background: #fff; } .dossie .cartao { border: 0; box-shadow: none; padding: 0; } #main { padding: 0; margin: 0; max-width: none; } }
/* botão de falar 30% mais pequeno */
.mic-grande { width: 4.9rem; height: 4.9rem; box-shadow: 0 0 0 .5rem var(--voice-soft); } .mic-grande .ic.xg { width: 1.85rem; height: 1.85rem; }

/* escala de serviço mensal */
.esc-c { padding-inline: .6rem; } .esc-g { overflow-x: auto; -webkit-overflow-scrolling: touch; } .esc-g table { border-collapse: separate; border-spacing: 0; font-size: .85rem; width: max-content; min-width: 100%; }
.esc-g th, .esc-g td { padding: .15rem; text-align: center; border-bottom: 1px solid var(--line); } .esc-g thead th { font-weight: 700; color: var(--muted); padding-bottom: .4rem; } .esc-g thead th small { display: block; font-size: .7rem; }
.esc-g th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding-right: .6rem; min-width: 8.5rem; max-width: 10rem; } .esc-g tbody th strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .esc-g tbody th small, .esc-g tfoot th small { color: var(--muted); font-weight: 400; }
.esc-g .fs { color: var(--brand); } .esc-g .hj { background: color-mix(in srgb, var(--brand) 9%, transparent); } .esc-g tr.eu th:first-child strong { color: var(--brand); } .esc-g .num { font-variant-numeric: tabular-nums; padding-inline: .4rem; } .esc-g .falta { color: #C0392B; font-weight: 700; }
.cel { display: inline-grid; place-items: center; width: 2rem; height: 2rem; min-width: 0; min-height: 0; padding: 0; border-radius: 8px; border: 1px solid transparent; font: 700 .8rem/1 inherit; background: var(--surface-2); color: var(--muted); } button.cel { cursor: pointer; }
.cel.c-M { background: #DDEFE9; color: #0B5346; } .cel.c-T { background: #FBE9C8; color: #7A4B00; } .cel.c-N { background: #DAD8F4; color: #2E2A78; } .cel.c-F { background: transparent; border-color: var(--line); } .cel.c-FE { background: #D6EAF8; color: #1B4F72; } .cel.c-B { background: #F5D5D0; color: #8E2B20; } .cel.c-x { background: transparent; }
.cel.mal { outline: 2px solid #C0392B; outline-offset: 1px; } .leg-e { margin-top: .9rem; align-items: center; } .leg-e .cel { width: 1.7rem; height: 1.7rem; }
@media print { .esc-g { overflow: visible; } .esc-g table { font-size: .6rem; } .cel { width: 1.2rem; height: 1.2rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .acoes, .nota-pe { display: none !important; } }

/* consumo diário dos modelos */
.usos { display: grid; gap: .9rem; margin-top: .9rem; } @media (min-width: 700px) { .usos { grid-template-columns: 1fr 1fr; } }
.uso-t { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-size: .92rem; } .uso-t b { font-family: var(--titulo); font-size: 1.05rem; }
.uso-b { height: .55rem; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: .3rem 0 .2rem; } .uso-b i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .4s ease; }
.uso-b i.quase { background: var(--warn); } .uso-b i.cheio { background: var(--crit); } .uso small { color: var(--muted); }
/* botões de ação dentro de uma linha ficam lado a lado, em colunas iguais */
.linha > div.acoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; }
.linha > div.acoes .btn { min-width: 0; padding-inline: .5rem; white-space: normal; }

/* ============ Afinação profissional: painel de entrada escuro, navegação em pílula e superfícies mais definidas, com contraste moderado ============ */
:root {
  --bg: #EFF3F0; --surface: #FFFFFF; --surface-2: #F3F6F4; --ink: #13241F; --muted: #566761; --line: #DCE5E0; --trilho: #E2E9E5;
  --brand: #0C6558; --brand-soft: #DDEEE8; --painel: #125E52; --painel-2: #0D4A41; --no-painel: #FFFFFF; --painel-suave: #CFE5DE;
  --sombra: 0 1px 2px rgba(18, 40, 34, .05), 0 8px 22px rgba(18, 40, 34, .05); --r: 18px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --painel: #1C2E2A; --painel-2: #16241F; --no-painel: #EDF3F1; --painel-suave: #A7B5B0; } }
:root[data-theme="dark"] { --painel: #1C2E2A; --painel-2: #16241F; --no-painel: #EDF3F1; --painel-suave: #A7B5B0; }
:root[data-contraste="alto"] { --painel: #063F37; --painel-2: #063F37; --painel-suave: #FFFFFF; }
h1, h2, .cab h1 { letter-spacing: -.012em; }
.cartao, .stat, .tile, .linha, .cartao-u { border-color: var(--line); }
.cartao, .stat, .tile { border-radius: 18px; }
.btn { border-radius: 999px; padding-inline: 1.25rem; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:not(.p):not(.v):not(.s):not(.m):hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.btn.p { background: var(--painel); } .btn.p:hover { background: var(--painel-2); }
.btn.cheio { border-radius: 999px; }
.seg, .espaco { border-radius: 999px; } .seg button, .espaco button { border-radius: 999px; }
.seg.abas { border-radius: 0; } .seg.abas button { border-radius: 0; }
.tile i { border-radius: 50%; }
.chip { padding: .22rem .7rem; }
/* painel de entrada */
.painel-h { background: linear-gradient(135deg, var(--painel) 0%, var(--painel-2) 100%); color: var(--no-painel); border-radius: 24px; padding: 1.4rem; display: grid; gap: 1.2rem; box-shadow: 0 10px 28px rgba(13, 74, 65, .18); position: relative; overflow: hidden; }
.painel-h::after { content: ""; position: absolute; right: -5rem; bottom: -7rem; width: 18rem; height: 18rem; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .09), transparent 68%); pointer-events: none; }
.painel-h > * { position: relative; z-index: 1; }
.ph-txt { display: grid; gap: .55rem; align-content: center; min-width: 0; }
.ph-rot { margin: 0; font-size: .92rem; color: var(--painel-suave); }
.painel-h h1 { margin: 0; font-family: var(--titulo); font-weight: 600; font-size: clamp(1.45rem, 4.6vw, 1.95rem); line-height: 1.15; color: var(--no-painel); }
.ph-sub { margin: 0; color: var(--painel-suave); }
.ph-acoes { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .35rem; }
.ph-btn { min-height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; font-weight: 700; background: #DDF1EA; color: #0D4A41; border: 1px solid transparent; }
.ph-btn.linha-b { background: transparent; color: var(--no-painel); border-color: rgba(255, 255, 255, .55); }
.ph-btn:hover { filter: brightness(1.04); }
.ph-nums { display: grid; gap: .45rem; align-content: center; }
.ph-nums button { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; font-weight: 700; text-align: left; background: rgba(255, 255, 255, .14); color: var(--no-painel); border: 1px solid rgba(255, 255, 255, .16); }
.ph-nums button b { font-family: var(--titulo); font-size: 1.25rem; }
.ph-nums button:nth-child(2) { background: rgba(255, 255, 255, .2); }
.ph-nums button.alerta { background: #FFFFFF; color: var(--crit); border-color: transparent; }
.ph-nums button:hover { background: rgba(255, 255, 255, .26); } .ph-nums button.alerta:hover { background: #FFF6F5; }
@media (min-width: 760px) { .painel-h { grid-template-columns: 1.5fr 1fr; padding: 1.9rem 2rem; gap: 2rem; } .ph-nums button:nth-child(2) { margin-left: 1rem; } .ph-nums button:nth-child(3) { margin-left: 2rem; } .ph-nums button:nth-child(4) { margin-left: 3rem; background: transparent; border-color: rgba(255, 255, 255, .4); } }
:root[data-theme="dark"] .ph-btn:not(.linha-b) { background: #4FD1B0; color: #06211C; } :root[data-theme="dark"] .ph-nums button.alerta { background: #431512; color: #FF9A8F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph-btn:not(.linha-b) { background: #4FD1B0; color: #06211C; } :root:not([data-theme="light"]) .ph-nums button.alerta { background: #431512; color: #FF9A8F; } }
/* o painel da clínica usa os mesmos tons */
.hero.painel-h.bloco { display: grid; grid-template-columns: 1fr; --hero-2: rgba(255, 255, 255, .16); --on-hero: var(--no-painel); --hero-muted: var(--painel-suave); border: 0; }
.hero.painel-h .rotulo, .hero.painel-h .muted { color: var(--painel-suave); } .hero.painel-h .pilula { color: var(--no-painel); background: rgba(255, 255, 255, .16); } .hero.painel-h .hero-b { color: var(--no-painel); }
.hero.painel-h .mini > * { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .16); color: var(--no-painel); }
/* navegação */
.nav a { border-radius: 999px; }
@media (min-width: 900px) {
  .nav { margin: .6rem 0 .6rem .6rem; height: calc(100dvh - 1.2rem); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sombra); padding: 1rem .8rem; top: .6rem; }
  .nav a { padding: .7rem 1rem; }
  .nav a[aria-current="page"] { background: var(--painel); color: var(--no-painel); border-radius: 999px; box-shadow: 0 4px 12px rgba(13, 74, 65, .2); }
  .nav a[aria-current="page"] .ic { stroke: currentColor; }
  .fab { border-radius: 999px; }
}
@media (max-width: 899px) { .nav a[aria-current="page"] { color: var(--painel); } .nav a[aria-current="page"] > .ic, .nav a[aria-current="page"] > svg { background: var(--brand-soft); border-radius: 999px; padding: .15rem .7rem; box-sizing: content-box; } }
:root[data-theme="dark"] .nav a[aria-current="page"] { color: var(--brand); }
@media (max-width: 759px) { .ph-acoes { display: none; } .painel-h { padding: 1.2rem; gap: 1rem; } }
main:focus, main:focus-visible { outline: none; }
/* contadores do painel em círculos, com a legenda por baixo */
.ph-nums { grid-template-columns: repeat(4, 1fr); gap: .6rem; align-items: start; }
.ph-nums button, .ph-nums button:nth-child(n) { display: grid; justify-items: center; align-content: start; gap: .45rem; margin: 0; padding: 0; min-height: 0; background: none; border: 0; border-radius: 14px; text-align: center; color: var(--no-painel); }
.ph-nums button b { order: -1; display: grid; place-items: center; width: clamp(3.6rem, 17vw, 5rem); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); font-size: clamp(1.15rem, 4.6vw, 1.5rem); transition: background .15s, transform .15s; }
.ph-nums button span { font-size: .82rem; font-weight: 700; line-height: 1.2; color: var(--painel-suave); }
.ph-nums button:nth-child(2) b { background: rgba(255, 255, 255, .22); } .ph-nums button:nth-child(4) b { background: transparent; border-color: rgba(255, 255, 255, .45); }
.ph-nums button.alerta { background: none; } .ph-nums button.alerta b { background: #FFFFFF; color: var(--crit); border-color: transparent; } .ph-nums button.alerta span { color: var(--no-painel); }
.ph-nums button:hover, .ph-nums button.alerta:hover { background: none; } .ph-nums button:hover b { transform: scale(1.05); }
:root[data-theme="dark"] .ph-nums button.alerta { background: none; } :root[data-theme="dark"] .ph-nums button.alerta b { background: #431512; color: #FF9A8F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph-nums button.alerta { background: none; } :root:not([data-theme="light"]) .ph-nums button.alerta b { background: #431512; color: #FF9A8F; } }
@media (min-width: 760px) { .painel-h { grid-template-columns: 1.25fr 1fr; } .ph-nums button b { width: 5rem; font-size: 1.5rem; } }

/* ============ Conteúdos relacionados agrupados: cada lista é um cartão com cabeçalho e linhas separadas por um fio ============ */
.nav-rot { display: none; }
@media (min-width: 900px) { .nav-rot { display: block; font-size: .78rem; color: var(--muted); padding: .9rem 1rem .25rem; letter-spacing: .02em; } }
section.lista:has(> .linha), section.lista:has(> .tiles), section.lista:has(> p.cartao.muted) { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sombra); padding: .55rem 1.1rem .7rem; gap: 0; min-width: 0; }
section.lista:has(> .linha) > .sec, section.lista:has(> .tiles) > .sec, section.lista:has(> p.cartao.muted) > .sec, section.lista:has(> .linha) > h2, section.lista:has(> .tiles) > h2 { padding: .55rem 0 .45rem; margin: 0; align-items: center; }
section.lista:has(> .tiles) > .tiles { padding-bottom: .4rem; }
section.lista:has(> .tiles) .tile { box-shadow: none; background: var(--surface-2); border-color: transparent; }
section.lista:has(> .tiles) .tile:hover { border-color: var(--line); background: var(--surface); }
section.lista > p.cartao.muted { border: 0; box-shadow: none; padding: .6rem 0 .5rem; background: none; }
section.lista:has(> .linha) > .linha, .cartao .lista > .linha { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; padding: .85rem 0; min-height: 4rem; }
.cartao .lista { gap: 0; } .cartao .lista > .linha:first-child { border-top: 0; padding-top: .3rem; } .cartao .lista > .linha:last-child { padding-bottom: .2rem; }
section.lista:has(> .linha) > .linha:last-child { padding-bottom: .4rem; }
section.lista:has(> .linha) > .linha:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
/* o estado de uma linha passa a uma marca à esquerda, em vez de uma caixa colorida à volta */
section.lista:has(> .linha) > .linha.crit, .cartao .lista > .linha.crit { box-shadow: inset 3px 0 0 var(--crit); padding-left: .85rem; }
section.lista:has(> .linha) > .linha.warn, .cartao .lista > .linha.warn { box-shadow: inset 3px 0 0 var(--warn); padding-left: .85rem; }
section.lista:has(> .linha) > .linha.e-voz, .cartao .lista > .linha.e-voz { box-shadow: inset 3px 0 0 var(--voice); padding-left: .85rem; background: none; }
section.lista:has(> .linha) > h3.grupo { padding: .8rem 0 .3rem; margin: 0; border-top: 1px solid var(--line); } section.lista:has(> .linha) > h3.grupo + .linha { border-top: 0; }
:root[data-contraste="alto"] section.lista:has(> .linha), :root[data-contraste="alto"] section.lista:has(> .tiles) { border: 2px solid var(--ink); }
:root[data-contraste="alto"] section.lista:has(> .linha) > .linha, :root[data-contraste="alto"] .cartao .lista > .linha { border: 0; border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .duas { grid-template-columns: 1.45fr 1fr; } }

/* cabeçalho da ficha em duas colunas: identidade à esquerda, o que a equipa precisa de saber à direita */
.cab-f { padding: 1.1rem 1.2rem; gap: 1rem; }
.cf-id { display: flex; align-items: flex-start; gap: .9rem; min-width: 0; } .cf-id > div { min-width: 0; display: grid; gap: .35rem; }
.cf-id > .avatar { width: 4rem; height: 4rem; border-radius: 16px; flex: none; }
.cf-nome { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; } .cf-nome h1 { margin: 0; overflow-wrap: anywhere; }
.lapis { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); } .lapis:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.cf-id p { margin: 0; } .cf-id .chips { margin-top: .15rem; }
.cf-info { display: grid; gap: .7rem; align-content: start; border-top: 1px solid var(--line); padding-top: .9rem; min-width: 0; }
.cf-info p { margin: 0; display: grid; gap: .1rem; overflow-wrap: anywhere; } .cf-info .rotulo { font-size: .72rem; }
@media (min-width: 760px) { .cab-f.dupla { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; } .cab-f.dupla .cf-info { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 1.6rem; } }
/* separadores da ficha com mais contraste: barra branca e o separador ativo numa pílula cheia */
.seg.abas { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px; gap: 4px; box-shadow: var(--sombra); width: fit-content; max-width: 100%; }
.seg.abas button { flex: 0 0 auto; padding: 0 1.15rem; min-height: 2.75rem; border: 0; border-radius: 999px; color: var(--ink); font-weight: 700; background: none; }
.seg.abas button:hover { background: var(--surface-2); }
.seg.abas button[aria-pressed="true"] { background: var(--painel); color: var(--no-painel); border: 0; box-shadow: 0 3px 10px rgba(13, 74, 65, .2); }
@media (max-width: 520px) { .seg.abas { width: 100%; } .seg.abas button { flex: 1 0 auto; padding: 0 .8rem; } }
:root[data-theme="dark"] .seg.abas button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg.abas button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); } }
:root[data-contraste="alto"] .seg.abas { border: 2px solid var(--ink); }
@media (max-width: 520px) { .seg.abas { gap: 2px; padding: 4px; } .seg.abas button { flex: 1 1 auto; padding: 0 .45rem; font-size: .93rem; min-width: 0; } }

/* ============ procura e filtros comuns, calendário de animação, permissões e impressão da escala ============ */
.fbarra { display: grid; gap: .6rem; } .fbarra .busca { margin: 0; } .fb-c { gap: .45rem; }
.fb-zona { display: grid; gap: 1rem; min-width: 0; } .pagina-z { gap: 1rem; }
div.lista[id^="fb-l-"]:has(> .linha), div.lista[id^="fb-l-"]:has(> p.cartao) { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sombra); padding: .3rem 1.1rem .4rem; gap: 0; }
div.lista[id^="fb-l-"] > .linha { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; padding: .85rem 0; } div.lista[id^="fb-l-"] > .linha:first-child { border-top: 0; }
div.lista[id^="fb-l-"] > p.cartao { border: 0; box-shadow: none; background: none; padding: .7rem 0; }
div.lista[id^="fb-l-"] > .linha.crit { box-shadow: inset 3px 0 0 var(--crit); padding-left: .85rem; } div.lista[id^="fb-l-"] > .linha.warn { box-shadow: inset 3px 0 0 var(--warn); padding-left: .85rem; } div.lista[id^="fb-l-"] > .linha.e-voz { box-shadow: inset 3px 0 0 var(--voice); padding-left: .85rem; }
.cartao .lista > div.lista[id^="fb-l-"] { border: 0; box-shadow: none; padding: 0; background: none; border-radius: 0; }
.cal-a { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-c { font-size: .74rem; font-weight: 700; color: var(--muted); text-align: center; padding: .2rem 0; text-transform: uppercase; letter-spacing: .04em; }
.cal-d { position: relative; display: grid; align-content: start; gap: .1rem; min-height: 3.3rem; padding: .3rem .35rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-width: 0; overflow: hidden; }
.cal-d b { font-family: var(--titulo); font-size: .95rem; } .cal-d small { display: none; font-size: .7rem; line-height: 1.15; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-d i { position: absolute; top: .3rem; right: .3rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .25rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-style: normal; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.cal-d.tem { background: var(--surface-2); } .cal-d.hj { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); } .cal-d[aria-pressed="true"] { background: var(--painel); color: var(--no-painel); border-color: transparent; } .cal-d[aria-pressed="true"] small { color: var(--painel-suave); }
@media (min-width: 760px) { .cal-d { min-height: 5.2rem; padding: .4rem .5rem; } .cal-d small { display: block; } .cal-d i { display: none; } }
h3.dia-a { margin: .9rem 0 .2rem; font-size: 1rem; font-family: var(--titulo); text-transform: capitalize; } h3.dia-a:first-of-type { margin-top: .2rem; } .dia-v { margin: 0 0 .2rem; font-size: .92rem; }
fieldset.grupo-op { border: 1px solid var(--line); border-radius: 14px; padding: .7rem .9rem; margin: 0; display: grid; gap: .3rem; min-width: 0; } fieldset.grupo-op legend { font-weight: 700; padding: 0 .35rem; font-size: .92rem; }
.dias-op { display: flex; flex-wrap: wrap; gap: .2rem .9rem; } .linha-ala { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .6rem; } .linha-ala select { min-width: 9rem; }
table.perm td { text-align: center; } table.perm input[type="checkbox"] { width: 1.35rem; height: 1.35rem; accent-color: var(--brand); } table.perm th small { display: block; font-weight: 400; color: var(--muted); }
.so-imp { display: none; }
@media print {
  .so-imp { display: flex !important; } .imp-cab { align-items: center; gap: .6rem; margin: 0 0 .5rem; padding-bottom: .4rem; border-bottom: 1.5px solid #0D4A41; color: #000; }
  .imp-cab > div { flex: 1; display: grid; } .imp-cab strong { font-size: 1.05rem; } .imp-cab span { font-size: .85rem; } .imp-cab small { font-size: .7rem; color: #444; }
  .imp-logo { width: 2.1rem; height: 2.1rem; border-radius: 9px; background: #0D4A41; color: #fff; display: grid !important; place-items: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .imp-logo .ic { width: 1.3rem; height: 1.3rem; stroke: #fff; }
  body.imp-escala .app { display: block; } body.imp-escala .pagina { display: block; max-width: none; margin: 0; }
  body.imp-escala .pagina > *:not(.esc-c) { display: none !important; }
  body.imp-escala .esc-c { border: 0; box-shadow: none; padding: 0; margin: 0; border-radius: 0; display: block; }
  body.imp-escala .esc-g { overflow: visible; } body.imp-escala .esc-g table { width: 100%; min-width: 0; table-layout: fixed; font-size: 7.5pt; border-collapse: collapse; }
  body.imp-escala .esc-g th, body.imp-escala .esc-g td { padding: 1.5pt 0; border: .5pt solid #999; } body.imp-escala .esc-g tbody th, body.imp-escala .esc-g thead th:first-child, body.imp-escala .esc-g tfoot th { width: 15%; text-align: left; padding-left: 3pt; position: static; }
  body.imp-escala .esc-g thead th.num, body.imp-escala .esc-g td.num { width: 3.2%; } body.imp-escala .esc-g th small { font-size: 6pt; display: block; }
  body.imp-escala .cel { width: 100%; height: auto; min-height: 11pt; border-radius: 0; border: 0; font-size: 7.5pt; display: block; text-align: center; }
  body.imp-escala .leg-e { margin-top: .5rem; font-size: 7.5pt; } body.imp-escala .leg-e .cel { display: inline-block; width: 1.4rem; }
}
.fb-zona > *, .fbarra > * { min-width: 0; } .fb-c .chip-b { white-space: normal; text-align: left; max-width: 100%; }
@media (max-width: 440px) { .topo { gap: .4rem; padding-inline: .75rem; } .topo .marca { font-size: 0; gap: 0; } .topo .espaco button { padding-inline: .6rem; } }
