/* ==========================================================================
   TokenBay API — console theme
   与主站 (itokenbay.com) 共用同一套设计 token
   --ink:#14161a  --ink-soft:#3d434d  --muted:#6b7280
   --line:#e5e7eb --bg:#ffffff     --bg-alt:#f7f8fa
   --brand:#14332f --brand-soft:#1d4a44 --accent:#0f766e
   radius 8 / 9 / 10 / 999(pill)
   ========================================================================== */

html,
html[data-theme-preset],
html[data-theme-preset='default'],
html[data-theme-preset='anthropic'],
html[data-theme-preset='simple-large'],
body,
body[data-theme-preset],
#root {
  --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  --font-body: var(--font-sans) !important;

  --radius: 10px !important;

  --background: #ffffff !important;
  --foreground: #14161a !important;
  --card: #ffffff !important;
  --card-foreground: #14161a !important;
  --popover: #ffffff !important;
  --popover-foreground: #14161a !important;

  --primary: #14332f !important;
  --primary-foreground: #ffffff !important;
  --secondary: #e8f0ef !important;
  --secondary-foreground: #14332f !important;

  --muted: #f7f8fa !important;
  --muted-foreground: #6b7280 !important;

  --accent: #0f766e !important;
  --accent-foreground: #ffffff !important;

  --border: #e5e7eb !important;
  --input: #e5e7eb !important;
  --ring: #0f766e !important;
  --destructive: #c53732 !important;
  --destructive-foreground: #ffffff !important;

  --chart-1: #14332f !important;
  --chart-2: #0f766e !important;
  --chart-3: #47a99b !important;
  --chart-4: #8faaa6 !important;
  --chart-5: #d8e5e2 !important;

  --sidebar: #14332f !important;
  --sidebar-foreground: #e8f0ef !important;
  --sidebar-border: rgba(255, 255, 255, 0.14) !important;
  --sidebar-accent: rgba(15, 118, 110, 0.28) !important;
  --sidebar-accent-foreground: #ffffff !important;
  --sidebar-primary: #0f766e !important;
  --sidebar-primary-foreground: #ffffff !important;
  --sidebar-ring: #47a99b !important;
}

.dark,
html.dark,
body.dark,
.dark[data-theme-preset] {
  --background: #0f1211 !important;
  --foreground: #eef2f1 !important;
  --card: #171b1a !important;
  --card-foreground: #eef2f1 !important;
  --popover: #1b201f !important;
  --popover-foreground: #eef2f1 !important;

  --primary: #47a99b !important;
  --primary-foreground: #08110f !important;
  --secondary: #1d2a27 !important;
  --secondary-foreground: #c9dbd7 !important;

  --muted: #1b201f !important;
  --muted-foreground: #9aa7a4 !important;

  --accent: #47a99b !important;
  --accent-foreground: #08110f !important;

  --border: rgba(255, 255, 255, 0.12) !important;
  --input: rgba(255, 255, 255, 0.16) !important;
  --ring: #47a99b !important;

  --sidebar: #101b19 !important;
  --sidebar-foreground: #dbe6e3 !important;
  --sidebar-border: rgba(255, 255, 255, 0.1) !important;
  --sidebar-accent: rgba(71, 169, 155, 0.22) !important;
  --sidebar-accent-foreground: #ffffff !important;
}

/* ---------- base ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans) !important;
  letter-spacing: 0.005em;
}

h1, h2, h3, h4 {
  letter-spacing: -0.011em;
}

/* 主色按钮：主站深绿 + 细边 */
button[class*='bg-primary'],
a[class*='bg-primary'] {
  box-shadow: 0 1px 2px rgba(20, 51, 47, 0.18);
}

/* 表格与卡片：与主站一致的细边框、克制阴影 */
[data-slot='card'],
[data-slot='table'] {
  border-color: var(--border);
}

/* 输入框圆角对齐主站 9px */
input, textarea, select,
[data-slot='input'],
[data-slot='select-trigger'] {
  border-radius: 9px;
}

/* 登录页：品牌底色氛围 */
body:has(#root:empty) {
  background:
    radial-gradient(1100px 520px at 50% -12%, #e8f0ef 0%, rgba(232, 240, 239, 0) 62%),
    var(--background);
}

/* ---------- 页脚品牌 ---------- */
#tb-brand-footer {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11px;
  line-height: 1.6;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  opacity: 0.72;
  transition: opacity 0.18s ease;
  pointer-events: auto;
  white-space: nowrap;
}

#tb-brand-footer:hover {
  opacity: 1;
}

#tb-brand-footer b {
  font-weight: 600;
  color: #14332f;
}

#tb-brand-footer a {
  color: #0f766e;
  text-decoration: none;
}

#tb-brand-footer a:hover {
  text-decoration: underline;
}

#tb-brand-footer .tb-sep {
  color: #c9d3d1;
}

.dark #tb-brand-footer,
body.dark #tb-brand-footer {
  color: #9aa7a4;
  background: rgba(23, 27, 26, 0.86);
  border-color: rgba(255, 255, 255, 0.12);
}

.dark #tb-brand-footer b,
body.dark #tb-brand-footer b {
  color: #dbe6e3;
}

.dark #tb-brand-footer a,
body.dark #tb-brand-footer a {
  color: #47a99b;
}

@media (max-width: 640px) {
  #tb-brand-footer {
    display: none;
  }
}
