:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #182f34;
  background: #f0f5f5;
  --ink: #182f34;
  --muted: #4b6266;
  --line: #d4e1e1;
  --brand: #075c59;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead { background: #113e41; color: #fff; }
.mast-inner { max-width: 1200px; padding: 15px 26px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand, .account { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #c5eee3; color: #133e40; font-size: 22px; font-weight: 800; }
.brand b { font-size: 18px; letter-spacing: -.01em; }
.brand small { display: block; color: #d0e8e8; }
.account .quiet { background: transparent; border-color: #91b4b5; color: #fff; }
main { max-width: 1200px; margin: auto; padding: 24px 26px 52px; }
.demo { margin: 0 0 14px; padding: 7px 12px; border-radius: 6px; background: #fff2d0; color: #664708; font-size: 14px; }
nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
nav button[aria-current="page"] { background: #d9ede9; color: #064e4a; border-color: #82b8ac; }
h1 { font-size: clamp(25px, 4vw, 36px); margin: 4px 0 6px; line-height: 1.14; letter-spacing: -.03em; }
h2 { margin: 0 0 12px; font-size: 21px; }
h3 { margin: 0 0 8px; font-size: 17px; }
p { line-height: 1.45; }
.eyebrow { text-transform: uppercase; font-weight: 750; letter-spacing: .08em; color: #3d6968; font-size: 12px; margin: 0 0 8px; }
.muted, small { color: var(--muted); }
.title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.title p { margin: 0; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 19px 21px; margin-bottom: 14px; box-shadow: 0 1px 2px #1638350b; }
.login { max-width: 450px; margin: 30px auto; padding: 28px; }
.login form { display: grid; gap: 14px; margin-top: 22px; }
.login #login-form button { justify-self: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(240px,1fr); gap: 14px; align-items: start; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 13px; }
label { display: grid; gap: 5px; color: #214447; font-weight: 650; font-size: 14px; }
label.choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"]), select, textarea { min-width: 0; width: 100%; border: 1px solid #a5babc; border-radius: 7px; padding: 8px 9px; background: #fff; color: var(--ink); font-weight: 450; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); }
textarea { min-height: 64px; resize: vertical; }
button { cursor: pointer; padding: 8px 13px; border-radius: 8px; border: 1px solid #afc4c5; background: #fff; color: #214447; font-weight: 650; }
button:hover { background: #edf6f5; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.primary:hover { background: #084a49; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #216a9e; outline-offset: 2px; }
a { color: #065b62; }
fieldset { margin: 13px 0 0; padding: 9px 12px 11px; border: 1px solid var(--line); border-radius: 8px; }
legend { font-weight: 650; padding: 0 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 7px 15px; }
.choices + label { margin-top: 8px; }
#notice:empty { display: none; }
#notice { border-left: 4px solid #32816d; padding: 9px 12px; background: #e9f5ef; margin: 9px 0 14px; }
#notice.error { border-color: #ab3e37; background: #fbecea; color: #812720; }
#envios:empty { display: none; }
#envios .envio { border-left: 4px solid #32816d; padding: 6px 8px 6px 12px; background: #e9f5ef; margin: 0 0 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#envios .envio.error { border-color: #ab3e37; background: #fbecea; color: #812720; }
#envios .fechar { min-height: 26px; padding: 2px 9px; }
.form-note { font-size: 14px; color: #812720; margin: 8px 0 0; }
.form-note:empty { display: none; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: 13px; background: #e7eff1; color: #28484e; font-weight: 650; }
.badge.ready, .badge.ok, .badge.recorded { background: #dff3e9; color: #175742; }
.badge.due, .badge.blocked, .badge.missing { background: #fbe7e3; color: #8a362a; }
.badge.conditional, .badge.due_soon, .badge.returned { background: #fff1cf; color: #664709; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
.row.between { justify-content: space-between; }
.timeline { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.point { font-size: 12px; padding: 4px 8px; text-align: left; min-height: 28px; }
.point.due { background: #fff1dc; color: #873f16; border-color: #dda76f; }
.point.recorded { background: #e7f5ef; border-color: #b0d2c4; }
.point.missing { border-color: #d4a69c; }
.exam { padding: 13px 0; border-top: 1px solid var(--line); }
.exam:first-of-type { border-top: 0; }
.exam p, .panel > p:first-child { margin: 3px 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #edf4f3; color: #24494c; }
details > summary { cursor: pointer; font-weight: 700; margin-bottom: 9px; color: #214b4d; }
.fact-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 9px 13px; margin: 12px 0; }
.fact-list dt { color: var(--muted); font-size: 13px; }
.fact-list dd { margin: 0; overflow-wrap: anywhere; }
li { margin: 5px 0; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .mast-inner, main { padding-left: 13px; padding-right: 13px; }
  .panel { padding: 14px; }
}
/* Bloco 2A: revisão do laudo */
.draft-flag { display: inline-block; margin: 0 0 12px; padding: 5px 10px; border-radius: 6px; background: #fff2d0; color: #664708; font-weight: 750; font-size: 13px; letter-spacing: .03em; }
.chart { margin: 14px 0; }
.chart svg { width: 100%; max-width: 720px; height: auto; display: block; }
.chart figcaption { color: var(--muted); font-size: 13px; margin-top: 4px; }
.chart-area { fill: #fbfdfd; stroke: var(--line); }
.chart-grid { stroke: #e6eeee; }
.chart-label { fill: #4b6266; font-size: 11px; }
.chart-window { stroke: #9bb8b9; stroke-dasharray: 4 4; }
.chart-threshold { stroke: #b4473a; stroke-dasharray: 6 4; }
.chart-h2 { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.chart-h2-dot { fill: var(--brand); }
.chart-ch4 { fill: none; stroke: #8a5a00; stroke-width: 2; stroke-dasharray: 5 4; }
.chart-ch4-dot { fill: #8a5a00; }
.pending { margin: 10px 0; padding-left: 20px; }
.pending li { margin: 4px 0; line-height: 1.4; }
.draft { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.draft textarea { min-height: 90px; }
.curve-text { margin: 12px 0; font-size: 14px; }
.curve-text ul { margin: 6px 0 0; padding-left: 20px; }
.preview-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.preview-pdf { width: 100%; height: 900px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.verificacao { max-width: 640px; margin: 48px auto; padding: 0 16px; }
/* Tela única: rodapé do laudo igual ao do ALLIA ([X] | [Mais] [Assinar e enviar] [Assinar e imprimir] [Salvar]) */
.rodape-laudo { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; padding: 10px 0 4px; background: #fff; border-top: 1px solid var(--line); }
.rodape-laudo .fechar { margin-right: auto; width: 38px; padding: 6px 0; font-size: 20px; line-height: 1; }
.rodape-laudo .separador { display: none; }
.menu { position: relative; }
.mais .seta { font-size: 12px; }
.menu-itens { position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 3; display: grid; min-width: 210px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px #16383522; }
.menu-itens button { border: 0; text-align: left; }
/* Contagem de 5 s com "Cancelar": embaixo à direita, acima do rodapé do laudo; no celular, na largura toda (ALLIA, item 87) */
.contagem { position: fixed; right: 18px; bottom: 84px; z-index: 10; display: flex; align-items: center; gap: 12px; width: 300px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #ffffffd9; backdrop-filter: blur(4px); box-shadow: 0 4px 14px #1638352b; font-size: 14px; }
.contagem > div { display: grid; gap: 2px; flex: 1; }
.contagem span { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  .contagem { left: 12px; right: 12px; width: auto; }
}
