/* ========== 设计系统 Design Tokens ========== */
:root,
[data-theme="dark"] {
	--bg: #0b0f19;
	--bg-panel: #131a2a;
	--bg-elev: #1b2538;
	--bg-hover: #222d44;
	--text: #e8ecf4;
	--text-2: #8a94a6;
	--text-disabled: #4a5468;
	--primary: #6366f1;
	--primary-2: #8b5cf6;
	--accent-end: #ec4899;
	--success: #10b981;
	--warning: #f59e0b;
	--danger: #ef4444;
	--info: #3b82f6;
	--border: rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.14);
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
	--glow: 0 0 24px rgba(99, 102, 241, 0.35);
	--glass: rgba(19, 26, 42, 0.72);
	--sidebar-w: 240px;
	--sidebar-w-collapsed: 64px;
	--topbar-h: 64px;
	--radius-sm: 6px;
	--radius-btn: 8px;
	--radius-card: 12px;
	--radius-modal: 16px;
	--font-cn: "PingFang SC", "Microsoft YaHei", sans-serif;
	--font-en: "Inter", "SF Pro Display", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;
	--grad-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
	--grad-primary-h: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
	--indicator: linear-gradient(180deg, #8b5cf6, #ec4899);
}

[data-theme="light"] {
	--bg: #f6f8fc;
	--bg-panel: #ffffff;
	--bg-elev: #ffffff;
	--bg-hover: #f0f3fa;
	--text: #1a2233;
	--text-2: #5a6577;
	--text-disabled: #9aa3b2;
	--border: rgba(0, 0, 0, 0.06);
	--border-strong: #e5e9f2;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
	--shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.25);
	--glow: 0 0 24px rgba(99, 102, 241, 0.2);
	--glass: rgba(255, 255, 255, 0.78);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
	margin: 0;
	min-height: 100%;
	font-family: var(--font-en), var(--font-cn);
	font-size: 14px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4 {
	margin: 0;
	line-height: 1.3;
	font-weight: 650;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea {
	font: inherit;
	color: inherit;
}
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
	background: var(--text-disabled);
	border-radius: 999px;
}
