/* =========================================================================
   IrayaPay design tokens (CLAUDE.md §5.2). Never hard-code colors or sizes
   in components – use these. Company theming overrides the --ip-brand* and
   --ip-sidebar* values at runtime (ThemeStyle component).
   ========================================================================= */

/* Inter (SIL OFL 1.1), self-hosted. latin-ext carries the peso sign ₱ (U+20B1). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ---- Brand (IrayaPay Blue default; company theme overrides) ---- */
  --ip-brand: #2548C5;
  --ip-brand-hover: #2140AD;
  --ip-brand-pressed: #1C3796;
  --ip-brand-subtle: #E4E9F8;
  --ip-on-brand: #FFFFFF;
  --ip-logo-navy: #012456;
  --ip-accent-teal: #00A9C0;

  /* ---- Sidebar ---- */
  --ip-sidebar-bg: #121930;
  --ip-sidebar-fg: #E6E9F2;
  --ip-sidebar-fg-muted: #8A93AD;
  --ip-sidebar-hover: rgba(255, 255, 255, 0.06);
  --ip-sidebar-active-bg: var(--ip-brand);
  --ip-sidebar-active-fg: var(--ip-on-brand);
  --ip-sidebar-badge-bg: rgba(255, 255, 255, 0.10);
  --ip-sidebar-badge-fg: #C9CFE0;

  /* ---- Neutrals ---- */
  --ip-bg-page: #F3F5F9;
  --ip-bg-card: #FFFFFF;
  --ip-bg-subtle: #F6F7FA;   /* table header, hover */
  --ip-bg-hover: #F1F4FB;
  --ip-bg-selected: #E9EEFB;
  --ip-border: #E3E7EF;
  --ip-border-strong: #CBD2DF;
  --ip-fg: #141A2E;
  --ip-fg-secondary: #4A5370;
  --ip-fg-muted: #6B7390;     /* 4.6:1 on white */
  --ip-fg-disabled: #A3AABD;
  --ip-overlay: rgba(14, 19, 38, 0.45);

  /* ---- Semantic: fg / bg / border ---- */
  --ip-success-fg: #0F7A3D;  --ip-success-bg: #E6F5EC;  --ip-success-border: #B5E0C6;
  --ip-warning-fg: #8A5300;  --ip-warning-bg: #FFF4DE;  --ip-warning-border: #F4D49A;
  --ip-danger-fg:  #B42318;  --ip-danger-bg:  #FDECEA;  --ip-danger-border:  #F5C2BD;
  --ip-info-fg:    #1F4FB8;  --ip-info-bg:    #E8EEFC;  --ip-info-border:    #C3D2F5;

  /* ---- FRS tag colors (Step 3/4, payslip preview) ---- */
  --ip-tag-recurring-fg: #4A5370; --ip-tag-recurring-bg: #EEF0F5;
  --ip-tag-onetime-fg:   #8A5300; --ip-tag-onetime-bg:   #FFF1D6;
  --ip-tag-loan-fg:      #1F4FB8; --ip-tag-loan-bg:      #E6EDFC;
  --ip-tag-lwop-fg:      #B42318; --ip-tag-lwop-bg:      #FDE7E5;

  /* ---- Typography ---- */
  --ip-font: "Inter", "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ip-font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --ip-text-xs: 11px;
  --ip-text-sm: 12px;
  --ip-text-md: 14px;   /* body */
  --ip-text-lg: 16px;
  --ip-text-xl: 20px;
  --ip-text-2xl: 24px;
  --ip-text-3xl: 28px;
  --ip-weight-regular: 400;
  --ip-weight-medium: 500;
  --ip-weight-semibold: 600;
  --ip-weight-bold: 700;
  --ip-line: 1.45;
  --ip-numeric: tabular-nums;

  /* ---- Spacing (4 px grid) ---- */
  --ip-space-1: 4px;
  --ip-space-2: 8px;
  --ip-space-3: 12px;
  --ip-space-4: 16px;
  --ip-space-5: 24px;
  --ip-space-6: 32px;

  /* ---- Shape & elevation ---- */
  --ip-radius-sm: 4px;   /* inputs, buttons */
  --ip-radius-md: 8px;   /* cards, dialogs */
  --ip-radius-pill: 999px;
  --ip-shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --ip-shadow-2: 0 4px 16px rgba(16, 24, 40, 0.10);
  --ip-shadow-3: 0 12px 40px rgba(16, 24, 40, 0.18);
  --ip-focus-ring: 0 0 0 2px var(--ip-bg-card), 0 0 0 4px var(--ip-brand);

  /* ---- Sizes ---- */
  --ip-sidebar-w: 240px;
  --ip-sidebar-rail: 56px;
  --ip-topbar-h: 56px;
  --ip-row-compact: 36px;
  --ip-row-comfortable: 44px;
  --ip-control-h: 32px;
  --ip-dialog-max: 560px;
  --ip-drawer-w: 560px;
  --ip-form-max: 960px;
  --ip-content-max: 1440px;

  /* ---- Motion ---- */
  --ip-ease: cubic-bezier(0.2, 0, 0, 1);
  --ip-duration: 150ms;
}

/* Fluent UI v5 (Fluent 2) tokens follow IrayaPay tokens, so Fluent buttons,
   inputs and checkboxes pick up the company theme. Set on body so they win
   over the library defaults that live on :root. */
body {
  --colorBrandBackground: var(--ip-brand);
  --colorBrandBackgroundHover: var(--ip-brand-hover);
  --colorBrandBackgroundPressed: var(--ip-brand-pressed);
  --colorBrandBackgroundSelected: var(--ip-brand-hover);
  --colorBrandBackground2: var(--ip-brand-subtle);
  --colorBrandForeground1: var(--ip-brand);
  --colorBrandForeground2: var(--ip-brand-hover);
  --colorBrandForegroundLink: var(--ip-brand);
  --colorBrandForegroundLinkHover: var(--ip-brand-hover);
  --colorBrandForegroundLinkPressed: var(--ip-brand-pressed);
  --colorBrandForegroundLinkSelected: var(--ip-brand);
  --colorBrandStroke1: var(--ip-brand);
  --colorBrandStroke2: var(--ip-brand-subtle);
  --colorCompoundBrandStroke: var(--ip-brand);
  --colorCompoundBrandStrokeHover: var(--ip-brand-hover);
  --colorCompoundBrandStrokePressed: var(--ip-brand-pressed);
  --colorCompoundBrandBackground: var(--ip-brand);
  --colorCompoundBrandBackgroundHover: var(--ip-brand-hover);
  --colorCompoundBrandBackgroundPressed: var(--ip-brand-pressed);
  --colorNeutralForegroundOnBrand: var(--ip-on-brand);
  --colorStrokeFocus2: var(--ip-brand);
  --fontFamilyBase: var(--ip-font);
  --fontFamilyNumeric: var(--ip-font);
  --borderRadiusMedium: var(--ip-radius-sm);
  --borderRadiusLarge: var(--ip-radius-md);
}
