.ai-admin-container { max-width: 1600px; }

.ai-admin-list-table td {
    vertical-align: middle;
    font-size: 13px;
}

.ai-admin-list-table tbody tr { cursor: pointer; }
.ai-admin-list-table tbody tr:hover { background-color: #f5f5f5; }

.ai-admin-list-table td.preview {
    max-width: 380px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
}

.ai-filter-panel {
    border-right: 1px solid #eee;
    padding-right: 18px;
}
.ai-filter-panel label { font-size: 12px; color: #666; margin-bottom: 2px; }

.ai-admin-root .tab-content { border-top: 0; }

.ai-admin-raw {
    max-height: 70vh;
    overflow: auto;
    font-size: 12px;
    background: #f8f8f8;
}

.ai-flag {
    display: inline-block;
    padding: 1px 6px;
    margin-right: 3px;
    font-size: 11px;
    border-radius: 3px;
    background: #f0ad4e;
    color: #fff;
    text-transform: lowercase;
}
.ai-flag.high-cost { background: #d9534f; }
.ai-flag.high-input { background: #d9534f; }
.ai-flag.context-pressure { background: #ec971f; }
.ai-flag.tool-bloat { background: #e67c00; }

/* Detail drawer */
.ai-run {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 14px;
    background: #fff;
}
.ai-run-header {
    padding: 10px 14px;
    background: #f7f7f7;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.ai-run-header .title { font-weight: 600; }
.ai-run-body { padding: 10px 14px; }

.ai-iteration {
    border-left: 3px solid #337ab7;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: #fafafa;
}
.ai-iteration.stop-tool_use { border-left-color: #8a6d3b; }
.ai-iteration.stop-end_turn { border-left-color: #5cb85c; }

.ai-iter-head { font-size: 13px; color: #555; }
.ai-iter-head .num { font-weight: 600; color: #000; }
.ai-iter-head .tokens { float: right; font-family: monospace; font-size: 12px; }

.ai-tool-call {
    margin: 8px 0;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
}
.ai-tool-call .tc-name { font-weight: 600; font-family: monospace; color: #337ab7; }
.ai-tool-call.failed .tc-name { color: #d9534f; }
.ai-tool-call .tc-size { color: #999; float: right; font-family: monospace; }
.ai-tool-call pre {
    font-size: 11px;
    max-height: 260px;
    margin: 4px 0 0 0;
    padding: 6px;
    background: #fafafa;
}

.ai-collapsible-head { cursor: pointer; user-select: none; color: #337ab7; font-size: 12px; }
.ai-collapsible-body { display: none; margin-top: 4px; }
.ai-collapsible-body.open { display: block; }

.ai-section-label { font-size: 11px; text-transform: uppercase; color: #888; margin-top: 6px; }
.ai-section-value { font-family: monospace; font-size: 12px; white-space: pre-wrap; }

#stats-summary .metric { display: inline-block; margin-right: 24px; }
#stats-summary .metric .label { color: #888; font-size: 12px; display: block; }
#stats-summary .metric .value { font-size: 18px; font-weight: 600; }

/* By default admin-only elements are hidden until auth.js flips body.is-admin */
/* Selector must tie Bootstrap's `.nav>li{display:block}` specificity (0,1,1) or it loses. */
li.admin-show { display: none; }
body.is-admin li.admin-show { display: list-item; }
