/* ============================================
   货代小工具 — ① 设计令牌 (Design Tokens)
   视觉方向：现代 SaaS（中性灰主导，品牌色克制）
   注意：本文件中的“旧名别名”段是迁移兼容层，
   inquiry.css / records.css 仍依赖这些变量名，勿删。
   （oversize.css 当前未使用任何 CSS 变量，仅此备查。）
   ============================================ */

:root {
  /* ---------- 中性色阶 ---------- */
  --gray-25:  #fcfcfd;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* ---------- 品牌色 ---------- */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;

  /* ---------- 状态色 ----------
     取值约束：作为「白字底色」或「白底字色」使用时对比度必须 ≥4.5:1（WCAG AA）。
     审计实测：#16a34a 只有 3.30:1、#0ea5e9 只有 2.6:1、#94a3b8 只有 2.36:1，
     均不达标，故这里统一改用 -text 档的深色。 */
  --success:      #15803d;   /* 白底 5.02:1 / 白字 5.02:1 */
  --success-hover: #166534;
  --success-soft: #dcfce7;
  --success-text: #15803d;
  --warning:      #f59e0b;
  --warning-soft: #fef3c7;
  --warning-text: #b45309;
  --danger:       #dc2626;   /* 白字 4.83:1 */
  --danger-soft:  #fee2e2;
  --danger-text:  #b91c1c;
  --info:         #0ea5e9;   /* 装饰用，不承载文字 */
  --info-badge:   #0369a1;   /* 徽章底色，白字 5.5:1 */
  --info-soft:    #e0f2fe;
  --info-text:    #0369a1;

  /* ---------- 语义表面 ---------- */
  --surface-base:    var(--gray-50);
  --surface-raised:  #ffffff;
  --surface-overlay: #ffffff;
  --surface-sunken:  var(--gray-100);
  --surface-hover:   var(--gray-100);
  --surface-active:  var(--gray-200);

  /* ---------- 描边 ---------- */
  --border-subtle: #eef1f5;
  --border-default: var(--gray-200);
  --border-strong: var(--gray-300);

  /* ---------- 文字 ---------- */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-tertiary:  var(--gray-400);
  --text-disabled:  var(--gray-300);
  --text-inverse:   #ffffff;
  /* placeholder 是真实文字，需满足 4.5:1。--text-tertiary(#94a3b8) 只有
     2.56:1，--text-secondary(#64748b) 在浅蓝底上又会掉到 4.4:1，故单列一档。 */
  --text-placeholder: #5b6675;

  /* ---------- 圆角 ---------- */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 999px;

  /* ---------- 阴影（低透明度、多层、克制） ---------- */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, .04), 0 4px 8px rgba(15, 23, 42, .05);
  --shadow-lg: 0 4px 8px rgba(15, 23, 42, .04), 0 12px 24px rgba(15, 23, 42, .08);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, .14);

  /* ---------- 动效 ---------- */
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 280ms;
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  /* ---------- 间距 ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ---------- 字号 ---------- */
  --text-xs:   .75rem;
  --text-sm:   .8125rem;
  --text-base: .875rem;
  --text-md:   .9375rem;
  --text-lg:   1.0625rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;

  /* ---------- 层级 ---------- */
  --z-sticky:  1020;
  --z-dropdown: 1040;
  --z-overlay: 1050;
  --z-modal:   1060;
  --z-toast:   1090;

  /* ---------- 布局 ---------- */
  --content-max: 1440px;
  --content-max-narrow: 1080px;
  --header-height: 56px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* ============================================
     旧名别名（迁移兼容，勿删）
     以下变量名被 inquiry.css / records.css /
     oversize.css 以及模板行内样式引用。
     ============================================ */
  --primary:       var(--brand-600);
  --primary-dark:  var(--brand-700);
  --primary-light: var(--brand-50);
  --accent:        var(--brand-400);
  --bg-body:       var(--surface-base);
  --bg-card:       var(--surface-raised);
  --border-color:  var(--border-default);
  --radius:        var(--radius-md);
  --transition:    var(--duration-base) var(--ease-out);
  /* 旧 --shadow 无对应新名；旧 --shadow-sm/-md/-lg 与新令牌同名，沿用即可 */
  --shadow:        var(--shadow-sm);
}
