/* ai-audit.css — Admin AI Grounding Audit view (diagnostic annotation, v1).
   See docs/features/ai_grounding_fidelity_audit/spec.md.
   Note: deliberately uses --border-default throughout, not --border-subtle
   (finance.css's own token) -- --border-subtle is not defined anywhere in
   variables.css and silently drops the whole border shorthand in both
   themes (same root cause as the earlier filter-bar/guardian-section
   dark-mode fixes this session). */

.aiga-page {
    padding: var(--space-6) var(--space-8);
    max-width: 960px;
}

.aiga-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.aiga-heading {
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--fg-primary);
    margin: 0;
}

.aiga-desc {
    font-size: var(--text-sm);
    color: var(--fg-secondary);
    line-height: var(--leading-relaxed);
    max-width: 70ch;
    margin-bottom: var(--space-6);
}

.aiga-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.aiga-section-head {
    margin-bottom: var(--space-4);
}

.aiga-section-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--fg-primary);
    margin: 0;
}

.aiga-section-desc {
    font-size: var(--text-sm);
    color: var(--fg-secondary);
    line-height: var(--leading-relaxed);
}

/* ── Run controls ─────────────────────────────────────────────────────── */

.aiga-run-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
}

.aiga-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    width: 100%;
    max-width: 420px;
}

.aiga-field-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--fg-secondary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.aiga-field-input {
    width: 120px;
    text-transform: none;
    font-weight: var(--weight-normal);
}

.aiga-field-hint {
    font-size: var(--text-xs);
    color: var(--fg-muted);
    line-height: var(--leading-relaxed);
    max-width: 32ch;
}

.aiga-status {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
}

.aiga-status--error {
    color: var(--color-danger);
}

/* ── Report ───────────────────────────────────────────────────────────── */

.aiga-summary-bar {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
    font-size: var(--text-sm);
    color: var(--fg-secondary);
}

.aiga-stat--success strong { color: var(--color-success); }
.aiga-stat--warning strong { color: var(--color-warning); }
.aiga-stat--danger strong  { color: var(--color-danger); }

.aiga-table-wrap {
    overflow-x: auto;
    margin-bottom: var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.aiga-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.aiga-table th {
    text-align: left;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface-alt);
    font-weight: var(--weight-semibold);
    color: var(--fg-secondary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    border-bottom: 1px solid var(--border-default);
}

.aiga-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-default);
    color: var(--fg-primary);
}

.aiga-table tbody tr:last-child td { border-bottom: none; }

.aiga-subsection-title {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--fg-primary);
    margin: var(--space-2) 0 var(--space-1);
}

.aiga-examples {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-default);
}

.aiga-example-list {
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.aiga-example-item {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
}

.aiga-examples--confirmed .aiga-example-item {
    border-left: 3px solid var(--color-danger);
}

.aiga-examples--unconfirmed .aiga-example-item {
    border-left: 3px solid var(--color-warning);
}

.aiga-examples--cleared .aiga-example-item {
    border-left: 3px solid var(--color-success);
}

.aiga-example-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: var(--text-xs);
    color: var(--fg-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-2);
}

.aiga-example-kind {
    font-weight: var(--weight-semibold);
    color: var(--fg-secondary);
}

.aiga-example-annotation {
    font-size: var(--text-sm);
    color: var(--fg-primary);
    font-style: italic;
    margin: 0 0 var(--space-1);
}

.aiga-example-fact {
    font-size: var(--text-xs);
    color: var(--fg-muted);
    font-family: monospace;
    word-break: break-word;
    margin: 0 0 var(--space-1);
}

.aiga-example-reason {
    font-size: var(--text-sm);
    color: var(--fg-secondary);
    margin: 0;
}

.aiga-empty {
    font-size: var(--text-sm);
    color: var(--fg-muted);
    margin: 0;
}
