/* AI models (build M6; restyled A4, build plan 2026-11-07-all). The buttons, chips, boxes,
   fields, previews and the ribbon are the shared parts (admin-ui.js, desk.css); this file
   only lays out the page's own blocks, with the Front Office's tokens. */

#view-aimodels .aipanel{display:grid;gap:var(--s-4);margin-top:var(--s-4);min-width:0}
#view-aimodels .aipanel > *{margin-block:0}
#view-aimodels fieldset{border:0;padding:0;margin:0;min-width:0}
#view-aimodels .error{color:var(--stop)}

/* The health light: "AI models" and its chip on one line, what needs a look under it. */
#view-aimodels .aistatus{display:grid;gap:var(--s-2)}
#view-aimodels .ailight{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-2);margin:0;font-weight:600}
#view-aimodels .ailist{margin:0;padding-left:var(--s-5);display:grid;gap:var(--s-1)}

/* A card per provider: the name and its mode chip, then its lines and actions. */
#view-aimodels .aicards{grid-template-columns:repeat(auto-fill,minmax(22rem,1fr));gap:var(--s-4)}
#view-aimodels .aicard p{margin:0}
#view-aimodels .aicard p.error{font-size:var(--text-sm)}
#view-aimodels .aihead{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-2)}
#view-aimodels .aislot:empty{display:none}
#view-aimodels .aiadd{display:grid;justify-items:start}
#view-aimodels .aiadd > .card{justify-self:stretch;max-width:40rem}

/* Alert recipients: an address and its small Remove on each line. */
#view-aimodels .airec{max-width:40rem}
#view-aimodels .airecs{list-style:none;margin:0;padding:0;display:grid;gap:var(--s-2)}
#view-aimodels .airow{display:flex;align-items:center;justify-content:space-between;gap:var(--s-2)}

/* The models and assignments tables. */
#view-aimodels .aitable th,#view-aimodels .aitable td{vertical-align:top;text-align:left}
#view-aimodels .aitable .note{margin:var(--s-1) 0 0}
#view-aimodels .aitable td .row-actions{justify-content:flex-start;margin-top:var(--s-1)}
#view-aimodels .aitable select{font:inherit;max-width:18rem;padding:var(--s-1) var(--s-2);
  border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--surface);color:var(--ink)}
#view-aimodels .aiprices{display:flex;flex-wrap:wrap;gap:var(--s-4)}
#view-aimodels .aiprices .field{margin-top:0}
#view-aimodels .aiprices input{max-width:10rem}

/* The server's warnings in the preview, and the answers of Try the chosen models. */
#view-aimodels .aiwarn{color:var(--wait);font-weight:600}
#view-aimodels .aitried{display:grid;gap:var(--s-1);margin-top:var(--s-3)}
#view-aimodels .aitried p{margin:0}
#view-aimodels .aianswer{margin:0;padding:var(--s-1) var(--s-3);border-left:3px solid var(--line);white-space:pre-wrap}
