/* Design tokens – Thiết bị cơ khí Alin B2
   Chủ đề "nước & thép": xanh lam nước làm màu chủ đạo, vàng hổ phách (màu nhóm trong Excel) làm điểm nhấn. */
:root {
  color-scheme: light;

  /* Màu thương hiệu */
  --brand-50:  #e8f4f9;
  --brand-100: #cde8f2;
  --brand-300: #6bb7d3;
  --brand-500: #0a7ba3;
  --brand-600: #086a8d;
  --brand-700: #07536f;
  --accent:    #f2b705;
  --accent-soft: #fff4cc;

  /* Bề mặt & chữ */
  --bg:        #f3f6f9;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --border:    #dbe3ea;
  --border-strong: #c3cfda;
  --text:      #14212d;
  --text-2:    #4a5b6b;
  --text-3:    #75869a;
  --on-brand:  #ffffff;

  /* Thanh bên */
  --side-bg:     #0d2332;
  --side-bg-2:   #143247;
  --side-text:   #c6d5e0;
  --side-text-2: #8aa1b3;
  --side-active: #1b4764;

  /* Ngữ nghĩa */
  --ok:        #12805a;
  --ok-bg:     #e1f4ec;
  --warn:      #a35e00;
  --warn-bg:   #fff1d6;
  --danger:    #bf2f26;
  --danger-bg: #fde9e7;
  --info:      #0a7ba3;
  --info-bg:   #e3f2f8;

  /* Cột "theo dõi vận hành" */
  --track-bg:  #f1f8fb;
  --track-head:#d9edf5;

  --focus: 0 0 0 3px rgba(10, 123, 163, .35);

  /* Chữ */
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;

  /* Khoảng cách (bậc 4px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;

  /* Bo góc & đổ bóng */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(16, 36, 52, .06), 0 1px 1px rgba(16, 36, 52, .04);
  --sh-2: 0 4px 14px rgba(16, 36, 52, .10), 0 1px 3px rgba(16, 36, 52, .06);
  --sh-3: 0 18px 48px rgba(10, 28, 42, .28);

  /* Chuyển động */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms;
  --t: 200ms;

  --sidebar-w: 272px;
  --topbar-h: 60px;
  --row-h: 56px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-50:  #10303f;
  --brand-100: #14415a;
  --brand-300: #4aa5c6;
  --brand-500: #3aa6cc;
  --brand-600: #5bb8d9;
  --brand-700: #8fd0e8;
  --accent-soft: #3a3010;

  --bg:        #0b141c;
  --surface:   #111d27;
  --surface-2: #152330;
  --surface-3: #1b2c3b;
  --border:    #243645;
  --border-strong: #35495a;
  --text:      #e6eef4;
  --text-2:    #aebdca;
  --text-3:    #7f93a4;
  --on-brand:  #04141c;

  --side-bg:     #08121a;
  --side-bg-2:   #0f1d29;
  --side-active: #17364b;

  --ok:        #4cc597;
  --ok-bg:     #11382b;
  --warn:      #f0b24a;
  --warn-bg:   #3a2c10;
  --danger:    #ff8279;
  --danger-bg: #43201d;
  --info:      #5bb8d9;
  --info-bg:   #12384a;

  --track-bg:  #122431;
  --track-head:#173447;
  --focus: 0 0 0 3px rgba(91, 184, 217, .45);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 4px 14px rgba(0, 0, 0, .45);
  --sh-3: 0 18px 48px rgba(0, 0, 0, .6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand-50:  #10303f; --brand-100: #14415a; --brand-300: #4aa5c6; --brand-500: #3aa6cc; --brand-600: #5bb8d9; --brand-700: #8fd0e8;
    --accent-soft: #3a3010;
    --bg: #0b141c; --surface: #111d27; --surface-2: #152330; --surface-3: #1b2c3b; --border: #243645; --border-strong: #35495a;
    --text: #e6eef4; --text-2: #aebdca; --text-3: #7f93a4; --on-brand: #04141c;
    --side-bg: #08121a; --side-bg-2: #0f1d29; --side-active: #17364b;
    --ok: #4cc597; --ok-bg: #11382b; --warn: #f0b24a; --warn-bg: #3a2c10; --danger: #ff8279; --danger-bg: #43201d; --info: #5bb8d9; --info-bg: #12384a;
    --track-bg: #122431; --track-head: #173447;
    --focus: 0 0 0 3px rgba(91, 184, 217, .45);
    --sh-1: 0 1px 2px rgba(0, 0, 0, .35); --sh-2: 0 4px 14px rgba(0, 0, 0, .45); --sh-3: 0 18px 48px rgba(0, 0, 0, .6);
  }
}
