/* ============================================================
   Design tokens — daisyUI 5 主题 + 倍思品牌配色
   ------------------------------------------------------------
   1) 本地内置 daisyUI 5 (css/vendor/daisyui-5.css), 组件类名全部可用
   2) 主题用 daisyUI 的语义变量 (--color-* / --radius-* / --size-*),
      app.css 里原有的 --c-* token 全部由它们派生 → 改一处, 全站跟着变
   3) 浅色 / 深色两套, 由 <html data-theme="light|dark"> 切换
      (与顶栏主题按钮、localStorage returns_theme_v2 保持一致)
   4) 保留中性石墨的克制底色 + 钢蓝主色, 但把圆角/阴影/层次换成 daisyUI 的柔和质感
   ============================================================ */

/* ============================================================
   浅色主题 (daisyUI 语义变量)
   ============================================================ */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  /* --- daisyUI base 层 --- */
  --color-base-100: #ffffff;         /* 卡片 / 表面 */
  --color-base-200: #f2f4f7;         /* 页面底色 */
  --color-base-300: #e2e7ec;         /* 分隔线 / 边框 */
  --color-base-content: #1b1f24;     /* 主文字 */

  /* --- daisyUI 语义色 --- */
  --color-primary: #3d6f96;
  --color-primary-content: #ffffff;
  --color-secondary: #4b8f87;
  --color-secondary-content: #ffffff;
  --color-accent: #c78b34;
  --color-accent-content: #241a08;
  --color-neutral: #2c3138;
  --color-neutral-content: #f1f3f5;

  --color-info: #4a86b4;
  --color-info-content: #ffffff;
  --color-success: #4d8b66;
  --color-success-content: #ffffff;
  --color-warning: #b5842f;
  --color-warning-content: #241a08;
  --color-error: #b4483f;
  --color-error-content: #ffffff;

  /* --- daisyUI 形状 / 尺度 --- */
  --radius-selector: 0.75rem;
  --radius-field: 0.5rem;
  --radius-box: 0.75rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 1px;
  --depth: 1;
  --noise: 0;

  /* ============================================================
     app 自有 token (由上面派生, 保持原有变量名 → 老代码一行不用改)
     ============================================================ */
  --c-bg:            #f2f4f7;
  --c-surface:       #ffffff;
  --c-surface-1:     #f7f9fb;
  --c-surface-2:     #f7f9fb;
  --c-surface-3:     #eef1f4;
  --c-border:        #e2e7ec;
  --c-border-soft:   #ecf0f3;
  --c-hover:         #eef1f4;

  --c-fg:            #1b1f24;
  --c-fg-2:          #495059;
  --c-fg-3:          #737c86;
  --c-fg-4:          #9aa3ad;

  --c-accent:        #3d6f96;
  --c-accent-2:      #2f5877;
  --c-accent-dim:    #eaf1f6;
  --c-accent-glow:   rgba(61,111,150,0.14);
  --c-accent-h:      #f0f5f9;
  --c-accent-soft:   #eaf1f6;

  --c-cyan:          #4b8f87;
  --c-violet:        #6f7aa8;

  --c-ok:            #4d8b66;
  --c-ok-soft:       rgba(77,139,102,0.12);
  --c-ok-soft-strong:rgba(77,139,102,0.22);
  --c-warn:          #b5842f;
  --c-warn-soft:     rgba(181,132,47,0.14);
  --c-err:           #b4483f;
  --c-err-soft:      rgba(180,72,63,0.11);
  --c-err-soft-strong:rgba(180,72,63,0.20);
  --c-err-dim:       rgba(180,72,63,0.16);
  --c-info:          #4a86b4;
  --c-info-soft:     rgba(74,134,180,0.12);
  --c-info-soft-strong:rgba(74,134,180,0.22);

  /* 平台标识 */
  --c-tmall:         #e2711d;
  --c-jd:            #d1495b;
  --c-amazon:        #d9a520;

  /* 阴影 (daisyUI depth 风格的柔和投影) */
  --sh-1: 0 1px 2px rgba(23,32,43,0.05);
  --sh-2: 0 6px 16px -4px rgba(23,32,43,0.10), 0 2px 4px -2px rgba(23,32,43,0.05);
  --sh-3: 0 18px 44px -12px rgba(23,32,43,0.18);
}

/* ============================================================
   深色主题 (daisyUI 语义变量)
   ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;

  --color-base-100: #1c2025;
  --color-base-200: #14171a;
  --color-base-300: #2b3138;
  --color-base-content: #e6e9ed;

  --color-primary: #78a9d2;
  --color-primary-content: #10222f;
  --color-secondary: #6fb5a9;
  --color-secondary-content: #0f2320;
  --color-accent: #e0ac57;
  --color-accent-content: #241a08;
  --color-neutral: #333a42;
  --color-neutral-content: #eef0f3;

  --color-info: #82b3d8;
  --color-info-content: #0f1e29;
  --color-success: #77b894;
  --color-success-content: #0f2318;
  --color-warning: #d9a85c;
  --color-warning-content: #241a08;
  --color-error: #e0857c;
  --color-error-content: #2a1110;

  --radius-selector: 0.75rem;
  --radius-field: 0.5rem;
  --radius-box: 0.75rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 1px;
  --depth: 1;
  --noise: 0;

  --c-bg:            #14171a;
  --c-surface:       #1c2025;
  --c-surface-1:     #20252b;
  --c-surface-2:     #21262c;
  --c-surface-3:     #2b3138;
  --c-border:        #2b3138;
  --c-border-soft:   #23282e;
  --c-hover:         #262c33;

  --c-fg:            #e6e9ed;
  --c-fg-2:          #b3bac2;
  --c-fg-3:          #8b939c;
  --c-fg-4:          #656d76;

  --c-accent:        #78a9d2;
  --c-accent-2:      #97bedd;
  --c-accent-dim:    rgba(120,169,210,0.16);
  --c-accent-glow:   rgba(120,169,210,0.18);
  --c-accent-h:      rgba(120,169,210,0.12);
  --c-accent-soft:   rgba(120,169,210,0.14);

  --c-cyan:          #6fb5a9;
  --c-violet:        #949dc4;

  --c-ok:            #77b894;
  --c-ok-soft:       rgba(119,184,148,0.14);
  --c-ok-soft-strong:rgba(119,184,148,0.24);
  --c-warn:          #d9a85c;
  --c-warn-soft:     rgba(217,168,92,0.16);
  --c-err:           #e0857c;
  --c-err-soft:      rgba(224,133,124,0.15);
  --c-err-soft-strong:rgba(224,133,124,0.26);
  --c-err-dim:       rgba(224,133,124,0.20);
  --c-info:          #82b3d8;
  --c-info-soft:     rgba(130,179,216,0.15);
  --c-info-soft-strong:rgba(130,179,216,0.26);

  --c-tmall:         #f5a45c;
  --c-jd:            #e88b95;
  --c-amazon:        #e5c05c;

  --sh-1: 0 1px 2px rgba(0,0,0,0.32);
  --sh-2: 0 6px 18px -4px rgba(0,0,0,0.42), 0 2px 4px -2px rgba(0,0,0,0.3);
  --sh-3: 0 18px 48px -12px rgba(0,0,0,0.6);
}

/* ============================================================
   通用 token (两个主题共用)
   ============================================================ */
:root {
  /* --- 间距 --- */
  --s-0: 0;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;

  /* --- 圆角 (跟随 daisyUI radius token) --- */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 8px;
  --r-4: 12px;
  --r-pill: 999px;

  /* --- 字体 --- */
  --ff-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
             "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
  --ff-mono: "SF Mono", "Menlo", "Consolas", "Roboto Mono",
             ui-monospace, monospace;

  --fz-10: 10px;
  --fz-11: 11px;
  --fz-12: 12px;
  --fz-13: 13px;
  --fz-14: 14px;
  --fz-15: 15px;
  --fz-16: 16px;
  --fz-18: 18px;
  --fz-20: 20px;
  --fz-24: 24px;
  --fz-28: 28px;
  --fz-32: 32px;
  --fz-40: 40px;

  --lh-tight: 1.25;
  --lh-base:  1.55;
  --lh-loose: 1.7;

  /* --- 布局 --- */
  --nav-w: 232px;
  --topbar-h: 56px;
  --content-max: 1560px;
}
