# Simplified Registration Plan - Google OAuth Only

## Overview
Simplify the registration flow by removing the 3-option selection page and making Google OAuth the primary/only registration method. Use the same button style as the NotebookLM "حساب Google المشترك" button.

## Current State
1. `/auth/register` shows 3 options: Enterprise, Google, Email
2. `/auth/register-with-google` has account type selection (entrepreneur/investor/factory/incubator)
3. Google button is styled differently across pages

## Target State
1. `/auth/register` redirects directly to Google OAuth
2. Single-step form after Google login
3. White Google button matching notebooklm style
4. No account type selection (default to 'entrepreneur')

---

## Files to Modify

### 1. `app/templates/auth/register.html`
**Changes:**
- Remove 3-option selection cards
- Show Google registration form directly
- Use white Google button style from notebooklm
- Redirect to `/auth/google/login` for OAuth flow

**New Button Style (from notebooklm.html:126-134):**
```html
<button class="px-5 py-2.5 rounded-xl text-sm font-bold transition-all bg-white text-gray-800 hover:bg-gray-100 shadow-lg flex items-center gap-2">
    <svg class="w-4 h-4" viewBox="0 0 24 24" fill="none">
        <path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4"/>
        <path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/>
        <path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"/>
        <path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/>
    </svg>
    تسجيل الدخول باستخدام Google
</button>
```

### 2. `app/templates/auth/register_with_google.html`
**Changes:**
- Remove account type selection (lines 55-84)
- Remove company name field (lines 86-90, 186-190)
- Remove JavaScript for account type toggle (lines 248-260)
- Set default account_type to 'entrepreneur' (hidden field)
- Keep organization selection (optional)
- Keep interests selection (optional)

**Simplified Form Fields:**
1. Google Email (read-only display)
2. Full Name (pre-filled from Google)
3. Organization (optional, AJAX searchable)
4. Interests/Sectors (optional, selectable tags)
5. Terms checkbox
6. Submit button

### 3. `app/routes/auth.py`
**Changes to `register()` route (lines 15-67):**
- Change to redirect to `/auth/google/login`
- Or render simplified form directly

**No changes needed to:**
- `/auth/google/login` - already works
- `/auth/google/callback` - already works
- `/auth/google-register-form` - already works
- `/auth/google-register-submit` - already works (just needs default account_type)

---

## Implementation Steps

### Step 1: Update `register.html` Template
Replace entire content with simplified Google registration page:
- Show logo and title
- Display "تسجيل الدخول باستخدام Google" button (white, notebooklm style)
- Link back to login page
- Remove all 3-option cards

### Step 2: Simplify `register_with_google.html`
1. Remove account type grid (lines 55-84)
2. Add hidden input: `<input type="hidden" name="account_type" value="entrepreneur">`
3. Remove company name field (lines 86-90)
4. Remove company name toggle script (lines 248-260)
5. Keep organization and interests fields

### Step 3: Update Routes (if needed)
The existing Google OAuth flow should work without changes:
1. User clicks Google button
2. Redirects to `/auth/google/login`
3. Google OAuth flow
4. Callback to `/auth/google/callback`
5. New users → `/auth/google-register-form` (shows register_with_google.html)
6. Submit to `/auth/google-register-submit`

### Step 4: Test Flow
1. Visit `/auth/register`
2. See Google button
3. Click and complete OAuth
4. See simplified form (name pre-filled)
5. Select organization (optional)
6. Select interests (optional)
7. Accept terms
8. Submit → create account with account_type='entrepreneur'

---

## Visual Design

### Button Style (from notebooklm):
```css
/* White background, gray text, shadow, hover effect */
bg-white text-gray-800 hover:bg-gray-100 shadow-lg
px-5 py-2.5 rounded-xl text-sm font-bold
flex items-center gap-2
```

### Page Layout:
```
┌─────────────────────────────────────┐
│          [Logo]                      │
│    إنشاء حساب جديد                   │
│  أنشئ حسابك للوصول إلى أدوات        │
│       تحليل الاستثمار               │
│                                     │
│  ┌─────────────────────────────┐   │
│  │ [G] تسجيل الدخول باستخدام  │   │
│  │         Google              │   │
│  └─────────────────────────────┘   │
│                                     │
│     ← العودة لصفحة الدخول           │
└─────────────────────────────────────┘
```

### Post-OAuth Form:
```
┌─────────────────────────────────────┐
│          [Logo]                      │
│    إنشاء حساب جديد                   │
│                                     │
│  user@gmail.com  [read-only]        │
│  ─────────────────────────────      │
│  الاسم الكامل                       │
│  [John Doe            ]             │
│                                     │
│  المنظمة / الشركة (اختياري)         │
│  [اختر منظمة...         ▼]         │
│                                     │
│  القطاعات المهتم بها (اختياري)       │
│  [صناعي] [تقني] [تجاري] ...          │
│                                     │
│  ☐ أوافق على الشروط والأحكام       │
│                                     │
│  [    إنشاء حساب    ]               │
│                                     │
│  ← العودة لصفحة الدخول               │
└─────────────────────────────────────┘
```

---

## Database Impact
No database changes needed. The User model already supports:
- `google_id`, `google_email`, `google_access_token`, `google_refresh_token`
- `account_type` (will default to 'entrepreneur')
- `organization_id` (optional)
- `interests_json` (optional)

---

## Backward Compatibility
- Existing users unaffected
- Old registration routes (`/auth/register-step1`, etc.) can remain for now
- Can clean up unused routes later

---

## Summary of Changes
| File | Lines Affected | Change Type |
|------|----------------|-------------|
| `app/templates/auth/register.html` | 18-65 | Replace content |
| `app/templates/auth/register_with_google.html` | 55-90, 248-260 | Remove account type UI |
| `app/routes/auth.py` | 15-67 | Optional: simplify route |

**Total estimated changes:** ~100 lines removed, ~20 lines added
