@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: radial-gradient(circle at 10% 20%, #1e293b 0%, #0f172a 40%, #020617 90%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Luces de fondo */
body::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.22) 0%, transparent 70%);
    top: 5%;
    left: 10%;
    border-radius: 50%;
    filter: blur(50px);
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, transparent 70%);
    bottom: 5%;
    right: 10%;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

/* Contenedor Principal (Tarjeta Dividida) */
.login-wrapper {
    width: 100%;
    max-width: 960px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    min-height: 580px;
}


/* --- LADO IZQUIERDO: IMAGEN DEL HOTEL --- */
.login-image-side {
    position: relative;
    /* Carga la imagen local desde la carpeta /img/ */
    background: url('/img/vancouver-hotels.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem 2.5rem;
}


.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.image-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.hotel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #facc15;
    margin-bottom: 1rem;
}

.hotel-badge span {
    color: #ffffff;
    font-weight: 500;
    margin-left: 0.3rem;
}

.image-content h2 {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    color: #ffffff;
}

.image-content p {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.5;
    font-weight: 300;
}

/* --- LADO DERECHO: FORMULARIO --- */
.login-form-side {
    padding: 3rem 2.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.8rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0284c7 100%);
    color: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 18px -4px rgba(2, 132, 199, 0.45);
}

.login-header h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
}

.login-header p {
    font-size: 0.84rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.84rem;
    margin-bottom: 1.25rem;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.5s ease, margin 0.5s ease, padding 0.5s ease;
    overflow: hidden;
}

.alert.alert-fade-out {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.input-field {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
}

.input-field:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.input-field:focus-within {
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.input-field i {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.input-field:focus-within i {
    color: #0284c7;
}

.input-field input,
.input-field select {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.92rem;
    color: #0f172a;
}

.input-field select {
    cursor: pointer;
}

.input-field select option {
    background: #ffffff;
    color: #0f172a;
    padding: 0.5rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #475569;
    cursor: pointer;
}

.remember-me input {
    accent-color: #0284c7;
    cursor: pointer;
}

.forgot-password {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0284c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(2, 132, 199, 0.55);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.login-footer p {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* RESPONSIVE (En celulares la imagen se oculta para que el formulario quede cómodo) */
@media (max-width: 820px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .login-image-side {
        display: none;
    }

    .login-form-side {
        padding: 2.5rem 1.8rem;
    }
}
