/**
 * 📂 Nombre del archivo: ci.css
 * 📌 Ruta: /assets/css/ci.css
 * 📌 Descripción: Hoja de estilos principal del sistema BJI.
 * 👤 Autor: Boletín Judicial Informativo – BJI
 
 */

/* ===================================================
   1. PALETA INSTITUCIONAL
=================================================== */
:root {
    --bji-azul: #1d859b;
    --bji-verde: #759c25;
    --bji-ocre: #875706;
    --bji-beige: #d7c3b2;
    --bji-crema: #f5e3d5;
    --bji-blanco: #ffffff;
    --bji-gris: #6c757d;
}

/* ===================================================
   2. MODO INSTITUCIONAL
=================================================== */
body.modo-institucional {
    background-color: var(--bji-crema) !important;
    color: #212529;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root, [data-bs-theme="light"], body.modo-institucional {
    --bs-body-bg: var(--bji-crema) !important;
    --bs-body-color: #212529 !important;
    --bs-nav-tabs-border-color: var(--bji-azul) !important;
    --bs-nav-tabs-link-hover-border-color: var(--bji-azul) !important;
    --bs-nav-tabs-link-active-color: var(--bji-blanco) !important;
    --bs-nav-tabs-link-active-bg: var(--bji-azul) !important;
    --bs-nav-tabs-link-active-border-color: var(--bji-azul) !important;
}

/* ===================================================
   3. PORTADA INSTITUCIONAL
=================================================== */
.portada-bji {
    background: url('../../imagencorp/portada-institucional.png') no-repeat center center;
    background-size: cover;
    height: 100vh;
    position: relative;
}
.overlay-bji { background-color: rgba(0,0,0,0.5); padding: 50px; border-radius: 10px; color: var(--bji-blanco); }
.titulo-bji { font-size: 3rem; font-weight: bold; color: var(--bji-blanco); text-shadow: 2px 2px 4px rgba(0,0,0,0.7); }
.slogan-bji { font-size: 1.5rem; margin-top: 20px; color: var(--bji-crema); }

/* ===================================================
   4. CONTENEDORES Y RECUADROS
=================================================== */
.container { max-width: 1300px; }
.recuadro-bji { background-color: var(--bji-blanco); border-left: 6px solid var(--bji-azul); border-radius: 8px; padding: 18px; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.recuadro-bji h5 { color: var(--bji-azul); font-weight: 600; margin-bottom: 15px; }
.recuadro-bji-claro { background-color: var(--bji-crema); border-left: 6px solid var(--bji-verde); border-radius: 8px; padding: 18px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.recuadro-bji-claro h5 { color: var(--bji-azul); font-weight: 600; margin-bottom: 15px; }

/* ===================================================
   5. BOTONES
=================================================== */
.btn-bji { background-color: var(--bji-azul); color: var(--bji-blanco); border-radius: 6px; padding: 8px 18px; font-weight: 500; border: none; }
.btn-bji:hover { background-color: #166a7b; }
.btn-advertencia { background-color: var(--bji-ocre); color: var(--bji-blanco); border: none; padding: 8px 18px; border-radius: 6px; font-weight: 500; }
.btn-advertencia:hover { background-color: #6f4605; }
.btn-advertencia-grande { background-color: var(--bji-ocre); color: var(--bji-blanco); padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 1rem; transition: background-color 0.3s ease; }
.btn-advertencia-grande:hover { background-color: #6f4605; transform: scale(1.05); }

.btn-regresar {
    background-color: #6c757d;   /* gris neutro */
    border-color: #6c757d;
    color: #ffffff;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.btn-regresar:hover {
    background-color: #5a6268;   /* tono más oscuro para hover */
    border-color: #5a6268;
    color: #ffffff;
}



/* ===================================================
   6. TABLAS
=================================================== */
.table { color: #212529; }
.table-bji thead th { background-color: var(--bji-azul); color: var(--bji-blanco); font-weight: 600; text-align: center; }
.table-bji tbody td:nth-child(2), .table-bji tbody td:nth-child(3), .table-bji tbody td:nth-child(4), .table-bji tbody td:nth-child(5) { background-color: var(--bji-crema); }
.table-bji tbody tr.table-inactivo { background-color: #f0e6e6; color: var(--bji-gris); }
.table-bji tbody tr.table-inactivo td { background-color: #f9dede; }

/* Actuaciones */
.table-actuaciones { font-size: 1rem; border: 2px solid #444; width: 100%; table-layout: fixed; }
.table-actuaciones th, .table-actuaciones td { padding: 12px; vertical-align: middle; text-align: center; }

/* Procesos */
.tabla-procesos { margin: 20px auto; text-align: center; border-collapse: collapse; }
.tabla-procesos th { background-color: var(--bji-azul); color: var(--bji-blanco); padding: 10px; }
.tabla-procesos td { padding: 15px; font-size: 1.5rem; font-weight: bold; }

/* Estados */
.estado-vencida { background-color: #ff0000; color: #fff; }
.estado-menor5 { background-color: #c25400; color: #fff; }
.estado-menor10 { background-color: #7db500; color: #fff; }
.estado-mayor10 { background-color: #4aff00; color: #000; }

/* ===================================================
   7. DOCUMENTOS
=================================================== */
.documento-bji { border: 2px solid var(--bji-azul); border-radius: 8px; margin-top: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); width: 100%; height: 700px; }

/* ===================================================
   8. ENCABEZADO Y FOOTER
=================================================== */
.encabezado-bji {
    background-color: var(--bji-azul);
    color: var(--bji-blanco);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.encabezado-bji h2 {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--bji-crema);
    margin-bottom: 10px;
}
.encabezado-bji p {
    font-style: italic;
    margin: 0;
    font-weight: 500;
    color: var(--bji-blanco);
}

footer {
    background-color: var(--bji-azul);
    color: var(--bji-blanco);
    padding: 15px;
    margin-top: 40px;
    font-size: 0.9rem;
}
footer a {
    color: var(--bji-crema);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* Fila resumen institucional */
.fila-resumen-bji {
    background-color: var(--bji-beige);
    font-weight: bold;
    color: #212529;
}

@media print {
    /* Ocultar botones y elementos interactivos */
    .btn, .mt-3, .alert {
        display: none !important;
    }

    /* Fondo blanco para impresión */
    body.modo-institucional {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    /* Tablas más limpias */
    .table {
        border: 1px solid #000;
        border-collapse: collapse;
    }
    .table th, .table td {
        border: 1px solid #000;
        padding: 6px;
    }

    /* Encabezado institucional en impresión */
    h5, h4 {
        color: #000 !important;
        text-align: center;
        margin-bottom: 15px;
    }

    /* Fecha de generación destacada */
    .fecha-generacion {
        text-align: right;
        font-style: italic;
        margin-bottom: 10px;
    }
}

/* ===================================================
   FECHA DE CREACIÓN EN SISTEMA
=================================================== */
.fecha-sistema-bji {
    background-color: var(--bji-azul);   /* Azul institucional */
    color: var(--bji-blanco);            /* Texto blanco */
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-align: center;
}
.fecha-sistema-bji i {
    margin-right: 8px;
    color: var(--bji-crema);             /* Ícono en color crema */
}
/* Fondo institucional azul */
.bg-bji {
    background-color: var(--bji-azul) !important;
}

/* Texto institucional azul */
.text-bji {
    color: var(--bji-azul) !important;
}

/* Texto blanco institucional */
.text-white {
    color: var(--bji-blanco) !important;
}

.detalle-radicado {
    background-color: var(--bji-crema);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.radicado-corto {
    color: var(--bji-azul);       /* Azul institucional */
    font-weight: bold;            /* Negrilla */
    background-color: var(--bji-crema);
    padding: 3px 6px;
    border-radius: 4px;

    letter-spacing: 1px;          /* Espaciado para destacar */
    box-shadow: 0 0 5px rgba(0,0,0,0.15); /* Sombra ligera */
}

.resultado-bji {
    background-color: #f9f9f9;   /* fondo suave */
    border: 1px solid #ddd;      /* borde gris claro */
    border-radius: 8px;          /* esquinas redondeadas */
    padding: 15px;               /* espacio interno */
    margin-bottom: 20px;         /* separación entre bloques */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* sombra ligera */
}

.resultado-bji table th {
    background-color: #0275d8;   /* azul corporativo */
    color: #fff;
    text-align: center;
}

.resultado-bji table td {
    vertical-align: top;
}
/* Resalte para Sujetos Procesales */
.color-sujetos {
    background-color: #f0f8ff;   /* azul muy claro */
    border: 1px solid #0275d8;   /* borde azul */
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Resalte para Documentos del Proceso */
.color-documentos {
    background-color: #fff8e1;   /* amarillo suave */
    border: 1px solid #f0ad4e;   /* borde naranja */
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


/* Resalte para Actuaciones del Proceso */
.color-actuaciones {
    background-color: #e8f5e9;              /* verde muy claro */
    border: 1px solid var(--bji-verde);     /* borde verde institucional */
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Resalte para Detalles del Proceso */
.color-detalles {
    background-color: #f5f5f5;              /* gris muy suave */
    border: 1px solid var(--bji-azul);      /* borde azul institucional */
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}




/* ===================================================
   9. SWEETALERT INSTITUCIONAL
=================================================== */

/* Fondo claro para mensajes informativos */
.swal-info-bg {
    background-color: #f9f9f9 !important;
    color: #333 !important;
}

/* Texto destacado en azul institucional */
.swal-radicado {
    color: var(--bji-azul);
    font-weight: bold;
}

/* Texto destacado en rojo (alerta) */
.swal-alert {
    color: #d9534f;
    font-weight: bold;
}

/* Botón de confirmación institucional */
.swal-confirm {
    background-color: var(--bji-azul) !important;
    color: var(--bji-blanco) !important;
}

/* Botón de cancelación institucional */
.swal-cancel {
    background-color: var(--bji-verde) !important;
    color: var(--bji-blanco) !important;
}

.fila-duplicada {
    background-color: #ffe6e6 !important; /* rojo muy claro */
    color: #000;
}

/* ===== Correcciones de responsividad ===== */

/* Contenedores flexibles */
.container { max-width: 95vw; }
.recuadro-bji { max-width: 90vw; }

/* Tablas adaptables */
.table-bji, .table-actuaciones {
  width: 100%;
  table-layout: auto; /* permite que las columnas se ajusten */
  word-wrap: break-word;
}

/* Botones escalables */
.btn-bji, .btn-advertencia, .btn-advertencia-grande {
  padding: 0.6em 1.2em; /* relativo a la fuente */
  font-size: 1em;       /* escala con zoom */
}

/* Tipografía general */
body.modo-institucional {
  font-size: 1rem; /* base relativa */
  line-height: 1.5;
}


/* =========================================================
   ESTILOS INSTITUCIONALES BJI - TABLAS DE ACTUACIONES
   ========================================================= */

/* --- Tema Verde Jurídico + Crema --- */
.table {
    border: 1px solid var(--bji-verde); /* marco verde jurídico */
    border-collapse: collapse;
}

.table th, .table td {
    border: 1px solid rgba(0, 100, 0, 0.3); /* líneas internas verdes translúcidas */
    padding: 8px;
}

/* Filas alternas con fondo crema y blanco */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bji-crema);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #fdfdfd;
}

/* Encabezado verde jurídico con texto blanco */
.table thead th {
    background-color: var(--bji-verde);
    color: var(--bji-blanco);
    text-align: center;
    font-weight: 600;
}

/* Botón institucional */
a.btn-verdoc {
    display: inline-block;
    background-color: #1d859b; /* azul institucional para contraste */
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

/* --- Tema Azul Institucional (alternativo) ---
   Descomenta este bloque si prefieres volver al esquema azul
.table {
    border: 1px solid var(--bji-azul);
}
.table th, .table td {
    border: 1px solid rgba(29,133,155,0.3);
}
.table thead th {
    background-color: var(--bji-azul);
    color: var(--bji-blanco);
}
*/

/* Recuadro Ocre Institucional */
.recuadro-bji-ocre {
    background-color: var(--bji-crema);       /* fondo crema para suavizar */
    border-left: 6px solid var(--bji-ocre);   /* borde ocre institucional */
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.recuadro-bji-ocre h4, 
.recuadro-bji-ocre h5 {
    color: var(--bji-ocre);                   /* títulos en ocre */
    font-weight: 600;
    margin-bottom: 15px;
}

/* Recuadro Gris Neutro */
.recuadro-bji-gris {
    background-color: #f8f9fa;                /* gris muy claro */
    border-left: 6px solid var(--bji-gris);   /* borde gris neutro */
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.recuadro-bji-gris h4, 
.recuadro-bji-gris h5 {
    color: var(--bji-gris);                   /* títulos en gris */
    font-weight: 600;
    margin-bottom: 15px;
}

