/* assets/css/custom.css */

:root {
    --na-verde: #1a3a32;
    --na-dorado: #c5a059;
    --bg-light: #f4f7f6; 
}

body {
    background-color: var(--bg-light);
    background-image: radial-gradient(#d1d1d1 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 380px; /* Un poco más estrecha ayuda a la percepción visual */
    padding: 2rem 2.2rem; /* Reducido de 3.5rem para acercar el logo al borde */
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 
                0 20px 48px -12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
}

.logo-container {
    padding: 0; /* Eliminamos el padding extra */
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
}

.login-logo {
    height: auto;
    max-height: 80px; /* Reducido ligeramente para compactar */
    width: auto;
    max-width: 240px;
    object-fit: contain;
    filter: brightness(1.02);
}

.login-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.login-footer-externo {
    width: 100%;
    max-width: 380px; /* Al mismo ancho que la tarjeta para simetría perfecta */
    text-align: center;
    margin-top: 20px; 
    padding-bottom: 20px;
}

.footer-links {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.8rem;
    color: #888 !important;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--na-verde) !important;
}

.separator {
    color: #ddd;
    margin: 0 10px;
}

.copyright-info {
    font-size: 0.75rem;
    color: #bbb;
}

.divider-gold {
    height: 3px;
    width: 35px; /* Más corto se ve más elegante */
    background: var(--na-dorado);
    margin: 0.8rem auto; /* Reducido de 1.2rem */
    border-radius: 10px;
}

/* Inputs y Formulario más compactos */
.form-group {
    text-align: left;
    margin-bottom: 1.2rem; /* Reducido de 1.5rem */
}

.form-label {
    font-size: 0.65rem; /* Un poco más pequeño */
    font-weight: 800;
    color: #64748b;
    margin-left: 2px;
    margin-bottom: 0.3rem;
    display: block;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-control {
    border: 2px solid #edf2f0;
    background: #fcfdfe;
    border-radius: 10px;
    padding: 0.7rem 1rem; /* Un poco menos de padding vertical */
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--na-verde);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 58, 50, 0.05);
    outline: none;
}

.btn-na {
    background: var(--na-verde);
    color: white;
    border: none;
    width: 100%;
    padding: 0.85rem; 
    border-radius: 10px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.btn-na:hover {
    background: #244d42;
    transform: translateY(-2px);
    color: white;
}

/* Nueva etiqueta de versionado */
.version-tag {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: #cbd5e1;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Personalización de Toastr */
#toast-container > .toast {
    background-image: none !important; /* Quitamos el icono por defecto si queremos algo limpio */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 1;
}

/* Color para Errores (Rojo suave como tu imagen) */
.toast-error {
    background-color: #d9534f !important;
}

/* Color para Información/Procesando (Azul como tu imagen) */
.toast-info {
    background-color: #5bc0de !important;
}

/* Ajuste de texto */
.toast-title {
    font-weight: bold;
    font-size: 1.1em;
}

/* ==========================================================================
   NA LOADING OVERLAY - DISEÑO PREMIUM FINAL (DOBLE ANILLO)
   ========================================================================== */

.na-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        circle at center, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(252, 250, 245, 0.45) 100%
    ) !important;    

    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    transform: translateZ(0);
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.na-overlay--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* La entrada es inmediata para responder al click */
    transition: opacity 0.3s ease-out !important;
}
.na-overlay__card {
    background: transparent;
    text-align: center;
    padding: 2rem;
    /* Sombra de profundidad suave */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.05));
    /* Animación de sutil escala al aparecer */
    transform: scale(0.95);
    transition: transform 0.4s ease-out;
}

.na-overlay--active .na-overlay__card {
    transform: scale(1);
}

/* --- DISEÑO DE DOBLE ANILLO --- */
.na-overlay__logo-ring-outer {
    width: 200px;
    height: 200px;
    border: 2px solid var(--na-verde); 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    padding: 10px;
}

.na-overlay__logo-ring-inner {
    width: 100%;
    height: 100%;
    border: 5px solid var(--na-verde); 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 15px;
}

.na-overlay__logo-img {
    max-width: 85%;
    height: auto;
}

.na-overlay__text {
    color: #444;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.na-overlay__spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,0,0,0.05);
    border-top: 3px solid var(--na-verde);
    border-radius: 50%;
    margin: 0 auto;
    animation: na-spin 1s linear infinite;
}

@keyframes na-spin {
    to { transform: rotate(360deg); }
}

.btn-table-action {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0;
}

.btn-table-action i { font-size: 1.2rem; color: #94a3b8; }
.btn-table-action img { 
    width: 19px; 
    height: 19px; 
    opacity: 0.5; 
    filter: grayscale(1); 
    transition: all 0.2s; 
}

/* Contenedor relativo para que el hijo flote respecto a él */
.action-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-right: 25px; /* Espacio reservado para que el '...' no tape los botones */
}

/* El Dropdown flotante */
.dropdown-floating-right {
    position: absolute;
    right: 0; /* Lo pega al borde derecho de la celda */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0; /* Invisible por defecto */
    transition: all 0.2s ease;
}

/* Cuando pasas el mouse por la fila de la tabla, aparece el '...' */
tr:hover .dropdown-floating-right {
    opacity: 1;
    right: 5px; /* Se mueve un poquito hacia adentro para que se vea elegante */
}

/* Estilo del botón de los tres puntos */
.btn-toggle-floating {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 24px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
}

.btn-toggle-floating:hover {
    background: #e9ecef;
    color: #000;
}

/* Ajuste para que el menú no se corte si la tabla es pequeña */
.table-responsive {
    overflow: visible !important;
}



/* Contenedor relativo para que el hijo flote respecto a él */
.action-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-right: 25px; /* Espacio reservado para que el '...' no tape los botones */
}

/* El Dropdown flotante */
.dropdown-floating-right {
    position: absolute;
    right: 0; /* Lo pega al borde derecho de la celda */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0; /* Invisible por defecto */
    transition: all 0.2s ease;
}

/* Cuando pasas el mouse por la fila de la tabla, aparece el '...' */
tr:hover .dropdown-floating-right {
    opacity: 1;
    right: 5px; /* Se mueve un poquito hacia adentro para que se vea elegante */
}

/* Estilo del botón de los tres puntos */
.btn-toggle-floating {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 24px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
}

.btn-toggle-floating:hover {
    background: #e9ecef;
    color: #000;
}



/* Ajuste para que el menú no se corte si la tabla es pequeña */
.table-responsive {
    overflow: visible !important;
}

.action-gold:hover { background: rgba(184, 157, 102, 0.1); border-color: rgba(184, 157, 102, 0.2); }
.action-gold:hover i { color: var(--na-dorado); }

.action-green:hover { background: rgba(26, 58, 50, 0.08); border-color: rgba(26, 58, 50, 0.15); }
.action-green:hover img { opacity: 1; filter: none; transform: scale(1.1); }

.action-blue:hover { background: rgba(13, 110, 253, 0.08); border-color: rgba(13, 110, 253, 0.2); }
.action-blue:hover img { opacity: 1; filter: none; transform: translateY(-2px); }

.action-red:hover { background: rgba(220, 53, 69, 0.1); border-color: rgba(220, 53, 69, 0.2); }
.action-red:hover img { opacity: 1; filter: none; transform: scale(1.1); }

/* Contenedor de la celda */
.action-superposer-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-right: 30px; /* Espacio para que los puntos no se encimen */
}

/* Los 3 botones fijos */
.fixed-actions-tools {
    display: flex;
    gap: 8px;
    z-index: 1;
}

/* El cuarto "botón" (puntos) que se expande */
.expansion-square-left {
    position: absolute;
    right: 0;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    background: transparent; /* TRANSPARENTE POR DEFECTO */
    border: none;             /* SIN BORDES */
    width: 30px;              /* Ancho justo para el icono ⋮ */
    height: 36px;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
    z-index: 10;
    cursor: pointer;
}

/* Efecto al pasar el mouse: se expande y ahora sí pone fondo blanco para cubrir */
.expansion-square-left:hover {
    width: 130px; 
    background: #ffffff; /* Aparece el blanco para tapar los 3 fijos */
    box-shadow: -5px 0 10px rgba(0,0,0,0.08); /* Sombra muy sutil para separar de la fila */
    border-radius: 8px; /* Redondeado solo al estar abierto */
}

.trigger-square-dots {
    min-width: 30px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vertical-dots {
    font-size: 24px;
    color: #94a3b8; /* Color gris suave igual a tus otros iconos */
    line-height: 1;
}

.tools-hidden-content {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    padding-left: 10px;
}

.expansion-square-left:hover .tools-hidden-content {
    opacity: 1;
}

/* Asegurar que la celda de acciones no sea más ancha de lo necesario */
td.text-center {
    width: 1% !important;
    white-space: nowrap !important;
}


/* Botón estilo reporte con icono de Excel destacado */
.btn-excel-office {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    transition: all 0.2s ease;
}

.btn-excel-office:hover {
    background-color: #f8f9fa;
    border-color: #1D6F42; /* El borde se vuelve verde Excel al pasar el mouse */
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-excel-office i {
    font-size: 1.1rem;
    vertical-align: middle;
}

