experiment-lab / static /css /style.css
mnoorchenar's picture
Update 2026-03-20 21:52:49
b9370c4
/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
/* Existing color tokens */
--sidebar-w: 260px;
--sidebar-bg: #0f0e2a;
--sidebar-active: #6366f1;
--sidebar-hover: rgba(255,255,255,0.06);
--accent: #4f46e5;
--accent-2: #6366f1;
--accent-light: #eef2ff;
--success: #10b981;
--danger: #f43f5e;
--warn: #f59e0b;
--text: #111827;
--text-2: #374151;
--text-muted: #6b7280;
--bg: #f0f2f8;
--card-bg: #ffffff;
--border: #e8eaf0;
--border-2: #d1d5db;
--radius: 12px;
--radius-sm: 8px;
--shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.10);
--shadow-hover: 0 4px 8px rgba(0,0,0,0.08), 0 16px 40px rgba(79,70,229,0.12);
--font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
/* New layout tokens */
--header-h: 48px;
--panel-w: 360px;
--z-sidebar: 100;
--z-topbar: 200;
--z-toast: 300;
}
body {
font-family: var(--font);
color: var(--text);
background: var(--bg);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
height: 100vh;
overflow: hidden;
}
/* ===== App Shell ===== */
.app-shell {
display: grid;
grid-template-columns: var(--sidebar-w) 1fr;
height: 100vh;
overflow: hidden;
}
.main-col {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
.content-area {
flex: 1;
overflow: hidden;
display: flex;
min-height: 0;
}
/* ===== Sidebar ===== */
.sidebar {
width: var(--sidebar-w);
min-width: var(--sidebar-w);
background: var(--sidebar-bg);
color: #e0e7ff;
display: flex;
flex-direction: column;
height: 100vh;
overflow-y: auto;
z-index: var(--z-sidebar);
transition: transform 0.25s ease;
border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-header {
display: flex;
align-items: center;
gap: 0.85rem;
padding: 1.75rem 1.5rem 1.35rem;
border-bottom: 1px solid rgba(255,255,255,0.07);
background: rgba(255,255,255,0.02);
}
.brand-icon { flex-shrink: 0; display: flex; align-items: center; }
.brand-name { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.01em; line-height: 1.2; }
.brand-sub { font-size: 0.68rem; color: #818cf8; letter-spacing: 0.01em; margin-top: 2px; }
.nav-section-label {
font-size: 0.63rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #4c4f7a;
padding: 1.25rem 1.5rem 0.4rem;
}
.nav-list { list-style: none; padding: 0.75rem 0 1rem; flex: 1; }
.nav-list li + li { margin-top: 2px; }
.nav-link {
display: flex;
align-items: center;
gap: 0.85rem;
padding: 0.7rem 1.1rem;
color: #c7d2fe;
text-decoration: none;
border-radius: var(--radius-sm);
margin: 0 0.65rem;
transition: background 0.15s, color 0.15s;
position: relative;
overflow: hidden;
}
.nav-link::before {
content: '';
position: absolute;
left: 0;
top: 20%;
bottom: 20%;
width: 3px;
background: var(--accent-2);
border-radius: 0 2px 2px 0;
transform: scaleY(0);
transition: transform 0.18s ease;
}
.nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.nav-link:hover::before, .nav-link.active::before { transform: scaleY(1); }
.nav-link.active { background: rgba(99,102,241,0.18); color: #fff; }
.nav-link.active .nav-desc { color: rgba(199,210,254,0.85); }
.nav-icon { flex-shrink: 0; display: flex; align-items: center; color: #818cf8; }
.nav-link.active .nav-icon { color: #c7d2fe; }
.nav-text { display: flex; flex-direction: column; }
.nav-title { font-size: 0.875rem; font-weight: 600; }
.nav-desc { font-size: 0.7rem; color: rgba(165,180,252,0.65); margin-top: 1px; }
.sidebar-footer {
padding: 1rem 1.5rem;
font-size: 0.71rem;
color: #4c4f7a;
border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-footer a { color: #6366f1; text-decoration: none; font-weight: 500; }
.sidebar-footer a:hover { color: #a5b4fc; }
/* ===== Top Bar ===== */
.top-bar {
height: var(--header-h);
background: var(--card-bg);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 1.5rem;
gap: 1rem;
z-index: var(--z-topbar);
position: relative;
flex-shrink: 0;
}
.top-bar-title {
font-size: 0.9rem;
font-weight: 700;
color: var(--text);
letter-spacing: -0.01em;
}
.top-bar-right {
margin-left: auto;
display: flex;
align-items: center;
gap: 0.75rem;
}
.status-chip {
font-size: 0.72rem;
font-weight: 600;
padding: 0.2rem 0.65rem;
border-radius: 20px;
letter-spacing: 0.04em;
}
.status-chip.ready { background: #d1fae5; color: #065f46; }
.status-chip.computing { background: #fef3c7; color: #92400e; }
.status-chip.error { background: #ffe4e8; color: #9f1239; }
.last-run-label { font-size: 0.72rem; color: var(--text-muted); }
.kbd-hint {
font-size: 0.72rem;
color: var(--text-muted);
display: flex;
align-items: center;
gap: 0.3rem;
}
kbd {
font-size: 0.68rem;
background: #f3f4f6;
border: 1px solid var(--border-2);
border-bottom-width: 2px;
border-radius: 4px;
padding: 0.1rem 0.4rem;
color: var(--text-2);
}
/* Progress bar */
.progress-bar {
height: 3px;
background: linear-gradient(90deg, #4f46e5, #6366f1, #8b5cf6);
background-size: 200%;
position: absolute;
bottom: 0;
left: 0;
right: 0;
transform: scaleX(0);
transform-origin: left;
transition: transform 0.3s;
}
.progress-bar.running {
transform: scaleX(1);
animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
/* Hamburger */
.hamburger {
display: none;
background: transparent;
color: var(--text-muted);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
width: 32px;
height: 32px;
font-size: 1rem;
cursor: pointer;
align-items: center;
justify-content: center;
}
/* ===== Split Panel ===== */
.split-panel {
display: flex;
width: 100%;
height: 100%;
overflow: hidden;
}
.panel-left {
width: var(--panel-w);
min-width: var(--panel-w);
flex-shrink: 0;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
border-right: 1px solid var(--border);
background: var(--card-bg);
display: flex;
flex-direction: column;
}
.panel-right {
flex: 1;
height: 100%;
overflow-y: auto;
background: var(--bg);
padding: 1.25rem 1.5rem;
min-width: 0;
}
.panel-header {
position: sticky;
top: 0;
z-index: 10;
background: inherit;
border-bottom: 1px solid var(--border);
padding: 0.85rem 1.25rem;
display: flex;
align-items: center;
}
.panel-header-title {
font-size: 0.78rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
flex: 1;
}
.panel-header-actions { display: flex; gap: 0.4rem; align-items: center; }
.panel-body { padding: 1.25rem; flex: 1; }
/* ===== Collapsible sections ===== */
.collapsible-section { margin-bottom: 0.25rem; }
.collapsible-trigger {
display: flex;
align-items: center;
gap: 0.5rem;
width: 100%;
background: none;
border: none;
padding: 0.5rem 0;
cursor: pointer;
font-size: 0.78rem;
font-weight: 700;
color: var(--accent);
text-transform: uppercase;
letter-spacing: 0.07em;
font-family: var(--font);
}
.collapsible-trigger .chevron { margin-left: auto; transition: transform 0.2s; }
.collapsible-trigger[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.collapsible-content {
overflow: hidden;
transition: max-height 0.25s ease, opacity 0.2s;
}
.collapsible-content.collapsed { max-height: 0; opacity: 0; }
.collapsible-content.expanded { max-height: 2000px; opacity: 1; }
/* ===== Icon button ===== */
.icon-btn {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--border);
border-radius: 6px;
background: transparent;
color: var(--text-muted);
cursor: pointer;
transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--accent-light); color: var(--accent); border-color: #c7d2fe; }
/* ===== Buttons ===== */
.btn-primary {
background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
color: #fff;
border: none;
border-radius: var(--radius-sm);
padding: 0.7rem 1.75rem;
font-size: 0.875rem;
font-weight: 600;
font-family: var(--font);
cursor: pointer;
letter-spacing: 0.02em;
box-shadow: 0 2px 8px rgba(79,70,229,0.30);
transition: box-shadow 0.2s, transform 0.1s;
margin-top: 0.5rem;
display: inline-flex;
align-items: center;
gap: 0.5rem;
width: 100%;
justify-content: center;
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(79,70,229,0.45); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98) translateY(0); }
.btn-primary:disabled { background: linear-gradient(135deg, #9ca3af, #d1d5db); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-primary.loading { opacity: 0.85; cursor: wait; }
.btn-spinner {
width: 14px;
height: 14px;
border: 2px solid rgba(255,255,255,0.35);
border-top-color: #fff;
border-radius: 50%;
animation: spin 0.65s linear infinite;
display: none;
}
.btn-primary.loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ===== KPI tiles ===== */
.kpi-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 0.75rem;
margin-bottom: 1rem;
}
.kpi-tile {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem;
box-shadow: var(--shadow);
position: relative;
overflow: hidden;
animation: slide-up 0.28s ease both;
}
.kpi-tile::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
background: var(--accent-2);
}
.kpi-tile.highlight-bad::before { background: var(--danger); }
.kpi-tile.highlight-good::before { background: var(--success); }
.kpi-label {
font-size: 0.68rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.09em;
margin-bottom: 0.4rem;
line-height: 1.4;
}
.kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.kpi-context { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
@keyframes slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* ===== Chart card ===== */
.chart-card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
margin-bottom: 1rem;
overflow: hidden;
box-shadow: var(--shadow);
animation: slide-up 0.28s ease both;
}
.chart-header {
display: flex;
align-items: center;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border);
}
.chart-header-title {
font-size: 0.72rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
flex: 1;
}
.chart-body { padding: 0.25rem 0.5rem 0.5rem; }
.chart-desc { font-size: 0.82rem; color: var(--text-muted); margin: 0 1rem 0.5rem; line-height: 1.6; }
/* ===== Traffic light verdict widget ===== */
.verdict-widget {
display: flex;
align-items: center;
gap: 1.25rem;
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.25rem 1.5rem;
box-shadow: var(--shadow);
margin-bottom: 1rem;
animation: slide-up 0.28s ease both;
}
.verdict-circle {
width: 64px;
height: 64px;
border-radius: 50%;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.6rem;
font-weight: 800;
}
.verdict-circle.pass { background: #d1fae5; color: #065f46; box-shadow: 0 0 0 4px #a7f3d0; }
.verdict-circle.fail { background: #ffe4e8; color: #9f1239; box-shadow: 0 0 0 4px #fecdd3; }
.verdict-circle.inconclusive { background: #fef3c7; color: #92400e; box-shadow: 0 0 0 4px #fde68a; }
.verdict-label { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.04em; color: var(--text); margin-bottom: 0.25rem; }
.verdict-sub { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
/* ===== Toast notifications ===== */
.toast-container {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
z-index: var(--z-toast);
pointer-events: none;
}
.toast {
background: #1e1b4b;
color: #e0e7ff;
padding: 0.75rem 1.1rem;
border-radius: var(--radius-sm);
font-size: 0.84rem;
font-weight: 500;
box-shadow: 0 4px 20px rgba(0,0,0,0.25);
display: flex;
align-items: center;
gap: 0.65rem;
max-width: 340px;
pointer-events: auto;
animation: toast-in 0.25s ease both;
border-left: 4px solid var(--accent-2);
}
.toast.toast-error { border-left-color: var(--danger); background: #1f0a10; color: #fecdd3; }
.toast.toast-success { border-left-color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); max-height: 0; padding: 0; } }
.toast.dismissing { animation: toast-out 0.2s ease forwards; }
/* ===== Forms ===== */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
display: block;
font-size: 0.82rem;
font-weight: 600;
color: var(--text-2);
margin-bottom: 0.35rem;
letter-spacing: 0.01em;
}
.input-hint { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 0.35rem; line-height: 1.5; }
input[type="number"],
input[type="text"],
select {
width: 100%;
padding: 0.55rem 0.8rem;
border: 1.5px solid var(--border-2);
border-radius: var(--radius-sm);
font-size: 0.9rem;
font-family: var(--font);
background: #fff;
color: var(--text);
transition: border-color 0.15s, box-shadow 0.15s;
appearance: none;
-webkit-appearance: none;
}
input:focus, select:focus {
outline: none;
border-color: var(--accent-2);
box-shadow: 0 0 0 3px rgba(99,102,241,0.14);
}
select {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
padding-right: 2.25rem;
}
input[type="file"] {
width: 100%;
font-size: 0.85rem;
padding: 0.45rem;
border: 1.5px dashed var(--border-2);
border-radius: var(--radius-sm);
background: #fafbff;
cursor: pointer;
}
.radio-group { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.25rem; }
.radio-label {
display: flex;
align-items: center;
gap: 0.55rem;
font-size: 0.875rem;
cursor: pointer;
color: var(--text-2);
padding: 0.45rem 0.65rem;
border-radius: 6px;
border: 1.5px solid transparent;
transition: background 0.1s, border-color 0.1s;
}
.radio-label:hover { background: var(--accent-light); border-color: #c7d2fe; }
.radio-label input[type="radio"] { accent-color: var(--accent-2); width: 15px; height: 15px; flex-shrink: 0; }
.radio-label:has(input:checked) { background: var(--accent-light); border-color: #a5b4fc; color: var(--accent); }
.group-title {
font-size: 0.78rem;
font-weight: 700;
color: var(--accent);
text-transform: uppercase;
letter-spacing: 0.07em;
margin-bottom: 0.9rem;
margin-top: 0.5rem;
display: flex;
align-items: center;
gap: 0.4rem;
}
.group-title::before {
content: '';
display: inline-block;
width: 3px;
height: 14px;
background: var(--accent);
border-radius: 2px;
}
/* ===== Cards ===== */
.card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.25rem;
box-shadow: var(--shadow);
margin-bottom: 1rem;
}
.card-title {
font-size: 0.72rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 1rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border);
}
/* ===== Badges ===== */
.badge { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; }
.badge-pass { background: #d1fae5; color: #065f46; }
.badge-fail { background: #ffe4e8; color: #9f1239; }
.badge-warn { background: #fef3c7; color: #92400e; }
/* ===== Interpretation box ===== */
.interpretation {
font-size: 0.9rem;
color: var(--text-2);
line-height: 1.85;
background: #fafbff;
border-left: 4px solid var(--accent-2);
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
padding: 1rem 1.25rem;
}
/* ===== Empty state ===== */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4rem 2rem;
color: var(--text-muted);
text-align: center;
gap: 0.75rem;
height: 100%;
}
.empty-state-icon { font-size: 2.5rem; opacity: 0.4; }
.empty-state-text { font-size: 0.9rem; max-width: 280px; line-height: 1.6; }
/* ===== ANOVA table ===== */
.table-wrapper { overflow-x: auto; }
.anova-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.anova-table thead tr { background: #eef2ff; }
.anova-table th {
color: var(--text-2);
font-weight: 700;
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.07em;
padding: 0.65rem 1rem;
text-align: left;
border-bottom: 2px solid #c7d2fe;
white-space: nowrap;
}
.anova-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-2); font-variant-numeric: tabular-nums; }
.anova-table tr:last-child td { border-bottom: none; }
.anova-table tr.total-row td { font-weight: 700; background: #f8faff; color: var(--text); }
.anova-table tbody tr:hover td { background: #fafbff; }
.anova-table .sig-yes { color: var(--danger); font-weight: 700; }
/* ANOVA significant row highlight */
.anova-row-sig td { background: #fdf2f8 !important; }
.anova-row-sig td:first-child { border-left: 3px solid var(--danger); }
/* ===== DoE grid input ===== */
.input-grid { border-collapse: collapse; margin-top: 0.5rem; font-size: 0.85rem; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.input-grid th, .input-grid td { border: 1px solid var(--border); padding: 0.5rem 0.7rem; }
.input-grid th { background: #eef2ff; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); text-align: center; }
.input-grid .row-label { font-weight: 700; font-size: 0.78rem; background: #f5f5ff; color: var(--accent); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.input-grid .grid-cell { width: 90px; text-align: center; border: none; background: transparent; font-variant-numeric: tabular-nums; }
.input-grid .grid-cell:focus { background: var(--accent-light); }
/* ===== Chart placeholders ===== */
.chart-placeholder { min-height: 360px; }
.chart-placeholder-sm { min-height: 240px; }
.chart-placeholder-md { min-height: 350px; }
/* ===== Divider ===== */
.section-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
/* ===== Code tag ===== */
code {
font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
font-size: 0.85em;
background: #eef2ff;
color: #4338ca;
padding: 0.1em 0.4em;
border-radius: 4px;
}
/* ===== Plotly modebar — show on chart hover only ===== */
.modebar-container { opacity: 0 !important; transition: opacity 0.2s !important; }
.chart-card:hover .modebar-container { opacity: 1 !important; }
/* ===== Scrollbar styling ===== */
.panel-left::-webkit-scrollbar,
.panel-right::-webkit-scrollbar,
.sidebar::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
/* ===== Responsive (≤900px) ===== */
@media (max-width: 900px) {
.app-shell { grid-template-columns: 1fr; }
.sidebar {
position: fixed;
top: 0; left: 0; bottom: 0;
transform: translateX(-100%);
transition: transform 0.25s;
}
.sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.35); }
.split-panel { flex-direction: column; }
.panel-left { width: 100%; min-width: 0; height: auto; max-height: 50vh; border-right: none; border-bottom: 1px solid var(--border); }
.panel-right { height: auto; }
.hamburger { display: flex !important; }
.kbd-hint { display: none; }
}