:root {
  color-scheme: light;
  --theme-bg: #f5f7fb;
  --theme-surface: #ffffff;
  --theme-surface-soft: #f8fbff;
  --theme-surface-muted: #eef4fb;
  --theme-border: #dbe4f0;
  --theme-border-strong: #c6d4e8;
  --theme-text: #0f172a;
  --theme-text-soft: #334155;
  --theme-text-muted: #64748b;
  --theme-primary: #2563eb;
  --theme-primary-strong: #1d4ed8;
  --theme-primary-soft: rgba(37, 99, 235, 0.12);
  --theme-primary-softer: rgba(37, 99, 235, 0.08);
  --theme-purple: #7c3aed;
  --theme-purple-soft: rgba(124, 58, 237, 0.10);
  --theme-success: #059669;
  --theme-success-soft: rgba(5, 150, 105, 0.12);
  --theme-warning: #d97706;
  --theme-warning-soft: rgba(217, 119, 6, 0.12);
  --theme-danger: #dc2626;
  --theme-danger-soft: rgba(220, 38, 38, 0.10);

  --background: #f5f7fb;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --secondary: #eff6ff;
  --secondary-foreground: #1d4ed8;
  --muted: #f1f5f9;
  --muted-foreground: #475569;
  --accent: #eef2ff;
  --accent-foreground: #4338ca;
  --border: #dbe4f0;
}

html,
body,
#root {
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

body {
  text-rendering: optimizeLegibility;
}

.bg-white0,
[class~="bg-white0"] {
  background-color: var(--theme-surface) !important;
}

.bg-white {
  background-color: var(--theme-surface) !important;
}

.bg-gray-50 {
  background-color: var(--theme-surface-soft) !important;
}

.bg-gray-100 {
  background-color: #f2f6fb !important;
}

.bg-gray-200 {
  background-color: #edf2f8 !important;
}

.border-gray-100 {
  border-color: #e2e8f0 !important;
}

.border-gray-200 {
  border-color: var(--theme-border) !important;
}

.border-gray-300 {
  border-color: var(--theme-border-strong) !important;
}

.text-gray-900 {
  color: var(--theme-text) !important;
}

.text-gray-800 {
  color: #1e293b !important;
}

.text-gray-700 {
  color: var(--theme-text-soft) !important;
}

.text-gray-600 {
  color: #475569 !important;
}

.text-gray-500 {
  color: var(--theme-text-muted) !important;
}

.placeholder-gray-600::placeholder,
input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
}

.text-primary,
.text-blue-600 {
  color: var(--theme-primary) !important;
}

.text-blue-700 {
  color: var(--theme-primary-strong) !important;
}

.text-emerald-600,
.text-green-600 {
  color: var(--theme-success) !important;
}

.text-yellow-600,
.text-orange-600 {
  color: var(--theme-warning) !important;
}

.text-red-600 {
  color: var(--theme-danger) !important;
}

.bg-primary\/20 {
  background-color: var(--theme-primary-soft) !important;
}

.bg-blue-500,
.bg-blue-600 {
  background-color: var(--theme-primary) !important;
}

.hover\:bg-blue-600:hover,
.hover\:bg-blue-700:hover {
  background-color: var(--theme-primary-strong) !important;
}

.bg-red-500,
.bg-red-600 {
  background-color: var(--theme-danger) !important;
}

.hover\:bg-red-600:hover,
.hover\:bg-red-700:hover {
  background-color: #b91c1c !important;
}

.bg-emerald-500,
.bg-emerald-600,
.bg-green-500,
.bg-green-600 {
  background-color: var(--theme-success) !important;
}

.btn {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text-soft) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #c7d7ee !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  border-color: #1e40af !important;
}

.btn-soft {
  background: #eef5ff !important;
  border-color: #c8dafc !important;
  color: #1d4ed8 !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10) !important;
}

.btn-soft:hover {
  background: #e3efff !important;
  border-color: #b6cdfd !important;
  color: #1e40af !important;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text-soft) !important;
}

.btn-ghost:hover {
  background: #f8fbff !important;
  color: var(--theme-primary) !important;
}

.btn-success {
  background: var(--theme-success-soft) !important;
  border-color: rgba(5, 150, 105, 0.18) !important;
  color: var(--theme-success) !important;
}

.btn-danger {
  background: var(--theme-danger-soft) !important;
  border-color: rgba(220, 38, 38, 0.14) !important;
  color: var(--theme-danger) !important;
}

.icon-btn {
  border-radius: 9999px;
  padding: 0.5rem;
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text-muted) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.icon-btn:hover {
  background: #eef5ff !important;
  border-color: #c8dafc !important;
  color: var(--theme-primary) !important;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
textarea,
select {
  background: var(--theme-surface) !important;
  border: 1px solid #b9c7d8 !important;
  color: var(--theme-text) !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03),
    0 0 0 1px rgba(185, 199, 216, 0.28) !important;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="date"]:hover,
textarea:hover,
select:hover {
  border-color: #9fb2c9 !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  background: var(--theme-surface) !important;
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

input.border-gray-100,
input.border-gray-200,
textarea.border-gray-100,
textarea.border-gray-200,
select.border-gray-100,
select.border-gray-200 {
  border-color: #b9c7d8 !important;
}

.focus\:ring-primary:focus,
.focus\:ring-1:focus,
.focus\:ring-2:focus {
  --tw-ring-color: rgba(37, 99, 235, 0.18) !important;
}

.from-blue-400,
.from-blue-500 {
  --tw-gradient-from: #2563eb var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(37, 99, 235, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-cyan-300,
.to-cyan-500 {
  --tw-gradient-to: #0ea5e9 var(--tw-gradient-to-position) !important;
}

.from-purple-500 {
  --tw-gradient-from: #7c3aed var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(124, 58, 237, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-pink-500 {
  --tw-gradient-to: #ec4899 var(--tw-gradient-to-position) !important;
}

[class*="min-h-[280px]"] {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%) !important;
  border: 1px solid #d6e2f4 !important;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.08) !important;
}

[class*="min-h-[280px]"]:hover {
  border-color: #bfd3f2 !important;
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.12) !important;
}

div[class*="rounded-2xl"][class*="border"],
div[class*="rounded-3xl"][class*="border"] {
  border-color: var(--theme-border) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

table {
  background: transparent !important;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  background: #f7faff !important;
  color: var(--theme-text-soft) !important;
  border-bottom: 1px solid var(--theme-border) !important;
}

tbody tr {
  background: rgba(255, 255, 255, 0.96) !important;
}

tbody tr:nth-child(even) {
  background: #fbfdff !important;
}

tbody tr:hover {
  background: #f3f8ff !important;
}

td,
th {
  border-color: var(--theme-border) !important;
}

.trae-badge--light {
  color: #111827 !important;
}

body:has(input[aria-label="密码"]),
body:has(input[aria-label="密码"]) #root {
  background: #ffffff !important;
}

body:has(input[aria-label="密码"]) [class*="rounded-3xl"] {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #dbe6f3 !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08) !important;
}

body:has(input[aria-label="密码"]) .text-transparent.bg-gradient-to-r,
body:has(input[aria-label="密码"]) .bg-clip-text.text-transparent {
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #000000 !important;
  color: #000000 !important;
  font-weight: 800 !important;
}

body:has(input[aria-label="密码"]) .btn-soft {
  background: #f3f7fd !important;
  border-color: #d7e3f3 !important;
  color: #334155 !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

body:has(h1) .bg-clip-text.text-transparent.bg-gradient-to-r,
body:has(h2) .bg-clip-text.text-transparent.bg-gradient-to-r {
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #000000 !important;
  color: #000000 !important;
  font-weight: 800 !important;
}

body:has(h1) h1.bg-clip-text.text-transparent,
body:has(h2) h1.bg-clip-text.text-transparent {
  text-shadow: none !important;
}

.bg-clip-text.text-transparent,
.text-transparent.bg-gradient-to-r,
[class*="bg-gradient-to-r"].text-transparent {
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #000000 !important;
  color: #000000 !important;
  font-weight: 800 !important;
}
