﻿/* ==========================================================================
   1. DISEÑO 
   ========================================================================== */
@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Regular.ttf') format('truetype');   
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', Arial, sans-serif;
}

:root {
    --bg-page: #f0f4f8;
    --bg-card: #ffffff;
    --primary-color: #1a446c; /* Azul Institucional */
    --primary-hover: #112d48;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #cbd5e1;
    --max-width-container: 1200px;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.container-custom {
    width: 100%;
    max-width: var(--max-width-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. LOGOS (Superior)
   ========================================================================== */
.navbar-institucional {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logos-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 40px;
    object-fit: contain;

}

.logo-divider {
    width: 1px;
    height: 30px;
    background-color: var(--border-color);
}

.nav-links {
    display: flex;
    gap: 20px;
}

    .nav-links a {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 500;
        transition: color 0.2s;
    }

        .nav-links a:hover {
            color: var(--primary-color);
        }

/* ==========================================================================
   3. CONTENIDO PRINCIPAL / LOGIN
   ========================================================================== */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    padding-top: 30px !important;
}


.login-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 460px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

    .card-header h2 {
        font-size: 20px;
        color: var(--primary-color);
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }

    .card-header p {
        font-size: 14px;
        color: var(--text-muted);
    }

/* Formulario e Inputs con Iconos */
.input-group {
    margin-bottom: 20px;
}

    .input-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #475569;
    }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrapper input {
        width: 100%;
        padding: 12px 16px 12px 45px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        font-size: 15px;
        background-color: #f8fafc;
        transition: all 0.2s ease;
    }

        .input-wrapper input:focus {
            outline: none;
            border-color: var(--primary-color);
            background-color: #ffffff;
            box-shadow: 0 0 0 3px rgba(26, 68, 108, 0.1);
        }

/* Iconos SVG embebidos */
.input-icon {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    opacity: 0.5;
}

.icon-user {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' fill='none' viewBox='0 0 24 24' stroke='%23333'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E") no-repeat center;
}

.icon-lock {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' fill='none' viewBox='0 0 24 24' stroke='%23333'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E") no-repeat center;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}

.forgot-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .btn-submit:hover {
        background-color: var(--primary-hover);
    }

.card-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
}

    .card-footer a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
    }

/* ==========================================================================
   4. PIE DE PÁGINA
   ========================================================================== */
.footer-institucional {
    background-color: #e2e8f0;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.footer-section h3 {
    font-size: 12px;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.footer-section p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .legal-links a {
        font-size: 13px;
        color: var(--text-muted);
        text-decoration: none;
    }

        .legal-links a:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }

/* ==========================================================================
   5. RESPONSIVE / MEDIA QUERIES ESPECÍFICOS
   ========================================================================== */

/* Ajuste general para tabletas/pantallas pequeñas */
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Optimización para Laptop Básica / Pantalla Común (1366 x 768) --- */
@media (min-width: 1366px) {
    :root {
        --max-width-container: 1280px;
    }

    .navbar-institucional {
        padding: 18px 0;
    }

    .logo-img {
        height: 45px;
    }

    .login-card {
        max-width: 480px;
        padding: 45px;
    }

    .card-header h2 {
        font-size: 22px;
    }
}

/* --- Optimización para Full HD Estándar (1920 x 1080) --- */
@media (min-width: 1920px) {
    :root {
        --max-width-container: 1600px;
    }

    .navbar-institucional {
        padding: 24px 0;
    }

    .logo-img {
        height: 52px;
    }

    .nav-links a {
        font-size: 15px;
        gap: 30px;
    }

    .main-content {
        padding: 80px 20px; /* Incrementa el aire vertical en monitores grandes */
    }

    .login-card {
        max-width: 520px;
        padding: 50px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    }

    .card-header h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .input-wrapper input {
        padding: 14px 16px 14px 50px;
        font-size: 16px;
    }

    .input-icon {
        left: 18px;
    }

    .btn-submit {
        padding: 16px;
        font-size: 16px;
    }

    .footer-institucional {
        padding: 45px 0;
    }

    .footer-section h3 {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .footer-section p, .legal-links a {
        font-size: 14px;
    }
}

/* --- Optimización para Pantallas QHD / 2K Altas (2560 x 1440) --- */
@media (min-width: 2560px) {
    :root {
        --max-width-container: 2100px;
    }

    .navbar-institucional {
        padding: 32px 0;
    }

    .logo-img {
        height: 65px;
    }

    .nav-links a {
        font-size: 18px;
    }

    .main-content {
        padding: 120px 20px;
    }

    .login-card {
        max-width: 600px;
        padding: 60px;
        border-radius: 12px;
    }

    .card-header h2 {
        font-size: 28px;
    }

    .card-header p {
        font-size: 16px;
    }

    .input-group label {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .input-wrapper input {
        padding: 18px 16px 18px 55px;
        font-size: 18px;
    }

    .input-icon {
        width: 22px;
        height: 22px;
        left: 20px;
    }

    .btn-submit {
        padding: 18px;
        font-size: 18px;
        border-radius: 8px;
    }

    .card-footer, .forgot-link {
        font-size: 15px;
    }

    .footer-institucional {
        padding: 60px 0;
    }

    .footer-section h3 {
        font-size: 16px;
    }

    .footer-section p, .legal-links a {
        font-size: 16px;
    }
}


/* ==========================================================================
   6. ADAPTACION DE PAGINAS ANTIGUAS
   ========================================================================== */
.formulario {
    background: none repeat scroll 0 0 white;
    border: 2px solid #adb1b4;
    border-radius: 12px;
    padding: 15px;
    margin: 0 auto;
    font-size: 0.9em;
}

    .formulario > table {
        border-collapse: collapse;
        width: 100%;
        margin: 0 auto;
    }

        .formulario > table > thead > tr > th {
            border: 1px solid #b3bff3;
            vertical-align: top;
            text-align: left;
            padding: 3px;
        }

        .formulario > table > tbody > tr > td {
            background: none repeat scroll 0 0 #eeeeee;
            border: 1px solid #b3bff3;
            vertical-align: top;
            text-align: left;
            padding: 3px;
        }

            .formulario > table > tbody > tr > td:first-child {
                width: 100px;
            }

        .formulario > table label {
            white-space: nowrap;
        }

        .formulario > table > tfoot > tr > td {
            padding: 10px 3px;
        }



button {
    cursor: pointer;
}

.button, button {
    border: 1px solid #303f9f;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    font-size: 13px;
    font-family: Lato, arial, serif;
    padding: 5px 15px 5px 15px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    color: white !important;
    background-color: #303f9f;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#303f9f), to(#303f9f));
    background-image: -webkit-linear-gradient(top, #303f9f, #960042);
    background-image: -moz-linear-gradient(top, #303f9f, #960042);
    background-image: -ms-linear-gradient(top, #303f9f, #960042);
    background-image: -o-linear-gradient(top, #303f9f, #960042);
    background-image: linear-gradient(to bottom, #303f9f, #303f9f);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#303f9f, endColorstr=#303f9f);
}
  
    .button:hover, button:hover {
        border: 1px solid #fdc102;
        background-color: #fdc102;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#fdc102), to(#fdc102));
        background-image: -webkit-linear-gradient(top, #fdc102, #63002C);
        background-image: -moz-linear-gradient(top, #fdc102, #63002C);
        background-image: -ms-linear-gradient(top, #fdc102, #63002C);
        background-image: -o-linear-gradient(top, #fdc102, #63002C);
        background-image: linear-gradient(to bottom, #fdc102, #fdc102);
        filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fdc102, endColorstr=#fdc102);
    }

.button_disabled {
    border: 1px solid #E8E8E8;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    font-size: 12px;
    font-family: arial, helvetica, sans-serif;
    padding: 5px 15px 5px 15px;
    text-decoration: none;
    display: inline-block;
    text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
    font-weight: bold;
    color: #A5A3A4;
    background-color: #CDCCCC;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#E8E8E8), to(#CDCCCC));
    background-image: -webkit-linear-gradient(top, #E8E8E8, #CDCCCC);
    background-image: -moz-linear-gradient(top, #E8E8E8, #CDCCCC);
    background-image: -ms-linear-gradient(top, #E8E8E8, #CDCCCC);
    background-image: -o-linear-gradient(top, #E8E8E8, #CDCCCC);
    background-image: linear-gradient(to bottom, #E8E8E8, #CDCCCC);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#E8E8E8, endColorstr=#CDCCCC);
}