/* Scoped to the administrator AI center. The main list never changes height after data arrives. */
body.ai-center-active { overflow: hidden; }
body.ai-center-active .main { overflow: hidden; min-width: 0; box-sizing: border-box; }
body.ai-center-active .project-context-content { overflow: hidden; min-height: 0; }
#ai-center { --ac-green:#25635b; --ac-line:#dce5e0; --ac-ink:#253d36; --ac-muted:#71827b; position:relative; display:flex; flex-direction:column; height:100%; min-height:0; min-width:0; overflow:hidden; color:var(--ac-ink); font-size:13px; line-height:1.45; }
#ai-center [hidden] { display:none !important; }
#ai-center *, #ai-center *::before, #ai-center *::after { box-sizing:border-box; }
#ai-center h1, #ai-center h2, #ai-center h3, #ai-center p { margin:0; }
#ai-center button, #ai-center input, #ai-center select, #ai-center textarea { font:inherit; box-shadow:none; }
#ai-center button { min-height:32px; padding:5px 11px; border:1px solid #cbdad3; border-radius:6px; background:#fff; color:var(--ac-green); cursor:pointer; white-space:nowrap; }
#ai-center button:hover { background:#f0f6f2; }
#ai-center button:disabled { opacity:.5; cursor:default; }
#ai-center button:focus-visible, #ai-center input:focus-visible, #ai-center select:focus-visible, #ai-center textarea:focus-visible, #ai-center summary:focus-visible { outline:2px solid #388b7b; outline-offset:2px; }
#ai-center button.ac-primary { background:var(--ac-green); border-color:var(--ac-green); color:#fff; }
#ai-center button.ac-danger { color:#ab4133; }
#ai-center input:not([type="checkbox"]), #ai-center select, #ai-center textarea { width:100%; min-width:0; min-height:34px; padding:6px 9px; background:#fff; border:1px solid #d9e2dc; color:#283d35; border-radius:6px; }
#ai-center textarea { min-height:100px; max-height:250px; resize:vertical; line-height:1.6; }
#ai-center input[type="checkbox"] { width:15px; height:15px; min-height:0; accent-color:var(--ac-green); }
.ac-heading { display:flex; flex:0 0 auto; justify-content:space-between; align-items:center; gap:12px; padding:4px 0 13px; }
#ai-center .ac-heading h1 { font-size:23px; line-height:1.3; color:var(--ui-color-text-body,var(--ac-ink)); }
.ac-heading p { color:var(--ui-color-text-secondary,var(--ac-muted)); font-size:12px; margin-top:3px !important; }
.ac-toolbar { flex:0 0 auto; display:flex; align-items:center; gap:8px; padding:12px; background:white; border:1px solid var(--ac-line); border-radius:9px 9px 0 0; }
#ai-center .ac-search { max-width:340px; flex:1 1 220px; }
#ai-center .ac-category { flex:0 0 140px; width:140px; }
.ac-toolbar-spacer { flex:1 1 auto; }
.ac-list { flex:1 1 auto; min-height:0; overflow:hidden; background:white; border:1px solid var(--ac-line); border-top:0; border-bottom:0; }
.ac-columns { display:grid; grid-template-columns:minmax(150px,1.05fr) minmax(160px,1.2fr) minmax(170px,1.3fr) 224px; gap:14px; align-items:center; padding:0 17px; min-width:0; }
.ac-table-head { height:43px; background:#f4f7f4; border-bottom:1px solid var(--ac-line); color:#75847c; font-size:12px; }
.ac-row { height:64px; border-bottom:1px solid #edf1ed; }
.ac-row > div { min-width:0; overflow:hidden; }
.ac-row strong { font-size:14px; font-weight:600; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ac-row small { display:block; color:var(--ac-muted); font-size:11px; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ac-models-text, .ac-status-text { display:block; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.ac-status-text { font-size:12px; }
.ac-status-text.ac-bad { color:#ac483b; }
.ac-row .ac-actions { display:flex; align-items:center; justify-content:flex-end; gap:13px; overflow:visible; }
#ai-center button.ac-link { border:0; background:transparent; padding:4px 0; min-height:30px; font-size:12px; }
#ai-center button.ac-link:hover { text-decoration:underline; }
.ac-pagination { display:flex; flex:0 0 50px; height:50px; justify-content:space-between; align-items:center; gap:10px; padding:8px 14px; background:#fff; border:1px solid var(--ac-line); border-radius:0 0 9px 9px; }
.ac-pagination span { color:var(--ac-muted); font-size:12px; }
.ac-pagination nav { display:flex; align-items:center; gap:10px; }
.ac-empty { display:flex; align-items:center; justify-content:center; height:160px; padding:20px; color:var(--ac-muted); text-align:center; }
.ac-toast { position:absolute; z-index:20; top:11px; right:13px; max-width:min(540px,calc(100% - 28px)); display:flex; align-items:center; gap:12px; padding:11px 15px; background:#edf7ef; border:1px solid #c3ddce; border-radius:8px; box-shadow:0 8px 26px #263b2e15; color:#255e43; }
.ac-toast.ac-error { color:#9d3b2b; border-color:#ebc8bf; background:#fff5f1; }
#ai-center .ac-toast button { border:0; min-height:24px; padding:0 3px; background:transparent; font-size:18px; color:inherit; }
.ac-shade { position:absolute; inset:0; z-index:10; display:flex; justify-content:flex-end; background:#203b2926; }
.ac-drawer { display:flex; flex-direction:column; width:min(710px,100%); height:100%; min-height:0; min-width:0; background:#fff; border-left:1px solid #d2ded5; box-shadow:-12px 0 36px #183c2520; }
.ac-drawer.ac-drawer-wide { width:min(860px,100%); }
.ac-drawer-head { display:flex; flex:0 0 auto; align-items:center; gap:12px; justify-content:space-between; padding:18px 21px 14px; border-bottom:1px solid var(--ac-line); }
#ai-center .ac-drawer-head h2 { font-size:18px; }
.ac-drawer-head p { color:var(--ac-muted); font-size:12px; margin-top:4px !important; }
#ai-center .ac-close { font-size:23px; line-height:1; width:32px; min-height:32px; border:0; padding:0; color:#738177; }
.ac-drawer-body { flex:1 1 auto; min-height:0; min-width:0; padding:17px 21px; overflow:auto; overscroll-behavior:contain; }
.ac-drawer-foot { display:flex; flex:0 0 auto; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 21px; border-top:1px solid var(--ac-line); background:#fcfdfb; }
.ac-drawer-foot .ac-foot-note { margin-right:auto; font-size:11px; color:var(--ac-muted); }
.ac-section { padding-bottom:17px; margin-bottom:17px; border-bottom:1px solid #e6ece6; }
.ac-section:last-child { margin-bottom:0; border-bottom:0; }
#ai-center .ac-section h3 { font-size:14px; margin-bottom:10px; }
.ac-field { display:block; margin:0 0 13px; }
.ac-field > span { display:block; font-size:12px; font-weight:600; margin-bottom:5px; color:#486151; }
.ac-field small, .ac-note { display:block; color:var(--ac-muted); font-size:12px; line-height:1.65; }
.ac-field small { margin-top:4px; }
.ac-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.ac-wide { grid-column:1 / -1; }
.ac-impact { padding:9px 12px; background:#eff6f0; border:1px solid #d9e6db; border-radius:6px; font-size:12px; margin:0 0 16px; line-height:1.75; }
.ac-warning { background:#fff7e9; border:1px solid #eeddbf; color:#82623a; border-radius:6px; padding:10px 12px; margin:0 0 13px; font-size:12px; line-height:1.65; }
.ac-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:15px; }
#ai-center .ac-tabs button { font-size:12px; }
#ai-center .ac-tabs button[aria-selected="true"] { background:#eaf3ec; border-color:#80ad96; }
.ac-inline-actions { display:flex; align-items:center; gap:12px; margin-top:8px; }
.ac-checks { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.ac-check { display:inline-flex; align-items:center; gap:6px; font-size:12px; }
.ac-model-card { border:1px solid var(--ac-line); padding:13px; border-radius:7px; margin-bottom:10px; }
.ac-model-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ac-model-card-head strong { font-size:14px; }
.ac-model-card small { display:block; margin-top:4px; font-size:11px; color:var(--ac-muted); word-break:break-all; }
.ac-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.ac-chip { background:#f1f5ef; color:#577261; padding:2px 6px; border-radius:4px; font-size:10px; }
.ac-readonly { border:1px solid var(--ac-line); border-radius:6px; background:#f6f8f5; padding:10px; white-space:pre-wrap; overflow:auto; max-height:190px; word-break:break-word; font:12px/1.6 ui-monospace,SFMono-Regular,monospace; }
.ac-details { margin:10px 0; }
.ac-details summary { cursor:pointer; color:#577363; font-size:12px; padding:5px 0; }
.ac-details pre { margin-top:6px; }
.ac-history { display:flex; gap:8px; align-items:center; margin-top:10px; }
.ac-history select { flex:1; }
.ac-record-toolbar { display:flex; gap:8px; margin-bottom:12px; }
.ac-record { display:block; width:100%; padding:13px !important; margin-bottom:9px; text-align:left; white-space:normal !important; }
.ac-record-title { display:flex; gap:10px; justify-content:space-between; align-items:center; }
.ac-record-title strong { font-size:13px; color:#2a4434; }
.ac-record-title span { font-size:12px; font-weight:normal; color:#6f826f; white-space:nowrap; }
.ac-record p { color:#728071; margin-top:5px !important; font-size:11px; }
.ac-record-status { color:#2d6a4b; font-size:12px; margin-top:6px; }
.ac-record-pages { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; }
.ac-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 14px; font-size:12px; margin:10px 0 15px; }
.ac-meta > div { min-width:0; overflow-wrap:anywhere; }
.ac-meta b { color:#7a897d; font-weight:normal; margin-right:6px; }
.ac-call-row { display:flex; gap:12px; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #e8eee7; }
.ac-call-row > div { min-width:0; }
.ac-call-row p { font-size:11px; color:var(--ac-muted); margin-top:3px !important; }
.ac-call-row strong { font-size:12px; }
.ac-selected-call { margin-top:18px; }
.ac-code { background:#f6f8f5; border:1px solid var(--ac-line); padding:12px; border-radius:6px; max-height:260px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:11px/1.65 ui-monospace,SFMono-Regular,monospace; }
.ac-call-error { margin:10px 0; color:#a84132; background:#fff5f0; padding:10px; border-radius:5px; overflow-wrap:anywhere; }
.ac-test-result { margin-top:12px; padding:10px; background:#f1f6f0; border-radius:6px; white-space:pre-wrap; word-break:break-word; font-size:12px; }
@media (max-width:1450px) {
  .ac-columns { grid-template-columns:minmax(135px,1fr) minmax(140px,1.1fr) minmax(145px,1.15fr) 202px; gap:10px; padding:0 13px; }
  .ac-row .ac-actions { gap:10px; }
  .ac-row strong { font-size:13px; }
  .ac-heading { padding-bottom:10px; }
  .ac-toolbar { padding:10px; }
}
@media (max-width:1100px) {
  .ac-columns { grid-template-columns:minmax(120px,1fr) minmax(115px,1fr) minmax(120px,1fr) 174px; gap:8px; padding:0 10px; }
  #ai-center button.ac-link { font-size:11px; }
  .ac-row .ac-actions { gap:8px; }
  #ai-center .ac-category { flex-basis:108px; width:108px; }
  .ac-toolbar { gap:6px; }
  #ai-center .ac-toolbar button { padding:5px 8px; font-size:12px; }
}
