:root {
    --institucional: #8B0000;
    --institucional-hover: #660000;
    --fondo: #f3f4f6;
    --texto: #1f2937;
    --gris-claro: #e5e7eb;
    --gris-medio: #6b7280;
    --azul: #1e3a8a;
    --rojo: #dc2626;
    --amarillo: #eab308;
    --verde: #16a34a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--fondo);
    color: var(--texto);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-red {
    color: var(--rojo);
}

.text-yellow {
    color: var(--amarillo);
}

.text-white {
    color: white;
}

.text-gray-200 {
    color: #e5e7eb;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-blue {
    color: var(--azul);
}

.text-green {
    color: var(--verde);
}

.font-bold {
    font-weight: 700;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.bg-blue {
    background-color: var(--azul);
}

/* --- MODAL AVISO LEGAL --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/fondo-aviso.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.modal-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 0, 0, 0.7);
}

.modal-card {
    position: relative;
    background: rgba(40, 5, 5, 0.9);
    border: 1px solid #5a1a1a;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    backdrop-filter: blur(5px);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header i {
    color: var(--amarillo);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.modal-header h2 {
    color: var(--amarillo);
    font-size: 1.125rem;
    line-height: 1.4;
}

.modal-body p {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    text-align: justify;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-ingresar {
    background: white;
    color: var(--institucional);
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: 0.2s;
}

.btn-ingresar:hover {
    background: #f3f4f6;
}

/* --- HEADER --- */
.header-main {
    background: white;
    border-bottom: 4px solid var(--institucional);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-sice {
    height: 50px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--institucional);
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--gris-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.id-gobpe {
    background: #f3f4f6;
    border: 1px solid var(--gris-claro);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.id-gobpe i {
    color: var(--gris-medio);
}

.header-titles {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.title-main {
    font-weight: bold;
    font-size: 1.125rem;
    color: #1f2937;
}

.title-sub {
    font-size: 0.75rem;
    color: var(--gris-medio);
}

.logo-scsej {
    height: 50px;
}

.header-nav {
    background: var(--institucional);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
    color: white;
    font-size: 0.875rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.75rem 0;
    font-weight: bold;
    border-bottom: 3px solid transparent;
}

.nav-link.active {
    border-bottom: 3px solid white;
}

.nav-link:hover {
    color: #fca5a5;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switch {
    display: flex;
    gap: 0.25rem;
}

.lang-switch span {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
}

.lang-switch span.active {
    background: white;
    color: var(--institucional);
}

.lang-switch span:not(.active):hover {
    background: rgba(255, 255, 255, 0.2);
}

.session-info {
    font-size: 0.75rem;
    text-align: right;
    border-left: 1px solid #7f1d1d;
    padding-left: 1.5rem;
}

/* --- MAIN --- */
.main-content {
    padding: 2rem 0;
    flex: 1;
}

.title-search {
    text-align: center;
    font-size: 1.5rem;
    color: var(--institucional);
    margin-bottom: 1.5rem;
}

/* --- BUSCADOR --- */
.search-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--gris-claro);
}

.tab {
    flex: 1;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    background: #f9fafb;
    color: var(--gris-medio);
    cursor: pointer;
    font-size: 1rem;
}

.tab.active {
    background: var(--institucional);
    color: white;
}

.search-body {
    padding: 2rem;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    color: #374151;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.code-form {
    border: 1px solid var(--gris-claro);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.code-group {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.code-item label {
    font-size: 0.65rem;
    color: #374151;
    text-align: center;
    margin-bottom: 0.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.code-item label span {
    color: var(--gris-medio);
    font-weight: normal;
}

.code-item input {
    width: 60px;
    text-align: center;
    border: none;
    border-bottom: 2px solid var(--gris-claro);
    font-size: 1rem;
    font-weight: bold;
    padding: 0.25rem;
    outline: none;
    color: #1f2937;
}

.code-item input:focus {
    border-bottom-color: var(--institucional);
}

.separator {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--gris-medio);
    margin-bottom: 0.25rem;
}

.ejemplos {
    text-align: center;
    margin-bottom: 2rem;
}

.ejemplos p {
    font-size: 0.75rem;
    color: var(--gris-medio);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ejemplo-box {
    background: #fefce8;
    border: 1px solid #fde047;
    color: #854d0e;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
    max-width: 400px;
    margin: 0 auto 0.5rem auto;
}

.parte-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.parte-group label {
    width: 15%;
    text-align: right;
    padding-right: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.input-parte {
    width: 85%;
    padding: 0.75rem;
    border: 1px solid var(--gris-claro);
    border-radius: 4px;
    outline: none;
    font-size: 0.875rem;
}

.input-parte:focus {
    border-color: var(--institucional);
}

.helper-text {
    font-size: 0.75rem;
    color: #2563eb;
    font-style: italic;
    text-align: right;
    margin-bottom: 1.5rem;
    padding-left: 15%;
}

.obligatorio {
    text-align: center;
    font-size: 0.875rem;
    color: var(--rojo);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.captcha-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.captcha-title {
    font-weight: bold;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.captcha-box {
    background: black;
    color: #dc2626;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-style: italic;
    padding: 0.5rem 1.5rem;
    letter-spacing: 0.2em;
    transform: skewX(-10deg);
    user-select: none;
}

.captcha-text {
    text-decoration: line-through;
}

.btn-captcha-icon {
    background: white;
    border: 1px solid var(--gris-claro);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gris-medio);
    font-size: 1rem;
}

.btn-captcha-icon:hover {
    background: #f3f4f6;
}

.captcha-input {
    border: 1px solid var(--gris-claro);
    border-radius: 4px;
    padding: 0.5rem;
    width: 120px;
    outline: none;
    font-size: 1rem;
}

.captcha-input:focus {
    border-color: var(--institucional);
}

.btn-consultar {
    background: var(--institucional);
    color: white;
    font-weight: bold;
    padding: 0.75rem 4rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

.btn-consultar:hover {
    background: var(--institucional-hover);
}

.captcha-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gris-medio);
    margin-top: 1rem;
}

/* --- RESULTADO DE LA BÚSQUEDA --- */
.back-button-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-back {
    background: none;
    border: none;
    color: #1e3a8a;
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-back:hover {
    color: #3b82f6;
}

.results-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.results-header {
    background: #6b7280;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-partes {
    display: flex;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.search-partes input {
    border: none;
    padding: 0.5rem;
    outline: none;
    width: 200px;
    font-size: 0.875rem;
}

.search-partes button {
    background: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--gris-medio);
    border-left: 1px solid var(--gris-claro);
}

.result-item {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-top: none;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 0 0 8px 8px;
}

.result-item:hover {
    background: #fee2e2;
}

.result-icon {
    color: var(--rojo);
    font-size: 1.5rem;
    margin-right: 1rem;
    font-weight: bold;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-code {
    font-weight: bold;
    font-size: 1.125rem;
    color: #1f2937;
}

.result-court {
    font-size: 0.875rem;
    color: #4b5563;
}

.result-parties {
    font-size: 0.875rem;
    color: #6b7280;
}

.result-action {
    border: 1px solid var(--rojo);
    color: var(--rojo);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    transition: 0.2s;
}

.result-item:hover .result-action {
    background: var(--rojo);
    color: white;
}

/* --- REPORTE Y SEGUIMIENTO --- */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: #1f2937;
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 2rem;
    font-size: 0.875rem;
}

.report-row {
    display: flex;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.report-row .label {
    width: 40%;
    font-weight: bold;
    color: #374151;
}

.report-row .value {
    width: 60%;
    color: #1f2937;
}

/* ESTADO, PROGRESO Y LÍNEA DE TIEMPO (MCCLO) */
.progress-section {
    margin-bottom: 2rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.5rem;
}

.progress-label span {
    color: var(--rojo);
}

.progress-bar-bg {
    width: 100%;
    background: var(--gris-claro);
    border-radius: 9999px;
    height: 1rem;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--rojo);
    height: 1rem;
    border-radius: 9999px;
}

.progress-note {
    font-size: 0.875rem;
    color: var(--azul);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.etapas-section h4,
.hitos-section h4 {
    font-size: 1rem;
    color: #1f2937;
    border-bottom: 1px solid var(--gris-claro);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.etapas-list {
    list-style: none;
    padding: 0;
}

.etapas-list li {
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--gris-claro);
    font-size: 0.875rem;
}

.etapas-list li strong {
    color: #1f2937;
}

.etapas-list li span {
    color: var(--gris-medio);
    font-size: 0.75rem;
}

.etapas-list li.active-etapa {
    background: #f0fdf4;
    border-left: 3px solid var(--verde);
    padding-left: 1rem;
}

.badge-etapa {
    background: var(--verde);
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
}

.hito-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.hito-item i {
    color: var(--verde);
    margin-top: 0.25rem;
}

.hito-item strong {
    display: block;
    color: #1f2937;
}

.hito-item div {
    color: var(--gris-medio);
    font-size: 0.75rem;
}

/* PARTES PROCESALES TABLA */
.table-responsive {
    overflow-x: auto;
}

.partes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.partes-table th {
    background: #f9fafb;
    color: #1f2937;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--gris-claro);
    font-weight: bold;
}

.partes-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gris-claro);
    vertical-align: middle;
}

.partes-table tr:hover {
    background: #f9fafb;
}

.interop-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-interop {
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: white;
}

.btn-reniec {
    background: #2563eb;
}

.btn-reniec:hover {
    background: #1d4ed8;
}

.btn-migraciones {
    background: #7c3aed;
}

.btn-migraciones:hover {
    background: #6d28d9;
}

.btn-inpe {
    background: #d97706;
}

.btn-inpe:hover {
    background: #b45309;
}

.btn-pnp {
    background: #059669;
}

.btn-pnp:hover {
    background: #047857;
}

/* Seguimiento del Expediente */
.seguimiento-container {
    padding: 1.5rem;
    background: #f3f4f6;
    display: flex;
    flex-direction: column-reverse;
    gap: 1.5rem;
}

.seguimiento-item {
    background: white;
    border: 1px solid var(--gris-claro);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.seguimiento-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: #4b5563;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    z-index: 10;
}

.seguimiento-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--gris-claro);
}

.seg-col {
    font-size: 0.875rem;
    color: #374151;
}

.seg-col i {
    color: var(--gris-medio);
    margin-right: 0.5rem;
}

.seguimiento-sumilla {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid var(--gris-claro);
}

.sumilla-title {
    font-size: 0.875rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.25rem;
}

.sumilla-title i {
    color: var(--gris-medio);
    margin-right: 0.5rem;
}

.seguimiento-sumilla p {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
}

.seguimiento-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.usuario-responsable {
    font-size: 0.875rem;
    font-weight: bold;
    color: #374151;
}

.btn-pdf-rojo {
    background: var(--institucional);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.btn-pdf-rojo:hover {
    background: var(--institucional-hover);
}

/* NUEVO DISEÑO DE NOTIFICACIONES */
.notif-card {
    border: 1px solid #fecaca;
    border-left: 4px solid var(--institucional);
    border-radius: 4px;
    margin: 1rem 1.5rem;
    background: #fffafa;
    padding: 1rem;
}

.notif-header {
    color: var(--institucional);
    font-weight: bold;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #fecaca;
    padding-bottom: 0.5rem;
}

.notif-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.notif-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.notif-info span {
    color: var(--gris-medio);
}

.notif-info-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.notif-forma {
    font-size: 0.875rem;
}

.notif-forma span {
    color: var(--gris-medio);
}

.notif-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-notif-details {
    background: #4b5563;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-notif-details:hover {
    background: #374151;
}

.btn-notif-pdf {
    background: var(--institucional);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-notif-pdf:hover {
    background: var(--institucional-hover);
}

/* --- MODAL PDF --- */
.pdf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal-content {
    background: white;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pdf-modal-header {
    background: #1f2937;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-modal-header h3 {
    font-size: 1rem;
    margin: 0;
}

.btn-close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
}

.pdf-modal-body {
    flex: 1;
    background: #e5e7eb;
}

/* --- MODAL RENIEC --- */
#reniec-modal {
    z-index: 250;
}

.reniec-card {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.reniec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gris-claro);
    background: #f8fafc;
}

.reniec-logo-text {
    font-weight: bold;
    font-size: 1.25rem;
    color: #1e3a8a;
    letter-spacing: 1px;
}

.reniec-body {
    padding: 1.5rem;
    text-align: center;
}

.reniec-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--verde);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reniec-content-box {
    display: flex;
    gap: 1.5rem;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1.5rem;
    background: #eff6ff;
    text-align: left;
    margin-bottom: 1.5rem;
}

.reniec-photo {
    width: 120px;
    height: 150px;
    background: white;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reniec-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reniec-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.reniec-row strong {
    color: #1e3a8a;
    margin-right: 0.25rem;
}

.reniec-match {
    background: #dcfce7;
    color: #166534;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 0.5rem;
    border: 1px solid #86efac;
}

.btn-reniec-cerrar {
    background: #4b5563;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
}

.btn-reniec-cerrar:hover {
    background: #374151;
}

/* --- MODAL DETALLES --- */
#detalles-modal {
    z-index: 250;
}

.detalles-card {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.detalles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gris-claro);
    background: white;
}

.detalles-header h3 {
    font-size: 1rem;
    color: var(--institucional);
    font-weight: bold;
    margin: 0;
}

.detalles-body {
    padding: 1.5rem;
}

.detalles-row {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.detalles-row span {
    color: var(--gris-medio);
    width: 120px;
}

.detalles-row strong {
    color: #1f2937;
}

.detalles-group {
    border: 1px solid var(--gris-claro);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.group-header {
    background: #6b7280;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.group-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.75rem;
}

.group-row:last-child {
    border-bottom: none;
}

.group-row span:first-child {
    color: var(--gris-medio);
}

.group-row span:last-child {
    color: #1f2937;
    font-weight: bold;
    text-align: right;
}

.detalles-forma {
    font-size: 0.875rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
}

.detalles-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--gris-claro);
    padding-top: 1rem;
}

.btn-detalles-cerrar {
    background: var(--institucional);
    color: white;
    border: none;
    padding: 0.5rem 2rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.btn-detalles-cerrar:hover {
    background: var(--institucional-hover);
}

/* --- FOOTER Y WIDGETS --- */
.footer-main {
    background: #1f2937;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.75rem;
    margin-top: auto;
}

.footer-main p {
    margin-bottom: 0.25rem;
}

.btn-secondary {
    background: var(--gris-medio);
    color: white;
    font-weight: bold;
    padding: 0.5rem 2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}

.widget-academico {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    background: #1f2937;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    max-width: 24rem;
    z-index: 40;
    border-left: 4px solid var(--amarillo);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.widget-academico p {
    font-size: 0.75rem;
    color: #d1d5db;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {

    .header-top,
    .header-nav {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-right {
        flex-direction: column;
        gap: 0.5rem;
    }

    .session-info {
        border-left: none;
        padding-left: 0;
    }

    .code-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .partes-grid {
        grid-template-columns: 1fr;
    }

    .seguimiento-header {
        grid-template-columns: 1fr;
    }

    .timeline-horizontal {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .timeline-horizontal::before {
        display: none;
    }

    .timeline-point {
        flex-direction: row;
        gap: 1rem;
        min-width: auto;
    }

    .timeline-date {
        margin-bottom: 0;
    }

    .seguimiento-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
    }

    .search-partes input {
        width: 100%;
    }

    .notif-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .notif-info-right {
        align-items: flex-start;
    }

    .reniec-content-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Agrega esto al final de tu archivo styles.css */
    .author-name {
        font-size: 0.65rem;
        color: #6b7280;
        font-weight: 600;
        margin-top: 0.2rem;
        letter-spacing: 0.5px;
    }

    /* --- AJUSTES DE LOGOS EN HEADER --- */
    .logo-carpeta {
        height: 50px;
        /* Ajusta la altura según el tamaño de tu imagen carpeta.png */
        object-fit: contain;
    }

    /* --- ESTILOS PARA PREGUNTAS FRECUENTES (FAQ) --- */
    .faq-container {
        max-width: 900px;
        margin: 0 auto;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .faq-item {
        border-bottom: 1px solid var(--gris-claro);
    }

    .faq-item:last-child {
        border-bottom: none;
    }

    .faq-question {
        padding: 1.5rem;
        font-weight: bold;
        color: #1f2937;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #f9fafb;
        transition: all 0.3s ease;
    }

    .faq-question:hover {
        background: #f3f4f6;
        color: var(--institucional);
    }

    .faq-question i {
        transition: transform 0.3s ease;
        color: var(--gris-medio);
    }

    .faq-question.active i {
        transform: rotate(180deg);
        color: var(--institucional);
    }

    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out, padding 0.4s ease-out;
        background: white;
        padding: 0 1.5rem;
        color: #4b5563;
        font-size: 0.875rem;
        line-height: 1.6;
        border-top: 1px solid transparent;
    }

    .faq-answer.show {
        max-height: 500px;
        /* Altura máxima para desplegar */
        padding: 1.5rem;
        border-top: 1px solid var(--gris-claro);
    }
}