/* ============================================================
   Axy Gateway 全局主题 —— apinebula 风格移植（暖纸/暖黑 + 发丝线 + 暖橙）
   注入方式：index.html 尾部 <link>，同名选择器按加载顺序覆盖
   ============================================================ */

/* ---------- 亮色：暖纸（apinebula --bg #f7f5f2 同源） ---------- */
:root {
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  --background: #f7f5f2;
  --card: #ffffff;
  --popover: #ffffff;
  --foreground: #211e1a;
  --card-foreground: #211e1a;
  --popover-foreground: #211e1a;
  --muted: #efece7;
  --muted-foreground: #8c8a84;
  --secondary: #eee9e2;
  --secondary-foreground: #4a453f;
  --border: rgba(32, 29, 26, 0.09);
  --input: rgba(32, 29, 26, 0.1);
  --primary: #e27d0a;
  --primary-foreground: #ffffff;
  --ring: #e27d0a;
  --accent: #efe9e1;
  --accent-foreground: #211e1a;
  --radius: 0.75rem;
  --sidebar: #f2efeb;
  --sidebar-border: rgba(32, 29, 26, 0.08);
  color-scheme: light;
}

/* ---------- 暗色：暖黑（apinebula #111110 同源） ---------- */
html.dark, .dark {
  --background: #111110;
  --card: #171614;
  --popover: #1c1a18;
  --foreground: #f0ede8;
  --card-foreground: #f0ede8;
  --popover-foreground: #f0ede8;
  --muted: #201e1b;
  --muted-foreground: #8c8a84;
  --secondary: #232120;
  --secondary-foreground: #e8e4de;
  --border: rgba(240, 237, 232, 0.09);
  --input: rgba(240, 237, 232, 0.12);
  --primary: #fc8e1b;
  --primary-foreground: #ffffff;
  --ring: #fc8e1b;
  --accent: #26231f;
  --accent-foreground: #f0ede8;
  --sidebar: #141311;
  --sidebar-border: rgba(240, 237, 232, 0.08);
  color-scheme: dark;
}

/* ---------- 全局排版 ---------- */
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  letter-spacing: -0.025em;
}
h1 { font-weight: 500; }

/* ---------- 顶栏：毛玻璃 + 发丝线（apinebula 招牌） ---------- */
header, [class*="app-header"] {
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: color-mix(in srgb, var(--background) 72%, transparent) !important;
  border-bottom: 1px solid var(--border) !important;
}
html.dark header, .dark [class*="app-header"] {
  background: rgba(17, 17, 16, 0.72) !important;
  border-bottom: 1px solid rgba(240, 237, 232, 0.1) !important;
}

/* ---------- 卡片：发丝边框、去重阴影 ---------- */
[class*="card"], [class*="Card"] {
  box-shadow: none;
}

/* ---------- 主按钮：暖橙 ---------- */
button[class*="primary"], a[class*="primary"],
.bg-primary { background-color: var(--primary) !important; }

/* ---------- 表格：发丝行线 + 弱化表头 ---------- */
table th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
table td, table th { border-color: var(--border); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted-foreground) 35%, transparent);
  border-radius: 8px;
}
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 链接 hover ---------- */
a { transition: color 0.15s ease; }
