.ai-panel { margin-bottom: 28px; padding: 24px; background: #fff; color: #192634; border: 1px solid #dbe5ef; border-radius: 18px; box-shadow: 0 8px 28px #16345708; }
.ai-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ai-heading h2 { margin: 6px 0; font-size: 22px; color:#152b42; }
.ai-muted { color:#52677b; font-size:14px; line-height:1.6; }
.ai-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.ai-panel button,.ai-dialog button { cursor:pointer; transition:background 160ms ease, box-shadow 160ms ease; }
.ai-panel .small-button,.ai-dialog .small-button { background:#f0f5fa; color:#254460; border:1px solid #d9e3ed; }
.ai-primary { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:10px 18px; border:0; border-radius:10px; background:#1269dc; color:#fff; font:inherit; font-weight:650; text-decoration:none; cursor:pointer; }
.ai-primary:hover { background:#085abe; box-shadow:0 0 0 4px #1275ee12; }
.ai-panel button:focus-visible,.ai-dialog :is(button,a,input,select):focus-visible { outline:3px solid #008dcc; outline-offset:3px; }
.ai-connections { margin-top:22px; }
.ai-free-plan { margin:20px 0 26px; padding:20px; border:1px solid #d6e5f6; border-radius:14px; background:#f5f9ff; }
.ai-free-plan.is-active { border-color:#86b5ed; box-shadow:inset 3px 0 #1269dc; }
.ai-free-plan h3 { margin:6px 0 0; font-size:19px; color:#152b42; }
.ai-free-plan .ai-heading { align-items:flex-start; }
.ai-free-plan .ai-badge { flex-shrink:0; }
.ai-free-balance { display:flex; align-items:baseline; flex-wrap:wrap; gap:7px; margin:20px 0 10px; line-height:1.5; color:#30465b; }
.ai-free-balance strong { color:#135fbf; font-size:30px; }
.ai-free-plan progress { display:block; width:100%; height:8px; overflow:hidden; border:0; border-radius:8px; background:#dce8f6; accent-color:#1269dc; }
.ai-free-plan progress::-webkit-progress-bar { background:#dce8f6; border-radius:8px; }
.ai-free-plan progress::-webkit-progress-value { background:#1269dc; border-radius:8px; }
.ai-free-plan progress::-moz-progress-bar { background:#1269dc; border-radius:8px; }
.ai-free-reset,.ai-free-provider { font-size:12px; overflow-wrap:anywhere; }
.ai-free-plan .ai-free-reset { margin-top:10px; }
.ai-personal-heading { margin:0; color:#152b42; font-size:17px; }
.ai-connection { display:flex; align-items:center; gap:14px; flex-wrap:wrap; border-top:1px solid #e1e9f1; padding:18px 0; }
.ai-connection:last-child { padding-bottom:0; }
.ai-identity { flex:1; min-width:180px; display:flex; flex-direction:column; gap:5px; overflow-wrap:anywhere; }
.ai-badge { border-radius:20px; padding:5px 10px; font-size:12px; background:#edf2f7; color:#52677b; }
.is-active .ai-badge { background:#ddf5eb; color:#17624c; }
.ai-empty { padding:22px; text-align:center; border:1px dashed #cad7e5; border-radius:12px; color:#52677b; }
.ai-feedback { color:#864019; font-size:14px; line-height:1.5; }
.ai-feedback:empty { display:none; }
.ai-connection .ai-feedback { flex-basis:100%; margin:0; }
.ai-dialog { width:min(520px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); overflow:auto; padding:24px; border:1px solid #dbe5ef; border-radius:18px; color:#192634; background:#fff; box-shadow:0 24px 90px #152e4540; }
.ai-dialog::backdrop { background:#10283e66; }
.ai-dialog-body { margin-top:18px; }
.ai-dialog-body .ai-primary + p { margin-top:16px; }
.ai-dialog label { display:block; margin:16px 0 7px; font-size:14px; font-weight:600; color:#30465b; }
.ai-dialog :is(input,select) { width:100%; box-sizing:border-box; min-height:44px; border:1px solid #c9d6e3; border-radius:9px; padding:10px; background:#fff; color:#192634; font:inherit; }
.ai-device-code { display:block; padding:22px; margin:18px 0; border:1px solid #bcd8ff; border-radius:12px; background:#eff6ff; text-align:center; font-size:30px; letter-spacing:3px; color:#135fbf; overflow-wrap:anywhere; user-select:all; }
.ai-panel button:disabled,.ai-dialog button:disabled { opacity:.55; cursor:wait; }
@media(max-width:600px) { .ai-panel { padding:18px; } .ai-connection>.ai-actions { width:100%; } .ai-heading h2 { font-size:20px; } .ai-dialog { padding:18px; } .ai-free-plan { padding:16px; } .ai-free-plan .ai-heading { flex-wrap:wrap; gap:10px; } }
@media(prefers-reduced-motion:reduce) { .ai-panel button,.ai-dialog button { transition:none; } }
