Files
syops/frontend/src/styles/tokens.css
T
2026-05-27 16:06:48 +08:00

100 lines
3.2 KiB
CSS

/**
* L1 Design Tokens — single source for light/dark colors.
* Toggle theme via html.dark (useTheme); do not duplicate values in components.
*/
:root {
/* Surfaces */
--bg-page: #f8fafc;
--bg-surface: #ffffff;
--bg-surface-soft: #f8fafc;
--bg-surface-strong: #f1f5f9;
/* Text */
--text-primary: #0f172a;
--text-secondary: #334155;
--text-muted: #64748b;
/* Borders & effects */
--border-default: #e2e8f0;
--border-subtle: #f1f5f9;
--overlay-soft: rgba(15, 23, 42, 0.4);
--shadow-elevated: 0 8px 30px -12px rgba(15, 23, 42, 0.2);
--glow-accent: 0 0 0 1px rgba(14, 165, 233, 0.18), 0 16px 40px -22px rgba(14, 165, 233, 0.45);
--focus-ring: rgba(14, 165, 233, 0.35);
/* Status — backgrounds & foregrounds */
--status-success-bg: #eef8e8;
--status-success-border: #b7e2a7;
--status-success-fg: #389e0d;
--status-info-bg: #eaf4ff;
--status-info-border: #9fcbff;
--status-info-fg: #1677ff;
--status-warning-bg: #fff8e8;
--status-warning-border: #ffd88a;
--status-warning-fg: #d48806;
--status-error-bg: #fff1f0;
--status-error-border: #ffb3b0;
--status-error-fg: #cf1322;
/* L3 layout constants */
--header-height: 3.5rem;
--sidebar-width: 16rem;
--sidebar-collapsed-width: 4rem;
--content-max-width: 80rem;
/* Spacing rhythm (L2/L3 reference — prefer semantic classes over raw gap-*) */
--space-page-x: 1rem;
--space-page-x-md: 2rem;
--space-section: 1.5rem;
--space-section-lg: 2rem;
--space-card: 1.5rem;
--space-form: 1rem;
--radius-control: 0.75rem;
--radius-surface: 1rem;
--glass-panel-bg: rgba(255, 255, 255, 0.68);
--glass-panel-border: rgba(148, 163, 184, 0.26);
--chat-composer-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%);
--chat-composer-shadow: 0 14px 28px -20px rgba(15, 23, 42, 0.38);
--chat-composer-shadow-focus: 0 16px 34px -22px rgba(14, 165, 233, 0.45);
}
html.dark {
color-scheme: dark;
--bg-page: #020617;
--bg-surface: #0b1220;
--bg-surface-soft: #0f172a;
--bg-surface-strong: #1e293b;
--text-primary: #f8fafc;
--text-secondary: #cbd5e1;
--text-muted: #94a3b8;
--border-default: #334155;
--border-subtle: #1e293b;
--overlay-soft: rgba(2, 6, 23, 0.72);
--shadow-elevated: 0 12px 30px -16px rgba(2, 6, 23, 0.85);
--glow-accent: 0 0 0 1px rgba(56, 189, 248, 0.28), 0 20px 44px -24px rgba(56, 189, 248, 0.5);
--focus-ring: rgba(56, 189, 248, 0.4);
--status-success-bg: rgba(34, 197, 94, 0.12);
--status-success-border: rgba(34, 197, 94, 0.35);
--status-success-fg: #86efac;
--status-info-bg: rgba(56, 189, 248, 0.12);
--status-info-border: rgba(56, 189, 248, 0.35);
--status-info-fg: #7dd3fc;
--status-warning-bg: rgba(250, 204, 21, 0.12);
--status-warning-border: rgba(250, 204, 21, 0.35);
--status-warning-fg: #fde047;
--status-error-bg: rgba(239, 68, 68, 0.12);
--status-error-border: rgba(239, 68, 68, 0.35);
--status-error-fg: #fca5a5;
--glass-panel-bg: rgba(2, 6, 23, 0.66);
--glass-panel-border: rgba(71, 85, 105, 0.5);
--chat-composer-gradient: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(10, 16, 30, 0.92) 100%);
--chat-composer-shadow: 0 18px 36px -28px rgba(2, 6, 23, 0.96);
--chat-composer-shadow-focus: 0 16px 34px -22px rgba(56, 189, 248, 0.45);
}