/* SII Control OPT — reporte formal web / impresión. Selectores limitados al reporte. */
.sii-opt-front-report-view .sii-opt-front-back{display:inline-block;margin:0 0 12px;text-decoration:none;font-weight:700}
.sii-opt-front-report-view .sii-opt-report-panel{max-width:1120px!important;margin:0 auto;box-sizing:border-box;background:#fff;border:1px solid #dbe4ef;border-radius:14px;padding:18px;box-shadow:0 4px 16px rgba(15,23,42,.05)}
.sii-opt-front-report-view .sii-opt-report-header-formal{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(210px,280px) auto!important;gap:14px!important;align-items:center!important;border:1px solid #dbeafe!important;background:linear-gradient(180deg,#fff 0%,#f8fbff 100%)!important;border-radius:14px!important;padding:14px!important;margin-bottom:14px!important}
.sii-opt-front-report-view .sii-opt-report-header-formal h2{font-size:24px!important;line-height:1.15!important;color:#08204a!important;margin:5px 0 0!important}
.sii-opt-front-report-view .sii-opt-report-kicker{display:inline-block;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe;border-radius:999px;padding:4px 9px}
.sii-opt-front-report-view .sii-opt-report-code-card{border:1px solid #cfe0f5;background:#fff;border-radius:12px;padding:10px 12px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.sii-opt-front-report-view .sii-opt-report-code-card small{display:block;color:#64748b;text-transform:uppercase;font-weight:800;font-size:10px;letter-spacing:.06em;margin-bottom:4px}
.sii-opt-front-report-view .sii-opt-report-code-card strong{display:block;color:#0b1f44;font-size:17px;line-height:1.15;word-break:break-word}
.sii-opt-front-report-view .sii-opt-report-code-card span{display:block;color:#64748b;font-size:12px;margin-top:5px}
.sii-opt-front-report-view .sii-opt-report-header-formal .button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:7px 12px;border:1px solid #135e96;border-radius:6px;background:#2271b1;color:#fff;text-decoration:none;font-weight:600;cursor:pointer;white-space:nowrap}
.sii-opt-front-report-view .sii-opt-front-report-meta-formal{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 16px}
.sii-opt-front-report-view .sii-opt-front-report-meta-formal>div{background:#fbfdff;border:1px solid #dde7f3;border-radius:12px;padding:12px 13px;min-width:0}
.sii-opt-front-report-view .sii-opt-front-report-meta-formal strong{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#5b6b82;margin-bottom:4px}
.sii-opt-front-report-view .sii-opt-front-report-meta-formal span{display:block;color:#0b1f44;overflow-wrap:anywhere}
.sii-opt-front-report-view .sii-opt-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:12px 0 16px!important}
.sii-opt-front-report-view .sii-opt-kpi-grid>div{background:#fbfdff!important;border:1px solid #dde7f3!important;border-radius:13px!important;padding:14px!important;box-shadow:0 1px 2px rgba(15,23,42,.03)!important}
.sii-opt-front-report-view .sii-opt-kpi-grid strong{display:block;font-size:26px!important;line-height:1.1!important;color:#0b1f44!important}
.sii-opt-front-report-view .sii-opt-kpi-grid span{display:block;font-size:12px!important;color:#64748b!important;margin-top:4px}
.sii-opt-front-report-view .sii-opt-report-panel h3{font-size:17px!important;color:#0b1f44!important;margin:18px 0 8px!important}
.sii-opt-front-report-view .sii-opt-worker-list{margin:0 0 14px;padding-left:20px}
.sii-opt-front-report-view .sii-opt-report-context-inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px;margin:10px 0 12px}
.sii-opt-front-report-view .sii-opt-report-table{width:100%;border-collapse:collapse!important;font-size:12px!important;border:1px solid #d7e0ea!important}
.sii-opt-front-report-view .sii-opt-report-table th{background:#f1f6fb!important;color:#0b1f44!important;font-size:11px!important;text-transform:uppercase!important;letter-spacing:.03em!important;text-align:left}
.sii-opt-front-report-view .sii-opt-report-table th,.sii-opt-front-report-view .sii-opt-report-table td{padding:8px;border:1px solid #e2e8f0!important;vertical-align:top!important;overflow-wrap:anywhere}
.sii-opt-front-report-view .sii-opt-report-evidence-thumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start}
.sii-opt-front-report-view .sii-opt-report-evidence-thumbs a{display:inline-flex;flex-direction:column;gap:3px;text-decoration:none;color:#475569;border:1px solid #d7e0ea;border-radius:10px;padding:5px;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.06)}
.sii-opt-front-report-view .sii-opt-report-evidence-thumbs img{width:62px!important;height:46px!important;object-fit:cover;border-radius:7px!important;display:block}
.sii-opt-front-report-view .sii-opt-report-evidence-thumbs span{font-size:10px!important;text-align:center;font-weight:700!important}
@media(max-width:900px){
 .sii-opt-front-report-view .sii-opt-report-header-formal{grid-template-columns:1fr!important;align-items:start!important}
 .sii-opt-front-report-view .sii-opt-report-header-formal .button{width:100%;box-sizing:border-box}
 .sii-opt-front-report-view .sii-opt-front-report-meta-formal{grid-template-columns:1fr!important}
 .sii-opt-front-report-view .sii-opt-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .sii-opt-front-report-view .sii-opt-report-panel{padding:12px}
}
@media(max-width:520px){.sii-opt-front-report-view .sii-opt-kpi-grid{grid-template-columns:1fr!important}}
@media print{
 /* Hoja = registro: margen físico mínimo. En Chromium un margen superior mínimo
    evita que el navegador reserve/imprima su cabecera automática. */
 @page{
  size:A4 portrait;
  margin:3mm 4mm 8mm;
  @top-left{content:""}
  @top-center{content:""}
  @top-right{content:""}
  @bottom-left{content:""}
  @bottom-center{content:"Página " counter(page) " / " counter(pages);font:8pt Arial,sans-serif;color:#475569}
  @bottom-right{content:""}
 }
 html,body{margin:0!important;padding:0!important;background:#fff!important;width:100%!important;max-width:none!important}
 body.sii-opt-report-printing>.sii-opt-print-hidden{display:none!important}
 body.sii-opt-report-printing>.sii-opt-front-report-view{display:block!important;position:static!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;transform:none!important}
 /* En impresión solo queda el documento formal. Cabeceras/barras del Portal que
    puedan estar dentro de la vista no forman parte del registro. */
 body.sii-opt-report-printing>.sii-opt-front-report-view>:not(.sii-opt-report-panel){display:none!important}
 .sii-opt-front-report-view .sii-opt-front-back,.sii-opt-front-report-view .sii-opt-report-header-formal .button{display:none!important}
 .sii-opt-front-report-view .sii-opt-report-panel{display:block!important;position:static!important;max-width:none!important;width:100%!important;box-sizing:border-box!important;border:0!important;border-radius:0!important;padding:0!important;margin:0!important;box-shadow:none!important;transform:none!important}
 .sii-opt-front-report-view .sii-opt-report-header-formal{grid-template-columns:minmax(0,1fr) 190px!important;padding:7px!important;margin:0 0 6px!important;border-radius:0!important;break-inside:avoid!important}
 .sii-opt-front-report-view .sii-opt-report-header-formal h2{font-size:18px!important}
 .sii-opt-front-report-view .sii-opt-report-code-card{padding:7px!important;border-radius:4px!important}
 .sii-opt-front-report-view .sii-opt-report-code-card strong{font-size:12px!important}
 .sii-opt-front-report-view .sii-opt-front-report-meta-formal{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;margin:0 0 6px!important}
 .sii-opt-front-report-view .sii-opt-front-report-meta-formal>div{padding:6px!important;border-radius:4px!important;break-inside:avoid!important}
 .sii-opt-front-report-view .sii-opt-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;margin:0 0 6px!important}
 .sii-opt-front-report-view .sii-opt-kpi-grid>div{padding:6px!important;border-radius:4px!important;break-inside:avoid!important}
 .sii-opt-front-report-view .sii-opt-kpi-grid strong{font-size:16px!important}
 .sii-opt-front-report-view .sii-opt-report-context-inline{margin:5px 0 7px!important;padding:5px 6px!important;border-radius:3px!important}
 .sii-opt-front-report-view .sii-opt-report-panel h3{margin:8px 0 4px!important;font-size:13px!important}
 .sii-opt-front-report-view .sii-opt-worker-list{margin:0 0 7px!important}
 .sii-opt-front-report-view .sii-opt-report-table{width:100%!important;table-layout:auto!important;font-size:8.5px!important;line-height:1.18!important}
 .sii-opt-front-report-view .sii-opt-report-table th,.sii-opt-front-report-view .sii-opt-report-table td{padding:3px!important}
 .sii-opt-front-report-view .sii-opt-report-evidence-thumbs img{width:40px!important;height:29px!important}
 .sii-opt-front-report-view h3{break-after:avoid-page}
 .sii-opt-front-report-view tr,.sii-opt-front-report-view .sii-opt-report-context-inline{break-inside:avoid!important}
}

/* v1.10.14 — impresión dedicada: el registro ES la hoja; no hereda Portal. */
@media print{
 @page{
  size:A4 portrait;
  margin:4mm 4mm 8mm;
  @top-left{content:""}
  @top-center{content:""}
  @top-right{content:""}
  @bottom-left{content:""}
  @bottom-center{content:"Página " counter(page) " / " counter(pages);font:8pt Arial,sans-serif;color:#475569}
  @bottom-right{content:""}
 }
 html,body.sii-opt-dedicated-print{margin:0!important;padding:0!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;background:#fff!important;overflow:visible!important}
 body.sii-opt-dedicated-print>.sii-opt-front-report-view{display:block!important;position:static!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important;transform:none!important}
 body.sii-opt-dedicated-print .sii-opt-report-panel{display:block!important;position:static!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;box-sizing:border-box!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;transform:none!important}
 body.sii-opt-dedicated-print .sii-opt-report-header-formal{grid-template-columns:minmax(0,1fr) 190px!important;padding:7px!important;margin:0 0 6px!important;border-radius:0!important}
 body.sii-opt-dedicated-print .sii-opt-report-header-formal .button{display:none!important}
 body.sii-opt-dedicated-print .sii-opt-front-report-meta-formal{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;margin:0 0 6px!important}
 body.sii-opt-dedicated-print .sii-opt-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;margin:0 0 6px!important}
 body.sii-opt-dedicated-print .sii-opt-report-table{width:100%!important;table-layout:auto!important}
}
