/* ============================================================================
   OmniAI — Authentication Design System
   Matching the main app's refined minimalism
   ============================================================================ */

/* ============================================================================
   Auth Page Layout
   ============================================================================ */

   .auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #1a1a1f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================================================
   Left Side — Branding
   ============================================================================ */

.auth-branding {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: linear-gradient(160deg, #2a1f4e 0%, #1a1a2e 40%, #1a1f3a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.auth-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(124, 108, 240, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(224, 120, 80, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

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

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

.auth-logo .logo-icon {
    font-size: 32px;
}

.auth-logo .logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-branding h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 16px 0;
    letter-spacing: -0.8px;
    line-height: 1.15;
}

.auth-branding p {
    font-size: 16px;
    opacity: 0.75;
    line-height: 1.7;
    margin: 0 0 48px 0;
    font-weight: 400;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14.5px;
    opacity: 0.8;
    font-weight: 500;
}

.feature-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* ============================================================================
   Right Side — Form
   ============================================================================ */

.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #1a1a1f;
}

.auth-form-container {
    width: 100%;
    max-width: 380px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-form-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ececf0;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.auth-form-header p {
    font-size: 14px;
    color: #6c6c7a;
    margin: 0;
}

/* ============================================================================
   Form Elements
   ============================================================================ */

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

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #a8a8b3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 12.5px;
    color: #7c6cf0;
    text-decoration: none;
    font-weight: 500;
    transition: color 150ms;
}

.forgot-link:hover {
    color: #a599f5;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    border: 1px solid #35353f;
    border-radius: 10px;
    background: #222228;
    color: #ececf0;
    outline: none;
    transition: border-color 200ms, box-shadow 200ms;
}

.form-group input:focus {
    border-color: #7c6cf0;
    box-shadow: 0 0 0 3px rgba(124, 108, 240, 0.15);
}

.form-group input::placeholder {
    color: #4a4a56;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: 0.4;
    transition: opacity 150ms;
}

.toggle-password:hover {
    opacity: 0.8;
}

/* Checkbox */
.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: #6c6c7a;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7c6cf0;
    cursor: pointer;
    border-radius: 4px;
}

/* ============================================================================
   Submit Button
   ============================================================================ */

.auth-submit-btn {
    padding: 12px 24px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: white;
    background: #7c6cf0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
}

.auth-submit-btn:hover:not(:disabled) {
    background: #6b5ce0;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 108, 240, 0.3);
}

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

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ============================================================================
   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: #2e2e38;
}

.auth-divider span {
    font-size: 12px;
    color: #4a4a56;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ============================================================================
   Social Login
   ============================================================================ */

.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    border: 1px solid #35353f;
    border-radius: 10px;
    background: #222228;
    color: #a8a8b3;
    cursor: pointer;
    transition: all 200ms;
}

.social-btn:hover {
    background: #2a2a32;
    border-color: #7c6cf0;
    color: #ececf0;
}

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

/* ============================================================================
   Messages (Error / Success)
   ============================================================================ */

.auth-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: #ef4444;
    font-size: 13.5px;
    margin-bottom: 16px;
}

.auth-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.25);
    border-radius: 10px;
    color: #34c759;
    font-size: 13.5px;
    margin-bottom: 16px;
}

/* ============================================================================
   Footer Links
   ============================================================================ */

.auth-footer {
    text-align: center;
    margin-top: 28px;
}

.auth-footer p {
    font-size: 13.5px;
    color: #6c6c7a;
    margin: 0;
}

.auth-footer a {
    color: #7c6cf0;
    text-decoration: none;
    font-weight: 600;
    transition: color 150ms;
}

.auth-footer a:hover {
    color: #a599f5;
}

/* Dev Skip */
.dev-mode-skip {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #2e2e38;
}

.skip-link {
    font-size: 12.5px;
    color: #4a4a56;
    text-decoration: none;
    transition: color 150ms;
}

.skip-link:hover {
    color: #6c6c7a;
}

/* ============================================================================
   Password Strength
   ============================================================================ */

.password-strength-container {
    margin-top: 8px;
}

.strength-bar-bg {
    height: 3px;
    background: #2e2e38;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
    border-radius: 2px;
}

.strength-bar.weak { background: #ef4444; }
.strength-bar.medium { background: #f0a030; }
.strength-bar.strong { background: #34c759; }

.strength-text {
    font-size: 11.5px;
    margin-top: 4px;
    font-weight: 500;
}

.strength-text.weak { color: #ef4444; }
.strength-text.medium { color: #f0a030; }
.strength-text.strong { color: #34c759; }

/* Password Match */
.password-match-text {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.password-match-text.match { color: #34c759; }
.password-match-text.no-match { color: #ef4444; }

/* Terms */
.terms-link {
    color: #7c6cf0;
    text-decoration: none;
}

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

/* ============================================================================
   Profile Page
   ============================================================================ */

.profile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: #1a1a1f;
    border-bottom: 1px solid #2e2e38;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ececf0;
}

.nav-brand .logo-icon { font-size: 22px; }
.nav-brand .logo-text { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: #6c6c7a;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 150ms;
}

.nav-link:hover { color: #a8a8b3; }

.nav-logout-btn {
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: #ef4444;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms;
}

.nav-logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2e2e38;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #7c6cf0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: #ececf0;
    letter-spacing: -0.3px;
}

.profile-info p {
    margin: 0;
    font-size: 14px;
    color: #6c6c7a;
}

.profile-joined {
    font-size: 13px;
    color: #4a4a56;
    margin-top: 4px;
}

.profile-section {
    background: #222228;
    border: 1px solid #35353f;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.profile-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 700;
    color: #ececf0;
    letter-spacing: -0.2px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Select inputs */
.pref-select {
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    border: 1px solid #35353f;
    border-radius: 10px;
    background: #222228;
    color: #ececf0;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: border-color 200ms, box-shadow 200ms;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c6c7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.pref-select:focus {
    border-color: #7c6cf0;
    box-shadow: 0 0 0 3px rgba(124, 108, 240, 0.15);
}

.pref-select option {
    background: #222228;
    color: #ececf0;
}

/* Buttons */
.btn-secondary {
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: #a8a8b3;
    background: #2a2a32;
    border: 1px solid #35353f;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms;
}

.btn-secondary:hover {
    background: #32323c;
    color: #ececf0;
}

.btn-danger {
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: #ef4444;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

/* Danger Section */
.danger-section {
    border-color: rgba(239, 68, 68, 0.2);
}

.danger-section h3 { color: #ef4444; }

.danger-text {
    font-size: 14px;
    color: #6c6c7a;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(6px);
}

.modal-content {
    background: #222228;
    border: 1px solid #35353f;
    border-radius: 16px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.modal-content h3 {
    margin: 0 0 12px 0;
    color: #ef4444;
    font-size: 18px;
    font-weight: 700;
}

.modal-content p {
    margin: 0;
    font-size: 14px;
    color: #6c6c7a;
    line-height: 1.6;
}

.modal-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    border: 1px solid #35353f;
    border-radius: 10px;
    background: #1a1a1f;
    color: #ececf0;
    outline: none;
    box-sizing: border-box;
    transition: border-color 200ms, box-shadow 200ms;
}

.modal-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Dev Reset Info */
.dev-reset-info {
    padding: 14px 16px;
    background: rgba(124, 108, 240, 0.08);
    border: 1px solid rgba(124, 108, 240, 0.2);
    border-radius: 10px;
    color: #a8a8b3;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 16px;
}

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

@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-branding {
        padding: 40px 24px;
        min-height: auto;
    }
    
    .auth-branding-content {
        text-align: center;
    }
    
    .auth-branding h1 {
        font-size: 28px;
    }
    
    .auth-branding p {
        font-size: 15px;
        margin-bottom: 24px;
    }
    
    .auth-features {
        display: none;
    }
    
    .auth-form-section {
        padding: 32px 24px;
    }
}

@media (max-width: 600px) {
    .profile-nav {
        padding: 12px 16px;
    }
    .profile-container {
        padding: 24px 16px 60px;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-branding {
        padding: 32px 20px;
    }
    
    .auth-form-section {
        padding: 24px 20px;
    }
    
    .auth-form-header h2 {
        font-size: 22px;
    }
    
    .social-login {
        flex-direction: column;
    }
}