@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');

/* =========================================================================
   EXPEDIENTY FORENSIC EVIDENCE & PORTAL RENDERS (CSS STYLESHEET)
   Fidelidad 1:1 para evidencias de Contraloría, Fiscalía, SATJE y Screening
   ========================================================================= */

.forensic-evidence-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ── Encabezado de Auditoría Forense Superior ── */
.forensic-audit-header {
    border: 2px solid #1e3a8a;
    background: #f8fafc;
    border-radius: 4px;
    padding: 10px 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin-bottom: 12px;
}

.forensic-title {
    font-weight: 800;
    font-size: 0.96rem;
    color: #1e3a8a;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.forensic-row {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.45;
}

.forensic-state-clean {
    color: #15803d;
    font-weight: 800;
}

.forensic-state-warning {
    color: #dc2626;
    font-weight: 800;
}

.forensic-hash-row code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.74rem;
    color: #0f172a;
    word-break: break-all;
    background: #e2e8f0;
    padding: 1px 4px;
    border-radius: 3px;
}

.forensic-render-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    color: #0f172a;
    margin: 10px 0 6px 0;
}

.forensic-portal-wrapper {
    position: relative;
    border: 1px solid #d1d5db;
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* ── Marca de agua corporativa Expedienty ── */
.forensic-watermark {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(148, 163, 184, 0.42);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 3px;
    pointer-events: none;
    user-select: none;
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─────────────────────────────────────────────────────────────────────────────
   1. CONTRALORÍA GENERAL DEL ESTADO (CGE) - STYLES
   ───────────────────────────────────────────────────────────────────────────── */
.cge-inner-box {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11.5px;
    color: #1e293b;
}

.cge-radios-row {
    display: flex;
    gap: 28px;
    margin-bottom: 12px;
}

.cge-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    font-size: 11px;
    color: #334155;
    cursor: default;
}

.cge-radio-btn {
    width: 13px;
    height: 13px;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    display: inline-block;
    background: #ffffff;
}

.cge-radio-btn.active {
    background: #2563eb;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.cge-star {
    color: #2563eb;
    font-weight: 900;
}

.cge-grid-inputs {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.cge-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.cge-label {
    font-weight: bold;
    font-size: 11px;
    color: #0f172a;
}

.cge-input {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 5px 8px;
    min-height: 24px;
    background: #ffffff;
    color: #0f172a;
    font-size: 11.5px;
}

.cge-input-bold {
    font-weight: bold;
}

.cge-captcha-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.cge-captcha-input-placeholder {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 5px 8px;
    color: #94a3b8;
    font-size: 10.5px;
    text-transform: uppercase;
    background: #ffffff;
    max-width: 270px;
}

.cge-link-captcha {
    font-size: 10.5px;
    color: #2563eb;
    text-decoration: underline;
    margin-top: 3px;
    display: inline-block;
}

.cge-captcha-display {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 18px;
    display: inline-block;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.cge-captcha-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #1e293b;
    font-style: italic;
}

.cge-btn-row {
    text-align: center;
    margin: 10px 0 14px 0;
}

.cge-btn-buscar {
    background: #1d4ed8;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 6px 22px;
    font-size: 12px;
    font-weight: bold;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cge-table-controls {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #475569;
    margin-bottom: 6px;
}

.cge-table-container {
    border: 1px solid #1d4ed8;
    margin-bottom: 18px;
}

.cge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.cge-table thead {
    background: #1d4ed8;
    color: #ffffff;
}

.cge-table th {
    padding: 6px 10px;
    font-weight: bold;
    text-align: left;
    font-size: 10.5px;
    letter-spacing: 0.3px;
}

.cge-td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.cge-empty-text {
    text-align: center;
    padding: 14px;
    color: #64748b;
    font-size: 11px;
    font-style: italic;
    background: #ffffff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRESET: SRI EN LÍNEA (CONSULTA DE RUC & ESTADO TRIBUTARIO) - RÉPLICA 1:1
   ───────────────────────────────────────────────────────────────────────────── */
.sri-portal-window {
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    overflow: hidden;
}

.sri-top-banner {
    background: #154284;
    padding: 10px 18px;
    display: flex;
    align-items: center;
}

.sri-logo-text {
    color: #ffffff;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: Arial, sans-serif;
}

.sri-logo-sub {
    font-size: 16px;
    font-style: italic;
    font-family: 'Brush Script MT', 'Dancing Script', 'Segoe Script', cursive, sans-serif;
    font-weight: normal;
    color: #ffffff;
}

.sri-canvas-body {
    padding: 14px 22px 22px 22px;
    background: #ffffff;
    position: relative;
}

.sri-breadcrumbs {
    font-size: 10.5px;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sri-breadcrumbs a {
    color: #154284;
    text-decoration: none;
}

.sri-page-title {
    color: #154284;
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 16px 0;
    letter-spacing: -0.3px;
}

.sri-form-top-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 20px;
    margin-bottom: 14px;
}

.sri-field-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sri-field-label {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
}

.sri-field-value {
    font-size: 12px;
    color: #0f172a;
    font-weight: 600;
}

.sri-status-highlight-row {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 14px;
}

.sri-status-left-box {
    padding-top: 2px;
}

.sri-status-title {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.sri-status-big-text {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.sri-status-big-text.suspendido {
    color: #dc2626;
}

.sri-status-big-text.activo {
    color: #16a34a;
}

.sri-status-big-text.pasivo {
    color: #d97706;
}

.sri-actividad-box {
    border-radius: 2px;
    overflow: hidden;
}

.sri-actividad-header {
    background: #154284;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
}

.sri-actividad-body {
    font-size: 10px;
    color: #334155;
    padding: 5px 0;
    line-height: 1.35;
    font-weight: 600;
}

.sri-flags-row {
    display: flex;
    gap: 32px;
    font-size: 11px;
    margin-bottom: 16px;
    color: #1e293b;
}

.sri-flag-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sri-flag-item strong {
    font-weight: 700;
}

.sri-grid-table {
    width: 100%;
    margin-bottom: 12px;
    border-collapse: separate;
    border-spacing: 2px;
}

.sri-grid-table thead th {
    background: #154284;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 5px 6px;
    text-align: center;
    border: none;
}

.sri-grid-table tbody td {
    background: #ffffff;
    border: 1px solid #94a3b8;
    font-size: 11px;
    padding: 5px 6px;
    text-align: center;
    color: #1e293b;
    font-weight: 500;
}

.sri-btn-row {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 18px;
}

.sri-btn-nueva {
    background: #154284;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 6px 20px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: default;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.sri-btn-mostrar {
    position: absolute;
    right: 0;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 5px 12px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: default;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRESET: IESS (CUMPLIMIENTO DE OBLIGACIONES PATRONALES / MORA) - RÉPLICA 1:1
   ───────────────────────────────────────────────────────────────────────────── */
.iess-patronal-window {
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    overflow: hidden;
    padding: 0;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

/* Canvas amplio del portal con fondo blanco y ondas celestes oficiales del IESS */
.iess-portal-canvas {
    position: relative;
    background: #ffffff;
    background-image: 
        radial-gradient(ellipse 65% 55% at 100% 0%, #cbe8fa 0%, #e1f2fc 35%, rgba(255, 255, 255, 0) 75%),
        radial-gradient(ellipse 45% 35% at 85% 15%, #d9eefb 0%, rgba(255, 255, 255, 0) 65%);
    padding: 20px 28px 36px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Cabecera superior con logotipo oficial del IESS a la izquierda */
.iess-portal-page-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding-left: 4px;
}

.iess-official-brand {
    display: inline-flex;
    align-items: center;
}

/* Contenedor centrado de la tarjeta con icono de seguridad al pie derecho */
.iess-patronal-card-wrapper {
    max-width: 500px;
    width: 100%;
    margin: 8px auto 16px auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.iess-patronal-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #7cb9e2;
    box-shadow: 0 10px 30px rgba(15, 76, 129, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    overflow: hidden;
}

.iess-patronal-header {
    background: linear-gradient(180deg, #1b8ec8 0%, #1272a5 100%);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #0f5b84;
}

.iess-patronal-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.iess-patronal-titles {
    display: flex;
    flex-direction: column;
}

.iess-patronal-title {
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -0.2px;
    margin: 0;
}

.iess-patronal-sub {
    color: #e0f2fe;
    font-size: 10px;
    margin-top: 1px;
}

.iess-patronal-security-tag {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    cursor: default;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.iess-patronal-body {
    padding: 16px 16px 12px 16px;
    background: #ffffff;
}

.iess-patronal-form-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 12px;
}

.iess-patronal-input-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iess-patronal-input-label {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
}

.iess-patronal-input-box {
    width: 100%;
    max-width: 170px;
    border: 1px solid #94a3b8;
    background: #f8fafc;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    border-radius: 2px;
}

.iess-patronal-submit-btn {
    background: linear-gradient(180deg, #fce072 0%, #ebb913 100%);
    border: 1px solid #cca110;
    color: #111827;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 18px;
    border-radius: 3px;
    cursor: default;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    margin-top: 8px;
    display: inline-block;
    width: fit-content;
}

.iess-patronal-info-col {
    border: 1px solid #bae6fd;
    border-radius: 3px;
    overflow: hidden;
    background: #f0f9ff;
}

.iess-patronal-info-title {
    background: #0284c7;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 6px;
    letter-spacing: 0.5px;
}

.iess-patronal-info-desc {
    padding: 8px;
    font-size: 10px;
    color: #0369a1;
    line-height: 1.35;
    margin: 0;
}

.iess-patronal-status-banner {
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.iess-patronal-status-banner.no-empleador {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.iess-patronal-status-banner.al-dia {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.iess-patronal-status-banner.mora {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.iess-patronal-important-box {
    border: 1px solid #7dd3fc;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.iess-patronal-important-header {
    background: #0284c7;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iess-patronal-important-body {
    background: #f0f9ff;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iess-patronal-important-text {
    font-size: 10.5px;
    color: #0369a1;
    margin: 0;
    line-height: 1.35;
}

.iess-patronal-gear-icon {
    width: 20px;
    height: 20px;
    color: #0284c7;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. FISCALÍA GENERAL DEL ESTADO (FGE) - RÉPLICA 1:1 CON MARCO DE CAPTURA
   ───────────────────────────────────────────────────────────────────────────── */

/* Marco de Navegador / Captura de Pantalla Auténtica */
.fge-screenshot-outer-frame {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.fge-browser-top-bar {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fge-browser-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.fge-browser-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.fge-browser-dots .dot.red { background: #ef4444; }
.fge-browser-dots .dot.yellow { background: #f59e0b; }
.fge-browser-dots .dot.green { background: #10b981; }

.fge-browser-address-bar {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 3px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow: hidden;
    white-space: nowrap;
}

.fge-browser-address-bar .fge-url-txt {
    color: #1e293b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fge-screenshot-tag {
    font-size: 10px;
    font-weight: 800;
    color: #1e3a8a;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
}

/* Interior del Portal FGE */
.fge-portal-canvas-wrapper {
    padding: 18px 22px 36px 22px;
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
}

/* Encabezado FGE */
.fge-top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.fge-brand-left {
    display: flex;
    align-items: center;
}

.fge-logo-img {
    height: 48px;
    object-fit: contain;
}

.fge-header-right-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.fge-nav-links {
    display: flex;
    gap: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #003366;
    letter-spacing: 0.2px;
}

.fge-top-sub-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fge-pill-btn {
    border: 1px solid #003366;
    background: #ffffff;
    color: #003366;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 0.3px;
    cursor: default;
}

.fge-search-icon-btn {
    color: #003366;
    font-size: 12px;
    cursor: default;
}

/* Sub-descripción */
.fge-subheader-desc {
    font-size: 11px;
    color: #555555;
    margin-bottom: 14px;
    line-height: 1.35;
}

/* Cuerpo 2 Columnas */
.fge-portal-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Menú Lateral */
.fge-sidebar {
    width: 195px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fge-sidebar-btn {
    background: #999ca3;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: bold;
    padding: 8px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    line-height: 1.25;
    letter-spacing: 0.2px;
    text-align: left;
}

.fge-sidebar-btn.active {
    background: #002d62 !important;
}

/* Contenido Principal Derecho */
.fge-main-content {
    flex: 1;
    min-width: 0;
}

/* Barra Título Módulo */
.fge-module-title-bar {
    background: #284360;
    color: #ffffff;
    text-align: center;
    padding: 8px;
    border-radius: 4px 4px 0 0;
}

.fge-module-title-main {
    font-size: 13.5px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.fge-module-title-sub {
    font-size: 12.5px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Caja Legal SIAF (Azul Claro) */
.fge-siaf-legal-box {
    background: #eaf3fd;
    border: 1px solid #9ec5fe;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 10px 0;
    color: #1e3a8a;
    font-size: 10px;
    line-height: 1.45;
    text-align: justify;
}

/* Tarjeta Búsqueda */
.fge-search-card {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.fge-search-card-header {
    background: #284360;
    color: #ffffff;
    font-weight: bold;
    font-size: 11.5px;
    padding: 5px 12px;
}

.fge-search-card-body {
    background: #ffffff;
    padding: 12px;
}

/* 2 Columnas internas */
.fge-search-two-cols {
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
}

.fge-search-left-col {
    flex: 1.15;
}

.fge-search-right-col {
    flex: 0.85;
}

.fge-icon-select-row {
    display: flex;
    gap: 10px;
}

.fge-id-badge-icon {
    flex-shrink: 0;
    padding-top: 2px;
}

.fge-inputs-stack {
    flex: 1;
}

.fge-field-label {
    font-size: 10.5px;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 4px;
    display: block;
}

.fge-select-fake {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 10.5px;
    color: #334155;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fge-input-glow {
    border: 1px solid #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 11.5px;
    font-weight: bold;
    color: #0f172a;
    background: #ffffff;
    font-family: inherit;
    display: flex;
    align-items: center;
}

.fge-cursor-pipe {
    color: #2563eb;
    margin-right: 2px;
    animation: fgeBlink 1s infinite;
}

@keyframes fgeBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Caja de Criterios Derecha */
.fge-criteria-card {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    padding: 8px 10px;
    font-size: 9.5px;
    line-height: 1.4;
    color: #334155;
}

.fge-criteria-title {
    font-weight: bold;
    font-size: 10px;
    color: #0f172a;
    margin-bottom: 4px;
}

.fge-criteria-item {
    margin-bottom: 2px;
}

/* Caja Amarilla / Ámbar Legal */
.fge-amber-warning-box {
    background: #fffbeb;
    border: 1px solid #fde047;
    border-radius: 4px;
    padding: 8px 12px;
    color: #78350f;
    font-size: 9px;
    line-height: 1.45;
    text-align: justify;
    margin-bottom: 12px;
}

/* Resultados */
.fge-no-matches-msg {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #1d4ed8;
    margin: 14px 0 10px 0;
}

.fge-official-result-wrap {
    width: 100%;
    margin-top: 14px;
    margin-bottom: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.fge-official-result-wrap table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9.5px !important;
    font-family: inherit !important;
    text-align: left !important;
}

.fge-official-result-wrap table thead th {
    background: #284360 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 6px 10px !important;
    text-align: left !important;
    border: none !important;
    letter-spacing: 0.2px;
}

.fge-official-result-wrap table tbody td {
    padding: 5px 8px !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    vertical-align: middle !important;
    font-size: 9.5px !important;
}

.fge-official-result-wrap table tbody td[style*="font-weight: bold"],
.fge-official-result-wrap table tbody td[style*="font-weight:bold"] {
    color: #1e293b !important;
    background: #f8fafc !important;
}

/* Botones */
.fge-actions-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.fge-action-btn {
    background: #1d68a7;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 4px 14px;
    font-size: 10.5px;
    font-weight: bold;
    cursor: default;
}

/* Widget Traductor Abajo Derecha */
.fge-google-translate-btn {
    position: absolute;
    bottom: 8px;
    right: 14px;
    background: #0054a9;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. FUNCIÓN JUDICIAL (E-SATJE 2020 / CONSEJO DE LA JUDICATURA) - STYLES
   ───────────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap');

.esatje-portal-window,
.esatje-portal-window * {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Verdana, sans-serif !important;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.esatje-portal-window {
    display: flex;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    min-height: 480px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    position: relative;
    width: 100%;
}

/* Sidebar Izquierdo Azul Oscuro */
.esatje-sidebar {
    width: 200px;
    background: #172337;
    flex-shrink: 0;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.esatje-access-btn {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #00828a;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.esatje-access-circle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esatje-judicatura-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
    padding-left: 2px;
    width: 100%;
}

.esatje-judicatura-logo-img {
    width: 90px;
    height: auto;
    max-width: 92px;
    max-height: 58px;
    object-fit: contain;
    display: block;
}

.esatje-logo-fallback {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esatje-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.esatje-nav-btn {
    background: #00828a;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    line-height: 1.25;
    cursor: default;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.esatje-nav-btn.primary {
    background: #00828a;
}

.esatje-nav-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.esatje-sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.esatje-slogan-main {
    font-weight: 700;
    font-size: 12px;
    color: #ffffff;
    line-height: 1.2;
}

.esatje-slogan-sub {
    font-weight: 300;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2px;
}

.esatje-tricolor-line {
    display: flex;
    height: 3px;
    width: 40px;
    margin-top: 6px;
    border-radius: 2px;
    overflow: hidden;
}

.esatje-tricolor-yellow {
    flex: 2;
    background: #facc15;
}

.esatje-tricolor-blue {
    flex: 1;
    background: #2563eb;
}

.esatje-tricolor-red {
    flex: 1;
    background: #dc2626;
}

/* Área Principal Derecha */
.esatje-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.esatje-main-title {
    font-size: 14px;
    line-height: 1.3;
    color: #007380;
    margin: 0 0 16px 0;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esatje-title-bold {
    font-weight: 500;
}

.esatje-title-regular {
    font-weight: 300;
    margin-left: 4px;
}

.esatje-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 400;
    color: #212529;
    margin-bottom: 16px;
    cursor: default;
}

.esatje-filter-bar {
    background: #eceff1;
    border-radius: 18px;
    height: 32px;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    width: 100%;
}

.esatje-filter-pill {
    background: #475569;
    color: #ffffff;
    font-weight: 400;
    font-size: 12px;
    border-radius: 18px;
    padding: 0 18px;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 0.1px;
}

.esatje-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.esatje-meta-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.esatje-meta-label {
    font-weight: 700;
    font-size: 11px;
    color: #212529;
    line-height: 1.25;
}

.esatje-meta-val {
    font-weight: 400;
    color: #212529;
    font-size: 12px;
}

.esatje-counter-row {
    text-align: right;
    font-size: 12px;
    color: #212529;
    margin-bottom: 14px;
    font-weight: 700;
}

/* Tabla y Filas */
.esatje-table-header {
    background: #475569;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 400;
    font-size: 11.5px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    white-space: nowrap;
}

.esatje-col-no {
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.esatje-col-fecha {
    width: 130px;
    text-align: center;
    flex-shrink: 0;
}

.esatje-col-proceso {
    width: 170px;
    text-align: center;
    flex-shrink: 0;
}

.esatje-col-accion {
    flex: 1;
    padding: 0 12px;
    text-align: left;
}

.esatje-col-detalle {
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.esatje-rows-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.esatje-row-card {
    border: 1px solid #00828a;
    border-radius: 6px;
    background: #ffffff;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    transition: background 0.15s ease;
}

.esatje-row-card:hover {
    background: #f8fafc;
}

.esatje-row-card .esatje-col-no {
    font-weight: 400;
    color: #212529;
    font-size: 11.5px;
}

.esatje-row-card .esatje-col-fecha {
    font-size: 11.5px;
    color: #212529;
    font-weight: 400;
}

.esatje-row-card .esatje-col-proceso {
    font-weight: 400;
    color: #212529;
    font-size: 11.5px;
}

.esatje-row-card .esatje-col-accion {
    font-size: 11px;
    font-weight: 400;
    color: #212529;
    text-transform: uppercase;
    line-height: 1.3;
}

.esatje-row-card .esatje-col-detalle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.esatje-folder-icon {
    width: 18px;
    height: 18px;
    fill: #475569;
    cursor: default;
}

/* Estado Vacío (0 Registros) */
.esatje-empty-card {
    border: 1px solid #00828a;
    border-radius: 6px;
    background: #ffffff;
    padding: 24px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.esatje-empty-title {
    font-weight: 500;
    font-size: 0.88rem;
    color: #212529;
}

.esatje-empty-desc {
    font-size: 0.80rem;
    color: #6c757d;
    max-width: 520px;
    line-height: 1.35;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. SCREENING UAFE - STYLES
   ───────────────────────────────────────────────────────────────────────────── */
.uafe-screening-window {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding-bottom: 24px;
}

.uafe-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.uafe-screen-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e3a8a;
    text-transform: uppercase;
}

.uafe-badge-status {
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.uafe-badge-status.clean {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.uafe-badge-status.alert {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.uafe-screen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.uafe-card-item {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px 10px;
    background: #f8fafc;
}

.uafe-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.uafe-card-item p {
    font-size: 0.72rem;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

.uafe-tag-check {
    font-size: 0.72rem;
    font-weight: 800;
    color: #15803d;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.uafe-disclaimer-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.72rem;
    color: #475569;
    line-height: 1.4;
    text-align: justify;
}

/* ── Anexo Header Container ── */
.pdf-evidence-annex-section {
    margin-top: 2rem;
    page-break-before: always;
    break-before: page;
}

.pdf-evidence-annex-header {
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.pdf-evidence-annex-badge {
    display: inline-block;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.pdf-evidence-annex-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0a0a0a;
    margin: 0 0 6px 0;
}

.pdf-evidence-annex-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.pdf-evidence-page-divider {
    page-break-after: always;
    break-after: page;
    height: 15px;
}

/* ── Sección de Vista Previa Interactiva de Evidencias (UAFE / Screening) ── */
.pdf-evidence-preview-section {
    margin: 1.75rem 0 1.5rem 0;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    page-break-inside: avoid;
    break-inside: avoid;
}

.evidence-preview-header {
    margin-bottom: 12px;
}

.evidence-preview-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.evidence-badge-forensic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e3a8a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.evidence-status-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: 0.3px;
}

.evidence-preview-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #0a0a0a;
    margin: 6px 0 4px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.evidence-preview-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.evidence-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 16px 0;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.evidence-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.evidence-tab-btn:hover:not(.active) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.evidence-tab-btn.active {
    background: #1e3a8a !important;
    color: #ffffff !important;
    border-color: #1e3a8a !important;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.evidence-tab-btn.active .tab-indicator {
    background: #ffffff !important;
}

.tab-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}

.tab-indicator.alert {
    background: #ef4444;
}

.toggle-all-btn {
    margin-left: auto;
    background: #ffffff;
    border: 1px solid #94a3b8;
    color: #0f172a;
}

.toggle-all-btn:hover {
    background: #f1f5f9;
}

.evidence-preview-content-box {
    position: relative;
    min-height: 150px;
    transition: all 0.3s ease;
}

.evidence-footer-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 14px;
    font-size: 0.76rem;
    color: #475569;
    line-height: 1.4;
}

/* =========================================================================
   VISTA MÓVIL (PANTALLA): OCULTAR PREVISUALIZACIÓN DE CAPTURAS
   En dispositivos móviles (ancho <= 768px), las capturas simuladas se ocultan
   de la pantalla para evitar desproporciones o aspectos estirados.
   Al imprimir / exportar PDF (@media print), se restauran en formato A4 completo.
   ========================================================================= */
@media screen and (max-width: 768px) {
    .forensic-render-label,
    .fge-screenshot-outer-frame,
    .forensic-portal-wrapper,
    .fge-rasterized-image-output {
        display: none !important;
    }

    .forensic-mobile-capture-badge {
        display: flex !important;
        align-items: center;
        gap: 8px;
        background: #f8fafc;
        border: 1px dashed #cbd5e1;
        border-radius: 6px;
        padding: 9px 12px;
        margin-top: 10px;
        font-size: 0.8rem;
        color: #334155;
        font-weight: 600;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }
}

.forensic-mobile-capture-badge {
    display: none;
}

/* ── Estilos de Impresión / Guardar PDF (@media print) ── */
@media print {
    /* Forzar que en el PDF exportado (tanto desde móvil como PC) las capturas se muestren impecables */
    .forensic-render-label {
        display: block !important;
    }

    .fge-screenshot-outer-frame,
    .forensic-portal-wrapper {
        display: block !important;
        min-width: 650px !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .fge-rasterized-image-output {
        display: none !important;
    }

    /* ESATJE es un contenedor flex de 2 columnas (sidebar + contenido principal) */
    .esatje-portal-window {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        min-width: 650px !important;
        width: 100% !important;
    }

    .esatje-sidebar {
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .esatje-main {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .fge-portal-body {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .fge-sidebar {
        width: 195px !important;
        flex-shrink: 0 !important;
    }

    .fge-main-content {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .forensic-mobile-capture-badge {
        display: none !important;
    }

    .pdf-evidence-annex-section {
        display: block !important;
        page-break-before: always !important;
        break-before: page !important;
        padding-top: 4mm !important;
    }

    .pdf-evidence-preview-section {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin: 1.5rem 0 !important;
    }

    .evidence-tabs-bar,
    .evidence-footer-notice {
        display: none !important;
    }

    .pdf-evidence-item-wrapper {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 20px !important;
    }

    .pdf-evidence-page-divider {
        page-break-after: always !important;
        break-after: page !important;
        height: 0 !important;
        margin: 0 !important;
    }

    .forensic-evidence-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }

    .forensic-portal-wrapper {
        box-shadow: none !important;
    }
}
