AutoML_APP / static /style.css
ivanriza99's picture
AutoML Assistant
6b5ab1a
Raw History Blame Contribute Delete
44.2 kB
/* AutoML Assistant β€” design tokens, layout and components. */
:root {
--bg: #f5f7fb;
--surface: #ffffff;
--surface-2: #f0f3f9;
--border: #e2e7f0;
--border-strong: #cbd3e1;
--text: #172033;
--text-muted: #5f6b80;
--primary: #3355d1;
--primary-hover: #2843ad;
--primary-soft: #e8edfc;
--primary-text: #ffffff;
--success: #138a4b;
--success-soft: #e3f5eb;
--warning: #b86e00;
--warning-soft: #fdf1dc;
--danger: #c93232;
--danger-soft: #fbe6e6;
--violet: #7a4fd1;
--violet-soft: #f0e9fc;
--teal: #0f8a8a;
--teal-soft: #e1f4f4;
--chart-1: #3355d1;
--chart-grid: #e2e7f0;
--sv-0: #3355d1; --sv-1: #8297e0; --sv-2: #b8bfcc; --sv-3: #f19a74; --sv-4: #eb6834; --sv-na: #9aa3b5;
--chart-ref: #8a94a7;
--seq-0: #f3f6fd; --seq-1: #d7e0f9; --seq-2: #aebff2; --seq-3: #7f98e6; --seq-4: #5274db; --seq-5: #3355d1; --seq-6: #253f9e;
--seq-ink-dark: #172033; --seq-ink-light: #ffffff;
--shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
--shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 16px rgba(16, 24, 40, 0.05);
--shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.16);
--radius: 12px;
--radius-sm: 8px;
--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
color-scheme: light;
}
:root[data-theme="dark"] {
--bg: #0e121b;
--surface: #161b26;
--surface-2: #1d2331;
--border: #283044;
--border-strong: #36405a;
--text: #e6eaf2;
--text-muted: #98a3b8;
--primary: #7b96f5;
--primary-hover: #9aaff8;
--primary-soft: #222c4a;
--primary-text: #0e121b;
--success: #4cc68a;
--success-soft: #16301f;
--warning: #f0b54a;
--warning-soft: #33280f;
--danger: #f07171;
--danger-soft: #3a1b1b;
--violet: #b394f2;
--violet-soft: #2a2140;
--teal: #4fc9c9;
--teal-soft: #13302f;
--chart-1: #5f7fe8;
--chart-grid: #283044;
--sv-0: #5f7fe8; --sv-1: #5c6fae; --sv-2: #6b7790; --sv-3: #a8664a; --sv-4: #d95926; --sv-na: #4f5a70;
--chart-ref: #6b7790;
--seq-0: #1a2133; --seq-1: #1f2a4a; --seq-2: #263766; --seq-3: #2f4685; --seq-4: #3d58a8; --seq-5: #5f7fe8; --seq-6: #91a6f3;
--seq-ink-dark: #0e121b; --seq-ink-light: #e6eaf2;
--shadow-sm: none;
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
font: 15px/1.5 var(--font);
background: var(--bg);
color: var(--text);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 6px; line-height: 1.25; font-weight: 650; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 8px; }
a { color: var(--primary); }
svg { flex-shrink: 0; }
.muted { color: var(--text-muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
position: sticky;
top: 0;
z-index: 50;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 12px;
height: 60px;
padding: 0 20px;
background: color-mix(in srgb, var(--surface) 88%, transparent);
backdrop-filter: saturate(160%) blur(10px);
border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect { fill: var(--primary); }
.brand-mark path { stroke: var(--primary-text); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.mode-switch {
display: inline-flex;
padding: 4px;
gap: 4px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 999px;
}
.mode-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 16px;
border: 0;
border-radius: 999px;
background: transparent;
color: var(--text-muted);
font-weight: 600;
cursor: pointer;
transition: background .15s, color .15s;
}
.mode-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mode-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.settings { position: relative; }
.popover {
position: absolute;
right: 0;
top: calc(100% + 8px);
width: 250px;
padding: 14px;
display: grid;
gap: 12px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-lg);
}
.popover.hidden { display: none; }
/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 9px 16px;
border: 1px solid transparent;
border-radius: var(--radius-sm);
font-weight: 600;
line-height: 1.2;
text-decoration: none;
cursor: pointer;
transition: background .15s, border-color .15s, color .15s, transform .05s;
white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary svg[viewBox] path[d^="M6 4"] { fill: currentColor; }
.btn-secondary { background: var(--primary-soft); color: var(--primary); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: .875rem; }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn {
display: inline-grid;
place-items: center;
width: 38px;
height: 38px;
border: 1px solid transparent;
border-radius: 999px;
background: transparent;
color: var(--text-muted);
font-size: 1.3rem;
line-height: 1;
cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn-sm { width: 28px; height: 28px; font-size: 1rem; }
.icon-btn-primary { background: var(--primary); color: var(--primary-text); }
.icon-btn-primary:hover { background: var(--primary-hover); color: var(--primary-text); }
/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; }
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
padding: 20px;
}
.card + .card, .stack > * + * { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.page-head { margin-bottom: 18px; }
.row-gap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
/* ── Stepper ─────────────────────────────────────────────────────────────── */
.stepper {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0;
margin: 0 0 22px;
padding: 0;
list-style: none;
counter-reset: step;
}
.step {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px 14px;
cursor: pointer;
border-bottom: 3px solid var(--border);
transition: border-color .2s;
min-width: 0;
}
.step.locked { cursor: default; opacity: .55; }
.step-dot {
display: inline-grid;
place-items: center;
width: 32px;
height: 32px;
border-radius: 999px;
background: var(--surface-2);
border: 1px solid var(--border-strong);
color: var(--text-muted);
font-weight: 700;
font-size: .9rem;
flex-shrink: 0;
}
.step-text { display: grid; min-width: 0; }
.step-title { font-weight: 650; }
.step-sub { font-size: .82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.active { border-bottom-color: var(--primary); }
.step.active .step-dot { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.step.done { border-bottom-color: var(--success); }
.step.done .step-dot { background: var(--success-soft); border-color: var(--success); color: transparent; position: relative; }
.step.done .step-dot::after {
content: "";
position: absolute;
width: 10px;
height: 6px;
border-left: 2.5px solid var(--success);
border-bottom: 2.5px solid var(--success);
transform: translateY(-2px) rotate(-45deg);
}
.step:not(.locked):not(.active):hover { background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
/* ── Dropzone ────────────────────────────────────────────────────────────── */
.dropzone {
display: grid;
justify-items: center;
gap: 4px;
width: 100%;
padding: 56px 24px;
border: 2px dashed var(--border-strong);
border-radius: var(--radius);
background: var(--surface);
text-align: center;
cursor: pointer;
transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone-icon { width: 44px; height: 44px; stroke: var(--primary); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.dropzone-title { font-size: 1.1rem; font-weight: 650; margin: 0; }
.dropzone-sub { color: var(--text-muted); margin: 0; }
.dropzone-sm { padding: 18px; font-weight: 600; color: var(--primary); }
/* ── How it works (empty state) ──────────────────────────────────────────── */
.how-it-works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.how-it-works .card + .card { margin-top: 0; }
.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-step p { margin: 2px 0 0; font-size: .88rem; }
@media (max-width: 640px) { .how-it-works { grid-template-columns: 1fr; } }
/* ── Dataset bar & chips ─────────────────────────────────────────────────── */
.dataset-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.file-badge { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); }
.file-badge svg { width: 22px; height: 22px; stroke: var(--primary); stroke-width: 1.8; fill: none; stroke-linejoin: round; }
.dataset-meta { flex: 1; min-width: 0; display: grid; gap: 4px; }
.dataset-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 10px;
border-radius: 999px;
background: var(--surface-2);
border: 1px solid var(--border);
font-size: .8rem;
font-weight: 600;
color: var(--text-muted);
white-space: nowrap;
}
.pill-primary { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.pill-ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
.pill-warn { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.pill-soft { font-weight: 500; }
.chip-btn {
padding: 6px 14px;
border: 1px solid var(--border-strong);
border-radius: 999px;
background: var(--surface);
font-weight: 600;
font-size: .875rem;
cursor: pointer;
}
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.chip-btn.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.chips-select { margin: 12px 0 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
display: inline-block;
padding: 5px 12px;
border: 1px solid var(--border-strong);
border-radius: 999px;
font-size: .85rem;
font-weight: 600;
color: var(--text-muted);
cursor: pointer;
}
.chip-check input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.chip-check input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.seg-btn { padding: 5px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font-weight: 600; font-size: .875rem; cursor: pointer; }
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
position: sticky;
top: 0;
padding: 8px 12px;
background: var(--surface-2);
color: var(--text-muted);
font-size: .78rem;
font-weight: 650;
text-transform: uppercase;
letter-spacing: .03em;
text-align: left;
white-space: nowrap;
}
.table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table-compact td, .table-compact th { padding: 6px 10px; white-space: nowrap; }
#vars-view { max-height: 560px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
#rows-view { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.rows-caption { margin: 0 0 8px; font-size: .88rem; }
.groq-link { margin: 0; font-size: .9rem; }
.groq-link a { font-weight: 600; }
.col-use { width: 56px; text-align: center; }
.col-use input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.col-name { white-space: nowrap; }
.var-name { font-family: var(--mono); font-size: .86rem; margin-right: 8px; }
.is-dropped td:not(.col-use) { opacity: .45; }
.is-dropped .var-name { text-decoration: line-through; }
.is-target { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.col-missing { min-width: 120px; white-space: nowrap; }
.col-missing .meter { display: inline-block; width: 60px; vertical-align: middle; margin-right: 8px; }
.var-dist { display: flex; align-items: center; gap: 10px; }
.var-dist .muted { font-size: .8rem; white-space: nowrap; }
.var-top { display: flex; flex-wrap: wrap; gap: 4px; }
.spark { width: 90px; height: 26px; }
.spark rect { fill: var(--primary); opacity: .75; }
.type-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 6px;
font-size: .76rem;
font-weight: 650;
white-space: nowrap;
}
.type-numeric { background: var(--teal-soft); color: var(--teal); }
.type-categorical { background: var(--violet-soft); color: var(--violet); }
.type-date { background: var(--warning-soft); color: var(--warning); }
.type-task { background: var(--primary-soft); color: var(--primary); }
.meter { position: relative; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.meter-ok > span { background: var(--success); }
.meter-warn > span { background: var(--warning); }
.meter-bad > span { background: var(--danger); }
.meter-primary > span { background: var(--primary); }
/* ── Train step ──────────────────────────────────────────────────────────── */
.train-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.summary-card { position: sticky; top: 80px; display: grid; gap: 14px; }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: .9rem; }
.summary-list dt { color: var(--text-muted); }
.summary-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
select, input[type="text"], input[type="password"], textarea {
padding: 8px 10px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
background: var(--surface);
max-width: 100%;
}
select:focus, input:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.select-lg { width: 100%; padding: 11px 12px; font-size: 1rem; font-weight: 600; margin: 8px 0 4px; }
input[type="range"] { flex: 1; accent-color: var(--primary); min-width: 120px; }
.field { display: grid; gap: 6px; }
.field .label, .field > label:first-child { font-weight: 600; font-size: .9rem; }
.field-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); }
.target-insight { display: grid; gap: 6px; margin-top: 10px; }
.insight-head { margin-bottom: 2px; }
.class-row { display: grid; grid-template-columns: minmax(60px, 160px) 1fr 64px; align-items: center; gap: 10px; font-size: .88rem; }
.class-name { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.advanced { padding: 0; }
.advanced summary {
display: flex;
align-items: center;
gap: 8px;
padding: 16px 20px;
font-weight: 650;
cursor: pointer;
list-style: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before {
content: "";
width: 8px;
height: 8px;
border-right: 2px solid var(--text-muted);
border-bottom: 2px solid var(--text-muted);
transform: rotate(-45deg);
transition: transform .15s;
}
.advanced[open] summary::before { transform: rotate(45deg); }
.advanced summary .muted { font-weight: 400; font-size: .85rem; }
.advanced-body { display: grid; gap: 18px; padding: 0 20px 20px; }
.impute-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px 150px 110px; align-items: center; gap: 8px; margin-top: 6px; }
.pill output, output.pill { min-width: 64px; justify-content: center; }
/* Switch */
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(16px); }
/* ── Results ─────────────────────────────────────────────────────────────── */
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.results-head h2 { font-size: 1.2rem; }
.results-head h2.mono { font-family: var(--mono); }
.eyebrow { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.results-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 16px 0; }
.kpi-grid .card + .card { margin-top: 0; }
.kpi { display: grid; gap: 4px; align-content: start; }
.kpi-label { font-size: .82rem; font-weight: 650; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: .82rem; color: var(--text-muted); }
.kpi-help { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.badge { justify-self: start; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.badge-excellent { background: var(--success-soft); color: var(--success); }
.badge-good { background: var(--primary-soft); color: var(--primary); }
.badge-fair { background: var(--warning-soft); color: var(--warning); }
.badge-weak { background: var(--danger-soft); color: var(--danger); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 8px 0 16px; overflow-x: auto; }
.tab {
padding: 10px 14px;
border: 0;
border-bottom: 2px solid transparent;
background: transparent;
color: var(--text-muted);
font-weight: 600;
white-space: nowrap;
cursor: pointer;
margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.plot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.plot-grid .card + .card { margin-top: 0; }
.plot { margin: 0; padding: 12px; }
.plot img, #shap-plots img { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; }
.plot figcaption { margin-top: 8px; font-size: .85rem; font-weight: 600; color: var(--text-muted); text-align: center; }
#shap-plots { margin-top: 12px; }
.imp-list { display: grid; gap: 8px; margin-top: 12px; }
.imp-row { display: grid; grid-template-columns: minmax(90px, 170px) 1fr 52px; align-items: center; gap: 12px; }
.imp-name { font-family: var(--mono); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-bar { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.imp-bar span { display: block; height: 100%; background: var(--chart-1); border-radius: 0 4px 4px 0; }
.imp-bar span.neg { background: var(--border-strong); }
.imp-val { font-size: .82rem; color: var(--text-muted); }
.is-best td { font-weight: 650; }
.score-cell { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.score-cell .meter { width: 80px; }
.ask-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 20px; background: var(--primary-soft); border-color: transparent; flex-wrap: wrap; }
.ask-card p { margin: 0; }
/* ── Results page ────────────────────────────────────────────────────────── */
.verdict { display: grid; gap: 18px; padding: 22px 24px; }
.verdict-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.verdict-text { flex: 1 1 380px; min-width: 0; }
.verdict-text h2 { font-size: 1.45rem; line-height: 1.25; margin: 2px 0 6px; letter-spacing: -.01em; }
.verdict-text p { margin: 0; }
.verdict-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.metric-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.metric { display: grid; gap: 2px; align-content: start; padding: 14px 16px; background: var(--surface-2); }
.metric + .metric { border-left: 1px solid var(--border); }
.metric-label { font-size: .78rem; font-weight: 650; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.metric-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.metric-note { font-size: .8rem; color: var(--text-muted); }
.metric-help { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warning-soft); font-size: .9rem; }
.checks li > span { flex: 1; }
.checks svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--warning); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.checks .btn { flex: none; background: var(--surface); }
.section-nav { position: sticky; top: 60px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0; margin: 6px 0 4px; background: var(--bg); }
.chip-btn.chip-accent { margin-left: auto; background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.res-section { margin-top: 22px; scroll-margin-top: 120px; }
.res-head h3 { margin: 0; font-size: 1.15rem; }
.res-head p { margin: 2px 0 0; }
.var-grid { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(340px, 3fr); gap: 14px; margin-top: 14px; align-items: start; }
.var-grid .card + .card { margin-top: 0; }
.var-grid h4, .res-details h4 { margin: 0 0 4px; font-size: 1rem; }
.shap-card { scroll-margin-top: 120px; }
.shap-legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); margin: 10px 0 4px; }
.shap-legend span { margin: 0 4px; }
.sv-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.viz .sv { stroke: var(--surface); stroke-width: .6; }
.sv-0 { fill: var(--sv-0); background: var(--sv-0); } .sv-1 { fill: var(--sv-1); background: var(--sv-1); }
.sv-2 { fill: var(--sv-2); background: var(--sv-2); } .sv-3 { fill: var(--sv-3); background: var(--sv-3); }
.sv-4 { fill: var(--sv-4); background: var(--sv-4); } .sv-na { fill: var(--sv-na); background: var(--sv-na); }
.viz .sv:hover { stroke: var(--text); stroke-width: 1.5; }
.shap-viz .shap-name { fill: var(--text); font-size: 12px; }
.shap-summary-title { margin-top: 14px !important; }
.shap-sentences { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; }
.shap-img { width: 100%; height: auto; }
.viz-scroll { overflow-x: auto; }
.viz-scroll .shap-viz { min-width: 500px; }
.res-details { margin-top: 24px; padding: 0; scroll-margin-top: 120px; }
.res-details > summary { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px; cursor: pointer; font-weight: 650; list-style: none; }
.res-details > summary::-webkit-details-marker { display: none; }
.res-details > summary::before { content: "β€Ί"; display: inline-block; transition: transform .15s; font-weight: 700; }
.res-details[open] > summary::before { transform: rotate(90deg); }
.res-details > :not(summary) { margin-left: 20px; margin-right: 20px; }
.res-details > :last-child { margin-bottom: 18px; }
.details-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 20px; margin: 0 0 8px; }
.details-list div { display: grid; gap: 1px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.details-list dt { font-size: .78rem; color: var(--text-muted); }
.details-list dd { margin: 0; overflow-wrap: anywhere; }
.small { font-size: .82rem; }
.expert-only { display: none; }
body.expert .expert-only { display: inline; }
body.expert p.expert-only { display: block; }
.switch-row small { display: block; font-size: .75rem; }
@media (max-width: 900px) { .var-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
.metric + .metric { border-left: 0; border-top: 1px solid var(--border); }
.verdict { padding: 18px; }
.verdict-text h2 { font-size: 1.2rem; }
.chip-btn.chip-accent { margin-left: 0; }
}
/* ── Native charts ───────────────────────────────────────────────────────── */
.chart { display: grid; gap: 4px; align-content: start; padding: 16px 18px; text-align: left; }
.plot .chart-title { font-weight: 650; color: var(--text); text-align: left; margin: 0; font-size: .98rem; }
.chart-sub { margin: 0 0 8px; font-size: .84rem; }
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz .grid { stroke: var(--chart-grid); stroke-width: 1; }
.viz .axis { stroke: var(--border-strong); stroke-width: 1; }
.viz .tick { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz .axis-label { fill: var(--text-muted); font-size: 11.5px; }
.viz .ref { stroke: var(--chart-ref); stroke-width: 1; }
.viz .ref-label { fill: var(--text-muted); font-size: 11px; }
.viz .series { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .area { fill: var(--chart-1); opacity: .1; }
.viz .crosshair { stroke: var(--text-muted); stroke-width: 1; }
.viz .dot { fill: var(--chart-1); stroke: var(--surface); stroke-width: 2; }
.viz .hit { fill: transparent; cursor: crosshair; }
.viz .pt { fill: var(--chart-1); fill-opacity: .55; stroke: var(--surface); stroke-width: 1; }
.viz .pt:hover { fill-opacity: 1; }
.viz .bar { fill: var(--chart-1); }
.viz .bar:hover { opacity: .8; }
.viz-tip {
position: fixed;
z-index: 200;
pointer-events: none;
padding: 8px 10px;
max-width: 260px;
border-radius: var(--radius-sm);
background: var(--text);
color: var(--bg);
font-size: .82rem;
line-height: 1.4;
box-shadow: var(--shadow-lg);
}
.viz-tip .muted { color: inherit; opacity: .75; }
.cm { display: grid; grid-template-columns: auto repeat(var(--n), minmax(56px, 1fr)); gap: 3px; margin-top: 4px; }
.cm-corner { display: flex; align-items: flex-end; font-size: .74rem; color: var(--text-muted); padding: 0 8px 4px 0; }
.cm-colhead, .cm-rowhead { font-size: .82rem; font-weight: 600; color: var(--text-muted); overflow-wrap: anywhere; }
.cm-colhead { text-align: center; padding: 4px 2px; align-self: end; }
.cm-rowhead { display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; text-align: right; }
.cm-cell {
display: grid;
place-content: center;
text-align: center;
min-height: 74px;
border-radius: 6px;
cursor: default;
font-variant-numeric: tabular-nums;
}
.cm-cell strong { font-size: 1.25rem; }
.cm-cell small { font-size: .78rem; opacity: .85; }
.cm-cell:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.seq-0 { background: var(--seq-0); color: var(--seq-ink-dark); }
.seq-1 { background: var(--seq-1); color: var(--seq-ink-dark); }
.seq-2 { background: var(--seq-2); color: var(--seq-ink-dark); }
.seq-3 { background: var(--seq-3); color: var(--seq-ink-light); }
.seq-4 { background: var(--seq-4); color: var(--seq-ink-light); }
.seq-5 { background: var(--seq-5); color: var(--seq-ink-light); }
.seq-6 { background: var(--seq-6); color: var(--seq-ink-light); }
:root[data-theme="dark"] .seq-3, :root[data-theme="dark"] .seq-4 { color: var(--seq-ink-light); }
:root[data-theme="dark"] .seq-5, :root[data-theme="dark"] .seq-6 { color: var(--seq-ink-dark); }
:root[data-theme="dark"] .seq-0, :root[data-theme="dark"] .seq-1, :root[data-theme="dark"] .seq-2 { color: var(--seq-ink-light); }
.cm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 0; }
.cm-stats div { padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.cm-stats dt { font-size: .75rem; color: var(--text-muted); }
.cm-stats dd { margin: 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cm-note { margin: 6px 0 0; font-size: .8rem; }
@media (max-width: 640px) { .cm-stats { grid-template-columns: repeat(2, 1fr); } }
/* ── Prediction ──────────────────────────────────────────────────────────── */
.predict-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.predict-grid .card + .card { margin-top: 0; }
.predict-card { display: grid; gap: 10px; align-content: start; }
.file-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); font-weight: 600; overflow-wrap: anywhere; }
#prediction-results { margin-top: 20px; }
#prediction-results > * + * { margin-top: 16px; }
/* ── Assistant drawer ────────────────────────────────────────────────────── */
.drawer {
position: fixed;
top: 0;
right: 0;
bottom: 0;
z-index: 80;
width: min(440px, 100vw);
display: flex;
flex-direction: column;
background: var(--surface);
border-left: 1px solid var(--border);
box-shadow: var(--shadow-lg);
transition: transform .25s ease;
}
.drawer.collapsed { transform: translateX(105%); box-shadow: none; }
#chat-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--border); }
#chat-header p { margin: 0; font-size: .85rem; }
#chat-box { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
#chat-suggestions { padding: 0 20px 12px; }
#chat-footer { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border); }
#chat-input { flex: 1; resize: none; min-height: 42px; max-height: 140px; border-radius: 20px; padding: 10px 14px; }
.chat-message { max-width: 88%; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); align-self: flex-start; overflow-wrap: anywhere; }
.chat-message.user { align-self: flex-end; background: var(--primary); color: var(--primary-text); border-bottom-right-radius: 4px; }
.chat-message.ai { border-bottom-left-radius: 4px; }
.chat-message.error { background: var(--danger-soft); color: var(--danger); }
.chat-message p:last-child, .chat-message ul:last-child, .chat-message ol:last-child { margin-bottom: 0; }
.chat-message ul, .chat-message ol { padding-left: 20px; margin: 4px 0 8px; }
.chat-message table { border-collapse: collapse; margin: 8px 0; font-size: .84rem; display: block; max-width: 100%; overflow-x: auto; }
.chat-message th, .chat-message td { padding: 5px 9px; border: 1px solid var(--border-strong); text-align: left; vertical-align: top; min-width: 64px; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.chat-message th { white-space: nowrap; }
.chat-message th { background: var(--surface); font-weight: 650; }
.chat-message td { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.chat-message pre { margin: 8px 0; padding: 8px 10px; background: var(--surface); border-radius: 6px; overflow-x: auto; font-size: .82rem; }
.chat-message code { font-family: var(--mono); font-size: .86em; }
.chat-message h1, .chat-message h2, .chat-message h3, .chat-message h4 { font-size: 1rem; margin: 10px 0 4px; }
.chat-message.ai { max-width: 96%; }
.chat-message.typing { display: flex; gap: 4px; padding: 14px; }
.chat-message.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: blink 1.2s infinite both; }
.chat-message.typing span:nth-child(2) { animation-delay: .2s; }
.chat-message.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
/* On wide screens the open assistant sits beside the app instead of over it,
so the user sees the effect of the actions it proposes */
@media (min-width: 1100px) {
body { transition: padding-right .25s ease; }
body.chat-open { padding-right: 440px; }
}
/* Assistant action proposals */
.action-list { display: grid; gap: 8px; align-self: stretch; }
.action-card {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
gap: 6px 10px;
padding: 10px 12px;
border: 1px solid var(--border-strong);
border-left: 3px solid var(--primary);
border-radius: var(--radius-sm);
background: var(--surface);
}
.action-label { font-weight: 600; font-size: .9rem; }
.action-status { grid-column: 1 / -1; font-size: .82rem; }
.action-status:empty { display: none; }
.action-buttons { display: flex; gap: 6px; grid-column: 2; grid-row: 1; }
.action-card.applied { border-left-color: var(--success); }
.action-card.applied .action-status { color: var(--success); }
.action-card.failed { border-left-color: var(--danger); }
.action-card.failed .action-status { color: var(--danger); }
.action-card.dismissed { opacity: .6; border-left-color: var(--border-strong); }
.action-card:is(.applied, .failed, .dismissed) .action-buttons { display: none; }
.action-apply-all { justify-self: end; }
/* ── Training progress panel ─────────────────────────────────────────────── */
.training-panel {
display: none;
gap: 14px;
padding-top: 14px;
border-top: 1px solid var(--border);
}
.training-panel.visible { display: grid; }
.tp-header { display: flex; justify-content: space-between; align-items: center; }
.tp-status { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.tp-pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); animation: pulse 1.4s infinite; }
.tp-pulse-dot.finalizing { background: var(--warning); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tp-status .pill { margin-left: auto; }
.tp-time-row { display: flex; align-items: baseline; gap: 8px; }
.tp-time { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tp-progress-bar { position: relative; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.tp-progress-fill { height: 100%; width: 0; background: var(--primary); transition: width 1s linear; }
.tp-progress-fill.indeterminate { width: 35%; animation: indeterminate 1.4s ease-in-out infinite; }
@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.tp-note { margin: 0; font-size: .8rem; }
.tp-models-list { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.tp-model-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: .86rem; }
.tp-model-row.training { background: var(--primary-soft); }
.tp-model-row.pending { color: var(--text-muted); }
.tp-model-name { flex: 1; }
.tp-model-badge { font-size: .75rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-model-row.done .tp-model-icon { color: var(--success); }
.tp-model-row.failed, .tp-model-row.skipped, .tp-model-row.unavailable { color: var(--text-muted); }
.tp-model-row.failed .tp-model-icon { color: var(--danger); }
.tp-model-icon { width: 16px; text-align: center; }
.tp-model-icon.spin { display: inline-block; animation: spin 1s linear infinite; color: var(--primary); }
.tp-divider { height: 1px; background: var(--border); margin: 6px 0; }
/* ── Modal, toast, spinner ───────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 22, .5); }
.modal.hidden { display: none; }
.modal-box { width: min(440px, 100%); display: grid; gap: 10px; padding: 22px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.toast {
position: fixed;
left: 50%;
bottom: 24px;
z-index: 120;
max-width: min(560px, calc(100vw - 32px));
padding: 12px 18px;
border-radius: var(--radius-sm);
background: var(--text);
color: var(--bg);
font-weight: 600;
box-shadow: var(--shadow-lg);
transform: translateX(-50%);
transition: opacity .2s, transform .2s;
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }
.toast-error { background: var(--danger); color: #fff; }
.toast-warning { background: var(--warning); color: #fff; }
.toast-success { background: var(--success); color: #fff; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--surface-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
#preview-loading { margin-top: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
.train-layout { grid-template-columns: 1fr; }
.summary-card { position: static; }
.predict-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
.topbar { grid-template-columns: auto 1fr auto; padding: 0 12px; gap: 8px; }
.brand-name, .hide-sm { display: none; }
.mode-switch { justify-self: center; }
.mode-btn { padding: 6px 12px; }
.container { padding: 16px 16px 64px; }
.card { padding: 16px; }
.step { padding: 10px 6px 12px; gap: 8px; }
.step-sub { display: none; }
.step-title { font-size: .85rem; }
.step-dot { width: 26px; height: 26px; font-size: .8rem; }
.dataset-bar { flex-wrap: wrap; }
.results-actions .btn { flex: 1 1 auto; }
.imp-row { grid-template-columns: minmax(70px, 120px) 1fr 56px; }
.impute-row { grid-template-columns: 1fr 1fr; }
.kpi-value { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.target-suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
select.is-empty { color: var(--text-muted); border-color: var(--primary); }
.examples { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.examples .chip-btn strong { font-weight: 650; }
.notice { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-muted); font-size: .9rem; }
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.split-slot { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.split-slot p { margin: 2px 0 10px; }
.split-status { margin: 8px 0 0 !important; font-size: .85rem; }
.split-status.ok { color: var(--success); }
.split-status.bad { color: var(--danger); }