/* =============================================
   ALCANCIA - LOGIN PAGE
   Modern dark-tech BNPL platform login
   ============================================= */

/* --- Background & Layout --- */
.login {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a1a;
    overflow: hidden;
    padding: 0;
}

.login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: orbFloat 12s ease-in-out infinite;
}

.login-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.login-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -4s;
}

.login-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Container --- */
.login-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1100px;
    min-height: 640px;
    margin: 40px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(99, 102, 241, 0.05);
}

/* --- Branding (Left Side) --- */
.login-branding {
    background: linear-gradient(135deg, #0f0f2e 0%, #1a1a3e 50%, #0d0d28 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.login-branding::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.branding-content {
    position: relative;
    z-index: 1;
}

.login-logo {
    height: 50px;
    object-fit: contain;
    margin-bottom: 32px;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.branding-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.branding-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Branding Features */
.branding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.branding-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: all 0.3s ease;
}

.branding-feature:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818cf8;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.feature-text span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Login Form (Right Side) --- */
.login-form-wrapper {
    background: #0e0e24;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
}

.login-form-card {
    width: 100%;
    max-width: 380px;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 36px;
}

.form-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

.form-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Form Groups */
.login-form .form-group {
    margin-bottom: 22px;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.login-form .form-group label i {
    font-size: 0.8rem;
    color: #818cf8;
}

.login-form .form-group input {
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0 18px;
    font-size: 0.95rem;
    color: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.login-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.login-form .form-group input:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.login-form .form-group input:focus {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Password Field */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px !important;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.toggle-password:hover {
    color: #818cf8;
}

/* Error Message */
.error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.error-msg i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Login Button */
.btn-login {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    font-family: inherit;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

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

.btn-login span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login .loading-spinner {
    display: none;
    position: relative;
    z-index: 1;
}

.btn-login[disabled] {
    opacity: 0.7;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

/* Google Auth */
.google-auth {
    margin-bottom: 16px;
}

/* Forgot Password Link */
.forgot-link {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s ease;
    margin-bottom: 24px;
}

.forgot-link span {
    color: #818cf8;
    font-weight: 500;
}

.forgot-link:hover {
    color: rgba(255, 255, 255, 0.6);
}

.forgot-link:hover span {
    color: #a78bfa;
    text-decoration: underline;
}

/* Form Footer */
.form-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

.footer-secure i {
    color: #22c55e;
    font-size: 0.7rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .login-container {
        max-width: 900px;
        margin: 30px;
    }

    .login-branding {
        padding: 50px 40px;
    }

    .login-form-wrapper {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .login {
        padding: 0;
    }

    .login-container {
        grid-template-columns: 1fr;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-branding {
        display: none;
    }

    .login-form-wrapper {
        padding: 40px 28px;
        min-height: 100vh;
    }

    .login-form-card {
        max-width: 400px;
    }

    .form-header {
        margin-bottom: 28px;
    }

    /* Show logo on mobile since branding is hidden */
    .mobile-logo {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .login-form-wrapper {
        padding: 30px 20px;
    }

    .form-header h1 {
        font-size: 1.4rem;
    }

    .login-form .form-group input {
        height: 46px;
        font-size: 0.9rem;
    }

    .btn-login {
        height: 48px;
        font-size: 0.95rem;
    }
}
