* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    overflow-x: hidden;
    position: relative;
}

/* Partículas de fondo */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Formas flotantes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(33, 150, 243, 0.1));
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 87, 34, 0.1));
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1), rgba(63, 81, 181, 0.1));
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* Contenedor principal */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Tarjeta Glassmorphism */
.glass-card {
    display: flex;
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

/* Lado izquierdo - Branding con imagen */
.card-left {
    flex: 1;
    background: linear-gradient(135deg, #1b4332, #2d6a4f, #40916c);
    padding: 40px;
    color: white;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1%, transparent 1%);
    background-size: 50px 50px;
    animation: moveDots 20s linear infinite;
}

@keyframes moveDots {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.brand-section {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 30px;
}

.logo-animated {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-animated i {
    font-size: 48px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.logo-animated h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
}

/* Espacio para imagen - OCUPA EL RESTO DEL ESPACIO */
.image-space {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.image-container {
    width: 100%;
    height: auto;
    max-height: 380px;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.image-overlay h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.image-overlay p {
    font-size: 13px;
    opacity: 0.9;
}

/* Lado derecho - Formulario */
.card-right {
    flex: 1;
    padding: 60px 50px;
    background: white;
    display: flex;
    align-items: center;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.header-text {
    margin-bottom: 40px;
    text-align: center;
}

.header-text h2 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header-text p {
    color: #6c757d;
    font-size: 14px;
}

/* Campos de entrada */
.input-field {
    position: relative;
    margin-bottom: 30px;
}

.input-field i:first-child {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    transition: all 0.3s;
    font-size: 18px;
}

.input-field input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: white;
}

.input-field input:focus {
    outline: none;
    border-color: #2d6a4f;
}

.input-field input:focus ~ .input-border {
    transform: scaleX(1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #1b4332, #40916c);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #adb5bd;
    font-size: 18px;
    transition: all 0.3s;
}

.toggle-password:hover {
    color: #2d6a4f;
}

/* Opciones */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #6c757d;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.3s;
}

.checkbox input:checked + .checkmark {
    background: #2d6a4f;
    border-color: #2d6a4f;
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
}

.forgot {
    font-size: 13px;
    color: #2d6a4f;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.forgot:hover {
    color: #1b4332;
}

/* Botón principal */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(45, 106, 79, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Mensaje de error */
.error-message {
    margin-top: 20px;
    padding: 12px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #991b1b;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message.show {
    display: flex;
}

/* Footer */
.footer-note {
    margin-top: 40px;
    text-align: center;
}

.footer-note p {
    font-size: 11px;
    color: #6c757d;
}

.footer-note .copyright {
    margin-top: 8px;
    font-size: 10px;
}

/* Responsive */
@media (max-width: 968px) {
    .glass-card {
        flex-direction: column;
        max-width: 500px;
    }
    
    .card-left {
        padding: 30px;
    }
    
    .brand-section {
        margin-bottom: 20px;
    }
    
    .image-container {
        max-height: 250px;
    }
    
    .image-overlay h3 {
        font-size: 20px;
    }
    
    .image-overlay p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .card-right {
        padding: 40px 30px;
    }
    
    .header-text h2 {
        font-size: 24px;
    }
    
    .image-container {
        max-height: 200px;
    }
    
    .image-overlay {
        bottom: 12px;
        left: 12px;
    }
    
    .image-overlay h3 {
        font-size: 18px;
    }
}