/*
 * tokens.css: MÀU, FONT, KHOẢNG CÁCH, BO GÓC, ĐỔ BÓNG của thương hiệu IAM.
 * Muốn đổi "giao diện" cả trang thì chỉ sửa ở đây. File khác KHÔNG được ghi mã màu trực tiếp.
 *
 * Có 2 nhóm biến màu:
 *  --iam-*   màu CỐ ĐỊNH của thương hiệu (lấy từ logo). Không đổi theo sáng/tối.
 *  còn lại   màu GIAO DIỆN. Trang mặc định sáng, chỉ tối khi đặt data-theme="dark".
 *
 * Học từ các design system (xem docs/design.md): dùng tên biến theo VAI TRÒ
 * (--surface, --ink, --brand...) thay vì theo màu (--blue-500), giống shadcn/ui.
 */
:root{
  /* Màu cố định của thương hiệu */
  --iam-blue:#1079BF;
  --iam-blue-deep:#0B5A8F;
  --iam-navy:#0A2E4D;
  --iam-red:#D10B0C;
  --iam-white:#FFFFFF;
  --paper-ink:#111111;   /* chữ trên bản xem trước giấy A4 */
  --paper-line:#333333;  /* kẻ bảng trên bản xem trước */

  /* Màu giao diện: chế độ sáng */
  --bg:#F8FBFE;
  --surface:#FFFFFF;
  --surface-2:#EFF6FC;
  --ink:#183149;
  --ink-2:#36536D;
  --muted:#526A80;
  --line:#D9E6F1;
  --line-strong:#B9CFE2;
  --brand:#0B6FAE;
  --brand-ink:#0B5A8F;
  --brand-soft:#E3F0FA;
  --on-brand:#FFFFFF;
  --alert:#D10B0C;
  --alert-soft:#FDECEC;
  --warn:#B45309;
  --warn-soft:#FEF3E2;
  --ok:#137A4A;
  --ok-soft:#E5F5EC;
  --zalo:#0068FF;
  --submission-accent:#0B766E;
  --template-accent:#6C47B6;
  --directory-rose:#A23C70;
  /* Danh bạ đa sắc nhẹ: nền sáng, màu đậm chỉ dùng làm điểm nhấn. */
  --directory-purple:#70569E;
  --directory-ink:#48647B;
  --directory-actions-bg:#F7FAFD;
  --directory-action-line:#D5E5F2;
  --directory-action-hover:#EBF4FB;
  --directory-action-hover-line:#A5C9E4;
  --directory-email-bg:#E9F3FB;
  --overlay:rgba(8,24,40,.42);
  --shadow-sm:0 1px 2px rgba(15,34,54,.06);
  --shadow:0 1px 2px rgba(15,34,54,.05),0 8px 24px -12px rgba(15,34,54,.18);
  --shadow-lg:0 24px 64px -24px rgba(15,34,54,.35);
  --hero-a:#EAF5FF;

  /* Chân trang luôn dùng nền đậm để làm rõ nhận diện IAM. */
  --footer-bg:#0B1B2D;
  --footer-ink:#E6EEF6;
  --footer-muted:#A9BDD0;
  --footer-accent:#69B8F5;
  --footer-line:#2A4056;

  /* Chữ */
  --font-display:"Lexend","Be Vietnam Pro",system-ui,sans-serif;
  --font-body:"Be Vietnam Pro",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --fs-xs:12px; --fs-sm:13.5px; --fs-md:15px; --fs-lg:17px; --fs-xl:21px; --fs-2xl:28px; --fs-3xl:clamp(28px,4.2vw,44px);

  /* Khoảng cách theo lưới 4px */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:48px; --sp-16:64px;

  /* Bo góc */
  --r-sm:8px; --r:12px; --r-lg:16px; --r-xl:22px; --r-full:999px;

  /* Chuyển động giao diện */
  --motion-fast:160ms;
  --motion-enter:220ms;
  --ease-out:cubic-bezier(.23,1,.32,1);
  --card-reveal-duration:680ms;
  --card-opacity-duration:540ms;
  --card-stagger-step:95ms;
  --card-ease:cubic-bezier(.16,1,.3,1);
  --card-perspective:1000px;

  --topbar-h:64px;
  color-scheme:light;
}

:root[data-theme="dark"]{
  --bg:#0B1520; --surface:#111E2B; --surface-2:#162636; --ink:#E6EEF6; --ink-2:#B8C8D8; --muted:#8DA2B6;
  --line:#22354A; --line-strong:#2E4560; --brand:#4DA8E8; --brand-ink:#8CCBF5; --brand-soft:#132F48; --on-brand:#06223A;
  --alert:#FF6B66; --alert-soft:#3A1717; --warn:#F2B35B; --warn-soft:#3A2A12; --ok:#5BD198; --ok-soft:#10301F; --zalo:#4D95FF;
  --submission-accent:#59D4C4; --template-accent:#C8AEF5; --directory-rose:#EC9AC3;
  --directory-purple:var(--template-accent); --directory-ink:var(--ink-2);
  --directory-actions-bg:var(--surface-2); --directory-action-line:var(--line);
  --directory-action-hover:var(--brand-soft); --directory-action-hover-line:var(--brand); --directory-email-bg:var(--brand-soft);
  --overlay:rgba(0,0,0,.6); --shadow-sm:none; --shadow:0 1px 0 rgba(255,255,255,.03),0 10px 30px -14px rgba(0,0,0,.7); --shadow-lg:0 24px 64px -20px rgba(0,0,0,.8);
  --hero-a:#0F2234;
  color-scheme:dark;
}
