        /* ---- AI: code assistant + account manager ---- */
                .ai-ov { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.55); display: none; align-items: flex-end; }
                .ai-ov.open { display: flex; }
                .ai-sheet { width: 100%; height: 85vh; background: #161b22; border-top: 1px solid #30363d; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); transition: transform .18s ease-out; position: relative; }
                .ai-grab { padding: 8px 0 4px; display: flex; justify-content: center; touch-action: none; flex-shrink: 0; }
                .ai-grab span { width: 44px; height: 5px; border-radius: 3px; background: #484f58; display: block; }
                .ai-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px 10px; border-bottom: 1px solid #30363d; flex-shrink: 0; touch-action: none; }
                .ai-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
                .ai-title b { display: block; color: #e6edf3; font-size: 15px; }
                .ai-title small { display: block; color: #8b949e; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
                .ai-ticon { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg,#8250df,#a371f7); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
                .ai-hbtns { display: flex; gap: 6px; flex-shrink: 0; }
                .ai-hbtns button { width: 38px; height: 38px; border-radius: 10px; background: #21262d; border: 1px solid #30363d; color: #c9d1d9; display: flex; align-items: center; justify-content: center; }
                .ai-bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px 0; flex-shrink: 0; }
                .ai-dd { position: relative; flex-shrink: 0; }
                .ai-ddbtn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #0d1117; border: 1px solid #30363d; color: #c9d1d9; font-size: 12px; font-weight: 600; min-height: 38px; }
                .ai-ddmenu { position: absolute; top: 42px; left: 0; min-width: 180px; background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 4px; z-index: 5; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
                .ai-ddmenu.hidden { display: none; }
                .ai-ddi { background: none; border: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; color: #c9d1d9; font-size: 13px; text-align: left; }
                .ai-ddi.on { background: #1f3a66; color: #fff; }
                .ai-scope { font-size: 11px; font-weight: 600; color: #a371f7; border: 1px solid #4b3a7a; border-radius: 999px; padding: 6px 10px; background: rgba(130,80,223,.12); min-height: 34px; }
                .ai-scope.hidden { display: none; }
                .ai-usage { padding: 6px 12px 0; flex-shrink: 0; }
                .ai-uhead { background: none; border: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #8b949e; padding: 6px 2px; text-align: left; }
                .ai-uhead b { color: #e6edf3; }
                .ai-uchev { transition: transform .15s; display: inline-flex; } .ai-uchev.up { transform: rotate(180deg); }
                .ai-ulist { max-height: 34vh; overflow-y: auto; }
                .ai-chat { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
                .ai-chat.hidden, .ai-setbox.hidden, .ai-chips.hidden, .ai-input.hidden { display: none; }
                .ai-setbox { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
                .ai-b { flex-shrink: 0; max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5; user-select: text; -webkit-user-select: text; word-wrap: break-word; overflow-wrap: anywhere; }
                .ai-u { align-self: flex-end; background: #1b3a6b; color: #e6edf3; border-bottom-right-radius: 4px; white-space: pre-wrap; }
                .ai-a { align-self: stretch; width: 100%; flex-shrink: 0; background: #21262d; color: #c9d1d9; border-left: 3px solid #8250df; border-bottom-left-radius: 4px; word-wrap: break-word; overflow-x: auto; max-width: 100%; }
                .ai-a.ai-err { border-left-color: #f85149; background: #2a1517; }
                .ai-md p { margin: 0 0 8px; } .ai-md p:last-child { margin: 0; }
                .ai-md pre { background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 10px; overflow-x: auto; font-size: 12px; margin: 6px 0; }
                .ai-md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
                .ai-md :not(pre) > code { background: #0d1117; padding: 1px 5px; border-radius: 4px; }
                .ai-md table { border-collapse: collapse; font-size: 12px; display: block; overflow-x: auto; margin: 6px 0; }
                .ai-md th, .ai-md td { border: 1px solid #30363d; padding: 4px 8px; }
                .ai-md a { color: #58a6ff; text-decoration: underline; word-break: break-word; }
                .ai-md ul, .ai-md ol { padding-left: 18px; margin: 4px 0; } .ai-md ul { list-style: disc; } .ai-md ol { list-style: decimal; }
                .ai-md h3 { font-weight: 700; color: #e6edf3; margin: 2px 0 6px; font-size: 14px; }
                .ai-copy { position: absolute; top: 6px; right: 6px; font-size: 10px; padding: 3px 8px; border-radius: 6px; background: #21262d; border: 1px solid #30363d; color: #c9d1d9; }
                .ai-meta { margin-top: 6px; font-size: 10px; color: #6e7681; }
                .ai-empty { margin: auto; text-align: center; color: #8b949e; font-size: 12px; padding: 20px; }
                .ai-empty b { display: block; color: #e6edf3; font-size: 14px; margin: 6px 0; }
                .ai-eic { width: 44px; height: 44px; border-radius: 14px; margin: 0 auto; background: linear-gradient(135deg,#8250df,#a371f7); color: #fff; display: flex; align-items: center; justify-content: center; }
                .ai-cmds { font-family: ui-monospace, monospace; color: #a371f7; margin-top: 8px; }
                .ai-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px 4px; flex-shrink: 0; scrollbar-width: none; }
                .ai-chips::-webkit-scrollbar { display: none; }
                .ai-chip { flex: 0 0 auto; padding: 8px 14px; min-height: 36px; border-radius: 999px; background: #0d1117; border: 1px solid #30363d; color: #c9d1d9; font-size: 12px; font-weight: 600; }
                .ai-chip:active { background: #1f3a66; border-color: #388bfd; }
                .ai-input { display: flex; gap: 8px; align-items: flex-end; padding: 6px 12px 10px; flex-shrink: 0; }
                .ai-input textarea { flex: 1; min-width: 0; resize: none; background: #0d1117; border: 1px solid #30363d; color: #fff; border-radius: 22px; padding: 11px 16px; font-size: 14px; outline: none; max-height: 110px; }
                .ai-input button { width: 44px; height: 44px; border-radius: 50%; background: #238636; border: 1px solid #2ea043; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
                .ai-input button:disabled { opacity: .45; }
                .ai-think { display: flex; align-items: center; gap: 8px; }
                .ai-dots { display: inline-flex; gap: 3px; } .ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: #a371f7; animation: aiDot 1s infinite; } .ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
                @keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.1); } }
                .ai-cancel { margin-left: auto; font-size: 11px; color: #f85149; padding: 4px 8px; }
                .ai-btn { padding: 8px 14px; min-height: 36px; border-radius: 8px; font-size: 12px; font-weight: 700; background: #21262d; border: 1px solid #30363d; color: #c9d1d9; }
                .ai-btn.ok { background: #238636; border-color: #2ea043; color: #fff; }
                .ai-btn.no { color: #f85149; }
                .ai-diff { margin-top: 8px; }
                .ai-dhead { display: flex; justify-content: space-between; font-size: 12px; color: #e6edf3; margin-bottom: 4px; } .ai-dhead span { color: #8b949e; font-family: ui-monospace, monospace; }
                .ai-hunks { font-size: 11px; color: #e3b341; margin-bottom: 6px; } .ai-note { font-size: 11px; color: #8b949e; margin-bottom: 6px; }
                .ai-diff .diff { max-height: 40vh; overflow: auto; }
                .ai-drow2 { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
                .ai-state { font-size: 12px; font-weight: 700; } .ai-state.applied { color: #3fb950; } .ai-state.discarded { color: #8b949e; }
                .ai-hl { position: absolute; background: rgba(46,160,67,.16); border-left: 3px solid #3fb950; box-sizing: border-box; }
                .ai-hl-new { background: rgba(63,185,80,.42); }
                .ai-scard { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
                .ai-stitle { font-weight: 700; color: #e6edf3; font-size: 14px; } .ai-sdesc { font-size: 11px; color: #8b949e; margin: 2px 0 8px; }
                .ai-prow { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13px; color: #c9d1d9; border-top: 1px solid #21262d; }
                .ai-prow b.ok, .ai-krow b.ok { color: #3fb950; } .ai-prow b.off { color: #8b949e; } .ai-krow b.bad { color: #f85149; }
                .ai-trow { display: flex; align-items: center; gap: 12px; } .ai-trow input { flex: 1; } .ai-trow b { color: #e6edf3; width: 40px; text-align: right; }
                .ai-key { border: 1px solid #30363d; border-radius: 10px; background: #0d1117; margin-bottom: 8px; overflow: hidden; }
                .ai-key.open { border-color: #8250df; }
                .ai-ktop { background: none; border: 0; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; min-height: 48px; }
                .ai-dot { width: 9px; height: 9px; border-radius: 50%; background: #8b949e; flex-shrink: 0; } .ai-dot.ok { background: #3fb950; } .ai-dot.bad { background: #f85149; }
                .ai-kn { flex: 1; min-width: 0; } .ai-kn b { display: block; color: #e6edf3; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai-kn small, .ai-kr small { display: block; color: #8b949e; font-size: 10px; }
                .ai-kr { text-align: right; flex-shrink: 0; } .ai-kr b { color: #e6edf3; font-size: 13px; }
                .ai-bar2 { height: 4px; background: #21262d; } .ai-bar2 i { display: block; height: 100%; background: #8250df; }
                .ai-kdet { padding: 8px 12px 12px; border-top: 1px solid #21262d; }
                .ai-krow { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #8b949e; padding: 4px 0; } .ai-krow b { color: #e6edf3; text-align: right; font-weight: 600; } .ai-krow small { color: #8b949e; font-weight: 400; }
                .ai-kmods { border-top: 1px dashed #30363d; margin-top: 4px; padding-top: 4px; }
                .ai-kerr { font-size: 11px; color: #f0883e; margin-top: 6px; word-break: break-word; }
                .ai-kact { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
                .ai-fld { margin-top: 10px; } .ai-fld label { display: block; font-size: 11px; color: #8b949e; margin-bottom: 4px; } .ai-fld .modern-input { margin-bottom: 0; }
                .ai-tb { background: linear-gradient(135deg,#8250df,#a371f7) !important; color: #fff !important; border-color: #8250df !important; display: inline-flex; align-items: center; gap: 6px; }
                .ai-mgr-btn { color: #a371f7 !important; border-color: #4b3a7a !important; }
                        .prov-switch + .ai-mgr-btn { display: none !important; }
                .dcard { background: #0d1117; border: 1px solid #30363d; border-radius: 12px; padding: 12px; }
                .dc-top { display: flex; align-items: center; gap: 10px; }
                .dc-ic { width: 32px; height: 32px; border-radius: 9px; background: #1f3a66; color: #58a6ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
                .dc-t { flex: 1; min-width: 0; } .dc-t b { display: block; color: #e6edf3; font-family: ui-monospace, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dc-t small { display: block; color: #8b949e; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
                .dc-v { font-size: 11px; font-weight: 700; color: #3fb950; background: rgba(46,160,67,.15); border-radius: 999px; padding: 2px 9px; }
                .dc-prog { height: 4px; background: #21262d; border-radius: 2px; margin-top: 10px; overflow: hidden; } .dc-prog i { display: block; height: 100%; background: #58a6ff; }
                .dc-cnt { font-size: 10px; color: #8b949e; margin-top: 4px; }
                .dc-hint { font-size: 12px; color: #9da7b3; margin: 10px 0 8px; }
                .dc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
                .dc-chip { padding: 5px 10px; border-radius: 999px; background: #161b22; border: 1px solid #30363d; color: #c9d1d9; font-size: 11px; }
                .dc-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
                .dc-btn { flex: 1 1 auto; padding: 9px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; background: #21262d; border: 1px solid #30363d; color: #c9d1d9; }
                .dc-btn.warn { background: #3d2a00; border-color: #9e6a03; color: #e3b341; } .dc-btn.no { color: #f85149; }
                .dc-res { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #8b949e; } .dc-res b { text-align: right; word-break: break-word; font-weight: 600; } .dc-res.ok b { color: #3fb950; } .dc-res.no b { color: #f85149; } .dc-res.sk b { color: #e3b341; }
                .act-plat { font-size: 12px; font-weight: 700; color: #58a6ff; text-transform: uppercase; letter-spacing: .06em; margin: 6px 2px; }
                        .act-row { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid #21262d; }
                        .act-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
                        .act-b { min-width: 0; flex: 1; } .act-x { font-size: 13px; color: #e6edf3; word-break: break-word; }
                        .act-d { font-size: 11px; color: #8b949e; font-family: ui-monospace, monospace; margin-top: 2px; word-break: break-all; }
                        .act-m { font-size: 10px; color: #6e7681; margin-top: 3px; }
                        .act-pill { background: #21262d; border: 1px solid #30363d; border-radius: 999px; padding: 1px 7px; color: #9da7b3; }
                        .act-live { font-size: 10px; font-weight: 700; color: #3fb950; background: rgba(46,160,67,.15); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
                        .ai-ddi small { display: block; color: #8b949e; font-size: 10px; font-weight: 400; margin-top: 1px; }
                                .ai-ddmenu { max-height: 50vh; overflow-y: auto; }
                                #aiProvTxt { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
                                .ai-notif { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 1500; display: none; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 14px; background: #2d1b4e; border: 1px solid #8250df; color: #e6edf3; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
                                .ai-notif.show { display: flex; }
                                .ai-nic { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#8250df,#a371f7); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
                                .ai-mgr-btn { position: relative; }
                                .ai-mgr-btn.has-alert::after { content: ''; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #f85149; border: 2px solid #161b22; }
