/* авСКЛАД+ design tokens. Style А „Изчистен топъл“ (light, default) and
   В „Тъмна каса“ (dark, opt-in per workplace in „Настрой екрана“).
   Every colour in the interface comes from here. Text/background pairs are
   checked for WCAG AA in backend/design-foundation.test.js; keep them in sync.
   Presentation only: no data, permission or licence behaviour lives here. */

/* Onest, self-hosted: one variable face (400–700) per subset, the same
   unicode ranges as Google Fonts. Bulgarian needs only "cyrillic"; the
   browser downloads a subset only when a character in its range is shown.
   font-display: swap, so text never waits for a font file.
   Files sit flat in frontend/ (the Windows shell takes only flat files).
   The licence below is also frontend/onest-OFL.txt. It is repeated here as a
   human-readable header (OFL 1.1 §2) because the Windows shell package
   carries only web file types, never .txt, so this copy travels with the
   fonts on every channel: web, offline cache and Windows.

Copyright 2023 The Onest Project Authors

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) and the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
*/
@font-face{font-family:"Onest";font-style:normal;font-weight:400 700;font-display:swap;src:url("onest-cyrillic.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Onest";font-style:normal;font-weight:400 700;font-display:swap;src:url("onest-latin-ext.woff2") format("woff2");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-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Onest";font-style:normal;font-weight:400 700;font-display:swap;src:url("onest-latin.woff2") format("woff2");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}

:root{
  color-scheme:light;
  --font:"Onest","Segoe UI Variable","Segoe UI",system-ui,sans-serif;

  /* Type scale: five sizes only. */
  --fs-page:26px;      /* page title */
  --fs-section:18px;   /* section / card title */
  --fs-body:15px;      /* body text, table cells, inputs */
  --fs-secondary:13px; /* helper text, captions (never smaller) */
  --fs-label:13px;     /* labels, table headers, chips (weight 600) */
  /* Figures: money and counts only, never text. */
  --fs-figure:28px;    /* KPI and card amounts */
  --fs-figure-lg:36px; /* the one strong amount on a screen */

  /* Spacing (4 px grid). */
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;

  /* Radii. */
  --radius-xs:6px;--radius-sm:8px;--radius-md:10px;--radius-lg:14px;--radius-xl:18px;--radius-pill:999px;
  --radius:var(--radius-lg);

  /* Surfaces. */
  --bg:#F6F2EC;
  --surface:#FFFFFF;
  --surface-2:#FBF8F4;
  --surface-3:#F1ECE4;
  --border:#E3DCD2;
  --border-soft:#ECE5DB;
  --border-strong:#CFC6B8;
  --overlay:rgba(31,27,22,.45);

  /* Text. */
  --text:#1F1B16;
  --text-2:#4A443C;
  --text-muted:#6B645B;
  --text-disabled:#A39B90;
  --text-on-accent:#FFFFFF;
  --placeholder:#7A7268;

  /* Brand. Orange is for the brand and the main action only. */
  --accent:#E2711D;
  --accent-rgb:226 113 29;
  --accent-text:#A34A0E;
  --accent-soft:#FCEEE2;
  --accent-border:#F2C9A6;
  --btn-primary:#C0540E;
  --btn-primary-hover:#A84A0C;
  --btn-primary-press:#8F3F0A;
  --btn-primary-text:#FFFFFF;

  /* Semantic: green = in order, amber = attention, red = problem, blue = information. */
  --ok:#2E6B45;--ok-soft:#E7F2EA;--ok-border:#BFDCC9;--ok-solid:#2E8B57;
  --warn:#8A5300;--warn-soft:#FDF1DC;--warn-border:#EFD3A1;--warn-solid:#C98A12;
  --danger:#B23B2E;--danger-soft:#FBEAE7;--danger-border:#F0C4BD;--danger-solid:#C8463A;
  --info:#2A5D9A;--info-soft:#E8F0FA;--info-border:#C3D6EE;--info-solid:#3B73B9;

  /* Navigation and the one strong block per screen. */
  --nav-bg:#1C1F2A;
  --nav-text:#C9CCD6;
  --nav-muted:#9DA2B1;
  --nav-hover:rgba(255,255,255,.06);
  --nav-active-bg:#2B2F3D;
  --nav-active-text:#FFFFFF;
  --nav-line:#2B2F3D;
  --inverse-bg:#1C1F2A;
  --inverse-text:#FFFFFF;
  --inverse-muted:#A7ABB8;

  /* Elevation and focus. */
  --shadow-sm:0 1px 2px rgba(31,27,22,.05);
  --shadow:0 4px 14px rgba(31,27,22,.07);
  --shadow-lg:0 16px 40px rgba(31,27,22,.18);
  --focus-color:#E2711D;
  --focus-ring:0 0 0 3px rgba(226,113,29,.32);

  /* Legacy names used by the existing stylesheets, mapped onto the tokens. */
  --ink:var(--text);--ink-soft:var(--text-2);
  --paper:var(--bg);--paper-dim:var(--surface-3);--paper-line:var(--border);--paper-line-soft:var(--border-soft);
  --amber:var(--accent);--amber-deep:var(--accent-text);--amber-bg:var(--accent-soft);
  --green:var(--ok);--green-bg:var(--ok-soft);--red:var(--danger);--red-bg:var(--danger-soft);
  --text-dim:var(--text-muted);--text-mid:var(--text-2);
}

:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#111316;
  --surface:#1B1E23;
  --surface-2:#20242A;
  --surface-3:#262A30;
  --border:#2F343C;
  --border-soft:#262A30;
  --border-strong:#454B55;
  --overlay:rgba(0,0,0,.6);

  --text:#F2F1EE;
  --text-2:#C9CDD4;
  --text-muted:#9BA1AB;
  --text-disabled:#6B717C;
  --text-on-accent:#111316;
  --placeholder:#8A909B;

  --accent:#F28C38;
  --accent-rgb:242 140 56;
  --accent-text:#F5A15A;
  --accent-soft:#3A2617;
  --accent-border:#6B4220;
  --btn-primary:#F28C38;
  --btn-primary-hover:#F59F55;
  --btn-primary-press:#E07B28;
  --btn-primary-text:#111316;

  --ok:#8FD3A8;--ok-soft:#16261D;--ok-border:#24432F;--ok-solid:#3DDC84;
  --warn:#F2C46B;--warn-soft:#2D2412;--warn-border:#4D3D1C;--warn-solid:#E0A93A;
  --danger:#FF8A7A;--danger-soft:#351B19;--danger-border:#5A2A25;--danger-solid:#F0675A;
  --info:#8DB8F0;--info-soft:#16233A;--info-border:#27406A;--info-solid:#5B95E0;

  --nav-bg:#0B0C0E;
  --nav-text:#C9CDD4;
  --nav-muted:#9DA2B1;
  --nav-hover:rgba(255,255,255,.05);
  --nav-active-bg:#1F2329;
  --nav-active-text:#FFFFFF;
  --nav-line:#1F2227;
  --inverse-bg:#23272E;
  --inverse-text:#F2F1EE;
  --inverse-muted:#A7ABB8;

  --shadow-sm:0 1px 2px rgba(0,0,0,.3);
  --shadow:0 4px 14px rgba(0,0,0,.35);
  --shadow-lg:0 16px 40px rgba(0,0,0,.55);
  --focus-color:#F28C38;
  --focus-ring:0 0 0 3px rgba(242,140,56,.4);
}

/* Prints and PDFs always use the light palette. */
@media print{
  :root,:root[data-theme="dark"]{
    color-scheme:light;
    --bg:#FFFFFF;--surface:#FFFFFF;--surface-2:#FBF8F4;--surface-3:#F1ECE4;--border:#E3DCD2;--border-soft:#ECE5DB;--border-strong:#CFC6B8;
    --text:#1F1B16;--text-2:#4A443C;--text-muted:#6B645B;--text-on-accent:#FFFFFF;
    --accent:#E2711D;--accent-text:#A34A0E;--accent-soft:#FCEEE2;--accent-border:#F2C9A6;
    --btn-primary:#C0540E;--btn-primary-text:#FFFFFF;
    --ok:#2E6B45;--ok-soft:#E7F2EA;--ok-border:#BFDCC9;--ok-solid:#2E8B57;
    --warn:#8A5300;--warn-soft:#FDF1DC;--warn-border:#EFD3A1;--warn-solid:#C98A12;
    --danger:#B23B2E;--danger-soft:#FBEAE7;--danger-border:#F0C4BD;--danger-solid:#C8463A;
    --info:#2A5D9A;--info-soft:#E8F0FA;--info-border:#C3D6EE;--info-solid:#3B73B9;
    --inverse-bg:#1C1F2A;--inverse-text:#FFFFFF;--inverse-muted:#A7ABB8;
  }
}

/* Numbers use the body font with equal-width (tabular) digits. */
.num,.cell-num,.mono,td.text-right,th.text-right{font-variant-numeric:tabular-nums}
