/* Design tokens, fonts and tone helpers, copied from rawabi-kyc-demo/src/styles and src/ui/styles/tones.css (SAP Morning Horizon values). */
/*
 * "72" is SAP's Fiori typeface, shipped in @sap-theming/theming-base-content
 * under the Apache License 2.0 (see s../assets/fonts/LICENSE-*.txt).
 * Arabic text falls back to IBM Plex Sans Arabic (SIL OFL), imported in main.tsx.
 */
@font-face {
  font-family: '72';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/72-Light.woff2') format('woff2');
}
@font-face {
  font-family: '72';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/72-Regular.woff2') format('woff2');
}
@font-face {
  font-family: '72';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/72-Semibold.woff2') format('woff2');
}
@font-face {
  font-family: '72';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/72-Bold.woff2') format('woff2');
}
@font-face {
  font-family: '72Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/72Mono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: '72Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/72Mono-Bold.woff2') format('woff2');
}
:root {
  color-scheme: light;

  /* Brand and interaction */
  --c-brand: #0070f2;            /* sapBrandColor */
  --c-highlight: #0064d9;        /* sapHighlightColor, hover of brand */
  --c-link: #0064d9;             /* sapLinkColor */
  --c-focus: #0032a5;            /* sapContent_FocusColor */
  --c-selected: #0064d9;         /* sapSelectedColor */
  --c-selected-bg: #edf6ff;      /* sapButton_Selected_Background */
  --c-selection-row: #ebf8ff;    /* sapList_SelectionBackgroundColor */

  /* Text */
  --c-text: #131e29;             /* sapTextColor */
  --c-text-label: #556b82;       /* sapContent_LabelColor */
  --c-text-disabled: rgba(19, 30, 41, 0.6);
  --c-text-inverse: #ffffff;
  --c-icon: #131e29;
  --c-icon-muted: #758ca4;       /* sapContent_NonInteractiveIconColor */
  --c-required: #ba066c;         /* sapField_RequiredColor */

  /* Surfaces. Page background is white (client brief); grouping uses
     --c-bg-subtle and hairline borders rather than grey canvases. */
  --c-bg: #ffffff;
  --c-bg-subtle: #f5f6f7;        /* sapBackgroundColor */
  --c-bg-muted: #eff1f2;         /* sapShell_Background / sapNeutralBackground */
  --c-surface: #ffffff;
  --c-hover: #eaecee;            /* sapList_Hover_Background */
  --c-active: #dee2e5;           /* sapActiveColor */
  --c-readonly-bg: #eaecee;      /* sapField_ReadOnly_Background */
  --c-placeholder-bg: #eaecee;

  /* Borders */
  --c-border: #e5e5e5;           /* sapList_BorderColor */
  --c-border-strong: #d9d9d9;    /* sapShell_BorderColor, sapToolbar_SeparatorColor */
  --c-border-group: #a8b2bd;     /* sapGroup_TitleBorderColor */
  --c-border-field: #556b81;     /* sapField_BorderColor */
  --c-border-button: #bcc3ca;    /* sapButton_BorderColor */
  --c-border-content: #758ca4;   /* sapContent_ForegroundBorderColor */

  /* Semantic: text, element (icons, bars), background, border */
  --c-positive: #256f3a;
  --c-positive-el: #30914c;
  --c-positive-bg: #f5fae5;
  --c-positive-border: #30914c;
  --c-critical: #b44f00;         /* sapCriticalTextColor (readable on white) */
  --c-critical-el: #e76500;
  --c-critical-bg: #fff8d6;
  --c-critical-border: #dd6100;
  --c-negative: #aa0808;
  --c-negative-el: #f53232;
  --c-negative-bg: #ffeaf4;
  --c-negative-border: #e90b0b;
  --c-info: #0064d9;             /* sapInformativeTextColor */
  --c-info-el: #0070f2;
  --c-info-bg: #e1f4ff;
  --c-info-border: #0070f2;
  --c-neutral: #556b82;
  --c-neutral-el: #788fa6;
  --c-neutral-bg: #eff1f2;
  --c-neutral-border: #788fa6;

  /* Buttons */
  --c-btn-emph-bg: #0070f2;
  --c-btn-emph-hover: #0064d9;
  --c-btn-bg: #ffffff;
  --c-btn-hover: #eaecee;
  --c-btn-text: #0064d9;
  --c-btn-accept-bg: #ebf5cb;
  --c-btn-accept-text: #256f3a;
  --c-btn-reject-bg: #ffd6e9;
  --c-btn-reject-text: #aa0808;
  --c-btn-attention-bg: #fff3b7;

  /* Indication colours (Fiori object status / tags), 1..10 */
  --c-ind-1: #840606;
  --c-ind-2: #aa0808;
  --c-ind-3: #b95100;
  --c-ind-4: #256f3a;
  --c-ind-5: #0070f2;
  --c-ind-6: #046c7a;
  --c-ind-7: #5d36ff;
  --c-ind-8: #a100c2;
  --c-ind-9: #1d2d3e;
  --c-ind-10: #45484a;

  /* Accent colours (avatars, categories), text on background */
  --c-accent-1: #a45d00;  --c-accent-1-bg: #fff3b8;
  --c-accent-2: #aa0808;  --c-accent-2-bg: #ffd0e7;
  --c-accent-3: #ba066c;  --c-accent-3-bg: #ffdbe7;
  --c-accent-4: #a100c2;  --c-accent-4-bg: #ffdcf3;
  --c-accent-5: #552cff;  --c-accent-5-bg: #ded3ff;
  --c-accent-6: #0057d2;  --c-accent-6-bg: #d1efff;
  --c-accent-7: #046c7a;  --c-accent-7-bg: #c2fcee;
  --c-accent-8: #256f3a;  --c-accent-8-bg: #ebf5cb;
  --c-accent-9: #6c32a9;  --c-accent-9-bg: #ddccf0;
  --c-accent-10: #556b82; --c-accent-10-bg: #eaecee;

  /* Chart palette (sapChart_OrderedColor_1..12), use in this order */
  --c-chart-1: #168eff;
  --c-chart-2: #c87b00;
  --c-chart-3: #75980b;
  --c-chart-4: #df1278;
  --c-chart-5: #8b47d7;
  --c-chart-6: #049f9a;
  --c-chart-7: #0070f2;
  --c-chart-8: #cc00dc;
  --c-chart-9: #798c77;
  --c-chart-10: #da6c6c;
  --c-chart-11: #5d36ff;
  --c-chart-12: #a68a5b;
  --c-chart-grid: #e5e5e5;
  --c-chart-axis: #758ca4;

  /* Typography (72 is the Fiori typeface) */
  --font-sans: '72', 'IBM Plex Sans Arabic', Arial, Helvetica, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', '72', Tahoma, sans-serif;
  --font-mono: '72Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-2xs: 0.6875rem;  /* 11px, micro labels only */
  --fs-xs: 0.75rem;     /* 12px, sapFontSmallSize */
  --fs-sm: 0.875rem;    /* 14px, sapFontSize: the base size */
  --fs-md: 1rem;        /* 16px, sapFontLargeSize, H5 */
  --fs-lg: 1.25rem;     /* 20px, H4 */
  --fs-xl: 1.5rem;      /* 24px, H3, object page title */
  --fs-2xl: 2rem;       /* 32px, H2 */
  --fs-3xl: 3rem;       /* 48px, H1, KPI numerals */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-base: 1.5;
  --lh-relaxed: 1.65;
  --tracking-label: 0.02em;
  --tracking-caps: 0.06em;

  /* Spacing scale (rem, Fiori uses 0.25rem steps) */
  --sp-0: 0;
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radii (Horizon) */
  --r-field: 0.25rem;
  --r-button: 0.5rem;
  --r-popover: 0.5rem;
  --r-element: 0.75rem;
  --r-card: 0.75rem;
  --r-tile: 1rem;
  --r-pill: 999px;

  /* Shadows (Horizon sapContent_Shadow0..3) */
  --sh-0: 0 0 0.125rem 0 rgba(34, 53, 72, 0.2), 0 0.125rem 0.25rem 0 rgba(34, 53, 72, 0.2);
  --sh-1: 0 0 0 0.0625rem rgba(34, 53, 72, 0.48), 0 0.125rem 0.5rem 0 rgba(34, 53, 72, 0.3);
  --sh-2: 0 0 0 0.0625rem rgba(34, 53, 72, 0.48), 0 0.625rem 1.875rem 0 rgba(34, 53, 72, 0.25);
  --sh-3: 0 0 0 0.0625rem rgba(34, 53, 72, 0.48), 0 1.25rem 5rem 0 rgba(34, 53, 72, 0.25);
  --sh-card: 0 0 0.125rem 0 rgba(34, 53, 72, 0.12), 0 0.125rem 0.5rem 0 rgba(34, 53, 72, 0.08);
  --sh-header: 0 0.125rem 0.25rem 0 rgba(34, 53, 72, 0.1);

  /* Layout */
  --shell-h: 3.25rem;
  --sidenav-w-default: 15.5rem;
  --sidenav-w-collapsed: 3.5rem;
  --content-max: 96rem;
  --reading-max: 46rem;
  --control-h: 2.25rem;      /* cozy (touch) control height */
  --control-h-sm: 1.625rem;  /* compact */
  --row-h: 2.75rem;          /* cozy table row */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-end: max(16px, env(safe-area-inset-right, 0px));

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 0.12s;
  --dur: 0.2s;
  --dur-slow: 0.32s;

  /* Layers */
  --z-sticky: 50;
  --z-shell: 100;
  --z-drawer: 200;
  --z-dialog: 300;
  --z-popover: 350;
  --z-toast: 400;
}
:root {
  --page-gutter: 1rem;
}

/* Responsive page gutters (Fiori paddings) */
:root { --page-gutter: 1rem; }
@media (min-width: 600px) { :root { --page-gutter: 2rem; } }
@media (min-width: 1440px) { :root { --page-gutter: 2.5rem; } }

/* Kanz additions: brand marks from the logo, used sparingly (shell, cards). */
:root {
  --kz-blue: #0568b3;
  --kz-red: #e30d2d;
  --kz-navy: #1d2d3e;          /* Horizon shell dark, demo banner */
  --c-row-alert: #fff0f0;       /* below-least-price row (FactsERP showed these red) */
  --sidenav-w: 16rem;
  --objhead-bg: #ffffff;
}

/* Tone variables: components set data-tone and read --tone-* */
[data-tone='positive'] { --tone-text: var(--c-positive); --tone-el: var(--c-positive-el); --tone-bg: var(--c-positive-bg); --tone-border: var(--c-positive-border); }
[data-tone='critical'] { --tone-text: var(--c-critical); --tone-el: var(--c-critical-el); --tone-bg: var(--c-critical-bg); --tone-border: var(--c-critical-border); }
[data-tone='negative'] { --tone-text: var(--c-negative); --tone-el: var(--c-negative-el); --tone-bg: var(--c-negative-bg); --tone-border: var(--c-negative-border); }
[data-tone='info'] { --tone-text: var(--c-info); --tone-el: var(--c-info-el); --tone-bg: var(--c-info-bg); --tone-border: var(--c-info-border); }
[data-tone='neutral'] { --tone-text: var(--c-neutral); --tone-el: var(--c-neutral-el); --tone-bg: var(--c-neutral-bg); --tone-border: var(--c-neutral-border); }
[data-tone='brand'] { --tone-text: var(--c-selected); --tone-el: var(--c-brand); --tone-bg: var(--c-selected-bg); --tone-border: var(--c-brand); }
[data-accent='1'] { --accent-text: var(--c-accent-1); --accent-bg: var(--c-accent-1-bg); }
[data-accent='2'] { --accent-text: var(--c-accent-2); --accent-bg: var(--c-accent-2-bg); }
[data-accent='3'] { --accent-text: var(--c-accent-3); --accent-bg: var(--c-accent-3-bg); }
[data-accent='4'] { --accent-text: var(--c-accent-4); --accent-bg: var(--c-accent-4-bg); }
[data-accent='5'] { --accent-text: var(--c-accent-5); --accent-bg: var(--c-accent-5-bg); }
[data-accent='6'] { --accent-text: var(--c-accent-6); --accent-bg: var(--c-accent-6-bg); }
[data-accent='7'] { --accent-text: var(--c-accent-7); --accent-bg: var(--c-accent-7-bg); }
[data-accent='8'] { --accent-text: var(--c-accent-8); --accent-bg: var(--c-accent-8-bg); }
[data-accent='9'] { --accent-text: var(--c-accent-9); --accent-bg: var(--c-accent-9-bg); }
[data-accent='10'] { --accent-text: var(--c-accent-10); --accent-bg: var(--c-accent-10-bg); }
