
/* ==========================================
   GESTIÓN ADMINISTRATIVA CCPC
   Diseño institucional - Versión 1.0
   ========================================== */

:root {
    --azul-marino: #10243e;
    --azul-oscuro: #081626;
    --azul-claro: #24466b;
    --dorado: #d9b66c;
    --dorado-oscuro: #b59449;
    --blanco: #ffffff;
    --gris-fondo: #f4f6f9;
    --gris-borde: #dce2e9;
    --gris-texto: #64748b;
    --texto: #1e293b;
    --verde: #21834c;
    --rojo: #c0392b;
    --sombra: 0 15px 45px rgba(0, 0, 0, 0.18);
}

/* CONFIGURACIÓN GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--texto);
    line-height: 1.5;
    font-size: 15px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--dorado);
    outline-offset: 3px;
}

/* PÁGINA DE INICIO DE SESIÓN */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;

    background: radial-gradient(
        ellipse at top,
        #24466b 0%,
        #10243e 50%,
        #081626 100%
    );

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px 20px;
}

.login-container {
    width: 100%;
    max-width: 460px;
}

/* ENCABEZADO INSTITUCIONAL */

.institution-header {
    text-align: center;
    color: var(--blanco);
    margin-bottom: 28px;
}

.institution-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: var(--blanco);
    border-radius: 50%;
    padding: 7px;
    border: 3px solid var(--dorado);
    margin-bottom: 15px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25);
}

.institution-header h1 {
    font-size: 25px;
    line-height: 1.25;
    font-weight: 650;
    margin-bottom: 8px;
}

.institution-header h2 {
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--dorado);
    font-weight: 600;
    margin-bottom: 8px;
}

.institution-header p {
    font-size: 13px;
    color: #d4deeb;
}

/* TARJETA DE INICIO DE SESIÓN */

.login-card {
    background: var(--blanco);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--sombra);
    border-top: 4px solid var(--dorado);
}

.login-heading {
    text-align: center;
}

.login-heading h2 {
    font-size: 23px;
    color: var(--azul-marino);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.login-heading p {
    color: var(--gris-texto);
    font-size: 14px;
}

.gold-divider {
    width: 65px;
    height: 3px;
    background: var(--dorado);
    border-radius: 5px;
    margin: 20px auto 26px;
}

/* FORMULARIOS */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--azul-marino);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    background: var(--blanco);
    color: var(--texto);
    font-size: 15px;
    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--azul-claro);

    box-shadow:
        0 0 0 3px rgba(36, 70, 107, 0.12);
}

.form-group input::placeholder {
    color: #7b8797;
}

/* CAMPO DE CONTRASEÑA */

.password-container {
    position: relative;
}

.password-container input {
    padding-right: 90px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    border: none;
    background: transparent;
    color: var(--azul-claro);
    font-size: 12px;
    font-weight: 600;
    padding: 8px;
}

.password-toggle:hover {
    color: var(--dorado-oscuro);
}

/* BOTONES */

.btn-primary {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;

    background: var(--azul-marino);
    color: var(--blanco);

    font-size: 15px;
    font-weight: 600;

    transition:
        background 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--azul-claro);
    transform: translateY(-1px);

    box-shadow:
        0 5px 15px rgba(16, 36, 62, 0.2);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    padding: 11px 18px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    background: var(--blanco);
    color: var(--azul-marino);
    font-weight: 600;
}

.btn-danger {
    padding: 11px 18px;
    border: none;
    border-radius: 8px;
    background: var(--rojo);
    color: var(--blanco);
    font-weight: 600;
}

/* MENSAJES DEL SISTEMA */

.login-message:empty {
    display: none;
}

.login-message {
    font-size: 13px;
    padding: 12px;
    border-radius: 7px;
    margin-bottom: 15px;
    background: #edf3fa;
    color: var(--azul-marino);
    overflow-wrap: anywhere;
}

.login-message.error {
    background: #fce8e6;
    color: #a93226;
    border: 1px solid #f3b8b3;
}

.login-message.success {
    background: #e8f5ec;
    color: #216b3c;
    border: 1px solid #b7dfc4;
}

/* AYUDA Y AVISO DE SEGURIDAD */

.login-help {
    text-align: center;
    margin-top: 23px;
    font-size: 13px;
    color: var(--gris-texto);
}

.login-help p:first-child {
    color: var(--azul-marino);
    font-weight: 600;
    margin-bottom: 3px;
}

.security-notice {
    text-align: center;
    font-size: 11px;
    color: var(--gris-texto);
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--gris-borde);
}

/* PIE DE PÁGINA */

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: #d4deeb;
    font-size: 11px;
    line-height: 1.8;
}

.login-footer p:last-child {
    color: var(--dorado);
}

/* DISEÑO PARA CELULARES */

@media (max-width: 480px) {

    .login-page {
        padding: 25px 15px;
    }

    .login-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .institution-logo {
        width: 95px;
        height: 95px;
    }

    .institution-header h1 {
        font-size: 22px;
    }

    .institution-header h2 {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .login-heading h2 {
        font-size: 20px;
    }

    .form-group input {
        font-size: 16px;
    }

}

/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

}

/* CONFIGURACIÓN PARA IMPRESIONES */

@media print {

    body {
        background: white !important;
        color: black !important;
    }

    .no-print,
    .sidebar,
    .topbar,
    button {
        display: none !important;
    }

}
