/* AI Usage: reuses the shared dashboard-card surfaces, shared buttons and the shared pager (like Real Traffic). */
#ai-usage-view main { display: flex; flex-direction: column; gap: 20px; min-width: 0; overflow-wrap: anywhere; }
#ai-usage-view main > .dashboard-card { margin: 0; }
#ai-usage-view .dashboard-card h2 { margin-top: 0; color: #16324f; }
#ai-usage-view .dashboard-card p { min-height: 0; }
#ai-usage-error:empty { display: none; }
.ai-usage-intro p:first-child { margin-top: 0; }
.ai-usage-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ai-usage-figure { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.ai-usage-figure-label { font-size: 14px; color: #4b5563; }
.ai-usage-figure-value { font-size: 28px; color: #16324f; }
.ai-usage-figure-note { font-size: 13px; color: #374151; }
.ai-usage-empty { color: #4b5563; }
.ai-usage-table-wrap { overflow-x: auto; }
.ai-usage-table { width: 100%; border-collapse: collapse; font-size: 14px; overflow-wrap: normal; word-break: normal; }
.ai-usage-table th, .ai-usage-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
.ai-usage-table th { color: #16324f; font-weight: 600; }
.ai-usage-table td:not(:first-child), .ai-usage-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.ai-usage-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.ai-usage-filters label { font-size: 14px; color: #374151; }
.ai-usage-filters select { min-width: 0; max-width: 100%; }
.ai-usage-failed { display: inline-flex; align-items: center; gap: 6px; }
.ai-usage-list { display: flex; flex-direction: column; gap: 10px; }
.ai-usage-call { padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.ai-usage-call-failed { border-color: #f5c2c0; background: #fff8f7; }
.ai-usage-call-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: #16324f; }
.ai-usage-call-meta { margin: 4px 0 0; font-size: 13px; color: #4b5563; }
.ai-usage-reason { margin: 6px 0 0; font-size: 14px; color: #8a1c14; }
.ai-usage-status { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.ai-usage-status.is-ok { background: #e7f5ec; color: #1d6b3a; }
.ai-usage-status.is-failed { background: #fde8e7; color: #8a1c14; }
@media (max-width: 600px) {
  .ai-usage-figure-value { font-size: 24px; }
  .ai-usage-filters select { width: 100%; }
  .ai-usage-table { font-size: 13px; }
  .ai-usage-table th, .ai-usage-table td { padding: 8px 6px; }
  .ai-usage-table { table-layout: fixed; }
  .ai-usage-table th:first-child { width: 40%; }
  .ai-usage-table th:not(:first-child), .ai-usage-table td:not(:first-child) { white-space: normal; }
}
