/* ============================================
   UcuzHesaplar - Auth Pages (Login/Register)
   Fixed Version
   ============================================ */

/* Auth Page Base */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

/* Background Effects */
.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 15s ease-in-out infinite;
}

.auth-orb-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--primary);
    opacity: 0.1;
}

.auth-orb-2 {
    bottom: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: var(--secondary);
    opacity: 0.1;
    animation-delay: -5s;
}

.auth-orb-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.05;
    animation-delay: -10s;
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* Left Side - Branding */
.auth-branding {
    flex: 0 0 45%;
    max-width: 45%;
    padding: 48px;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 28px 0 0 28px;
}

.auth-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-branding .logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-decoration: none;
    margin-bottom: 48px;
}

.auth-branding .logo i {
    font-size: 28px;
}

.branding-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.branding-content h1 {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
}

.branding-content > p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
    line-height: 1.6;
}

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

.branding-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.branding-feature i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
}

/* Branding Stats */
.branding-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.branding-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    color: white;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* Branding Benefits */
.branding-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
}

.benefit-item i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

/* Branding Footer */
.branding-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 24px;
}

.branding-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Right Side - Form */
.auth-form-container {
    flex: 1;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-card);
    border-radius: 0 28px 28px 0;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
}

/* Theme Toggle - Fixed Position */
.auth-form-wrapper .theme-toggle {
    position: absolute !important; 
    top: -20px !important;
    right: 0 !important;
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: var(--bg-tertiary) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transition: all var(--transition-fast) !important;
    border: 1px solid var(--border-color) !important;
    z-index: 10 !important;
}

.auth-form-wrapper .theme-toggle:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-light) !important;
    transform: rotate(15deg) !important;
}

.auth-form-wrapper .theme-toggle i {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    font-size: 18px !important;
    transition: all var(--transition-normal) !important;
}

.auth-form-wrapper .theme-toggle .fa-sun {
    color: #FCD34D !important;
    opacity: 0 !important;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0) !important;
}

.auth-form-wrapper .theme-toggle .fa-moon {
    color: #A78BFA !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) rotate(0) scale(1) !important;
}

[data-theme="light"] .auth-form-wrapper .theme-toggle .fa-sun {
    opacity: 1 !important;
    transform: translate(-50%, -50%) rotate(0) scale(1) !important;
}

[data-theme="light"] .auth-form-wrapper .theme-toggle .fa-moon {
    opacity: 0 !important;
    transform: translate(-50%, -50%) rotate(90deg) scale(0) !important;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 28px;
    margin-top: 20px;
}

.auth-form-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i:first-child {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-wrapper:has(input:focus) > i:first-child {
    color: var(--primary);
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--danger);
    border-radius: 4px;
    transition: all var(--transition-normal);
}

.strength-fill.weak { width: 25%; background: var(--danger); }
.strength-fill.fair { width: 50%; background: var(--warning); }
.strength-fill.good { width: 75%; background: #3B82F6; }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 70px;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-top: 1px;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-wrapper a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-wrapper a:hover {
    text-decoration: underline;
}

/* Forgot Link */
.forgot-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

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

/* Submit Button */
.auth-form .btn {
    margin-top: 6px;
}

.auth-form .btn span {
    flex: 1;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .auth-container {
        max-width: 480px;
        flex-direction: column;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-form-container {
        padding: 32px 28px;
        border-radius: 28px;
        max-height: none;
    }
}

@media (max-width: 600px) {
    .auth-page {
        padding: 12px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .auth-container {
        border-radius: 20px;
        min-height: auto;
        margin: 10px 0;
    }
    
    .auth-form-container {
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .auth-form-header {
        margin-top: 30px;
    }
    
    .auth-form-header h2 {
        font-size: 22px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 18px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .auth-form-wrapper .theme-toggle {
        top: -10px;
        right: -5px;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.input-wrapper.error input {
    border-color: var(--danger);
    animation: shake 0.5s ease-in-out;
}

.input-wrapper.error i:first-child {
    color: var(--danger);
}

.input-wrapper.success input {
    border-color: var(--success);
}

.input-wrapper.success i:first-child {
    color: var(--success);
}

/* Form Loading State */
.auth-form.loading .btn[type="submit"] {
    pointer-events: none;
    opacity: 0.7;
}

.auth-form.loading .btn[type="submit"] span {
    opacity: 0;
}

.auth-form.loading .btn[type="submit"]::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Alert Messages
   ============================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: alertSlide 0.3s ease;
}

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

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-error i {
    color: #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-success i {
    color: #10b981;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.alert-warning i {
    color: #f59e0b;
}

/* Light theme alerts */
[data-theme="light"] .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

[data-theme="light"] .alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

[data-theme="light"] .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
}
