:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Elements */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 2s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Main Layout */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Left Panel */
.left-panel {
    flex: 1;
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-content {
    width: 100%;
    max-width: 500px;
}

.logo-section {
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: white;
}

.logo i {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.tagline h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.tagline p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.25rem;
    color: white;
}

.feature-content h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Right Panel */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
    min-width: 500px;
}

/* Form Container */
.form-container {
    width: 100%;
    max-width: 400px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.form-container.active {
    opacity: 1;
    transform: translateY(0);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.form-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    font-size: 1rem;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 400;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

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

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.strength-bars {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: var(--gray-200);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    min-width: fit-content;
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.requirement.met {
    color: var(--success-600);
}

.requirement i {
    font-size: 0.625rem;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.requirement.met i {
    opacity: 1;
}

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

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.forgot-link {
    color: var(--primary-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary-600);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(2px);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.google-icon {
    font-size: 1.125rem;
    color: #4285f4;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    position: relative;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-footer p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.link-primary {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Alert Messages */
.alert-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.alert-message.success {
    background: var(--success-50);
    color: var(--success-800);
    border: 1px solid var(--success-200);
}

.alert-message.error {
    background: var(--error-50);
    color: var(--error-800);
    border: 1px solid var(--error-200);
}

.alert-message.warning {
    background: var(--warning-50);
    color: var(--warning-800);
    border: 1px solid var(--warning-200);
}

.alert-message i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
    min-width: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-wrapper {
        flex-direction: column;
    }
    
    .left-panel {
        flex: none;
        min-height: 40vh;
        padding: 2rem;
    }
    
    .tagline h1 {
        font-size: 2.5rem;
    }
    
    .features-grid {
        display: none;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 1.5rem;
        min-height: 30vh;
    }
    
    .tagline h1 {
        font-size: 2rem;
    }
    
    .tagline p {
        font-size: 1.125rem;
    }
    
    .right-panel {
        padding: 1.5rem;
        min-width: auto;
    }
    
    .form-container {
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .password-requirements {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .left-panel {
        padding: 1rem;
    }
    
    .tagline h1 {
        font-size: 1.75rem;
    }
    
    .right-panel {
        padding: 1rem;
    }
    
    .form-header h2 {
        font-size: 1.875rem;
    }
    
    .logo span {
        font-size: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
    }
    
    .btn-primary {
        border: 2px solid transparent;
    }
    
    .btn-google {
        border-width: 3px;
    }
}

/* Role Selection Styles */
.role-selection {
    margin: 1rem 0;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    text-decoration: none;
    color: inherit;
}

.role-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.role-card.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
}

.role-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    border-radius: 10px;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--primary-500);
}

.role-card.selected .role-icon {
    background: var(--primary-500);
    color: var(--white);
}

.role-info h4 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    font-size: 1rem;
}

.role-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.3;
}

.role-card.selected .role-info p {
    color: var(--primary-600);
}

/* Role-specific fields */
.role-specific-fields {
    animation: slideIn 0.3s ease-out;
}

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

/* Role Selection Modal */
.role-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.role-modal {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.role-modal h3 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 700;
}

.role-modal p {
    margin: 0 0 2rem 0;
    color: var(--gray-600);
}

.role-modal .role-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.role-modal .role-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
}

.role-modal .role-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-500);
}

.role-modal .role-card.selected i {
    color: var(--white);
}

.role-modal .role-card span {
    font-weight: 600;
    color: var(--gray-900);
}

.role-modal .role-card.selected span {
    color: var(--primary-700);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .role-grid {
        grid-template-columns: 1fr;
    }
    
    .role-modal .role-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .role-modal .role-grid {
        grid-template-columns: 1fr;
    }
}

