/* assets/css/login.css */

/* 1. Global Viewport Override */
.universal-sidebar,
.top-header,
.global-footer {
    display: none !important;
}

.main-content {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
    background-color: var(--bg-light, #f8fafc) !important;
}

.module-container {
    height: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* 2. Page Environment & Animated Background */
.login-page-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #eef2f6; /* Soft cool grey base */
    font-family: 'Inter', sans-serif;
    perspective: 1000px;
}

/* Abstract Floating Orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.4);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.3);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.2);
    top: 50%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
    100% { transform: translate(-30px, -60px) scale(0.9); }
}

/* 3. Centered Layout Structure */
.login-form-panel {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
}

.login-3d-wrapper {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(40px) scale(0.95) rotateX(10deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}

/* Brand Header */
.login-brand-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.brand-logo {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1e293b;
}

/* 4. The 3D Glass Card */
.card-3d {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Inner Form Card */
.inner-form-card {
    background: rgba(248, 250, 252, 0.6);
    border-radius: 16px;
    padding: 1.5rem 1.5rem 0.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        inset 0 2px 10px rgba(0,0,0,0.02),
        inset 0 0 0 1px rgba(255,255,255,0.7),
        0 4px 12px rgba(0,0,0,0.03);
    position: relative;
}

/* View Panel Transitions */
.view-panel {
    animation: fadeSlideUp 0.4s ease forwards;
}

@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 5. Headers & Typography */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* 6. Tabs */
.login-tabs {
    display: flex;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.login-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-tab-btn.login-active {
    background: #ffffff;
    color: var(--primary-color, #5b21b6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 7. Floating Inputs (3D Inset) */
.floating-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.floating-group .form-control {
    width: 100%;
    padding: 1.1rem 1rem 0.5rem 1rem;
    font-size: 1rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.floating-group .form-control:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary-color, #5b21b6);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01), 0 0 0 4px rgba(91, 33, 182, 0.1);
}

.floating-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
}

.floating-group .form-control:focus ~ label,
.floating-group .form-control:not(:placeholder-shown) ~ label {
    top: 0.4rem;
    transform: translateY(0) scale(0.75);
    color: var(--primary-color, #5b21b6);
    font-weight: 600;
}

.password-input {
    position: relative;
}

.password-input .eye-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-input .eye-icon:hover {
    color: #0f172a;
}

/* 8. Actions & Checkboxes */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    cursor: pointer;
}

.checkbox-label input {
    accent-color: var(--primary-color, #5b21b6);
    width: 16px;
    height: 16px;
}

.forgot-link {
    color: var(--primary-color, #5b21b6);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-hover, #4c1d95);
    text-decoration: underline;
}

/* 9. 3D Push Buttons */
.btn-3d {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color, #5b21b6), #7c3aed);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 
        0 4px 0 #4c1d95,
        0 8px 16px rgba(91, 33, 182, 0.3);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-top: 0.5rem;
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #4c1d95,
        0 12px 20px rgba(91, 33, 182, 0.4);
    filter: brightness(1.05);
}

.btn-3d:active {
    transform: translateY(4px);
    box-shadow: 
        0 0 0 #4c1d95,
        0 2px 4px rgba(91, 33, 182, 0.3);
}

/* 10. Utilities & Dividers */
.utility-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 1.5rem 0;
}

.utility-divider::before,
.utility-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.utility-divider span {
    padding: 0 10px;
}

.bottom-utility-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.bottom-utility-links p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.bottom-utility-links a {
    color: var(--primary-color, #5b21b6);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-utility-links a:hover {
    color: var(--primary-hover, #4c1d95);
    text-decoration: underline;
}

.captcha-img-wrapper {
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.captcha-img-wrapper img {
    height: 100%;
    width: auto;
    display: block;
    cursor: pointer;
}

/* 11. Responsive Adjustments */
@media (max-width: 600px) {
    .login-form-panel {
        padding: 1rem; /* Less outer padding to give the card more width */
    }

    .login-3d-wrapper {
        gap: 1.25rem; /* Bring the logo closer to the card to save vertical space */
    }

    .brand-logo {
        height: 36px; /* Slightly smaller logo for mobile */
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .card-3d {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .inner-form-card {
        padding: 1.25rem 1rem 0.25rem 1rem; /* Reduce padding to stop cramming inputs */
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }

    .bg-orb {
        filter: blur(40px); /* Improve mobile rendering performance */
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .login-header p {
        font-size: 0.9rem;
    }
    
    .floating-group .form-control {
        padding: 1rem 0.75rem 0.4rem 0.75rem; /* Tighter inputs */
        font-size: 0.95rem;
    }
    
    .floating-group label {
        left: 0.75rem;
        font-size: 0.95rem;
    }

    /* Stack horizontally adjacent fields vertically on small screens */
    #signupForm > .inner-form-card > div:first-child {
        flex-direction: column;
        gap: 0 !important;
    }
    
    #signupForm > .inner-form-card > div:first-child .floating-group {
        margin-bottom: 1.25rem !important;
    }

    .captcha-group {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .captcha-group .floating-group {
        margin-bottom: 0 !important;
    }
    
    .captcha-img-wrapper {
        align-self: center;
        width: 100%;
        max-width: 200px;
    }
}
