Legend was sorted to mirror bar stack order, making it hard to tell segments apart at a glance; reverse it. Tooltip also rendered behind the legend div when they overlapped — raise its z-index above it.
496 lines
13 KiB
CSS
496 lines
13 KiB
CSS
/* Stack design system tokens */
|
|
:root {
|
|
--navy: #1a1a2e;
|
|
--gold: #c9a84c;
|
|
--body-bg: #f4f5f7;
|
|
--card-bg: #ffffff;
|
|
--text-primary: #1a1a2e;
|
|
--text-muted: #6b7280;
|
|
--border: #e5e7eb;
|
|
--radius: 8px;
|
|
--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
|
|
--shadow-md: 0 4px 12px rgba(0,0,0,0.12);
|
|
|
|
/* App theme — dark green for finance */
|
|
--app-primary: #065f46;
|
|
--app-primary-light: #059669;
|
|
--app-primary-dark: #064e3b;
|
|
|
|
/* UpdateBanner aliases */
|
|
--sidebar: var(--navy);
|
|
--text-light: #ffffff;
|
|
--accent: var(--gold);
|
|
|
|
/* Layout */
|
|
--sidebar-w: 200px;
|
|
--topbar-h: 56px;
|
|
}
|
|
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
|
|
html, body, #root {
|
|
height: 100%;
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--body-bg);
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
}
|
|
|
|
::-webkit-scrollbar { width: 4px; height: 4px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
|
|
|
/* ── App shell ──────────────────────────────────────────────────── */
|
|
.app-shell {
|
|
display: flex;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Sidebar ────────────────────────────────────────────────────── */
|
|
.sidebar {
|
|
width: var(--sidebar-w);
|
|
background: var(--navy);
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sidebar-logo {
|
|
padding: 20px 16px 12px;
|
|
color: var(--gold);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.05em;
|
|
text-transform: uppercase;
|
|
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.sidebar-nav {
|
|
padding: 8px 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 16px;
|
|
color: rgba(255,255,255,0.65);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
border-left: 3px solid transparent;
|
|
transition: all 0.15s;
|
|
user-select: none;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background: rgba(255,255,255,0.06);
|
|
color: rgba(255,255,255,0.9);
|
|
}
|
|
|
|
.nav-item.active {
|
|
background: rgba(201,168,76,0.12);
|
|
color: var(--gold);
|
|
border-left-color: var(--gold);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 8px; }
|
|
.sidebar-user-name { color: #ffffff; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sidebar-user { color: rgba(255,255,255,0.5); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sidebar-logout { color: rgba(255,255,255,0.5); display: flex; align-items: center; background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0; }
|
|
.sidebar-logout:hover { color: var(--gold); }
|
|
|
|
/* ── Content area ───────────────────────────────────────────────── */
|
|
.content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 24px;
|
|
}
|
|
|
|
/* ── Cards ──────────────────────────────────────────────────────── */
|
|
.card {
|
|
background: var(--card-bg);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow-sm);
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.card-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin: 0 0 16px;
|
|
}
|
|
|
|
/* ── Summary cards ──────────────────────────────────────────────── */
|
|
.summary-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
gap: 14px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.summary-card {
|
|
background: var(--card-bg);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow-sm);
|
|
padding: 16px;
|
|
}
|
|
|
|
.summary-card .label {
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.summary-card .value {
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.summary-card .sub {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ── Tables ─────────────────────────────────────────────────────── */
|
|
.data-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.data-table th {
|
|
text-align: left;
|
|
padding: 8px 12px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
border-bottom: 1px solid var(--border);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.data-table th.right,
|
|
.data-table td.right { text-align: right; }
|
|
|
|
.data-table td {
|
|
padding: 9px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.data-table tr:last-child td { border-bottom: none; }
|
|
|
|
.data-table tr.total-row td {
|
|
font-weight: 700;
|
|
border-top: 2px solid var(--border);
|
|
border-bottom: none;
|
|
}
|
|
|
|
.data-table tr:hover:not(.total-row) td {
|
|
background: var(--body-bg);
|
|
}
|
|
|
|
/* ── Traffic lights ─────────────────────────────────────────────── */
|
|
.pct-badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
.pct-green { background: #d1fae5; color: #065f46; }
|
|
.pct-amber { background: #fef3c7; color: #92400e; }
|
|
.pct-red { background: #fee2e2; color: #991b1b; }
|
|
|
|
.variance-over { color: #dc2626; font-weight: 600; }
|
|
.variance-under { color: #059669; font-weight: 600; }
|
|
|
|
/* ── Partial / forecast ─────────────────────────────────────────── */
|
|
.partial-badge {
|
|
display: inline-block;
|
|
font-size: 10px;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
background: var(--body-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 1px 6px;
|
|
margin-left: 6px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* ── Buttons ────────────────────────────────────────────────────── */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 7px 14px;
|
|
border-radius: var(--radius);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: opacity 0.15s;
|
|
}
|
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
.btn:hover:not(:disabled) { opacity: 0.88; }
|
|
|
|
.btn-primary {
|
|
background: var(--app-primary);
|
|
color: #fff;
|
|
}
|
|
.btn-secondary {
|
|
background: var(--body-bg);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border);
|
|
}
|
|
.btn-gold {
|
|
background: var(--gold);
|
|
color: var(--navy);
|
|
}
|
|
|
|
/* ── Page header ────────────────────────────────────────────────── */
|
|
.page-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
/* ── Week / month selector ──────────────────────────────────────── */
|
|
.period-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.period-label {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
min-width: 150px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* ── Form elements ──────────────────────────────────────────────── */
|
|
input[type="number"], input[type="text"] {
|
|
width: 100%;
|
|
padding: 6px 10px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
color: var(--text-primary);
|
|
background: var(--card-bg);
|
|
}
|
|
|
|
input[type="number"]:focus,
|
|
input[type="text"]:focus {
|
|
outline: 2px solid var(--app-primary-light);
|
|
border-color: var(--app-primary-light);
|
|
}
|
|
|
|
/* ── Footnote ───────────────────────────────────────────────────── */
|
|
.footnote {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
margin-top: 8px;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* ── Recharts tooltip/legend stacking ──────────────────────────────
|
|
Tooltip and legend wrappers are both absolutely positioned by
|
|
Recharts; without this the legend (later in DOM order) sits above
|
|
the tooltip when they overlap. */
|
|
.recharts-tooltip-wrapper {
|
|
z-index: 10;
|
|
}
|
|
.recharts-legend-wrapper {
|
|
z-index: 1;
|
|
}
|
|
|
|
/* ── Dept detail modal ──────────────────────────────────────────── */
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.45);
|
|
z-index: 1000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.modal-card {
|
|
background: var(--card-bg);
|
|
border-radius: var(--radius);
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
|
|
width: min(600px, 95vw);
|
|
max-height: 85vh;
|
|
overflow-y: auto;
|
|
padding: 24px;
|
|
}
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 20px;
|
|
}
|
|
.modal-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
.modal-sub {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
margin-top: 3px;
|
|
}
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--text-muted);
|
|
padding: 0;
|
|
line-height: 1;
|
|
flex-shrink: 0;
|
|
}
|
|
.modal-close:hover { color: var(--text-primary); }
|
|
.modal-body-state {
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
padding: 32px 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ── Section row label (Monthly two-row cards) ──────────────────── */
|
|
.section-row-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
margin-bottom: 8px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ── PY collapse toggle ─────────────────────────────────────────── */
|
|
.py-collapse-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: none;
|
|
border: none;
|
|
padding: 0;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
}
|
|
.py-collapse-toggle:hover { color: var(--text-primary); }
|
|
|
|
/* ── Loading/error states ───────────────────────────────────────── */
|
|
.state-center {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 200px;
|
|
color: var(--text-muted);
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ── Top bar + burger (mobile only) ────────────────────────────── */
|
|
.top-bar {
|
|
display: none;
|
|
height: var(--topbar-h);
|
|
background: var(--navy);
|
|
color: #fff;
|
|
align-items: center;
|
|
padding: 0 12px;
|
|
gap: 10px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.top-bar-title {
|
|
flex: 1;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--gold);
|
|
}
|
|
|
|
.top-bar-burger {
|
|
background: none;
|
|
border: none;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.menu-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
z-index: 199;
|
|
}
|
|
|
|
/* ── Mobile breakpoint ──────────────────────────────────────────── */
|
|
@media (max-width: 640px) {
|
|
.app-shell { flex-direction: column; }
|
|
.top-bar { display: flex; }
|
|
|
|
.sidebar {
|
|
position: fixed;
|
|
top: 0; left: 0; bottom: 0;
|
|
z-index: 200;
|
|
transform: translateX(calc(-1 * var(--sidebar-w)));
|
|
transition: transform 0.25s ease;
|
|
}
|
|
.app-shell.menu-open .sidebar { transform: translateX(0); }
|
|
|
|
.content {
|
|
padding: 12px;
|
|
}
|
|
|
|
.card {
|
|
padding: 12px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.summary-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 10px;
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.summary-card .value { font-size: 18px; }
|
|
|
|
.page-title { font-size: 17px; }
|
|
|
|
.period-label {
|
|
font-size: 12px;
|
|
min-width: 110px;
|
|
}
|
|
}
|