/* =====================================================================
   Astra R15 · Design tokens
   One source of truth for colour, status, type, space, radius, size, motion.
   Shared by every page; page CSS lives in css/pages/*.css.
   ===================================================================== */
:root{
  /* ---------- Field (page background) & glass surfaces ---------- */
  --field:            #EDF3FC;   /* luminous ice field behind everything */
  --field-pool-cyan:  #D2F1FF;   /* light pool, top right */
  --field-pool-blue:  #D8E2FF;   /* light pool, left */
  --glass:            rgba(255,255,255,.74);
  --glass-strong:     rgba(255,255,255,.90);
  --glass-solid:      #F8FBFF;   /* fallback when backdrop-filter is unavailable */
  --glass-edge:       rgba(255,255,255,.95);  /* 1px inner top highlight */
  --hairline:         rgba(17,48,110,.09);
  --hairline-strong:  rgba(17,48,110,.15);
  --scrim:            rgba(8,22,48,.32);
  --shadow-1: 0 1px 2px rgba(16,42,94,.05), 0 10px 26px -14px rgba(16,42,94,.20);
  --shadow-2: 0 2px 6px rgba(16,42,94,.06), 0 22px 44px -18px rgba(16,42,94,.28);
  --shadow-dock: 0 14px 34px -10px rgba(13,40,95,.30), 0 2px 8px rgba(13,40,95,.08);

  /* ---------- Ink ---------- */
  --ink:   #0B1830;   /* titles, primary numbers */
  --ink-2: #364460;   /* body text */
  --ink-3: #5B6781;   /* captions, labels (5.6:1 on white) */
  --ink-4: #5B6781;   /* readable placeholders; disabled controls use opacity */
  --on-accent: #FFFFFF;

  /* ---------- Brand ---------- */
  --blue:        #1565F2;   /* actions, links, selected */
  --blue-press:  #0E50CF;
  --blue-ink:    #0F56D9;   /* blue text on blue tint */
  --blue-soft:   #E8F0FF;
  --blue-line:   rgba(21,101,242,.26);
  --cyan:        #1FC8F0;
  --cyan-soft:   #E1F8FE;
  --brand-grad:  linear-gradient(135deg,#63E1FF 0%,#2D8CFF 46%,#1557E8 100%);
  --brand-grad-soft: linear-gradient(135deg,rgba(99,225,255,.20) 0%,rgba(45,140,255,.12) 50%,rgba(21,87,232,.10) 100%);

  /* ---------- Status system (text on tint ≥ 4.5:1) ----------
     ok   = 成功 / 已完成 / 已成交 / 接單中
     run  = 進行中 / 執行中 / 運行中 / 提交中
     wait = 等待 / 待搶單 / 待結算 / 退出中 / 無可匹配需求
     warn = 警告 / 餘額不足 / 本週額度用完 / 報價已變化
     bad  = 失敗 / 逾時 / 載入失敗
     off  = 中性 / 已取消 / 已暫停 / 已關閉 / 沒額度 / 已到期            */
  --ok:   #067A51;  --ok-bg:   #E1F5EB;  --ok-line:   rgba(6,122,81,.22);
  --run:  #0F56D9;  --run-bg:  #E7EFFF;  --run-line:  rgba(15,86,217,.22);
  --wait: #5F49CF;  --wait-bg: #EEEAFD;  --wait-line: rgba(95,73,207,.22);
  --warn: #945400;  --warn-bg: #FFF0D3;  --warn-line: rgba(148,84,0,.24);
  --bad:  #C02532;  --bad-bg:  #FDE8EA;  --bad-line:  rgba(192,37,50,.22);
  --off:  #5B6781;  --off-bg:  #EBEFF5;  --off-line:  rgba(91,103,129,.22);
  --gain: #067A51;  /* +$ */
  --loss: #C02532;  /* -$ */
  --side-buy:  #0F56D9;
  --side-sell: #0A7F86;

  /* ---------- Type ----------
     One native sans family for CJK, Latin and numerals. No font download or swap.
     All sizes in rem so the system/browser text size setting applies. */
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Arial, Roboto, "PingFang SC", miui, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  --fs-11: .6875rem;   /* 11 · dock labels, badges — the floor for any text */
  --fs-12: .75rem;     /* 12 · captions, table secondary lines */
  --fs-13: .8125rem;   /* 13 · labels, secondary text */
  --fs-14: .875rem;    /* 14 · form labels, supporting copy and notices */
  --fs-15: .9375rem;   /* 15 · body */
  --fs-16: 1rem;       /* 16 · editable text; avoids mobile input zoom */
  --fs-17: 1.0625rem;   /* 17 · module titles */
  --fs-20: 1.25rem;    /* 20 · section titles */
  --fs-28: 1.625rem;   /* 26 · page large titles */
  --num-s:  1.0625rem; /* 17 · numbers in lists */
  --num-m:  1.375rem;  /* 22 · stat tiles */
  --num-l:  1.875rem;  /* 30 · balances */
  --num-xl: 2.25rem;   /* 36 · hero amount */
  --lh-tight: 1.15;
  --lh:       1.45;
  --lh-loose: 1.6;

  /* ---------- Space (4-pt grid) ---------- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --gutter: 16px;      /* page side padding */
  --gap: 12px;         /* gap between modules */

  /* ---------- Radius (concentric: inner = outer − padding) ---------- */
  --r-sheet: 30px;  /* bottom sheets */
  --r-mod:   18px;  /* page modules */
  --r-tile:  14px;  /* tiles inside modules, stat tiles */
  --r-ctl:   14px;  /* inputs, segmented tracks */
  --r-sm:    10px;  /* icon tiles, small chips */
  --r-btn:   10px;  /* action buttons, including sheet actions */
  --r-pill:  999px; /* status pills, filter chips */

  /* ---------- Sizes ---------- */
  --tap:      44px;   /* minimum hit area, every interactive element */
  --btn-h:    50px;
  --btn-h-s:  36px;   /* visual height; hit area padded to 44 */
  --field-h:  52px;
  --header-h: 80px;
  --dock-h:   96px;

  /* ---------- Motion ---------- */
  --ease-out:    cubic-bezier(.2,.8,.2,1);
  --ease-snap:   cubic-bezier(.2,.8,.2,1);
  --t-fast: 160ms;
  --t:      260ms;
  --t-slow: 420ms;
}
