540 lines
13 KiB
CSS
540 lines
13 KiB
CSS
/* ══════════════════════════════════════════════════════════════
|
|
Commander AI Lab — ML Training Dashboard
|
|
Page-specific styles only; shared tokens & components in global.css
|
|
══════════════════════════════════════════════════════════════ */
|
|
|
|
/* ── Legacy variable aliases (used by training.js inline styles) ── */
|
|
:root {
|
|
--lab-bg: var(--bg);
|
|
--lab-surface: var(--surface-1);
|
|
--lab-border: var(--border);
|
|
--lab-accent: var(--accent);
|
|
--lab-accent-dim: var(--accent-dim);
|
|
--lab-text: var(--text);
|
|
--lab-text-dim: var(--text-secondary);
|
|
--lab-success: var(--success);
|
|
--lab-success-dim:var(--success-dim);
|
|
--lab-warning: var(--warning);
|
|
--lab-warning-dim:var(--warning-dim);
|
|
--lab-error: var(--error);
|
|
--lab-error-dim: var(--error-dim);
|
|
--lab-purple: var(--purple);
|
|
--lab-purple-dim: var(--purple-dim);
|
|
}
|
|
|
|
/* ── Status Cards (extend global .stat-card) ───────────────── */
|
|
.status-grid {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
}
|
|
|
|
.status-card {
|
|
text-align: center;
|
|
}
|
|
|
|
.status-card.active {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.status-card.success {
|
|
border-color: var(--success);
|
|
}
|
|
|
|
.card-icon {
|
|
font-size: 24px;
|
|
margin-bottom: var(--sp-2);
|
|
}
|
|
|
|
/* ── Panel heading with bottom border ──────────────────────── */
|
|
.panel > .panel-header {
|
|
padding-bottom: var(--sp-3);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
/* ── Training Controls Layout ──────────────────────────────── */
|
|
.train-controls {
|
|
padding-top: var(--sp-4);
|
|
}
|
|
|
|
.param-grid {
|
|
margin-bottom: var(--sp-3);
|
|
}
|
|
|
|
.train-options {
|
|
margin-bottom: var(--sp-4);
|
|
}
|
|
|
|
.train-actions {
|
|
display: flex;
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.btn-icon {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ── Tournament param grid (2 cols) ────────────────────────── */
|
|
.tourney-param-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.tourney-results-section {
|
|
margin-top: var(--sp-4);
|
|
}
|
|
|
|
/* ── Progress Sections ─────────────────────────────────────── */
|
|
.train-progress {
|
|
margin-top: var(--sp-5);
|
|
padding-top: var(--sp-4);
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.train-progress.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* ── Phase Badges ──────────────────────────────────────────── */
|
|
.phase-badge {
|
|
display: inline-block;
|
|
padding: 3px 10px;
|
|
border-radius: var(--radius-md);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.phase-badge.building { background: var(--warning-dim); color: var(--warning); }
|
|
.phase-badge.training { background: var(--accent-dim); color: var(--accent); }
|
|
.phase-badge.evaluating { background: var(--purple-dim); color: var(--purple); }
|
|
.phase-badge.done { background: var(--success-dim); color: var(--success); }
|
|
.phase-badge.error { background: var(--error-dim); color: var(--error); }
|
|
.phase-badge.starting { background: var(--accent-dim); color: var(--accent); }
|
|
.phase-badge.running { background: var(--accent-dim); color: var(--accent); }
|
|
.phase-badge.idle { background: var(--surface-3); color: var(--text-secondary); }
|
|
|
|
#progress-message,
|
|
#ppo-progress-message,
|
|
#tourney-progress-message {
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ── Progress Bar overrides (JS sets width + class) ────────── */
|
|
.progress-bar-container {
|
|
margin-bottom: var(--sp-2);
|
|
}
|
|
|
|
.progress-bar {
|
|
transition: width 0.5s var(--ease);
|
|
}
|
|
|
|
.progress-bar.done {
|
|
background: var(--success);
|
|
}
|
|
|
|
.progress-bar.error {
|
|
background: var(--error);
|
|
}
|
|
|
|
/* ── File List ─────────────────────────────────────────────── */
|
|
.file-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.file-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--sp-2) var(--sp-3);
|
|
background: var(--surface-0);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.file-name {
|
|
color: var(--text);
|
|
font-family: var(--font-mono);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.file-meta {
|
|
display: flex;
|
|
gap: var(--sp-4);
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.file-meta .badge {
|
|
display: inline-block;
|
|
padding: 2px var(--sp-2);
|
|
border-radius: var(--radius-md);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge-train { background: var(--accent-dim); color: var(--accent); }
|
|
.badge-val { background: var(--purple-dim); color: var(--purple); }
|
|
.badge-test { background: var(--success-dim); color: var(--success); }
|
|
|
|
/* ── Evaluation Results ────────────────────────────────────── */
|
|
.eval-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-4);
|
|
}
|
|
|
|
.eval-summary {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: var(--sp-3);
|
|
}
|
|
|
|
.eval-metric {
|
|
background: var(--surface-0);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--sp-3);
|
|
text-align: center;
|
|
}
|
|
|
|
.eval-metric-label {
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--text-secondary);
|
|
margin-bottom: var(--sp-1);
|
|
}
|
|
|
|
.eval-metric-value {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
color: #fff;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.eval-metric-value.good { color: var(--success); }
|
|
.eval-metric-value.ok { color: var(--warning); }
|
|
.eval-metric-value.bad { color: var(--error); }
|
|
|
|
/* ── Per-class Accuracy Table ──────────────────────────────── */
|
|
.class-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.class-table th {
|
|
text-align: left;
|
|
padding: var(--sp-2) var(--sp-3);
|
|
border-bottom: 1px solid var(--border);
|
|
color: var(--text-secondary);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.class-table td {
|
|
padding: var(--sp-2) var(--sp-3);
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
}
|
|
|
|
.class-table tr:hover {
|
|
background: var(--surface-2);
|
|
}
|
|
|
|
.acc-bar-bg {
|
|
width: 100%;
|
|
height: 6px;
|
|
background: var(--surface-3);
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.acc-bar {
|
|
height: 100%;
|
|
border-radius: 3px;
|
|
transition: width 0.3s var(--ease);
|
|
}
|
|
|
|
/* ── Confusion Matrix ──────────────────────────────────────── */
|
|
.confusion-matrix {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.confusion-matrix table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.confusion-matrix th,
|
|
.confusion-matrix td {
|
|
padding: var(--sp-2);
|
|
text-align: center;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.confusion-matrix th {
|
|
background: var(--surface-0);
|
|
color: var(--text-secondary);
|
|
font-weight: 600;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.confusion-matrix td {
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.confusion-matrix .row-label {
|
|
text-align: left;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
background: var(--surface-0);
|
|
}
|
|
|
|
/* ── Checkpoint List ───────────────────────────────────────── */
|
|
.checkpoint-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.ckpt-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--sp-3);
|
|
background: var(--surface-0);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.ckpt-name {
|
|
font-family: var(--font-mono);
|
|
font-size: 12px;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.ckpt-meta {
|
|
display: flex;
|
|
gap: var(--sp-4);
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* ── Responsive ────────────────────────────────────────────── */
|
|
@media (max-width: 768px) {
|
|
.status-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.param-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.eval-summary {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.tourney-param-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* Refresh button spin animation */
|
|
@keyframes spin {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.status-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.param-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* ══════════════════════════════════════════════════════════════
|
|
Intro / Getting Started Banner
|
|
══════════════════════════════════════════════════════════════ */
|
|
|
|
.intro-banner {
|
|
background: color-mix(in srgb, var(--accent) 8%, var(--surface-1));
|
|
border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--sp-4) var(--sp-5);
|
|
margin-bottom: var(--sp-5);
|
|
}
|
|
|
|
.intro-banner.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.intro-banner-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
margin-bottom: var(--sp-3);
|
|
font-size: 15px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.intro-banner-icon {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.intro-banner-header strong {
|
|
flex: 1;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.intro-banner-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
padding: 2px 6px;
|
|
border-radius: var(--radius-sm);
|
|
line-height: 1;
|
|
transition: color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.intro-banner-close:hover {
|
|
color: var(--text);
|
|
background: var(--surface-3);
|
|
}
|
|
|
|
.intro-banner-lead {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
margin: 0 0 var(--sp-3) 0;
|
|
}
|
|
|
|
.intro-banner-steps {
|
|
margin: 0 0 var(--sp-4) 0;
|
|
padding-left: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.intro-banner-steps li {
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.intro-banner-steps li strong {
|
|
color: var(--text);
|
|
}
|
|
|
|
.intro-banner-steps li em {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.intro-banner-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding-top: var(--sp-3);
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
/* ══════════════════════════════════════════════════════════════
|
|
Tooltip System (.tip-icon + data-tip)
|
|
══════════════════════════════════════════════════════════════ */
|
|
|
|
.tip-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 15px;
|
|
height: 15px;
|
|
border-radius: 50%;
|
|
background: var(--surface-3);
|
|
color: var(--text-secondary);
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
font-style: normal;
|
|
cursor: default;
|
|
position: relative;
|
|
vertical-align: middle;
|
|
margin-left: 4px;
|
|
flex-shrink: 0;
|
|
transition: background 0.15s, color 0.15s;
|
|
/* prevent tooltip from triggering form-label hover states */
|
|
user-select: none;
|
|
}
|
|
|
|
.tip-icon:hover {
|
|
background: var(--accent-dim);
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* The tooltip bubble itself */
|
|
.tip-icon::after {
|
|
content: attr(data-tip);
|
|
position: absolute;
|
|
bottom: calc(100% + 8px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: var(--surface-0, #1a1a2e);
|
|
color: var(--text, #e0e0e0);
|
|
border: 1px solid var(--border, #333);
|
|
border-radius: var(--radius-md, 6px);
|
|
padding: 8px 12px;
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
line-height: 1.5;
|
|
white-space: normal;
|
|
width: 240px;
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 0.15s ease;
|
|
z-index: 1000;
|
|
text-align: left;
|
|
/* reset inherited label styles */
|
|
text-transform: none;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
/* Arrow pointing down */
|
|
.tip-icon::before {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: calc(100% + 3px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
border: 5px solid transparent;
|
|
border-top-color: var(--border, #333);
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 0.15s ease;
|
|
z-index: 1001;
|
|
}
|
|
|
|
.tip-icon:hover::after,
|
|
.tip-icon:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Flip tooltip below when near the top of the viewport */
|
|
.tip-icon.tip-below::after {
|
|
bottom: auto;
|
|
top: calc(100% + 8px);
|
|
}
|
|
|
|
.tip-icon.tip-below::before {
|
|
bottom: auto;
|
|
top: calc(100% + 3px);
|
|
border-top-color: transparent;
|
|
border-bottom-color: var(--border, #333);
|
|
}
|