/* ============================================================
   LOGIN PAGE – PROFESSIONAL REDESIGN
   ============================================================ */

/* ---------- BASE SETUP ---------- */
body.login-page-wrapper {
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #0f0f1a;
}

.login-page-wrapper .row.g-0 {
    height: 100vh;
}

/* ============================================================
   LEFT PANEL – BRAND / SHOWCASE (Dark Premium)
   ============================================================ */
.login-page-wrapper .login-img-container {
    min-height: 100vh;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Deep navy with subtle gradient */
    background: linear-gradient(160deg, #080b1a 0%, #0d1033 40%, #151a45 70%, #0d1033 100%);
}

/* Animated aurora glow – top */
.login-img-container::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 1;
    animation: auroraFloat 8s ease-in-out infinite alternate;
}

/* Animated aurora glow – bottom */
.login-img-container::after {
    content: "";
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 1;
    animation: auroraFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes auroraFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.15); }
}

/* Grid overlay pattern */
.login-img-container .grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: 2;
    pointer-events: none;
}

/* Floating orbs */
.login-img-container .orb {
    position: absolute;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    animation: orbAppear 1.5s ease forwards;
}

.login-img-container .orb-1 {
    width: 8px; height: 8px;
    background: rgba(99, 102, 241, 0.6);
    top: 18%; left: 25%;
    animation-delay: 0.5s;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}
.login-img-container .orb-2 {
    width: 5px; height: 5px;
    background: rgba(16, 185, 129, 0.5);
    top: 65%; left: 70%;
    animation-delay: 1s;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.login-img-container .orb-3 {
    width: 6px; height: 6px;
    background: rgba(139, 92, 246, 0.5);
    top: 35%; left: 80%;
    animation-delay: 1.5s;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}
.login-img-container .orb-4 {
    width: 4px; height: 4px;
    background: rgba(99, 102, 241, 0.4);
    top: 80%; left: 20%;
    animation-delay: 2s;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

@keyframes orbAppear {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

/* Orb pulsing animation */
.login-img-container .orb-1 { animation: orbAppear 1.5s ease 0.5s forwards, orbPulse 4s ease-in-out 2s infinite; }
.login-img-container .orb-2 { animation: orbAppear 1.5s ease 1s forwards, orbPulse 5s ease-in-out 2.5s infinite; }
.login-img-container .orb-3 { animation: orbAppear 1.5s ease 1.5s forwards, orbPulse 6s ease-in-out 3s infinite; }
.login-img-container .orb-4 { animation: orbAppear 1.5s ease 2s forwards, orbPulse 4.5s ease-in-out 3.5s infinite; }

@keyframes orbPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.8); }
}

/* Brand content in left panel */
.brand-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem;
}

.brand-content .login-logo {
    max-width: 280px;
    width: 60%;
    height: auto;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.2));
    animation: logoFadeIn 1.2s ease-out forwards;
}

@keyframes logoFadeIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-content .brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: textSlideUp 0.8s ease 0.4s forwards;
}

.brand-content .brand-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
    opacity: 0;
    animation: textSlideUp 0.8s ease 0.6s forwards;
}

@keyframes textSlideUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Decorative line separator */
.brand-content .brand-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-purple, #8b5cf6));
    border-radius: 3px;
    margin: 1.5rem auto;
    opacity: 0;
    animation: textSlideUp 0.8s ease 0.5s forwards;
}

/* ============================================================
   RIGHT PANEL – LOGIN FORM
   ============================================================ */
.login-page-wrapper .login-form-container {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Subtle background decoration on form side */
.login-form-container::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.login-form-container::after {
    content: "";
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ---------- LOGIN CARD ---------- */
.login-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
    z-index: 1;
    animation: cardFadeIn 0.8s ease-out forwards;
}

/* Remove old decorative pseudo-elements */
.login-card::before,
.login-card::after {
    display: none;
}

@keyframes cardFadeIn {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Logo in the form */
.login-card .login-logo-mobile {
    width: 140px;
    margin-bottom: 1.5rem;
}

/* Heading */
.login-card .display-6 {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.login-card .fs-7 {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 400;
}

/* ---------- FORM LABELS ---------- */
.login-card .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

/* ---------- INPUT FIELDS ---------- */
.login-card .input-modern {
    width: 100%;
    padding: 0.8125rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.875rem;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: "Lexend Deca", sans-serif;
}

.login-card .input-modern::placeholder {
    color: #94a3b8;
}

.login-card .input-modern:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.login-card .input-modern:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.login-card .input-modern.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.login-card .input-modern.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* ---------- PASSWORD WRAPPER ---------- */
.login-page-wrapper .password-wrapper {
    position: relative;
}

.login-page-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    padding: 0.25rem;
}

.login-page-wrapper .toggle-password:hover {
    color: #4f46e5;
}

/* ---------- CHECKBOX ---------- */
.login-card .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-card .form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.login-card .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.login-card .form-check-label {
    font-size: 0.8125rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

/* ---------- LOGIN BUTTON ---------- */
.btn-login-action {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: "Lexend Deca", sans-serif;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    background-size: 200% 200%;
    color: #ffffff;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn-login-action::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.btn-login-action:hover::before {
    left: 100%;
}

.btn-login-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
    background-position: right center;
}

.btn-login-action:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

/* Spinner states */
.btn-login-action .spinner-border,
.btn-login-action .loading-text {
    display: none;
}

.btn-login-action:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15) !important;
}

.btn-login-action:disabled .spinner-border {
    display: inline-block !important;
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    margin-right: 0.4rem;
}

.btn-login-action:disabled .loading-text {
    display: inline-block !important;
}

.btn-login-action:disabled .btn-text {
    display: none;
}

/* ---------- FOOTER / VERSION ---------- */
.login-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE – MOBILE
   ============================================================ */
@media (max-width: 991.98px) {
    body.login-page-wrapper {
        background: #ffffff;
    }

    .login-page-wrapper .login-form-container {
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }

    .login-card {
        max-width: 100%;
    }

    .login-card .display-6 {
        font-size: 1.5rem !important;
    }

    .login-footer {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 2rem;
    }
}

@media (max-width: 575.98px) {
    .login-page-wrapper .login-form-container {
        padding: 1.5rem 1rem;
    }

    .login-card .display-6 {
        font-size: 1.25rem !important;
    }

    .btn-login-action {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}
