421 lines
11 KiB
CSS
421 lines
11 KiB
CSS
@import "tailwindcss";
|
|
@import "tw-animate-css";
|
|
|
|
/* Sonner toast styles */
|
|
[data-sonner-toaster] {
|
|
--width: 356px;
|
|
--border-radius: var(--radius);
|
|
font-family: inherit;
|
|
z-index: 9999 !important;
|
|
}
|
|
|
|
[data-sonner-toast] {
|
|
background: var(--popover) !important;
|
|
color: var(--popover-foreground) !important;
|
|
border: 1px solid var(--border) !important;
|
|
border-radius: var(--radius) !important;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|
|
}
|
|
|
|
@custom-variant dark (&:is(.dark *));
|
|
|
|
@theme inline {
|
|
--color-background: var(--background);
|
|
--color-foreground: var(--foreground);
|
|
--color-card: var(--card);
|
|
--color-card-foreground: var(--card-foreground);
|
|
--color-popover: var(--popover);
|
|
--color-popover-foreground: var(--popover-foreground);
|
|
--color-primary: var(--primary);
|
|
--color-primary-foreground: var(--primary-foreground);
|
|
--color-secondary: var(--secondary);
|
|
--color-secondary-foreground: var(--secondary-foreground);
|
|
--color-muted: var(--muted);
|
|
--color-muted-foreground: var(--muted-foreground);
|
|
--color-accent: var(--accent);
|
|
--color-accent-foreground: var(--accent-foreground);
|
|
--color-destructive: var(--destructive);
|
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
--color-border: var(--border);
|
|
--color-input: var(--input);
|
|
--color-ring: var(--ring);
|
|
--radius-sm: calc(var(--radius) - 4px);
|
|
--radius-md: calc(var(--radius) - 2px);
|
|
--radius-lg: var(--radius);
|
|
--radius-xl: calc(var(--radius) + 4px);
|
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
--color-sidebar-border: var(--sidebar-border);
|
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
--color-sidebar-accent: var(--sidebar-accent);
|
|
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
--color-sidebar-primary: var(--sidebar-primary);
|
|
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
--color-sidebar: var(--sidebar);
|
|
--color-chart-5: var(--chart-5);
|
|
--color-chart-4: var(--chart-4);
|
|
--color-chart-3: var(--chart-3);
|
|
--color-chart-2: var(--chart-2);
|
|
--color-chart-1: var(--chart-1);
|
|
--radius-2xl: calc(var(--radius) + 8px);
|
|
--radius-3xl: calc(var(--radius) + 12px);
|
|
--radius-4xl: calc(var(--radius) + 16px);
|
|
}
|
|
|
|
:root {
|
|
--background: oklch(1 0 0);
|
|
--foreground: oklch(0.145 0 0);
|
|
--card: oklch(1 0 0);
|
|
--card-foreground: oklch(0.145 0 0);
|
|
--popover: oklch(1 0 0);
|
|
--popover-foreground: oklch(0.145 0 0);
|
|
--primary: oklch(0.205 0 0);
|
|
--primary-foreground: oklch(0.985 0 0);
|
|
--secondary: oklch(0.97 0 0);
|
|
--secondary-foreground: oklch(0.205 0 0);
|
|
--muted: oklch(0.97 0 0);
|
|
--muted-foreground: oklch(0.556 0 0);
|
|
--accent: oklch(0.97 0 0);
|
|
--accent-foreground: oklch(0.205 0 0);
|
|
--destructive: oklch(0.577 0.245 27.325);
|
|
--destructive-foreground: oklch(0.577 0.245 27.325);
|
|
--border: oklch(0.922 0 0);
|
|
--input: oklch(0.922 0 0);
|
|
--ring: oklch(0.708 0 0);
|
|
--radius: 0.625rem;
|
|
--chart-1: oklch(0.646 0.222 41.116);
|
|
--chart-2: oklch(0.6 0.118 184.704);
|
|
--chart-3: oklch(0.398 0.07 227.392);
|
|
--chart-4: oklch(0.828 0.189 84.429);
|
|
--chart-5: oklch(0.769 0.188 70.08);
|
|
--sidebar: oklch(0.985 0 0);
|
|
--sidebar-foreground: oklch(0.145 0 0);
|
|
--sidebar-primary: oklch(0.205 0 0);
|
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
--sidebar-accent: oklch(0.97 0 0);
|
|
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
--sidebar-border: oklch(0.922 0 0);
|
|
--sidebar-ring: oklch(0.708 0 0);
|
|
}
|
|
|
|
.dark {
|
|
--background: oklch(0.22 0 0);
|
|
--foreground: oklch(0.985 0 0);
|
|
--card: oklch(0.26 0 0);
|
|
--card-foreground: oklch(0.985 0 0);
|
|
--popover: oklch(0.26 0 0);
|
|
--popover-foreground: oklch(0.985 0 0);
|
|
--primary: oklch(0.922 0 0);
|
|
--primary-foreground: oklch(0.205 0 0);
|
|
--secondary: oklch(0.32 0 0);
|
|
--secondary-foreground: oklch(0.985 0 0);
|
|
--muted: oklch(0.32 0 0);
|
|
--muted-foreground: oklch(0.708 0 0);
|
|
--accent: oklch(0.32 0 0);
|
|
--accent-foreground: oklch(0.985 0 0);
|
|
--destructive: oklch(0.704 0.191 22.216);
|
|
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
--border: oklch(1 0 0 / 12%);
|
|
--input: oklch(1 0 0 / 15%);
|
|
--ring: oklch(0.556 0 0);
|
|
--chart-1: oklch(0.488 0.243 264.376);
|
|
--chart-2: oklch(0.696 0.17 162.48);
|
|
--chart-3: oklch(0.769 0.188 70.08);
|
|
--chart-4: oklch(0.627 0.265 303.9);
|
|
--chart-5: oklch(0.645 0.246 16.439);
|
|
--sidebar: oklch(0.26 0 0);
|
|
--sidebar-foreground: oklch(0.985 0 0);
|
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
--sidebar-accent: oklch(0.32 0 0);
|
|
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
--sidebar-border: oklch(1 0 0 / 12%);
|
|
--sidebar-ring: oklch(0.556 0 0);
|
|
}
|
|
|
|
@layer base {
|
|
* {
|
|
@apply outline-ring/50;
|
|
}
|
|
*,
|
|
::before,
|
|
::after {
|
|
border-color: transparent;
|
|
}
|
|
.border,
|
|
[class*="border-"] {
|
|
border-color: var(--border);
|
|
}
|
|
body {
|
|
@apply bg-background text-foreground antialiased;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
}
|
|
|
|
/* 高级感增强 - 微妙的渐变背景 */
|
|
body {
|
|
background: linear-gradient(135deg, var(--background) 0%, oklch(from var(--background) calc(l * 0.98) c h) 100%);
|
|
background-attachment: fixed;
|
|
}
|
|
|
|
.dark body {
|
|
background: linear-gradient(135deg, var(--background) 0%, oklch(from var(--background) calc(l * 1.05) c h) 100%);
|
|
}
|
|
|
|
/* 卡片增强 - 添加微妙阴影 */
|
|
[data-slot="card"] {
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
|
|
}
|
|
|
|
[data-slot="card"]:hover {
|
|
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
|
|
}
|
|
|
|
.dark [data-slot="card"] {
|
|
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
|
|
}
|
|
|
|
.dark [data-slot="card"]:hover {
|
|
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
}
|
|
|
|
/* 按钮增强 - 更流畅的交互 */
|
|
button, [role="button"] {
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
button:active, [role="button"]:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
/* 输入框增强 - 聚焦效果 */
|
|
input:focus, textarea:focus, select:focus {
|
|
box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.1);
|
|
transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
/* 链接增强 */
|
|
a {
|
|
transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
/* 表格增强 - 悬停效果 */
|
|
table tbody tr {
|
|
transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
table tbody tr:hover {
|
|
background-color: oklch(from var(--muted) l c h / 0.5);
|
|
}
|
|
|
|
/* 模态框和弹出层增强 - 背景模糊 */
|
|
[role="dialog"]::backdrop, [data-state="open"]::backdrop {
|
|
backdrop-filter: blur(4px);
|
|
animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* 代码块增强 */
|
|
code, pre {
|
|
background: oklch(from var(--muted) l c h / 0.5);
|
|
border-radius: calc(var(--radius) - 2px);
|
|
padding: 0.125rem 0.375rem;
|
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
font-size: 0.875em;
|
|
}
|
|
|
|
pre code {
|
|
padding: 0;
|
|
background: transparent;
|
|
}
|
|
|
|
/* Windows 小字体优化 */
|
|
.text-xs, .text-sm, [class*="text-xs"], [class*="text-sm"] {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
font-weight: 400;
|
|
letter-spacing: 0.01em;
|
|
}
|
|
|
|
/* 表格和列表中的小字体优化 */
|
|
table, [role="table"] {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
/* 命令和路径文本优化 */
|
|
code, pre, [class*="font-mono"] {
|
|
-webkit-font-smoothing: auto;
|
|
-moz-osx-font-smoothing: auto;
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* 徽章和标签增强 */
|
|
[class*="badge"], [class*="tag"] {
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
}
|
|
|
|
[class*="badge"]:hover, [class*="tag"]:hover {
|
|
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
|
|
}
|
|
|
|
/* 加载动画增强 */
|
|
@keyframes shimmer {
|
|
0% {
|
|
background-position: -1000px 0;
|
|
}
|
|
100% {
|
|
background-position: 1000px 0;
|
|
}
|
|
}
|
|
|
|
.skeleton {
|
|
background: linear-gradient(
|
|
90deg,
|
|
oklch(from var(--muted) l c h / 0.3) 0%,
|
|
oklch(from var(--muted) l c h / 0.5) 50%,
|
|
oklch(from var(--muted) l c h / 0.3) 100%
|
|
);
|
|
background-size: 1000px 100%;
|
|
animation: shimmer 2s infinite linear;
|
|
}
|
|
|
|
/* 滚动条美化增强 */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: oklch(from var(--muted-foreground) l c h / 0.2);
|
|
border-radius: 4px;
|
|
border: 2px solid transparent;
|
|
background-clip: padding-box;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: oklch(from var(--muted-foreground) l c h / 0.3);
|
|
background-clip: padding-box;
|
|
}
|
|
|
|
.dark ::-webkit-scrollbar-thumb {
|
|
background: oklch(from var(--muted-foreground) l c h / 0.3);
|
|
background-clip: padding-box;
|
|
}
|
|
|
|
.dark ::-webkit-scrollbar-thumb:hover {
|
|
background: oklch(from var(--muted-foreground) l c h / 0.4);
|
|
background-clip: padding-box;
|
|
}
|
|
|
|
/* 选中文本样式 */
|
|
::selection {
|
|
background: oklch(from var(--primary) l c h / 0.2);
|
|
color: var(--foreground);
|
|
}
|
|
|
|
.dark ::selection {
|
|
background: oklch(from var(--primary) l c h / 0.3);
|
|
}
|
|
|
|
/* Number input spinner buttons - dark mode */
|
|
input[type="number"]::-webkit-inner-spin-button,
|
|
input[type="number"]::-webkit-outer-spin-button {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
input[type="number"]:hover::-webkit-inner-spin-button,
|
|
input[type="number"]:hover::-webkit-outer-spin-button {
|
|
opacity: 1;
|
|
}
|
|
|
|
.dark input[type="number"]::-webkit-inner-spin-button,
|
|
.dark input[type="number"]::-webkit-outer-spin-button {
|
|
filter: invert(0.7);
|
|
}
|
|
|
|
.dark input[type="number"]:hover::-webkit-inner-spin-button,
|
|
.dark input[type="number"]:hover::-webkit-outer-spin-button {
|
|
filter: invert(0.85);
|
|
}
|
|
|
|
/* Custom scrollbar styles */
|
|
.custom-scrollbar::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
background: oklch(0.7 0 0 / 30%);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
background: oklch(0.6 0 0 / 50%);
|
|
}
|
|
|
|
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
|
|
background: oklch(0.5 0 0 / 40%);
|
|
}
|
|
|
|
.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
background: oklch(0.6 0 0 / 60%);
|
|
}
|
|
|
|
/* Firefox scrollbar */
|
|
.custom-scrollbar {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: oklch(0.7 0 0 / 30%) transparent;
|
|
}
|
|
|
|
.dark .custom-scrollbar {
|
|
scrollbar-color: oklch(0.5 0 0 / 40%) transparent;
|
|
}
|
|
|
|
/* Hide scrollbar but keep functionality */
|
|
.hide-scrollbar::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.hide-scrollbar {
|
|
-ms-overflow-style: none;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
/* ApexCharts tooltip fix */
|
|
.apexcharts-tooltip {
|
|
background: transparent !important;
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
border-radius: 0 !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.apexcharts-tooltip-title {
|
|
display: none !important;
|
|
}
|