/* =====================================================================
 * Relatório de avaliação física (A4, 794 x 1123 px a 96 dpi)
 * Mesmo HTML/CSS na prévia ao vivo e no PDF gerado no servidor.
 * O papel é sempre claro, independente do tema da aplicação.
 * ===================================================================== */
.om-sheet{
  --rp-teal:#45c0a9; --rp-teal-ink:#1d8a75; --rp-teal-dark:#17705f; --rp-graphite:#58595b; --rp-warn:#c0672b;
  --rp-ink:#1f2326; --rp-muted:#5f676b; --rp-text:#4a5155; --rp-line:#d6dedc; --rp-soft:#e2f5f1; --rp-soft2:#f2fbf9; --rp-gray:#edf1f0;
  --rp-display:"Montserrat","Segoe UI",Arial,sans-serif; --rp-body:"Source Sans 3","Segoe UI",Arial,sans-serif;
  width:794px;max-width:100%;margin:0 auto;display:flex;flex-direction:column;gap:20px;container-type:inline-size;font-family:var(--rp-body);color:var(--rp-ink);line-height:1.45;font-size:15px
}
.om-sheet *{box-sizing:border-box}
.om-sheet h3,.om-sheet h4{font-family:var(--rp-display);margin:0;text-wrap:balance}
.om-sheet .page{background:#fff;color:var(--rp-ink);width:100%;height:1123px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 2px 24px rgba(40,60,56,.16);border-radius:6px;position:relative}
.om-sheet.pdf-mode{width:794px;max-width:none;gap:0}
.om-sheet.pdf-mode .page{box-shadow:none;border-radius:0;height:1122px;break-after:page;page-break-after:always}
.om-sheet.pdf-mode .page:last-child{break-after:auto;page-break-after:auto}

.om-sheet .r-head{padding:24px 36px 12px;display:flex;justify-content:space-between;align-items:center;gap:16px}
.om-sheet .brand{display:flex;align-items:center;gap:12px}
.om-sheet .brand .sym{width:60px;height:auto}
.om-sheet .brand .wm{width:180px;height:auto}
.om-sheet .r-title{text-align:right;color:var(--rp-graphite)}
.om-sheet .r-title h3{font-size:17px;font-weight:800;text-transform:uppercase;letter-spacing:.02em;line-height:1.15}
.om-sheet .r-title small{font-size:12.5px;color:var(--rp-muted)}
.om-sheet .wave{display:block;width:100%;height:24px}

.om-sheet .mini-head{padding:22px 36px 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:3px solid var(--rp-teal)}
.om-sheet .mini-head .brand .sym{width:34px}
.om-sheet .mini-head .brand .wm{width:120px}
.om-sheet .mini-head .who{text-align:right;font-size:12.5px;color:var(--rp-muted);line-height:1.35}
.om-sheet .mini-head .who b{display:block;font-family:var(--rp-display);font-size:14px;color:var(--rp-graphite)}

.om-sheet .pbody{flex:1;padding:14px 36px 10px;display:flex;flex-direction:column;gap:16px}
.om-sheet .athlete{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--rp-line)}
.om-sheet .athlete .name{font-family:var(--rp-display);font-weight:800;font-size:25px;line-height:1.1;color:var(--rp-graphite);letter-spacing:-.01em}
.om-sheet .athlete .meta{display:flex;gap:16px;flex-wrap:wrap;margin-top:6px;color:var(--rp-muted);font-size:14px}
.om-sheet .athlete .meta b{color:var(--rp-ink)}
.om-sheet .pos-row{margin-top:10px;display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600;color:var(--rp-muted);flex-wrap:wrap}
.om-sheet .pos{background:var(--rp-teal);color:#fff;font-family:var(--rp-display);font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.05em;padding:5px 14px;border-radius:999px;white-space:nowrap}
.om-sheet .field-box{display:flex;flex-direction:column;align-items:center}
.om-sheet .field-box svg{width:190px;height:auto;display:block}
.om-sheet .pdot .dot{fill:#fff;fill-opacity:.55}
.om-sheet .pdot .halo{fill:none}
.om-sheet .pdot.on .dot{fill:var(--rp-graphite);fill-opacity:1;stroke:#fff;stroke-width:2.5}
.om-sheet .pdot.on .halo{fill:#fff;fill-opacity:.35}

.om-sheet .family{background:var(--rp-soft);border-radius:10px;padding:13px 18px;display:grid;gap:5px}
.om-sheet .family h3{font-size:13px;font-weight:800;color:var(--rp-teal-dark);text-transform:uppercase;letter-spacing:.06em}
.om-sheet .family p{margin:0;font-size:14px;line-height:1.55;color:var(--rp-ink)}

.om-sheet .sec{display:grid;gap:8px}
.om-sheet .sec-title{font-family:var(--rp-display);font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.07em;color:var(--rp-teal-ink);display:flex;align-items:center;gap:10px}
.om-sheet .sec-title .n{width:22px;height:22px;border-radius:50%;background:var(--rp-teal);color:#fff;display:grid;place-items:center;font-size:12px;letter-spacing:0;flex:none}
.om-sheet .sec-title::after{content:"";flex:1;height:1px;background:var(--rp-line)}
.om-sheet .sec-title .tag{order:3;font-family:var(--rp-body);font-size:11px;font-weight:600;text-transform:none;letter-spacing:0;color:var(--rp-muted);background:var(--rp-gray);padding:2px 9px;border-radius:999px;white-space:nowrap}
.om-sheet .method{margin:0;font-size:12.5px;line-height:1.5;color:var(--rp-text)}

.om-sheet .tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.om-sheet .tiles.c3{grid-template-columns:repeat(3,1fr)}
.om-sheet .tiles.c2{grid-template-columns:repeat(2,1fr)}
.om-sheet .tile{border:1px solid var(--rp-line);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.om-sheet .tile .k{font-size:11px;font-weight:700;color:var(--rp-muted);text-transform:uppercase;letter-spacing:.05em}
.om-sheet .tile .v{font-family:var(--rp-display);font-weight:700;font-size:23px;color:var(--rp-graphite);font-variant-numeric:tabular-nums;line-height:1.15}
.om-sheet .tile .v small{font-family:var(--rp-body);font-size:12px;font-weight:600;color:var(--rp-muted);margin-left:3px}
.om-sheet .tile.hl{background:var(--rp-soft2);border-color:#a9e2d6}
.om-sheet .tile.hl .v{color:var(--rp-teal-ink)}
.om-sheet .tile .interp{margin:4px 0 0;padding-top:7px;border-top:1px dashed var(--rp-line);font-size:11.5px;line-height:1.42;color:var(--rp-text)}
.om-sheet .chip{align-self:flex-start;display:inline-block;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--rp-gray);color:var(--rp-muted);white-space:nowrap}
.om-sheet .chip.good{background:var(--rp-soft);color:var(--rp-teal-dark)}
.om-sheet .chip.attn{background:#fcebdc;color:#a8521c}
.om-sheet .chip:empty{display:none}

.om-sheet .tests{display:grid;border-top:1px solid var(--rp-line)}
.om-sheet .test{display:grid;grid-template-columns:150px 1fr 92px;grid-template-rows:auto auto;gap:6px 16px;align-items:center;padding:9px 0;border-bottom:1px solid var(--rp-line)}
.om-sheet .test .nm,.om-sheet .test .num{grid-row:1/3}
.om-sheet .test .nm{font-weight:700;font-size:14px;line-height:1.2}
.om-sheet .test .nm small{display:block;font-weight:500;font-size:11.5px;color:var(--rp-muted);margin-top:2px}
.om-sheet .test .nm .chip{margin-top:4px}
.om-sheet .track{height:12px;background:var(--rp-gray);border-radius:6px;overflow:hidden}
.om-sheet .fill{height:100%;background:var(--rp-teal);border-radius:6px;transition:width .3s}
.om-sheet .test .num{white-space:nowrap;text-align:right;font-family:var(--rp-display);font-weight:700;font-size:17px;color:var(--rp-graphite);font-variant-numeric:tabular-nums}
.om-sheet .test .num small{font-family:var(--rp-body);font-size:11.5px;color:var(--rp-muted);margin-left:2px}
.om-sheet .test .desc{grid-column:2;grid-row:2;margin:0;font-size:11.5px;line-height:1.42;color:var(--rp-text)}

.om-sheet .flex-grid{display:grid;grid-template-columns:260px 1fr;gap:14px;align-items:stretch}
.om-sheet .wells{border:1px solid #a9e2d6;background:var(--rp-soft2);border-radius:8px;padding:12px 14px}
.om-sheet .wells .k{font-size:11px;font-weight:700;color:var(--rp-muted);text-transform:uppercase;letter-spacing:.05em}
.om-sheet .wells .v{font-family:var(--rp-display);font-weight:700;font-size:30px;color:var(--rp-teal-ink);line-height:1.15}
.om-sheet .wells .v small{font-family:var(--rp-body);font-size:13px;color:var(--rp-muted)}
.om-sheet .wells .chip{margin-top:4px}
.om-sheet .ruler{margin-top:10px;height:20px;position:relative;background:repeating-linear-gradient(90deg,#c8d3d0 0 1px,transparent 1px 10%);border-bottom:2px solid var(--rp-graphite)}
.om-sheet .ruler .mk{position:absolute;bottom:-2px;width:4px;height:24px;background:var(--rp-teal);border-radius:2px;transform:translateX(-50%);transition:left .3s}
.om-sheet .ruler-l{display:flex;justify-content:space-between;font-size:11px;color:var(--rp-muted);margin-top:3px}
.om-sheet .infobox{border:1px solid var(--rp-line);border-radius:8px;padding:12px 14px;display:grid;gap:6px;align-content:start}
.om-sheet .infobox h4{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--rp-graphite)}
.om-sheet .infobox p{margin:0;font-size:12.5px;line-height:1.5;color:var(--rp-text)}

.om-sheet .conduta{background:#f5f8f7;border-left:4px solid var(--rp-teal);border-radius:0 8px 8px 0;padding:12px 16px;font-size:13.5px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.om-sheet .conduta b{color:var(--rp-teal-dark)}

.om-sheet .legend{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.om-sheet .legend>div{border:1px solid var(--rp-line);border-radius:8px;padding:10px 12px;font-size:12px;line-height:1.45;color:var(--rp-text);display:grid;gap:6px;align-content:start}
.om-sheet .legend .chip{justify-self:start}
.om-sheet .base-chip{align-self:flex-start;justify-self:start;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--rp-graphite);color:#fff}
.om-sheet .refs{margin:0;padding-left:18px;font-size:11.5px;line-height:1.5;color:var(--rp-muted)}

.om-sheet .spacer{flex:1}
.om-sheet .cta{background:var(--rp-graphite);color:#fff;border-radius:10px;padding:16px 20px;display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center}
.om-sheet .cta h3{font-size:16px;font-weight:800;color:#fff}
.om-sheet .cta p{margin:3px 0 0;font-size:13px;opacity:.9}
.om-sheet .cta .next{margin-top:10px;display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.12);border-radius:999px;padding:4px 12px;font-size:12.5px}
.om-sheet .cta .next b{color:#6fdcc6;font-family:var(--rp-display)}
.om-sheet .cta .contact{text-align:right;font-size:13px;line-height:1.45}
.om-sheet .cta .contact b{font-family:var(--rp-display);font-size:17px;color:#6fdcc6}
.om-sheet .sign-row{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;padding-top:6px}
.om-sheet .clinic{font-size:12px;line-height:1.5;color:var(--rp-muted)}
.om-sheet .clinic b{color:var(--rp-ink)}
.om-sheet .sign{border-top:1px solid var(--rp-ink);width:270px;text-align:center;padding-top:5px;font-size:13px;font-weight:700}
.om-sheet .sign small{display:block;font-weight:500;font-size:11.5px;color:var(--rp-muted)}
.om-sheet .r-foot{display:flex;justify-content:space-between;gap:12px;padding:10px 36px 16px;font-size:11px;color:var(--rp-muted);border-top:1px solid var(--rp-line)}

/* Prévia em telas estreitas: os blocos se reorganizam (o PDF sai sempre em A4) */
@container (max-width:760px){
  .om-sheet:not(.pdf-mode) .page{height:auto}
  .om-sheet:not(.pdf-mode) .tiles,.om-sheet:not(.pdf-mode) .tiles.c3,.om-sheet:not(.pdf-mode) .legend{grid-template-columns:repeat(2,1fr)}
  .om-sheet:not(.pdf-mode) .flex-grid,.om-sheet:not(.pdf-mode) .cta{grid-template-columns:1fr}
  .om-sheet:not(.pdf-mode) .cta .contact{text-align:left}
  .om-sheet:not(.pdf-mode) .r-head,.om-sheet:not(.pdf-mode) .mini-head{flex-direction:column;align-items:flex-start}
  .om-sheet:not(.pdf-mode) .r-title,.om-sheet:not(.pdf-mode) .mini-head .who{text-align:left}
  .om-sheet:not(.pdf-mode) .brand .wm{width:150px}
  .om-sheet:not(.pdf-mode) .athlete{grid-template-columns:1fr}
  .om-sheet:not(.pdf-mode) .test{grid-template-columns:1fr 80px}
  .om-sheet:not(.pdf-mode) .test .nm,.om-sheet:not(.pdf-mode) .test .num{grid-row:auto}
  .om-sheet:not(.pdf-mode) .test .track,.om-sheet:not(.pdf-mode) .test .desc{grid-column:1/-1;grid-row:auto}
  .om-sheet:not(.pdf-mode) .sign-row{flex-direction:column;align-items:flex-start}
  .om-sheet:not(.pdf-mode) .r-head,.om-sheet:not(.pdf-mode) .mini-head,.om-sheet:not(.pdf-mode) .pbody,.om-sheet:not(.pdf-mode) .r-foot{padding-left:18px;padding-right:18px}
}
@container (max-width:420px){
  .om-sheet:not(.pdf-mode) .tiles,.om-sheet:not(.pdf-mode) .tiles.c3,.om-sheet:not(.pdf-mode) .tiles.c2,.om-sheet:not(.pdf-mode) .legend{grid-template-columns:1fr}
  .om-sheet:not(.pdf-mode) .sign{width:100%}
}
@media print{
  @page{size:A4;margin:0}
  .om-sheet{gap:0;width:794px;max-width:none}
  .om-sheet .page{box-shadow:none;border-radius:0;break-after:page;height:1123px}
  .om-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
