  /* ---------- ficha Escopo e Valor ---------- */
  textarea.f { font: inherit; font-size: 13.5px; width: 100%; border: 1px solid var(--baseline);
    border-radius: 8px; background: var(--page); color: var(--text-primary); padding: 8px 10px; resize: vertical; }
  textarea.f:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
  .modal.ficha-modal { max-width: 900px; padding: 0; background: #fff; }
  .ficha { background: #fff; color: #1b1b1b; padding: 40px 48px; font-size: 13.5px; border-radius: 14px 14px 0 0; }
  .ficha .kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: #5a6b76; text-transform: uppercase; }
  .ficha h1 { font-size: 24px; font-weight: 700; color: #1c3a6e; margin: 4px 0 10px; padding-bottom: 10px; border-bottom: 3px solid #1c3a6e; }
  .ficha h2 { font-size: 15px; font-weight: 700; color: #1c3a6e; margin: 24px 0 10px; }
  .ficha table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .ficha td, .ficha th { border: 1px solid #d9dee2; padding: 7px 10px; text-align: left; vertical-align: top; color: #1b1b1b; }
  .ficha table td { background: #fff; }
  tr.detail-row .ficha table td { background: #fff; }
  tr.detail-row .ficha .info td.k, .ficha .info td.k { background: #eef1f3; }
  .ficha th { background: #1c3a6e; color: #fff; font-size: 11.5px; font-weight: 600; border-color: #1c3a6e; text-transform: none; letter-spacing: 0; }
  .ficha .info td.k { background: #eef1f3; font-weight: 600; width: 17%; }
  .ficha ul { margin: 6px 0 0 20px; }
  .ficha li { margin-bottom: 4px; }
  .ficha p { margin: 6px 0; }
  .ficha .num { text-align: right; font-variant-numeric: tabular-nums; }
  .ficha .hero-box { background: #eef1f3; padding: 16px 20px; margin-top: 22px; border-radius: 4px; }
  .ficha .hero-box .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: #5a6b76; text-transform: uppercase; }
  .ficha .hero-box .val { font-size: 28px; font-weight: 700; color: #0e7a4e; margin: 4px 0; }
  .ficha .hero-box .meta { font-size: 12.5px; color: #33424c; }
  .ficha .obs { font-size: 12px; color: #5a6b76; font-style: italic; margin-top: 12px; }
  .ficha .rodape { text-align: center; font-size: 10.5px; color: #8a959c; margin-top: 28px; }
  .ficha-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e3e7ea; background: #fff; border-radius: 0 0 14px 14px; }
  .ficha.ficha-inline { margin-top: 14px; padding: 26px 30px; border: 1px solid var(--grid); border-radius: 10px; }
  .ficha.ficha-inline h1 { font-size: 20px; }
  .ficha.ficha-inline .hero-box .val { font-size: 24px; }
  .ficha.ficha-inline .rodape { display: none; }
  .ficha-actions button { color: #1b1b1b; border-color: #d0d5d9; background: #fff; }
  .ficha-actions button.primary { background: #1c3a6e; color: #fff; border-color: transparent; }
  @media print {
    /* Combinador descendente (nao filho direto ">"): .wrap fica dentro de
       #appShell, nao e filho direto do body (ver index.html) — com ">" essa
       regra nunca casava e o painel inteiro (outros processos, outros
       departamentos) vazava atras da ficha em qualquer impressao/PDF. */
    body.print-ficha .wrap, body.print-ficha #overlay, body.print-ficha #loginOverlay, body.print-ficha .ficha-actions { display: none !important; }
    body.print-ficha { background: #fff; padding: 0; }
    body.print-ficha #fichaOverlay { position: static; display: block; background: none; padding: 0; overflow: visible; }
    body.print-ficha #fichaOverlay .modal { max-width: none; border: none; box-shadow: none; border-radius: 0; }
    body.print-ficha .ficha { padding: 8mm 4mm; border-radius: 0; }
  }
