/* Professional Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
    /* Colors */
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: var(--spacing-md);
}

.register-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Left side - Branding */
.image-section {
    flex: 0 0 40%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
}

.image-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.1rem;
    color: white;
    font-weight: 300;
    opacity: 0.9;
}

/* Right side - Form */
.form-section {
    flex: 0 0 60%;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

input {
    width: 100%;
    padding: 14px var(--spacing-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Password Toggle */
.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Role Selector */
.role-selector {
    margin-bottom: var(--spacing-lg);
}

.role-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.role-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.role-btn {
    flex: 1;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.role-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.role-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.role-icon {
    width: 24px;
    height: 24px;
}

.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-lg);
}

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

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 768px) {
    body {
        padding: 0;
        align-items: flex-start; /* Start from top */
    }
    
    .register-container {
        flex-direction: column;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }

    /* Compact Header on Mobile */
    .image-section {
        flex: 0 0 auto;
        width: 100%;
        padding: var(--spacing-lg);
        min-height: auto;
    }

    .logo-large {
        font-size: 2rem;
        margin-bottom: var(--spacing-xs);
    }

    .tagline {
        font-size: 1rem;
    }

    .form-section {
        flex: 1;
        padding: var(--spacing-lg);
        width: 100%;
    }

    h2 {
        font-size: 1.5rem;
    }

    .subtitle {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .image-section {
        padding: var(--spacing-md);
    }

    .form-section {
        padding: var(--spacing-md);
    }

    /* Stack role buttons on very small screens if needed */
    .role-buttons {
        flex-wrap: wrap;
    }
    
    .role-btn {
        padding: var(--spacing-sm);
        font-size: 0.9rem;
    }

    .role-icon {
        width: 20px;
        height: 20px;
    }

    input {
        /* Prevent zoom on iOS */
        font-size: 16px; 
    }
    
    .footer-text {
        margin-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }
}