/* ============================================
   AUTH PAGES - Login, Register, Forgot, Reset
   Centralized styles for all authentication pages
   ============================================ */

/* Container - Split Layout */
.login-container {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* ============================================
   LEFT BRANDING PANEL
   ============================================ */
.login-branding {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #7c3aed 100%);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    margin-bottom: 48px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.brand-logo:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

.brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.branding-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
}

.branding-hero h1 span {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.branding-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin: 0 auto 40px;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px 28px;
    backdrop-filter: blur(10px);
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
    font-size: 0.95rem;
}

.feature-item i {
    width: 28px;
    height: 28px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Decorative Circles */
.branding-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.deco-1 {
    width: 500px;
    height: 500px;
    bottom: -200px;
    right: -150px;
}

.deco-2 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.deco-3 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
}

/* ============================================
   RIGHT FORM PANEL
   ============================================ */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: white;
    position: relative;
}

/* Subtle background pattern for right panel */
.login-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(29, 78, 216, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(124, 58, 237, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* Mobile Logo */
.mobile-logo {
    display: none;
    margin-bottom: 40px;
}

.mobile-logo .brand-logo {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.1), rgba(124, 58, 237, 0.1));
    margin-bottom: 0;
}

.mobile-logo .brand-icon {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.mobile-logo .brand-name {
    color: #1e3a8a;
}

/* Form Header */
.form-header {
    margin-bottom: 36px;
    text-align: center;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.form-header p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 18px;
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.2s;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    color: #0f172a;
    transition: all 0.2s;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-wrapper input:focus {
    outline: none;
    background: white;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.input-wrapper:focus-within i:first-child {
    color: #1d4ed8;
}

/* Error States */
.input-wrapper.has-error {
    animation: shake 0.4s ease;
}

.input-wrapper.has-error input {
    border-color: #ef4444;
    background: #fef2f2;
}

.input-wrapper.has-error i:first-child {
    color: #ef4444;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.error-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #ef4444;
}

.error-text i {
    font-size: 0.8rem;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #1d4ed8;
}

.toggle-password i {
    font-size: 1rem;
}

/* Remember Checkbox */
.remember-row {
    margin-top: -4px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    border-color: transparent;
}

.checkbox-wrapper input:checked ~ .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.9rem;
    color: #64748b;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.35);
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(29, 78, 216, 0.45);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    transition: transform 0.3s;
}

.submit-btn:hover i {
    transform: translateX(4px);
}

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.form-divider span {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-btn {
    width: 64px;
    height: 54px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 14px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-btn.google { color: #ea4335; }
.social-btn.facebook { color: #1877f2; }
.social-btn.apple { color: #000000; }

.social-btn:hover {
    border-color: currentColor;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Signup/Login Prompt */
.signup-prompt {
    text-align: center;
    margin-top: 28px;
    font-size: 0.95rem;
    color: #64748b;
}

.signup-prompt a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.signup-prompt a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Dev Login Section */
.dev-login-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed #e2e8f0;
}

.dev-login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dev-login-header i {
    font-size: 0.85rem;
}

.dev-login-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.dev-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid var(--btn-color, #64748b);
    border-radius: 10px;
    color: var(--btn-color, #64748b);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.dev-login-btn:hover {
    background: var(--btn-color, #64748b);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dev-login-btn i {
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .login-branding {
        flex: 0 0 40%;
        padding: 40px;
    }
    
    .branding-hero h1 {
        font-size: 2.25rem;
    }
    
    .branding-hero p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-branding {
        display: none;
    }
    
    .login-form-panel {
        padding: 32px 24px;
        min-height: 100vh;
    }
    
    .mobile-logo {
        display: flex;
        justify-content: center;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
    
    .social-buttons {
        gap: 10px;
    }
    
    .social-btn {
        width: 56px;
        height: 48px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 24px 20px;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .input-wrapper input {
        padding: 14px 14px 14px 46px;
    }
    
    .submit-btn {
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    .dev-login-buttons {
        flex-direction: column;
    }
    
    .dev-login-btn {
        width: 100%;
        justify-content: center;
    }
}
