/* Shared benchmark admin styles. Minimal, dense, functional — not decorative. */

/* ---- Sub-nav ---- */
.bench-subnav {
    display: flex;
    gap: 4px;
    padding: 6px 0 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid #ddd;
}
.bench-subnav a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    padding: 4px 12px;
    border-radius: 4px 4px 0 0;
}
.bench-subnav a:hover { color: #007bff; }
.bench-subnav a.active {
    color: #111;
    background: #eef3f8;
    border-bottom: 2px solid #007bff;
}

/* ---- Toasts ---- */
.bench-toast-container {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 380px;
}
.bench-toast {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    opacity: 0.97;
    white-space: pre-wrap;
    word-break: break-word;
}
.bench-toast.success { background: #2e7d32; }
.bench-toast.error   { background: #c62828; }
.bench-toast.info    { background: #37474f; }

/* ---- Scoring atom ---- */
.bench-scores { display: flex; flex-direction: column; gap: 8px; }
.bench-scores-group { }
.bench-scores-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    margin: 2px 0;
}
.bench-score {
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 6px 8px;
    background: #fafafa;
}
.bench-score-head {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.bench-score-head .kind {
    color: #888;
    font-weight: 500;
}
.bench-score-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
}
.bench-metric { display: inline-flex; gap: 4px; }
.bench-metric .name { color: #666; }
.bench-metric .value { font-weight: 600; color: #111; font-variant-numeric: tabular-nums; }
.bench-score details { margin-top: 4px; }
.bench-score details summary {
    font-size: 11px;
    color: #777;
    cursor: pointer;
}
.bench-score details pre {
    margin: 4px 0 0;
    font-size: 11px;
    background: #f0f0f0;
    padding: 4px 6px;
    border-radius: 3px;
    overflow-x: auto;
}

/* ---- Busy buttons ---- */
button[data-busy="1"] { opacity: 0.6; cursor: progress; }

/* ---- Tabs ---- */
.bench-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 12px;
}
.bench-tab {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: none;
    border: none;
    padding: 6px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.bench-tab:hover { color: #007bff; }
.bench-tab.active {
    color: #111;
    background: #eef3f8;
    border-bottom: 2px solid #007bff;
}

/* ---- Toolbar / generic ---- */
.bench-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}
.bench-toolbar .spacer { margin-left: auto; }
.bench-muted { color: #888; font-size: 12px; }
.bench-dirty { color: #b26a00; font-size: 12px; }

/* ---- Detail split (Prompts) ---- */
.bench-detail-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}
.bench-detail-left, .bench-detail-right { display: flex; flex-direction: column; gap: 8px; }
.bench-detail-right { border-left: 1px solid #eee; padding-left: 14px; }
.bench-field-label { font-size: 11px; color: #888; }
#prompt-text { width: 100%; min-height: 70px; font-size: 13px; box-sizing: border-box; }

/* ---- Scorer authoring ---- */
.bench-authoring { display: flex; flex-direction: column; gap: 8px; }
.bench-auth-row { display: flex; align-items: center; gap: 8px; }
.bench-auth-label { font-size: 11px; color: #888; min-width: 90px; }
.bench-scorer-list {
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bench-scorer-item { font-size: 13px; }
.bench-scorer-head { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.bench-scorer-params { margin-left: 22px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.bench-param { font-size: 12px; color: #555; display: inline-flex; align-items: center; gap: 4px; }

/* ---- Reference statements ---- */
.bench-stmt-head { display: flex; align-items: center; gap: 8px; }
.bench-stmt-head .title { font-size: 11px; color: #888; margin-right: auto; }
.bench-stmt-list { display: flex; flex-direction: column; gap: 6px; }
.bench-stmt-item { position: relative; }
.bench-stmt-item textarea {
    width: 100%;
    min-height: 46px;
    font-size: 13px;
    box-sizing: border-box;
    padding-right: 26px;
    resize: vertical;
}
.bench-stmt-del {
    position: absolute;
    top: 4px;
    right: 4px;
    border: none;
    background: none;
    color: #b0b0b0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.bench-stmt-del:hover { color: #c62828; }

/* ---- Rubric rows (Catalog) ---- */
.bench-rubric-item { display: flex; flex-direction: column; gap: 4px; }
.bench-rubric-type { align-self: flex-start; font-size: 12px; }
.bench-stmt-head label { display: inline-flex; align-items: center; gap: 4px; }
.bench-stmt-head select { font-size: 12px; }

/* ---- Sets detail / membership ---- */
.bench-set-fields {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.bench-set-fields label { font-size: 11px; color: #888; display: flex; flex-direction: column; gap: 2px; }
.bench-set-fields input, .bench-set-fields select { font-size: 13px; }
#set-name { width: 200px; }
#set-desc { width: 320px; }
.bench-membership-head { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.bench-membership-head .title { font-size: 11px; color: #888; margin-right: auto; }
.bench-membership-list {
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 10px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
}
.bench-membership-schema {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-top: 6px;
}
.bench-membership-item { display: flex; align-items: center; gap: 6px; }
.bench-membership-item label { cursor: pointer; }

/* ---- Config panel (Standalone / Sets run) ---- */
.bench-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 16px;
    margin-bottom: 12px;
    max-width: 900px;
}
.bench-config label { font-size: 11px; color: #888; display: flex; flex-direction: column; gap: 3px; }
.bench-config select, .bench-config input { font-size: 13px; }

/* ---- Prompt-run detail atom ---- */
.bench-run-detail {
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
}
.bench-run-block { display: flex; flex-direction: column; gap: 3px; }
.bench-run-prompt { font-size: 13px; font-weight: 600; white-space: pre-wrap; }
.bench-run-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bench-chip {
    font-size: 11px;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 2px 9px;
    color: #333;
}
.bench-chip .k { color: #888; }
.bench-run-error {
    font-size: 12px;
    color: #7a1f1f;
    background: #fbeaea;
    border: 1px solid #f0c9c9;
    border-radius: 4px;
    padding: 6px 8px;
    white-space: pre-wrap;
}
.bench-run-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.bench-run-pre {
    white-space: pre-wrap;
    font-size: 12px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 6px 8px;
    max-height: 260px;
    overflow: auto;
}

/* ---- Rubric verdicts / answer status ---- */
.bench-verdict, .bench-answer-status {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 8px;
    padding: 1px 7px;
    margin-left: 6px;
    font-weight: 600;
}
.bench-verdict-yes { background: #e4f4e4; color: #1f7a1f; }
.bench-verdict-no { background: #fbeaea; color: #a52020; }
.bench-verdict-undecidable { background: #f2f0e4; color: #8a7a1f; }
.bench-answer-status { background: #eef0f2; color: #555; }
.bench-answer-answered { background: #e4f4e4; color: #1f7a1f; }
.bench-answer-no_answer { background: #f2f0e4; color: #8a7a1f; }
.bench-answer-error, .bench-answer-timeout { background: #fbeaea; color: #a52020; }
.bench-rubric-text { font-size: 12px; color: #444; white-space: pre-wrap; }
.bench-schema-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    max-height: 110px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
}
.bench-schema-picker label { flex-direction: row; align-items: center; gap: 4px; color: #333; }

/* ---- Results filters + inline row expand ---- */
.bench-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 14px;
    margin-bottom: 12px;
}
.bench-filters label { font-size: 11px; color: #888; display: flex; flex-direction: column; gap: 2px; }
.bench-filters select, .bench-filters input { font-size: 13px; }
.bench-open-btn {
    font-size: 11px;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
}
.bench-row-expand {
    padding: 8px 10px;
    background: #f7f9fb;
    border-top: 1px solid #e2e2e2;
}
