/* Admin history only. Never targets the floating AI Dubbing assistant. */
:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai #adminAIFilters > button[type="submit"] {
  background: var(--ps-button-bg);
  color: var(--ps-button-text);
  border-color: var(--ps-button-border);
  box-shadow: var(--ps-button-shadow);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai #adminAIFilters > button[type="submit"]:hover:not(:disabled) {
  background: var(--ps-button-hover);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is(.admin-ai-stat, .admin-ai-step, table, #adminAIDetail) {
  background: var(--ps-bg-soft);
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is(.admin-ai-stat strong, #adminAIDetailTitle, #adminAIFinance h4, #adminAISteps h4) {
  color: var(--ps-ink);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is(th, td) {
  border-color: var(--ps-line);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is(code, .admin-ai-step > strong) {
  color: var(--ps-gold-light);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai pre {
  padding: 10px;
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  background: var(--ps-bg);
  color: var(--ps-text);
  overflow-wrap: anywhere;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai #adminAISteps > .admin-ai-step[data-ps-ai-status] {
  border-color: var(--ps-admin-ai-state, var(--ps-line));
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai [data-ps-ai-status="succeeded"] {
  --ps-admin-ai-state: #86efac;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is([data-ps-ai-status="partial"], [data-ps-ai-status="uncertain"], [data-ps-ai-status="refused"]) {
  --ps-admin-ai-state: var(--ps-gold-mid);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is([data-ps-ai-status="failed"], [data-ps-ai-state="error"]) {
  --ps-admin-ai-state: var(--ps-admin-error);
  color: var(--ps-admin-error);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai #adminAIHistoryBody tr[data-ps-ai-status] > td:nth-child(4) {
  color: var(--ps-admin-ai-state, var(--ps-muted));
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is(#adminAILoadStatus, #adminAIEmpty) {
  color: var(--ps-muted);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai #adminAILoadStatus[data-ps-ai-state="error"] {
  color: var(--ps-admin-error);
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai :is(.admin-ai-stat, .admin-ai-filters label) {
  min-width: 0;
  max-width: 100%;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai .admin-ai-pagination {
  flex-wrap: wrap;
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai .admin-ai-steps {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

:where(html[data-ps-theme="studio"][data-ps-window="hub"][data-ps-screen="app"]) #adminTab_assistant_ai #adminAISteps > :is(h4, pre) {
  grid-column: 1 / -1;
}
