/* ==================== AUTH PAGE STYLES ==================== */

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* ==================== AUTH HEADER ==================== */

.auth-header {
    width: 100%;
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
    box-sizing: border-box;
}

[data-theme="dark"] .auth-header,
[data-theme="moon"] .auth-header {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: var(--border-primary);
}

.auth-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.auth-brand:hover {
    opacity: 0.9;
}

.auth-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.auth-brand-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header-divider {
    width: 1px;
    height: 20px;
    background: var(--border-primary);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.auth-back-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-hover);
    transform: translateX(-2px);
}

.auth-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-container {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: calc(100vh - 64px);
}

/* ==================== LEFT SIDE - BRANDING ==================== */

.auth-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--primary-glow) 0%, transparent 50%);
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.auth-logo h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tagline {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-feature svg {
    color: var(--success);
    flex-shrink: 0;
}

/* ==================== RIGHT SIDE - AUTH FORMS ==================== */

.auth-forms {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--bg-primary);
    min-height: calc(100vh - 64px);
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.4s ease;
}

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

.auth-card-header {
    margin-bottom: 32px;
}

.auth-card-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary);
}

/* ==================== AUTH FORM ELEMENTS ==================== */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-form .form-group input {
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
}

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

.password-input-wrapper input {
    width: 100%;
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 10;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary);
    background-color: rgba(2, 164, 203, 0.08);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

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

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

.strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.strength-bar span.weak {
    background: var(--error);
}

.strength-bar span.fair {
    background: var(--warning);
}

.strength-bar span.good {
    background: var(--primary);
}

.strength-bar span.strong {
    background: var(--success);
}

.strength-text {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-remember,
.checkbox-terms {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-remember input,
.checkbox-terms input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

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

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

.forgot-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.forgot-link:hover {
    opacity: 0.8;
}

/* Auth Submit Button */
.auth-submit-btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn .btn-spinner {
    animation: spin 1s linear infinite;
}

.auth-secondary-btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-secondary-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-primary);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.social-btn svg {
    flex-shrink: 0;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

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

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

/* ==================== RESET SUCCESS ==================== */

.reset-success {
    text-align: center;
    padding: 32px 0;
}

.success-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}

.reset-success h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.reset-success p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.reset-success strong {
    color: var(--text-primary);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ==================== VERIFY EMAIL ==================== */

.verify-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.verify-email-address {
    display: block;
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 15px;
}

.verify-instructions {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 24px 0;
}

.verify-instructions p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==================== AUTH TOAST ==================== */

.auth-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn var(--transition-normal) ease;
    max-width: 400px;
}

.auth-toast.success {
    border-color: var(--success);
}

.auth-toast.success .toast-icon {
    color: var(--success);
}

.auth-toast.error {
    border-color: var(--error);
}

.auth-toast.error .toast-icon {
    color: var(--error);
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .auth-branding {
        display: none;
    }

    .auth-forms {
        flex: 1;
        width: 100%;
        padding: 40px 20px;
    }

    .auth-back-link span {
        display: none !important;
    }

    .auth-back-link {
        width: 38px;
        height: 38px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-md);
    }

    .theme-toggle-btn .theme-label {
        display: none !important;
    }

    .theme-toggle-btn {
        width: 38px;
        height: 38px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 768px) {
    .auth-header {
        padding: 0 16px;
        height: 56px;
    }

    .auth-back-link,
    .theme-toggle-btn {
        width: 34px;
        height: 34px;
        border-radius: var(--radius-sm);
    }

    .auth-container {
        min-height: calc(100vh - 56px);
    }

    .auth-forms {
        min-height: calc(100vh - 56px);
        padding: 28px 16px;
    }

    .auth-header-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-brand-name {
        display: none;
    }

    .auth-header-left {
        gap: 10px;
    }

    .auth-forms {
        padding: 24px 14px;
    }

    .auth-card {
        width: 100%;
        max-width: 100%;
    }

    .auth-card-header h2 {
        font-size: 24px;
    }

    .form-group input {
        font-size: 16px;
        min-height: 44px;
    }

    .social-login {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .auth-toast {
        left: 16px;
        right: 16px;
        top: 16px;
    }
}

@media (max-width: 380px) {
    .auth-forms {
        padding: 16px 8px;
    }

    .auth-card-header h2 {
        font-size: 20px;
    }

    .auth-card-header p {
        font-size: 13px;
    }
}
