/* ============================================================
   Feng API · 控制台皮肤（注入 new-api SPA）
   与首页同一套语言：米白纸感、深林绿、柔和圆角、细边框、轻阴影
   ============================================================ */

:root {
  --background: #f7f4ec;
  --foreground: #101e17;
  --card: #fdfbf6;
  --card-foreground: #101e17;
  --popover: #fdfbf6;
  --popover-foreground: #101e17;
  --primary: #16382a;
  --primary-foreground: #f7f4ec;
  --secondary: #eceae0;
  --secondary-foreground: #101e17;
  --muted: #efeade;
  --muted-foreground: #5c6a62;
  --accent: #e7f0da;
  --accent-foreground: #16382a;
  --destructive: #b4442f;
  --destructive-foreground: #fffaf3;
  --border: #e5e0d1;
  --input: #e5e0d1;
  --ring: #16382a;
  --radius: 0.75rem;

  --sidebar: #f2eee3;
  --sidebar-foreground: #3f4c44;
  --sidebar-primary: #16382a;
  --sidebar-primary-foreground: #f7f4ec;
  --sidebar-accent: #e7f0da;
  --sidebar-accent-foreground: #16382a;
  --sidebar-border: #e5e0d1;
  --sidebar-ring: #16382a;
}

.dark {
  --background: #12140f;
  --foreground: #eef1e6;
  --card: #191c16;
  --card-foreground: #eef1e6;
  --popover: #1d2019;
  --popover-foreground: #eef1e6;
  --primary: #d8e8c4;
  --primary-foreground: #12140f;
  --secondary: #232820;
  --secondary-foreground: #eef1e6;
  --muted: #20251d;
  --muted-foreground: #a9b2a5;
  --accent: #232b1d;
  --accent-foreground: #eef1e6;
  --destructive: #e0776a;
  --destructive-foreground: #12140f;
  --border: #2a2f25;
  --input: #2a2f25;
  --ring: #d8e8c4;

  --sidebar: #15170f;
  --sidebar-foreground: #b9c2b5;
  --sidebar-primary: #d8e8c4;
  --sidebar-primary-foreground: #12140f;
  --sidebar-accent: #232b1d;
  --sidebar-accent-foreground: #eef1e6;
  --sidebar-border: #2a2f25;
  --sidebar-ring: #d8e8c4;
}

/* 图表色：森林绿 → 薄荷 */
:root {
  --chart-1: #16382a;
  --chart-2: #2f6b4f;
  --chart-3: #6b9e7f;
  --chart-4: #a7c9b0;
  --chart-5: #d8e8c4;
}
.dark {
  --chart-1: #d8e8c4;
  --chart-2: #a7c9b0;
  --chart-3: #6b9e7f;
  --chart-4: #2f6b4f;
  --chart-5: #16382a;
}

/* 背景与字体 */
html,
body {
  background: var(--background) !important;
  color: var(--foreground) !important;
  font-variant-numeric: tabular-nums;
}

/* 侧栏 */
[data-slot="sidebar"],
aside {
  border-right: 1px solid var(--sidebar-border) !important;
  background: var(--sidebar) !important;
}
[data-slot="sidebar"] a[aria-current="page"] {
  background: var(--sidebar-accent) !important;
  color: var(--sidebar-accent-foreground) !important;
  font-weight: 600 !important;
}
[data-slot="sidebar"] a[aria-current="page"] svg,
[data-slot="sidebar"] a[aria-current="page"] span {
  color: var(--sidebar-accent-foreground) !important;
}

/* 卡片：细边框 + 轻阴影 */
[data-slot="card"],
.card {
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  box-shadow: 0 1px 2px rgba(16, 30, 23, 0.03), 0 12px 30px -24px rgba(16, 30, 23, 0.18) !important;
}

/* 顶栏 */
header {
  border-bottom: 1px solid var(--border) !important;
  background: color-mix(in srgb, var(--background) 92%, transparent) !important;
  backdrop-filter: blur(12px);
}

/* 输入控件 */
input,
select,
textarea {
  border-color: var(--border) !important;
  background: var(--card) !important;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ring) !important;
  outline-offset: 1px !important;
}

/* 主按钮 */
button[data-slot="button"][data-variant="default"],
button[data-variant="default"] {
  font-weight: 600 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
button[data-slot="button"][data-variant="default"]:hover,
button[data-variant="default"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -14px rgba(16, 30, 23, 0.55);
}

/* 表头 */
table thead th {
  font-size: 11px !important;
  letter-spacing: 0.06em;
  color: var(--muted-foreground) !important;
  background: color-mix(in srgb, var(--muted) 70%, transparent) !important;
  border-bottom: 1px solid var(--border) !important;
}
table td {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent) !important;
}
table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 55%, transparent) !important;
}



/* 选中与滚动条 */
::selection { background: color-mix(in srgb, var(--accent) 85%, transparent); color: var(--foreground); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--border) 90%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--border) 90%, transparent); border-radius: 999px; }

/* 登录 / 注册卡片：柔和圆角 + 轻阴影 */
[class*="sm:w-[480px]"] {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  padding: 36px !important;
  box-shadow: 0 1px 2px rgba(16, 30, 23, 0.04), 0 30px 60px -40px rgba(16, 30, 23, 0.35);
}

/* 登录页背景：米白 + 一点薄荷柔光 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%);
}
/* 侧栏文字对比度 */
[data-slot="sidebar"] a,
[data-slot="sidebar"] button {
  color: var(--sidebar-foreground) !important;
}
[data-slot="sidebar"] a[aria-current="page"],
[data-slot="sidebar"] a[aria-current="page"] * {
  color: var(--sidebar-accent-foreground) !important;
}
[data-slot="sidebar"] [data-slot="sidebar-group-label"],
[data-slot="sidebar"] h3,
[data-slot="sidebar"] h4 {
  color: color-mix(in srgb, var(--sidebar-foreground) 70%, transparent) !important;
  font-weight: 600 !important;
}

/* 语义色统一到品牌绿系 */
:root {
  --info: #2f6b4f; --info-foreground: #f7f4ec;
  --success: #16382a; --success-foreground: #f7f4ec;
  --warning: #9a7a2c; --warning-foreground: #f7f4ec;
  --neutral: #6b7a71; --neutral-foreground: #f7f4ec;
}
.dark {
  --info: #a7c9b0; --info-foreground: #12140f;
  --success: #d8e8c4; --success-foreground: #12140f;
  --warning: #d8c48c; --warning-foreground: #12140f;
  --neutral: #8d978a; --neutral-foreground: #12140f;
}
/* 总览统计卡底部细线（SVG 渐变）改为品牌绿 */
svg path[fill^="url(#stat-card-line"] { fill: #2f6b4f !important; }
.dark svg path[fill^="url(#stat-card-line"] { fill: #a7c9b0 !important; }

/* 统计卡底部渐变线与描边：统一为品牌绿 */
svg stop { stop-color: #2f6b4f !important; }
.dark svg stop { stop-color: #a7c9b0 !important; }
svg path[stroke="#4ca9ff"], svg path[stroke="#00a3aa"], svg path[stroke="#9095e8"] { stroke: #2f6b4f !important; }
svg path[style*="stroke"] { stroke: #2f6b4f !important; }

/* 总览三张统计卡：把 accent 变量也换成品牌绿 */
:root {
  --overview-accent-1: #2f6b4f;
  --overview-accent-2: #6b9e7f;
  --overview-accent-3: #a7c9b0;
}
.dark {
  --overview-accent-1: #a7c9b0;
  --overview-accent-2: #6b9e7f;
  --overview-accent-3: #d8e8c4;
}
svg:has(path[fill^="url(#stat-card-line"]) stop { stop-color: currentColor !important; }

/* ===== 表格与侧边栏细化 ===== */
main table thead th,
[data-slot="table"] thead th {
  background: color-mix(in srgb, var(--mint) 38%, var(--card)) !important;
  color: var(--ink-2, #4a5a50) !important;
  font-weight: 500 !important;
}
main table tbody tr,
[data-slot="table"] tbody tr {
  transition: background .16s ease;
}
main table tbody tr:hover,
[data-slot="table"] tbody tr:hover {
  background: color-mix(in srgb, var(--mint) 42%, transparent) !important;
}
main table td,
main table th {
  border-color: color-mix(in srgb, var(--border) 70%, transparent) !important;
}

aside a,
nav a[data-sidebar] {
  transition: background .18s ease, color .18s ease;
}

/* ===== 分段标签 / 弹层 ===== */
[data-slot="tabs-list"] {
  background: color-mix(in srgb, var(--muted) 70%, var(--card)) !important;
  border-radius: 999px !important;
  padding: 4px !important;
  height: auto !important;
  border: 1px solid var(--border) !important;
}
[data-slot="tabs-trigger"] {
  border-radius: 999px !important;
  color: var(--muted-foreground) !important;
  padding: 6px 14px !important;
  transition: background .18s ease, color .18s ease;
}
[data-slot="tabs-trigger"][data-state="active"] {
  background: var(--card) !important;
  color: var(--primary) !important;
  box-shadow: 0 1px 2px rgba(16, 30, 23, .10) !important;
}
[data-slot="tabs-trigger"]:hover { color: var(--foreground) !important; }

[data-slot="dialog-overlay"],
[data-slot="sheet-overlay"] {
  background: color-mix(in srgb, #0c1a13 55%, transparent) !important;
  backdrop-filter: blur(2px);
}
[data-slot="dialog-content"] {
  border-radius: 20px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 40px 90px -60px rgba(12, 30, 22, .7) !important;
}
[data-slot="sheet-content"] {
  box-shadow: -30px 0 90px -60px rgba(12, 30, 22, .7) !important;
}

/* 新建渠道向导里的提供商卡片 */
[data-slot="sheet-content"] .card,
[role="dialog"] .card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
[data-slot="sheet-content"] .card:hover,
[role="dialog"] .card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border)) !important;
  box-shadow: 0 14px 30px -22px rgba(12, 30, 22, .6) !important;
}
