            <%# ========== 12. Xray VLESS Settings ========== %>
            <div class="form-section" id="xraySection" style="<%= (node?.type || 'hysteria') !== 'xray' ? 'display:none' : '' %>">
                <h3><img src="/img/xray.svg" alt="Xray" style="width:18px;height:18px;vertical-align:middle;margin-right:8px;"><%= t('nodes.xraySettings') %></h3>

                <div class="form-row">
                    <div class="form-group">
                        <label for="xrayTransport"><%= t('nodes.xrayTransport') %></label>
                        <select id="xrayTransport" name="xray.transport" onchange="updateXrayTransportUI()">
                            <option value="tcp" <%= node?.xray?.transport === 'tcp' || !node?.xray?.transport ? 'selected' : '' %>>TCP</option>
                            <option value="ws" <%= node?.xray?.transport === 'ws' ? 'selected' : '' %>>WebSocket</option>
                            <option value="grpc" <%= node?.xray?.transport === 'grpc' ? 'selected' : '' %>>gRPC</option>
                            <option value="xhttp" <%= node?.xray?.transport === 'xhttp' ? 'selected' : '' %>>XHTTP (SplitHTTP)</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="xraySecurity"><%= t('nodes.xraySecurity') %></label>
                        <select id="xraySecurity" name="xray.security" onchange="updateXraySecurityUI()">
                            <option value="reality" <%= node?.xray?.security === 'reality' || !node?.xray?.security ? 'selected' : '' %>><%= t('nodes.xraySecurityReality') %></option>
                            <option value="tls" <%= node?.xray?.security === 'tls' ? 'selected' : '' %>><%= t('nodes.xraySecurityTls') %></option>
                            <option value="none" <%= node?.xray?.security === 'none' ? 'selected' : '' %>><%= t('nodes.xraySecurityNone') %></option>
                        </select>
                    </div>
                </div>

                <%
                    var _fpPool = node?.xray?.fingerprintPool || [];
                    var _fpMode = _fpPool.length > 0 ? 'pool' : 'single';
                    var _fpList = ['chrome','firefox','safari','ios','android','edge','360','qq','random','randomized'];
                    var _fpLabel = function(f) { return f === 'ios' ? 'iOS' : (f === 'qq' ? 'QQ' : (f === '360' ? '360' : f.charAt(0).toUpperCase() + f.slice(1))); };
                %>
                <div class="form-group fp-mode-group">
                    <label class="block-label"><i class="ti ti-fingerprint"></i> <%= t('nodes.xrayFingerprint') %></label>
                    <small class="hint" style="display:block;margin-bottom:8px;"><%= t('nodes.xrayFingerprintHint') %></small>
                    <div class="radio-group" role="radiogroup" aria-label="<%= t('nodes.xrayFingerprint') %>">
                        <label class="radio-row">
                            <input type="radio" name="xrayFingerprintMode" value="single" <%= _fpMode === 'single' ? 'checked' : '' %> onchange="updateXrayFingerprintModeUI()">
                            <span class="radio-label">
                                <strong><%= t('nodes.xrayFingerprintModeSingle') %></strong>
                                <small class="radio-hint"><%= t('nodes.xrayFingerprintModeSingleHint') %></small>
                            </span>
                        </label>
                        <label class="radio-row">
                            <input type="radio" name="xrayFingerprintMode" value="pool" <%= _fpMode === 'pool' ? 'checked' : '' %> onchange="updateXrayFingerprintModeUI()">
                            <span class="radio-label">
                                <strong><%= t('nodes.xrayFingerprintModePool') %></strong>
                                <small class="radio-hint"><%= t('nodes.xrayFingerprintModePoolHint') %></small>
                            </span>
                        </label>
                    </div>

                    <div id="xrayFingerprintSingle" class="fp-mode-block" style="margin-top:8px;<%= _fpMode === 'single' ? '' : 'display:none' %>">
                        <select id="xrayFingerprint" name="xray.fingerprint">
                            <% _fpList.forEach(function(f) { %>
                                <option value="<%= f %>" <%= (node?.xray?.fingerprint === f || (!node?.xray?.fingerprint && f === 'chrome')) ? 'selected' : '' %>><%= _fpLabel(f) %></option>
                            <% }); %>
                        </select>
                    </div>

                    <div id="xrayFingerprintPoolBlock" class="fp-mode-block" style="margin-top:8px;<%= _fpMode === 'pool' ? '' : 'display:none' %>">
                        <%# Empty fallback so an empty selection still submits the field (clears the pool).
                            Checkboxes are disabled in single mode so a stale selection is never sent. %>
                        <input type="hidden" name="xray.fingerprintPool" value="">
                        <div class="fp-checkbox-grid">
                            <% _fpList.forEach(function(f) { %>
                                <label class="fp-checkbox">
                                    <input type="checkbox" class="xray-fp-pool-cb" name="xray.fingerprintPool" value="<%= f %>"
                                           <%= _fpPool.indexOf(f) !== -1 ? 'checked' : '' %> <%= _fpMode === 'pool' ? '' : 'disabled' %>>
                                    <span><%= _fpLabel(f) %></span>
                                </label>
                            <% }); %>
                        </div>
                        <small style="display:block;margin-top:8px;"><%= t('nodes.xrayFingerprintPoolHint') %></small>
                    </div>
                </div>

                <div class="form-row">
                    <div class="form-group" id="alpnGroup" style="<%= node?.xray?.security === 'tls' ? '' : 'display:none' %>">
                        <label for="xrayAlpn"><%= t('nodes.xrayAlpn') %></label>
                        <input type="text" id="xrayAlpn" name="xray.alpn"
                               value="<%= (node?.xray?.alpn || []).join(', ') %>"
                               placeholder="h2, http/1.1">
                        <small><%= t('nodes.xrayAlpnHint') %></small>
                    </div>
                </div>

                <%# TLS Source (only when security==='tls'): panel | acme | manual | self-signed %>
                <% var _tlsSource = node?.xray?.tlsSource || 'panel'; %>
                <% var _panelDomain = (typeof panelDomain === 'string' ? panelDomain : '') || ''; %>
                <% var _panelAcmeEmail = (typeof panelAcmeEmail === 'string' ? panelAcmeEmail : '') || ''; %>
                <% var _hasManualKey = !!(node?.xray && (node.xray.manualKeySet === true || node.xray.manualKey)); %>
                <% var _anyTls = node?.xray?.security === 'tls' || (node?.xray?.extraInbounds || []).some(function(i){ return i && i.security === 'tls'; }); %>
                <div class="form-group xray-tls-config" id="xrayTlsConfig" style="<%= _anyTls ? '' : 'display:none' %>">
                    <label class="block-label"><i class="ti ti-certificate"></i> <%= t('nodes.xrayTlsSourceLabel') %></label>
                    <small class="hint" style="display:block;margin-bottom:8px;"><%= t('nodes.xrayTlsSourceScopeHint') %></small>
                    <div class="radio-group" role="radiogroup" aria-label="<%= t('nodes.xrayTlsSourceLabel') %>">
                        <label class="radio-row">
                            <input type="radio" name="xray.tlsSource" value="panel" <%= _tlsSource === 'panel' ? 'checked' : '' %> onchange="updateXrayTlsSourceUI()">
                            <span class="badge badge-success"><%= t('nodes.xrayTlsRecommended') %></span>
                            <span class="radio-label">
                                <strong><%= t('nodes.xrayTlsSourcePanel') %></strong>
                                <small class="radio-hint"><%= t('nodes.xrayTlsSourcePanelHint') %></small>
                            </span>
                        </label>
                        <label class="radio-row">
                            <input type="radio" name="xray.tlsSource" value="acme" <%= _tlsSource === 'acme' ? 'checked' : '' %> onchange="updateXrayTlsSourceUI()">
                            <span class="radio-label">
                                <strong><%= t('nodes.xrayTlsSourceAcme') %></strong>
                                <small class="radio-hint"><%= t('nodes.xrayTlsSourceAcmeHint') %></small>
                            </span>
                        </label>
                        <label class="radio-row">
                            <input type="radio" name="xray.tlsSource" value="manual" <%= _tlsSource === 'manual' ? 'checked' : '' %> onchange="updateXrayTlsSourceUI()">
                            <span class="radio-label">
                                <strong><%= t('nodes.xrayTlsSourceManual') %></strong>
                                <small class="radio-hint"><%= t('nodes.xrayTlsSourceManualHint') %></small>
                            </span>
                        </label>
                        <label class="radio-row">
                            <input type="radio" name="xray.tlsSource" value="self-signed" <%= _tlsSource === 'self-signed' ? 'checked' : '' %> onchange="updateXrayTlsSourceUI()">
                            <span class="badge badge-warning"><%= t('nodes.xrayTlsTesting') %></span>
                            <span class="radio-label">
                                <strong><%= t('nodes.xrayTlsSourceSelfSigned') %></strong>
                                <small class="radio-hint"><%= t('nodes.xrayTlsSourceSelfSignedHint') %></small>
                            </span>
                        </label>
                    </div>

                    <%# Panel-domain info block %>
                    <div class="tls-source-panel" id="xrayTlsPanelInfo" style="<%= _tlsSource === 'panel' ? '' : 'display:none' %>">
                        <div class="info-card">
                            <i class="ti ti-info-circle"></i>
                            <div>
                                <div><strong><%= t('nodes.xrayTlsEffectiveSni') %>:</strong> <code><%= _panelDomain || t('nodes.xrayTlsPanelDomainUnset') %></code></div>
                                <small><%= t('nodes.xrayTlsPanelInfoLine') %></small>
                            </div>
                        </div>
                    </div>

                    <%# ACME (acme.sh on node) block %>
                    <div class="tls-source-acme" id="xrayTlsAcmeBlock" style="<%= _tlsSource === 'acme' ? '' : 'display:none' %>">
                        <div class="info-card">
                            <i class="ti ti-bulb"></i>
                            <div>
                                <small><%= t('nodes.xrayTlsAcmeInfoLine') %></small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="xrayAcmeEmail"><%= t('nodes.xrayTlsAcmeEmailLabel') %></label>
                            <%# type=text: Chrome validates type=email even when hidden, blocking submit on mode switch. %>
                            <input type="text" id="xrayAcmeEmail" name="xray.acmeEmail"
                                   value="<%= node?.xray?.acmeEmail || '' %>"
                                   placeholder="<%= _panelAcmeEmail || 'admin@example.com' %>"
                                   maxlength="254" autocomplete="off" spellcheck="false"
                                   inputmode="email">
                            <small><%= t('nodes.xrayTlsAcmeEmailHint') %></small>
                        </div>
                    </div>

                    <%# Manual PEM block %>
                    <div class="tls-source-manual" id="xrayTlsManualBlock" style="<%= _tlsSource === 'manual' ? '' : 'display:none' %>">
                        <div class="info-card">
                            <i class="ti ti-bulb"></i>
                            <div>
                                <small><%= t('nodes.xrayTlsManualDomainHint') %></small>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="xrayManualCert"><%= t('nodes.xrayManualCertLabel') %></label>
                            <textarea id="xrayManualCert" name="xray.manualCert" rows="6" class="code-textarea pem-textarea"
                                      placeholder="-----BEGIN CERTIFICATE-----&#10;...&#10;-----END CERTIFICATE-----"
                                      autocomplete="off" spellcheck="false"
                                      aria-describedby="xrayManualCertStatus"
                                      onblur="validateXrayPemField(this, 'cert')"
                                      oninput="validateXrayPemField(this, 'cert')"><%= node?.xray?.manualCert || '' %></textarea>
                            <small id="xrayManualCertStatus" class="pem-status" aria-live="polite"></small>
                            <small><%= t('nodes.xrayManualCertHint') %></small>
                        </div>
                        <div class="form-group">
                            <label for="xrayManualKey"><%= t('nodes.xrayManualKeyLabel') %></label>
                            <textarea id="xrayManualKey" name="xray.manualKey" rows="6" class="code-textarea pem-textarea"
                                      placeholder="-----BEGIN PRIVATE KEY-----&#10;...&#10;-----END PRIVATE KEY-----"
                                      autocomplete="off" spellcheck="false"
                                      aria-describedby="xrayManualKeyStatus"
                                      data-has-stored-key="<%= _hasManualKey ? '1' : '0' %>"
                                      onfocus="onXrayManualKeyFocus(this)"
                                      onblur="validateXrayPemField(this, 'key')"
                                      oninput="validateXrayPemField(this, 'key')"><%= _hasManualKey ? '***SET***' : '' %></textarea>
                            <small id="xrayManualKeyStatus" class="pem-status" aria-live="polite"></small>
                            <small><%= _hasManualKey ? t('nodes.xrayManualKeyMaskedHint') : t('nodes.xrayManualKeyHint') %></small>
                        </div>
                    </div>

                    <%# Self-signed warning block %>
                    <div class="tls-source-selfsigned" id="xrayTlsSelfSignedInfo" style="<%= _tlsSource === 'self-signed' ? '' : 'display:none' %>">
                        <div class="info-card info-card-warning">
                            <i class="ti ti-alert-triangle"></i>
                            <div>
                                <strong><%= t('nodes.xrayTlsSelfSignedWarning') %></strong>
                                <small><%= t('nodes.xrayTlsSelfSignedHint') %></small>
                            </div>
                        </div>
                    </div>
                </div>

                <%# Flow — TCP only %>
                <div class="form-group" id="xrayFlowGroup" style="<%= node?.xray?.transport && node.xray.transport !== 'tcp' ? 'display:none' : '' %>">
                    <label for="xrayFlow"><%= t('nodes.xrayFlow') %></label>
                    <input type="text" id="xrayFlow" name="xray.flow" value="<%= node?.xray?.flow || 'xtls-rprx-vision' %>" placeholder="xtls-rprx-vision">
                    <small><%= t('nodes.xrayFlowHint') %></small>
                </div>

                <%# VLESS fallbacks[].dest — TCP+TLS only %>
                <% var _fallbackVisible = (node?.xray?.transport === 'tcp' || !node?.xray?.transport) && node?.xray?.security === 'tls'; %>
                <div class="form-group" id="xrayFallbackGroup" style="<%= _fallbackVisible ? '' : 'display:none' %>">
                    <label for="xrayFallbackDest"><%= t('nodes.xrayFallbackDestLabel') %></label>
                    <input type="text" id="xrayFallbackDest" name="xray.fallbackDest"
                           value="<%= node?.xray?.fallbackDest || '' %>"
                           placeholder="<%= t('nodes.xrayFallbackDestPlaceholder') %>"
                           maxlength="253" autocomplete="off" spellcheck="false">
                    <small><%= t('nodes.xrayFallbackDestHint') %></small>
                </div>

                <%# Reality-specific fields %>
                <div id="realityFields" style="<%= node?.xray?.security === 'tls' || node?.xray?.security === 'none' ? 'display:none' : '' %>">
                    <div class="form-row">
                        <div class="form-group">
                            <label for="xrayRealityDest"><%= t('nodes.xrayRealityDest') %></label>
                            <input type="text" id="xrayRealityDest" name="xray.realityDest"
                                   value="<%= node?.xray?.realityDest || 'www.google.com:443' %>"
                                   placeholder="www.google.com:443">
                            <small><%= t('nodes.xrayRealityDestHint') %></small>
                        </div>
                        <div class="form-group">
                            <label for="xrayRealitySni"><%= t('nodes.xrayRealitySni') %></label>
                            <div class="input-with-button">
                                <input type="text" id="xrayRealitySni" name="xray.realitySni"
                                       value="<%= (node?.xray?.realitySni || ['www.google.com']).join(', ') %>"
                                       placeholder="www.google.com">
                                <button type="button" class="btn btn-sm" id="sniScanOpenBtn"
                                        onclick="openSniScanner()"
                                        title="<%= t('nodes.sniScanTitle') %>">
                                    <i class="ti ti-radar"></i> <%= t('nodes.sniScan') %>
                                </button>
                            </div>
                            <small><%= t('nodes.xrayRealitySniHint') %></small>
                        </div>
                    </div>
                    <div class="form-row">
                        <div class="form-group">
                            <label for="xrayRealityPrivKey"><%= t('nodes.xrayPrivateKey') %></label>
                            <div class="input-with-button">
                                <input type="text" id="xrayRealityPrivKey" name="xray.realityPrivateKey"
                                       value="<%= node?.xray?.realityPrivateKey || '' %>"
                                       placeholder="<%= t('nodes.xrayAutoGenerated') %>">
                                <% if (node) { %>
                                <button type="button" class="btn btn-sm" onclick="generateXrayKeys()" title="<%= t('nodes.xrayGenerateKeys') %>"><i class="ti ti-refresh"></i></button>
                                <% } %>
                            </div>
                            <% if (!node) { %><small><%= t('nodes.xrayAutoGeneratedSetupHint') %></small><% } %>
                        </div>
                        <div class="form-group">
                            <label for="xrayRealityPubKey"><%= t('nodes.xrayPublicKey') %></label>
                            <input type="text" id="xrayRealityPubKey" name="xray.realityPublicKey"
                                   value="<%= node?.xray?.realityPublicKey || '' %>"
                                   placeholder="<%= t('nodes.xrayAutoGenerated') %>" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="xrayRealityShortIds"><%= t('nodes.xrayShortIds') %></label>
                        <input type="text" id="xrayRealityShortIds" name="xray.realityShortIds"
                               value="<%= (node?.xray?.realityShortIds || ['']).join(', ') %>"
                               placeholder=", 0123456789abcdef">
                        <small><%= t('nodes.xrayShortIdsHint') %></small>
                    </div>
                    <div class="form-group">
                        <label for="xrayRealitySpiderX"><%= t('nodes.xraySpiderX') %></label>
                        <input type="text" id="xrayRealitySpiderX" name="xray.realitySpiderX"
                               value="<%= node?.xray?.realitySpiderX || '' %>"
                               placeholder="/r/programming/">
                        <small><%= t('nodes.xraySpiderXHint') %></small>
                    </div>
                </div>

                <%# SNI Scanner modal (Reality only) %>
                <div id="sniScanModal" class="sni-modal-overlay" style="display:none" role="dialog" aria-modal="true">
                    <div class="sni-modal-card">
                        <div class="sni-modal-header">
                            <h3><i class="ti ti-radar"></i> <%= t('nodes.sniScanTitle') %></h3>
                            <button type="button" class="sni-modal-close" onclick="closeSniScanner()"><i class="ti ti-x"></i></button>
                        </div>
                        <div class="sni-modal-body">
                            <p class="sni-modal-hint"><%= t('nodes.sniScanHint') %></p>
                            <div class="sni-params">
                                <div class="form-group" style="margin:0">
                                    <label for="sniScanIp"><%= t('nodes.ipAddress') %></label>
                                    <input type="text" id="sniScanIp" placeholder="185.100.200.1" autocomplete="off">
                                </div>
                                <div class="form-group" style="margin:0">
                                    <label for="sniScanPort"><%= t('nodes.sniScanPortLabel') %></label>
                                    <input type="number" id="sniScanPort" value="443" min="1" max="65535">
                                </div>
                            </div>
                            <div class="sni-params-row2">
                                <div class="form-group" style="margin:0">
                                    <label for="sniScanThreads"><%= t('nodes.sniScanThreads') %></label>
                                    <input type="number" id="sniScanThreads" value="50" min="1" max="200">
                                </div>
                                <div class="form-group" style="margin:0">
                                    <label for="sniScanTimeout"><%= t('nodes.sniScanTimeout') %></label>
                                    <input type="number" id="sniScanTimeout" value="5" min="2" max="30">
                                </div>
                                <div class="sni-scan-controls" style="margin:0; align-self:flex-end">
                                    <button type="button" class="btn btn-primary" id="sniScanStartBtn" onclick="startSniScan()">
                                        <i class="ti ti-radar"></i> <%= t('nodes.sniScanStart') %>
                                    </button>
                                    <button type="button" class="btn" id="sniScanStopBtn" onclick="stopSniScan()" style="display:none">
                                        <i class="ti ti-player-stop"></i> <%= t('nodes.sniScanStop') %>
                                    </button>
                                </div>
                            </div>
                            <div id="sniScanProgressWrap" style="display:none; margin-bottom:4px">
                                <div class="sni-progress-bar"><div id="sniScanProgressFill" class="sni-progress-fill" style="width:0%"></div></div>
                                <span id="sniScanStatus" class="sni-scan-status"></span>
                            </div>
                            <div id="sniScanResults" style="display:none">
                                <div class="sni-results-header">
                                    <span class="sni-results-title"><%= t('nodes.sniScanResults') %></span>
                                    <span id="sniScanCount" class="sni-results-count"></span>
                                </div>
                                <div class="sni-table-wrap">
                                    <table class="sni-table">
                                        <thead>
                                            <tr>
                                                <th><%= t('nodes.sniScanPing') %></th>
                                                <th><%= t('nodes.sniScanDomain') %></th>
                                                <th><%= t('nodes.sniScanIp') %></th>
                                                <th><%= t('nodes.sniScanIssuer') %></th>
                                                <th></th>
                                            </tr>
                                        </thead>
                                        <tbody id="sniScanTableBody"></tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="sniScanEmpty" style="display:none" class="sni-empty"><%= t('nodes.sniScanNoResults') %></div>
                        </div>
                    </div>
                </div>

                <%# WebSocket-specific fields %>
                <div id="wsFields" style="<%= node?.xray?.transport === 'ws' ? '' : 'display:none' %>">
                    <div class="form-row">
                        <div class="form-group">
                            <label for="xrayWsPath"><%= t('nodes.xrayWsPath') %></label>
                            <input type="text" id="xrayWsPath" name="xray.wsPath"
                                   value="<%= node?.xray?.wsPath || '/' %>" placeholder="/">
                        </div>
                        <div class="form-group">
                            <label for="xrayWsHost"><%= t('nodes.xrayWsHost') %></label>
                            <input type="text" id="xrayWsHost" name="xray.wsHost"
                                   value="<%= node?.xray?.wsHost || '' %>" placeholder="cdn.example.com">
                            <small><%= t('nodes.xrayWsHostHint') %></small>
                        </div>
                    </div>
                </div>

                <%# gRPC-specific fields %>
                <div id="grpcFields" style="<%= node?.xray?.transport === 'grpc' ? '' : 'display:none' %>">
                    <div class="form-group">
                        <label for="xrayGrpcService"><%= t('nodes.xrayGrpcService') %></label>
                        <input type="text" id="xrayGrpcService" name="xray.grpcServiceName"
                               value="<%= node?.xray?.grpcServiceName || 'grpc' %>" placeholder="grpc">
                    </div>
                </div>

                <%# XHTTP (SplitHTTP) specific fields %>
                <div id="xhttpFields" style="<%= node?.xray?.transport === 'xhttp' ? '' : 'display:none' %>">
                    <div class="form-row">
                        <div class="form-group">
                            <label for="xrayXhttpPath"><%= t('nodes.xrayXhttpPath') %></label>
                            <input type="text" id="xrayXhttpPath" name="xray.xhttpPath"
                                   value="<%= node?.xray?.xhttpPath || '/' %>" placeholder="/">
                        </div>
                        <div class="form-group">
                            <label for="xrayXhttpHost"><%= t('nodes.xrayXhttpHost') %></label>
                            <input type="text" id="xrayXhttpHost" name="xray.xhttpHost"
                                   value="<%= node?.xray?.xhttpHost || '' %>" placeholder="cdn.example.com">
                            <small><%= t('nodes.xrayXhttpHostHint') %></small>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="xrayXhttpMode"><%= t('nodes.xrayXhttpMode') %></label>
                        <select id="xrayXhttpMode" name="xray.xhttpMode">
                            <option value="auto" <%= node?.xray?.xhttpMode === 'auto' || !node?.xray?.xhttpMode ? 'selected' : '' %>>Auto</option>
                            <option value="packet-up" <%= node?.xray?.xhttpMode === 'packet-up' ? 'selected' : '' %>>Packet Up</option>
                            <option value="stream-up" <%= node?.xray?.xhttpMode === 'stream-up' ? 'selected' : '' %>>Stream Up</option>
                            <option value="stream-one" <%= node?.xray?.xhttpMode === 'stream-one' ? 'selected' : '' %>>Stream One</option>
                        </select>
                        <small><%= t('nodes.xrayXhttpModeHint') %></small>
                    </div>
                </div>

                <div class="form-group">
                    <label for="xrayApiPort"><%= t('nodes.xrayApiPort') %></label>
                    <input type="number" id="xrayApiPort" name="xray.apiPort"
                           value="<%= node?.xray?.apiPort || 61000 %>" placeholder="61000">
                    <small><%= t('nodes.xrayApiPortHint') %></small>
                </div>

                <%# ========== Additional VLESS inbounds ========== %>
                <div class="extra-inbounds-section">
                    <div class="extra-inbounds-header">
                        <div>
                            <div class="extra-inbounds-title"><i class="ti ti-plugger-connected"></i> <%= t('nodes.xrayExtraInboundsTitle') %></div>
                            <small class="extra-inbounds-hint"><%= t('nodes.xrayExtraInboundsHint') %></small>
                        </div>
                        <button type="button" class="btn btn-sm btn-secondary" id="addExtraInboundBtn" onclick="addExtraInbound()">
                            <i class="ti ti-plus"></i> <%= t('nodes.xrayAddInbound') %>
                        </button>
                    </div>

                    <div id="extraInboundsContainer">
                        <% (node?.xray?.extraInbounds || []).forEach(function(extra, idx) { %>
                            <%- include('xray-extra-inbound', { extra: extra, idx: idx, t: t }) %>
                        <% }); %>
                    </div>

                    <%# Hidden template cloned client-side by addExtraInbound() %>
                    <template id="extraInboundTemplate">
                        <%- include('xray-extra-inbound', { extra: {}, idx: 0, t: t }) %>
                    </template>
                </div>
            </div>
