

:root {
  color-scheme: dark;

  /* Nền và chữ — nền tối mặc định cho giờ phiên */
  --bg: #101214;
  --surface: #171a1d;
  --surface-2: #1f2327;
  --line: #2d3237;
  --line-strong: #6e757c;
  --text: #ece9e2;
  --text-muted: #a3a8ae;
  --text-faint: #8b9198;

  /* Nhận diện Be: chỉ dùng cho khung, không tô số */
  --brand-gold: #f8bc0c;
  --brand-ink: #111111;
  --focus: #f8bc0c;
  --logo-bg: #ffffff;      /* logo Be gốc nền trắng */

  /* Quy ước bảng điện VN — chỉ dùng cho số và nến.
     Tham chiếu là vàng chanh (như SSI), tách khỏi vàng cam của nhận diện Be. */
  --up: #33cc70;
  --down: #ff5c52;
  --ref: #ece04a;
  --ceiling: #e070ff;
  --floor: #2ec5f0;

  /* Trạng thái dữ liệu — huy hiệu, không tô số */
  --warn: #ff9f43;
  --fresh: #33cc70;
  --stale: #ff9f43;
  --stopped: #ff5c52;
  --fake-bg: #3a2a00;
  --fake-text: #ffd36b;

  /* Chart */
  --chart-bg: #101214;
  --chart-grid: #1c2024;
  --chart-text: #a3a8ae;
  --chart-cost: #ece9e2;
  --chart-stop: #ff5c52;
  --chart-event: #e0a030;
  --chart-news: #2ecc5a; /* Boss #2951 19/10: dấu tin/sự kiện trên chart màu xanh lá */
  --chart-vol-up: rgba(51, 204, 112, 0.35);
  --chart-vol-down: rgba(255, 92, 82, 0.35);

  
  --ind-blue: #5b9bff;
  --ind-red: #ff6b5e;
  --ind-green: #3ccf7a;
  --ind-black: #ece9e2;
  --ind-custom9: #ffb04d;
  --ind-custom11: #c39bff;
  --ind-custom13: #4fd1c5;
  --ind-cycle: #9fb3c8;
  --ind-grey: #8b9198;
  --ind-cloud-up: rgba(205, 210, 215, 0.16);
  --ind-cloud-down: rgba(120, 126, 133, 0.30);
  --ind-rsi-up: rgba(255, 120, 190, 0.30);
  --ind-rsi-down: rgba(60, 200, 222, 0.28);
  --ind-vol-up: rgba(91, 155, 255, 0.45);
  --ind-vol-down: rgba(255, 107, 94, 0.45);
}

:root[data-theme="light"] {
  color-scheme: light;

  /* Nền ngà champagne theo nhận diện Be */
  --bg: #f7f3e8;
  --surface: #fffdf8;
  --surface-2: #f1ebdb;
  --line: #ddd3b9;
  --line-strong: #8a8270;
  --text: #181818;
  --text-muted: #696356;
  --text-faint: #64686d;

  --brand-gold: #f8bc0c;
  --brand-ink: #111111;
  --focus: #9a6f00;
  --logo-bg: #ffffff;

  --up: #0b7a35;
  --down: #c4291f;
  --ref: #746a00;
  --ceiling: #9a1fc0;
  --floor: #00708c;

  --warn: #a65400;
  --fresh: #0b7a35;
  --stale: #a65400;
  --stopped: #c4291f;
  --fake-bg: #fff1c2;
  --fake-text: #6b4e00;

  --chart-bg: #ffffff;
  --chart-grid: #eeeae0;
  --chart-text: #5d6166;
  --chart-cost: #17181a;
  --chart-stop: #c4291f;
  --chart-event: #8a5a00;
  --chart-news: #0a9a3c;
  --chart-vol-up: rgba(11, 122, 53, 0.30);
  --chart-vol-down: rgba(196, 41, 31, 0.30);

  --ind-blue: #1f5fd6;
  --ind-red: #c4291f;
  --ind-green: #0b7a35;
  --ind-black: #17181a;
  --ind-custom9: #b86a00;
  --ind-custom11: #7a3fc4;
  --ind-custom13: #00796f;
  --ind-cycle: #5a6b80;
  --ind-grey: #6b6f74;
  --ind-cloud-up: rgba(150, 150, 150, 0.18);
  --ind-cloud-down: rgba(90, 90, 90, 0.28);
  --ind-rsi-up: rgba(220, 60, 140, 0.22);
  --ind-rsi-down: rgba(0, 150, 170, 0.22);
  --ind-vol-up: rgba(31, 95, 214, 0.35);
  --ind-vol-down: rgba(196, 41, 31, 0.35);
}

:root {
  /* Chữ: Boss #5345 28/10 "điều chỉnh chữ cho hợp tone" → cùng bộ chữ app Bee Universe (Be Vietnam Pro, Lexend tiêu đề,
     Roboto Mono), file để sẵn trong vendor\fonts-bee, không tải từ mạng. Thiếu file thì về font Windows như cũ. */
  --font-ui: "Be Vietnam Pro", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Lexend", "Bahnschrift", "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", "Consolas", ui-monospace, monospace;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --lh-tight: 1.25;
  --lh-base: 1.45;

  /* Khoảng cách lưới 4px */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;

  --radius: 4px;
  --row-h: 32px;
  --row-h-compact: 28px;
  --row-h-dense: 24px;      /* chế độ "Gọn" của Bảng giá, kiểu bảng điện */
  --fs-dense: 13px;         /* không nhỏ hơn: Boss nhìn lâu trong phiên */
  --topbar-h: 48px;

  /* Chuyển động duy nhất: nháy ô giá khi đổi */
  --flash-ms: 600ms;
}


:root, :root[data-theme="light"] {
  --chart-bg: #ffffff;
  --chart-grid: #cfcfcf;
  --chart-text: #333333;
  --chart-up: #0000e6;
  --chart-down: #e00000;
  --chart-cost: #111111;
  --chart-stop: #e00000;
  --chart-news: #0a9a3c;
  --chart-event: #8a5a00; 
  --ind-blue: #0000e6;
  --ind-red: #e00000;
  --ind-green: #008a00;
  --ind-black: #111111;
  --ind-custom9: #009a00;
  --ind-custom11: #0096b0;
  --ind-custom13: #7a00b8;
  --ind-cycle: #8c8c8c;
  --ind-grey: #8c8c8c;
  --ind-rsi-signal: #d000c0;
  /* Mây theo AFL BEE _ ICHIMOKU 3: SpanA > SpanB colorLightGrey, ngược lại colorGrey40 (Boss 15/10 13:21) */
  --ind-cloud-up: #c0c0c0;
  --ind-cloud-down: #555555;
  --ind-rsi-up: rgba(240, 120, 160, 0.40);
  --ind-rsi-down: rgba(0, 210, 190, 0.55);
  --ind-vol-up: #0000e6;
  --ind-vol-down: #e00000;
}
.num {
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  :root { --flash-ms: 0ms; }
}
