/* ── Overlay / Panel de Validación de Firma Digital (estilo Adobe) ──────── */
#sig-validation-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sig-validation-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    width: 560px;
    max-width: 94vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: sigFadeIn 0.2s ease;
}

@keyframes sigFadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

#sig-validation-header {
    background: #1a73e8;
    color: #fff;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#sig-validation-header .fa-shield {
    font-size: 16px;
}

#sig-validation-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.9;
}
#sig-validation-close:hover {
    opacity: 1;
}

#sig-validation-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Sección de estado de integridad */
.sig-status-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
}

.sig-status-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.sig-status-icon.valid {
    background: #e8f5e9;
    color: #2e7d32;
}

.sig-status-icon.invalid {
    background: #ffebee;
    color: #c62828;
}

.sig-status-icon.unknown {
    background: #fff3e0;
    color: #e65100;
}

.sig-status-text h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.sig-status-text p {
    margin: 0;
    font-size: 13px;
    color: #5f6368;
}

/* Tabla de metadatos */
.sig-detail-section {
    padding: 14px 20px;
    border-bottom: 1px solid #e9ecef;
}

.sig-detail-section h5 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sig-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.sig-detail-table tr {
    border-bottom: 1px solid #f1f3f4;
}

.sig-detail-table tr:last-child {
    border-bottom: none;
}

.sig-detail-table td {
    padding: 8px 0;
    font-size: 13px;
    vertical-align: top;
}

.sig-detail-table td:first-child {
    color: #5f6368;
    width: 150px;
    font-weight: 500;
}

.sig-detail-table td:last-child {
    color: #212529;
    word-break: break-all;
}

/* Footer con acciones */
#sig-validation-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

/* Etiquetas de badge para formatos */
.sig-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sig-badge.valid   { background: #e8f5e9; color: #2e7d32; }
.sig-badge.invalid { background: #ffebee; color: #c62828; }
.sig-badge.neutral { background: #e8eaf6; color: #283593; }

/* Resaltar fingerprint */
.sig-fingerprint {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 11px;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

/* ── Badge de estado de firma en la cabecera de la modal ──────────────── */
.sig-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    vertical-align: middle;
    line-height: 1.4;
    white-space: nowrap;
}

.sig-header-badge.loading { background: #f1f3f4; color: #5f6368; }
.sig-header-badge.valid   { background: #e8f5e9; color: #2e7d32; }
.sig-header-badge.invalid { background: #ffebee; color: #c62828; }
.sig-header-badge.unknown { background: #fff3e0; color: #e65100; }