/* ========================================
   Sub2API 内部界面主题覆盖
   暖色深棕主题 — Teal→暖橙, Slate/Gray→深棕
   通过 Nginx sub_filter 注入到 </head> 前
   ======================================== */

/* ========== 1. Body & 根级 ========== */

/* 暗色 body 背景 — 深棕 + 径向渐变（透明度对齐 apishop 官方真值 .16/.1） */
html.dark body,
body:is(.dark *) {
  /* v5 关键修复：真实编译CSS里 body:is(.dark *) 硬编码了 rgb(2 6 23) 蓝黑底，必须用相同选择器+!important 强制覆盖 */
  background-color: #160e08 !important;
  background-image: radial-gradient(
      60% 50% at 80% 0%,
      rgba(232, 137, 90, 0.16),
      transparent 60%
    ),
    radial-gradient(
      40% 30% at 20% 100%,
      rgba(232, 137, 90, 0.1),
      transparent 60%
    ) !important;
  background-attachment: fixed !important;
  /* 强制覆盖文字颜色（防止真实CSS的 --tw-text-opacity 干扰） */
  color: rgb(243 244 246) !important;
}
body {
  background-color: #160e08 !important;
}

/* ★ 全屏根容器兜底 — 防止顶层 div 用纯色实体背景盖死 body 渐变
   仅作用于「直接铺满视口」的根级容器，透传 body 棕色 */
html.dark,
html.dark body {
  background-color: #160e08 !important;
}
.dark #app,
#app:is(.dark *) {
  background-color: transparent !important;
}

/* ========================================
   ★★★ v4 决定性修复：根容器实体暗背景映射 ★★★
   病因：Sub2API 全屏根 div 用 slate/gray 实体暗色盖死 body
   真值来源：apishop.org 官方 CSS（ink 调色板 #160e08）
   ======================================== */

/* --- 全屏根容器/纯黑底（gray-950 / slate-950）→ apishop ink-950 #160e08 --- */
.bg-gray-950,
.dark\:bg-gray-950:is(.dark *),
.bg-slate-950,
.dark\:bg-slate-950:is(.dark *) {
  background-color: #160e08 !important;
}
.bg-gray-950\/60,
.dark\:bg-gray-950\/60:is(.dark *) {
  background-color: rgba(22, 14, 8, 0.6) !important;
}
.bg-slate-950\/60,
.dark\:bg-slate-950\/60:is(.dark *) {
  background-color: rgba(22, 14, 8, 0.6) !important;
}
.bg-slate-950\/50,
.dark\:bg-slate-950\/50:is(.dark *) {
  background-color: rgba(22, 14, 8, 0.5) !important;
}

/* --- 次级深背景（gray-900 / slate-900）→ ink-900 #1c130b --- */
.bg-gray-900,
.dark\:bg-gray-900:is(.dark *),
.bg-slate-900,
.dark\:bg-slate-900:is(.dark *) {
  background-color: #1c130b !important;
}
.bg-gray-900\/80,
.dark\:bg-gray-900\/80:is(.dark *),
.bg-slate-900\/80,
.dark\:bg-slate-900\/80:is(.dark *) {
  background-color: rgba(28, 19, 11, 0.8) !important;
}
.bg-slate-900\/20:is(.dark *),
.dark\:bg-slate-900\/20:is(.dark *) {
  background-color: rgba(28, 19, 11, 0.2) !important;
}
.bg-slate-900\/30:is(.dark *),
.dark\:bg-slate-900\/30:is(.dark *) {
  background-color: rgba(28, 19, 11, 0.3) !important;
}

/* --- 卡片/控件层（slate-800 / gray-800）→ ink-800 #241810 --- */
.bg-gray-800,
.dark\:bg-gray-800:is(.dark *),
.bg-slate-800,
.dark\:bg-slate-800:is(.dark *) {
  background-color: #241810 !important;
}
.bg-gray-800\/80,
.dark\:bg-gray-800\/80:is(.dark *) {
  background-color: rgba(36, 24, 16, 0.8) !important;
}

/* --- 灰蓝中阶（slate-700 / gray-700）→ ink-700 #2e1f14 --- */
.bg-slate-700,
.dark\:bg-slate-700:is(.dark *),
.bg-gray-700,
.dark\:bg-gray-700:is(.dark *) {
  background-color: #2e1f14 !important;
}

/* ========================================
   ★ 自定义组件层暗背景（最关键 — 卡片/侧边栏实体色）
   apishop 真值：侧边栏极深棕，卡片暖棕半透
   ======================================== */

/* 侧边栏 — apishop 侧边栏比主体更深（#0f0a06） */
.sidebar:is(.dark *) {
  background-color: #0f0a06 !important;
  border-right-color: rgba(232, 137, 90, 0.08) !important;
}

/* 卡片 / 统计卡 — slate-800 半透 → 暖棕半透 */
.card:is(.dark *),
.stat-card:is(.dark *) {
  background-color: rgba(36, 24, 16, 0.55) !important;
}
.card-glass:is(.dark *),
.glass:is(.dark *) {
  background-color: rgba(36, 24, 16, 0.72) !important;
}

/* 输入框 / 下拉 / 模态 / Toast — slate-800 → ink-800 */
.input:is(.dark *),
.\!input:is(.dark *),
.dropdown:is(.dark *),
.modal-content:is(.dark *),
.toast:is(.dark *) {
  background-color: #241810 !important;
  border-color: rgba(232, 137, 90, 0.15) !important;
}
.dropdown-item:hover:is(.dark *) {
  background-color: rgba(232, 137, 90, 0.12) !important;
}

/* ★★ 清除残留 teal：侧边栏激活项原 #134e4a（青绿）→ 暖棕高亮 ★★ */
.sidebar-link-active:is(.dark *) {
  background-color: rgba(232, 137, 90, 0.18) !important;
  color: #f0a16b !important;
}
.sidebar-link-active {
  background-color: rgba(232, 137, 90, 0.14) !important;
  color: #b85f37 !important;
}

/* 选中文字 */
::selection {
  background: rgba(232, 137, 90, 0.35) !important;
  color: #f9f6f3 !important;
}
::-moz-selection {
  background: rgba(232, 137, 90, 0.35) !important;
  color: #f9f6f3 !important;
}

/* ========== 2. Primary bg 类（含 dark: 前缀） ========== */

/* --- 亮色 bg-primary-* --- */
.bg-primary-50 {
  background-color: #fdf2e9 !important;
}
.bg-primary-100 {
  background-color: #fce0c8 !important;
}
.bg-primary-200 {
  background-color: #f5c49a !important;
}
.bg-primary-300 {
  background-color: #f0a16b !important;
}
.bg-primary-400 {
  background-color: #e8895a !important;
}
.bg-primary-500 {
  background-color: #d4774a !important;
}
.bg-primary-600 {
  background-color: #b85f37 !important;
}
.bg-primary-700 {
  background-color: #9a4e2b !important;
}
.bg-primary-800 {
  background-color: #7d3e22 !important;
}
.bg-primary-900 {
  background-color: #5d2e19 !important;
}
.bg-primary-950 {
  background-color: #3a1d10 !important;
}

/* 亮色 bg-primary 带透明度 */
.bg-primary-50\/50 {
  background-color: rgba(253, 242, 233, 0.5) !important;
}
.bg-primary-50\/60 {
  background-color: rgba(253, 242, 233, 0.6) !important;
}
.bg-primary-50\/70 {
  background-color: rgba(253, 242, 233, 0.7) !important;
}
.bg-primary-50\/80 {
  background-color: rgba(253, 242, 233, 0.8) !important;
}
.bg-primary-200\/50 {
  background-color: rgba(245, 196, 154, 0.5) !important;
}
.bg-primary-300\/10 {
  background-color: rgba(240, 161, 107, 0.1) !important;
}
.bg-primary-400\/10 {
  background-color: rgba(232, 137, 90, 0.1) !important;
}
.bg-primary-400\/20 {
  background-color: rgba(232, 137, 90, 0.2) !important;
}
.bg-primary-500\/10 {
  background-color: rgba(212, 119, 74, 0.1) !important;
}
.bg-primary-500\/15 {
  background-color: rgba(212, 119, 74, 0.15) !important;
}

/* --- dark: bg-primary-* --- */
.dark\:bg-primary-300:is(.dark *) {
  background-color: #f0a16b !important;
}
.dark\:bg-primary-400\/10:is(.dark *) {
  background-color: rgba(232, 137, 90, 0.1) !important;
}
.dark\:bg-primary-500\/10:is(.dark *) {
  background-color: rgba(212, 119, 74, 0.1) !important;
}
.dark\:bg-primary-500\/15:is(.dark *) {
  background-color: rgba(212, 119, 74, 0.15) !important;
}
.dark\:bg-primary-600:is(.dark *) {
  background-color: #b85f37 !important;
}
.dark\:bg-primary-800\/40:is(.dark *) {
  background-color: rgba(125, 62, 34, 0.4) !important;
}
.dark\:bg-primary-900\/10:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.1) !important;
}
.dark\:bg-primary-900\/20:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.2) !important;
}
.dark\:bg-primary-900\/30:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.3) !important;
}
.dark\:bg-primary-900\/40:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.4) !important;
}
.dark\:bg-primary-950:is(.dark *) {
  background-color: #3a1d10 !important;
}
.dark\:bg-primary-950\/20:is(.dark *) {
  background-color: rgba(58, 29, 16, 0.2) !important;
}

/* ========== 3. Primary text 类（含 dark: 前缀） ========== */

/* 亮色 text-primary-* */
.text-primary-100 {
  color: #fce0c8 !important;
}
.text-primary-200 {
  color: #f5c49a !important;
}
.text-primary-300 {
  color: #f0a16b !important;
}
.text-primary-400 {
  color: #e8895a !important;
}
.text-primary-500 {
  color: #d4774a !important;
}
.text-primary-600 {
  color: #b85f37 !important;
}
.text-primary-600\/90 {
  color: rgba(184, 95, 55, 0.9) !important;
}
.text-primary-700 {
  color: #9a4e2b !important;
}
.text-primary-800 {
  color: #7d3e22 !important;
}
.text-primary-900 {
  color: #5d2e19 !important;
}

/* dark: text-primary-* */
.dark\:text-primary-100:is(.dark *) {
  color: #fce0c8 !important;
}
.dark\:text-primary-200:is(.dark *) {
  color: #f5c49a !important;
}
.dark\:text-primary-200\/80:is(.dark *) {
  color: rgba(245, 196, 154, 0.8) !important;
}
.dark\:text-primary-300:is(.dark *) {
  color: #f0a16b !important;
}
.dark\:text-primary-400:is(.dark *) {
  color: #e8895a !important;
}
.dark\:text-primary-400\/90:is(.dark *) {
  color: rgba(232, 137, 90, 0.9) !important;
}
.dark\:text-primary-700:is(.dark *) {
  color: #9a4e2b !important;
}
.dark\:text-primary-800:is(.dark *) {
  color: #7d3e22 !important;
}

/* ========== 4. Primary border 类（含 dark: 前缀） ========== */

/* 亮色 border-primary-* */
.border-primary-100 {
  border-color: #fce0c8 !important;
}
.border-primary-100\/80 {
  border-color: rgba(252, 224, 200, 0.8) !important;
}
.\!border-primary-100\/80 {
  border-color: rgba(252, 224, 200, 0.8) !important;
}
.border-primary-200 {
  border-color: #f5c49a !important;
}
.border-primary-200\/80 {
  border-color: rgba(245, 196, 154, 0.8) !important;
}
.border-primary-300 {
  border-color: #f0a16b !important;
}
.border-primary-400 {
  border-color: #e8895a !important;
}
.border-primary-500 {
  border-color: #d4774a !important;
}
.border-primary-600 {
  border-color: #b85f37 !important;
}

/* dark: border-primary-* */
.dark\:border-primary-400:is(.dark *) {
  border-color: #e8895a !important;
}
.dark\:border-primary-400\/30:is(.dark *) {
  border-color: rgba(232, 137, 90, 0.3) !important;
}
.dark\:border-primary-500:is(.dark *) {
  border-color: #d4774a !important;
}
.dark\:border-primary-500\/20:is(.dark *) {
  border-color: rgba(212, 119, 74, 0.2) !important;
}
.dark\:border-primary-600:is(.dark *) {
  border-color: #b85f37 !important;
}
.dark\:border-primary-700:is(.dark *) {
  border-color: #9a4e2b !important;
}
.dark\:border-primary-700\/50:is(.dark *) {
  border-color: rgba(154, 78, 43, 0.5) !important;
}
.dark\:border-primary-800:is(.dark *) {
  border-color: #7d3e22 !important;
}
.dark\:border-primary-800\/50:is(.dark *) {
  border-color: rgba(125, 62, 34, 0.5) !important;
}
.dark\:border-primary-900\/40:is(.dark *) {
  border-color: rgba(93, 46, 25, 0.4) !important;
}
.dark\:border-primary-900\/50:is(.dark *) {
  border-color: rgba(93, 46, 25, 0.5) !important;
}

/* ========== 5. Primary ring/gradient/misc（含 dark: 前缀） ========== */

/* 亮色 ring-primary */
.ring-primary-500\/20 {
  --tw-ring-color: rgba(212, 119, 74, 0.2) !important;
}
.ring-primary-500\/40 {
  --tw-ring-color: rgba(212, 119, 74, 0.4) !important;
}

/* dark: ring-primary */
.dark\:ring-primary-500\/20:is(.dark *) {
  --tw-ring-color: rgba(212, 119, 74, 0.2) !important;
}
.dark\:ring-primary-900:is(.dark *) {
  --tw-ring-color: #5d2e19 !important;
}
.dark\:ring-primary-900\/40:is(.dark *) {
  --tw-ring-color: rgba(93, 46, 25, 0.4) !important;
}

/* 亮色 gradient from/to */
.from-primary-50 {
  --tw-gradient-from: #fdf2e9 !important;
}
.from-primary-400 {
  --tw-gradient-from: #e8895a !important;
}
.from-primary-500 {
  --tw-gradient-from: #d4774a !important;
}
.from-primary-600 {
  --tw-gradient-from: #b85f37 !important;
}
.to-primary-100 {
  --tw-gradient-to: #fce0c8 !important;
}
.to-primary-500 {
  --tw-gradient-to: #d4774a !important;
}
.to-primary-600 {
  --tw-gradient-to: #b85f37 !important;
}
.via-primary-50\/30 {
  --tw-gradient-via: rgba(253, 242, 233, 0.3) !important;
}

/* dark: gradient from/to */
.dark\:from-primary-900\/20:is(.dark *) {
  --tw-gradient-from: rgba(93, 46, 25, 0.2) !important;
}
.dark\:from-primary-900\/30:is(.dark *) {
  --tw-gradient-from: rgba(93, 46, 25, 0.3) !important;
}
.dark\:from-primary-950\/40:is(.dark *) {
  --tw-gradient-from: rgba(58, 29, 16, 0.4) !important;
}
.dark\:to-primary-800\/20:is(.dark *) {
  --tw-gradient-to: rgba(125, 62, 34, 0.2) !important;
}

/* shadow */
.shadow-primary-500\/10 {
  --tw-shadow-color: rgba(212, 119, 74, 0.1) !important;
}
.shadow-primary-500\/20 {
  --tw-shadow-color: rgba(212, 119, 74, 0.2) !important;
}

/* ========== 6. Primary hover/focus 类（含 dark: 前缀） ========== */

/* --- 亮色 hover bg --- */
.hover\:bg-primary-50:hover {
  background-color: #fdf2e9 !important;
}
.hover\:bg-primary-50\/50:hover {
  background-color: rgba(253, 242, 233, 0.5) !important;
}
.hover\:bg-primary-100:hover {
  background-color: #fce0c8 !important;
}
.hover\:bg-primary-200:hover {
  background-color: #f5c49a !important;
}
.hover\:bg-primary-500:hover {
  background-color: #d4774a !important;
}
.hover\:bg-primary-600:hover {
  background-color: #b85f37 !important;
}
.hover\:bg-primary-700:hover {
  background-color: #9a4e2b !important;
}

/* dark: hover bg */
.dark\:hover\:bg-primary-500:hover:is(.dark *) {
  background-color: #d4774a !important;
}
.dark\:hover\:bg-primary-800:hover:is(.dark *) {
  background-color: #7d3e22 !important;
}
.dark\:hover\:bg-primary-900\/20:hover:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.2) !important;
}
.dark\:hover\:bg-primary-900\/30:hover:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.3) !important;
}
.dark\:hover\:bg-primary-900\/50:hover:is(.dark *) {
  background-color: rgba(93, 46, 25, 0.5) !important;
}
.dark\:hover\:bg-primary-500\/10:is(.dark *):hover {
  background-color: rgba(212, 119, 74, 0.1) !important;
}

/* --- 亮色 hover border --- */
.hover\:border-primary-200:hover {
  border-color: #f5c49a !important;
}
.hover\:border-primary-300:hover {
  border-color: #f0a16b !important;
}
.hover\:border-primary-400:hover {
  border-color: #e8895a !important;
}
.hover\:border-primary-500:hover {
  border-color: #d4774a !important;
}

/* dark: hover border */
.dark\:hover\:border-primary-400:hover:is(.dark *) {
  border-color: #e8895a !important;
}
.dark\:hover\:border-primary-500:hover:is(.dark *) {
  border-color: #d4774a !important;
}
.dark\:hover\:border-primary-500\/30:hover:is(.dark *) {
  border-color: rgba(212, 119, 74, 0.3) !important;
}
.dark\:hover\:border-primary-700:hover:is(.dark *) {
  border-color: #9a4e2b !important;
}
.dark\:hover\:border-primary-800:hover:is(.dark *) {
  border-color: #7d3e22 !important;
}

/* --- 亮色 hover text --- */
.hover\:text-primary-500:hover {
  color: #d4774a !important;
}
.hover\:text-primary-500 {
  color: #d4774a !important;
}
.hover\:text-primary-600:hover {
  color: #b85f37 !important;
}
.hover\:text-primary-600 {
  color: #b85f37 !important;
}
.hover\:text-primary-700:hover {
  color: #9a4e2b !important;
}
.hover\:text-primary-700 {
  color: #9a4e2b !important;
}
.hover\:text-primary-800:hover {
  color: #7d3e22 !important;
}

/* dark: hover text */
.dark\:hover\:text-primary-200:hover:is(.dark *) {
  color: #f5c49a !important;
}
.dark\:hover\:text-primary-200:is(.dark *) {
  color: #f5c49a !important;
}
.dark\:hover\:text-primary-300:hover:is(.dark *) {
  color: #f0a16b !important;
}
.dark\:hover\:text-primary-300:is(.dark *) {
  color: #f0a16b !important;
}
.dark\:hover\:text-primary-400:hover:is(.dark *) {
  color: #e8895a !important;
}

/* dark: hover ring */
.dark\:hover\:ring-primary-500\/20:is(.dark *):hover {
  --tw-ring-color: rgba(212, 119, 74, 0.2) !important;
}

/* dark: hover shadow */
.hover\:shadow-primary-500\/10:hover {
  --tw-shadow-color: rgba(212, 119, 74, 0.1) !important;
}

/* hover gradient */
.hover\:from-primary-500:hover {
  --tw-gradient-from: #d4774a !important;
}
.hover\:from-primary-600:hover {
  --tw-gradient-from: #b85f37 !important;
}
.hover\:to-primary-600:hover {
  --tw-gradient-to: #b85f37 !important;
}
.hover\:to-primary-700:hover {
  --tw-gradient-to: #9a4e2b !important;
}

/* hover decoration */
.hover\:decoration-primary-400:hover {
  text-decoration-color: #e8895a !important;
}

/* hover ring (亮色) */
.hover\:ring-primary-100:hover {
  --tw-ring-color: #fce0c8 !important;
}

/* --- focus/focus-within 态 --- */
.focus\:ring-primary-500:focus {
  --tw-ring-color: #d4774a !important;
}
.focus\:border-primary-500:focus {
  border-color: #d4774a !important;
}
.focus-within\:ring-primary-500:focus-within {
  --tw-ring-color: #d4774a !important;
}
.focus-within\:border-primary-300:focus-within {
  border-color: #f0a16b !important;
}
.focus-within\:border-primary-500:focus-within {
  border-color: #d4774a !important;
}

/* 开关/checkbox */
.peer:checked ~ .peer-checked\:bg-primary-500 {
  background-color: #d4774a !important;
}
.peer:checked ~ .peer-checked\:bg-primary-600 {
  background-color: #b85f37 !important;
}

/* ========== 7. Slate bg 类（含 dark: 前缀） ========== */

/* slate 背景 (dark context) */
.bg-slate-600:is(.dark *) {
  background-color: #5d4d3f !important;
}

.bg-slate-700:is(.dark *),
.dark .bg-slate-700,
.dark\:bg-slate-700:is(.dark *) {
  background-color: #3d3028 !important;
}
.bg-slate-700\/50:is(.dark *) {
  background-color: rgba(61, 48, 40, 0.5) !important;
}

.bg-slate-800:is(.dark *),
.dark .bg-slate-800,
.dark\:bg-slate-800:is(.dark *) {
  background-color: #2a2018 !important;
}
.bg-slate-800\/50:is(.dark *),
.dark\:bg-slate-800\/50:is(.dark *) {
  background-color: rgba(42, 32, 24, 0.5) !important;
}

.bg-slate-900:is(.dark *),
.dark .bg-slate-900,
.dark\:bg-slate-900:is(.dark *) {
  background-color: #1f1812 !important;
}
.dark\:bg-slate-900\/20:is(.dark *) {
  background-color: rgba(31, 24, 18, 0.2) !important;
}
.dark\:bg-slate-900\/30:is(.dark *) {
  background-color: rgba(31, 24, 18, 0.3) !important;
}

.bg-slate-950:is(.dark *),
.dark .bg-slate-950,
.dark\:bg-slate-950:is(.dark *) {
  background-color: #160e08 !important;
}

/* dark: bg-slate 其余 */
.dark\:bg-slate-500:is(.dark *) {
  background-color: #8c7763 !important;
}
.dark\:bg-slate-500\/10:is(.dark *) {
  background-color: rgba(140, 119, 99, 0.1) !important;
}
.dark\:bg-slate-600:is(.dark *) {
  background-color: #5d4d3f !important;
}

/* ========== 8. Slate text/border 类（含 dark: 前缀） ========== */

/* slate text */
.text-slate-200:is(.dark *) {
  color: #dccfbf !important;
}
.text-slate-300:is(.dark *) {
  color: #b9a691 !important;
}
.text-slate-400:is(.dark *) {
  color: #8c7763 !important;
}
.text-slate-500:is(.dark *) {
  color: #8c7763 !important;
}

.dark\:text-slate-200:is(.dark *) {
  color: #dccfbf !important;
}
.dark\:text-slate-300:is(.dark *) {
  color: #b9a691 !important;
}
.dark\:text-slate-400:is(.dark *) {
  color: #8c7763 !important;
}

/* slate border */
.border-slate-600:is(.dark *),
.dark\:border-slate-600:is(.dark *) {
  border-color: #5d4d3f !important;
}
.border-slate-700:is(.dark *),
.dark\:border-slate-700:is(.dark *) {
  border-color: #3d3028 !important;
}
.border-slate-800:is(.dark *),
.dark\:border-slate-800:is(.dark *) {
  border-color: #2a2018 !important;
}

.dark\:border-slate-500\/20:is(.dark *) {
  border-color: rgba(140, 119, 99, 0.2) !important;
}

/* slate ring */
.dark\:ring-slate-500\/30:is(.dark *) {
  --tw-ring-color: rgba(140, 119, 99, 0.3) !important;
}
.dark\:ring-slate-700\/70:is(.dark *) {
  --tw-ring-color: rgba(61, 48, 40, 0.7) !important;
}

/* slate divide */
.divide-slate-700:is(.dark *) > :not([hidden]) ~ :not([hidden]),
.dark\:divide-slate-700:is(.dark *) > :not([hidden]) ~ :not([hidden]) {
  border-color: #3d3028 !important;
}
.divide-slate-800:is(.dark *) > :not([hidden]) ~ :not([hidden]) {
  border-color: #2a2018 !important;
}

/* slate gradient */
.from-slate-900:is(.dark *) {
  --tw-gradient-from: #1f1812 !important;
}
.from-slate-800:is(.dark *) {
  --tw-gradient-from: #2a2018 !important;
}
.to-slate-800:is(.dark *) {
  --tw-gradient-to: #2a2018 !important;
}
.via-slate-900:is(.dark *) {
  --tw-gradient-via: #1f1812 !important;
}

/* ========== 9. Gray 类（含 dark: 前缀） ========== */

/* gray bg */
.bg-gray-100:is(.dark *) {
  background-color: #efe9e2 !important;
}
.bg-gray-200:is(.dark *) {
  background-color: #dccfbf !important;
}
.bg-gray-600:is(.dark *) {
  background-color: #5d4d3f !important;
}
.bg-gray-700:is(.dark *) {
  background-color: #3d3028 !important;
}
.bg-gray-800:is(.dark *) {
  background-color: #2a2018 !important;
}
.bg-gray-900:is(.dark *) {
  background-color: #1f1812 !important;
}

/* dark: bg-gray */
.dark\:bg-gray-600:is(.dark *) {
  background-color: #5d4d3f !important;
}
.dark\:bg-gray-700:is(.dark *) {
  background-color: #3d3028 !important;
}
.dark\:bg-gray-800:is(.dark *) {
  background-color: #2a2018 !important;
}
.dark\:bg-gray-800\/80:is(.dark *) {
  background-color: rgba(42, 32, 24, 0.8) !important;
}
.dark\:bg-gray-900:is(.dark *) {
  background-color: #1f1812 !important;
}
.dark\:bg-gray-900\/30:is(.dark *) {
  background-color: rgba(31, 24, 18, 0.3) !important;
}

/* gray text */
.text-gray-100:is(.dark *) {
  color: #efe9e2 !important;
}
.text-gray-200:is(.dark *) {
  color: #dccfbf !important;
}
.text-gray-300:is(.dark *) {
  color: #b9a691 !important;
}
.text-gray-400:is(.dark *) {
  color: #8c7763 !important;
}
.text-gray-500:is(.dark *) {
  color: #6b5a4a !important;
}
.text-gray-600:is(.dark *) {
  color: #5d4d3f !important;
}

.dark\:text-gray-100:is(.dark *) {
  color: #efe9e2 !important;
}
.dark\:text-gray-200:is(.dark *) {
  color: #dccfbf !important;
}
.dark\:text-gray-300:is(.dark *) {
  color: #b9a691 !important;
}
.dark\:text-gray-400:is(.dark *) {
  color: #8c7763 !important;
}
.dark\:text-gray-500:is(.dark *) {
  color: #6b5a4a !important;
}
.dark\:text-gray-600:is(.dark *) {
  color: #5d4d3f !important;
}

/* gray border */
.border-gray-500:is(.dark *) {
  border-color: #6b5a4a !important;
}
.border-gray-600:is(.dark *) {
  border-color: #5d4d3f !important;
}
.border-gray-700:is(.dark *) {
  border-color: #3d3028 !important;
}
.border-gray-800:is(.dark *) {
  border-color: #2a2018 !important;
}

.dark\:border-gray-500:is(.dark *) {
  border-color: #6b5a4a !important;
}
.dark\:border-gray-600:is(.dark *) {
  border-color: #5d4d3f !important;
}
.dark\:border-gray-700:is(.dark *) {
  border-color: #3d3028 !important;
}
.dark\:border-gray-700\/50:is(.dark *) {
  border-color: rgba(61, 48, 40, 0.5) !important;
}
.dark\:border-gray-800:is(.dark *) {
  border-color: #2a2018 !important;
}

/* dark: gray 方向性边框 */
.dark\:border-b-gray-700:is(.dark *) {
  border-bottom-color: #3d3028 !important;
}
.dark\:border-b-gray-900:is(.dark *) {
  border-bottom-color: #1f1812 !important;
}
.dark\:border-r-gray-800:is(.dark *) {
  border-right-color: #2a2018 !important;
}
.dark\:border-t-gray-700:is(.dark *) {
  border-top-color: #3d3028 !important;
}

/* gray ring */
.dark\:ring-gray-500\/30:is(.dark *) {
  --tw-ring-color: rgba(107, 90, 74, 0.3) !important;
}

/* gray placeholder */
.dark\:placeholder-gray-500:is(.dark *)::placeholder {
  color: #6b5a4a !important;
}

/* gray decoration */
.dark\:decoration-gray-500:is(.dark *) {
  text-decoration-color: #6b5a4a !important;
}

/* ========== 10. 其他（进度条、滚动条、input focus、字体等） ========== */

/* 导航进度条渐变 */
.navigation-progress-bar {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #e8895a 20%,
    #d4774a 50%,
    #e8895a 80%,
    transparent 100%
  ) !important;
}
html.dark .navigation-progress-bar,
:root.dark .navigation-progress-bar {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #d4774a 20%,
    #e8895a 50%,
    #d4774a 80%,
    transparent 100%
  ) !important;
}

/* 滚动条 */
.dark *:hover::-webkit-scrollbar-thumb,
*:is(.dark *):hover::-webkit-scrollbar-thumb {
  background-color: rgba(184, 95, 55, 0.4) !important;
}
@supports (-moz-appearance: none) {
  .dark *:hover,
  .dark *:focus-within {
    scrollbar-color: rgba(184, 95, 55, 0.4) transparent !important;
  }
}

/* 隐藏主题切换按钮 */
button[aria-label="Toggle theme"],
button[aria-label="切换主题"],
button[title="Toggle theme"],
button[title="切换主题"],
[data-testid="theme-toggle"] {
  display: none !important;
}

/* 输入框焦点光环 */
input:focus,
textarea:focus,
select:focus {
  --tw-ring-color: rgba(212, 119, 74, 0.5) !important;
  border-color: #d4774a !important;
}

/* 卡片/白色背景覆盖 */
.bg-white:is(.dark *) {
  background-color: #2a2018 !important;
}
.bg-white\/5:is(.dark *) {
  background-color: rgba(42, 32, 24, 0.05) !important;
}
.bg-white\/10:is(.dark *) {
  background-color: rgba(42, 32, 24, 0.1) !important;
}
.bg-white\/80 {
  background-color: rgba(253, 242, 233, 0.8) !important;
}

/* 蓝色链接 → 暖色 */
.text-sky-400:is(.dark *) {
  color: #e8895a !important;
}
.text-sky-500:is(.dark *) {
  color: #d4774a !important;
}
.text-blue-400:is(.dark *) {
  color: #e8895a !important;
}
.text-blue-500:is(.dark *) {
  color: #d4774a !important;
}
.bg-sky-500:is(.dark *) {
  background-color: #d4774a !important;
}
.bg-blue-500:is(.dark *) {
  background-color: #d4774a !important;
}
.hover\:text-sky-300:hover {
  color: #f0a16b !important;
}
.hover\:text-blue-300:hover {
  color: #f0a16b !important;
}

/* placeholder */
.placeholder\:text-slate-400::placeholder:is(.dark *),
.placeholder-slate-400:is(.dark *)::placeholder {
  color: #8c7763 !important;
}

/* badge / tag */
.bg-primary-100\/80:is(.dark *) {
  background-color: rgba(252, 224, 200, 0.1) !important;
}

/* bg-dark-* 自定义类 */
.bg-dark-700:is(.dark *) {
  background-color: #2a2018 !important;
}
.bg-dark-800:is(.dark *) {
  background-color: #1f1812 !important;
}
.bg-dark-900:is(.dark *) {
  background-color: #160e08 !important;
}
.border-dark-600:is(.dark *) {
  border-color: #3d3028 !important;
}

/* Sub2API 品牌蓝 #00aeef 覆盖 */
[style*="color: rgb(0, 174, 239)"],
[style*="color:rgb(0, 174, 239)"] {
  color: #e8895a !important;
}
[style*="background-color: rgb(0, 174, 239)"],
[style*="background:rgb(0, 174, 239)"] {
  background-color: #d4774a !important;
}
/* 字体统一 */
body {
  font-family: "Inter", system-ui, -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif !important;
}

/* ============================================================
   ============= v3 深度改写 =================================
   仿 apishop.org — 形状/光晕/装饰/字号/伪元素 全方位重塑
   ============================================================ */

/* ========== v3-1. body 双径向光晕加强 ========== */
html.dark body,
body:is(.dark *) {
  background-color: #160e08 !important;
  background-image: radial-gradient(
      circle at 85% -10%,
      rgba(232, 137, 90, 0.22),
      transparent 45%
    ),
    radial-gradient(
      circle at 10% 100%,
      rgba(232, 137, 90, 0.12),
      transparent 50%
    ),
    radial-gradient(circle at 50% 50%, rgba(125, 62, 34, 0.05), transparent 70%) !important;
  background-attachment: fixed !important;
  min-height: 100vh !important;
}

/* ========== v3-2. 自定义 shadow 重写（关键） ========== */
/* .shadow-glow 是 Sub2API 内部用的发光效果，重写成暖橙强光 */
.shadow-glow {
  box-shadow: 0 0 0 1px rgba(232, 137, 90, 0.15),
    0 0 40px rgba(232, 137, 90, 0.35),
    0 20px 60px -15px rgba(232, 137, 90, 0.25), 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}
.dark .shadow-glow,
.shadow-glow:is(.dark *) {
  box-shadow: 0 0 0 1px rgba(232, 137, 90, 0.2),
    0 0 60px rgba(232, 137, 90, 0.4), 0 30px 80px -20px rgba(232, 137, 90, 0.3),
    0 12px 48px rgba(0, 0, 0, 0.5) !important;
}

.shadow-card,
.dark .shadow-card,
.shadow-card:is(.dark *) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(232, 137, 90, 0.08) !important;
}

.shadow-glass {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(232, 137, 90, 0.1) !important;
}

.hover\:shadow-card-hover:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(232, 137, 90, 0.2),
    0 0 30px rgba(232, 137, 90, 0.15) !important;
}

/* ========== v3-3. 卡片 .card / .stat-card 重塑 ========== */
.card,
.dark .card,
.card:is(.dark *) {
  background: linear-gradient(
    135deg,
    rgba(58, 29, 16, 0.6),
    rgba(42, 32, 24, 0.55)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.15) !important;
  border-radius: 1.25rem !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.card-glass,
.dark .card-glass {
  background: linear-gradient(
    135deg,
    rgba(58, 29, 16, 0.5),
    rgba(42, 32, 24, 0.4)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.12) !important;
  border-radius: 1.25rem !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.stat-card,
.dark .stat-card {
  background: linear-gradient(
    135deg,
    rgba(58, 29, 16, 0.55),
    rgba(42, 32, 24, 0.5)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.18) !important;
  border-radius: 1.25rem !important;
  padding: 1.5rem !important;
  position: relative !important;
  overflow: hidden !important;
}
.stat-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0;
  right: 0;
  width: 100% !important;
  height: 100% !important;
  background: radial-gradient(
    circle at top right,
    rgba(232, 137, 90, 0.12),
    transparent 60%
  ) !important;
  pointer-events: none !important;
}

/* ========== v3-4. 统计大字号 ========== */
.stat-value,
.dark .stat-value {
  font-size: 2rem !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  background: linear-gradient(135deg, #fdf2e9, #f0a16b) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
.stat-label,
.dark .stat-label {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: rgba(232, 137, 90, 0.7) !important;
}
.stat-icon,
.dark .stat-icon {
  border-radius: 1rem !important;
  background: linear-gradient(
    135deg,
    rgba(232, 137, 90, 0.2),
    rgba(212, 119, 74, 0.1)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.2) !important;
}
.stat-icon-primary {
  color: #f0a16b !important;
}
.stat-icon-success {
  color: #54d8a3 !important;
  background: linear-gradient(
    135deg,
    rgba(84, 216, 163, 0.15),
    rgba(84, 216, 163, 0.05)
  ) !important;
  border-color: rgba(84, 216, 163, 0.2) !important;
}
.stat-icon-warning {
  color: #f0a16b !important;
}
.stat-icon-danger {
  color: #ef6b6b !important;
  background: linear-gradient(
    135deg,
    rgba(239, 107, 107, 0.15),
    rgba(239, 107, 107, 0.05)
  ) !important;
  border-color: rgba(239, 107, 107, 0.2) !important;
}
.stat-trend-up {
  color: #54d8a3 !important;
}
.stat-trend-down {
  color: #ef6b6b !important;
}

/* ========== v3-5. 侧边栏 .sidebar / .sidebar-link / 激活态 ========== */
.sidebar,
.dark .sidebar {
  background: linear-gradient(
    180deg,
    rgba(31, 24, 18, 0.95),
    rgba(22, 14, 8, 0.95)
  ) !important;
  border-right: 1px solid rgba(232, 137, 90, 0.12) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.sidebar-header,
.dark .sidebar-header {
  border-bottom: 1px solid rgba(232, 137, 90, 0.08) !important;
  padding: 1.25rem 1.5rem !important;
}

.sidebar-section-title,
.dark .sidebar-section-title {
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: rgba(140, 119, 99, 0.7) !important;
  padding: 0 1.5rem !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}

.sidebar-link,
.dark .sidebar-link {
  position: relative !important;
  border-radius: 0.625rem !important;
  margin: 0.125rem 0.75rem !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #b9a691 !important;
  transition: all 0.15s ease !important;
}
.sidebar-link:hover,
.dark .sidebar-link:hover {
  background: rgba(232, 137, 90, 0.08) !important;
  color: #f0a16b !important;
}

.sidebar-link-active,
.dark .sidebar-link-active,
.router-link-active.sidebar-link,
.router-link-exact-active.sidebar-link {
  background: linear-gradient(
    90deg,
    rgba(232, 137, 90, 0.18),
    rgba(232, 137, 90, 0.06)
  ) !important;
  color: #f0a16b !important;
  font-weight: 600 !important;
}
.sidebar-link-active::before,
.dark .sidebar-link-active::before,
.router-link-active.sidebar-link::before,
.router-link-exact-active.sidebar-link::before {
  content: "" !important;
  position: absolute !important;
  left: -0.75rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 3px !important;
  height: 1.25rem !important;
  background: linear-gradient(180deg, #f0a16b, #d4774a) !important;
  border-radius: 0 3px 3px 0 !important;
  box-shadow: 0 0 12px rgba(240, 161, 107, 0.6) !important;
}

/* ========== v3-6. 按钮 .btn / .btn-primary 全 pill 化 ========== */
.btn,
.dark .btn {
  border-radius: 9999px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  transition: all 0.2s ease !important;
}
.btn-primary,
.dark .btn-primary {
  background: linear-gradient(90deg, #f0a16b, #d4774a) !important;
  color: #160e08 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(212, 119, 74, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}
.btn-primary:hover,
.dark .btn-primary:hover {
  background: linear-gradient(90deg, #f5b785, #e8895a) !important;
  box-shadow: 0 6px 20px rgba(212, 119, 74, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) !important;
}
.btn-secondary,
.dark .btn-secondary {
  background: rgba(58, 29, 16, 0.6) !important;
  border: 1px solid rgba(232, 137, 90, 0.2) !important;
  color: #f0a16b !important;
}
.btn-secondary:hover,
.dark .btn-secondary:hover {
  background: rgba(58, 29, 16, 0.8) !important;
  border-color: rgba(232, 137, 90, 0.4) !important;
}
.btn-ghost,
.dark .btn-ghost {
  background: transparent !important;
  color: #b9a691 !important;
}
.btn-ghost:hover,
.dark .btn-ghost:hover {
  background: rgba(232, 137, 90, 0.1) !important;
  color: #f0a16b !important;
}
.btn-danger,
.dark .btn-danger {
  background: linear-gradient(90deg, #ef6b6b, #d04545) !important;
  color: white !important;
  border: none !important;
}
.btn-success,
.dark .btn-success {
  background: linear-gradient(90deg, #54d8a3, #2da876) !important;
  color: white !important;
  border: none !important;
}

/* ========== v3-7. 徽章 .badge / .badge-* 重塑 ========== */
.badge,
.dark .badge {
  border-radius: 9999px !important;
  padding: 0.25rem 0.625rem !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}
.badge-primary,
.dark .badge-primary {
  background: linear-gradient(
    135deg,
    rgba(232, 137, 90, 0.25),
    rgba(212, 119, 74, 0.15)
  ) !important;
  color: #f0a16b !important;
  border: 1px solid rgba(232, 137, 90, 0.3) !important;
}
.badge-success,
.dark .badge-success {
  background: rgba(84, 216, 163, 0.15) !important;
  color: #54d8a3 !important;
  border: 1px solid rgba(84, 216, 163, 0.3) !important;
}
.badge-warning,
.dark .badge-warning {
  background: rgba(240, 161, 107, 0.15) !important;
  color: #f0a16b !important;
  border: 1px solid rgba(240, 161, 107, 0.3) !important;
}
.badge-danger,
.dark .badge-danger {
  background: rgba(239, 107, 107, 0.15) !important;
  color: #ef6b6b !important;
  border: 1px solid rgba(239, 107, 107, 0.3) !important;
}
.badge-gray,
.dark .badge-gray {
  background: rgba(140, 119, 99, 0.15) !important;
  color: #b9a691 !important;
  border: 1px solid rgba(140, 119, 99, 0.3) !important;
}
.badge-purple,
.dark .badge-purple {
  background: rgba(168, 127, 247, 0.15) !important;
  color: #a87ff7 !important;
  border: 1px solid rgba(168, 127, 247, 0.3) !important;
}

/* ========== v3-8. 输入框 .input ========== */
.input,
.\!input,
.dark .input {
  background: rgba(22, 14, 8, 0.5) !important;
  border: 1px solid rgba(232, 137, 90, 0.18) !important;
  border-radius: 0.75rem !important;
  color: #f9f6f3 !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.875rem !important;
  transition: all 0.15s ease !important;
}
.input:focus,
.\!input:focus,
.dark .input:focus {
  background: rgba(22, 14, 8, 0.7) !important;
  border-color: rgba(232, 137, 90, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(232, 137, 90, 0.15),
    inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  outline: none !important;
}
.input::placeholder {
  color: rgba(140, 119, 99, 0.6) !important;
}
.input-label,
.dark .input-label {
  color: #b9a691 !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  margin-bottom: 0.375rem !important;
}
.input-hint {
  color: #8c7763 !important;
  font-size: 0.7rem !important;
}
.input-error-text {
  color: #ef6b6b !important;
  font-size: 0.7rem !important;
}
.input-error {
  border-color: rgba(239, 107, 107, 0.5) !important;
}

/* ========== v3-9. 代码块 — macOS 三圆点装饰 + 文件名标签 ========== */
/* 给 <pre> 块加 macOS 风装饰头 */
pre {
  position: relative !important;
  background: linear-gradient(180deg, #1a120a, #150e07) !important;
  border: 1px solid rgba(232, 137, 90, 0.15) !important;
  border-radius: 0.875rem !important;
  padding: 2.5rem 1.25rem 1.25rem !important;
  overflow-x: auto !important;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace !important;
  font-size: 0.8125rem !important;
  line-height: 1.6 !important;
  color: #dccfbf !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(232, 137, 90, 0.05) !important;
}
pre::before {
  content: "" !important;
  position: absolute !important;
  top: 0.875rem !important;
  left: 1rem !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: #ff5f56 !important;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f !important;
}
pre::after {
  content: attr(data-lang) !important;
  position: absolute !important;
  top: 0.625rem !important;
  right: 0.875rem !important;
  font-size: 0.65rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: rgba(232, 137, 90, 0.5) !important;
  font-family: "Inter", sans-serif !important;
}
/* 行内 code */
.code,
.\!code,
code:not(pre code) {
  background: rgba(232, 137, 90, 0.12) !important;
  color: #f0a16b !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.85em !important;
  border: 1px solid rgba(232, 137, 90, 0.15) !important;
}
pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
}

/* ========== v3-10. 表格 .table ========== */
.table,
.dark .table {
  border-radius: 1rem !important;
  overflow: hidden !important;
}
.table th,
.dark .table th {
  background: rgba(232, 137, 90, 0.05) !important;
  color: rgba(232, 137, 90, 0.7) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(232, 137, 90, 0.12) !important;
}
.table td,
.dark .table td {
  border-bottom: 1px solid rgba(232, 137, 90, 0.06) !important;
  color: #dccfbf !important;
}
.table tr:hover td,
.dark .table tr:hover td {
  background: rgba(232, 137, 90, 0.04) !important;
}

/* ========== v3-11. Modal / Dropdown / Toast ========== */
.modal-overlay {
  background: rgba(22, 14, 8, 0.7) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}
.modal-content,
.dark .modal-content {
  background: linear-gradient(
    180deg,
    rgba(58, 29, 16, 0.95),
    rgba(42, 32, 24, 0.95)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.2) !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(232, 137, 90, 0.1),
    0 0 80px rgba(232, 137, 90, 0.1) !important;
}
.modal-header {
  border-bottom: 1px solid rgba(232, 137, 90, 0.1) !important;
}
.modal-footer {
  border-top: 1px solid rgba(232, 137, 90, 0.1) !important;
}
.dropdown,
.dark .dropdown {
  background: linear-gradient(
    180deg,
    rgba(58, 29, 16, 0.98),
    rgba(42, 32, 24, 0.98)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.18) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 137, 90, 0.1) !important;
  backdrop-filter: blur(20px) !important;
}
.dropdown-item,
.dark .dropdown-item {
  color: #dccfbf !important;
  font-size: 0.875rem !important;
}
.dropdown-item:hover {
  background: rgba(232, 137, 90, 0.1) !important;
  color: #f0a16b !important;
}
.toast,
.dark .toast {
  background: linear-gradient(
    135deg,
    rgba(58, 29, 16, 0.95),
    rgba(42, 32, 24, 0.95)
  ) !important;
  border: 1px solid rgba(232, 137, 90, 0.2) !important;
  border-radius: 1rem !important;
  backdrop-filter: blur(20px) !important;
}

/* ========== v3-12. 滚动条更细更隐形 ========== */
*::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}
*::-webkit-scrollbar-track {
  background: transparent !important;
}
*::-webkit-scrollbar-thumb {
  background: rgba(232, 137, 90, 0.15) !important;
  border-radius: 3px !important;
  transition: background 0.2s !important;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 137, 90, 0.35) !important;
}
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(232, 137, 90, 0.15) transparent !important;
}

/* ========== v3-13. 登录页特殊处理 — 大光晕 ========== */
/* 登录页主容器：max-w-md 在登录路径下加大光晕 */
[class*="login"] .card,
[class*="auth"] .card,
.max-w-md.w-full,
.max-w-\[480px\] {
  border-radius: 1.5rem !important;
}

/* 登录页背景大光晕 */
body:has([action*="login"]),
body:has(form input[type="email"]):not(:has(.sidebar)) {
  background-image: radial-gradient(
      circle at 50% 50%,
      rgba(232, 137, 90, 0.28),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(232, 137, 90, 0.15),
      transparent 50%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(232, 137, 90, 0.12),
      transparent 50%
    ) !important;
}

/* ========== v3-14. 进度条 / Spinner ========== */
.progress,
.dark .progress {
  background: rgba(232, 137, 90, 0.1) !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
}
.progress > div,
.progress::before {
  background: linear-gradient(90deg, #f0a16b, #d4774a) !important;
}
.spinner {
  border-color: rgba(232, 137, 90, 0.15) !important;
  border-top-color: #f0a16b !important;
}

/* ========== v3-15. 文字渐变 .text-gradient ========== */
.text-gradient {
  background: linear-gradient(135deg, #f5b785, #d4774a) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* ========== v3-16. 隐藏 Windows 激活水印（如果在视口内出现） ========== */
.activate-windows-watermark,
[class*="activate-windows"] {
  display: none !important;
}

/* ========== v3-17. 圆角通用化（按钮、徽章在第二选择器内） ========== */
button:not(.tab):not([class*="icon"]):not([class*="square"]) {
  border-radius: 0.625rem !important;
}
/* 大按钮强制 pill */
button.btn,
button.btn-primary,
button.btn-secondary,
.btn-block {
  border-radius: 9999px !important;
}

/* ========================================
   ★★★ v5 致命修复：蓝色渐变类全映射 ★★★
   病因：登录页等场景用 from-blue/to-blue/to-indigo 渐变背景，
        真实编译CSS定义了这些类但我的override完全没碰，导致蓝色渐变残留
   策略：把所有蓝紫渐变色全部改成暖橙棕渐变（对齐apishop官方暖色调）
   ======================================== */

/* from-blue-* 系列 → 暖橙色渐变起点 */
.from-blue-50,
.from-blue-400,
.from-blue-500,
.from-blue-600,
.from-blue-900 {
  --tw-gradient-from: #e8895a !important; /* brand-400 暖橙 */
  --tw-gradient-to: rgba(232, 137, 90, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

/* to-blue-* 系列 → 暖橙色渐变终点 */
.to-blue-500,
.to-blue-600 {
  --tw-gradient-to: #d4774a !important; /* brand-500 深橙棕 */
}

/* to-indigo-* 系列 → 深棕渐变终点（indigo 蓝紫太显眼，全改深棕） */
.to-indigo-50,
.to-indigo-100,
.to-indigo-500,
.to-indigo-600,
.to-indigo-900 {
  --tw-gradient-to: #2e1f14 !important; /* 深棕（对应 slate-700 映射值） */
}

/* from-indigo-* 系列 → 棕色渐变起点（如果真实CSS有用到） */
.from-indigo-100,
.from-indigo-900 {
  --tw-gradient-from: #3d2a1c !important; /* 中棕 */
  --tw-gradient-to: rgba(61, 42, 28, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

/* via-indigo-* 中间色（如果存在） */
.via-indigo-50,
.via-indigo-500,
.via-indigo-900 {
  --tw-gradient-to: rgba(46, 31, 20, 0) !important; /* 深棕半透 */
  --tw-gradient-stops: var(--tw-gradient-from), #2e1f14, var(--tw-gradient-to) !important;
}
