Files
hihala-dashboard/src/App.css
T
fahed 25cb91e31b refactor: extract inline style blocks to App.css (H1)
The 130-line (Dashboard) and 155-line (Comparison) inline <style> JSX
blocks are removed and replaced with static CSS in App.css.

Font-family values that changed per language are now set as CSS custom
properties (--alt-body-font, --alt-display-font, --alt-mono-font) via
the root element's style prop — 3 vars instead of re-injecting 130+
lines of CSS on every language switch.

The redundant @import font URLs are dropped (fonts already preloaded
in index.html). Default values for the three font vars are defined in
:root so the page renders correctly before JS executes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 17:46:41 +03:00

2712 lines
62 KiB
CSS

/* ========================================
HiHala Dashboard - Minimalist Luxury
======================================== */
/* Screen-reader only utility */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}
:root {
--bg: #f8fafc;
--surface: #ffffff;
--border: #e2e8f0;
--text-primary: #0f172a;
--text-secondary: #334155;
--text-muted: #64748b;
--accent: #2563eb;
--accent-light: #dbeafe;
--success: #059669;
--success-light: #d1fae5;
--danger: #dc2626;
--danger-light: #fee2e2;
--brand-icon: #3b82f6;
--brand-text: #1e3a5f;
--text-inverse: #ffffff;
--warning-bg: #fef3c7;
--warning-text: #92400e;
--warning-border: #fcd34d;
--accent-hover: #1d4ed8;
--purple: #7c3aed;
--muted-light: #f1f5f9;
--dark-surface: #1e293b;
--dark-muted: #94a3b8;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
--shadow: 0 4px 12px rgba(0,0,0,0.08);
--radius: 12px;
--hover: var(--muted-light);
--bg-primary: var(--surface);
--bg-secondary: var(--bg);
--bg-tertiary: var(--border);
}
/* OS dark preference — only when no manual theme is set */
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--bg: #0f172a;
--surface: #1e293b;
--border: #334155;
--text-primary: #f1f5f9;
--text-secondary: #cbd5e1;
--text-muted: #94a3b8;
--accent: #3b82f6;
--accent-light: #1e3a5f;
--success: #34d399;
--success-light: #064e3b;
--danger: #f87171;
--danger-light: #7f1d1d;
--brand-icon: #60a5fa;
--brand-text: #93c5fd;
--text-inverse: #0f172a;
--warning-bg: #451a03;
--warning-text: #fbbf24;
--warning-border: #78350f;
--accent-hover: #60a5fa;
--purple: #a78bfa;
--muted-light: #1e293b;
--dark-surface: #0f172a;
--dark-muted: #64748b;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
--shadow: 0 4px 12px rgba(0,0,0,0.4);
color-scheme: dark;
}
}
/* Explicit dark theme (user preference overrides OS) */
:root[data-theme="dark"] {
--bg: #0f172a;
--surface: #1e293b;
--border: #334155;
--text-primary: #f1f5f9;
--text-secondary: #cbd5e1;
--text-muted: #94a3b8;
--accent: #3b82f6;
--accent-light: #1e3a5f;
--success: #34d399;
--success-light: #064e3b;
--danger: #f87171;
--danger-light: #7f1d1d;
--brand-icon: #60a5fa;
--brand-text: #93c5fd;
--text-inverse: #0f172a;
--warning-bg: #451a03;
--warning-text: #fbbf24;
--warning-border: #78350f;
--accent-hover: #60a5fa;
--purple: #a78bfa;
--muted-light: #1e293b;
--dark-surface: #0f172a;
--dark-muted: #64748b;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
--shadow: 0 4px 12px rgba(0,0,0,0.4);
color-scheme: dark;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Prevent horizontal overflow at the root level */
html, body {
overflow-x: hidden;
}
main {
min-width: 0;
overflow-x: hidden;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg);
color: var(--text-primary);
font-size: 15px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* RTL Arabic font */
html[dir="rtl"] body,
html[dir="rtl"] {
font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* Loading & Error */
.loading-container,
.error-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
gap: 16px;
color: var(--text-secondary);
}
.loading-spinner {
width: 32px;
height: 32px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.error-container button {
padding: 10px 20px;
background: var(--text-primary);
color: var(--text-inverse);
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
font-size: 0.875rem;
}
.error-container button:hover {
background: var(--text-secondary);
}
.error-container button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.error-message {
max-width: 400px;
text-align: center;
color: var(--text-muted);
}
/* Empty State */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 48px 24px;
text-align: center;
color: var(--text-secondary);
}
.empty-state-icon {
font-size: 3rem;
margin-bottom: 16px;
opacity: 0.5;
}
.empty-state-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8px;
}
.empty-state-message {
font-size: 0.875rem;
color: var(--text-muted);
max-width: 300px;
margin-bottom: 20px;
}
.empty-state-action {
padding: 10px 20px;
background: var(--accent);
color: var(--text-inverse);
border: none;
border-radius: 8px;
font-weight: 500;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.2s;
}
.empty-state-action:hover {
background: var(--accent-hover);
}
/* Navigation */
.nav-bar {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 0 28px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,0.04);
}
.nav-content {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
max-width: 1400px;
}
.nav-brand {
display: flex;
align-items: center;
gap: 9px;
}
.nav-brand-icon {
color: var(--brand-icon);
flex-shrink: 0;
}
.nav-brand-text {
display: flex;
align-items: baseline;
gap: 5px;
}
.nav-brand-name {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 0.9375rem;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.02em;
}
.nav-brand-tag {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 0.6875rem;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--text-muted);
}
.data-source-select {
appearance: none;
-webkit-appearance: none;
background: transparent;
border: none;
color: var(--accent);
font-family: inherit;
font-size: 0.8125rem;
font-weight: 500;
cursor: pointer;
padding: 2px 18px 2px 4px;
border-radius: 5px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 3px center;
transition: background-color 0.12s;
margin-inline-start: 2px;
}
.data-source-select:hover {
background-color: var(--accent-light);
}
.data-source-select:focus {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
.data-source-select option {
color: var(--text-primary);
background: var(--surface);
font-weight: 500;
}
.data-source-select option:disabled {
color: var(--text-muted);
}
.nav-links {
display: flex;
align-items: center;
gap: 2px;
}
/* Separator between nav links and utility buttons */
.nav-sep {
display: block;
width: 1px;
height: 20px;
background: var(--border);
margin: 0 8px;
flex-shrink: 0;
align-self: center;
}
.nav-link {
color: var(--text-muted);
text-decoration: none;
padding: 7px 13px;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 500;
transition: background 0.12s, color 0.12s;
display: flex;
align-items: center;
gap: 7px;
background: transparent;
border: none;
white-space: nowrap;
}
.nav-link svg {
flex-shrink: 0;
opacity: 0.6;
transition: opacity 0.12s;
}
.nav-link:hover {
background: var(--muted-light);
color: var(--text-primary);
}
.nav-link:hover svg {
opacity: 0.85;
}
.nav-link.active {
background: var(--accent-light);
color: var(--accent);
font-weight: 600;
}
.nav-link.active svg {
opacity: 1;
}
/* Utility icon buttons (theme + lang toggle) */
.nav-lang-toggle {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
height: 32px;
padding: 0 10px;
border-radius: 7px;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
transition: background 0.12s, color 0.12s;
background: transparent;
border: none;
color: var(--text-muted);
letter-spacing: 0.02em;
white-space: nowrap;
}
.nav-lang-toggle:hover {
background: var(--muted-light);
color: var(--text-primary);
}
.nav-lang-toggle:active {
transform: scale(0.95);
}
/* RTL adjustments */
html[dir="rtl"] .nav-lang-toggle {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* Offline Badge */
.offline-badge {
display: flex;
align-items: center;
gap: 5px;
padding: 4px 10px;
background: var(--warning-bg);
color: var(--warning-text);
border-radius: 6px;
font-size: 0.6875rem;
font-weight: 600;
border: 1px solid var(--warning-border);
}
.offline-badge svg {
opacity: 0.8;
}
/* Refresh Button */
.nav-refresh-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 7px;
cursor: pointer;
transition: background 0.12s, color 0.12s;
background: transparent;
border: none;
color: var(--text-muted);
flex-shrink: 0;
}
.nav-refresh-btn:hover {
background: var(--muted-light);
color: var(--text-primary);
}
.nav-refresh-btn:active {
transform: scale(0.95);
}
.nav-refresh-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.nav-refresh-btn.refreshing svg {
animation: spin 1s linear infinite;
}
/* Main Content */
.dashboard,
.comparison {
padding: 32px;
max-width: 1400px;
margin: 0 auto;
overflow-x: hidden;
}
/* Page Title */
.page-title {
margin-bottom: 32px;
}
.page-title h1 {
font-size: 1.75rem;
font-weight: 700;
letter-spacing: -0.02em;
margin-bottom: 6px;
color: var(--text-primary);
}
.page-title p {
color: var(--text-secondary);
font-size: 0.9375rem;
}
/* Page Title with Actions (Labels toggle) */
.page-title-with-actions {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 28px;
}
.page-title-with-actions .page-title {
margin-bottom: 0;
}
.toggle-with-label {
display: flex;
align-items: center;
gap: 8px;
margin-top: 6px;
}
.toggle-with-label .toggle-text {
font-size: 0.8125rem;
font-weight: 500;
color: var(--text-secondary);
}
/* Header Toggles Container (for multiple toggles side by side) */
.header-toggles {
display: flex;
align-items: center;
gap: 24px;
margin-top: 6px;
}
.header-toggles .toggle-with-label {
margin-top: 0;
}
/* Filters - now uses .controls for consistency */
/* Stats Grid */
.stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
margin-bottom: 32px;
}
.stat-card {
background: var(--surface);
padding: 28px;
border-radius: var(--radius);
border: 1px solid var(--border);
box-shadow: var(--shadow-sm);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow);
}
.stat-card h3 {
font-size: 0.8125rem;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 10px;
}
.stat-value {
font-size: 2rem;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.02em;
}
.stat-change {
font-size: 0.875rem;
font-weight: 600;
margin-top: 6px;
}
.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }
/* Charts */
.charts-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
margin-bottom: 32px;
}
@keyframes fadeUp {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.chart-card {
background: var(--surface);
padding: 24px;
border-radius: var(--radius);
border: 1px solid var(--border);
position: relative;
animation: fadeUp 0.4s ease-out both;
}
.chart-card:nth-child(2) { animation-delay: 0.05s; }
.chart-card:nth-child(3) { animation-delay: 0.1s; }
.chart-card:nth-child(4) { animation-delay: 0.15s; }
.toggle-corner {
position: absolute;
top: 20px;
right: 20px;
z-index: 1;
}
.chart-card.full-width {
grid-column: 1 / -1;
}
.chart-card.half-width {
grid-column: span 1;
}
.chart-card h2 {
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 20px;
}
.chart-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
gap: 12px;
flex-wrap: wrap;
}
.chart-card-header h2 {
margin: 0;
}
.chart-card-actions {
display: flex;
gap: 8px;
align-items: center;
}
.chart-container {
height: clamp(280px, 30vw, 420px);
position: relative;
}
/* Table */
.table-container {
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.9375rem;
}
table th {
font-weight: 600;
font-size: 0.75rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
padding: 14px 12px;
text-align: right;
border-bottom: 2px solid var(--border);
}
table th:first-child { text-align: start; }
table td {
padding: 14px 12px;
text-align: right;
border-bottom: 1px solid var(--border);
color: var(--text-secondary);
}
table td:first-child { text-align: start; }
table tbody tr:hover {
background: var(--bg);
}
.bold { font-weight: 700; color: var(--text-primary); }
.muted { color: var(--text-muted); }
.primary { color: var(--accent); font-weight: 600; }
.purple { color: var(--purple); font-weight: 600; }
.positive { color: var(--success); font-weight: 600; }
.negative { color: var(--danger); font-weight: 600; }
/* Comparison Page */
.controls {
background: var(--surface);
padding: 24px;
border-radius: var(--radius);
border: 1px solid var(--border);
margin-bottom: 32px;
}
.controls-header {
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
background: none;
border: none;
width: 100%;
padding: 0;
text-align: left;
font: inherit;
color: inherit;
}
.controls-header h3 {
margin: 0;
}
.controls-header-actions {
display: flex;
align-items: center;
gap: 8px;
}
.controls h3 {
font-size: 0.8125rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.controls-reset {
background: transparent;
border: 1px solid var(--border);
color: var(--text-secondary);
padding: 6px 14px;
border-radius: 6px;
font-size: 0.8125rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.controls-reset:hover {
border-color: var(--danger);
color: var(--danger);
}
.controls-toggle {
display: none;
background: none;
border: none;
color: var(--text-muted);
font-size: 0.75rem;
cursor: pointer;
padding: 4px 8px;
}
.controls-body {
margin-top: 16px;
}
.control-row {
display: flex;
gap: 16px;
flex-wrap: wrap;
align-items: flex-end;
}
.control-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.control-group label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.control-group select,
.control-group input[type="date"] {
padding: 12px 16px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 0.9375rem;
background: var(--surface);
color: var(--text-primary);
min-width: 160px;
}
.control-group select:focus,
.control-group input[type="date"]:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
border-color: var(--accent);
}
/* Always-visible period selector row (Dashboard) */
.period-selector-row {
display: flex;
align-items: center;
margin-bottom: 12px;
}
/* Comparison period row (bare, no collapsible wrapper) */
.comparison-periods {
margin-bottom: 12px;
}
/* Period Picker (legacy) */
.period-picker { width: 100%; }
.period-picker-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
/* ── DateRangePicker ─────────────────────────── */
.drp {
position: relative;
display: inline-block;
}
.drp-standalone {
padding: 8px 0 4px;
}
.drp-trigger {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 9px 14px;
background: var(--surface);
border: 1.5px solid var(--border);
border-radius: var(--radius);
cursor: pointer;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
letter-spacing: -0.01em;
}
.drp-trigger:hover {
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.drp-trigger.drp-open {
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
background: var(--accent-light, #dbeafe);
color: var(--accent);
}
.drp-cal-icon {
color: var(--text-muted);
flex-shrink: 0;
transition: color 0.15s;
}
.drp-trigger.drp-open .drp-cal-icon {
color: var(--accent);
}
.drp-trigger-label {
font-variant-numeric: tabular-nums;
}
.drp-chevron {
color: var(--text-muted);
flex-shrink: 0;
}
/* Panel */
.drp-panel {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 300;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
padding: 16px;
width: min(324px, calc(100vw - 32px));
animation: drpIn 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes drpIn {
from { opacity: 0; transform: translateY(-6px) scale(0.98); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
/* Year nav */
.drp-year-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border);
}
.drp-year-val {
font-size: 1.125rem;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.02em;
}
.drp-year-btn {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border: 1px solid var(--border);
border-radius: 7px;
background: var(--bg);
color: var(--text-secondary);
cursor: pointer;
transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.drp-year-btn:hover:not(:disabled) {
background: var(--accent);
border-color: var(--accent);
color: var(--text-inverse);
}
.drp-year-btn:disabled {
opacity: 0.3;
cursor: not-allowed;
}
/* Section labels */
.drp-group-label {
font-size: 0.625rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
margin: 10px 0 6px;
}
.drp-year-row + .drp-group-label {
margin-top: 0;
}
/* Chips */
.drp-chips {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.drp-chip {
padding: 4px 9px;
border: 1px solid var(--border);
border-radius: 6px;
background: transparent;
color: var(--text-secondary);
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: background 0.1s, border-color 0.1s, color 0.1s;
letter-spacing: 0.01em;
}
.drp-chip:hover {
border-color: var(--accent);
color: var(--accent);
background: var(--accent-light);
}
.drp-chip.drp-chip-active {
background: var(--accent);
border-color: var(--accent);
color: var(--text-inverse);
font-weight: 600;
}
.drp-chip-wide {
padding-left: 12px;
padding-right: 12px;
}
/* Season chips — base (all browsers) */
.drp-chip-season {
border-color: var(--border);
color: var(--text-secondary);
}
.drp-chip-season:hover {
border-color: var(--accent);
color: var(--accent);
background: var(--accent-light);
}
.drp-chip-season.drp-chip-active {
background: var(--accent);
border-color: var(--accent);
color: var(--text-inverse);
}
/* Enhanced with color-mix where supported */
@supports (color: color-mix(in srgb, red, blue)) {
.drp-chip-season {
border-color: color-mix(in srgb, var(--sc, var(--border)) 50%, var(--border));
color: var(--sc, var(--text-secondary));
}
.drp-chip-season:hover {
border-color: var(--sc, var(--accent));
color: var(--sc, var(--accent));
background: color-mix(in srgb, var(--sc, var(--accent)) 8%, transparent);
}
.drp-chip-season.drp-chip-active {
background: var(--sc, var(--accent));
border-color: var(--sc, var(--accent));
}
}
/* Divider + custom inputs */
.drp-divider {
height: 1px;
background: var(--border);
margin: 12px 0 10px;
}
.drp-custom {
display: flex;
align-items: flex-end;
gap: 8px;
}
.drp-custom-field {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
}
.drp-custom-field label {
font-size: 0.625rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--text-muted);
}
.drp-custom-field input[type="date"] {
padding: 7px 9px;
border: 1px solid var(--border);
border-radius: 7px;
font-size: 0.825rem;
background: var(--bg);
color: var(--text-primary);
width: 100%;
transition: border-color 0.12s, box-shadow 0.12s;
}
.drp-custom-field input[type="date"]:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent);
}
.drp-custom-sep {
font-size: 0.75rem;
color: var(--text-muted);
padding-bottom: 9px;
flex-shrink: 0;
}
.drp-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.drp-cancel, .drp-apply {
padding: 7px 16px;
border-radius: 7px;
font-size: 0.825rem;
font-weight: 600;
cursor: pointer;
transition: background 0.12s, color 0.12s;
}
.drp-cancel {
background: transparent;
border: 1px solid var(--border);
color: var(--text-secondary);
}
.drp-cancel:hover {
background: var(--bg-secondary);
}
.drp-apply {
background: var(--accent);
border: 1px solid transparent;
color: var(--text-inverse);
}
.drp-apply:hover {
opacity: 0.88;
}
/* Right-align panel when near viewport edge */
@media (max-width: 480px) {
.drp-panel {
left: auto;
right: 0;
width: 290px;
}
}
/* Multi-select */
.multi-select {
position: relative;
}
.multi-select-trigger {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
min-width: 160px;
padding: 12px 16px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 0.9375rem;
background: var(--surface);
color: var(--text-primary);
cursor: pointer;
text-align: left;
}
.multi-select-trigger:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
border-color: var(--accent);
}
.multi-select-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
.multi-select-arrow {
font-size: 0.6rem;
opacity: 0.4;
margin-inline-start: 8px;
transition: transform 150ms ease;
}
.multi-select-trigger[aria-expanded="true"] .multi-select-arrow {
transform: rotate(180deg);
}
.multi-select-dropdown {
position: absolute;
top: calc(100% + 4px);
left: 0;
min-width: 200px;
width: max-content;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
z-index: 50;
max-height: 240px;
overflow-y: auto;
padding: 4px;
}
.multi-select-dropdown,
.multi-select-dropdown * {
text-transform: none;
letter-spacing: normal;
}
.multi-select-option {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
font-size: 0.875rem;
color: var(--text-primary);
font-weight: normal;
}
.multi-select-option:hover {
background: var(--hover);
}
.multi-select-option input[type="checkbox"] {
width: 16px;
height: 16px;
accent-color: var(--accent);
}
/* Login page */
.login-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: var(--bg);
}
.login-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 48px 40px;
width: 100%;
max-width: 380px;
text-align: center;
}
.login-brand {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 8px;
}
.login-brand h1 {
font-size: 1.5rem;
font-weight: 600;
color: var(--text-primary);
}
.login-subtitle {
color: var(--text-secondary);
font-size: 0.875rem;
margin-bottom: 32px;
}
.login-card form {
display: flex;
flex-direction: column;
gap: 12px;
}
.login-card input {
padding: 14px 16px;
border: 1px solid var(--border);
border-radius: 10px;
font-size: 1.125rem;
text-align: center;
letter-spacing: 0.15em;
background: var(--bg);
color: var(--text-primary);
}
.login-card input:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
border-color: var(--accent);
}
.login-card button {
padding: 14px;
border: none;
border-radius: 10px;
font-size: 1rem;
font-weight: 600;
background: var(--accent);
color: var(--text-inverse);
cursor: pointer;
transition: opacity 150ms ease;
}
.login-card button:hover:not(:disabled) {
opacity: 0.9;
}
.login-card button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.login-error {
color: var(--danger, #dc2626);
font-size: 0.8125rem;
}
.settings-link {
text-align: center;
padding: 32px 0 16px;
}
.settings-link a {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--text-secondary);
font-size: 0.8125rem;
text-decoration: none;
opacity: 0.6;
transition: opacity 150ms ease;
}
.settings-link a:hover {
opacity: 1;
}
/* Settings page */
.settings-page {
padding: 32px;
max-width: 1400px;
margin: 0 auto;
}
.settings-hint {
color: var(--text-secondary);
font-size: 0.875rem;
margin-bottom: 16px;
}
.season-chip {
display: inline-block;
padding: 4px 10px;
border-radius: 6px;
font-size: 0.8125rem;
font-weight: 600;
border: 1px solid;
}
.season-edit-name {
display: flex;
gap: 6px;
align-items: center;
}
.season-edit-name input[type="text"] {
flex: 1;
min-width: 80px;
}
.season-edit-name input[type="color"] {
width: 32px;
height: 32px;
padding: 2px;
border: 1px solid var(--border);
border-radius: 6px;
cursor: pointer;
}
.season-actions {
display: flex;
gap: 6px;
}
.access-badge {
display: inline-block;
font-size: 0.7rem;
padding: 2px 7px;
border-radius: 10px;
background: var(--surface-raised, #f0f0f0);
color: var(--text-secondary, #666);
margin-right: 4px;
}
.access-badge--full {
background: var(--success-light);
color: var(--success);
}
.btn-small {
padding: 4px 10px;
font-size: 0.75rem;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--surface);
color: var(--text-primary);
cursor: pointer;
}
.btn-small:hover {
background: var(--hover);
}
.btn-small.btn-primary {
background: var(--accent);
color: var(--text-inverse);
border-color: var(--accent);
}
.btn-small.btn-danger {
color: var(--danger, #dc2626);
border-color: var(--danger, #dc2626);
}
.btn-small.btn-danger:hover {
background: var(--danger, #dc2626);
color: white;
}
tr.add-row td {
border-top: 2px dashed var(--border);
padding-top: 12px;
}
tr.editing td {
background: var(--hover);
}
.settings-page input[type="text"],
.settings-page input[type="number"],
.settings-page input[type="date"],
.settings-page select {
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 6px;
font-size: 0.8125rem;
background: var(--surface);
color: var(--text-primary);
}
.period-display {
background: var(--bg);
padding: 16px;
border-radius: 8px;
margin-top: 16px;
display: flex;
gap: 32px;
}
.period-box .label {
font-size: 0.6875rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 4px;
}
.period-box .dates {
font-size: 0.875rem;
color: var(--text-primary);
font-weight: 500;
}
/* Period Display Banner */
.period-display-banner {
display: flex;
align-items: center;
justify-content: center;
gap: 32px;
background: var(--bg);
padding: 24px 40px;
border-radius: 12px;
margin-bottom: 28px;
}
.period-display-banner .period-box {
text-align: center;
min-width: 200px;
}
.period-display-banner .period-box.prev {
color: var(--text-secondary);
}
.period-display-banner .period-box.curr {
color: var(--text-primary);
}
.period-display-banner .period-label {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-muted);
margin-bottom: 6px;
}
.period-display-banner .period-value {
font-size: 1.75rem;
font-weight: 700;
margin-bottom: 4px;
}
.period-display-banner .period-dates {
font-size: 0.9375rem;
color: var(--text-secondary);
}
.period-display-banner .period-vs {
font-size: 1rem;
font-weight: 600;
color: var(--text-muted);
padding: 0 12px;
}
/* Comparison Period Picker Layout */
.comparison-periods {
display: flex;
align-items: flex-start;
gap: 24px;
width: 100%;
}
.comparison-period-block {
flex: 1;
min-width: 0;
}
.comparison-period-label {
font-size: 0.6875rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 8px;
padding: 3px 8px;
border-radius: 4px;
display: inline-block;
}
.comparison-period-label.curr-label {
background: rgba(37, 99, 235, 0.1);
color: var(--accent);
}
.comparison-period-label.prev-label {
background: var(--muted-light);
color: var(--text-muted);
}
.comparison-period-vs {
align-self: center;
font-size: 0.875rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
padding: 0 4px;
flex-shrink: 0;
}
@media (max-width: 900px) {
.comparison-periods {
flex-direction: column;
gap: 20px;
}
.comparison-period-vs {
align-self: flex-start;
padding: 4px 0;
}
}
/* Comparison Metrics */
.comparison-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
margin-bottom: 32px;
}
.metric-card {
background: var(--surface);
padding: 24px;
border-radius: var(--radius);
border: 1px solid var(--border);
box-shadow: var(--shadow-sm);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.metric-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow);
}
.metric-card h4 {
font-size: 0.8125rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 14px;
}
.metric-values {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
}
.metric-period {
text-align: center;
}
.metric-period .year {
font-size: 0.75rem;
color: var(--text-muted);
text-transform: uppercase;
margin-bottom: 4px;
}
.metric-period .value {
font-size: 1.25rem;
font-weight: 700;
}
.metric-period.previous .value { color: var(--text-muted); }
.metric-period.current .value { color: var(--text-primary); }
.metric-change {
text-align: center;
padding: 8px 12px;
border-radius: 8px;
min-width: 80px;
}
.metric-change .pct {
font-size: 0.9375rem;
font-weight: 700;
}
.metric-change .abs {
font-size: 0.75rem;
opacity: 0.9;
}
.metric-change.positive {
background: var(--success-light);
color: var(--success);
}
.metric-change.negative {
background: var(--danger-light);
color: var(--danger);
}
.metric-change.pending {
background: var(--muted-light);
color: var(--text-muted);
}
.metric-change .pending-msg {
font-size: 11px;
font-style: italic;
text-align: center;
line-height: 1.3;
}
/* Chart Header with Metric Selector */
.chart-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
flex-wrap: wrap;
gap: 12px;
}
.chart-header h2 {
margin: 0;
}
.chart-selectors {
display: flex;
gap: 8px;
}
.chart-metric-selector {
display: flex;
gap: 2px;
background: var(--bg);
padding: 2px;
border-radius: 6px;
}
/* Toggle switch style (Daily/Weekly) - compact */
.toggle-switch {
display: flex;
background: var(--border);
padding: 2px;
border-radius: 6px;
gap: 1px;
}
.toggle-switch button {
border: none;
background: transparent;
color: var(--text-muted);
padding: 4px 10px;
border-radius: 5px;
font-size: 0.6875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.toggle-switch button:hover:not(.active) {
color: var(--text-secondary);
background: rgba(0,0,0,0.03);
}
.toggle-switch button.active {
background: var(--surface);
color: var(--text-primary);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.chart-metric-selector button {
border: none;
background: transparent;
color: var(--text-muted);
padding: 4px 10px;
border-radius: 5px;
font-size: 0.6875rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.chart-metric-selector button:hover {
color: var(--text-primary);
background: rgba(0,0,0,0.05);
}
.chart-metric-selector button.active {
background: var(--surface);
color: var(--accent);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
font-weight: 600;
}
/* Charts Carousel */
.charts-carousel {
margin-bottom: 32px;
}
/* Inline selectors inside chart cards (mobile) */
.chart-selectors-inline {
display: flex;
gap: 6px;
flex-wrap: wrap;
justify-content: flex-start;
margin-bottom: 12px;
}
.chart-selectors-inline .chart-metric-selector {
flex-wrap: wrap;
}
.chart-selectors-inline .chart-metric-selector button {
padding: 4px 8px;
font-size: 0.6875rem;
}
/* Carousel - elegant card slider */
.carousel {
outline: none;
}
.carousel:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 4px;
border-radius: 8px;
}
.carousel-container {
position: relative;
margin: 0 -6px;
}
.carousel-viewport {
overflow: hidden;
width: 100%;
}
.carousel-track {
display: flex;
transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.carousel-slide {
min-width: 100%;
max-width: 100%;
flex-shrink: 0;
padding: 0 6px;
box-sizing: border-box;
overflow: hidden;
}
.carousel-slide .chart-section,
.carousel-slide .metric-card,
.carousel-slide .stat-card,
.carousel-slide .chart-card {
width: 100%;
margin: 0;
box-shadow: none;
border: 1px solid var(--border);
background: var(--surface);
}
.carousel-slide .chart-section .chart-container,
.carousel-slide .chart-card .chart-container {
height: 240px;
}
/* Hide arrows on mobile - use swipe */
.carousel-arrow {
display: none;
}
/* Dots / Pagination */
.carousel-dots {
display: flex;
justify-content: center;
gap: 6px;
margin-top: 20px;
padding: 8px 0;
}
.carousel-dot {
background: var(--border);
border: none;
width: 8px;
height: 8px;
border-radius: 4px;
padding: 18px;
background-clip: content-box;
cursor: pointer;
transition: background 0.3s ease, width 0.3s ease;
min-width: 44px;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
.carousel-dot .dot-label {
display: none;
}
.carousel-dot:hover {
background: var(--text-muted);
}
.carousel-dot.active {
background: var(--accent);
width: 24px;
}
/* Labeled dots variant (for named tabs) */
.carousel-dots.labeled {
gap: 8px;
}
.carousel-dots.labeled .carousel-dot {
width: auto;
height: auto;
padding: 8px 16px;
border-radius: 20px;
background: var(--bg);
border: 1px solid var(--border);
}
.carousel-dots.labeled .carousel-dot .dot-label {
display: inline;
font-size: 0.75rem;
color: var(--text-muted);
font-weight: 500;
}
.carousel-dots.labeled .carousel-dot:hover {
border-color: var(--accent);
background: var(--bg);
}
.carousel-dots.labeled .carousel-dot.active {
width: auto;
background: var(--accent);
border-color: var(--accent);
}
.carousel-dots.labeled .carousel-dot.active .dot-label {
color: var(--text-inverse);
}
/* Chart Sections */
.chart-section {
background: var(--surface);
padding: 20px;
border-radius: var(--radius);
border: 1px solid var(--border);
margin-bottom: 16px;
}
.carousel-slide .chart-section {
margin-bottom: 0;
padding: 16px;
overflow: hidden;
}
.carousel-slide .chart-section .chart-header {
flex-direction: row !important;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
gap: 8px;
}
.carousel-slide .chart-section .chart-header h2 {
font-size: 0.8125rem;
white-space: nowrap;
margin: 0;
}
.carousel-slide .chart-section .chart-header .chart-metric-selector {
flex-shrink: 0;
}
.carousel-slide .chart-section .chart-container,
.carousel-slide .chart-card .chart-container {
width: 100%;
overflow: hidden;
}
.chart-section h2 {
font-size: 0.875rem;
font-weight: 600;
margin-bottom: 20px;
}
.chart-section .chart-container {
height: 380px;
}
/* Desktop/Mobile visibility */
.mobile-only {
display: none;
}
.desktop-only {
display: grid;
}
/* Removed old .filters-* styles - now using .controls-* for consistency */
/* Stats Carousel (mobile) */
.stats-carousel {
margin-bottom: 32px;
}
/* Cards Carousel (mobile) */
.cards-carousel {
margin-bottom: 32px;
}
.cards-carousel .carousel-dots {
flex-wrap: wrap;
}
.cards-carousel .carousel-dot {
padding: 6px 10px;
}
.cards-carousel .dot-label {
font-size: 0.6875rem;
}
/* Responsive */
@media (max-width: 1024px) {
.stats-grid,
.comparison-grid {
grid-template-columns: repeat(2, 1fr);
}
.charts-grid {
grid-template-columns: 1fr;
}
}
/* Mobile Bottom Navigation */
.mobile-nav {
display: none;
}
@media (max-width: 768px) {
/* Hide desktop nav links, show only brand */
.nav-links {
display: none;
}
.nav-bar {
padding: 0 16px;
height: 52px;
}
.nav-content {
justify-content: center;
}
.nav-brand-name {
font-size: 0.9375rem;
}
.nav-brand-icon {
width: 18px;
height: 18px;
}
.data-source-select {
font-size: 0.8125rem;
padding: 2px 16px 2px 4px;
}
/* Mobile Bottom Navigation */
.mobile-nav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--surface);
border-top: 1px solid var(--border);
padding: 8px 16px;
padding-bottom: max(8px, env(safe-area-inset-bottom));
justify-content: space-around;
align-items: center;
z-index: 1000;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.mobile-nav-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 8px 16px;
border: none;
background: transparent;
color: var(--text-muted);
text-decoration: none;
font-size: 0.65rem;
font-weight: 600;
border-radius: 12px;
transition: all 0.2s;
cursor: pointer;
}
.mobile-nav-item:hover,
.mobile-nav-item.active {
color: var(--accent);
background: rgba(37, 99, 235, 0.08);
}
.mobile-nav-item.active svg {
stroke-width: 2.5;
}
/* Add padding to main content for bottom nav */
.dashboard,
.comparison {
padding-bottom: 80px;
}
.data-source-toggle {
margin-left: 8px;
padding: 2px;
}
.data-source-toggle button {
padding: 4px 8px;
font-size: 0.6875rem;
}
/* Desktop/Mobile visibility switch */
.mobile-only {
display: block;
}
.desktop-only {
display: none;
}
/* Collapsible controls (Comparison) */
.controls-toggle {
display: block;
}
.controls.collapsed .controls-body {
display: none;
}
.controls.collapsed {
padding: 16px;
}
/* Dashboard now uses .controls - removed duplicate .filters styles */
/* Chart header */
.chart-header {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.chart-selectors {
flex-wrap: wrap;
width: 100%;
}
.chart-metric-selector {
flex-wrap: wrap;
}
/* Carousel - overlay arrows on mobile */
.carousel-arrow {
width: 28px;
height: 28px;
font-size: 1rem;
opacity: 0.8;
}
.carousel-arrow.prev {
left: 4px;
}
.carousel-arrow.next {
right: 4px;
}
.carousel-dots {
gap: 4px;
flex-wrap: wrap;
}
.carousel-dot {
padding: 6px 10px;
}
.carousel-dot .dot-label {
font-size: 0.6875rem;
}
/* Control row */
.control-row {
flex-direction: column;
align-items: stretch;
}
.control-group {
width: 100%;
}
.control-group select,
.control-group input[type="date"] {
width: 100%;
min-width: unset;
}
/* Period display */
.period-display {
flex-direction: column;
gap: 12px;
}
/* Metric cards - keep horizontal layout on mobile */
.metric-card {
padding: 16px;
}
.metric-values {
flex-direction: row;
gap: 8px;
}
.metric-period .value {
font-size: 1rem;
}
.metric-change {
padding: 4px 8px;
min-width: 60px;
}
.metric-change .pct {
font-size: 0.75rem;
}
.metric-change .abs {
font-size: 0.5625rem;
}
}
@media (max-width: 640px) {
.dashboard, .comparison {
padding: 12px;
}
.stats-grid,
.comparison-grid {
grid-template-columns: 1fr;
}
/* Page titles */
.page-title {
margin-bottom: 20px;
}
.page-title h1 {
font-size: 1.25rem;
}
.page-title p {
font-size: 0.75rem;
}
/* Stat cards */
.stat-card {
padding: 16px;
}
.stat-value {
font-size: 1.5rem;
}
/* Chart section */
.chart-section {
padding: 12px;
}
.chart-section h2 {
font-size: 0.875rem;
margin-bottom: 12px;
}
.chart-metric-selector button {
padding: 5px 8px;
font-size: 0.625rem;
}
/* Controls */
.controls {
padding: 12px;
}
/* Carousel even tighter */
.carousel-arrow {
width: 24px;
height: 24px;
font-size: 0.875rem;
}
.carousel-arrow.prev {
left: 2px;
}
.carousel-arrow.next {
right: 2px;
}
}
@media (max-width: 400px) {
/* Very small screens */
.nav-bar {
padding: 0 8px;
}
.nav-brand-name {
font-size: 0.875rem;
}
.nav-link {
padding: 4px 6px;
font-size: 0.6875rem;
}
.data-source-toggle button {
padding: 3px 6px;
font-size: 0.625rem;
}
.carousel-dot {
padding: 4px 6px;
}
.carousel-dot .dot-label {
font-size: 0.5625rem;
}
}
/* Chart Export Button & Header */
.exportable-chart-wrapper {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
}
.chart-header-with-export {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 12px;
padding-right: 44px; /* Space for absolute download button */
}
html[dir="rtl"] .chart-header-with-export {
padding-right: 0;
padding-left: 44px;
}
.chart-header-with-export h2 {
margin: 0;
font-size: 0.9375rem;
font-weight: 600;
color: var(--text-primary);
line-height: 1.3;
}
.chart-header-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
flex-wrap: wrap;
}
.exportable-chart {
position: relative;
flex: 1;
min-height: 0;
}
/* Explicit height when chart-container class is applied */
.exportable-chart.chart-container {
flex: none;
height: 380px;
}
/* Download button - always top corner, outside normal flow */
.exportable-chart-wrapper .chart-export-btn,
.exportable-chart-wrapper .chart-export-btn.visible {
position: absolute;
top: 0;
right: 0;
left: auto;
z-index: 10;
width: 32px;
height: 32px;
min-width: 32px;
border: none;
background: var(--bg);
border-radius: 6px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
transition: background 0.15s ease, color 0.15s ease;
flex-shrink: 0;
}
html[dir="rtl"] .exportable-chart-wrapper .chart-export-btn,
html[dir="rtl"] .exportable-chart-wrapper .chart-export-btn.visible {
right: auto;
left: 0;
}
.chart-export-btn:hover {
background: var(--border);
color: var(--text-primary);
}
.chart-export-btn.visible {
opacity: 1;
}
.chart-canvas-wrapper {
width: 100%;
height: 100%;
}
/* Force LTR for chart canvas - fixes RTL label alignment issues */
.chart-canvas-wrapper,
.chart-canvas-wrapper canvas,
.chart-container canvas,
.exportable-chart canvas {
direction: ltr !important;
text-align: left !important;
}
/* ========================================
Focus Visible — Keyboard accessibility
======================================== */
.drp-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drp-year-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drp-cancel:focus-visible,
.drp-apply:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-refresh-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.multi-select-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.toggle-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chart-metric-selector button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.controls-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alt-filter-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ========================================
Alt-page components (Dashboard + Comparison)
Font vars are set via style prop on .alt-page:
--alt-body-font, --alt-display-font, --alt-mono-font
======================================== */
:root {
--alt-body-font: 'Outfit', sans-serif;
--alt-display-font: 'DM Serif Display', serif;
--alt-mono-font: ui-monospace, 'Cascadia Code', monospace;
}
/* ── page shell ── */
.alt-page { max-width:1400px; margin:0 auto; padding:48px 24px 80px; font-family:var(--alt-body-font); width:100%; box-sizing:border-box; }
/* ── header ── */
.alt-back { display:inline-flex; align-items:center; gap:6px; font-size:.8125rem; color:var(--text-muted); text-decoration:none; margin-bottom:28px; transition:color .15s; }
.alt-back:hover { color:var(--accent); }
.alt-page-title { font-family:var(--alt-display-font); font-size:2.25rem; font-weight:400; color:var(--text-primary); margin:0 0 6px; letter-spacing:-.03em; line-height:1.15; }
.alt-page-sub { font-size:.9375rem; color:var(--text-muted); margin:0 0 40px; font-weight:300; }
/* ── hero (Dashboard) ── */
.dalt-hero { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); overflow:hidden; margin-bottom:24px; }
.dalt-hero-inner { display:flex; align-items:center; justify-content:space-between; padding:24px 28px; gap:16px; flex-wrap:wrap; }
.dalt-hero-name { font-family:var(--alt-display-font); font-size:2.5rem; font-weight:400; color:var(--text-primary); line-height:1; letter-spacing:-.025em; margin-bottom:6px; }
.dalt-hero-range { font-family:var(--alt-mono-font); font-size:.875rem; color:var(--text-muted); letter-spacing:.01em; }
.dalt-hero-btn { display:inline-flex; align-items:center; gap:5px; font-family:var(--alt-body-font); font-size:.8125rem; font-weight:500; color:var(--text-muted); background:none; border:1px solid var(--border); border-radius:8px; padding:7px 12px; cursor:pointer; transition:color .15s,border-color .15s; white-space:nowrap; }
.dalt-hero-btn:hover { color:var(--accent); border-color:var(--accent); }
.dalt-hero-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ── period row (Comparison) ── */
.alt-period-row { display:grid; grid-template-columns:1fr auto 1fr; align-items:stretch; margin-bottom:32px; }
.alt-vs { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:0 20px; position:relative; }
.alt-vs-line { position:absolute; top:0; bottom:0; left:50%; width:1px; background:var(--border); }
.alt-vs-badge { font-family:var(--alt-display-font); font-size:.9rem; font-style:italic; color:var(--text-muted); background:var(--bg); padding:6px 10px; border:1px solid var(--border); border-radius:20px; position:relative; z-index:1; }
/* ── period card (Comparison) ── */
.alt-card { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); overflow:hidden; transition:border-color .2s,box-shadow .2s; display:flex; flex-direction:column; }
.alt-card--current { border-radius:var(--radius) 0 0 var(--radius); }
.alt-card--previous { border-radius:0 var(--radius) var(--radius) 0; }
[dir="rtl"] .alt-card--current { border-radius:0 var(--radius) var(--radius) 0; }
[dir="rtl"] .alt-card--previous { border-radius:var(--radius) 0 0 var(--radius); }
.alt-card:hover { box-shadow:var(--shadow); }
.alt-card--current:hover,.alt-card--current.alt-card--open { border-color:var(--accent); }
.alt-card--previous:hover,.alt-card--previous.alt-card--open { border-color:#94a3b8; }
.alt-card-bar { height:3px; width:100%; }
.alt-card--current .alt-card-bar { background:var(--accent); }
.alt-card--previous .alt-card-bar { background:#94a3b8; }
.alt-card-body { padding:24px 28px 20px; flex:1; }
.alt-role-row { display:flex; align-items:baseline; gap:8px; margin-bottom:12px; }
.alt-role { font-size:.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; }
.alt-card--current .alt-role { color:var(--accent); }
.alt-card--previous .alt-role { color:#64748b; }
.alt-role-hint { font-size:.75rem; color:var(--text-muted); font-weight:300; }
.alt-period-name { font-family:var(--alt-display-font); font-size:2.25rem; font-weight:400; color:var(--text-primary); line-height:1.1; letter-spacing:-.02em; margin-bottom:8px; }
.alt-date-range { font-family:var(--alt-mono-font); font-size:.8125rem; color:var(--text-muted); letter-spacing:.01em; margin-bottom:20px; }
.alt-change-btn { display:inline-flex; align-items:center; gap:5px; font-family:var(--alt-body-font); font-size:.8125rem; font-weight:500; color:var(--text-muted); background:none; border:none; padding:0; cursor:pointer; transition:color .15s; }
.alt-card--current .alt-change-btn:hover { color:var(--accent); }
.alt-card--previous .alt-change-btn:hover { color:var(--text-primary); }
/* ── picker ── */
@keyframes altPickIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.alt-picker { border-top:1px solid var(--border); padding:16px 24px 20px; background:var(--bg); animation:altPickIn 180ms cubic-bezier(.16,1,.3,1); }
.alt-picker-year { display:flex; align-items:center; gap:16px; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.alt-yr-val { font-family:var(--alt-display-font); font-size:1.25rem; color:var(--text-primary); min-width:50px; text-align:center; }
.alt-yr-btn { width:28px; height:28px; display:flex; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--text-secondary); cursor:pointer; transition:background .12s,border-color .12s,color .12s; }
.alt-yr-btn:hover:not(:disabled) { background:var(--accent); border-color:var(--accent); color:var(--text-inverse); }
.alt-yr-btn:disabled { opacity:.3; cursor:not-allowed; }
.alt-yr-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alt-picker-section { font-size:.625rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin:10px 0 6px; }
.alt-chips { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:4px; }
.alt-chip { font-family:var(--alt-body-font); padding:4px 9px; border:1px solid var(--border); border-radius:6px; background:var(--surface); color:var(--text-secondary); font-size:.8rem; font-weight:500; cursor:pointer; transition:background .1s,border-color .1s,color .1s; }
.alt-chip:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-light); }
.alt-chip-on { background:var(--accent)!important; border-color:var(--accent)!important; color:var(--text-inverse)!important; font-weight:600!important; }
.alt-chip-wide { padding-left:14px; padding-right:14px; }
.alt-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alt-picker-div { height:1px; background:var(--border); margin:12px 0 10px; }
.alt-custom { display:flex; align-items:flex-end; gap:8px; }
.alt-custom-f { flex:1; display:flex; flex-direction:column; gap:4px; }
.alt-custom-f label { font-size:.625rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--text-muted); }
.alt-custom-f input[type="date"] { padding:7px 9px; border:1px solid var(--border); border-radius:7px; font-size:.825rem; background:var(--surface); color:var(--text-primary); width:100%; }
.alt-custom-f input[type="date"]:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px rgba(37,99,235,.12); }
.alt-custom-arrow { font-size:.75rem; color:var(--text-muted); padding-bottom:9px; flex-shrink:0; }
.alt-footer { display:flex; justify-content:flex-end; gap:8px; }
.alt-cancel,.alt-apply { padding:7px 16px; border-radius:7px; font-size:.825rem; font-weight:600; cursor:pointer; font-family:var(--alt-body-font); transition:background .12s,color .12s; }
.alt-cancel { background:transparent; border:1px solid var(--border); color:var(--text-secondary); }
.alt-cancel:hover { background:var(--bg-secondary); }
.alt-apply { background:var(--accent); border:1px solid transparent; color:#fff; }
.alt-apply:hover { opacity:.88; }
.alt-cancel:focus-visible, .alt-apply:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ── multi-select ── */
.altms { position:relative; }
.altms-trigger { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text-secondary); font-family:var(--alt-body-font); font-size:.875rem; cursor:pointer; transition:border-color .15s,color .15s,background .15s; white-space:nowrap; }
.altms-trigger:hover { border-color:var(--accent); color:var(--accent); }
.altms-trigger--active { border-color:var(--accent); color:var(--accent); background:var(--accent-light); }
.altms-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.altms-label { max-width:140px; overflow:hidden; text-overflow:ellipsis; }
.altms-chevron { transition:transform .18s; flex-shrink:0; color:currentColor; }
.altms-chevron--open { transform:rotate(180deg); }
.altms-dropdown { position:absolute; top:calc(100% + 6px); left:0; z-index:200; min-width:200px; background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.12); overflow:hidden; animation:altPickIn 140ms cubic-bezier(.16,1,.3,1); }
[dir="rtl"] .altms-dropdown { left:auto; right:0; }
.altms-list { max-height:220px; overflow-y:auto; padding:6px; display:flex; flex-direction:column; gap:2px; }
.altms-option { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; cursor:pointer; transition:background .1s; }
.altms-option:hover { background:var(--bg); }
.altms-option--checked { background:var(--accent-light); }
.altms-check { position:absolute; opacity:0; width:0; height:0; pointer-events:none; }
.altms-check-box { width:16px; height:16px; border:1.5px solid var(--border); border-radius:4px; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .1s,border-color .1s; }
.altms-option--checked .altms-check-box { background:var(--accent); border-color:var(--accent); color:var(--text-inverse); }
.altms-opt-label { font-family:var(--alt-body-font); font-size:.875rem; color:var(--text-primary); }
.altms-clear { width:100%; padding:8px 14px; border-top:1px solid var(--border); background:none; border-left:none; border-right:none; border-bottom:none; font-family:var(--alt-body-font); font-size:.8125rem; color:var(--danger); cursor:pointer; text-align:start; transition:background .1s; }
.altms-clear:hover { background:var(--danger-light); }
.altms-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ── filter bar ── */
.alt-filter-bar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:32px; padding:14px 20px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.alt-filter-label { font-size:.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); white-space:nowrap; }
.alt-filter-sep { width:1px; height:20px; background:var(--border); flex-shrink:0; }
.alt-filter-spacer { flex:1; min-width:0; }
.alt-vat-toggle { display:flex; align-items:center; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.alt-vat-opt { font-family:var(--alt-body-font); font-size:.75rem; font-weight:500; padding:5px 10px; background:var(--surface); color:var(--text-muted); cursor:pointer; border:none; transition:background .1s,color .1s; }
.alt-vat-opt--on { background:var(--accent); color:var(--text-inverse); }
.alt-filter-reset { font-size:.8125rem; color:var(--text-muted); background:none; border:none; cursor:pointer; padding:4px 6px; transition:color .15s; font-family:var(--alt-body-font); }
.alt-filter-reset:hover { color:var(--danger); }
/* ── metrics ── */
.alt-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; margin-bottom:40px; }
.alt-metric { background:var(--surface); padding:24px 22px; }
.alt-metric-title { font-size:.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin:0 0 12px; }
.alt-metric-value { font-family:var(--alt-display-font); font-size:1.875rem; font-weight:400; color:var(--text-primary); line-height:1; margin-bottom:10px; letter-spacing:-.02em; }
.alt-metric-footer { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.alt-change { font-size:.75rem; font-weight:600; padding:2px 8px; border-radius:20px; white-space:nowrap; font-family:var(--alt-body-font); }
.alt-change--up { background:var(--success-light); color:var(--success); }
.alt-change--down { background:var(--danger-light); color:var(--danger); }
.alt-change--flat { background:var(--muted-light); color:var(--text-muted); }
.alt-metric-prev { font-size:.75rem; color:var(--text-muted); font-family:var(--alt-mono-font); }
/* ── section heading ── */
.alt-section-heading { display:flex; align-items:center; gap:12px; margin:0 0 20px; }
.alt-section-heading h2 { font-family:var(--alt-display-font); font-size:1.375rem; font-weight:400; color:var(--text-primary); margin:0; letter-spacing:-.02em; }
.alt-section-heading::after { content:''; flex:1; height:1px; background:var(--border); }
/* ── charts (Dashboard) ── */
.dalt-charts-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.dalt-chart-full { grid-column:1/-1; }
.alt-chart-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:24px 24px 20px; min-width:0; overflow:hidden; }
.alt-chart-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; gap:12px; flex-wrap:wrap; }
.alt-chart-title { font-family:var(--alt-display-font); font-size:1.25rem; font-weight:400; color:var(--text-primary); margin:0; letter-spacing:-.02em; font-style:italic; }
.alt-chart-controls { display:flex; gap:5px; flex-wrap:wrap; }
.alt-ctrl { font-family:var(--alt-body-font); font-size:.75rem; font-weight:500; padding:4px 10px; border:1px solid var(--border); border-radius:6px; background:var(--bg); color:var(--text-secondary); cursor:pointer; transition:background .1s,border-color .1s,color .1s; }
.alt-ctrl:hover { border-color:var(--accent); color:var(--accent); }
.alt-ctrl-on { background:var(--accent)!important; border-color:var(--accent)!important; color:var(--text-inverse)!important; }
.alt-ctrl-sep { width:1px; height:20px; background:var(--border); align-self:center; }
.alt-ctrl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alt-chart-wrap { position:relative; height:260px; overflow:hidden; direction:ltr; width:100%; }
.alt-chart-wrap--tall { height:320px; }
/* ── charts (Comparison) — single-column grid, taller wrap ── */
.alt-charts { display:grid; grid-template-columns:1fr; gap:24px; }
/* ── responsive (Dashboard) ── */
@media (max-width:700px) {
.dalt-hero-name { font-size:1.875rem; }
.dalt-charts-grid { grid-template-columns:1fr; }
.dalt-chart-full { grid-column:auto; }
.alt-metrics { grid-template-columns:1fr 1fr; }
.alt-page-title { font-size:1.75rem; }
.altms-label { max-width:100px; }
.alt-filter-bar { overflow-x:auto; flex-wrap:nowrap; padding-inline:12px; -webkit-overflow-scrolling:touch; }
.altms-trigger { flex-shrink:0; }
.alt-vat-toggle { flex-shrink:0; }
.alt-filter-spacer { display:none; }
}
/* ── responsive (Comparison) ── */
@media (max-width:680px) {
.alt-period-row { grid-template-columns:1fr; }
.alt-card--current,.alt-card--previous { border-radius:var(--radius); }
.alt-vs { flex-direction:row; padding:10px 0; }
.alt-vs-line { position:static; width:100%; height:1px; }
.alt-period-name { font-size:1.75rem; }
.alt-chart-header { flex-direction:column; }
}
/* ========================================
Reduced Motion
======================================== */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.carousel-track {
transition: none;
}
}
/* ========================================
Loading Skeleton
======================================== */
@keyframes skeleton-pulse {
0%, 100% { opacity: 0.4; }
50% { opacity: 1; }
}
.skeleton-container {
padding: 80px 24px 24px;
max-width: 1200px;
margin: 0 auto;
}
.skeleton-stats {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.skeleton-card {
background: var(--muted-light);
border-radius: 12px;
padding: 20px;
animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-card-wide {
grid-column: span 2;
}
.skeleton-line {
background: var(--border);
border-radius: 6px;
}
.skeleton-line-short {
width: 40%;
height: 14px;
margin-bottom: 12px;
}
.skeleton-line-tall {
width: 100%;
height: 120px;
}
.skeleton-card-wide .skeleton-line-tall {
height: 200px;
}
.skeleton-charts {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
@media (max-width: 768px) {
.skeleton-stats {
grid-template-columns: repeat(2, 1fr);
}
.skeleton-charts {
grid-template-columns: 1fr;
}
.skeleton-card-wide {
grid-column: span 1;
}
}