/* =====================================================================
   Vatroival portal - CSS tokens and helper classes (design v0.1)
   Source of values: Docs/Project/Design/tokens/design-tokens.json
   (DesignTokenTests compares the status colors below with the JSON).
   Loaded AFTER MudBlazor.min.css. Colors of MudBlazor components come from
   Theme/VatroivalTheme.cs; this file holds what MudTheme has no slot for.
   ===================================================================== */

/* Fonts - self-hosted (SIL OFL, wwwroot/fonts/LICENSE-fonts.txt), no CDN.
   One face per subset; unicode-range values from @fontsource 5.3.0, so the
   browser downloads only the subsets a page actually uses. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-500-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-600-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext-700-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-ext-400-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-ext-500-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
:root {
  --vi-accent: #D12A3B;
  --vi-accent-on-dark: #FF6B76;
  --vi-ink: #1D2024;
  --vi-ink-2: #4A4E54;
  --vi-ink-3: #6B6F75;
  --vi-sidebar: #191C20;
  --vi-sidebar-active: #2A2E34;
  --vi-sidebar-text: #C9CCD1;
  --vi-sidebar-muted: #8D9198;
  --vi-bg: #F4F3F0;
  --vi-surface: #FFFFFF;
  --vi-surface-subtle: #F7F6F3;
  --vi-line: #E3E1DC;
  --vi-line-input: #D9D6D0;
  --vi-line-row: #F0EEEA;

  --vi-info: #23508F;
  --vi-success: #1E6B43;
  --vi-warning: #8A4300;
  --vi-error: #A3182A;

  --vi-late-bg: #FDE8EA;   --vi-late-fg: #A3182A;
  --vi-due-bg: #FFF1E0;    --vi-due-fg: #8A4300;
  --vi-ok-bg: #E6F4EC;     --vi-ok-fg: #1E6B43;
  --vi-plan-bg: #E8EEF8;   --vi-plan-fg: #23508F;
  --vi-neutral-bg: #EEEDEA; --vi-neutral-fg: #4A4E54;

  --vi-font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --vi-font-mono: "IBM Plex Mono", Consolas, monospace;

  --vi-radius-control: 8px;
  --vi-radius-card: 10px;
}

/* ---------- Typography ---------- */
.vi-mono   { font-family: var(--vi-font-mono); font-size: 0.93em; }   /* PIB, MB, codes, dates, document numbers */
.vi-mono .mud-input-helper-text, .vi-mono .mud-input-label { font-family: var(--vi-font-sans); }   /* mono applies to the value, not to label and messages */
.vi-num    { font-variant-numeric: tabular-nums; }
.vi-overline { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--vi-ink-3); }
.vi-caption  { font-size: 12.5px; color: var(--vi-ink-3); }
.vi-kpi      { font-size: 34px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* ---------- Status chip (StatusChip component) ---------- */
.vi-status { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.vi-status--late    { background: var(--vi-late-bg);    color: var(--vi-late-fg); }
.vi-status--due     { background: var(--vi-due-bg);     color: var(--vi-due-fg); }
.vi-status--ok      { background: var(--vi-ok-bg);      color: var(--vi-ok-fg); }
.vi-status--plan    { background: var(--vi-plan-bg);    color: var(--vi-plan-fg); }
.vi-status--neutral { background: var(--vi-neutral-bg); color: var(--vi-neutral-fg); }
.vi-status--dark    { background: var(--vi-ink);        color: #FFFFFF; }

/* ---------- Card / section ---------- */
.vi-card { background: var(--vi-surface); border: 1px solid var(--vi-line); border-radius: var(--vi-radius-card); }
.vi-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #ECEAE5; }
.vi-card__title { margin: 0; font-size: 16px; font-weight: 600; }

/* KPI tile: colored dot before the label (never a colored left border) */
.vi-kpi-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* Group header in lists (district > city) */
.vi-group-head { padding: 9px 20px; background: var(--vi-surface-subtle); border-block: 1px solid #ECEAE5; font-size: 13px; font-weight: 600; }
.vi-group-head__muted { color: var(--vi-ink-3); font-weight: 500; }

/* ---------- Calendar blocks ---------- */
.vi-cal { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; }
.vi-cal--scheduled { background: #DCE6F5; border: 1px solid #8FA9D3; color: #183E73; }
.vi-cal--confirmed { background: #DDF0E5; border: 1px solid #7DBB97; color: #164F31; }
.vi-cal--done      { background: #EEEDEA; border: 1px solid #D6D3CC; color: #4A4E54; }
.vi-cal--conflict  { background: #FFFFFF; border: 2px solid #B3182C; color: #7E1120; }
.vi-cal-today      { background: #FDF9F9; }

/* ---------- Notes ---------- */
.vi-note { display: flex; gap: 10px; padding: 12px 16px; border-radius: 8px; font-size: 13px; }
.vi-note--warn { background: var(--vi-due-bg);  color: #6B3400; }
.vi-note--info { background: var(--vi-plan-bg); color: #183E73; }

/* ---------- Assignment candidate (PLN-04) ---------- */
.vi-candidate { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--vi-line-input); border-radius: 9px; background: #fff; }
.vi-candidate--selected { border: 2px solid var(--vi-ink); background: var(--vi-surface-subtle); }
.vi-candidate--blocked  { border: 1px dashed var(--vi-line-input); background: #FAFAF8; color: var(--vi-ink-3); }

/* ---------- Application shell (DIZAJN_SPEC section 4) ---------- */
.vi-appbar { border-bottom: 1px solid var(--vi-line); }
.vi-appbar__search { flex: 1; max-width: 650px; }
.vi-appbar .mud-icon-button.mud-button-outlined { border-color: var(--vi-line-input); }
.vi-content { padding: 28px 32px; max-width: 1400px; }
.vi-page-head { margin-bottom: 24px; }

.vi-brand { display: flex; align-items: center; gap: 12px; padding: 22px 24px 18px; }
.vi-brand__mark { width: 32px; height: 32px; flex: none; }
.vi-brand__name { color: #FFFFFF; font-size: 15px; font-weight: 700; letter-spacing: .12em; line-height: 1.2; }
.vi-brand__tagline { color: var(--vi-sidebar-muted); font-size: 12px; }

.vi-nav { padding: 0 14px 16px; }
.vi-nav__group { padding: 22px 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--vi-sidebar-muted); }
.vi-nav .mud-nav-link { border-radius: var(--vi-radius-control); padding: 10px 12px; color: var(--vi-sidebar-text); font-size: 14px; }
.vi-nav .mud-nav-link .mud-nav-link-icon { color: var(--vi-sidebar-muted); font-size: 18px; }
/* Same specificity as MudBlazor (.mud-navmenu.mud-navmenu-default ... :not(.mud-nav-link-disabled)) plus .vi-nav, so these win. */
.mud-navmenu.mud-navmenu-default.vi-nav .mud-nav-link:hover:not(.mud-nav-link-disabled) { background: var(--vi-sidebar-active); color: #FFFFFF; }
.mud-navmenu.mud-navmenu-default.vi-nav .mud-nav-link.active:not(.mud-nav-link-disabled) { background: var(--vi-sidebar-active); color: #FFFFFF; font-weight: 600; }
.vi-nav .mud-nav-link.active .mud-nav-link-icon { color: var(--vi-accent-on-dark); }

@media (max-width: 599px) {
  .vi-content { padding: 20px 16px; }
}

/* ---------- Design system page /dev/ui (Development only) ---------- */
.vi-swatch { overflow: hidden; border: 1px solid var(--vi-line); border-radius: var(--vi-radius-card); background: var(--vi-surface); }
.vi-swatch__color { height: 64px; border-bottom: 1px solid var(--vi-line); }
.vi-swatch__body { padding: 10px 12px; overflow-wrap: anywhere; }
.vi-swatch__color--accent  { background: var(--vi-accent); }
.vi-swatch__color--ink     { background: var(--vi-ink); }
.vi-swatch__color--sidebar { background: var(--vi-sidebar); }
.vi-swatch__color--ink-2   { background: var(--vi-ink-2); }
.vi-swatch__color--bg      { background: var(--vi-bg); }
.vi-swatch__color--surface { background: var(--vi-surface); }
.vi-swatch__color--line    { background: var(--vi-line); }
.vi-swatch__color--info    { background: var(--vi-info); }
.vi-swatch__color--success { background: var(--vi-success); }
.vi-swatch__color--warning { background: var(--vi-warning); }
.vi-swatch__color--error   { background: var(--vi-error); }
.vi-swatch__color--ink-3   { background: var(--vi-ink-3); }
.vi-status-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }

/* ---------- Sign-in page (DIZAJN_SPEC 5.5, static SSR without MudBlazor components) ---------- */
.vi-auth { display: flex; flex-wrap: wrap; min-height: 100vh; background: var(--vi-bg); color: var(--vi-ink); font-family: var(--vi-font-sans); font-size: 14px; line-height: 1.45; }
/* MudBlazor.min.css styles h1-h6 from its theme variables (Roboto); this page has no MudThemeProvider. */
.vi-auth h1, .vi-auth h2 { font-family: var(--vi-font-sans); text-transform: none; }
.vi-auth__hero { flex: 1 1 480px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 420px; padding: 56px 64px; background: var(--vi-sidebar); color: var(--vi-sidebar-text); }
.vi-auth__watermark { position: absolute; right: -160px; bottom: -120px; width: 760px; height: 660px; opacity: .06; filter: grayscale(1) brightness(10); pointer-events: none; }
.vi-auth__brand { position: relative; display: flex; align-items: center; gap: 14px; color: #FFFFFF; font-size: 22px; font-weight: 700; letter-spacing: .14em; }
.vi-auth__brand img { width: 52px; height: 46px; }
.vi-auth__claim { position: relative; display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.vi-auth__claim h1 { margin: 0; color: #FFFFFF; font-size: 40px; font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }
.vi-auth__claim p { margin: 0; font-size: 16px; }
.vi-auth__footer { position: relative; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--vi-sidebar-muted); font-size: 12.5px; }
.vi-auth__main { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.vi-auth__panel { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 380px; }
.vi-auth__heading { display: flex; flex-direction: column; gap: 6px; }
.vi-auth__heading h2 { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.25; letter-spacing: normal; }
.vi-auth__heading span { color: var(--vi-ink-2); }
.vi-auth__form { display: flex; flex-direction: column; gap: 16px; }
.vi-auth__hint { padding-top: 18px; border-top: 1px solid var(--vi-line); color: var(--vi-ink-2); font-size: 13px; }
.vi-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; }
.vi-input { height: 46px; padding: 0 14px; border: 1px solid var(--vi-line-input); border-radius: var(--vi-radius-control); background: var(--vi-surface); color: var(--vi-ink); font: inherit; font-size: 15px; font-weight: 400; }
.vi-input:focus { outline: 2px solid var(--vi-ink); outline-offset: -1px; }
.vi-button-primary { height: 48px; margin-top: 8px; border: 0; border-radius: var(--vi-radius-control); background: var(--vi-accent); color: #FFFFFF; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.vi-button-primary:focus-visible { outline: 2px solid var(--vi-ink); outline-offset: 2px; }
.vi-note--error { background: var(--vi-late-bg); color: var(--vi-late-fg); }
.vi-auth a { color: var(--vi-info); font-size: 13.5px; }
.vi-auth__link { align-self: flex-start; }
.vi-auth__back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; color: var(--vi-ink-2); text-decoration: none; }
.vi-auth a.vi-auth__back { color: var(--vi-ink-2); font-size: 14px; }
.vi-auth__back::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
/* One code field instead of the six boxes of snapshot 05: paste and one-time-code autofill work without script. */
.vi-input--code { height: 54px; padding: 0 0 0 14px; font-family: var(--vi-font-mono); font-size: 22px; letter-spacing: .9em; }
.vi-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.vi-check input { width: 18px; height: 18px; accent-color: var(--vi-ink); }
.vi-steps { display: flex; flex-direction: column; gap: 14px; margin: 0; padding-left: 20px; }
.vi-steps li { display: flex; flex-direction: column; gap: 8px; }
.vi-qr { width: 184px; height: 184px; border: 1px solid var(--vi-line); border-radius: var(--vi-radius-control); }
.vi-qr__light { fill: #FFFFFF; }
.vi-qr__dark { fill: #000000; }
.vi-key { font-size: 15px; letter-spacing: .05em; overflow-wrap: anywhere; }
.vi-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 16px 16px 16px 36px; border: 1px solid var(--vi-line); border-radius: var(--vi-radius-control); background: var(--vi-surface); font-size: 15px; }
.vi-auth a.vi-button-primary--link { display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 15px; text-decoration: none; }

@media (max-width: 599px) {
  /* MudBlazor.min.css styles h1-h6 from its theme variables (Roboto); this page has no MudThemeProvider. */
.vi-auth h1, .vi-auth h2 { font-family: var(--vi-font-sans); text-transform: none; }
.vi-auth__hero { min-height: 0; padding: 32px 24px; gap: 28px; }
  .vi-auth__claim h1 { font-size: 30px; }
  .vi-auth__main { padding: 32px 16px; }
}

/* ---------- Administration (F1-ADM-003) ---------- */
.vi-matrix td, .vi-matrix th { vertical-align: middle; }
.vi-matrix td:first-child { min-width: 220px; }
.vi-matrix .mud-select { min-width: 150px; }
.vi-dialog { min-width: min(420px, 80vw); }
.vi-filter { min-width: 200px; max-width: 260px; }
.vi-changes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.vi-changes__field { color: var(--vi-ink-3); margin-right: 6px; }

/* ---------- Accessibility ---------- */
.vi-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
