/* AI-instellingen (gebruikersmenu, alleen hoofdbeheerder): tabel en keuzehulp */
.aim-global { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0; }
.aim-global label { display: grid; gap: 4px; font-size: .8rem; color: var(--text-muted, #64748b); min-width: min(420px, 100%); }
.aim-global select, .aim-table select { padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--input-bg); color: var(--text); max-width: 100%; }
.aim-table-wrap { overflow-x: auto; }
.aim-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.aim-table th, .aim-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.aim-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #64748b); }
.aim-table td small { display: block; color: var(--text-muted, #64748b); font-size: .78rem; margin-top: 2px; }
.aim-table select { width: 100%; min-width: 260px; }
.aim-badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.aim-flash { background: #e0f2fe; color: #0369a1; }
.aim-flashlite { background: #dcfce7; color: #15803d; }
.aim-pro { background: #ede9fe; color: #6d28d9; }
.aim-haiku { background: #dcfce7; color: #15803d; }
.aim-sonnet { background: #e0f2fe; color: #0369a1; }
.aim-opus { background: #ede9fe; color: #6d28d9; }
.aim-geminiflashapp { background: #f1f5f9; color: #475569; }
.aim-guide { margin-top: 16px; }
.aim-guide summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
.aim-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.aim-kinds > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.aim-kinds b { display: block; margin-bottom: 4px; }
.aim-kinds span { font-size: .84rem; color: var(--text-muted, #64748b); }
@media (max-width: 700px) {
    .aim-table thead { display: none; }
    .aim-table, .aim-table tbody, .aim-table tr, .aim-table td { display: block; width: 100%; }
    .aim-table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
    .aim-table td { border: 0; padding: 3px 0; }
    .aim-table select { min-width: 0; }
    .aim-global label { min-width: 0; width: 100%; }
    .aim-global select { width: 100%; }
}

/* Venster */
.ais-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 23, .55); backdrop-filter: blur(4px); animation: aisFade .2s ease both; }
.ais-box { display: grid; grid-template-rows: auto 1fr auto; width: min(980px, 100%); max-height: min(92vh, 960px); overflow: hidden; border-radius: 16px;
           background: var(--card-bg, #fff); color: var(--text); box-shadow: 0 30px 80px rgba(2, 6, 23, .45); animation: aisIn .35s cubic-bezier(.2, .9, .25, 1.1) both; }
.ais-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; background: linear-gradient(120deg, #011e41, #0b3a6e 55%, #3730a3); }
.ais-head h2 { margin: 0; font-size: 1.1rem; color: #fff; }
.ais-head p { margin: 2px 0 0; font-size: .8rem; color: rgba(255, 255, 255, .72); }
.ais-head > div { margin-right: auto; }
.ais-orb { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; font-weight: 800; color: #fff;
           background: conic-gradient(from 0deg, #0ea5e9, #6366f1, #a855f7, #0ea5e9); box-shadow: 0 0 22px rgba(129, 140, 248, .7); }
.ais-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px; cursor: pointer; }
.ais-x:hover { background: rgba(255, 255, 255, .26); }
.ais-main { overflow: auto; padding: 16px 18px; }
.ais-sec { margin-bottom: 18px; }
.ais-sec h3 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted, #64748b); }
.ais-sec > select { width: min(520px, 100%); padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--input-bg); color: var(--text); }
.ais-key { display: flex; gap: 6px; max-width: 560px; }
.ais-key input { flex: 1; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--input-bg); color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.ais-note { margin: 6px 0 0; font-size: .8rem; color: var(--text-muted, #64748b); }
.ais-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
.ais-status { margin-right: auto; font-size: .85rem; color: var(--text-muted, #64748b); }
.ais-status.is-ok { color: #16a34a; } .ais-status.is-err, .ais-err { color: #dc2626; }
.ais-loading { display: flex; align-items: center; gap: 10px; padding: 30px 0; color: var(--text-muted, #64748b); }
.ais-loading span { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: #6366f1; border-radius: 50%; animation: aisSpin .8s linear infinite; }
@keyframes aisFade { from { opacity: 0; } }
@keyframes aisIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes aisSpin { to { transform: rotate(360deg); } }
