/* ===============================
   ESTILOS GENERALES
================================ */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(#005bbb, #003f88);
    color: white;
}

/* ===============================
   CONTENEDOR PRINCIPAL
================================ */
.contenedor {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 33% 34% 33%;
    grid-template-rows: 10% auto 12%;
}

/* ===============================
   MENÚ LATERAL
================================ */
.menu-lateral {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.submenu {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.submenu img {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.submenu span {
    font-size: 13px;
    text-align: center;
}

/* ===============================
   TÍTULO CENTRAL
================================ */
.titulo-central {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 42px;
    text-shadow: 2px 2px 5px black;
}

/* ===============================
   LOGIN
================================ */
.login {
    display: flex;
    justify-content: flex-end;
    padding-right: 80px;
    padding-top: 10px;
}

.login button {
    background: rgba(255, 0, 0, 0.8);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

/* ===============================
   BARRAS DE ESTADO
================================ */
.barra-usuario,
.barra-mensajes {
    position: fixed;
    bottom: 0;
    height: 26px;
    line-height: 26px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.35);
    color: white;
    padding: 0 12px;
    white-space: nowrap;
    z-index: 900;
}

.barra-usuario {
    left: 0;
    border-top-right-radius: 4px;
}

.barra-mensajes {
    right: 0;
    border-top-left-radius: 4px;
}

/* ===============================
   MODAL LOGIN (estilo existente, no modificar)
   Este estilo es usado por el módulo Configuración y otros antiguos.
================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-contenido {
    width: 360px;
    background: rgba(255,255,255,0.12);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.30);
    text-align: center;
    color: white;
}

.titulo-sistema {
    font-size: 28px;
    margin-bottom: 5px;
}

.subtitulo {
    font-size: 17px;
    margin-bottom: 20px;
}

.modal-contenido label {
    display: block;
    text-align: left;
    margin-top: 12px;
}

.modal-contenido input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    margin-top: 5px;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 16px;
    color: white;
}

.btn.ingresar {
    background: #0066cc;
}

.btn.ingresar:hover {
    background: #004c99;
}

.btn.salir {
    background: #003d80;
}

.btn.salir:hover {
    background: #00264d;
}

.ayuda {
    margin-top: 20px;
    font-size: 13px;
    color: #e0e0e0;
}

/* =========================================================
   ====== ESTÁNDAR SGA PARA GRILLAS (NUEVO) =================
========================================================= */
.sga-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    color: #1a1a1a;
}

.sga-panel h2 {
    margin: 0 0 15px 0;
    color: #0b5ea8;
    font-size: 22px;
    font-weight: bold;
}

/* TABLA */
.sga-table {
    width: 100%;
    border-collapse: collapse;
}

/* CABECERA */
.sga-table thead th {
    background: #0b5ea8;
    color: #ffffff;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

/* CUERPO */
.sga-table tbody td {
    padding: 10px;
    font-size: 14px;
    color: #1a1a1a;
    border-bottom: 1px solid #e0e0e0;
}

/* HOVER */
.sga-table tbody tr:hover {
    background: #f1f6fc;
    cursor: pointer;
}

/* SELECCION */
.sga-table tbody tr.selected {
    background: #dbe9ff;
}

/* ===== CAMPOS ===== */
.campo {
    margin-bottom: 8px;
}

.campo label {
    display: block;
    font-weight: bold;
}

.campo input,
.campo select {
    width: 250px;
    padding: 4px;
}

/* ===============================
   FORMULARIOS SGA
=============================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: span 4;
}

.form-group.medium {
    grid-column: span 2;
}

.form-group.small {
    grid-column: span 1;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 4px;
    color: #000;
}

.form-group input,
.form-group select {
    padding: 6px;
    border: 1px solid #999;
    border-radius: 4px;
}

/* ===============================
   TABS SGA VISIBLES
=============================== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 3px solid #005bbb;
}

.tabs button {
    padding: 10px 20px;
    background: #005bbb;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
}

.tabs button.activo {
    background: #ffffff;
    color: #005bbb;
    border: 2px solid #005bbb;
    border-bottom: none;
}

.tab-contenido {
    display: none;
    background: #ffffff;
    border: 2px solid #005bbb;
    padding: 20px;
}

.tab-contenido.activo {
    display: block;
}

/* ===============================
   ESTILOS PARA MODALES DEL MÓDULO PLANILLAS Y FUTUROS
   (Se usa con class="modal-contenido planillas")
================================ */
.modal-contenido.planillas {
    background: linear-gradient(145deg, #6394e3 0%, #4479bd 100%);
    backdrop-filter: none;
    color: white;
    text-align: left;
    width: auto;
    min-width: 500px;
    max-width: 800px;
    border: 1px solid #2a4c7a;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.modal-contenido.planillas label {
    color: white;
    font-weight: bold;
    margin-top: 12px;
}

.modal-contenido.planillas input,
.modal-contenido.planillas select,
.modal-contenido.planillas textarea {
    background: #ffffff;
    color: #000000;
    border: 1px solid #4a6fa5;
    border-radius: 6px;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}

.modal-contenido.planillas input:focus,
.modal-contenido.planillas select:focus,
.modal-contenido.planillas textarea:focus {
    border-color: #ffd700;
    outline: none;
    box-shadow: 0 0 5px rgba(255,215,0,0.5);
}

.modal-contenido.planillas button {
    background: #005bbb;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}

.modal-contenido.planillas button:hover {
    background: #003f7f;
}

.modal-contenido.planillas .botones-modal button:first-child {
    background: #555;
}

.modal-contenido.planillas .botones-modal button:first-child:hover {
    background: #333;
}

.modal-contenido.planillas .botones-modal button:last-child {
    background: #ff9900;
    color: #000;
}

.modal-contenido.planillas .botones-modal button:last-child:hover {
    background: #e68a00;
}

.modal-contenido.planillas .subgrilla {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 5px;
}

.modal-contenido.planillas .subgrilla table {
    background: #fff;
    color: #000;
    width: 100%;
}

.modal-contenido.planillas .subgrilla th {
    background: #005bbb;
    color: white;
}

.modal-contenido.planillas .campo textarea {
    font-family: Arial, sans-serif;
}

/* ===============================
   LOGO CON EFECTO PUERTA GIRATORIA
================================ */
.logo-container {
    position: fixed;
    top: 8px;
    left: 20px;
    z-index: 100;
    perspective: 400px;
}

.logo-container img {
    width: 100px;
    height: 100px;
    animation: girarPuerta 4s linear infinite;
    transform-style: preserve-3d;
}

@keyframes girarPuerta {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

