    /* Override form builder styles to match quick-inquiry-form design */
    .residence-inquiry-form-wrapper {
        width: 100%;
        background: var(--surface-raised, #ffffff);
        border: 1px solid var(--color-border, #e5e8ed);
        border-radius: var(--radius-xl, 16px);
        box-shadow: 0 2px 12px rgba(12, 35, 64, 0.06);
        overflow: hidden;
    }

    /* Neutralize any theme-injected dark gradient on the form-builder header */
    .residence-inquiry-form-wrapper .dynamic-form-header,
    .residence-inquiry-form-wrapper .dynamic-form-header::before,
    .residence-inquiry-form-wrapper .dynamic-form-header::after,
    .residence-inquiry-form-wrapper .form-header,
    .residence-inquiry-form-wrapper .form-header-section {
        background: transparent !important;
        color: var(--color-text-primary, #161b22) !important;
        border: none !important;
        box-shadow: none !important;
        padding: var(--space-5, 1.5rem) var(--space-5, 1.5rem) 0 !important;
    }

    .residence-inquiry-form-wrapper .dynamic-form-header h1,
    .residence-inquiry-form-wrapper .dynamic-form-header h2,
    .residence-inquiry-form-wrapper .dynamic-form-header h3,
    .residence-inquiry-form-wrapper .dynamic-form-header h4,
    .residence-inquiry-form-wrapper .dynamic-form-title,
    .residence-inquiry-form-wrapper .dynamic-form-header .form-title {
        color: var(--color-text-primary, #161b22) !important;
        font-family: var(--font-family-heading, 'Playfair Display', serif) !important;
    }

    .residence-inquiry-form-wrapper .dynamic-form-header p,
    .residence-inquiry-form-wrapper .dynamic-form-description,
    .residence-inquiry-form-wrapper .form-description {
        color: var(--color-text-secondary, #5b6472) !important;
    }

    /* Wizard step bubbles — recolor to navy/gold */
    .residence-inquiry-form-wrapper .multistep-progress {
        background: var(--surface-sunken, #f5f6f8) !important;
        padding: var(--space-3, 0.75rem) var(--space-5, 1.5rem) !important;
        border-bottom: 1px solid var(--color-border, #e5e8ed) !important;
    }

    .residence-inquiry-form-wrapper .multistep-progress .step,
    .residence-inquiry-form-wrapper .multistep-step,
    .residence-inquiry-form-wrapper .progress-step {
        color: var(--color-text-secondary, #5b6472) !important;
    }

    .residence-inquiry-form-wrapper .multistep-progress .step-number,
    .residence-inquiry-form-wrapper .multistep-step .step-circle,
    .residence-inquiry-form-wrapper .step-indicator {
        background: var(--surface-raised, #ffffff) !important;
        color: var(--color-text-secondary, #5b6472) !important;
        border: 1px solid var(--color-border, #e5e8ed) !important;
    }

    .residence-inquiry-form-wrapper .multistep-progress .step.active .step-number,
    .residence-inquiry-form-wrapper .multistep-progress .step--active .step-number,
    .residence-inquiry-form-wrapper .multistep-step.active .step-circle,
    .residence-inquiry-form-wrapper .step-indicator.active {
        background: var(--color-primary, #0c2340) !important;
        color: #ffffff !important;
        border-color: var(--color-primary, #0c2340) !important;
    }

    .residence-inquiry-form-wrapper .multistep-progress .progress-bar,
    .residence-inquiry-form-wrapper .multistep-progress .progress-fill {
        background: var(--color-accent, #d4af37) !important;
    }

    .residence-inquiry-form-wrapper .dynamic-form-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: var(--space-5, 1.5rem) !important;
        background: transparent !important;
    }

    .residence-inquiry-form-wrapper .multistep-progress {
        background: transparent !important;
    }

    .residence-inquiry-form-wrapper .form-section,
    .residence-inquiry-form-wrapper .multistep-section {
        background: transparent !important;
        border-color: var(--color-border, #e5e8ed) !important;
    }

    .residence-inquiry-form-wrapper .form-section {
        display: block;
        opacity: 1;
        transform: none;
    }

    .residence-inquiry-form-wrapper .multistep-section {
        display: none;
        opacity: 0;
        transform: translateX(20px);
    }

    .residence-inquiry-form-wrapper .multistep-section.active {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    /* ============================================
       FORM SECTION AND FIELD STYLING
       ============================================ */
    /* 
     * Base styling for form sections.
     * Multi-step visibility is now controlled by render_form.html JS.
     */
    .residence-inquiry-form-wrapper .form-section-fields {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }

    /* Ensure form fields are visible */
    .residence-inquiry-form-wrapper .form-field-wrapper {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-bottom: 1rem;
    }

    .residence-inquiry-form-wrapper .form-input-wrapper {
        display: block !important;
    }

    /* Light form inputs */
    .residence-inquiry-form-wrapper input,
    .residence-inquiry-form-wrapper select,
    .residence-inquiry-form-wrapper textarea {
        display: block !important;
        visibility: visible !important;
        background: var(--surface-sunken, #f5f6f8) !important;
        border: 1px solid var(--color-border, #e5e8ed) !important;
        color: var(--color-text-primary, #161b22) !important;
        padding: 0.875rem 1rem !important;
        border-radius: 8px !important;
        width: 100% !important;
    }

    .residence-inquiry-form-wrapper .form-label {
        display: block !important;
        color: var(--color-text-primary, #161b22) !important;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    /* ============================================
   DUPLICATE ELEMENT PREVENTION
   ============================================ */
    /* 
 * CRITICAL: Ensure only ONE form header and ONE submit button are shown.
 * The form builder may render multiple buttons from different templates.
 * This CSS ensures consistency by showing only the last (primary) button.
 */

    /* Hide duplicate form header from form builder */
    .residence-inquiry-form-wrapper .form-header,
    .residence-inquiry-form-wrapper .form-header-section {
        display: none !important;
    }

    /* Hide duplicate submit buttons - ensure only ONE submit button is shown */
    /* Hide all submit button containers except the last one */
    .residence-inquiry-form-wrapper .form-actions:not(:last-of-type),
    .residence-inquiry-form-wrapper .form-submit-wrapper:not(:last-of-type),
    .residence-inquiry-form-wrapper .form-buttons:not(:last-of-type) {
        display: none !important;
    }

    /* Ensure only the last submit button container is visible (single-step forms) */
    .residence-inquiry-form-wrapper .dynamic-form:not([data-is-multistep="true"]) .form-actions:last-of-type,
    .residence-inquiry-form-wrapper .dynamic-form:not([data-is-multistep="true"]) .form-submit-wrapper:last-of-type {
        display: block !important;
    }

    /* Hide any duplicate submit buttons that might be from theme templates or multi-step forms */
    /* Show only the last submit button in the form */
    .residence-inquiry-form-wrapper button[type="submit"]:not(:last-of-type) {
        display: none !important;
    }

    /* Ensure the last submit button is visible and properly styled (single-step forms) */
    .residence-inquiry-form-wrapper .dynamic-form:not([data-is-multistep="true"]) button[type="submit"]:last-of-type {
        display: flex !important;
    }

    /* Respect multi-step final actions visibility */
    .residence-inquiry-form-wrapper .form-actions[data-final-actions] {
        display: none;
    }

    .residence-inquiry-form-wrapper .form-actions[data-final-actions].is-visible {
        display: block !important;
    }

    /* Ensure form sections have proper spacing */
    .residence-inquiry-form-wrapper .form-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--quick-inquiry-border, #e5e7eb);
    }

    .residence-inquiry-form-wrapper .form-section:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* Form section titles */
    .residence-inquiry-form-wrapper .form-section-title {
        color: var(--quick-inquiry-text-primary, #111827);
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Hide broken section-icon spans (template renders raw class name as text) */
    .residence-inquiry-form-wrapper .form-section-header .section-icon {
        display: none !important;
    }

    .residence-inquiry-form-wrapper .form-section-title i {
        color: var(--quick-inquiry-accent, #3b82f6);
    }

    /* Form fields wrapper */
    .residence-inquiry-form-wrapper .form-field-wrapper,
    .residence-inquiry-form-wrapper .form-group {
        margin-bottom: 1.5rem;
        position: relative;
    }

    /* Labels */
    .residence-inquiry-form-wrapper .form-label,
    .residence-inquiry-form-wrapper label:not(.form-checkbox-label):not(.form-radio-label) {
        display: block;
        color: var(--quick-inquiry-text-primary, #111827);
        font-weight: 500;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        transition: color 0.25s;
        font-family: var(--font-family-body, 'Poppins', sans-serif);
    }

    /* Inputs, selects, textareas - ensure they're clickable and styled */
    .residence-inquiry-form-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
    .residence-inquiry-form-wrapper select,
    .residence-inquiry-form-wrapper textarea {
        width: 100% !important;
        padding: 1rem 1.25rem !important;
        background: var(--quick-inquiry-input-bg, #ffffff) !important;
        border: 2px solid var(--quick-inquiry-input-border, #e5e7eb) !important;
        border-radius: 12px !important;
        color: var(--quick-inquiry-text-primary, #111827) !important;
        font-size: 1rem !important;
        transition: all 0.3s ease !important;
        font-family: inherit !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
        min-height: 48px !important;
        box-sizing: border-box !important;
        cursor: text !important;
        pointer-events: auto !important;
        z-index: 1 !important;
        position: relative !important;
    }

    .residence-inquiry-form-wrapper textarea {
        min-height: 100px !important;
        resize: vertical !important;
    }

    /* Focus states */
    .residence-inquiry-form-wrapper input:focus:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
    .residence-inquiry-form-wrapper select:focus,
    .residence-inquiry-form-wrapper textarea:focus {
        outline: none !important;
        border-color: var(--quick-inquiry-accent, #3b82f6) !important;
        box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        background: var(--quick-inquiry-input-bg-focus, #ffffff) !important;
        transform: translateY(-1px) !important;
        z-index: 2 !important;
    }

    /* Select dropdown - ensure it's clickable */
    .residence-inquiry-form-wrapper select {
        appearance: none !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 1rem center !important;
        padding-right: 3rem !important;
        cursor: pointer !important;
    }

    /* Checkboxes */
    .residence-inquiry-form-wrapper .form-checkbox-label,
    .residence-inquiry-form-wrapper .checkbox-wrapper {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
        background: var(--quick-inquiry-checkbox-bg, rgba(255, 255, 255, 0.1));
        border: 1px solid var(--quick-inquiry-checkbox-border, rgba(255, 255, 255, 0.2));
        border-radius: 8px;
        transition: all 0.3s ease;
        cursor: pointer;
        margin-bottom: 0.75rem;
    }

    .residence-inquiry-form-wrapper .checkbox-wrapper:hover {
        background: var(--quick-inquiry-checkbox-bg-hover, rgba(59, 130, 246, 0.05));
        border-color: var(--quick-inquiry-accent, #3b82f6);
    }

    .residence-inquiry-form-wrapper input[type="checkbox"] {
        width: 1.25rem !important;
        height: 1.25rem !important;
        margin: 0 !important;
        accent-color: var(--quick-inquiry-accent, #3b82f6) !important;
        cursor: pointer !important;
        flex-shrink: 0;
        margin-top: 0.125rem !important;
        pointer-events: auto !important;
        z-index: 1 !important;
    }

    /* Submit button - SINGLE BUTTON ONLY */
    .residence-inquiry-form-wrapper .dynamic-form:not([data-is-multistep="true"]) .form-actions:last-of-type,
    .residence-inquiry-form-wrapper .dynamic-form:not([data-is-multistep="true"]) .form-submit-wrapper:last-of-type {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--quick-inquiry-border, #e5e7eb);
        display: block !important;
    }

    .residence-inquiry-form-wrapper .dynamic-form[data-is-multistep="true"] .form-actions:last-of-type,
    .residence-inquiry-form-wrapper .dynamic-form[data-is-multistep="true"] .form-submit-wrapper:last-of-type {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--quick-inquiry-border, #e5e7eb);
    }

    .residence-inquiry-form-wrapper button[type="submit"],
    .residence-inquiry-form-wrapper .btn-submit,
    .residence-inquiry-form-wrapper .btn-primary {
        width: 100% !important;
        padding: 1rem 2rem !important;
        background: linear-gradient(135deg, var(--color-accent, #d4af37) 0%, #b58a2e 100%) !important;
        border: none !important;
        border-radius: 12px !important;
        color: #1a1a1a !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        cursor: pointer !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        min-height: 48px !important;
        box-shadow: 0 4px 14px rgba(212, 175, 55, 0.28) !important;
        pointer-events: auto !important;
        z-index: 1 !important;
    }

    .residence-inquiry-form-wrapper button[type="submit"]:hover:not(:disabled),
    .residence-inquiry-form-wrapper .btn-submit:hover:not(:disabled),
    .residence-inquiry-form-wrapper .btn-primary:hover:not(:disabled) {
        transform: translateY(-1px) !important;
        box-shadow: 0 8px 22px rgba(212, 175, 55, 0.4) !important;
    }

    /* Error messages */
    .residence-inquiry-form-wrapper .form-error,
    .residence-inquiry-form-wrapper .field-error-message,
    .residence-inquiry-form-wrapper .error-text {
        color: #ef4444;
        font-size: 0.875rem;
        margin-top: 0.5rem;
        display: block;
    }

    .residence-inquiry-form-wrapper input.error,
    .residence-inquiry-form-wrapper select.error,
    .residence-inquiry-form-wrapper textarea.error {
        border-color: #ef4444 !important;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
    }

    /* Help text */
    .residence-inquiry-form-wrapper .form-help-text {
        font-size: 0.75rem;
        color: var(--quick-inquiry-text-muted, #9ca3af);
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
    }

    /* Required indicator */
    .residence-inquiry-form-wrapper .required-indicator,
    .residence-inquiry-form-wrapper .required-asterisk {
        color: #ef4444;
        margin-left: 0.25rem;
        font-weight: 700;
    }

    /* ============================================
       ULTRA DARK MODE STYLING
       ============================================ */
    /* Fix: Use correct class selector html.dark-mode instead of [data-theme="dark"] */
    html.dark-mode .residence-inquiry-form-wrapper,
    .dark-mode .residence-inquiry-form-wrapper {
        --quick-inquiry-bg: #000000;
        --quick-inquiry-text-primary: #ffffff;
        --quick-inquiry-text-secondary: #a1a1aa;
        --quick-inquiry-input-bg: rgba(0, 0, 0, 0.9);
        --quick-inquiry-input-border: rgba(255, 255, 255, 0.15);
        --quick-inquiry-border: rgba(255, 255, 255, 0.1);
        --quick-inquiry-accent: #f26419;
    }

    html.dark-mode .residence-inquiry-form-wrapper .form-section,
    .dark-mode .residence-inquiry-form-wrapper .form-section {
        background: #000000 !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper .form-label,
    html.dark-mode .residence-inquiry-form-wrapper label:not(.form-checkbox-label):not(.form-radio-label),
    .dark-mode .residence-inquiry-form-wrapper .form-label,
    .dark-mode .residence-inquiry-form-wrapper label:not(.form-checkbox-label):not(.form-radio-label) {
        color: #ffffff !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
    html.dark-mode .residence-inquiry-form-wrapper select,
    html.dark-mode .residence-inquiry-form-wrapper textarea,
    .dark-mode .residence-inquiry-form-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
    .dark-mode .residence-inquiry-form-wrapper select,
    .dark-mode .residence-inquiry-form-wrapper textarea {
        background: rgba(0, 0, 0, 0.9) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper input::placeholder,
    html.dark-mode .residence-inquiry-form-wrapper textarea::placeholder,
    .dark-mode .residence-inquiry-form-wrapper input::placeholder,
    .dark-mode .residence-inquiry-form-wrapper textarea::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper input:focus,
    html.dark-mode .residence-inquiry-form-wrapper select:focus,
    html.dark-mode .residence-inquiry-form-wrapper textarea:focus,
    .dark-mode .residence-inquiry-form-wrapper input:focus,
    .dark-mode .residence-inquiry-form-wrapper select:focus,
    .dark-mode .residence-inquiry-form-wrapper textarea:focus {
        border-color: var(--quick-inquiry-accent, #f26419) !important;
        box-shadow: 0 0 0 4px rgba(242, 100, 25, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper .form-section-title,
    .dark-mode .residence-inquiry-form-wrapper .form-section-title {
        color: #ffffff !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper .form-section-title i,
    .dark-mode .residence-inquiry-form-wrapper .form-section-title i {
        color: var(--quick-inquiry-accent, #f26419) !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper .form-help-text,
    .dark-mode .residence-inquiry-form-wrapper .form-help-text {
        color: rgba(255, 255, 255, 0.6) !important;
    }

    html.dark-mode .residence-inquiry-form-wrapper .form-checkbox-label,
    html.dark-mode .residence-inquiry-form-wrapper .checkbox-wrapper,
    .dark-mode .residence-inquiry-form-wrapper .form-checkbox-label,
    .dark-mode .residence-inquiry-form-wrapper .checkbox-wrapper {
        background: rgba(0, 0, 0, 0.8) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .residence-inquiry-form-wrapper .form-section {
            margin-bottom: 1.5rem;
            padding-bottom: 1.5rem;
        }

        .residence-inquiry-form-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
        .residence-inquiry-form-wrapper select,
        .residence-inquiry-form-wrapper textarea {
            padding: 0.875rem 1rem !important;
            font-size: 1rem !important;
        }
    }
