/* ============================================
   REGISTER.CSS - ChikakuMarket Registration Page
   Complete styling for all 3 registration steps
   Mobile-friendly with proper input handling
   ============================================ */

/* ============================================
   BASE & RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1f2937;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.auth-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
}

.logo-tagline {
    font-size: 0.7rem;
    color: #6b7280;
}

.back-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7b2cbf;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.back-home:hover {
    color: #5a189a;
    transform: translateX(-3px);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   AUTH CARD (FORM CONTAINER)
   ============================================ */
.auth-card {
    flex: 1.2;
    min-width: 300px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.auth-card .auth-header {
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    padding: 2rem;
    text-align: center;
    color: white;
    position: static;
    box-shadow: none;
}

.auth-card .auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-card .auth-header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   REGISTRATION STEPS
   ============================================ */
.registration-steps {
    display: flex;
    justify-content: space-between;
    padding: 2rem 2rem 0 2rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.step:not(:last-child):before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step.active:not(:last-child):before {
    background: linear-gradient(90deg, #7b2cbf, #9d4edd);
}

.step-number {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.step.active .step-number {
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    color: white;
}

.step-label {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: #6b7280;
    font-weight: 500;
}

.step.active .step-label {
    color: #7b2cbf;
}

/* ============================================
   FORM STYLES - CRITICAL FOR INPUT FUNCTIONALITY
   ============================================ */
.auth-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: #7b2cbf;
}

/* INPUT STYLES - MOBILE FRIENDLY */
.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    background: white;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #7b2cbf;
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
}

.form-hint {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Password Input Group */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    padding: 5px;
}

/* Password Strength Meter */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    width: 0%;
    transition: all 0.3s;
}

.strength-text {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.25rem;
    display: block;
}

/* Checkbox Group */
.terms-group {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: #4b5563;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label a {
    color: #7b2cbf;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-google {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(123, 44, 191, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-google {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #7b2cbf;
}

.btn-google i {
    color: #ea4335;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 16px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions button {
    flex: 1;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    margin: 0 15px;
}

/* Auth Footer */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-footer p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-footer a {
    color: #7b2cbf;
    text-decoration: none;
    font-weight: 600;
}

.small-text {
    font-size: 12px;
}

/* ============================================
   DOCUMENT UPLOAD SECTION (STEP 2)
   ============================================ */
.document-upload-header {
    text-align: center;
    margin-bottom: 2rem;
}

.document-upload-header h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.document-upload-header p {
    color: #6b7280;
    font-size: 0.85rem;
}

.upload-group {
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #7b2cbf;
    background: #f3e8ff;
}

.upload-area.dragover {
    border-color: #7b2cbf;
    background: #f3e8ff;
}

.upload-content i {
    font-size: 3rem;
    color: #7b2cbf;
    margin-bottom: 1rem;
}

.upload-content p {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.upload-content p span {
    color: #7b2cbf;
    font-weight: 600;
}

.upload-content small {
    color: #6b7280;
    font-size: 0.7rem;
}

.upload-preview {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.remove-upload {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
}

.upload-requirements span {
    font-size: 0.7rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.upload-requirements span i {
    color: #10b981;
    font-size: 0.6rem;
}

.document-consent {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

/* ============================================
   VERIFICATION SECTION (STEP 3)
   ============================================ */
.verification-status {
    text-align: center;
    padding: 2rem;
}

.verification-icon i {
    font-size: 5rem;
    color: #7b2cbf;
    margin-bottom: 1rem;
}

.verification-status h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.verification-status p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.verification-timeline {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 16px;
}

.timeline-item {
    text-align: center;
    flex: 1;
}

.timeline-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-item.completed i {
    color: #10b981;
}

.timeline-item.active i {
    color: #7b2cbf;
}

.timeline-item span {
    font-size: 0.75rem;
    color: #6b7280;
}

.timeline-item.completed span,
.timeline-item.active span {
    color: #1f2937;
    font-weight: 500;
}

.verification-actions {
    margin-top: 2rem;
}

.verification-actions p {
    margin-top: 1rem;
}

/* ============================================
   SIDEBAR (BENEFITS SECTION)
   ============================================ */
.auth-sidebar {
    flex: 0.8;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.auth-sidebar h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.benefit-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.benefit-content h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.benefit-content p {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.verification-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.verification-badge i {
    font-size: 2rem;
    color: #7b2cbf;
}

.verification-badge strong {
    display: block;
    font-size: 0.85rem;
    color: #1f2937;
}

.verification-badge span {
    font-size: 0.7rem;
    color: #6b7280;
}

.stats-section h3 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7b2cbf;
}

.stat-label {
    font-size: 0.65rem;
    color: #6b7280;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
    min-width: 250px;
    max-width: 350px;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast i {
    font-size: 1.1rem;
}

.toast-success i {
    color: #10b981;
}

.toast-error i {
    color: #ef4444;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #9ca3af;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-sidebar {
        order: 2;
    }
    
    .auth-card {
        order: 1;
    }
}

@media (max-width: 768px) {
    .auth-header {
        padding: 0.75rem 1rem;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .back-home span {
        display: none;
    }
    
    .auth-main {
        padding: 1rem;
    }
    
    .auth-card .auth-header {
        padding: 1.5rem;
    }
    
    .auth-card .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .registration-steps {
        padding: 1.5rem 1.5rem 0 1.5rem;
    }
    
    .step-label {
        display: none;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .upload-requirements {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .verification-timeline {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }
    
    .timeline-item i {
        margin-bottom: 0;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 40px);
        max-width: none;
    }
}

@media (max-width: 480px) {
    .auth-card .auth-header {
        padding: 1rem;
    }
    
    .auth-card .auth-header h1 {
        font-size: 1.25rem;
    }
    
    .auth-form {
        padding: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-google {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .stats-grid {
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Loading state */
.btn-primary.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #7b2cbf;
    outline-offset: 2px;
}

/* Hide number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}