reports/frontend/src/index.css
jtricerolph b40bf96263 Fix print layout — keep side-by-side charts in columns
Removed display:block override on .wa-charts-row; charts that sit
two-per-row on screen now do the same on paper instead of stacking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:10:09 +00:00

750 lines
22 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 */
--app-primary: #1d4ed8;
--app-primary-light: #3b82f6;
--app-primary-dark: #1e40af;
/* Layout */
--sidebar-w: 220px;
--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: .05em;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.sidebar-nav {
flex: 1;
overflow-y: auto;
}
.sidebar-user {
padding: 12px 16px;
border-top: 1px solid rgba(255,255,255,.08);
color: rgba(255,255,255,.4);
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-shrink: 0;
}
/* ── Report tree ────────────────────────────────────────────────── */
.report-category {
border-bottom: 1px solid rgba(255,255,255,.05);
}
.report-cat-header {
width: 100%;
display: flex;
align-items: center;
gap: 8px;
padding: 9px 14px;
background: none;
border: none;
cursor: pointer;
color: rgba(255,255,255,.8);
font-size: 12.5px;
font-weight: 600;
letter-spacing: .03em;
text-transform: uppercase;
text-align: left;
transition: background .12s;
}
.report-cat-header:hover { background: rgba(255,255,255,.06); }
.report-cat-icon { opacity: .7; display: flex; }
.report-cat-label { flex: 1; }
.report-cat-body {
padding-bottom: 4px;
}
.report-sub-header {
width: 100%;
display: flex;
align-items: center;
gap: 6px;
padding: 7px 14px 7px 22px;
background: none;
border: none;
cursor: pointer;
color: rgba(255,255,255,.55);
font-size: 11.5px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
text-align: left;
transition: color .12s;
}
.report-sub-header:hover { color: rgba(255,255,255,.8); }
.report-item {
width: 100%;
display: block;
padding: 7px 14px 7px 32px;
background: none;
border: none;
cursor: pointer;
color: rgba(255,255,255,.6);
font-size: 13px;
text-align: left;
transition: background .12s, color .12s;
}
.report-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.report-item.active { background: rgba(201,168,76,.12); color: var(--gold); }
/* ── Mobile top bar ─────────────────────────────────────────────── */
.top-bar {
display: none;
height: var(--topbar-h);
background: var(--navy);
color: #fff;
align-items: center;
padding: 0 14px;
gap: 10px;
flex-shrink: 0;
}
.top-bar-title {
flex: 1;
font-size: 15px;
font-weight: 600;
color: var(--gold);
}
/* ── Page content ───────────────────────────────────────────────── */
.page-content {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* ── Welcome / empty states ─────────────────────────────────────── */
.welcome-state {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
color: var(--text-muted);
padding: 40px;
}
.welcome-state h2 { margin: 0 0 8px; color: var(--text-primary); font-size: 20px; font-weight: 600; }
.welcome-state p { margin: 0; font-size: 14px; }
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
color: var(--text-muted);
font-size: 14px;
}
/* ── Report view ────────────────────────────────────────────────── */
.report-view {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 24px 28px;
gap: 16px;
}
.report-header {
display: flex;
align-items: flex-start;
gap: 16px;
}
.report-title {
margin: 0 0 4px;
font-size: 20px;
font-weight: 600;
color: var(--text-primary);
}
.report-description {
margin: 0;
font-size: 13px;
color: var(--text-muted);
max-width: 640px;
}
/* ── Controls bar ───────────────────────────────────────────────── */
.report-controls {
display: flex;
align-items: flex-end;
gap: 12px;
flex-wrap: wrap;
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 14px 16px;
}
.date-group {
display: flex;
flex-direction: column;
gap: 4px;
}
.date-group label {
font-size: 11px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: .04em;
}
.date-input {
height: 34px;
padding: 0 10px;
border: 1px solid var(--border);
border-radius: 6px;
font-size: 13px;
color: var(--text-primary);
background: var(--body-bg);
cursor: pointer;
}
.date-input:focus { outline: 2px solid var(--app-primary); outline-offset: -1px; }
.btn-run {
display: flex;
align-items: center;
gap: 6px;
height: 34px;
padding: 0 16px;
background: var(--app-primary);
color: #fff;
border: none;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background .15s;
white-space: nowrap;
}
.btn-run:hover:not(:disabled) { background: var(--app-primary-dark); }
.btn-run:disabled { opacity: .65; cursor: not-allowed; }
.btn-export {
display: flex;
align-items: center;
gap: 6px;
height: 34px;
padding: 0 14px;
background: none;
color: var(--text-muted);
border: 1px solid var(--border);
border-radius: 6px;
font-size: 13px;
cursor: pointer;
transition: border-color .15s, color .15s;
white-space: nowrap;
}
.btn-export:hover { border-color: var(--text-muted); color: var(--text-primary); }
/* ── Summary bar ────────────────────────────────────────────────── */
.summary-bar {
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.summary-stat {
display: flex;
flex-direction: column;
gap: 2px;
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 10px 16px;
min-width: 110px;
}
.summary-label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
color: var(--text-muted);
}
.summary-value {
font-size: 20px;
font-weight: 600;
color: var(--text-primary);
}
/* ── Error ──────────────────────────────────────────────────────── */
.report-error {
display: flex;
align-items: flex-start;
gap: 8px;
background: #fef2f2;
border: 1px solid #fecaca;
border-radius: var(--radius);
color: #991b1b;
padding: 12px 14px;
font-size: 13px;
line-height: 1.5;
}
.report-error svg { flex-shrink: 0; margin-top: 1px; }
/* ── Results table ──────────────────────────────────────────────── */
.results-table-wrap {
flex: 1;
overflow: auto;
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.results-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
white-space: nowrap;
}
.results-table thead {
position: sticky;
top: 0;
z-index: 1;
}
.results-table th {
background: #f8f9fb;
border-bottom: 1px solid var(--border);
padding: 9px 12px;
text-align: left;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
color: var(--text-muted);
white-space: nowrap;
}
.results-table td {
padding: 8px 12px;
border-bottom: 1px solid var(--border);
color: var(--text-primary);
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: #f9fafb; }
.results-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.results-table th:has(+ .num) { text-align: right; }
/* ── Spinner ────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }
/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 700px) {
.sidebar { display: none; }
.page-content { flex-direction: column; }
.top-bar { display: flex; }
.report-view { padding: 16px; }
.report-controls { gap: 8px; }
}
/* Sidebar scrollbar */
.nav-scroll::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.nav-scroll::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.nav-scroll::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.35); border-radius: 2px; }
.nav-scroll::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.65); }
.nav-scroll, .sidebar, .sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(201,168,76,0.35) transparent; }
/* ── Directors Forecast ──────────────────────────────────────────── */
.df-root { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.df-header {
display: flex; align-items: center; gap: 16px;
padding: 12px 24px; border-bottom: 1px solid var(--border);
background: var(--card-bg); flex-shrink: 0;
}
.df-month-nav { display: flex; align-items: center; gap: 10px; }
.df-nav-btn {
background: none; border: 1px solid var(--border); border-radius: 4px;
width: 26px; height: 26px; cursor: pointer; font-size: 16px; line-height: 1;
color: var(--text-primary);
}
.df-nav-btn:hover { background: var(--body-bg); }
.df-month-label { font-weight: 600; font-size: 14px; min-width: 140px; text-align: center; }
.df-tabs { display: flex; gap: 4px; }
.df-tab {
padding: 5px 14px; border-radius: 4px; border: 1px solid var(--border);
background: var(--card-bg); cursor: pointer; font-size: 12px; color: var(--text-muted);
}
.df-tab:hover { background: var(--body-bg); }
.df-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
/* Worksheet */
.df-worksheet { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.df-toolbar {
display: flex; align-items: center; justify-content: space-between;
padding: 10px 24px; border-bottom: 1px solid var(--border);
background: var(--card-bg); flex-shrink: 0; gap: 12px;
}
.df-toolbar-left, .df-toolbar-right { display: flex; align-items: center; gap: 10px; }
.df-rate-label { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.df-rate-input { width: 70px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }
.df-save-btn { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.df-btn-icon {
background: none; border: 1px solid var(--border); border-radius: 4px;
width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
cursor: pointer; color: var(--text-muted);
}
.df-btn-icon:hover { background: var(--body-bg); }
.df-error-inline { font-size: 12px; color: #dc2626; }
.df-table-wrap { flex: 1; overflow: auto; padding: 0 24px 24px; }
.df-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; }
.df-table th {
position: sticky; top: 0; background: var(--navy); color: #fff;
padding: 6px 8px; text-align: right; white-space: nowrap; font-weight: 500; font-size: 11px;
}
.df-table th:first-child, .df-table th:nth-child(2) { text-align: left; }
.df-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.df-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.df-table tr:hover td { background: #f8f9fa; }
.df-row-past td { color: var(--text-muted); }
.df-row-today td { background: #fffbeb !important; font-weight: 500; }
.df-ml { color: var(--gold); font-weight: 600; }
.df-forecast { font-weight: 600; color: #1d4ed8; }
.df-bold { font-weight: 600; }
.df-input-cell { padding: 2px 4px !important; }
.df-cell-input {
width: 70px; padding: 3px 5px; border: 1px solid var(--border); border-radius: 3px;
font-size: 11px; text-align: right; background: #fff;
}
.df-cell-input:focus { outline: none; border-color: var(--gold); }
.df-totals td { background: #f4f5f7; font-weight: 600; border-top: 2px solid var(--border); }
/* Report tab */
.df-report { flex: 1; overflow: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.df-report-title { font-size: 18px; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 4px; }
.df-report-toolbar {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.df-snap-row { display: flex; align-items: center; gap: 6px; }
.df-snap-input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; width: 200px; }
.df-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.df-card-title { padding: 10px 14px; font-weight: 600; font-size: 12px; background: #f8f9fa; border-bottom: 1px solid var(--border); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.df-report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.df-report-table th { padding: 8px 12px; background: #f8f9fa; border-bottom: 1px solid var(--border); text-align: right; font-weight: 600; font-size: 11px; color: var(--text-muted); }
.df-report-table th:first-child { text-align: left; }
.df-report-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.df-report-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.df-report-table tr:last-child td { border-bottom: none; }
.df-row-label { font-size: 12px; color: var(--text-primary); white-space: nowrap; }
.df-total-row td { font-weight: 700; background: #f4f5f7; border-top: 2px solid var(--border); }
.df-pos { color: #16a34a; text-align: right; font-variant-numeric: tabular-nums; }
.df-neg { color: #dc2626; text-align: right; font-variant-numeric: tabular-nums; }
.df-snap-col { position: relative; font-size: 10px; padding: 4px 20px 4px 8px !important; color: var(--text-muted); }
.df-snap-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-muted); }
.df-del-snap {
position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px;
}
.df-del-snap:hover { color: #dc2626; }
.df-weekly-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.df-loading { display: flex; justify-content: center; align-items: center; padding: 64px; }
.df-spinner {
width: 32px; height: 32px; border: 3px solid var(--border);
border-top-color: var(--gold); border-radius: 50%;
animation: spin .7s linear infinite;
}
.df-error { padding: 24px; color: #dc2626; font-size: 13px; }
@media print {
.no-print { display: none !important; }
.sidebar, .top-bar, .df-header { display: none !important; }
.df-root, .df-report { overflow: visible; }
#df-printable { padding: 0; }
.df-weekly-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
.df-weekly-grid { grid-template-columns: 1fr; }
.df-table { font-size: 11px; }
}
/* ── Weekly Actuals ─────────────────────────────────────────────────────── */
.wa-page {
height: 100%;
overflow-y: auto;
background: var(--body-bg);
}
.wa-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
border-bottom: 1px solid var(--border);
background: var(--card-bg);
gap: 12px;
flex-wrap: wrap;
position: sticky;
top: 0;
z-index: 10;
}
.wa-week-nav {
display: flex;
align-items: center;
gap: 8px;
}
.wa-week-label {
font-size: 13px;
color: var(--text-primary);
min-width: 160px;
text-align: center;
}
.wa-toolbar-actions {
display: flex;
align-items: center;
gap: 6px;
}
.wa-content {
padding: 20px;
display: flex;
flex-direction: column;
gap: 28px;
max-width: 1400px;
}
.wa-section {
background: var(--card-bg);
border-radius: var(--radius);
border: 1px solid var(--border);
padding: 20px;
box-shadow: var(--shadow-sm);
}
.wa-section-title {
font-size: 13px;
font-weight: 700;
letter-spacing: .06em;
text-transform: uppercase;
color: var(--text-primary);
margin: 0 0 14px;
padding-bottom: 10px;
border-bottom: 2px solid var(--gold);
}
.wa-note {
font-size: 11px;
color: var(--text-muted);
margin: 0 0 10px;
font-style: italic;
}
.wa-table-wrap {
overflow-x: auto;
}
.wa-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.wa-table th {
background: #f8f9fa;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
color: var(--text-muted);
padding: 8px 10px;
border-bottom: 2px solid var(--border);
text-align: right;
white-space: nowrap;
}
.wa-table th:first-child { text-align: left; }
.wa-table td {
padding: 7px 10px;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
.wa-table tbody tr:last-child td { border-bottom: none; }
.wa-table tbody tr:hover { background: #fafafa; }
.wa-row-label {
font-size: 12px;
color: var(--text-primary);
font-weight: 500;
white-space: nowrap;
}
.wa-num {
text-align: right;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.wa-muted { color: var(--text-muted); }
.wa-pos { color: #16a34a; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.wa-neg { color: #dc2626; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.wa-total-row td {
font-weight: 700;
background: #f4f5f7;
border-top: 2px solid var(--border);
border-bottom: none;
}
.wa-charts-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-top: 16px;
}
.wa-chart-card {
background: #fafafa;
border: 1px solid var(--border);
border-radius: 6px;
padding: 14px 10px 10px;
}
.wa-chart-card h4 {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
color: var(--text-muted);
margin: 0 0 10px;
text-align: center;
}
.wa-month-section {
display: flex;
flex-direction: column;
gap: 0;
}
.wa-utilities-placeholder {
background: #f8f9fa;
border: 1px dashed var(--border);
border-radius: 6px;
padding: 24px;
text-align: center;
color: var(--text-muted);
font-size: 13px;
}
@media (max-width: 900px) {
.wa-charts-row { grid-template-columns: 1fr; }
.wa-table { font-size: 11px; }
}
@media print {
/* Un-clip the shell so full content flows to paper */
.app-shell { display: block !important; height: auto !important; overflow: visible !important; }
.sidebar, .top-bar { display: none !important; }
.page-content { overflow: visible !important; height: auto !important; flex: none !important; }
/* Weekly actuals page resets */
.wa-toolbar { display: none !important; }
.wa-page { height: auto !important; overflow: visible !important; background: #fff; }
.wa-content { padding: 12px; gap: 16px; max-width: none; }
/* Each section stays whole — browser puts it on a new page if needed */
.wa-section {
break-inside: avoid;
page-break-inside: avoid;
box-shadow: none !important;
border: 1px solid #ccc !important;
margin-bottom: 14px;
padding: 14px;
}
/* Individual cards and tables don't split mid-element */
.wa-chart-card { break-inside: avoid; page-break-inside: avoid; background: #fff; border-color: #ddd; }
.wa-table-wrap { break-inside: avoid; page-break-inside: avoid; }
.wa-charts-row .wa-chart-card { margin-bottom: 0; }
/* Tables */
.wa-table { font-size: 11px; }
.wa-table th, .wa-table td { padding: 5px 8px; }
/* Section titles */
.wa-section-title { font-size: 11px; padding-bottom: 6px; margin-bottom: 10px; }
}