﻿/*==========================================================
    LOGIN
==========================================================*/

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f5f7;
}

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/*==========================================================
    HEADER
==========================================================*/

.login-header {
    height: 70px;
    background: #16213e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-sizing: border-box;
}

.header-logo img {
    height: 42px;
}

.header-menu {
    display: flex;
    gap: 30px;
}

    .header-menu a {
        color: white;
        text-decoration: none;
        font-size: 17px;
        font-weight: 500;
    }

        .header-menu a:hover {
            color: #8ec5ff;
        }
/*==========================================================
    HEADER
==========================================================*/

.login-header {
    height: 70px;
    background: #16213e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-sizing: border-box;
}

.header-logo img {
    height: 42px;
}

.header-menu {
    display: flex;
    gap: 30px;
}

    .header-menu a {
        display: flex;
        align-items: center;
        gap: 8px;
        color: white;
        text-decoration: none;
        font-size: 17px;
        font-weight: 500;
    }

.header-menu a:hover {
    color: #8ec5ff;
}
/*==========================================================
    MAIN
==========================================================*/

.login-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(#355c8a, #446d98);
}

.login-mensaje-error {
    display: block;
    margin-top: 12px;
    color: #e25563;
    font-size: 14px;
    font-weight: 500;
}
/*==========================================================
    FOOTER
==========================================================*/

.login-footer {
    height: 45px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    color: #666;
    font-size: 13px;
}

.login-card {
    width: 470px;
    min-height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,.25);
    overflow: hidden;
}

.login-card-header {
    background-color: #243f67;
    color: white;
    text-align: center;
    padding: 35px 30px 30px 30px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-card-header h1 {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 27px;
    font-weight: 700;
}

.login-card-header p {
    margin: 8px 0 0 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #dbe5f2;
}

.login-card-body {
    padding: 30px 35px;
}

.login-field {
    margin-bottom: 25px;
}

    .login-field label {
        display: block;
        margin-bottom: 8px;
        font-family: 'Segoe UI', sans-serif;
        font-size: 16px;
        font-weight: 600;
        color: #172b4d;
    }

        .login-field label i {
            margin-right: 6px;
        }

.login-input {
    width: 100%;
    box-sizing: border-box;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    color: #172b4d;
    outline: none;
}

    .login-input:focus {
        border-color: #243f67;
        box-shadow: 0 0 0 2px rgba(36, 63, 103, 0.15);
    }
.password-container {
    position: relative;
}

    .password-container .login-input {
        padding-right: 48px;
    }

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #243f67;
    font-size: 18px;
}

.login-button {
    width: 100%;
    height: 50px;
    margin-top: 5px;
    border: none;
    border-radius: 10px;
    background-color: #243f67;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

    .login-button:hover {
        background-color: #1b3152;
    }
/* ================================
   MENU PRINCIPAL TAD
   ================================ */

.tad-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.tad-menu-padre {
    color: white;
    text-decoration: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

    .tad-menu-padre:hover {
        color: #8ec5ff;
        text-decoration: none;
    }
    .tad-menu-padre i {
        margin-right: 6px;
    }

    .tad-menu-padre .menu-flecha {
        margin-left: 5px;
        margin-right: 0;
        font-size: 11px;
    }
/* Submenús TAD */

.tad-submenu {
    margin-left: 25px;
    margin-top: 8px;
}

    .tad-submenu a {
        display: block;
        color: #172b4d;
        text-decoration: none;
        font-family: 'Segoe UI', sans-serif;
        font-size: 14px;
        padding: 6px 10px;
    }

        .tad-submenu a:hover {
            color: #2f6fad;
            background-color: #f4f5f7;
        }
/* ==========================================================
   APLICACIÓN TAD
   SITE MASTER
   ========================================================== */

/* ---------- ESTRUCTURA GENERAL ---------- */

/*.tad-header {
    height: 62px;
    background-color: #243f67;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    box-sizing: border-box;
}*/

/*.tad-header-izq {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

    .tad-header-izq i {
        font-size: 24px;
    }*/

/*.tad-header-der {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Segoe UI', sans-serif;
}*/


/* ==========================================================
   APLICACIÓN TAD - HEADER EN 3 COLUMNAS
   ========================================================== */

.tad-header {
    height: 62px;
    background-color: #243f67;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    box-sizing: border-box;
    width: 100%;
}

/* Izquierda: Logo + Nombre Compañía */
.tad-header-izq {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-start;
    font-family: 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

    .tad-header-izq i {
        font-size: 24px;
    }

/* Centro: Sistema de Tesorería Administrativa */
.tad-header-centro {
    flex: 1;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

/* Derecha: Nombre y Tipo de Usuario */
.tad-header-der {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    font-family: 'Segoe UI', sans-serif;
}

.usuario-nombre {
    font-size: 16px;
    font-weight: 700;
}

.usuario-tipo {
    font-size: 13px;
    color: #dbe5f2;
}



/*.usuario-nombre {
    font-size: 17px;
    font-weight: 700;
}

.usuario-tipo {
    font-size: 14px;
    color: #dbe5f2;
}*/


/* ---------- LAYOUT PRINCIPAL ---------- */

.tad-main-layout {
    display: flex;
    min-height: calc(100vh - 62px);
}


/* ---------- MENÚ LATERAL ---------- */

.tad-sidebar {
    width: 265px;
    min-width: 265px;
    background-color: #16213e;
    color: white;
    box-sizing: border-box;
}

.tad-menu-item {
    width: 100%;
}


/* ---------- OPCIÓN PRINCIPAL ---------- */

.tad-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    box-sizing: border-box;
    color: white;
    text-decoration: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
}

    .tad-menu-link:hover {
        background-color: #243f67;
        color: white;
        text-decoration: none;
    }

.tad-menu-text {
    display: flex;
    align-items: center;
    gap: 9px;
}

.tad-menu-arrow {
    transition: transform 0.2s ease;
    font-size: 13px;
}

    .tad-menu-arrow.open {
        transform: rotate(90deg);
    }


/* ---------- SUBMENÚ ---------- */

.tad-submenu-wrapper {
    display: none;
    background-color: #1d3152;
}

    .tad-submenu-wrapper.open {
        display: block;
    }

.tad-submenu-link {
    display: block;
    padding: 11px 15px 11px 38px;
    color: #dbe5f2;
    text-decoration: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
}

    .tad-submenu-link:hover {
        background-color: #243f67;
        color: white;
        text-decoration: none;
    }

    .tad-submenu-link.active {
        background-color: #355c8a;
        color: white;
        font-weight: 600;
    }


/* ---------- CAMBIAR CONTRASEÑA / CERRAR SESIÓN ---------- */

.tad-sidebar .tad-menu-item:last-child {
    border-top: 1px solid rgba(255,255,255,0.10);
    margin-top: 12px;
}

    .tad-sidebar .tad-menu-item:last-child .tad-menu-link {
        color: #ffb4a8;
    }

        .tad-sidebar .tad-menu-item:last-child .tad-menu-link:hover {
            background-color: #243f67;
            color: #ffcbc3;
        }


/* ---------- CONTENIDO ---------- */

.tad-contenido {
    flex: 1;
    background-color: #f4f5f7;
    padding: 25px;
    box-sizing: border-box;
    min-width: 0;
}
/* ---------- ACCIONES DE SESIÓN ---------- */

.tad-sidebar .tad-menu-item.logout-item {
    margin-top: 4px;
}

    .tad-sidebar .tad-menu-item.logout-item .tad-menu-link {
        min-height: 48px;
        font-size: 14px;
        font-weight: 500;
    }

    .tad-sidebar .tad-menu-item.logout-item i {
        font-size: 16px;
    }
/* ==========================================================
   AJUSTE FINAL DEL ENCABEZADO
   ========================================================== */

.tad-header {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body {
    width: 100%;
}

/* ==========================================================
   CAMBIAR CONTRASEÑA
   ========================================================== */

.tad-cambio-clave {
    width: 520px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px 30px 28px 30px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tad-cambio-clave-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tad-cambio-clave-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #172b4d;
    font-size: 20px;
    font-weight: 600;
}

    .tad-cambio-clave-titulo i {
        font-size: 21px;
    }

.tad-cambio-clave-linea {
    height: 1px;
    background-color: #dfe1e6;
    margin: 16px 0 18px 0;
}

.tad-cambio-clave-ayuda {
    color: #5e6c84;
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.tad-cambio-clave .login-field {
    margin-bottom: 18px;
}

    .tad-cambio-clave .login-field label {
        display: block;
        margin-bottom: 6px;
        color: #172b4d;
        font-size: 13px;
        font-weight: 600;
    }

.tad-cambio-clave .login-input {
    width: 100%;
    box-sizing: border-box;
}

.tad-icon-button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

    .tad-icon-button:hover {
        opacity: 0.75;
    }

.tad-cambio-clave-grabar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #172b4d;
    font-size: 13px;
    font-weight: 600;
}

.tad-cambio-clave .tad-btn {
    text-decoration: none !important;
}
    .tad-cambio-clave .tad-btn:hover {
        text-decoration: none !important;
    }
/* ==========================================================
   BOTONES DE GRABAR / CANCELAR
   ========================================================== */

.tad-links-cancelar-grabar {
    display: flex;
    /*justify-content: flex-end;*/
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.tad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .tad-btn i {
        font-size: 15px;
    }

/* Cancelar */

.tad-btn-secondary {
    background-color: #ffffff;
    color: #5e6c84 !important;
    border-color: #c5cad3;
}

    .tad-btn-secondary:hover {
        background-color: #f4f5f7;
        color: #172b4d !important;
        border-color: #5e6c84;
    }

/* Guardar */

.tad-btn-primary {
    background-color: #5e6c84;
    color: #ffffff !important;
    border-color: #5e6c84;
}

    .tad-btn-primary:hover {
        background-color: #172b4d;
        color: #ffffff !important;
        border-color: #172b4d;
    }
/* =========================================
   POPUP GENERANDO ARCHIVO EXCEL
   ========================================= */
.popup-excel {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
}

.popup-excel-contenido {
    width: 380px;
    padding: 30px 35px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.spinner-excel {
    width: 42px;
    height: 42px;
    margin: 0 auto 18px auto;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #5e6c84;
    border-radius: 50%;
    animation: girarExcel 0.9s linear infinite;
}

.popup-excel-titulo {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.popup-excel-mensaje {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

@keyframes girarExcel {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
