@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

@font-face {
    font-family: "Lato";
    src: url(../fonts/Lato-Regular.ttf);
}

:root {
    --font-primary: 'Plus Jakarta Sans', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Brand Colors */
    --color-primary: #1d4ed8;
    --color-primary-hover: #1e40af;
    --color-primary-light: rgba(29, 78, 216, 0.08);
    --color-primary-ring: rgba(37, 99, 235, 0.2);
    
    --color-accent-green: #059669;
    --color-accent-green-hover: #047857;
    --color-accent-green-bg: #ecfdf5;
    --color-accent-green-border: #a7f3d0;

    /* Neutrals */
    --color-bg-dark: #090e17;
    --color-card-bg: rgba(255, 255, 255, 0.98);
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-text-subtle: #94a3b8;
    --color-border: #e2e8f0;
    --color-input-bg: #f8fafc;
    
    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
    --shadow-btn: 0 4px 14px 0 rgba(29, 78, 216, 0.38);
    --shadow-btn-hover: 0 6px 20px 0 rgba(29, 78, 216, 0.5);
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    min-height: 100vh;
    width: 100%;
}

body {
    background-color: var(--color-bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(29, 78, 216, 0.25) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.3) 0px, transparent 50%),
        linear-gradient(135deg, #090e17 0%, #0f172a 50%, #020617 100%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    position: relative;
    overflow-x: hidden;
}

#body_login {
    background-color: var(--color-bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(29, 78, 216, 0.25) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.3) 0px, transparent 50%),
        linear-gradient(135deg, #090e17 0%, #0f172a 50%, #020617 100%);
}

/* Background Ambient Glows */
.ambient-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ambient-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Master Container */
.login-master-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    animation: loginCardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardAppear {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dual Card Layout */
.login-card-dual {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--color-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    min-height: 590px;
}

/* PANEL IZQUIERDO: PORTADA */
.login-cover-panel {
    position: relative;
    background: #021a38;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 30px;
    overflow: hidden;
}

.cover-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
    opacity: 0.95;
    filter: brightness(1.08) contrast(1.02) saturate(1.05);
}

.login-card-dual:hover .cover-image {
    transform: scale(1.02);
}

.cover-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado suave para conservar la imagen clara, nítida y brillante */
    background: linear-gradient(180deg, rgba(2, 22, 50, 0.15) 0%, rgba(1, 15, 35, 0.35) 50%, rgba(1, 10, 25, 0.75) 100%);
    pointer-events: none;
}

.cover-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    gap: 20px;
}

.cover-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(1, 25, 55, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cover-header-badge .badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
}

.cover-body-text {
    margin-top: 5px;
}

.cover-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.cover-desc {
    font-size: 0.9rem;
    line-height: 1.45;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Feature Items */
.cover-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0;
}

.cover-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(1, 25, 55, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
}

.cover-feature-item:hover {
    background: rgba(1, 35, 75, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateX(4px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #38bdf8;
    flex-shrink: 0;
}

.feature-info {
    display: flex;
    flex-direction: column;
}

.feature-info strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: #ffffff;
}

.feature-info span {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.85);
}

.cover-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}



/* PANEL DERECHO: FORMULARIO */
.login-form-panel {
    padding: 40px 36px 36px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

/* Header & Logo */
.contenedor_logo {
    background: transparent;
    border: none;
    padding: 0 0 16px 0;
    text-align: center;
    color: var(--color-text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.login-brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 6px;
}

.login-brand-logo {
    max-height: 56px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.25s ease;
}

.login-brand-logo:hover {
    transform: scale(1.02);
}

.contenedor_logo h2,
.login-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
    line-height: 1.3;
    margin: 0;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.badge-portal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

.badge-portal .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 6px var(--color-primary);
}

/* Form Styles */
#form_sesion {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.input-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.contenedor_texto {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    color: var(--color-text-subtle);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition);
    z-index: 2;
}

.login_text {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 42px;
    background: var(--color-input-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--color-text-main);
    font-weight: 500;
    transition: var(--transition);
    outline: none;
}

.login_text::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.login_text:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.login_text:focus {
    border-color: var(--color-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3.5px var(--color-primary-ring);
}

.contenedor_texto:focus-within .input-icon-left {
    color: var(--color-primary);
}

/* Password Toggle Icon */
.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px 8px;
    color: var(--color-text-subtle);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    z-index: 2;
}

.btn-toggle-password:hover {
    color: var(--color-primary);
    background: rgba(0, 0, 0, 0.04);
}

.btn-toggle-password:focus {
    outline: none;
    color: var(--color-primary);
}

/* Options Row (Remember Me) */
.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -2px;
    margin-bottom: 2px;
}

.custom-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.custom-checkbox-container input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.custom-checkbox-container:hover {
    color: var(--color-text-main);
}

/* Login Button */
.btnLogin {
    position: relative;
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
}

.btnLogin:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    box-shadow: var(--shadow-btn-hover);
    transform: translateY(-1.5px);
}

.btnLogin:active {
    transform: translateY(0.5px);
    box-shadow: var(--shadow-btn);
}

.btnLogin:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-spinner {
    display: none;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 4px 0;
    color: var(--color-text-subtle);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.login-divider:not(:empty)::before {
    margin-right: 12px;
}

.login-divider:not(:empty)::after {
    margin-left: 12px;
}

/* Secondary Action Button (Descargar Constancia) */
.btn-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    background: var(--color-accent-green-bg);
    color: var(--color-accent-green);
    border: 1.5px solid var(--color-accent-green-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    transition: var(--transition);
}

.btn-secondary-action:hover {
    background: #d1fae5;
    color: var(--color-accent-green-hover);
    border-color: #6ee7b7;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}

/* Green Variant Buttons & Badges for Descargar Constancias */
.btnLogin-green,
.btn-login-green {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.38) !important;
}

.btnLogin-green:hover,
.btn-login-green:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5) !important;
    transform: translateY(-1.5px);
}

.badge-portal-green {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

.badge-portal-green .dot-green {
    background: #10b981 !important;
    box-shadow: 0 0 6px #10b981 !important;
}

.btn-secondary-light {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
}

.btn-secondary-light:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.input-helper-text {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.btn-secondary-action:active {
    transform: translateY(0);
}

/* Security & Copyright Footer */
.login-footer-security {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.security-badge i {
    color: var(--color-accent-green);
    font-size: 0.82rem;
}

.copyright-text {
    font-size: 0.7rem;
    color: var(--color-text-subtle);
    font-weight: 400;
}

/* RESPONSIVE DESIGN */
@media screen and (max-width: 900px) {
    .login-master-container {
        max-width: 480px;
    }

    .login-card-dual {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-cover-panel {
        padding: 28px 24px;
        min-height: 240px;
    }

    .cover-features-list {
        display: none;
    }

    .cover-title {
        font-size: 1.5rem;
    }

    .login-form-panel {
        padding: 30px 24px 26px 24px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 16px 10px;
    }

    .login-cover-panel {
        padding: 22px 18px;
        min-height: 200px;
    }

    .cover-title {
        font-size: 1.3rem;
    }

    .login-form-panel {
        padding: 24px 18px 20px 18px;
    }

    .login-brand-logo {
        max-height: 48px;
    }

    .contenedor_logo h2 {
        font-size: 1.1rem;
    }
}
