/* ========================================
   ESTILOS ESTANDARIZADOS - SISTEMA SIGADMA
   Fuerza Aérea del Perú
   ======================================== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* ========================================
   TABLAS
   ======================================== */

table {
    border-collapse: collapse;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

table td {
    padding: 5px 8px;
    border: 1px solid #E5E5E5;
    font-size: 15px;
}

/* Celdas de etiquetas/datos - Alineación izquierda */
.datos_izq {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
    width: 30%;
    min-width: 180px;
    max-width: 300px;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    font-family: Arial, sans-serif;
    /*white-space: nowrap;*/
}

/* Variantes de tamaño */
.datos_izq-sm {
    width: 25%;
    min-width: 120px;
    max-width: 180px;
}

.datos_izq-md {
    width: 30%;
    min-width: 200px;
    max-width: 250px;
}

.datos_izq-lg {
    width: 35%;
    min-width: 240px;
    max-width: 320px;
}

/* Celdas de etiquetas/datos - Alineación centrada */
.datos_cen {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

/* Celdas de etiquetas/datos - Alineación derecha */
.datos_der {
    background-color: #FFFFFF;
    color: #000000;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

/* Cabeceras de secciones - Azul institucional CASED */
.celdacabinc {
    background: #003366;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    padding: 4px;
    text-align: center;
    border: none;
}

/* Celdas con campos INPUT */
.input_data {
    background-color: #FFFFFF;
    color: #000000;
    text-align: left;
    vertical-align: middle;
    padding: 5px 8px;
}

/* Celdas con campos SELECT (combo box) */
.combo_data {
    background-color: #FFFFFF;
    color: #000000;
    text-align: left;
    vertical-align: middle;
    padding: 5px 8px;
}

/* Selector para celdas de datos sin clase específica */
table td:not(.datos_izq):not(.datos_izq-sm):not(.datos_izq-md):not(.datos_izq-lg):not(.datos_cen):not(.datos_der):not(.celdacabinc) {
    background-color: #FFFFFF;
    color: #000000;
}

/* ========================================
   CAMPOS DE FORMULARIO
   ======================================== */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 4px 8px;
    border: 2px solid #E5E5E5;
    border-radius: 4px;
    font-size: 15px;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    background-color: #FFFFFF;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input[type="file"] {
    padding: 4px;
    cursor: pointer;
}

select {
    cursor: pointer;
    background-color: #ffffff;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* ========================================
   BOTONES ESTANDARIZADOS
   ======================================== */

/* Base común para todos los botones */
button,
input[type="button"],
.btn {
    padding: 6px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    margin: 0 5px;
}

button:hover,
input[type="button"]:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:active,
input[type="button"]:active,
.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Botón REGISTRAR - Rojo */
.btn-registrar {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
}

.btn-registrar:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

/* Botón ACTUALIZAR - Naranja */
.btn-actualizar {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
}

.btn-actualizar:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* Botón VER - Verde */
.btn-ver {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
}

.btn-ver:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

/* Botón CERRAR/CANCELAR - Gris */
.btn-cerrar {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
}

.btn-cerrar:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

/* Botón AZUL FAP - Acción principal */
/* Botón principal - Descargar */
.btn-azul {
    background: #0066CC; /* azul fuerte */
    color: #ffffff;
}
.btn-azul:hover {
    background: #003366; /* azul muy oscuro */
}

/* Botón secundario - Ver documento */
.btn-azul-secundario {
    background: #3399FF; /* azul claro */
    color: #ffffff;
}
.btn-azul-secundario:hover {
    background: #0066CC; /* azul fuerte */
}

/* ========================================
   BOTONES DE REPORTES
   ======================================== */

/* Contenedor lateral de acciones de reporte */
.reporte-acciones-cell {
    padding-top: 20px;
    text-align: left;
    padding-left: 0;
    vertical-align: top;
}

/* Estilo común de botones en panel lateral de reportes */
.reporte-accion-btn {
    margin-bottom: 10px;
    width: 140px;
    white-space: nowrap;
    text-align: left;
    padding-left: 8px;
}

.reporte-accion-btn-fin {
    margin-bottom: 0;
}

/* Botón CONSULTAR - Azul reporte */
.btn-consultar {
    background: #0066CC;
    color: #ffffff;
    padding: 8px 20px;
    min-width: 90px;
}

.btn-consultar:hover {
    background: #0052a3;
}

/* Botón EXCEL - Verde Excel */
.btn-excel {
    background: #217346;
    color: #ffffff;
    padding: 8px 20px;
    min-width: 90px;
}

.btn-excel:hover {
    background: #1a5c37;
}

/* Botón IMPRIMIR - Gris oscuro */
.btn-imprimir {
    background: #666666;
    color: #ffffff;
    padding: 8px 20px;
    min-width: 90px;
}

.btn-imprimir:hover {
    background: #4d4d4d;
}

/* Botón CERRAR REPORTE - Gris */
.btn-cerrar-reporte {
    background: #6b7280;
    color: #ffffff;
    padding: 8px 20px;
    min-width: 90px;
}

.btn-cerrar-reporte:hover {
    background: #4b5563;
}

/* ========================================
   ESTILOS DE IMPRESIÓN
   ======================================== */

@media print {
    /* Ocultar botones y formularios al imprimir */
    button { display: none !important; }
    form { display: none !important; }
    
    /* Estilos de tabla para impresión */
    .tabla-reporte {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .titulo-reporte {
        background-color: #2E5D9A !important;
        color: white !important;
        font-weight: bold !important;
        text-align: center !important;
        padding: 10px !important;
        font-size: 14px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .subtitulo-reporte {
        background-color: #4A90E2 !important;
        color: white !important;
        font-weight: bold !important;
        text-align: center !important;
        padding: 8px !important;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .fila-reporte td {
        border: 1px solid #000 !important;
        padding: 5px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .celda-centro { text-align: center !important; }
    .celda-izq { text-align: left !important; }
}


/* ========================================
   UTILIDADES
   ======================================== */

center {
    padding: 5px;
}

form {
    width: 100%;
    max-width: 780px;
}

table[width="700"] {
    max-width: 700px;
    margin: 0 auto;
}

table[width="750"] {
    max-width: 750px;
    margin: 0 auto;
}

table[width="1000"] {
    max-width: 1000px;
    margin: 0 auto;
}

table[width="1200"] {
    max-width: 1200px;
    margin: 0 auto;
}

table[width="1500"] {
    max-width: 1500px;
    margin: 0 auto;
}

/* Espaciado */
br {
    line-height: 1.5;
}

/* Enlaces */
a {
    color: #0066CC;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #003366;
}

/* Imágenes */
img {
    vertical-align: middle;
}

/* ========================================
   BOTONES Y CONTENEDORES ESPECIALES
   ======================================== */

/* Botón para ver documentos - Tamaño reducido */
.btn-ver-doc {
    padding: 6px 12px !important;
    font-size: 13px !important;
}

/* Contenedor centrado para botón de ver documento */
.contenedor-ver-doc {
    text-align: center;
    margin-bottom: 10px;
}

/* Contenedor de acciones al pie del formulario */
.acciones-form-centro {
    margin-top: 10px;
    text-align: center;
}

/* Input con transformación a mayúsculas */
.texto-mayusculas {
    text-transform: uppercase;
}

/* ========================================
   ESTILOS PARA FILTROS DE FORMULARIOS
   ======================================== */

/* Filtros obligatorios (no opcionales) - Rojo */
.filtro_no_op {
    color: #dc2626;
    font-weight: bold;
    font-size: 14px;
    font-family: Arial, sans-serif;
    padding: 5px;
}

/* Filtros opcionales - Azul */
.filtro_op {
    color: #0066CC;
    font-weight: bold;
    font-size: 14px;
    font-family: Arial, sans-serif;
    padding: 5px;
}

/* Input de texto para filtros */
.texto_op {
    padding: 4px 8px;
    border: 2px solid #E5E5E5;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

/* Estilos para datos de acceso */
.datos_acceso {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-family: Arial, sans-serif;
    font-size: 13px;
    padding: 8px;
    text-align: left;
}

/* ========================================
   MENSAJES DE ESTADO EN REPORTES
   ======================================== */

/* Mensaje estándar (cargando, sin datos, etc.) */
.mensaje-reporte {
    margin: 10px auto;
    padding: 10px 12px;
    max-width: 780px;
    text-align: center;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #2c3e50;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

/* Variante de error para respuestas fallidas de AJAX */
.mensaje-reporte-error {
    border-color: #dc2626;
    background-color: #ffffff;
    color: #dc2626;
    font-weight: bold;
}

/* ========================================
   ESTILOS PARA TABLAS DE REPORTE
   ======================================== */
/*.tabla-reporte {
  min-width: 1200px;
}*/
/* Tabla de reporte centrada en contenedores parciales */
.tabla-reporte-centrada {
    border-collapse: collapse;
    margin: 0 auto;
}

/* Botón de acción dentro de celda opción en reportes */
.btn-opcion-reporte {
    font-size: 16px;
    padding: 5px 15px;
}

/* Fila de tabla de reporte */
table tr.fila-reporte {
    background-color: #FFFFFF;
    transition: background-color 0.2s ease;
}

table tr.fila-reporte:hover {
    background-color: #E3F2FD;
    cursor: pointer;
}

/* Filas alternadas (zebra stripes) */
table tr.fila-reporte:nth-child(even) {
    background-color: #F9F9F9;
}

table tr.fila-reporte:nth-child(even):hover {
    background-color: #E3F2FD;
}

/* Celdas de tabla de reporte */
table tr.fila-reporte td {
    padding: 3px;
    border: 1px solid #E5E5E5;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

table tr.fila-reporte td.celda-centro {
    text-align: center;
    white-space: nowrap;
}

table tr.fila-reporte td.celda-izq {
    text-align: left;
    white-space: nowrap;
}

/* ========================================
   TABLA DE INCLUSIVOS - CONTEXTO ESPECÍFICO
   ======================================== */

/* Título dentro de tabla de reporte */
table.tabla-reporte td.titulo-reporte {
    background-color: #1F4788 !important;
    color: white !important;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #E5E5E5;
}

/* Cabeceras (sub-títulos) dentro de tabla de reporte */
table.tabla-reporte td.subtitulo-reporte {
    background-color: #5B9BD5 !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: bold;
    padding: 4px;
    text-align: center;
    border: 1px solid #E5E5E5;
}

/* Cabecera de grupo (sub-subtítulo) dentro de tabla de reporte */
table.tabla-reporte tr.fila-grupo td.subsubtitulo,
table.tabla-reporte tr.fila-grupo th.subsubtitulo {
    background-color: #E8F1FB !important;
    color: #123A6F !important;
    font-size: 13px;
    font-weight: bold;
    text-align: left;
    padding: 6px 8px;
    border: 1px solid #B8CDEA;
    border-left: 4px solid #1F4788;
    letter-spacing: 0.2px;
}

/* Hover para filas de datos dentro de tabla de reporte */
table.tabla-reporte tr.fila-reporte:hover {
    background-color: #FFF7BF !important;
    cursor: pointer;
}

/* Hover también aplica a las celdas TD dentro de las filas */
table.tabla-reporte tr.fila-reporte:hover td {
    background-color: #FFF7BF !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    table {
        font-size: 12px;
    }
    
    .tdmni {
        width: auto;
        min-width: 120px;
    }
    
    button,
    input[type="button"],
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    input[type="text"],
    input[type="email"],
    select {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

table {
    animation: fadeIn 0.5s ease;
}

/* ========================================
   REQUISITOS MATRICULA (SCOPE LOCAL)
   Solo aplica a .tabla-requisitos-matricula
   Regla: mantenerlo simple y legible
   ======================================== */

/* 1) Cabeceras compactas */
table.tabla-requisitos-matricula td.subtitulo-reporte {
    font-size: 13px;
    padding: 4px 3px;
    white-space: nowrap;
}

/* 2) Grupo sin barra gruesa a la izquierda */
table.tabla-requisitos-matricula tr.fila-grupo td.subsubtitulo,
table.tabla-requisitos-matricula tr.fila-grupo th.subsubtitulo {
    border-left: 1px solid #B8CDEA;
}

/* 3) Filas de datos compactas */
table.tabla-requisitos-matricula tr.fila-reporte td {
    padding: 3px 4px;
    font-size: 13px;
}

/* 4) Descripcion con salto de linea */
table.tabla-requisitos-matricula tr.fila-reporte td.celda-izq {
    white-space: normal;
    overflow-wrap: break-word;
}

/* 4.1) Resaltar requisito pendiente */
table.tabla-requisitos-matricula tr.fila-reporte td.celda-izq.requisito-pendiente {
    color: #ffffff  !important;
    background-color: #ff0011 !important;
    font-weight: 600;
}

/* 5) Radios de estado */
table.tabla-requisitos-matricula input[type="radio"] {
    width: 15px;
    height: 15px;
    accent-color: #5f5f5f;
    cursor: pointer;
}

table.tabla-requisitos-matricula .documento-vacio {
    color: #9ca3af;
    font-weight: bold;
}
