/* ==========================================
   AUTH LAYOUT STYLES
   ========================================== */
:root {
    --primary-dark: #0a0f1e;
    --secondary-dark: #151b2e;
    --accent-blue: #4f78ff;
    --accent-cyan: #00d4ff;
    --text-primary: #ffffff;
    --text-secondary: #8b93a7;
    --success: #00ff88;
    --error: #ff4757;
}

.auth-body {
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    background: var(--primary-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0f1e 0%, #1a1f3a 100%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

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

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

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, 30px) rotate(90deg); }
    50% { transform: translate(20px, -40px) rotate(180deg); }
    75% { transform: translate(-30px, 20px) rotate(270deg); }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(79, 120, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 120, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    gap: 0;
    background: rgba(21, 27, 46, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(79, 120, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.8s ease-out;
}

@@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Branding */
.login-branding {
    padding: 4rem;
    background: linear-gradient(135deg, rgba(79, 120, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-right: 1px solid rgba(79, 120, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-logo img {
    height: 60px;
    filter: brightness(0) invert(1);
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.brand-title {
    font-family: 'Syne', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #4f78ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.7s backwards;
}

.brand-features {
    list-style: none;
    padding: 0;
    animation: fadeIn 1s ease-out 0.9s backwards;
}

.brand-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.brand-features li i {
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

@@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Right Side - Form */
.login-form-section {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInRight 1s ease-out 0.4s backwards;
}

@@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-header {
    margin-bottom: 3rem;
}

.form-title {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-control-custom {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(79, 120, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control-custom::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-control-custom:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(79, 120, 255, 0.1);
}

.form-control-custom:focus + .input-icon {
    color: var(--accent-blue);
}

.password-toggle {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--accent-blue);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.custom-checkbox label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
}

.forgot-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--accent-cyan);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 120, 255, 0.4);
}

/* Alert */
.alert-custom {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.5s ease-out;
}

@@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.login-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(79, 120, 255, 0.1);
}

/* Responsive */
@@media (max-width: 992px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .login-branding {
        display: none;
    }

    .login-form-section {
        padding: 3rem 2rem;
    }
}

@@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }

    .login-form-section {
        padding: 2rem 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@@keyframes spin {
    to { transform: rotate(360deg); }
}
