/* ===== RESPETANDO TU :ROOT ===== */
:root {
    --primary-color: #801b23;
    --primary-dark: #20193a;
    --secondary-color: #00113f;
    --accent-color: #f3600c;
    --text-dark: #212529;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --success: #4bb543;
    --error: #e63946;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --radius: 16px;
}

/* ===== FONDO ===== */
body {
    background: 
        linear-gradient(135deg, #20193a 0%, #20193a 100%),
        url('../../imagenes/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* ===== PARTÍCULAS DECORATIVAS ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
}

.row {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ===== TARJETA DE LOGIN ===== */
.login-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    min-height: 580px;
    position: relative;
    z-index: 1;
    display: flex;
    transition: var(--transition);
}

/* ===== PANEL IZQUIERDO ===== */
.login-left-panel {
    flex: 1;
    background: linear-gradient(
        145deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%
    );
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.login-left-panel::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 50%,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 70%
    );
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(3deg); }
}

.login-left-panel .pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Icono de seguridad */
.security-shield {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: pulseShield 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
    color: var(--white);
}

@keyframes pulseShield {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255,255,255,0.15); }
}

.login-left-panel h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
    color: var(--white);
}

.login-left-panel .subtitle {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 380px;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
    color: var(--white);
}

.login-left-panel .features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.login-left-panel .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.login-left-panel .feature-item i {
    font-size: 0.9rem;
}

/* ===== PANEL DERECHO ===== */
.col-12.col-md-4.col-lg-6 {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo-wrapper {
    display: inline-block;
    padding: 15px;
    background: rgba(13, 107, 83, 0.06);
    border-radius: var(--radius);
    margin-bottom: 20px;
    transition: var(--transition);
}

.login-header .logo-wrapper:hover {
    transform: scale(1.02);
    background: rgba(13, 107, 83, 0.1);
}

.login-header img {
    max-height: 100px;
    transition: var(--transition);
    display: block;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 500;
}

/* ===== FORMULARIO ===== */
.login-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.mb-3.position-relative {
    position: relative;
    margin-bottom: 22px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 14px 18px 14px 48px !important;
    background: var(--bg-light);
    border: 2px solid #e8edf4;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(13, 107, 83, 0.08) !important;
}

.form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1rem;
    transition: var(--transition);
    z-index: 2;
}

.form-control:focus + .input-icon {
    color: var(--primary-color);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    padding: 5px;
    z-index: 2;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(13, 107, 83, 0.08);
}

.forgot-password {
    color: var(--text-light) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-color) !important;
}

/* ===== BOTÓN ===== */
.btn-login {
    width: 100%;
    position: relative;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border: none;
    color: var(--white);
    padding: 16px !important;
    border-radius: 12px !important;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(13, 107, 83, 0.25);
    margin-bottom: 20px !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(13, 107, 83, 0.35) !important;
    color: var(--white) !important;
}

.btn-login:active {
    transform: translateY(0px);
}

.btn-login .btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
    z-index: 1;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

/* ===== FOOTER ===== */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
    color: var(--text-light);
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--secondary-color) !important;
    text-decoration: underline;
}

/* ===== ANIMACIÓN DE APARICIÓN ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate__fadeInUp {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
        border-radius: var(--radius);
    }

    .login-left-panel {
        padding: 35px 30px;
    }

    .login-left-panel h2 {
        font-size: 1.6rem;
    }

    .login-left-panel .features {
        gap: 10px;
    }

    .col-12.col-md-4.col-lg-6 {
        padding: 35px 30px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .login-left-panel {
        padding: 25px 20px;
    }

    .login-left-panel h2 {
        font-size: 1.3rem;
    }

    .login-left-panel .subtitle {
        font-size: 0.85rem;
    }

    .login-left-panel .feature-item {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .col-12.col-md-4.col-lg-6 {
        padding: 25px 20px;
    }

    .login-header h1 {
        font-size: 1.4rem;
    }

    .login-header img {
        max-height: 70px;
    }

    .form-control {
        padding: 12px 14px 12px 42px !important;
        font-size: 0.9rem;
    }

    .btn-login {
        padding: 14px !important;
        font-size: 0.95rem;
    }

    .security-shield {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}