/* ---- V1.44 OneStop's own AI (the shared AI service, Server\Ai\AiService.cs): Claude usage > OneStop's AI (cu-setup,
   Client\Apps\ClaudeUsage\ClaudeUsageOneStopPage.razor), a company's AI spend (admin-sub, admin-ai-features,
   Client\Apps\Admin\CompanyPage.razor), Support's urgent words (sup-urgent, Client\Apps\Support\TicketPage.razor; V1.74: the
   triage and the reply draft are in the ONE AI panel's frame and note, os.css). The theme's tokens only, so light and dark
   both work. ---- */

/* Claude usage > OneStop's AI: what is set up, as a row of states */
.cu-setup { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.cu-setup .status { font-size: 0.8rem; }

/* Administration > Clients > a company: its AI spend under its switch */
.admin-sub { margin: 14px 0 4px; font-size: 0.92rem; }
.admin-ai-features { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.82rem; }
.admin-ai-features li { margin: 2px 0; overflow-wrap: anywhere; }

/* Support: the AI triage panel of a ticket, and a draft made without the AVEVA documentation */
.sup-urgent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 4px; font-size: 0.82rem; color: var(--warn); }
.sup-urgent .sup-chip { background: var(--warn-soft); color: var(--warn); }

/* V1.62 (AI platform v2): a streamed AI answer (Client\Services\AiStreamClient.cs): the caret while Claude writes, the line of
   what it does now (a web search, the AVEVA documentation), the actions under an answer (copy, useful / not useful) */
.ai-caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; border-radius: 2px;
    background: currentColor; opacity: 0.55; animation: ai-caret 1s steps(2, start) infinite; }
@keyframes ai-caret { to { visibility: hidden; } }
.ai-stream-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ai-actions .spacer { flex: 1 1 auto; }
.ai-actions .btn.active { border-color: var(--brand-gold); background: color-mix(in srgb, var(--brand-gold) 16%, transparent); }
@media (prefers-reduced-motion: reduce) { .ai-caret { animation: none; } }

/* Administration > Platform switches (Apps\Admin\PlatformSwitchesPage.razor) */
.psw-table td.on { color: var(--good-text); font-weight: 600; }
.psw-table td.off { color: var(--muted); }
.psw-table td.why { color: var(--muted); font-size: 0.85rem; }
.psw-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.psw-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; }
/* V1.62: the two servers side by side (the website and the local API): the value of a server where the switch does not act is
   a muted dash, a switch the two servers read each for itself and set differently is marked */
.psw-table td.na { color: var(--muted); opacity: 0.6; }
.psw-table td.unknown { color: var(--warn); }
.psw-table td.where { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.psw-table tr.differs td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.psw-differs { color: var(--warn); margin-left: 4px; }
.psw-servers { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

/* V1.74: Administration > AI evaluation (Client\Apps\Admin\AiEvalPage.razor) */
.aie-kpis { margin: 10px 0 14px; }
.aie-table td.num, .aie-table th.num { text-align: right; white-space: nowrap; }
.aie-table tr.aie-worse td { background: var(--os-bad-soft); }
.aie-table tr.aie-better td:first-child { border-left: 3px solid var(--os-good); }
.aie-table tr.aie-selected td { background: var(--os-neutral-soft); }
.aie-table tr.aie-details td { background: var(--os-surface); }
.aie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.aie-progress { flex: 1 1 200px; max-width: 420px; }
.aie-problems { margin: 6px 0 0; padding-left: 18px; }
.aie-facts { margin: 4px 0 8px; padding-left: 0; list-style: none; font-size: 0.88rem; }
.aie-facts li.ok { color: var(--os-good-text); }
.aie-facts li.ko { color: var(--os-bad); }
.aie-fact-icon { vertical-align: middle; }
.aie-answer { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; margin: 0; padding: 10px 12px; border-radius: 8px;
  background: var(--os-neutral-soft); font-size: 0.85rem; }

/* V1.74 (security plan 13.11) Claude usage > OneStop's AI: the monthly AI spending cap (Client\Apps\ClaudeUsage\AiPlatformCapPanel.razor):
   the month's spend, the cap and the share used, a meter with its 80% mark (os-meter of the design system), the edit for the
   app's administrators. The theme's tokens only. */
.cu-cap .status.warn { background: var(--os-warn-soft); color: var(--os-warn-text); }
.cu-cap--warning { border-color: var(--os-warn); }
.cu-cap--reached { border-color: var(--os-bad); }
.cu-cap-figures { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 4px 0 10px; }
.cu-cap-figures > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cu-cap-num { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.cu-cap-meter { margin: 4px 0 12px; }
.cu-cap--warning .cu-cap-meter > span { background: var(--os-warn); }
.cu-cap--reached .cu-cap-meter > span { background: var(--os-bad); }
.cu-cap-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 8px; }
.cu-cap-edit .az-input { width: 160px; max-width: 100%; }

/* V1.74 (security plan 13.10) My company > Security: the company's AI features (Client\Apps\Company\CompanySecurityPage.razor) */
.co-ai-figures { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 8px; }
.co-ai-figures > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-ai-num { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
