        :root {
            --primary-color: #0ea5e9;
            --bg-primary: #ffffff;
            --bg-secondary: #f8f9fa;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --border-light: #e5e7eb;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        * {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        body {
            min-height: 100vh;
            background: white;
            padding: 2rem 1rem;
            overflow-x: hidden;
        }

        .logo-container {
            text-align: center;
            margin-bottom: 2rem;
        }

        .logo-container img {
            max-width: 160px;
            height: auto;
        }

        .register-container {
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
        }

        .register-card {
            background: white;
            border-radius: 16px;
            border: 2px solid var(--border-light);
            overflow: hidden;
        }

        .register-form {
            padding: 2rem 2rem;
        }

        .register-message {
            margin-bottom: 1rem;
            min-height: 0;
        }
        .register-message .register-alert {
            margin: 0;
            border-radius: 10px;
        }

        .register-title {
            text-align: center;
            margin-bottom: 2rem;
        }

        .register-title h1 {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }

        .register-title p {
            font-size: 1rem;
            color: var(--text-secondary);
            margin: 0;
        }

        /* Step Indicator */
        .step-indicator {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 2.5rem;
            gap: 1rem;
        }

        .step {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .step-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-secondary);
            border: 2px solid var(--border-light);
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.875rem;
            transition: all 0.3s ease;
        }

        .step.active .step-circle {
            background: var(--primary-color);
            border-color: var(--primary-color);
            color: white;
        }

        .step.completed .step-circle {
            background: #10b981;
            border-color: #10b981;
            color: white;
        }

        .step-label {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .step.active .step-label {
            color: var(--primary-color);
        }

        .step.completed .step-label {
            color: #10b981;
        }

        .step-divider {
            width: 40px;
            height: 2px;
            background: var(--border-light);
        }

        .step.completed + .step-divider {
            background: #10b981;
        }

        /* Form Steps */
        .form-step {
            display: none;
        }

        .form-step.active {
            display: block;
        }

        .section-title {
            font-size: 1.125rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .section-title i {
            color: var(--primary-color);
        }

        .section-subtitle {
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

        .btn-google-modern {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            width: 100%;
            padding: 0.65rem 1rem;
            border: 2px solid var(--border-light);
            border-radius: 10px;
            background: #fff;
            color: var(--text-primary);
            font-size: 0.9375rem;
            font-weight: 600;
            text-decoration: none;
            transition: background 0.2s, border-color 0.2s;
        }
        .btn-google-modern:hover {
            background: #f8fafc;
            border-color: #cbd5e1;
            color: var(--text-primary);
        }
        .btn-google-modern img {
            flex-shrink: 0;
        }
        .form-divider-text {
            text-align: center;
            font-size: 0.8125rem;
            color: var(--text-secondary);
            margin: 1rem 0;
        }
        .register-message-error {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #b91c1c;
            padding: 0.75rem 1rem;
            border-radius: 10px;
        }

        .section-divider {
            border: 0;
            border-top: 2px solid var(--border-light);
            margin: 2rem 0;
        }

        .form-group {
            margin-bottom: 1.25rem;
        }

        .form-group label {
            display: block;
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
        }

        .form-control,
        .form-control select,
        select.form-control {
            box-sizing: border-box;
            width: 100%;
            max-width: 100%;
            height: 48px;
            min-height: 48px;
            padding: 0.75rem 1rem;
            font-size: 0.9375rem;
            border: 2px solid var(--border-light);
            border-radius: 8px;
            transition: all 0.2s ease;
            background: white;
        }

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

        .form-control[readonly] {
            background: var(--bg-secondary);
            cursor: not-allowed;
        }

        /* Email available (after check): green border, then auto-advance */
        .form-group.email-available .form-control {
            border-color: #10b981;
            background: rgba(16, 185, 129, 0.06);
            transition: border-color 0.25s ease, background 0.25s ease;
        }
        .form-group.email-available .form-control:focus {
            border-color: #059669;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
        }

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

        /* Keep phone and currency/timezone fields equal height (48px) */
        .form-row .form-group .form-control {
            height: 48px;
            min-height: 48px;
        }

        .form-row .form-group .select2-container .select2-selection--single {
            height: 48px !important;
            min-height: 48px !important;
        }

        .btn-primary-modern {
            padding: 0.875rem 1.5rem;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-primary-modern:hover {
            background: #0284c7;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
        }

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

        .btn-secondary-modern {
            padding: 0.875rem 1.5rem;
            background: white;
            color: var(--text-primary);
            border: 2px solid var(--border-light);
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-secondary-modern:hover {
            border-color: var(--text-secondary);
            background: var(--bg-secondary);
        }

        .step-buttons {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

        .step-buttons .btn-primary-modern,
        .step-buttons .btn-secondary-modern {
            flex: 1;
        }

        /* Select2 Customization – match form-control height (48px) */
        .select2-container--default .select2-selection--single {
            height: 48px !important;
            min-height: 48px !important;
            border: 2px solid var(--border-light);
            border-radius: 8px;
            box-sizing: border-box;
        }

        .select2-container--default .select2-selection--single .select2-selection__rendered {
            line-height: 44px;
            padding-left: 1rem;
            padding-right: 1rem;
            font-size: 0.9375rem;
        }

        .select2-container--default .select2-selection--single .select2-selection__arrow {
            height: 44px;
        }

        .select2-container--default.select2-container--focus .select2-selection--single {
            border-color: var(--primary-color);
        }

        .select2-dropdown {
            border: 2px solid var(--border-light);
            border-radius: 8px;
        }

        .select2-search--dropdown .select2-search__field {
            border: 2px solid var(--border-light);
            border-radius: 6px;
            padding: 0.5rem;
        }

        .signin-link {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

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

        .signin-link a:hover {
            text-decoration: underline;
        }

        .alert {
            padding: 0.875rem 1rem;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            font-size: 0.875rem;
        }

        .alert-danger {
            background: rgba(239, 68, 68, 0.1);
            color: #dc2626;
            border: 1px solid rgba(239, 68, 68, 0.2);
        }

        /* Large desktop: match login card width */
        @media (min-width: 1200px) {
            .register-container {
                max-width: 440px;
            }
        }

        @media (max-width: 768px) {
            body {
                padding: 1.5rem 1rem;
                padding-left: max(1rem, env(safe-area-inset-left));
                padding-right: max(1rem, env(safe-area-inset-right));
                padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
                -webkit-overflow-scrolling: touch;
            }

            .register-container {
                width: 100%;
                max-width: min(360px, 92%);
                padding: 0;
            }

            .register-card {
                max-width: 100%;
            }

            .register-form {
                padding: 1.5rem 1rem;
                padding-left: max(1rem, env(safe-area-inset-left));
                padding-right: max(1rem, env(safe-area-inset-right));
            }

            .form-group {
                min-width: 0;
            }

            .form-row {
                min-width: 0;
            }

            .form-control,
            .form-control select,
            select.form-control {
                min-width: 0;
            }

            .select2-container {
                width: 100% !important;
                max-width: 100% !important;
            }

            .logo-container img {
                max-width: 120px;
            }

            .step-label {
                display: none;
            }

            .step-divider {
                width: 24px;
            }
        }

        /* Stack form rows on narrow screens so compact form width stays readable */
        @media (max-width: 520px) {
            .form-row {
                grid-template-columns: 1fr;
                width: 100%;
            }

            .form-row .form-group {
                width: 100%;
            }

            .form-row .form-group .form-control,
            .form-row .form-group .select2-container {
                width: 100% !important;
                max-width: 100% !important;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 1rem 0.75rem;
                padding-left: max(0.75rem, env(safe-area-inset-left));
                padding-right: max(0.75rem, env(safe-area-inset-right));
            }

            .register-container {
                max-width: min(340px, 92%);
            }

            .register-form {
                padding: 1.25rem 0.75rem;
                padding-left: max(0.75rem, env(safe-area-inset-left));
                padding-right: max(0.75rem, env(safe-area-inset-right));
            }
        }

        /* Logo upload — same as Settings > Company for consistency */
        .company-logo-form-group .company-logo-label { display: block; margin-bottom: 0.35rem; font-weight: 500; color: var(--text-primary); }
        .company-logo-block { margin-top: 8px; }
        .company-logo-preview {
            display: inline-flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            background: linear-gradient(145deg, #fafbfc 0%, #f1f5f9 100%);
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .company-logo-preview:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
        .company-logo-preview label { cursor: pointer; margin: 0; display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
        .company-logo-img-wrap {
            width: 72px;
            height: 72px;
            min-width: 72px;
            border-radius: 10px;
            background: #fff;
            border: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        }
        .company-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
        .company-logo-placeholder {
            color: #94a3b8;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }
        .company-logo-text { font-size: 13px; color: #64748b; font-weight: 500; }
        .company-logo-hint { font-size: 12px; color: #94a3b8; margin-top: 2px; }
        .company-logo-remove {
            font-size: 12px;
            color: #64748b;
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px 0;
            text-decoration: underline;
            transition: color 0.2s;
        }
        .company-logo-remove:hover { color: #dc2626; }
        .company-logo-file-input { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; }

        /* Currency select: symbol + better look */
        .form-control-currency + .select2-container .select2-selection--single { min-height: 46px; padding: 0.5rem 0.75rem; border-radius: 10px; border: 2px solid var(--border-light); align-items: center; }
        .form-control-currency + .select2-container .select2-selection--single .select2-selection__rendered { line-height: 1.4; padding-left: 0; }
        .currency-selected, .currency-option { display: inline-flex; align-items: center; gap: 0.5rem; }
        .currency-sym { font-weight: 700; font-size: 1.15em; min-width: 1.5em; color: var(--text-primary); }
        .currency-option .currency-sym { margin-right: 0.25rem; }
        .select2-results__option--highlighted .currency-sym { color: inherit; }
        .form-control-currency + .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }
