PowerGrid / frontend /src /index.css
saiteja020's picture
Deployment fix: removed binary files from history
75c7554
Raw
History Blame Contribute Delete
16.9 kB
/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
--bg-base: #060b18;
--bg-elevated: #0c1428;
--bg-card: rgba(255, 255, 255, 0.04);
--bg-card-hover: rgba(255, 255, 255, 0.07);
--border: rgba(255, 255, 255, 0.07);
--border-strong: rgba(255, 255, 255, 0.14);
--accent: #6366f1;
--accent-dim: rgba(99, 102, 241, 0.18);
--cyan: #22d3ee;
--green: #10b981;
--amber: #f59e0b;
--rose: #f43f5e;
--text-1: #f1f5f9;
--text-2: #94a3b8;
--text-3: #475569;
--sidebar-w: 252px;
--r: 12px;
--rs: 8px;
--shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root {
height: 100%;
font-family: 'Inter', sans-serif;
background: var(--bg-base);
color: var(--text-1);
font-size: 14px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
/* ── Layout ────────────────────────────────────────────────────────────── */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
width: var(--sidebar-w);
flex-shrink: 0;
background: var(--bg-elevated);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
overflow-y: auto;
position: relative;
}
.sidebar::after {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse at top, rgba(99,102,241,.12) 0%, transparent 70%);
pointer-events: none;
}
.main {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
}
/* ── Sidebar Brand ─────────────────────────────────────────────────────── */
.brand {
padding: 22px 20px 18px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
gap: 12px;
}
.brand-icon {
width: 38px; height: 38px;
background: linear-gradient(135deg, var(--accent), var(--cyan));
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 18px;
box-shadow: 0 4px 16px rgba(99,102,241,.4);
flex-shrink: 0;
}
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: -.4px; }
.brand-sub { font-size: 10px; color: var(--text-3); letter-spacing: .6px; margin-top: 1px; }
/* ── Sidebar Nav ───────────────────────────────────────────────────────── */
.nav { flex: 1; padding: 14px 10px; }
.nav-label {
font-size: 10px; font-weight: 600; color: var(--text-3);
text-transform: uppercase; letter-spacing: 1px;
padding: 8px 10px 4px;
}
.nav-item {
display: flex; align-items: center; gap: 11px;
padding: 9px 12px; border-radius: var(--rs);
font-size: 13.5px; font-weight: 500; color: var(--text-2);
cursor: pointer; transition: all .18s ease;
margin-bottom: 2px; border: none; background: none; width: 100%;
text-align: left;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-1); }
.nav-item.active {
background: var(--accent-dim);
color: var(--accent);
position: relative;
}
.nav-item.active::before {
content: '';
position: absolute; left: 0; top: 20%; bottom: 20%;
width: 3px; background: var(--accent);
border-radius: 0 3px 3px 0;
}
.sidebar-footer {
padding: 14px 20px;
border-top: 1px solid var(--border);
font-size: 11px; color: var(--text-3);
}
.status-dot {
display: inline-block;
width: 7px; height: 7px;
border-radius: 50%;
background: var(--green);
margin-right: 6px;
box-shadow: 0 0 6px var(--green);
}
.status-dot.offline { background: var(--rose); box-shadow: 0 0 6px var(--rose); }
/* ── Page chrome ───────────────────────────────────────────────────────── */
.page-header {
padding: 24px 32px 18px;
border-bottom: 1px solid var(--border);
background: rgba(6,11,24,.85);
backdrop-filter: blur(12px);
position: sticky; top: 0; z-index: 20;
}
.page-header h1 { font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.page-header p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.page-body { padding: 24px 32px; flex: 1; }
/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--r);
backdrop-filter: blur(6px);
transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-strong); }
.card-head {
padding: 14px 20px 12px;
border-bottom: 1px solid var(--border);
display: flex; align-items: center; justify-content: space-between;
gap: 8px;
}
.card-title {
font-size: 11px; font-weight: 700; color: var(--text-3);
text-transform: uppercase; letter-spacing: .8px;
}
.card-body { padding: 20px; }
/* ── Metric grid ───────────────────────────────────────────────────────── */
.metric-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
gap: 14px;
}
.metric-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--r);
padding: 18px 20px;
position: relative;
overflow: hidden;
transition: transform .2s, box-shadow .2s, border-color .2s;
}
.metric-card::before {
content: '';
position: absolute; top: 0; left: 0; right: 0; height: 2px;
background: linear-gradient(90deg, var(--accent), var(--cyan));
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.metric-label { font-size: 10.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .7px; }
.metric-value { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin-top: 6px; line-height: 1; }
.metric-sub { font-size: 11px; color: var(--text-2); margin-top: 5px; }
/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
display: inline-flex; align-items: center; gap: 7px;
padding: 10px 20px; border-radius: var(--rs);
font-size: 13.5px; font-weight: 600;
cursor: pointer; border: none; font-family: inherit;
transition: all .18s ease;
}
.btn-primary {
background: linear-gradient(135deg, var(--accent), #4f46e5);
color: #fff;
box-shadow: 0 4px 14px rgba(99,102,241,.45);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.55); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
background: var(--bg-card-hover);
color: var(--text-2);
border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-1); border-color: var(--border-strong); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
display: block; font-size: 11px; font-weight: 600; color: var(--text-2);
text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.form-control {
width: 100%;
background: rgba(255,255,255,.05);
border: 1px solid var(--border);
border-radius: var(--rs);
color: var(--text-1);
padding: 9px 13px;
font-size: 13.5px; font-family: inherit;
transition: border-color .2s, box-shadow .2s;
appearance: none; -webkit-appearance: none;
}
.form-control:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-control option { background: #1e293b; }
/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
display: inline-flex; align-items: center; gap: 5px;
padding: 3px 10px; border-radius: 999px;
font-size: 11px; font-weight: 600;
}
.badge-green { background: rgba(16,185,129,.14); color: var(--green); border: 1px solid rgba(16,185,129,.3); }
.badge-purple { background: rgba(99,102,241,.14); color: var(--accent); border: 1px solid rgba(99,102,241,.3); }
.badge-amber { background: rgba(245,158,11,.14); color: var(--amber); border: 1px solid rgba(245,158,11,.3); }
.badge-rose { background: rgba(244,63,94,.14); color: var(--rose); border: 1px solid rgba(244,63,94,.3); }
.badge-cyan { background: rgba(34,211,238,.14); color: var(--cyan); border: 1px solid rgba(34,211,238,.3); }
/* ── Score bars ────────────────────────────────────────────────────────── */
.score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.score-label { font-size: 12px; color: var(--text-2); width: 130px; flex-shrink: 0; font-weight: 500; }
.score-track { flex: 1; height: 8px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.score-val { font-size: 12px; font-weight: 700; width: 38px; text-align: right; font-family: 'JetBrains Mono', monospace; }
/* ── Overall score hero ────────────────────────────────────────────────── */
.overall-hero {
display: flex; flex-direction: column; align-items: center; justify-content: center;
padding: 28px 20px;
background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(34,211,238,.08));
border: 1px solid rgba(99,102,241,.25);
border-radius: var(--r);
text-align: center;
}
.overall-num { font-size: 60px; font-weight: 800; letter-spacing: -3px; line-height: 1; background: linear-gradient(135deg, var(--accent), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.overall-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
/* ── LLM panel ─────────────────────────────────────────────────────────── */
.llm-panel {
background: linear-gradient(135deg, rgba(99,102,241,.06), rgba(34,211,238,.04));
border: 1px solid rgba(99,102,241,.2);
border-radius: var(--r);
padding: 24px;
}
.llm-verdict {
font-size: 24px; font-weight: 800;
background: linear-gradient(135deg, var(--accent), var(--cyan));
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
display: inline-block; margin-bottom: 10px;
}
.llm-section { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin: 16px 0 7px; }
.llm-ul { list-style: none; }
.llm-ul li { font-size: 13px; color: var(--text-2); padding: 3px 0 3px 16px; position: relative; line-height: 1.55; }
.llm-ul li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.llm-detail { font-size: 13px; color: var(--text-2); line-height: 1.85; white-space: pre-wrap; }
/* ── Chart panels ───────────────────────────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; }
.chart-title { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 14px; }
/* ── Two-column config+results layout ──────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--rs); font-size: 13px; margin-bottom: 14px; }
.alert-info { background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25); color: #a5b4fc; }
.alert-error { background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.25); color: #fda4af; }
.alert-warn { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: #fde68a; }
/* ── Loader ────────────────────────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px; color: var(--text-2); font-size: 14px; }
/* ── Misc helpers ───────────────────────────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', monospace; }
.text-green { color: var(--green); }
.text-rose { color: var(--rose); }
.text-amber { color: var(--amber); }
.text-accent { color: var(--accent); }
.text-cyan { color: var(--cyan); }
.gap-8 { display: flex; flex-direction: column; gap: 8px; }
.gap-14 { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-sb { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; }
.mb-14 { margin-bottom: 14px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
/* ── Dashboard hero ─────────────────────────────────────────────────────── */
.hero {
background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.06));
border: 1px solid rgba(99,102,241,.2);
border-radius: var(--r);
padding: 28px 32px;
position: relative; overflow: hidden;
margin-bottom: 20px;
}
.hero::before {
content: '⚡';
position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
font-size: 80px; opacity: .06;
}
.hero h2 { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.hero p { font-size: 13px; color: var(--text-2); margin-top: 6px; max-width: 520px; }
/* ── Reward total ────────────────────────────────────────────────────────── */
.reward-total {
background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(34,211,238,.06));
border: 1px solid rgba(16,185,129,.2);
border-radius: var(--r);
padding: 18px 22px;
margin-bottom: 18px;
display: flex; align-items: center; gap: 16px;
}
.reward-total .big { font-size: 36px; font-weight: 800; color: var(--green); letter-spacing: -1.5px; font-family: 'JetBrains Mono', monospace; }