/* ============================================
   AUTH PAGES - SHARED STYLES
   Registration Pages Common Stylesheet
   Phase 5: Performance Optimization
   ============================================ */

/* ============================================
   1. CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Brand Colors */
    --primary: #93c33b;
    --primary-dark: #7cac34;
    --primary-light: #a8d147;
    --secondary: #577624;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f8fafc;
    --white: #ffffff;
    
    /* Gray Scale */
    --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;
    
    /* Spacing System (8pt grid) */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    
    /* Border Radius */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ============================================
   2. GLOBAL RESETS & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--gray-800);
}

/* Prevent horizontal scroll */
.auth-container,
.auth-grid,
.brand-panel,
.register-panel,
.info-panel,
.register-content,
.register-card {
    max-width: 100%;
}

/* ============================================
   3. MOBILE NAVIGATION BAR
   ============================================ */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    padding: var(--space-sm) var(--space-md);
    max-width: 100vw;
}

.mobile-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.nav-back-btn, .nav-menu-btn {
    width: 40px;
    height: 40px;
    min-height: 44px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition-fast);
    cursor: pointer;
}

.nav-back-btn:hover, .nav-menu-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    transform: scale(1.05);
}

.nav-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gray-800);
}

.nav-logo {
    height: 32px;
    width: auto;
}

/* ============================================
   4. MAIN CONTAINER & GRID LAYOUT
   ============================================ */
.auth-container {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    position: relative;
    padding-top: 60px; /* Space for mobile nav */
}

@media (min-width: 992px) {
    .auth-container {
        padding-top: 0; /* Remove mobile nav space on desktop */
    }
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

/* Desktop Two-Column Layout - BETTER BALANCE */
@media (min-width: 992px) {
    .auth-grid {
        grid-template-columns: 40% 60%; /* Moderate split - not too cramped */
        min-height: 100vh;
    }
}

/* Large Desktop - More Form Space */
@media (min-width: 1440px) {
    .auth-grid {
        grid-template-columns: 35% 65%; /* More breathing room on large screens */
    }
}

/* ============================================
   5. BRAND PANEL (LEFT SIDE - DESKTOP)
   ============================================ */
.brand-panel {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop: Make brand panel scrollable if content overflows */
@media (min-width: 992px) {
    .brand-panel {
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--space-2xl) var(--space-xl);
    }
    
    .brand-content {
        max-width: 100%; /* Use full panel width */
    }
}

.brand-content {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
}

/* Desktop: Optimize brand content for narrower panel */
@media (min-width: 992px) {
    .brand-content {
        max-width: 100%; /* Use full width of narrower panel */
        padding: var(--space-lg) 0;
    }
}

/* Animated Background Elements */
.bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

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

.orb-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.orb-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

.wave-pattern {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E") repeat-x;
    background-size: 1200px 120px;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

/* ============================================
   6. BRAND IDENTITY SECTION
   ============================================ */
.brand-identity {
    margin-bottom: var(--space-2xl);
}

.logo-container {
    margin-bottom: var(--space-lg);
}

.brand-logo {
    max-height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
}

/* Desktop: Moderate sizing for 40% panel */
@media (min-width: 992px) {
    .brand-title {
        font-size: 2rem; /* Not too small */
        line-height: 1.2;
    }
}

@media (min-width: 1440px) {
    .brand-title {
        font-size: 2.25rem; /* Larger on big screens */
    }
}

.brand-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    color: white;
}

/* Desktop: Keep readable subtitle */
@media (min-width: 992px) {
    .brand-subtitle {
        font-size: 1rem; /* Readable size */
        margin-bottom: var(--space-lg);
    }
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-xl);
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.home-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* ============================================
   7. QUICK PORTALS SECTION
   ============================================ */
.quick-portals {
    width: 100%;
}

.portals-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: rgba(255, 255, 255, 0.95);
}

.portals-grid {
    display: grid;
    gap: var(--space-md);
}

.portal-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    color: white;
    text-decoration: none;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition-slow);
}

.portal-card:hover::before {
    left: 100%;
}

.portal-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.portal-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.portal-info {
    flex-grow: 1;
}

.portal-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: white;
}

.portal-info span {
    font-size: 0.875rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

.portal-arrow {
    font-size: 0.875rem;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.portal-card:hover .portal-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* Portal Specific Styles */
.admin-portal .portal-icon {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.parent-portal .portal-icon {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.student-portal .portal-icon {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.chat-portal .portal-icon {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.post-portal .portal-icon {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

.work-portal .portal-icon {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.host-portal .portal-icon {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
}

/* ============================================
   8. BACK TO ROLES LINK
   ============================================ */
.back-to-roles {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.back-to-roles:hover {
    background: var(--gray-100);
    color: var(--gray-800);
    text-decoration: none;
    transform: translateX(-2px);
}

.back-to-roles i {
    font-size: 0.75rem;
}

/* ============================================
   9. BUSINESS CATEGORIES (Business Registration)
   ============================================ */
.business-categories {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #d1fae5;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.business-categories h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-md);
    text-align: center;
}

.category-grid {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(4, 1fr); /* Desktop: 4 columns */
}

/* Phase 2 & 4: Responsive category grid */
@media (max-width: 767px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobile: 2 columns */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr); /* Tablet: 3 columns */
    }
}

.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: white;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition-fast);
    cursor: default;
    min-height: 44px; /* Phase 4: Touch target */
}

.category-chip i {
    font-size: 1.5rem;
}

/* Category Color Schemes */
.category-chip.food { color: #EF4444; }
.category-chip.food:hover { 
    border-color: #EF4444; 
    background: #FEF2F2; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.category-chip.retail { color: #3B82F6; }
.category-chip.retail:hover { 
    border-color: #3B82F6; 
    background: #EFF6FF; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.category-chip.beauty { color: #EC4899; }
.category-chip.beauty:hover { 
    border-color: #EC4899; 
    background: #FDF2F8; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.category-chip.fitness { color: #F59E0B; }
.category-chip.fitness:hover { 
    border-color: #F59E0B; 
    background: #FFFBEB; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.category-chip.education { color: #8B5CF6; }
.category-chip.education:hover { 
    border-color: #8B5CF6; 
    background: #F5F3FF; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.category-chip.healthcare { color: #10B981; }
.category-chip.healthcare:hover { 
    border-color: #10B981; 
    background: #ECFDF5; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.category-chip.services { color: #06B6D4; }
.category-chip.services:hover { 
    border-color: #06B6D4; 
    background: #ECFEFF; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.category-chip.automotive { color: #6B7280; }
.category-chip.automotive:hover { 
    border-color: #6B7280; 
    background: #F9FAFB; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.15);
}

/* ============================================
   10. BENEFITS SECTION
   ============================================ */
.benefits-section {
    margin-bottom: var(--space-xl);
}

.benefits-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: white;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.benefit-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.benefit-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: white;
}

.benefit-content p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Desktop: Keep benefits readable - not too cramped */
@media (min-width: 992px) {
    .benefits-title {
        font-size: 1.125rem; /* Slightly smaller but readable */
        margin-bottom: var(--space-md);
    }
    
    .benefits-list {
        gap: var(--space-sm); /* Tighter vertical spacing */
    }
    
    .benefit-item {
        padding: var(--space-sm) var(--space-md); /* Compact padding */
    }
    
    .benefit-icon {
        width: 36px; /* Slightly smaller */
        height: 36px;
        font-size: 1.125rem;
    }
    
    .benefit-content h4 {
        font-size: 0.9375rem; /* Not too small */
        margin-bottom: var(--space-xs);
    }
    
    .benefit-content p {
        font-size: 0.8125rem; /* Readable size */
        line-height: 1.4;
    }
}

/* ============================================
   11. EARNINGS BOX (Driver Registration)
   ============================================ */
.earnings-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.earnings-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.earnings-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--space-sm);
    color: white;
}

.earnings-amount {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: white;
}

.earnings-note {
    font-size: 0.75rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   12. TESTIMONIAL CARD
   ============================================ */
.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.testimonial-quote {
    position: relative;
    margin-bottom: var(--space-md);
}

.testimonial-quote i {
    font-size: 1.5rem;
    opacity: 0.3;
    margin-bottom: var(--space-sm);
    color: white;
}

.testimonial-quote p {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: white;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.testimonial-author strong {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.testimonial-author span {
    font-size: 0.875rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

.member-since {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ============================================
   13. TRUST BADGES
   ============================================ */
.trust-badges {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
}

.trust-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    text-align: center;
}

.trust-badge i {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.trust-badge span {
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

/* ============================================
   14. REGISTER PANEL (RIGHT SIDE - FORM)
   ============================================ */
.register-panel, .info-panel {
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
}

/* Desktop: Make register panel scrollable with proper spacing */
@media (min-width: 992px) {
    .register-panel, .info-panel {
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--space-2xl) var(--space-xl);
        align-items: flex-start;
    }
}

.register-content {
    width: 100%;
    max-width: 480px;
}

/* Desktop: Progressive width increase for better form spacing */
@media (min-width: 992px) {
    .register-content {
        max-width: 540px; /* More breathing room */
    }
}

@media (min-width: 1440px) {
    .register-content {
        max-width: 600px; /* Even more space on large screens */
    }
}

.register-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

/* Desktop: Optimize card padding */
@media (min-width: 992px) {
    .register-card {
        padding: var(--space-2xl);
    }
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ============================================
   15. WELCOME HEADER (FORM TOP)
   ============================================ */
.welcome-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.welcome-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: var(--space-md);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-md);
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

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

/* ============================================
   16. FORM STYLES
   ============================================ */
.register-form {
    width: 100%;
}

/* Touch-friendly interactive elements - Phase 4: 44px minimum */
.submit-btn,
.nav-back-btn,
.nav-menu-btn,
.action-link,
.category-chip,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
    min-height: 44px;
}

/* ============================================
   17. TERMS AND CONDITIONS
   ============================================ */
.terms-group {
    margin-bottom: var(--space-md);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.custom-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-200);
    border-radius: 4px;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
    margin-top: 0;
}

.custom-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '✓';
    display: block;
    color: white;
    font-size: 0.875rem;
    text-align: center;
    line-height: 20px;
}

.checkbox-label {
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.checkbox-text {
    display: block;
}

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

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

/* ============================================
   18. RECAPTCHA STYLING
   ============================================ */
.recaptcha-container {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.recaptcha-info {
    text-align: center;
}

.recaptcha-notice {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.4;
}

.recaptcha-notice i {
    color: var(--primary);
    margin-right: var(--space-xs);
}

.recaptcha-notice a {
    color: var(--primary);
    text-decoration: none;
}

.recaptcha-notice a:hover {
    text-decoration: underline;
}

/* ============================================
   19. SUBMIT BUTTON
   ============================================ */
.form-actions {
    margin-bottom: var(--space-lg);
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    background: var(--gray-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

/* ============================================
   20. ADDITIONAL ACTIONS (LOGIN/BACK LINKS)
   ============================================ */
.auth-actions {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-md);
}

.action-links {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
}

.action-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
}

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

.action-link.primary:hover {
    background: rgba(147, 195, 59, 0.1);
    color: var(--primary-dark);
    text-decoration: none;
}

.action-link.secondary {
    color: var(--gray-600);
}

.action-link.secondary:hover {
    background: var(--gray-100);
    color: var(--gray-800);
    text-decoration: none;
}

/* ============================================
   21. INFO BANNER (ALERT/NOTIFICATION)
   ============================================ */
.info-banner {
    animation: slideInDown 0.5s ease forwards;
}

@media (max-width: 991px) {
    .info-banner {
        border-left: none;
        border-top: 4px solid #93c33b;
    }
}

/* ============================================
   22. MOBILE PORTAL LINKS (BOTTOM OF FORM)
   ============================================ */
.mobile-portal-links {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

.mobile-portal-divider {
    text-align: center;
    margin-bottom: var(--space-md);
}

.mobile-portal-divider span {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 var(--space-md);
    position: relative;
}

.mobile-portal-divider span::before,
.mobile-portal-divider span::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: var(--gray-300);
}

.mobile-portal-divider span::before {
    right: 100%;
    margin-right: var(--space-sm);
}

.mobile-portal-divider span::after {
    left: 100%;
    margin-left: var(--space-sm);
}

.mobile-portals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.mobile-portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.mobile-portal-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.mobile-portal-card:hover {
    border-color: var(--primary);
    background: rgba(147, 195, 59, 0.05);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   23. PASSWORD STRENGTH INDICATOR (Phase 3)
   ============================================ */
.password-strength {
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.strength-meter {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-meter-fill.weak {
    width: 25%;
    background: #ef4444;
}

.strength-meter-fill.fair {
    width: 50%;
    background: #f59e0b;
}

.strength-meter-fill.good {
    width: 75%;
    background: #3b82f6;
}

.strength-meter-fill.strong {
    width: 100%;
    background: #10b981;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
    transition: color 0.2s;
}

.password-requirements .requirement i {
    font-size: 6px;
    color: var(--gray-400);
    transition: color 0.2s;
}

.password-requirements .requirement.met {
    color: #10b981;
}

.password-requirements .requirement.met i {
    color: #10b981;
}

/* ============================================
   24. REAL-TIME VALIDATION STYLES (Phase 3)
   ============================================ */
.input-container.is-valid input,
.input-container.is-valid select,
.input-container.is-valid textarea {
    border-color: #10b981;
}

.input-container.is-invalid input,
.input-container.is-invalid select,
.input-container.is-invalid textarea {
    border-color: #ef4444;
}

.validation-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-error::before {
    content: '⚠';
    font-size: 1rem;
}

.input-container.is-valid::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
}

.input-container.is-valid:has(.input-action-btn)::after {
    right: 48px;
}

/* ============================================
   25. ANIMATIONS (Phase 1 & 5)
   ============================================ */

/* Form Elements Slide In */
.form-group {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Register Card Scale In */
.register-card {
    animation: scaleIn 0.8s ease forwards;
    transform: scale(0.9);
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

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

/* ============================================
   26. RESPONSIVE DESIGN - MOBILE (ENHANCED)
   ============================================ */

/* CRITICAL FIX: Remove max-width constraint on mobile */
@media (max-width: 767px) {
    .register-content {
        max-width: none !important;
        width: 100%;
    }
    
    /* Reduce padding to maximize screen space */
    .register-panel, .info-panel {
        padding: var(--space-md) var(--space-sm);
    }
}

/* Tablet & Mobile - General Optimizations */
@media (max-width: 768px) {
    .register-card {
        padding: var(--space-md);
        margin: 0;
        border-radius: var(--radius-lg);
    }

    .brand-title {
        font-size: 1.75rem;
    }

    .welcome-title {
        font-size: 1.125rem;
    }
    
    .welcome-subtitle {
        font-size: 0.8125rem;
    }

    .category-chip {
        padding: var(--space-sm) var(--space-xs);
        font-size: 0.6875rem; /* 11px */
    }

    .category-chip i {
        font-size: 1.125rem;
        margin-bottom: var(--space-xs);
    }
    
    /* Form elements - optimize spacing */
    .form-group {
        margin-bottom: var(--space-md);
    }
    
    /* Form labels - more compact */
    .form-label {
        font-size: 0.875rem;
        margin-bottom: var(--space-xs);
    }
    
    /* Inputs - good size for mobile */
    .form-control {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9375rem; /* 15px prevents zoom on iOS */
    }
    
    /* Welcome icon - slightly smaller */
    .welcome-icon {
        padding: var(--space-sm);
        font-size: 1.125rem;
        margin-bottom: var(--space-sm);
    }

    .benefits-list {
        gap: var(--space-sm);
    }

    .benefit-item {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .benefit-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .benefit-content h4 {
        font-size: 0.875rem;
    }

    .benefit-content p {
        font-size: 0.75rem;
    }

    .earnings-amount {
        font-size: 1.5rem;
    }

    .testimonial-quote p {
        font-size: 0.875rem;
    }

    .trust-badges {
        flex-direction: column;
    }

    .action-links {
        flex-direction: column;
        text-align: center;
    }

    .action-link {
        justify-content: center;
    }
}

/* Small Mobile Devices (< 480px) */
@media (max-width: 479px) {
    /* Even tighter spacing for small phones */
    .register-panel, .info-panel {
        padding: var(--space-sm);
    }

    .register-card {
        padding: var(--space-md);
        margin: 0;
        border-radius: var(--radius-md);
    }
    
    /* Tighter header spacing */
    .welcome-header {
        margin-bottom: var(--space-md);
    }
    
    /* Category grid - ensure 2 columns fit comfortably */
    .category-grid {
        gap: var(--space-xs);
    }
    
    .category-chip {
        padding: var(--space-xs);
        font-size: 0.625rem; /* 10px */
    }
    
    .category-chip i {
        font-size: 1rem;
        margin-bottom: 2px;
    }
    
    /* Smaller form spacing */
    .form-group {
        margin-bottom: var(--space-sm);
    }
    
    /* Submit button */
    .submit-btn {
        padding: var(--space-md);
        font-size: 0.9375rem;
    }
    
    /* Terms checkbox - smaller text */
    .terms-checkbox label {
        font-size: 0.8125rem;
    }
    
    /* Welcome title - more compact */
    .welcome-title {
        font-size: 1rem;
    }
}

/* iPhone 14 Pro Max specific (430px) */
@media (max-width: 430px) {
    .register-panel, .info-panel {
        padding: var(--space-xs) var(--space-xs);
    }
    
    .register-card {
        padding: var(--space-sm) var(--space-md);
    }
}

/* ============================================
   END OF AUTH PAGES STYLESHEET
   ============================================ */
