:root {
            --primary: #0066cc;
            --primary-dark: #0052a3;
            --primary-light: #3b82f6; /* light blue for subheadings */
            --foreground: #1a202c;   /* dark foreground used across site */
            --white: #ffffff;
            --gray-100: #f7fafc;
            --gray-300: #e2e8f0;
            --gray-400: #cbd5e0;
            --gray-500: #6b7280;
            --gray-600: #718096;
            --error: #e53e3e;
            --success: #38a169;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--primary); min-height: 100vh; display: flex; flex-direction: column; }
        .reg-header { padding: 20px 40px; }
        .reg-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 1.5rem; font-weight: 700; text-decoration: none; }
        .reg-logo:hover { color: var(--white); text-decoration: none; }
        .reg-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 20px 40px; }
        .reg-title { color: var(--white); font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
        .reg-subtitle { color: rgba(255, 255, 255, 0.8); font-size: 1rem; text-align: center; margin-bottom: 32px; }
        .reg-card { background: var(--white); border-radius: 16px; padding: 40px; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); }
        .reg-card-title { font-size: 1.5rem; font-weight: 700; color: #1a202c; margin-bottom: 8px; text-align: center; }
        .plan-info { background: var(--gray-100); border-radius: 8px; padding: 16px; margin-bottom: 24px; text-align: center; }
        .plan-name { font-size: 1.1rem; font-weight: 600; color: var(--primary); }
        .plan-price { font-size: 1.5rem; font-weight: 700; color: #1a202c; }
        .plan-cycle { font-size: 0.9rem; color: var(--gray-600); }
        /* Custom plan should follow Pro plan color pattern: small title = primary blue, price = dark, subheading = gray */
        .plan-info.custom .plan-name {
            color: var(--primary) !important;
        }
        .plan-info.custom .plan-price {
            color: var(--foreground) !important;
        }
        .plan-info.custom .plan-cycle {
            color: var(--gray-600) !important;
        }
        .form-group { display: flex; flex-direction: column; margin-bottom: 20px; }
        .form-label { font-size: 0.875rem; font-weight: 600; color: #1a202c; margin-bottom: 8px; }
        .form-label .required { color: var(--error); }
        .form-control { padding: 14px 16px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 1rem; color: #1a202c; transition: all 0.2s; }
        .form-control:focus { outline: 2px solid var(--primary); outline-offset: 2px; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1); }
        .form-control.is-invalid { border-color: var(--error); }
        .form-control.is-valid { border-color: var(--success); }
        .invalid-feedback { color: var(--error); font-size: 0.8rem; margin-top: 4px; display: block; }
        .field-status { font-size: 0.8rem; margin-top: 4px; }
        .field-status.checking { color: var(--gray-500); }
        .field-status.available { color: var(--success); }
        .field-status.warning { color: #d97706; }
        .field-status.taken { color: var(--error); }
        .input-with-btn { display: flex; gap: 12px; }
        .input-with-btn .form-control { flex: 1; }
        .phone-country-col { flex: 0 0 30%; max-width: 30%; }
        .phone-number-col { flex: 0 0 70%; max-width: 70%; }
        #countryCodeSelect {
            padding-left: 10px;
            padding-right: 26px;
            text-align: center;
            text-align-last: center;
            background-position: right 8px center;
        }
        #phoneInput {
            padding-left: 10px;
            padding-right: 10px;
            text-align: center;
            background-image: none !important;
        }
        #phoneInput.is-valid,
        #phoneInput.is-invalid {
            background-image: none !important;
            padding-right: 10px !important;
        }
        .btn-send-otp { background: var(--primary); color: var(--white); border: none; padding: 14px 20px; border-radius: 8px; font-weight: 600; font-size: 0.875rem; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
        .btn-send-otp:hover:not(:disabled) { background: var(--primary-dark); }
        .btn-send-otp:disabled { background: var(--gray-400); cursor: not-allowed; }
        .btn-send-otp.verified { background: var(--success); }
        .btn-submit { width: 100%; background: var(--primary); color: var(--white); border: none; padding: 16px 32px; border-radius: 24px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.2s; margin-top: 16px; }
        .btn-submit:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3); }
        .btn-submit:disabled { background: var(--gray-400); cursor: not-allowed; transform: none; box-shadow: none; }
        .back-link { text-align: center; margin-top: 24px; }
        .back-link a { color: var(--white); text-decoration: none; font-size: 0.9rem; }
        .back-link a:hover { text-decoration: underline; }
        .validation-summary { background: #fff5f5; border: 1px solid #fc8181; color: var(--error); padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; }
        .validation-summary ul { margin: 0; padding-left: 20px; }
        .spinner { display: none; width: 18px; height: 18px; border: 2px solid var(--white); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .otp-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
        .otp-modal.show { display: flex; }
        .otp-modal-content { background: white; border-radius: 16px; padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
        .otp-modal-title { font-size: 1.25rem; font-weight: 700; color: #1a202c; margin-bottom: 8px; text-align: center; }
        .otp-modal-subtitle { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 24px; text-align: center; }
        .otp-input-group { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
        .otp-input { flex: 0 1 48px; width: 48px; min-width: 0; height: 56px; border: 2px solid var(--gray-300); border-radius: 8px; text-align: center; font-size: 1.5rem; font-weight: 700; }
        .otp-input:focus { outline: 2px solid var(--primary); outline-offset: 2px; border-color: var(--primary); }
        .otp-timer { text-align: center; color: var(--gray-500); font-size: 0.85rem; margin-bottom: 16px; }
        .otp-resend { color: var(--primary); cursor: pointer; text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; }
        .otp-resend.disabled { color: var(--gray-500); cursor: not-allowed; text-decoration: none; }
        .otp-error { color: var(--error); font-size: 0.85rem; text-align: center; margin-bottom: 12px; }
        .otp-btn-row { display: flex; gap: 12px; }
        .otp-btn-row button { flex: 1; padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; }
        .otp-btn-cancel { background: var(--gray-100); border: 1px solid var(--gray-300); color: #1a202c; }
        .otp-btn-verify { background: var(--primary); border: none; color: white; }
        .otp-btn-verify:disabled { background: var(--gray-400); }
        .step-indicator { display: flex; justify-content: center; gap: 16px; margin-bottom: 24px; }
        .step { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--gray-500); }
        .step.active { color: var(--primary); font-weight: 600; }
        .step-number { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
        .step.active .step-number { background: var(--primary); color: white; }
        .step:not(.active) .step-number { background: var(--gray-300); color: var(--gray-600); }
        @media (max-width: 768px) {
            .reg-card { padding: 24px; }
            .reg-title { font-size: 1.8rem; }
        }

        /* 360px phones: 6 boxes + gaps + padding must fit inside the modal */
        .otp-modal { padding: 12px; }
        @media (max-width: 420px) { .otp-modal-content { padding: 24px 16px; } .otp-input-group { gap: 6px; } .otp-input { height: 52px; font-size: 1.25rem; } }
        .otp-resend:focus-visible, .toggle-input:focus-visible + .toggle-pill { outline: 2px solid var(--primary); outline-offset: 2px; }
