/*
 * Zajednicki izgled R3 (v1): docs/dizajn/stari-vortex/tokens.css i app.css, s dodacima koje je imao ERP
 * (vortex-r3-erp public/erp/css/app.css, develop f0b80d8: 238 redaka i 3 promijenjena retka). Od 18. 11. 2026.
 * ovo je jedini izgled: ERP i Manager ga ucitavaju iz Corea i vise nemaju svoje kopije (Sara, kartica u niti
 * Planovi razvoja "Nas agent, odmah, preko reda"). Doslovno preuzimanje je iznimka od tocke 5 pravila rada koju
 * je odobrila Sara (kartica 11. 11. 2026. u 09:18: "Da, CSS smije (iznimka)").
 */
/*
 * Font Satoshi (Sara, kartica 11. 11. 2026. u 10:20: "Planovi ga stave u Core"). Datoteke u fonts/ su nepromijenjene,
 * licenca je fonts/FFL.txt (ITF FFL). Font se ne nudi kao izbor fontova klijentima. Ovaj blok ostaje i kad se ostatak
 * datoteke ponovno spoji iz docs/dizajn.
 */
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*
 * EcoMobile dizajn tokeni, preuzeto iz Figme (03-PRL-Dis-DS-and-PRP, stranica "Componets").
 * Nazivi prate Figma varijable. Ne dodavati boje ni fontove izvan ovog popisa.
 * `[data-theme-sample="<tema>"]` daje boje teme jednom elementu (uzorak teme u Moje postavke >
 * Postavke izgleda), bez obzira na temu ekrana.
 */
:root,
[data-theme-sample="light"] {
  /* Greyscale */
  --grey-50: #f9fafb;
  --grey-100: #f3f4f6;
  --grey-200: #e5e7eb;
  --grey-300: #d1d5db;
  --grey-400: #9ca3af;
  --grey-500: #6b7280;
  --grey-600: #4b5563;
  --grey-700: #374151;
  --grey-800: #1f2937;
  --grey-900: #111827;
  --grey-950: #030712;

  --white: #ffffff;
  --white-20: #ffffff33;
  --black: #000000;
  --black-10: #0000001a;
  --black-20: #00000033;

  /* Success / brend zelena */
  --green-50: #f7fee7;
  --green-100: #ecfccb;
  --green-500: #65ad45;
  --green-600: #4a932a;

  /* Primary (informativno plava) */
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;

  /* Warning */
  --yellow-100: #fef9c3;
  --yellow-500: #eab308;
  --yellow-600: #ca8a04;

  /* Error */
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-700: #b91c1c;

  /*
   * Semantika: komponente (app.css) koriste samo ove boje, a ne paletu izravno (osim boja akcija i
   * statusa koje su iste u obje teme). Svijetla tema = Figma; tamna ih mijenja niže.
   */
  color-scheme: light;
  --color-bg-app: var(--grey-100);
  --color-bg-surface: var(--white);
  --color-bg-subtle: var(--grey-50); /* redak pod mišem, trenutna stranica, zbroj */
  --color-bg-muted: var(--grey-100); /* zaglavlje tablice, hover gumba, onemogućeno polje */
  --color-border: var(--grey-200);
  --color-border-strong: var(--grey-300);
  --color-text: var(--grey-900);
  --color-text-secondary: var(--grey-700);
  --color-text-muted: var(--grey-500);
  --color-text-subtle: var(--grey-400); /* placeholder, prazna vrijednost */
  --color-text-disabled: var(--grey-300);
  --color-text-on-fill: var(--white); /* tekst na zelenom, crvenom i tamnom gumbu */
  --color-link: var(--green-600);
  --color-selected-bg: var(--green-50); /* aktivno polje, odabrani redak i odgovor */
  --color-fill-strong: var(--grey-800); /* Secondary Fill */
  --color-fill-strong-hover: var(--grey-950);
  --color-fill-disabled: var(--grey-400);
  --color-fill-neutral: var(--grey-500); /* sivi okrugli X u popupu */
  --color-shadow: var(--black-10);
  --color-overlay: var(--black-20);
  --color-action: var(--green-500);
  --color-action-hover: var(--green-600);
  /* Statusi (Chip, Note): pozadina, obrub je *-500, tekst */
  --color-success-bg: var(--green-100);
  --color-success-text: var(--green-600);
  --color-success-border: var(--green-500); /* obrub Chip i Note uspjeha */
  --color-warning-bg: var(--yellow-100);
  --color-warning-text: var(--yellow-600);
  --color-info-bg: var(--blue-100);
  --color-info-text: var(--blue-500);
  --color-error-bg: var(--red-100);
  --color-error-text: var(--red-500);
  --color-error-strong: var(--red-700); /* poruke grešaka u obrascu */
  /* Sidebar i top bar (tamni u obje teme) */
  --color-bg-chrome: var(--grey-800);
  --color-bg-chrome-active: var(--grey-900);
  --color-bg-chrome-control: var(--grey-700);
  --color-border-chrome: var(--grey-700);
  --color-text-chrome: var(--grey-400);
  --color-text-chrome-soft: var(--grey-300);
  --color-text-chrome-strong: var(--white);
  --color-chrome-toggle-bg: var(--white);
  --color-chrome-toggle-text: var(--grey-900);
  --color-chrome-accent: var(--color-action); /* "AI" u logotipu i krug s inicijalom na izborniku */
  --color-chrome-accent-text: var(--color-text-on-fill);

  /* Tipografija: samo Satoshi */
  --font-family: "Satoshi", system-ui, sans-serif;
  --text-h2: 500 40px/48px var(--font-family);
  --text-h3: 700 32px/40px var(--font-family);
  --text-h4: 500 24px/32px var(--font-family);
  --text-h4-bold: 700 24px/32px var(--font-family);
  --text-h6: 700 16px/24px var(--font-family);
  --text-b1: 400 18px/26px var(--font-family);
  --text-b3: 400 14px/20px var(--font-family);
  --text-b3-medium: 500 14px/20px var(--font-family);
  --text-button: 500 14px/20px var(--font-family);
  --text-c1: 400 12px/16px var(--font-family);
  --text-c1-medium: 500 12px/16px var(--font-family);
  --text-c2: 500 10px/16px var(--font-family);

  /* Razmaci i oblici */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Kontrole */
  --control-height: 40px;
  --control-height-sm: 32px;
  /* Mali okrugli gumbi s ikonom (Figma 28×28): sklapanje sidebara, X u popupu */
  --control-height-xs: 28px;

  /* Tables: one that scrolls vertically inside a popup (e.g. picking applications in the wizard) */
  --table-scroll-max-height: 420px;

  /* A column of text to read (the candidate's test page) */
  --reading-width: 720px;

  /* Small panel over content (e.g. choosing a value in the portal window) */
  --popover-width: 360px;

  /* Date picker (components/DatePicker.tsx): one day in the month grid, the time column, visible times */
  --date-picker-cell: 32px;
  --date-picker-time-width: 64px;
  --date-picker-times-visible: 6;
}

/*
 * Tamna tema (Moje postavke > Tema). `lib/theme.ts` postavlja `data-theme` na <html> ("Prema
 * sustavu" se tamo pretvara u light/dark). Figma nema tamnu varijantu: tamne vrijednosti su iste
 * boje palete obrnutim redom (pozadine grey-950/900/800, tekst grey-50/300/400), a pozadine statusa
 * su boja statusa pomiješana s pozadinom kartice (color-mix), pa ništa izvan palete nije dodano.
 * Kontrast teksta je najmanje 4.5:1 (WCAG AA). Ispis je uvijek svijetao (samo `screen`).
 */
@media screen {
  :root[data-theme="dark"],
  [data-theme-sample="dark"] {
    color-scheme: dark;
    --color-bg-app: var(--grey-950);
    --color-bg-surface: var(--grey-900);
    --color-bg-subtle: color-mix(in srgb, var(--grey-800) 50%, var(--grey-900));
    --color-bg-muted: var(--grey-800);
    --color-border: var(--grey-700);
    --color-border-strong: var(--grey-600);
    --color-text: var(--grey-50);
    --color-text-secondary: var(--grey-300);
    --color-text-muted: var(--grey-400);
    --color-text-subtle: var(--grey-500);
    --color-text-disabled: var(--grey-600);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-500);
    --color-selected-bg: color-mix(in srgb, var(--green-500) 16%, var(--grey-900));
    --color-fill-strong: var(--grey-700);
    --color-fill-strong-hover: var(--grey-600);
    --color-fill-disabled: var(--grey-700);
    --color-fill-neutral: var(--grey-600);
    --color-shadow: var(--black-20);
    --color-overlay: color-mix(in srgb, var(--black) 60%, transparent);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: color-mix(in srgb, var(--green-500) 18%, var(--grey-900));
    --color-success-text: var(--green-500);
    --color-success-border: var(--green-500);
    --color-warning-bg: color-mix(in srgb, var(--yellow-500) 16%, var(--grey-900));
    --color-warning-text: var(--yellow-500);
    --color-info-bg: color-mix(in srgb, var(--blue-500) 20%, var(--grey-900));
    --color-info-text: color-mix(in srgb, var(--blue-500) 65%, var(--white));
    --color-error-bg: color-mix(in srgb, var(--red-500) 18%, var(--grey-900));
    --color-error-text: color-mix(in srgb, var(--red-500) 75%, var(--white));
    --color-error-strong: color-mix(in srgb, var(--red-500) 75%, var(--white));
    --color-bg-chrome: var(--grey-900);
    --color-bg-chrome-active: var(--grey-800);
    --color-bg-chrome-control: var(--grey-700);
    --color-border-chrome: var(--grey-800);
    --color-text-chrome: var(--grey-400);
    --color-text-chrome-soft: var(--grey-300);
    --color-text-chrome-strong: var(--grey-50);
    --color-chrome-toggle-bg: var(--grey-700);
    --color-chrome-toggle-text: var(--grey-50);
    --color-chrome-accent: var(--color-action);
    --color-chrome-accent-text: var(--color-text-on-fill);
  }
}

/*
 * Visoki kontrast (Moje postavke > Tema): svijetla tema za slabiji vid i jako svjetlo. Iste boje
 * palete, ali tamniji tekst (grey-950/900/700), vidljivi obrubi (grey-500/700) te zelena akcija,
 * poveznica i tekst statusa potamnjeni crnom (color-mix), pa tekst ima najmanje 4.5:1, a većina 7:1
 * (WCAG AAA). Ništa izvan palete nije dodano.
 */
@media screen {
  :root[data-theme="contrast"],
  [data-theme-sample="contrast"] {
    color-scheme: light;
    --color-bg-app: var(--grey-100);
    --color-bg-surface: var(--white);
    --color-bg-subtle: var(--grey-100);
    --color-bg-muted: var(--grey-200);
    --color-border: var(--grey-500);
    --color-border-strong: var(--grey-700);
    --color-text: var(--grey-950);
    --color-text-secondary: var(--grey-900);
    --color-text-muted: var(--grey-700);
    --color-text-subtle: var(--grey-600);
    --color-text-disabled: var(--grey-500);
    --color-text-on-fill: var(--white);
    --color-link: color-mix(in srgb, var(--green-600) 65%, var(--black));
    --color-selected-bg: var(--green-100);
    --color-fill-strong: var(--grey-950);
    --color-fill-strong-hover: var(--black);
    --color-fill-disabled: var(--grey-500);
    --color-fill-neutral: var(--grey-700);
    --color-shadow: var(--black-20);
    --color-overlay: color-mix(in srgb, var(--black) 50%, transparent);
    --color-action: color-mix(in srgb, var(--green-600) 70%, var(--black));
    --color-action-hover: color-mix(in srgb, var(--green-600) 55%, var(--black));
    --color-success-bg: var(--green-100);
    --color-success-text: color-mix(in srgb, var(--green-600) 65%, var(--black));
    --color-success-border: var(--green-500);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: color-mix(in srgb, var(--yellow-600) 55%, var(--black));
    --color-info-bg: var(--blue-100);
    --color-info-text: color-mix(in srgb, var(--blue-500) 60%, var(--black));
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--grey-950);
    --color-bg-chrome-active: var(--black);
    --color-bg-chrome-control: var(--grey-800);
    --color-border-chrome: var(--grey-700);
    --color-text-chrome: var(--grey-300);
    --color-text-chrome-soft: var(--grey-200);
    --color-text-chrome-strong: var(--white);
    --color-chrome-toggle-bg: var(--white);
    --color-chrome-toggle-text: var(--grey-950);
    --color-chrome-accent: var(--color-action);
    --color-chrome-accent-text: var(--color-text-on-fill);
  }
}

/*
 * Noćna plava (Moje postavke > Tema): tamna tema u tamnoplavim tonovima. Pozadine su sive palete
 * pomiješane s plavom (`blue-500`, color-mix), tekst je isti kao u tamnoj temi, a zelena akcija i
 * statusi ostaju boje palete (svjetliji bijelom gdje treba). Kontrast teksta je najmanje 4.5:1.
 */
@media screen {
  :root[data-theme="navy"],
  [data-theme-sample="navy"] {
    color-scheme: dark;
    --color-bg-app: color-mix(in srgb, var(--blue-500) 12%, var(--grey-950));
    --color-bg-surface: color-mix(in srgb, var(--blue-500) 16%, var(--grey-900));
    --color-bg-subtle: color-mix(in srgb, var(--blue-500) 20%, var(--grey-900));
    --color-bg-muted: color-mix(in srgb, var(--blue-500) 26%, var(--grey-900));
    --color-border: color-mix(in srgb, var(--blue-500) 30%, var(--grey-800));
    --color-border-strong: color-mix(in srgb, var(--blue-500) 40%, var(--grey-700));
    --color-text: var(--grey-50);
    --color-text-secondary: var(--grey-300);
    --color-text-muted: var(--grey-400);
    --color-text-subtle: var(--grey-500);
    --color-text-disabled: var(--grey-600);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-500);
    --color-selected-bg: color-mix(in srgb, var(--green-500) 16%, var(--color-bg-surface));
    --color-fill-strong: color-mix(in srgb, var(--blue-500) 35%, var(--grey-800));
    --color-fill-strong-hover: color-mix(in srgb, var(--blue-500) 45%, var(--grey-700));
    --color-fill-disabled: color-mix(in srgb, var(--blue-500) 25%, var(--grey-700));
    --color-fill-neutral: var(--grey-600);
    --color-shadow: var(--black-20);
    --color-overlay: color-mix(in srgb, var(--black) 60%, transparent);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: color-mix(in srgb, var(--green-500) 18%, var(--color-bg-surface));
    --color-success-text: color-mix(in srgb, var(--green-500) 70%, var(--white));
    --color-success-border: var(--green-500);
    --color-warning-bg: color-mix(in srgb, var(--yellow-500) 16%, var(--color-bg-surface));
    --color-warning-text: var(--yellow-500);
    --color-info-bg: color-mix(in srgb, var(--blue-500) 20%, var(--color-bg-surface));
    --color-info-text: color-mix(in srgb, var(--blue-500) 55%, var(--white));
    --color-error-bg: color-mix(in srgb, var(--red-500) 18%, var(--color-bg-surface));
    --color-error-text: color-mix(in srgb, var(--red-500) 65%, var(--white));
    --color-error-strong: color-mix(in srgb, var(--red-500) 65%, var(--white));
    --color-bg-chrome: color-mix(in srgb, var(--blue-500) 20%, var(--grey-950));
    --color-bg-chrome-active: color-mix(in srgb, var(--blue-500) 30%, var(--grey-900));
    --color-bg-chrome-control: color-mix(in srgb, var(--blue-500) 35%, var(--grey-800));
    --color-border-chrome: color-mix(in srgb, var(--blue-500) 25%, var(--grey-900));
    --color-text-chrome: var(--grey-400);
    --color-text-chrome-soft: var(--grey-300);
    --color-text-chrome-strong: var(--grey-50);
    --color-chrome-toggle-bg: color-mix(in srgb, var(--blue-500) 35%, var(--grey-800));
    --color-chrome-toggle-text: var(--grey-50);
    --color-chrome-accent: var(--color-action);
    --color-chrome-accent-text: var(--color-text-on-fill);
  }
}

/*
 * Teme po primjerima nadzornih ploča koje je vlasnik poslao (odluka vlasnika, 18. 10. 2026.: samo boje,
 * fontovi, veličine i raspored ostaju). Svaka tema ima svoju paletu: iste nazive palete (grey-*, green-*,
 * blue-*, yellow-*, red-*) s vlastitim vrijednostima i nekoliko `--theme-*` boja (površina, izbornik,
 * uspjeh, info), a semantičke boje upućuju samo na paletu. green-500 je glavna boja teme (gumbi, obrubi
 * aktivnog polja, prva boja grafova), a blue-500 druga boja grafova. Kontrast teksta je najmanje 4.5:1,
 * a glavnog teksta na kartici najmanje 7:1 (provjerava `styles.test.ts`).
 */

/* Bež i terakota: topla bež pozadina, terakota akcija, sivoplava druga boja grafova, svijetli izbornik. */
@media screen {
  :root[data-theme="sand"],
  [data-theme-sample="sand"] {
    color-scheme: light;
    --grey-50: #f1ebe1;
    --grey-100: #e9e2d6;
    --grey-200: #ddd4c5;
    --grey-300: #c9bdab;
    --grey-400: #9c9182;
    --grey-500: #6d6458;
    --grey-600: #544c42;
    --grey-700: #3d3730;
    --grey-800: #2b2723;
    --grey-900: #1d1a17;
    --grey-950: #100e0c;
    --theme-surface: #f7f3ec;
    --green-50: #f5e9e2;
    --green-100: #ecd6cb;
    --green-500: #a5563f;
    --green-600: #8a4532;
    --blue-100: #e4e5ee;
    --blue-500: #666b8c;
    --yellow-100: #f3e7cc;
    --yellow-500: #c48f2c;
    --yellow-600: #7f5a14;
    --red-100: #f3dcd6;
    --red-500: #b6463a;
    --red-700: #8f3227;
    --theme-success: #40664a;
    --theme-success-bg: #e0e9dc;
    --theme-success-border: #6b9675;
    --theme-chrome: #e3dccf;
    --theme-chrome-active: #d5cbba;
    --theme-chrome-control: #cdc2b0;
    --theme-chrome-border: #d2c8b7;
    --theme-info: #4f5372;
    --color-bg-app: var(--grey-100);
    --color-bg-surface: var(--theme-surface);
    --color-bg-subtle: var(--grey-50);
    --color-bg-muted: var(--grey-100);
    --color-border: var(--grey-200);
    --color-border-strong: var(--grey-300);
    --color-text: var(--grey-900);
    --color-text-secondary: var(--grey-700);
    --color-text-muted: var(--grey-500);
    --color-text-subtle: var(--grey-400);
    --color-text-disabled: var(--grey-300);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-600);
    --color-selected-bg: var(--green-50);
    --color-fill-strong: var(--grey-800);
    --color-fill-strong-hover: var(--grey-950);
    --color-fill-disabled: var(--grey-400);
    --color-fill-neutral: var(--grey-500);
    --color-shadow: var(--black-10);
    --color-overlay: var(--black-20);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: var(--theme-success-bg);
    --color-success-text: var(--theme-success);
    --color-success-border: var(--theme-success-border);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: var(--yellow-600);
    --color-info-bg: var(--blue-100);
    --color-info-text: var(--theme-info);
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--theme-chrome);
    --color-bg-chrome-active: var(--theme-chrome-active);
    --color-bg-chrome-control: var(--theme-chrome-control);
    --color-border-chrome: var(--theme-chrome-border);
    --color-text-chrome: var(--grey-600);
    --color-text-chrome-soft: var(--grey-700);
    --color-text-chrome-strong: var(--grey-900);
    --color-chrome-toggle-bg: var(--grey-900);
    --color-chrome-toggle-text: var(--theme-surface);
    --color-chrome-accent: var(--color-action);
    --color-chrome-accent-text: var(--color-text-on-fill);
  }
}

/* Krem i narančasta: krem pozadina i izbornik, bijele kartice, narančastocrvena akcija, oker druga boja grafova. */
@media screen {
  :root[data-theme="cream"],
  [data-theme-sample="cream"] {
    color-scheme: light;
    --grey-50: #faf6f1;
    --grey-100: #f3ede5;
    --grey-200: #e8dfd4;
    --grey-300: #d6cabb;
    --grey-400: #a69a8c;
    --grey-500: #71665b;
    --grey-600: #574e45;
    --grey-700: #41392f;
    --grey-800: #2f2925;
    --grey-900: #211c19;
    --grey-950: #140f0d;
    --theme-surface: #ffffff;
    --green-50: #fbeee9;
    --green-100: #f6dcd2;
    --green-500: #bd4a30;
    --green-600: #9e3b25;
    --blue-100: #f7ead2;
    --blue-500: #c98a1f;
    --yellow-100: #fbf0d6;
    --yellow-500: #d9a02c;
    --yellow-600: #7e5a10;
    --red-100: #f8dfdc;
    --red-500: #c73e36;
    --red-700: #8f2620;
    --theme-success: #3f6e52;
    --theme-success-bg: #e1ece3;
    --theme-success-border: #5b8a6d;
    --theme-chrome: #f1e9df;
    --theme-chrome-active: #e6d9c9;
    --theme-chrome-control: #ddcfbd;
    --theme-chrome-border: #e2d6c7;
    --theme-info: #7a520c;
    --color-bg-app: var(--grey-100);
    --color-bg-surface: var(--theme-surface);
    --color-bg-subtle: var(--grey-50);
    --color-bg-muted: var(--grey-100);
    --color-border: var(--grey-200);
    --color-border-strong: var(--grey-300);
    --color-text: var(--grey-900);
    --color-text-secondary: var(--grey-700);
    --color-text-muted: var(--grey-500);
    --color-text-subtle: var(--grey-400);
    --color-text-disabled: var(--grey-300);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-600);
    --color-selected-bg: var(--green-50);
    --color-fill-strong: var(--grey-800);
    --color-fill-strong-hover: var(--grey-950);
    --color-fill-disabled: var(--grey-400);
    --color-fill-neutral: var(--grey-500);
    --color-shadow: var(--black-10);
    --color-overlay: var(--black-20);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: var(--theme-success-bg);
    --color-success-text: var(--theme-success);
    --color-success-border: var(--theme-success-border);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: var(--yellow-600);
    --color-info-bg: var(--blue-100);
    --color-info-text: var(--theme-info);
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--theme-chrome);
    --color-bg-chrome-active: var(--theme-chrome-active);
    --color-bg-chrome-control: var(--theme-chrome-control);
    --color-border-chrome: var(--theme-chrome-border);
    --color-text-chrome: var(--grey-600);
    --color-text-chrome-soft: var(--grey-700);
    --color-text-chrome-strong: var(--grey-900);
    --color-chrome-toggle-bg: var(--grey-900);
    --color-chrome-toggle-text: var(--theme-surface);
    --color-chrome-accent: var(--color-action);
    --color-chrome-accent-text: var(--color-text-on-fill);
  }
}

/* Tamnosiva i tirkizna: svijetlosiva pozadina, tamnosivi izbornik, tirkizna akcija, tamnosiva druga boja grafova. */
@media screen {
  :root[data-theme="teal"],
  [data-theme-sample="teal"] {
    color-scheme: light;
    --grey-50: #f6f7f8;
    --grey-100: #eceef0;
    --grey-200: #dfe2e5;
    --grey-300: #c9ced3;
    --grey-400: #959ca4;
    --grey-500: #636b74;
    --grey-600: #4b535b;
    --grey-700: #373e45;
    --grey-800: #2b3137;
    --grey-900: #1d2227;
    --grey-950: #111417;
    --theme-surface: #ffffff;
    --green-50: #e6f5f2;
    --green-100: #cdebe5;
    --green-500: #13806e;
    --green-600: #0e6758;
    --blue-100: #e1e5ea;
    --blue-500: #3a4652;
    --yellow-100: #fdf0d5;
    --yellow-500: #f2a31c;
    --yellow-600: #7d5308;
    --red-100: #fbe0df;
    --red-500: #d03b37;
    --red-700: #9c2a26;
    --theme-success: #0e6758;
    --theme-success-bg: #cdebe5;
    --theme-success-border: #13806e;
    --theme-chrome: #2b3137;
    --theme-chrome-active: #1d2227;
    --theme-chrome-control: #3a4249;
    --theme-chrome-border: #373e45;
    --theme-chrome-text: #aab2ba;
    --theme-chrome-text-soft: #d0d5da;
    --theme-info: #3a4652;
    --theme-chrome-accent: #2ec4a9;
    --color-bg-app: var(--grey-100);
    --color-bg-surface: var(--theme-surface);
    --color-bg-subtle: var(--grey-50);
    --color-bg-muted: var(--grey-100);
    --color-border: var(--grey-200);
    --color-border-strong: var(--grey-300);
    --color-text: var(--grey-900);
    --color-text-secondary: var(--grey-700);
    --color-text-muted: var(--grey-500);
    --color-text-subtle: var(--grey-400);
    --color-text-disabled: var(--grey-300);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-600);
    --color-selected-bg: var(--green-50);
    --color-fill-strong: var(--grey-800);
    --color-fill-strong-hover: var(--grey-950);
    --color-fill-disabled: var(--grey-400);
    --color-fill-neutral: var(--grey-500);
    --color-shadow: var(--black-10);
    --color-overlay: var(--black-20);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: var(--theme-success-bg);
    --color-success-text: var(--theme-success);
    --color-success-border: var(--theme-success-border);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: var(--yellow-600);
    --color-info-bg: var(--blue-100);
    --color-info-text: var(--theme-info);
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--theme-chrome);
    --color-bg-chrome-active: var(--theme-chrome-active);
    --color-bg-chrome-control: var(--theme-chrome-control);
    --color-border-chrome: var(--theme-chrome-border);
    --color-text-chrome: var(--theme-chrome-text);
    --color-text-chrome-soft: var(--theme-chrome-text-soft);
    --color-text-chrome-strong: var(--white);
    --color-chrome-toggle-bg: var(--white);
    --color-chrome-toggle-text: var(--grey-900);
    --color-chrome-accent: var(--theme-chrome-accent);
    --color-chrome-accent-text: var(--grey-950);
  }
}

/* Siva i šljiva: bijele kartice, tamni izbornik boje šljive, akcija boje šljive, blijedožuti odabrani redak. */
@media screen {
  :root[data-theme="plum"],
  [data-theme-sample="plum"] {
    color-scheme: light;
    --grey-50: #f7f7f8;
    --grey-100: #eeeef0;
    --grey-200: #e1e0e4;
    --grey-300: #cbcad0;
    --grey-400: #9a98a1;
    --grey-500: #68656f;
    --grey-600: #4f4c57;
    --grey-700: #3b3843;
    --grey-800: #2e2b35;
    --grey-900: #211f27;
    --grey-950: #141218;
    --theme-surface: #ffffff;
    --green-50: #f4f3dc;
    --green-100: #ebe9c2;
    --green-500: #4a4559;
    --green-600: #36323f;
    --blue-100: #ebebee;
    --blue-500: #8f8c99;
    --yellow-100: #f5f2d0;
    --yellow-500: #c9b938;
    --yellow-600: #6e6512;
    --red-100: #fbe0e0;
    --red-500: #c8423c;
    --red-700: #982f2a;
    --theme-success: #1a6f4c;
    --theme-success-bg: #dcf1e6;
    --theme-success-border: #2db37a;
    --theme-chrome: #3e3a48;
    --theme-chrome-active: #2f2c37;
    --theme-chrome-control: #4b4757;
    --theme-chrome-border: #4b4757;
    --theme-chrome-text: #bcb9c5;
    --theme-chrome-text-soft: #dedce4;
    --theme-info: #4f4c57;
    --theme-chrome-accent: #e8e6b5;
    --color-bg-app: var(--grey-100);
    --color-bg-surface: var(--theme-surface);
    --color-bg-subtle: var(--grey-50);
    --color-bg-muted: var(--grey-100);
    --color-border: var(--grey-200);
    --color-border-strong: var(--grey-300);
    --color-text: var(--grey-900);
    --color-text-secondary: var(--grey-700);
    --color-text-muted: var(--grey-500);
    --color-text-subtle: var(--grey-400);
    --color-text-disabled: var(--grey-300);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-600);
    --color-selected-bg: var(--green-50);
    --color-fill-strong: var(--grey-800);
    --color-fill-strong-hover: var(--grey-950);
    --color-fill-disabled: var(--grey-400);
    --color-fill-neutral: var(--grey-500);
    --color-shadow: var(--black-10);
    --color-overlay: var(--black-20);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: var(--theme-success-bg);
    --color-success-text: var(--theme-success);
    --color-success-border: var(--theme-success-border);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: var(--yellow-600);
    --color-info-bg: var(--blue-100);
    --color-info-text: var(--theme-info);
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--theme-chrome);
    --color-bg-chrome-active: var(--theme-chrome-active);
    --color-bg-chrome-control: var(--theme-chrome-control);
    --color-border-chrome: var(--theme-chrome-border);
    --color-text-chrome: var(--theme-chrome-text);
    --color-text-chrome-soft: var(--theme-chrome-text-soft);
    --color-text-chrome-strong: var(--white);
    --color-chrome-toggle-bg: var(--white);
    --color-chrome-toggle-text: var(--grey-900);
    --color-chrome-accent: var(--theme-chrome-accent);
    --color-chrome-accent-text: var(--grey-900);
  }
}

/* Tamnoplava i narančasta: tamna tema u tamnoplavoj, narančasta akcija, plava druga boja grafova. */
@media screen {
  :root[data-theme="ocean"],
  [data-theme-sample="ocean"] {
    color-scheme: dark;
    --grey-50: #eef2f8;
    --grey-100: #d5dce8;
    --grey-200: #b4bfd1;
    --grey-300: #a4b0c4;
    --grey-400: #8592a8;
    --grey-500: #5f6d86;
    --grey-600: #3b4a66;
    --grey-700: #2a3954;
    --grey-800: #1d2b45;
    --grey-900: #152139;
    --grey-950: #0d172b;
    --theme-surface: #152139;
    --green-50: #3a3220;
    --green-100: #4a3c1f;
    --green-500: #c2570c;
    --green-600: #a5480a;
    --blue-100: #1f3360;
    --blue-500: #3d7bff;
    --yellow-100: #3c3320;
    --yellow-500: #f5a70a;
    --yellow-600: #f7b733;
    --red-100: #3d2030;
    --red-500: #d63847;
    --red-700: #f47c87;
    --theme-success: #3ccf8e;
    --theme-success-bg: #17363a;
    --theme-success-border: #22a06b;
    --theme-link: #f7a440;
    --theme-chrome: #101b31;
    --theme-chrome-active: #1d2b45;
    --theme-chrome-control: #253553;
    --theme-chrome-border: #1d2b45;
    --theme-chrome-text: #93a3bf;
    --theme-chrome-text-soft: #b9c4d6;
    --color-bg-app: var(--grey-950);
    --color-bg-surface: var(--theme-surface);
    --color-bg-subtle: var(--grey-800);
    --color-bg-muted: var(--grey-800);
    --color-border: var(--grey-700);
    --color-border-strong: var(--grey-600);
    --color-text: var(--grey-50);
    --color-text-secondary: var(--grey-200);
    --color-text-muted: var(--grey-400);
    --color-text-subtle: var(--grey-500);
    --color-text-disabled: var(--grey-600);
    --color-text-on-fill: var(--white);
    --color-link: var(--theme-link);
    --color-selected-bg: var(--green-50);
    --color-fill-strong: var(--grey-700);
    --color-fill-strong-hover: var(--grey-600);
    --color-fill-disabled: var(--grey-700);
    --color-fill-neutral: var(--grey-600);
    --color-shadow: var(--black-20);
    --color-overlay: color-mix(in srgb, var(--black) 60%, transparent);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: var(--theme-success-bg);
    --color-success-text: var(--theme-success);
    --color-success-border: var(--theme-success-border);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: var(--yellow-500);
    --color-info-bg: var(--blue-100);
    --color-info-text: var(--grey-100);
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--theme-chrome);
    --color-bg-chrome-active: var(--theme-chrome-active);
    --color-bg-chrome-control: var(--theme-chrome-control);
    --color-border-chrome: var(--theme-chrome-border);
    --color-text-chrome: var(--theme-chrome-text);
    --color-text-chrome-soft: var(--theme-chrome-text-soft);
    --color-text-chrome-strong: var(--white);
    --color-chrome-toggle-bg: var(--white);
    --color-chrome-toggle-text: var(--grey-900);
    --color-chrome-accent: var(--color-action);
    --color-chrome-accent-text: var(--color-text-on-fill);
  }
}

/* Zelena: svijetlosiva pozadina, zeleni izbornik i akcija, ljubičasta druga boja grafova. */
@media screen {
  :root[data-theme="forest"],
  [data-theme-sample="forest"] {
    color-scheme: light;
    --grey-50: #f6f7f6;
    --grey-100: #eef0ee;
    --grey-200: #e0e4e1;
    --grey-300: #c8cec9;
    --grey-400: #949c96;
    --grey-500: #626b65;
    --grey-600: #4a524c;
    --grey-700: #363d38;
    --grey-800: #29302b;
    --grey-900: #1c221e;
    --grey-950: #101411;
    --theme-surface: #ffffff;
    --green-50: #e8f4ee;
    --green-100: #cfe8dc;
    --green-500: #2b7656;
    --green-600: #215f45;
    --blue-100: #f1e3f3;
    --blue-500: #8e2c9a;
    --yellow-100: #fdf0d6;
    --yellow-500: #f5a524;
    --yellow-600: #7c540d;
    --red-100: #fbe2df;
    --red-500: #cc4234;
    --red-700: #9c3026;
    --theme-success: #215f45;
    --theme-success-bg: #cfe8dc;
    --theme-success-border: #2b7656;
    --theme-chrome: #256b4d;
    --theme-chrome-active: #1d5a40;
    --theme-chrome-control: #1f5f44;
    --theme-chrome-border: #2e7656;
    --theme-chrome-text: #d3ebdf;
    --theme-chrome-text-soft: #ebf6f0;
    --theme-info: #7a2585;
    --theme-chrome-accent: #f5a524;
    --color-bg-app: var(--grey-100);
    --color-bg-surface: var(--theme-surface);
    --color-bg-subtle: var(--grey-50);
    --color-bg-muted: var(--grey-100);
    --color-border: var(--grey-200);
    --color-border-strong: var(--grey-300);
    --color-text: var(--grey-900);
    --color-text-secondary: var(--grey-700);
    --color-text-muted: var(--grey-500);
    --color-text-subtle: var(--grey-400);
    --color-text-disabled: var(--grey-300);
    --color-text-on-fill: var(--white);
    --color-link: var(--green-600);
    --color-selected-bg: var(--green-50);
    --color-fill-strong: var(--grey-800);
    --color-fill-strong-hover: var(--grey-950);
    --color-fill-disabled: var(--grey-400);
    --color-fill-neutral: var(--grey-500);
    --color-shadow: var(--black-10);
    --color-overlay: var(--black-20);
    --color-action: var(--green-500);
    --color-action-hover: var(--green-600);
    --color-success-bg: var(--theme-success-bg);
    --color-success-text: var(--theme-success);
    --color-success-border: var(--theme-success-border);
    --color-warning-bg: var(--yellow-100);
    --color-warning-text: var(--yellow-600);
    --color-info-bg: var(--blue-100);
    --color-info-text: var(--theme-info);
    --color-error-bg: var(--red-100);
    --color-error-text: var(--red-700);
    --color-error-strong: var(--red-700);
    --color-bg-chrome: var(--theme-chrome);
    --color-bg-chrome-active: var(--theme-chrome-active);
    --color-bg-chrome-control: var(--theme-chrome-control);
    --color-border-chrome: var(--theme-chrome-border);
    --color-text-chrome: var(--theme-chrome-text);
    --color-text-chrome-soft: var(--theme-chrome-text-soft);
    --color-text-chrome-strong: var(--white);
    --color-chrome-toggle-bg: var(--white);
    --color-chrome-toggle-text: var(--grey-900);
    --color-chrome-accent: var(--theme-chrome-accent);
    --color-chrome-accent-text: var(--grey-950);
  }
}

/*
 * Stil sučelja (Moje postavke > Postavke izgleda): `lib/theme.ts` postavlja `data-style` na <html>
 * ("classic", "modern" ili "clear"), a mali prikaz stila u Moje postavke ima ga na sebi. Stil mijenja
 * samo obradu (obrubi polja, fokus, sjene, zaobljenja), a boje uvijek dolaze iz teme. Klasični je
 * izgled kakav je bio i prije stilova; pravila Suvremenog su u `styles/modern.css`, a Preglednog u
 * `styles/clear.css`, i koriste ove tokene. Obrub polja i fokus Suvremenog i Preglednog imaju
 * najmanje 3:1 prema kartici u svakoj temi (WCAG 1.4.11), a okvir izbornika, zaglavlje i logotip
 * isti su u svim stilovima.
 */
:root,
[data-style="classic"] {
  --style-control-border: var(--color-border);
  --style-focus: var(--color-action);
  --style-surface-border: transparent;
  --style-surface-shadow: none;
  --style-surface-radius: var(--radius-lg);
  --style-raised-shadow: 0 4px 16px var(--color-shadow);
  --style-status-radius: var(--radius-sm);
  --style-action: var(--color-action);
  --style-action-hover: var(--color-action-hover);
  --style-on-action: var(--color-text-on-fill);
  --style-danger: var(--red-500);
  --style-danger-hover: var(--red-700);
}
[data-style="modern"],
[data-style="clear"] {
  /* Obrub polja, kvačice i obrubljenog gumba: vidljiv kao tekst pomoći (najmanje 3:1) */
  --style-control-border: var(--color-text-muted);
  /* Prsten fokusa tipkovnice i polja u koje se piše */
  --style-focus: var(--color-link);
  /* Kartice, widgeti i okviri tablica: tanki obrub i blaga sjena umjesto same pozadine */
  --style-surface-border: var(--color-border);
  --style-surface-shadow: 0 1px 2px var(--color-shadow);
  /* Popup i padajući izbornici: izraženija sjena, da se vidi što je iznad stranice */
  --style-raised-shadow: 0 12px 32px var(--color-shadow);
  /* Statusi su zaobljene oznake s točkom ispred teksta */
  --style-status-radius: 999px;
  /* Glavni i opasni gumb, označena kvačica i odabir: ispuna i tekst na njoj */
  --style-action: var(--color-action);
  --style-action-hover: var(--color-action-hover);
  --style-on-action: var(--color-text-on-fill);
  --style-danger: var(--red-500);
  --style-danger-hover: var(--red-700);
}
/* Pregledni: iste pristupačne boje kao Suvremeni, uz mekšu i veću sjenu i veće zaobljenje okvira */
[data-style="clear"] {
  --style-surface-shadow: 0 2px 10px var(--color-shadow);
  --style-surface-radius: calc(var(--radius-lg) + var(--space-1));
}

/*
 * Suvremeni i Pregledni u temama čije boje ne daju 4.5:1 za tekst (ili 3:1 za oznake): tamnija
 * ispuna gumba, tamniji tekst na zelenoj u tamnim temama i tamniji tekst statusa, poveznica i
 * sporednog teksta u Svijetloj. Samo boje palete (color-mix s crnom), samo na ekranu. Klasični ostaje kakav je bio, a
 * `--color-chrome-accent` (logotip) se ne mijenja ni ovdje.
 */
@media screen {
  :root[data-theme="light"][data-style="modern"],
  :root[data-theme="light"][data-style="clear"],
  [data-theme="light"] [data-style="modern"],
  [data-theme="light"] [data-style="clear"] {
    --color-link: color-mix(in srgb, var(--green-600) 80%, var(--black));
    --color-text-muted: var(--grey-600);
    /* Obrub polja ostaje svjetliji od sporednog teksta (grey-500 ima 4.8:1 prema kartici) */
    --style-control-border: var(--grey-500);
    --color-success-text: color-mix(in srgb, var(--green-600) 75%, var(--black));
    --color-warning-text: color-mix(in srgb, var(--yellow-600) 65%, var(--black));
    --color-info-text: color-mix(in srgb, var(--blue-500) 70%, var(--black));
    --color-error-text: var(--red-700);
    --style-action: color-mix(in srgb, var(--green-600) 80%, var(--black));
    --style-action-hover: color-mix(in srgb, var(--green-600) 65%, var(--black));
    --style-danger: var(--red-700);
    --style-danger-hover: color-mix(in srgb, var(--red-700) 80%, var(--black));
  }
  :root[data-theme="dark"][data-style="modern"],
  :root[data-theme="dark"][data-style="clear"],
  [data-theme="dark"] [data-style="modern"],
  [data-theme="dark"] [data-style="clear"],
  :root[data-theme="navy"][data-style="modern"],
  :root[data-theme="navy"][data-style="clear"],
  [data-theme="navy"] [data-style="modern"],
  [data-theme="navy"] [data-style="clear"] {
    --style-on-action: var(--grey-950);
    --style-danger: var(--red-700);
    --style-danger-hover: color-mix(in srgb, var(--red-700) 80%, var(--black));
  }
  :root[data-theme="contrast"][data-style="modern"],
  :root[data-theme="contrast"][data-style="clear"],
  [data-theme="contrast"] [data-style="modern"],
  [data-theme="contrast"] [data-style="clear"] {
    --style-danger: var(--red-700);
    --style-danger-hover: color-mix(in srgb, var(--red-700) 80%, var(--black));
  }
  /* Tamnoplava i narančasta: red-700 je ovdje svijetli tekst greške, pa prijelaz mišem potamni red-500 */
  :root[data-theme="ocean"][data-style="modern"],
  :root[data-theme="ocean"][data-style="clear"],
  [data-theme="ocean"] [data-style="modern"],
  [data-theme="ocean"] [data-style="clear"] {
    --style-danger-hover: color-mix(in srgb, var(--red-500) 80%, var(--black));
  }
}
/* Stilovi sučelja. Samo vrijednosti iz tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: var(--text-b3);
  color: var(--color-text);
  background: var(--color-bg-app);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

.h4 {
  font: var(--text-h4);
}
.h6 {
  font: var(--text-h6);
}
.muted {
  color: var(--color-text-muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.icon {
  flex: none;
}

/* ---------- Raspored: sidebar + top bar + sadržaj ---------- */
.shell {
  --sidebar-width: 280px;
  --topbar-height: 80px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
  min-height: 100vh;
}
.shell--collapsed {
  --sidebar-width: 88px;
}

.sidebar {
  grid-row: 1 / span 2;
  background: var(--color-bg-chrome);
  color: var(--color-text-chrome);
  border-right: 1px solid var(--color-border-chrome);
  display: flex;
  flex-direction: column;
}
.sidebar__brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 var(--space-5);
  position: relative;
}
/* Naziv aplikacije (Brand): Vortex ERP, ispod sitnije "by EcoMobile" */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--color-text-chrome-strong);
  white-space: nowrap;
}
.brand__name {
  font: var(--text-h4-bold);
  letter-spacing: -0.5px;
}
.brand__ai {
  color: var(--color-chrome-accent);
}
.brand__by {
  font: var(--text-c1);
  color: var(--color-text-chrome);
}
.sidebar__logo .brand__name {
  font: var(--text-h4-bold);
}
.shell--collapsed .sidebar__logo {
  width: 24px;
  overflow: hidden;
}
.shell--collapsed .sidebar__logo .brand__by {
  visibility: hidden;
}
/* Gumb za sužavanje izbornika: diskretan, ispod zaglavlja i desno, odvojen crtom od stavki */
.sidebar__tools {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-chrome);
}
.shell--collapsed .sidebar__tools {
  justify-content: center;
}
.sidebar__toggle {
  width: var(--control-height-sm);
  height: var(--control-height-sm);
  border-radius: var(--radius-md);
  border: 0;
  background: none;
  color: var(--color-text-chrome);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sidebar__toggle:hover,
.sidebar__toggle:focus-visible {
  background: var(--color-bg-chrome-active);
  color: var(--color-text-chrome-strong);
}
/* Grupe izbornika: the grid button left of the logo opens the list of groups (as in OpenProject) */
.menu-spaces {
  position: relative;
  margin-right: var(--space-3);
  flex-shrink: 0;
}
/* Logo stoji odmah desno od gumba grupa, malo odmaknut da mu gumb nije preblizu (vlasnik, 15. 10. 2026.) */
.menu-spaces ~ .sidebar__logo {
  margin: 0 auto 0 var(--space-2);
}
.shell--collapsed .menu-spaces {
  margin-right: var(--space-1);
}
.menu-spaces__button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--color-text-chrome-strong);
  cursor: pointer;
}
.menu-spaces__button:hover,
.menu-spaces__button[aria-expanded="true"] {
  background: var(--color-bg-chrome-active);
}
.menu-spaces__button:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.menu-spaces__list {
  left: 0;
  right: auto;
  min-width: 220px;
  z-index: 50;
}
/* The colour of a group of the menu (Raspored izbornika), on its icon */
.menu-space--blue {
  color: var(--blue-500);
}
.menu-space--green {
  color: var(--green-500);
}
.menu-space--yellow {
  color: var(--yellow-500);
}
.menu-space--red {
  color: var(--red-500);
}
.menu-space--grey {
  color: var(--color-text-muted);
}
.sidebar__space {
  padding: 0 var(--space-6) var(--space-3);
  font: var(--text-c1);
  color: var(--color-text-chrome);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.shell--collapsed .sidebar__space {
  display: none;
}
.sidebar__nav {
  padding: var(--space-6) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* Glavni izbornik je visok kao ekran: grupe se pomiču same za sebe, a Korisnici, Tvrtke i verzija
   ostaju dolje lijevo bez obzira na visinu stranice desno */
.sidebar--pinned {
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: start;
}
.sidebar__nav--pinned {
  min-height: 0;
}
.sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar__bottom {
  flex: none;
}
.nav-group--bottom {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-chrome);
}
/* Oznaka verzije: sitno i prigušeno iznad crte donjih grupa, poravnato s ikonom Korisnika */
.sidebar__version {
  margin-top: auto;
  padding: 0 var(--space-6) var(--space-2) calc(var(--space-6) + 3px);
  font: var(--text-c2);
  color: var(--color-text-chrome);
}
.sidebar__version + .nav-group--bottom {
  margin-top: 0;
}
.shell--collapsed .sidebar__version {
  display: none;
}
.nav-group__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-6);
  font: var(--text-b3-medium);
  color: var(--color-text-chrome-strong);
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  text-align: left;
  cursor: pointer;
}
.nav-group__title:hover {
  background: var(--color-bg-chrome-active);
}
.nav-group__chevron {
  margin-left: auto;
  color: var(--color-text-chrome);
  transition: transform 0.15s ease;
}
.nav-group--closed .nav-group__chevron {
  transform: rotate(-90deg);
}
.shell--collapsed .nav-group__chevron {
  display: none;
}
.nav-group__title--active {
  border-left-color: var(--color-text-chrome-strong);
}
.nav-group__items {
  list-style: none;
  margin: 0;
  padding: var(--space-1) var(--space-4) var(--space-2) var(--space-8);
}
.nav-item {
  display: block;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-chrome);
  font: var(--text-b3-medium);
}
.nav-item:hover {
  color: var(--color-text-chrome-strong);
}
/* The number next to a menu item (MenuCount): discreet, only when above 0 */
.nav-item__count {
  float: right;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-bg-chrome-control);
  color: var(--color-text-chrome-strong);
  font: var(--text-c2);
  line-height: 20px;
  text-align: center;
}
.nav-item--active {
  background: var(--color-bg-chrome-active);
  color: var(--color-text-chrome-strong);
  border: 1px solid var(--color-border-chrome);
}
.sidebar__close,
.topbar__menu,
.topbar__logo,
.shell__overlay {
  display: none;
}
.shell--collapsed .nav-group__title span,
.shell--collapsed .nav-group__items {
  display: none;
}

.topbar {
  background: var(--color-bg-chrome);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--space-6);
  /* Dugi naziv tvrtke ne širi stupac (ni stranicu); skraćuje se unutar trake */
  min-width: 0;
}
/* Ikone s brojem gore desno (components/TopbarCounter.tsx): samo kad ima nečega, broj diskretan */
.topbar__icons {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-right: var(--space-4);
}
.topbar__icons:empty {
  display: none;
}
.topbar-counter {
  position: relative;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--color-text-chrome-soft);
}
.topbar-counter:hover {
  background: var(--color-bg-chrome-control);
  color: var(--color-text-chrome-strong);
}
.topbar-counter:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: 2px;
}
.topbar-counter__badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--color-bg-chrome-control);
  color: var(--color-text-chrome-strong);
  font: var(--text-c2);
  line-height: 16px;
  text-align: center;
}
.topbar-counter__badge--alert {
  background: var(--color-error-text);
  color: var(--color-text-on-fill);
}

.topbar__user {
  position: relative;
  flex-shrink: 0;
}
/* Naziv tvrtke prijavljenog korisnika lijevo od korisničkog izbornika (na mobitelu samo u izborniku).
   Kad nema mjesta, skraćuje se naziv tvrtke, a ne korisnički izbornik. */
.topbar__company {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: var(--space-4);
  font: var(--text-b3);
  color: var(--color-text-chrome-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.user-menu {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3) 0 var(--space-1);
  background: var(--color-bg-chrome-active);
  border: 1px solid var(--color-border-chrome);
  border-radius: var(--radius-md);
  color: var(--color-text-chrome-strong);
  font: var(--text-b3-medium);
  cursor: pointer;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-chrome-accent);
  color: var(--color-chrome-accent-text);
  display: grid;
  place-items: center;
  font: var(--text-b3-medium);
}
/* Avatar s fotografijom (Figma: Componets > Avatar): okrugla slika osobe, Default je silueta
   green-500 na green-100. Large (120px) u uređivanju ima značku za promjenu slike dolje desno. */
.avatar-pic {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.avatar-pic--xs {
  width: 24px;
  height: 24px;
}
.avatar-pic--sm {
  width: 40px;
  height: 40px;
}
.avatar-pic--lg {
  width: 120px;
  height: 120px;
}
.avatar-pic--default {
  background: var(--color-success-bg);
  color: var(--green-500);
}
.avatar-pic__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-pic__figure {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.avatar-pic__badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
}
.avatar-pic__badge:hover {
  color: var(--color-text);
}
.avatar-pic__badge:focus-within {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}
.avatar-pic__badge input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
/* Profil kandidata: slika na vrhu podataka, datum od mjeseca i godine, retci radnog iskustva */
.profile-head {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.profile-head__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.date-parts {
  display: flex;
  gap: var(--space-2);
}
.date-parts .select {
  flex: 1 1 0;
  min-width: 0;
}
/* After .input in the cascade too: the year keeps its width next to the month */
.date-parts .date-parts__year {
  flex: none;
  width: 96px;
}
.entry-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.entry-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.entry-block__title {
  font: var(--text-b3-medium);
}
.table td.nowrap {
  white-space: nowrap;
}
.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  min-width: 180px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--color-shadow);
  padding: var(--space-1);
  z-index: 10;
}
.dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}
.dropdown__item:hover {
  background: var(--color-bg-muted);
}
.dropdown__item--selected {
  color: var(--color-link);
  font: var(--text-b3-medium);
}
.dropdown__label {
  padding: var(--space-2) var(--space-3) var(--space-1);
  font: var(--text-c1);
  color: var(--color-text-muted);
}
.dropdown__company {
  font: var(--text-b3-medium);
  color: var(--color-text);
  max-width: 280px;
  overflow-wrap: anywhere;
}
.dropdown__divider {
  height: 1px;
  margin: var(--space-1) 0;
  background: var(--color-border);
}

.content {
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: var(--color-text-muted);
  font: var(--text-b3-medium);
}
.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: var(--space-2);
}
.breadcrumb__item a:hover {
  color: var(--color-text);
}
.breadcrumb__item [aria-current] {
  color: var(--color-text);
}

/* ---------- Kartica ---------- */
.card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.section-title {
  font: var(--text-h6);
  margin-top: var(--space-2);
}
.block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: 0;
  min-width: 0;
}
/* Icons in the top right corner of a section's frame (`Section.corner`), e.g. a partner's meetings */
.block--corner {
  position: relative;
}
.block__corner {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  z-index: 1;
}
/*
 * The record's header (Matični podaci, design A; `Section.header` in resource.tsx): the first
 * section of a view. On top the picture, the section's title, the record's name and chips, and in
 * the top right corner the key value (e.g. OIB) with Kopiraj and the module's icons; below the
 * other fields in four columns, labels muted.
 */
.record-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
}
.record-frame__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-bg-subtle);
  flex-wrap: wrap;
}
.record-frame__picture {
  flex: none;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  color: var(--color-success-text);
  font: var(--text-h4-bold);
}
.record-frame__picture--round {
  border-radius: 50%;
}
.record-frame__picture img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}
.record-frame__title {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.record-frame__over {
  font: var(--text-c1-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.record-frame__name {
  font: var(--text-h4);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.record-frame__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
/* A large picture left of the title (`SectionHeader.media`, e.g. a vehicle's photos) */
.record-frame__head--media {
  align-items: flex-start;
}
.record-frame__media {
  flex: 0 1 280px;
  min-width: 0;
}
@media (max-width: 768px) {
  .record-frame__media {
    flex-basis: 100%;
  }
}
/* Key values under the chips (`SectionHeader.facts`) */
.record-frame__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-2);
}
.record-frame__corner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-left: auto;
}
.record-frame__icons {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
/* The module icons (meetings, documents…): a little transparent until pointed at; only the icon,
   so the count badge on it stays readable */
.record-frame__icons a svg {
  width: 26px;
  height: 26px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.record-frame__icons a:hover svg,
.record-frame__icons a:focus-visible svg {
  opacity: 1;
}
.record-frame__divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}
.record-frame__body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.record-frame__body .field {
  gap: var(--space-1);
}
.record-frame__body .field__label {
  font: var(--text-c1-medium);
  color: var(--color-text-muted);
}
.record-frame__body .field__value {
  min-height: 24px;
}
/* A custom field that only shows read fields (viewCells): its fields sit in the frame's own columns */
.record-frame__body .field--cells,
.record-frame__body .field--cells > .block {
  display: contents;
}
/* The view's other frames: the title in a band on top (as the header), the fields below */
.record-frame__band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-5);
  background: var(--color-bg-subtle);
}
.record-frame__band + .record-frame__rows {
  border-top: 1px solid var(--color-border);
}
.record-frame__band-title {
  font: var(--text-c1-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.record-frame__body + .record-frame__rows {
  border-top: 1px solid var(--color-border);
}
.record-frame__rows {
  padding: var(--space-4) var(--space-5);
}
/* Frames of screens outside ResourceConfig (components/Frame.tsx): the content under the band; a
   block in it loses its own border (the frame is the border) and its fields sit as in a frame's body */
.record-frame__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
  min-width: 0;
}
.record-frame__content > .block {
  border: 0;
  border-radius: 0;
  padding: 0;
}
.record-frame__content > .block.grid-3 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
}
.record-frame__content .field__label {
  font: var(--text-c1-medium);
  color: var(--color-text-muted);
}
/* A frame that opens by its title (ProfileSection): the button looks like the band's title */
.record-frame__band-title .profile-section__toggle {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.record-frame__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
/* A phone number or an e-mail address: a link that calls or writes, with Kopiraj */
.contact-value {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  max-width: 100%;
}
.contact-value__link {
  color: var(--color-link);
  text-decoration: none;
  overflow-wrap: anywhere;
  min-width: 0;
}
.contact-value__link:hover {
  text-decoration: underline;
}
/* The key value of the header (e.g. OIB) with Kopiraj */
.record-key {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height-sm);
  padding: 0 var(--space-1) 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  white-space: nowrap;
}
.record-key__label {
  font: var(--text-c1-medium);
  color: var(--color-text-muted);
}
.record-key__value {
  font: var(--text-b3);
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.record-key__copy {
  width: var(--control-height-xs);
  height: var(--control-height-xs);
}
/* Ikona ponuda s brojem na partneru: kopija bez izmjena iz starog Vortexa (vortex-erp/ecomobile-erp, develop cdcf698ef),
   frontend/src/styles/modules/crm.css, retci 13-44. Iznimka za CSS iz pravila rada v1.09, točka 5. */
.meeting-icons {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.meeting-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
}
.meeting-icon:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}
.meeting-icon__badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--color-action);
  color: var(--color-text-on-fill);
  font: var(--text-c2);
}
@media (max-width: 1100px) {
  .record-frame__body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Rows of a profile block of an application (Obrazovanje, Radno iskustvo) */
.profile-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.profile-row__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-2);
}
/* Od / Do: month and year side by side */
.period-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
}
/* Predlošci: a text with its tools (Umetni oznaku, Predložak) above it, and the examples */
.text-tools__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.text-tools {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.text-tools__select {
  min-width: 0;
  max-width: 100%;
}
.text-tools__select .select__input {
  width: auto;
  max-width: 100%;
  height: var(--control-height-sm);
}
.template-examples {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.template-examples .muted {
  margin: 0;
}
.template-example {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.template-example__title {
  font: var(--text-b3-medium);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}
.template-example__subject {
  font: var(--text-b3-medium);
  margin: 0 0 var(--space-2);
}
.template-example__body {
  font: var(--text-b3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.template-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}
/* Predselekcija: intro with Uredi, result of an application, options of a choice question */
.preselection-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.preselection-head .muted {
  flex: 1 1 320px;
  margin: 0;
}
.preselection-fields {
  margin-top: var(--space-4);
}
.preselection-help {
  margin: var(--space-3) 0 0;
}
.preselection-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font: var(--text-h6);
  margin: 0 0 var(--space-3);
}
.preselection-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.preselection-option {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: var(--space-3);
}
@media (max-width: 768px) {
  .preselection-option {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}
.applicant-photo {
  display: block;
  max-width: 120px;
  max-height: 160px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  object-fit: cover;
}
/* An image of a record in its view, e.g. a warehouse (Postavke CRM) */
.record-image {
  display: block;
  max-width: 240px;
  max-height: 160px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  object-fit: cover;
}
/* A record's name with its small logo in a table, e.g. partners (CRM) */
.record-name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.record-thumb {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-bg-surface);
}
/* Slike artikla (CRM): the main picture, then the gallery as a grid of small pictures */
.item-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.item-gallery__main {
  display: block;
  width: 100%;
  max-width: 320px;
  max-height: 240px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-bg-surface);
}
.item-gallery__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.item-gallery__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  min-width: 0;
}
.item-gallery__item img {
  width: 100%;
  height: 96px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-bg-surface);
}
.item-gallery__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
/* A picture of a gallery that opens enlarged (`Lightbox`) */
.item-gallery__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.item-gallery__zoom:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Uvećani prikaz slika (components/Lightbox.tsx): the picture over the whole screen, arrows at the sides */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--color-overlay);
}
.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  user-select: none;
}
.lightbox__close,
.lightbox__arrow {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-bg-surface);
  color: var(--color-text);
  box-shadow: 0 4px 16px var(--color-shadow);
  cursor: pointer;
}
.lightbox__close {
  top: var(--space-4);
  right: var(--space-4);
  width: var(--control-height-sm);
  height: var(--control-height-sm);
}
.lightbox__arrow {
  top: 50%;
  width: var(--control-height);
  height: var(--control-height);
  transform: translateY(-50%);
}
.lightbox__arrow--prev {
  left: var(--space-4);
}
.lightbox__arrow--next {
  right: var(--space-4);
}
.lightbox__counter {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  margin: 0;
  padding: var(--space-1) var(--space-3);
  transform: translateX(-50%);
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  color: var(--color-text);
}
@media (max-width: 768px) {
  .lightbox {
    padding: var(--space-8) var(--space-2);
  }
  .lightbox__arrow {
    top: auto;
    bottom: var(--space-4);
    transform: none;
  }
}
/* Kontakti partnera (CRM): cards, one under another on a phone */
/* 420px fits Uredi, Pošalji link za pristup portalu and Obriši in one row */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: var(--space-4);
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.contact-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.contact-card__name {
  font: var(--text-h6);
  overflow-wrap: anywhere;
}
.contact-card__rows {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}
.contact-card__rows div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-2);
}
.contact-card__rows dt {
  color: var(--color-text-muted);
  font: var(--text-b3);
}
.contact-card__rows dd {
  margin: 0;
  font: var(--text-b3);
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}
.saved {
  color: var(--color-link);
  font: var(--text-b3-medium);
}
.form-error {
  color: var(--color-error-strong);
  font: var(--text-b3-medium);
}

/* ---------- E-poruke kandidatima (predlošci, obavijest o odbijanju, povijest) ---------- */
/* Tekst poruke kakav će otići: prijelomi redaka ostaju */
.pre-wrap,
.notice-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice-body {
  font: var(--text-b3);
}
.notice-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.notice-problem {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.notice-problem__links,
.placeholder-panel__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
/* Dugi nazivi oznaka lome se u više redaka umjesto da izađu iz ekrana (mobitel) */
.placeholder-panel__list .btn {
  max-width: 100%;
  height: auto;
  min-height: var(--control-height-sm);
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
  white-space: normal;
  text-align: left;
}
.placeholder-panel,
.template-preview,
.history-mail,
.history-mail__message {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.history-mail,
.history-mail__message {
  gap: var(--space-1);
}
.history-mail__message {
  padding: var(--space-3);
  font: var(--text-b3);
}
.template-preview__subject {
  font: var(--text-h6);
  overflow-wrap: anywhere;
}
.sibling-list {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-5);
}
.inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
@media (max-width: 768px) {
  .notice-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Gumbi ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font: var(--text-button);
  cursor: pointer;
  white-space: nowrap;
}
.btn--md {
  height: var(--control-height);
  padding: 0 var(--space-5);
}
.btn--sm {
  height: var(--control-height-sm);
  padding: 0 var(--space-4);
  font: var(--text-c1-medium);
}
.btn--primary {
  background: var(--green-500);
  color: var(--color-text-on-fill);
}
.btn--primary:hover {
  background: var(--green-600);
}
.btn--secondary {
  background: var(--color-fill-strong);
  color: var(--color-text-on-fill);
}
.btn--secondary:hover {
  background: var(--color-fill-strong-hover);
}
.btn--outline {
  background: var(--color-bg-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--outline:hover {
  background: var(--color-bg-muted);
}
/* Opasna akcija u popupu potvrde (Figma: Delete-Deactivate-Activate Popup, gumb red-500) */
.btn--danger {
  background: var(--red-500);
  color: var(--color-text-on-fill);
}
.btn--danger:hover {
  background: var(--red-700);
}
.btn--text {
  background: transparent;
  color: var(--color-text);
}
.btn--text:hover {
  background: var(--color-bg-muted);
}
.btn:disabled {
  cursor: not-allowed;
}
.btn--primary:disabled,
.btn--secondary:disabled,
.btn--danger:disabled {
  background: var(--color-fill-disabled);
  color: var(--color-text-muted);
}
.btn--outline:disabled,
.btn--text:disabled {
  background: var(--color-bg-subtle);
  color: var(--color-text-disabled);
}
.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: none;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}

/* ---------- Polja ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.field__label {
  font: var(--text-b3-medium);
  color: var(--color-text);
}
.field__label-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 20px;
}
/* The "i" next to a label: no taller than the label, so the fields of a row stay aligned */
.field__label-row .icon-btn {
  width: var(--control-height-xs);
  height: 20px;
}
.field__value {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  font: var(--text-b3);
  color: var(--color-text);
  overflow-wrap: anywhere;
}
/* Kvačica i tekst uz nju (npr. dopuštenje i datum kad je dano) */
.field__value--with-text {
  gap: var(--space-2);
}
.field__value--empty {
  color: var(--color-text-subtle);
}
/* Vrijednost višerednog polja u pregledu: prijelomi redaka ostaju kako su upisani */
.field__value--multiline {
  align-items: flex-start;
  white-space: pre-line;
}
/* Podaci s portala u pregledu prijave: sklopljeni tekst, otvoren u okviru s vlastitim pomicanjem */
.source-details {
  width: 100%;
  min-width: 0;
}
.source-details summary {
  cursor: pointer;
  font: var(--text-b3-medium);
  color: var(--color-link);
}
.source-details__text {
  margin-top: var(--space-2);
  max-height: 480px;
  overflow: auto;
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Detaljne upute za povezivanje (components/ConnectGuide.tsx): sklopivi blok ispod uvoda ekrana, a u
   koracima svaka vrijednost u svom okviru s Kopiraj */
.connect-guide {
  width: 100%;
  min-width: 0;
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.connect-guide summary {
  cursor: pointer;
  font: var(--text-b3-medium);
  color: var(--color-link);
}
.connect-guide__body {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.connect-guide__body section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.connect-guide .guide-subtitle {
  margin: 0;
}
.connect-guide .guide-steps .copy-field {
  margin-top: var(--space-2);
}

.field__help {
  font: var(--text-c1);
  color: var(--color-text-muted);
}
.field__help--error {
  color: var(--color-error-strong);
}
.input {
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  font: var(--text-b3);
  color: var(--color-text);
  outline: none;
  width: 100%;
}
.input::placeholder {
  color: var(--color-text-subtle);
}
.input:focus {
  background: var(--color-selected-bg);
  border-color: var(--green-500);
}
.input--error {
  border-color: var(--red-500);
}
.input:disabled {
  background: var(--color-bg-muted);
  color: var(--color-text-subtle);
}

/* ---------- Polje lozinke s ikonom oka (PasswordField u components/ui.tsx) ---------- */
.password-field {
  position: relative;
}
.password-field__input {
  padding-right: calc(var(--space-3) + var(--space-6));
}
/* Only our eye: Edge would add its own next to it */
.password-field__input::-ms-reveal {
  display: none;
}
.password-field__toggle {
  position: absolute;
  top: 0;
  right: var(--space-2);
  height: var(--control-height);
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.password-field__toggle:hover {
  color: var(--color-text);
}
.password-field__toggle:disabled {
  cursor: default;
  color: var(--color-text-disabled);
}

/* A button inside a text field at its right (TextField `end`, e.g. Lokacija of a meeting) */
.input-end {
  position: relative;
}
.input-end__input {
  padding-right: calc(var(--space-3) + var(--space-6));
}
.input-end__slot {
  position: absolute;
  top: 0;
  right: var(--space-2);
  height: var(--control-height);
  display: flex;
  align-items: center;
}

/* ---------- Odabir datuma i vremena (components/DatePicker.tsx) ---------- */
.date-field__control {
  position: relative;
}
.date-field__input {
  padding-right: calc(var(--space-3) + var(--space-6));
}
.date-field__toggle {
  position: absolute;
  top: 0;
  right: var(--space-2);
  height: var(--control-height);
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.date-field__toggle:hover {
  color: var(--color-text);
}
.date-field__toggle:disabled {
  cursor: default;
  color: var(--color-text-disabled);
}
.date-field__popover {
  position: fixed;
  z-index: 60; /* above popups (.modal) */
}
.date-picker {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 var(--space-1) var(--space-4) var(--color-shadow);
  color: var(--color-text);
  max-width: calc(100vw - 2 * var(--space-4));
}
.date-picker__month {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.date-picker__head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--control-height-xs);
}
.date-picker .icon-btn {
  width: var(--control-height-xs);
  height: var(--control-height-xs);
}
.date-picker__title {
  flex: 1;
  text-align: center;
  font: var(--text-b3-medium);
  white-space: nowrap;
}
.date-picker__grid {
  border-collapse: collapse;
  table-layout: fixed;
}
.date-picker__grid th,
.date-picker__grid td {
  width: var(--date-picker-cell);
  height: var(--date-picker-cell);
  padding: 0;
  border: 1px solid var(--color-border);
  text-align: center;
}
.date-picker__grid th {
  background: var(--color-bg-muted);
  font: var(--text-c1-medium);
  color: var(--color-text-secondary);
}
.date-picker__day {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  font: var(--text-b3);
  color: var(--color-text);
  cursor: pointer;
}
.date-picker__day:hover {
  background: var(--color-bg-subtle);
}
.date-picker__day--other {
  color: var(--color-text-subtle);
}
.date-picker__day--today {
  font: var(--text-b3-medium);
  color: var(--color-link);
  box-shadow: inset 0 0 0 2px var(--color-action);
}
.date-picker__day--selected,
.date-picker__day--selected:hover {
  background: var(--color-action);
  color: var(--color-text-on-fill);
  font: var(--text-b3-medium);
  box-shadow: none;
}
.date-picker__times {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: var(--date-picker-time-width);
}
.date-picker__time-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(var(--date-picker-times-visible) * var(--date-picker-cell));
  overflow-y: auto;
  border: 1px solid var(--color-border);
  scrollbar-width: thin;
}
.date-picker__time {
  flex: none;
  height: var(--date-picker-cell);
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  font: var(--text-b3);
  color: var(--color-text);
  cursor: pointer;
}
.date-picker__time:hover {
  background: var(--color-bg-muted);
}
.date-picker__time--selected,
.date-picker__time--selected:hover {
  background: var(--color-action);
  color: var(--color-text-on-fill);
  font: var(--text-b3-medium);
}
.date-picker__day:focus-visible,
.date-picker__time:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: -2px;
}
/* Na mobitelu vrijeme ide ispod mjeseca, a dani se suzuju do širine ekrana */
@media (max-width: 768px) {
  .date-picker {
    flex-direction: column;
    max-width: none;
  }
  .date-picker__grid {
    width: 100%;
  }
  .date-picker__grid th,
  .date-picker__grid td {
    width: auto;
  }
  .date-picker__times {
    width: 100%;
    flex-direction: row;
  }
  .date-picker__times .icon-btn {
    display: none;
  }
  .date-picker__time-list {
    flex-direction: row;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .date-picker__time {
    width: var(--date-picker-time-width);
    border-bottom: 0;
    border-right: 1px solid var(--color-border);
  }
}
.search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  min-width: 260px;
}
.search:focus-within {
  background: var(--color-selected-bg);
  border-color: var(--green-500);
}
.search input {
  border: 0;
  outline: none;
  background: transparent;
  flex: 1;
  color: var(--color-text);
}

/* ---------- Kvačica ---------- */
.checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox__box {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-bg-surface);
  color: transparent;
  display: grid;
  place-items: center;
}
.checkbox input:checked + .checkbox__box,
.checkbox input:indeterminate + .checkbox__box,
.checkbox--mixed .checkbox__box {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--color-text-on-fill);
}
/* Empty Blade boxes need the same check/minus as the checkbox component. */
.checkbox:not(.checkbox--mixed) input:checked:not(:indeterminate) + .checkbox__box:empty::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.checkbox input:indeterminate + .checkbox__box:empty::after,
.checkbox--mixed .checkbox__box:empty::after {
  content: "";
  width: 10px;
  height: 2px;
  border: 0;
  background: currentColor;
  transform: none;
}
.checkbox input:focus-visible + .checkbox__box {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.checkbox--disabled {
  cursor: not-allowed;
}
.checkbox--disabled .checkbox__box {
  opacity: 0.5;
}
.checkbox--readonly {
  cursor: default;
}
.checkbox__label {
  margin-left: var(--space-2);
  font: var(--text-b3);
  color: var(--color-text);
}
/* A list of choices (e.g. categories of a criterion): labelled checkboxes side by side */
.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  min-height: var(--control-height);
  align-items: center;
}
/*
 * A section with `checkRows` (resource.tsx, e.g. Što se prati of a server): the other fields in the grid
 * on top, then one full-width row per checkbox, separated by lines as table rows. A field the box turns
 * on sits under its row, indented to the label (box 20px = space-5, plus the gap), so nothing else moves.
 */
.check-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.check-rows {
  display: flex;
  flex-direction: column;
}
.check-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
}
.check-rows:first-child > .check-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.check-row:last-child {
  padding-bottom: 0;
}
.check-row .checkbox {
  align-self: flex-start;
  min-height: var(--control-height-xs);
}
.check-row .checkbox__label {
  font: var(--text-b3-medium);
}
.check-row > .field__help,
.check-row__under {
  padding-left: calc(var(--space-5) + var(--space-2));
}
.check-row__under {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-2);
}
/* `checkColumns`: the rows in four columns (two on a narrow screen, one on a phone), each a cell
   with its own `under` fields, so ticking a box only makes its own cell taller */
.check-rows--columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
}
.check-rows--columns > .check-row,
.check-rows--columns > .check-row:first-child {
  border-top: 0;
  padding: 0;
}
@media (max-width: 1100px) {
  .check-rows--columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .check-rows--columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Chip (status) ----------
   Every status in the app looks the same (owner, 23. 10. 2026.): a ring with a dot and the text in the
   colour of the status, no box around it. The tone keeps the meaning (green, yellow, blue, red). */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: var(--text-c1-medium);
  font-weight: 700;
}
.chip::before {
  content: "";
  flex: none;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0 2px, transparent 2.5px);
}
.chip--green {
  color: var(--color-success-text);
}
.chip--yellow {
  color: var(--color-warning-text);
}
.chip--blue {
  color: var(--color-info-text);
}
.chip--red {
  color: var(--color-error-text);
}

/* ---------- Tablica ---------- */
.table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font: var(--text-c1-medium);
}
.table th {
  background: var(--color-bg-muted);
  color: var(--color-text);
  text-align: left;
  padding: var(--space-4);
  white-space: nowrap;
}
/* Naslov stupca koji sortira (SortHeader): cijeli naslov je gumb, strelica pokazuje smjer */
.table th[aria-sort] {
  padding: 0;
}
.table__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-4);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.table__sort:hover,
.table__sort:focus-visible {
  color: var(--color-link);
}
.table__sort-icon {
  display: inline-flex;
  color: var(--color-text-subtle);
}
.table__sort--none .table__sort-icon {
  visibility: hidden;
}
.table__sort:hover .table__sort-icon,
.table__sort:focus-visible .table__sort-icon {
  visibility: visible;
}
.table__sort--ascending .table__sort-icon,
.table__sort--descending .table__sort-icon {
  color: var(--color-link);
}
.table td {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  font: var(--text-c1);
}
/* Jezgra #377, izgled kao HR > Zaposlenici u ERP-u: stanica je u jednom retku, dugi tekst se skraćuje s "…"
   (cijeli tekst je u title atributu, r3.js ga dopisuje kad je tekst skraćen). Samo tablice Corea sa stupcem Rb.
   (.table:has(th.table__rb)): Manager učitava ovaj r3.css, a nema r3.js ni stupca Rb., pa se njegove tablice ne mijenjaju. */
.table:has(th.table__rb) td {
  white-space: nowrap;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Stanice s poljima, izbornicima ili više redaka ne skraćuju se */
.table:has(th.table__rb) td.table__action,
.table:has(th.table__rb) td.table__check,
.table--form:has(th.table__rb) td,
.table--access:has(th.table__rb) td,
.table:has(th.table__rb) td.table__wrap,
.table:has(th.table__rb) td:has(input, select, textarea, .dropdown) {
  max-width: none;
  overflow: visible;
}
.table:has(th.table__rb) td.table__wrap,
.table:has(th.table__rb) td:has(input, select, textarea, .dropdown) {
  white-space: normal;
}
/* Rb. (redni broj retka kroz stranice) i ID zapisa: prva dva stupca, uska, poravnata lijevo kao naslovi */
.table th.table__rb,
.table td.table__rb,
.table th.table__id,
.table td.table__id {
  width: 1%;
  text-align: left;
  white-space: nowrap;
}
.table td.table__rb {
  color: var(--color-text-muted);
}
.table__row--link {
  cursor: pointer;
}
.table__row--link:hover td,
.table__row--link:hover td.table__action {
  background: var(--color-bg-subtle);
}
/* Jezgra #377: svaki redak tablice Corea (sa stupcem Rb.) pod mišem mijenja boju, istom bojom kao redak s pregledom */
.table:has(th.table__rb) tbody tr:hover td,
.table:has(th.table__rb) tbody tr:hover td.table__action {
  background: var(--color-bg-subtle);
}
.table:has(th.table__rb) tbody tr:hover td.table__empty {
  background: none;
}
.table__action,
.table__check {
  width: 1%;
  text-align: center !important;
  white-space: nowrap;
}
/* Stupac akcija ostaje fiksan desno kad se široka tablica pomiče vodoravno */
.table th.table__action,
.table td.table__action {
  position: sticky;
  right: 0;
  z-index: 1;
}
.table td.table__action {
  background: var(--color-bg-surface);
}
/* Strelica u retku (resource.tsx, rowExpand): dijelovi zapisa ispod retka, npr. moduli projekta */
.table__expanded td {
  background: var(--color-bg-subtle);
  border-top: none;
}
/* Odabir redaka za brisanje (resource.tsx, bulkDelete): odabrani redak je zelenkast kao odabrano polje */
.table tbody tr.table__row--selected td,
.table tbody tr.table__row--selected td.table__action,
.table tbody tr.table__row--selected:hover td,
.table tbody tr.table__row--selected:hover td.table__action,
.table:has(th.table__rb) tbody tr.table__row--selected:hover td,
.table:has(th.table__rb) tbody tr.table__row--selected:hover td.table__action {
  background: var(--color-selected-bg);
}
.selection-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}
.delete-counts {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.table__empty {
  text-align: center;
  color: var(--color-text-muted);
}
.table--access td {
  font: var(--text-b3);
}
.table__row--primary td {
  font: var(--text-b3-medium);
}

/* Korisnička prava: moduli i skupine s kvačicom sve / ništa / dio (components/AccessRights.tsx) */
.access {
  display: grid;
  /* Jedan stupac koji smije biti uži od sadržaja: široka tablica klizi u svom okviru, a ne razvlači stranicu (jezgra #410). */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}
.access .muted,
.access .form-error {
  margin: 0;
}
.access-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}
.access-toolbar .btn {
  margin-left: auto;
}
.access-toolbar__hint,
.access-flag__hint {
  margin: 0;
  font: var(--text-c1);
  color: var(--color-text-muted);
}
.access-flag__hint {
  display: block;
}
.access-module__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--control-height);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: var(--text-b3-medium);
  text-align: left;
  cursor: pointer;
}
.access-module__toggle:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.access-module__chevron {
  flex: none;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
}
.access-module__toggle[aria-expanded="false"] .access-module__chevron {
  transform: rotate(-90deg);
}
.table--access .table__row--module td {
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}
.access-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.access-count {
  margin-left: auto;
  font: var(--text-c1);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.table__row--group td {
  background: var(--color-bg-subtle);
}
/* Stablo prava: uvlaka je na prvoj stanici, a u tablici sa stupcem Rb. na prvoj stanici iza njega (jezgra #377).
   Stablo prava u Manageru nema Rb., pa njegova prva stanica zadržava uvlaku. */
.table__row--group td:first-child:not(.table__rb),
.table__row--group td.table__rb + td {
  padding-left: calc(var(--space-4) + var(--space-4));
  font: var(--text-b3-medium);
}
.table__row--child td:first-child:not(.table__rb),
.table__row--child td.table__rb + td {
  padding-left: calc(var(--space-4) + var(--space-8));
}

/* ---------- Prijava ---------- */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  background: var(--color-bg-chrome);
  padding: var(--space-6);
}
.login__logo {
  align-items: center;
}
.login__logo .brand__name {
  font: var(--text-h3);
}
.login__logo .brand__by {
  font: var(--text-b3);
}
.login__languages {
  display: flex;
  gap: var(--space-4);
}
.login__language {
  background: none;
  border: 0;
  padding: 0;
  font: var(--text-b3);
  color: var(--color-text-chrome);
  cursor: pointer;
}
.login__language--selected {
  color: var(--color-text-chrome-strong);
  font: var(--text-b3-medium);
}
.login__card {
  width: min(400px, 100%);
}
.login__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.login__link {
  font: var(--text-b3-medium);
  color: var(--color-action);
  text-align: center;
}

/* ---------- Iznad tablice: filteri lijevo, straničenje desno ----------
   Figma "Search & Filters" (pretraga 320 px, gumb Filter s ikonom, filteri u popupu) i
   "Pagination" (broj redaka, "od", gumbi 40 x 40 s rubom grey-200, trenutna stranica grey-50). */
.list-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.list-toolbar__filters {
  flex: 1 1 320px;
  min-width: 0;
}
.list-toolbar__paging {
  flex: 0 0 auto;
  margin-left: auto;
}
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.filter-bar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.filter-bar__search {
  width: 320px;
  max-width: 100%;
  min-width: 0;
}
.filter-bar__active {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
/* A chosen filter is a removable tag, not a status, so it keeps its box (blue, as before) */
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border: 1px solid var(--blue-500);
  border-radius: var(--radius-sm);
  background: var(--color-info-bg);
  color: var(--color-info-text);
  font: var(--text-c1-medium);
  gap: var(--space-1);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.filter-chip__remove {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: inherit;
  cursor: pointer;
}
.filter-chip__remove:hover {
  background: var(--blue-500);
  color: var(--color-text-on-fill);
}
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pagination__summary {
  font: var(--text-b3);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.pagination__size .select__input {
  width: auto;
}
.pagination__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pagination__btn,
.pagination__current {
  width: var(--control-height);
  height: var(--control-height);
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text);
  font: var(--text-b3-medium);
}
.pagination__btn {
  padding: 0;
  cursor: pointer;
}
.pagination__btn:hover:not(:disabled) {
  background: var(--color-bg-muted);
}
.pagination__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pagination__current {
  background: var(--color-bg-subtle);
}
/* Nova stranica se učitava: stari redovi ostaju vidljivi, ali blijeđi */
.table-wrap--loading {
  opacity: 0.6;
  transition: opacity 0.15s;
}
/* Raspon u popupu filtera (datum od-do, rezultat od-do) */
.range-field {
  border: 0;
  padding: 0;
  margin: 0;
}
.range-field > .field__label {
  padding: 0;
  margin-bottom: var(--space-2);
}
.range-field__inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.range-field__inputs .input {
  flex: 1 1 0;
  min-width: 0;
}
.range-field__inputs .date-field,
.range-field__inputs > .field {
  flex: 1 1 0;
  min-width: 0;
}
.range-field__dash {
  color: var(--color-text-muted);
}

/* ---------- Tablica s kartom (components/MapSplit.tsx) ---------- */
.map-split {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
.map-split__table {
  flex: 1 1 0;
  min-width: 0;
}
/* The handle on the right edge of the table while the map is closed */
.map-split__open {
  flex: none;
  width: 32px;
  margin-left: var(--space-2);
  display: grid;
  place-items: start center;
  padding-top: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
  cursor: pointer;
}
.map-split__open:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}
/* The handle between the table and the map: drag it left or right */
.map-split__handle {
  flex: none;
  width: 16px;
  display: grid;
  place-items: center;
  cursor: col-resize;
  touch-action: none;
}
.map-split__handle:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}
.map-split__grip {
  width: 4px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
}
.map-split__handle:hover .map-split__grip {
  background: var(--color-text-muted);
}
.map-split__map {
  flex: 0 0 33%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.map-split__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.map-split__choice {
  flex: 1 1 auto;
  max-width: 260px;
}
.map-split__sizes {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}
.map-split__size {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text);
  font: var(--text-b3-medium);
  cursor: pointer;
}
.map-split__size:hover {
  background: var(--color-bg-muted);
}
.map-split__size--active,
.map-split__size[aria-pressed="true"] {
  border-color: var(--color-action);
  color: var(--color-action);
}
.map-split__body {
  flex: 1 1 auto;
  display: flex;
  background: var(--color-bg-subtle);
}
.map-split__placeholder {
  margin: auto;
  max-width: 280px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  font: var(--text-b3);
  color: var(--color-text-muted);
}
/* A drawn map (components/MapView.tsx): fills its box; the marker is a pin in the action colour */
.map-view {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  min-height: 240px;
}
.map-view__box {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  /* Leaflet's panes stay under the menus and popups of the application */
  z-index: 0;
}
.map-view__problem {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  text-align: center;
  font: var(--text-b3);
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  z-index: 1;
}
.map-view__marker {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-bg-surface);
  border-radius: 50% 50% 50% 0;
  background: var(--color-action);
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgb(0 0 0 / 40%);
}
/* The rows of the table on the map (lib/mapCluster.ts): a dot per row, a circle with the number of
   rows close together; the picked row is bigger */
.map-view__point--row {
  border: 3px solid var(--color-bg-surface);
  border-radius: 50%;
  background: var(--color-action);
  box-shadow: 0 1px 4px var(--color-shadow);
  cursor: pointer;
}
.map-view__point--selected {
  transform: scale(1.4);
  border-color: var(--color-text);
}
.map-view__cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--color-bg-surface);
  border-radius: 50%;
  background: var(--color-action);
  color: var(--color-bg-surface);
  font: var(--text-b3-medium);
  box-shadow: 0 1px 4px var(--color-shadow);
  cursor: pointer;
}
/* Said over the map instead of the points (a filter with too many of them) */
.map-split__body {
  position: relative;
}
.map-split__note {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text);
  font: var(--text-b3);
  box-shadow: 0 1px 4px var(--color-shadow);
  z-index: 1;
}
/* Mobile: the buttons Tablica / Karta show one or the other */
.map-split--mobile {
  flex-direction: column;
  gap: var(--space-3);
}
.map-split__switch {
  display: flex;
  gap: var(--space-2);
}
.map-split--mobile .map-split__map {
  min-height: 60vh;
}
/* On a computer the open map is as tall as the window below the top bar and stays in view while
   the table scrolls; on a very low window it keeps room for its header buttons */
@media (min-width: 769px) {
  .map-split--open > .map-split__map {
    /* Not stretched to the table's height (the handles next to it still are) */
    align-self: flex-start;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100dvh - var(--topbar-height) - var(--space-4));
    min-height: 320px;
  }
}

/* ---------- Select, textarea, upload ---------- */
.select {
  position: relative;
  display: flex;
  align-items: center;
}
.select__input {
  appearance: none;
  padding-right: var(--space-8);
  cursor: pointer;
}
.select .icon {
  position: absolute;
  right: var(--space-3);
  color: var(--color-text-muted);
  pointer-events: none;
}
/* Odabir s pretragom (components/SearchSelect.tsx): polje kao select, popis ispod njega */
.search-select__control {
  position: relative;
}
.search-select__input {
  padding-right: var(--space-8);
}
.search-select__toggle {
  position: absolute;
  top: 0;
  right: var(--space-2);
  height: var(--control-height);
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.search-select__toggle:disabled {
  cursor: default;
  color: var(--color-text-disabled);
}
.search-select__popover {
  position: fixed;
  z-index: 60; /* above popups (.modal), like the date picker */
  display: flex;
  flex-direction: column;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 var(--space-1) var(--space-4) var(--color-shadow);
  color: var(--color-text);
  overflow: hidden;
}
.search-select__list {
  margin: 0;
  padding: var(--space-1) 0;
  list-style: none;
  max-height: calc(8 * var(--control-height));
  overflow-y: auto;
  scrollbar-width: thin;
}
.search-select__option {
  padding: var(--space-2) var(--space-3);
  font: var(--text-b3);
  cursor: pointer;
}
.search-select__option--active {
  background: var(--color-bg-muted);
}
.search-select__option--selected {
  font: var(--text-b3-medium);
  color: var(--color-action);
}
.search-select__state {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  font: var(--text-b3);
  color: var(--color-text-muted);
}
.search-select__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-top: 1px solid var(--color-border);
  font: var(--text-b3);
  color: var(--color-text-muted);
}
.textarea {
  height: auto;
  padding: var(--space-2) var(--space-3);
  resize: vertical;
}
.field--wide {
  grid-column: 1 / -1;
}
/* A link inside text or a read-only field (e.g. the privacy policy address) */
.text-link {
  color: var(--color-link);
  overflow-wrap: anywhere;
}
.text-link:hover {
  text-decoration: underline;
}
.upload {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  min-width: 0;
}
.upload:hover {
  border-color: var(--green-500);
  color: var(--color-text);
}
.upload--error {
  border-color: var(--red-500);
}
.upload input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.upload__name {
  font: var(--text-b3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The current file of a FileField with an X (Uredi): its picture or name, then the X */
.upload-current {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text);
  min-width: 0;
}
.upload-current .upload__name {
  flex: 1;
}
.upload-current img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.upload-current--removed {
  border-style: dashed;
  border-color: var(--red-500);
  color: var(--color-text-muted);
}
.upload-current--removed .upload__name {
  white-space: normal;
}
.file-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-link);
  font: var(--text-b3-medium);
  text-decoration: none;
}
.file-link:hover {
  text-decoration: underline;
}

/* ---------- Tabovi ---------- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}
.tabs__tab {
  padding: var(--space-3) var(--space-6);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font: var(--text-b3);
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.tabs__tab--active {
  background: var(--color-bg-surface);
  color: var(--color-text);
  font: var(--text-b3-medium);
  border-bottom-color: var(--green-500);
}
/* Suvremeni i Pregledni stil (izgled kao u starom Vortexu): aktivni tab ima donji rub boje fokusa stila. */
[data-style="modern"] .tabs__tab--active,
[data-style="clear"] .tabs__tab--active {
  border-bottom-color: var(--style-focus);
}

/* ---------- Prozor za povezivanje s portalom (Izvori) ---------- */
/* Sekcija "Izravna prijava na portal" na izvoru: stanje veze, uputa i gumb */
.portal-connect {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.portal-connect__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
@media (max-width: 768px) {
  .portal-connect {
    flex-direction: column;
    align-items: stretch;
  }
}
/* Moj profil > Uključivanje Google kalendara (samo super admin): stanje, vrijednosti za kopiranje i
   koraci; naredbe za PowerShell stoje unutar koraka */
.google-setup {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.google-setup__state {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  word-break: break-all;
}
/* Google kalendar (Moj profil, Korisnici): opis i koraci lijevo, status i Testiraj desno */
.google-calendar {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.google-calendar__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.google-calendar__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}
@media (max-width: 768px) {
  .google-calendar {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .google-calendar__side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}
/* Testiraj vezu: a status chip and the outcome of every step */
.google-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.google-check__step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font: var(--text-b3);
}
.google-setup .guide-steps .copy-field {
  margin-top: var(--space-2);
}
/* Prozor "Poveži s portalom": popup preko cijelog ekrana. Gore su adresa i kontrole, ispod je slika
   stranice u stvarnoj veličini (preglednik na serveru ima veličinu ovog okvira), a poruke i izbor
   vrijednosti leže preko slike da ne mijenjaju veličinu okvira. */
.portal__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.portal__bar .input {
  flex: 1;
  min-width: 0;
}
.portal__screen {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-muted);
  /* Povlačenje prstom pomiče stranicu portala, ne ovaj prozor */
  touch-action: none;
}
.portal__screen:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}
.portal__screen img {
  display: block;
  flex: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  /* A tap goes to the portal: no blue flash over the whole picture, no save-image menu */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.portal__loading {
  align-self: center;
  margin: 0;
}
/* Skriveno polje koje prima tipkanje u polje portala: otvara tipkovnicu na mobitelu i nudi
   spremljene prijave preglednika. Stoji na mjestu klika, nevidljivo i ne prima klikove. */
.portal__input {
  position: absolute;
  width: calc(var(--control-height) * 4);
  height: var(--control-height);
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  /* 16 px: iOS ne povećava stranicu kad se polje fokusira */
  font: var(--text-h6);
}
.portal__notes {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
  z-index: 2;
}
.portal__notes .note {
  pointer-events: auto;
  width: 100%;
  max-width: calc(2 * var(--popover-width));
  box-shadow: 0 4px 16px var(--color-shadow);
}
.portal__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-bg-muted);
  text-align: center;
  z-index: 1;
}
.portal__overlay p {
  max-width: var(--popover-width);
  font: var(--text-b3-medium);
}
.portal__select {
  pointer-events: auto;
  width: min(var(--popover-width), 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px var(--color-shadow);
}
.portal__select-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}
.portal__keyboard {
  pointer-events: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--color-shadow);
}

/* Obavijest u okviru (Note): boje statusa kao Chip */
.note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid;
  border-radius: var(--radius-md);
  font: var(--text-b3);
  color: var(--color-text);
}
.note__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.note__close {
  flex: none;
  margin: calc(-1 * var(--space-1)) calc(-1 * var(--space-2)) 0 0;
}
.note--green {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
}
.note--yellow {
  background: var(--color-warning-bg);
  border-color: var(--yellow-500);
}
.note--blue {
  background: var(--color-info-bg);
  border-color: var(--blue-500);
}
.note--red {
  background: var(--color-error-bg);
  border-color: var(--red-500);
}

/* ---------- Popup ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: 50;
}
.modal__box {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px var(--color-shadow);
  width: min(640px, 100%);
  max-height: calc(100vh - 2 * var(--space-6));
  display: flex;
  flex-direction: column;
}
.modal__box--wide {
  width: min(1040px, 100%);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height-xs);
  height: var(--control-height-xs);
  border-radius: 50%;
  border: 0;
  background: var(--color-fill-neutral);
  color: var(--color-text-on-fill);
  cursor: pointer;
}
.modal__body {
  padding: var(--space-5) var(--space-6);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6) var(--space-5);
  border-top: 1px solid var(--color-border);
}
/* Popup preko cijelog ekrana (npr. prozor portala): tanji rubovi, sadržaj dobiva svu preostalu visinu */
.modal--fullscreen {
  padding: 0;
}
.modal__box--fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.modal__box--fullscreen .modal__header,
.modal__box--fullscreen .modal__body,
.modal__box--fullscreen .modal__footer {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.modal__box--fullscreen .modal__body {
  flex: 1;
  min-height: 0;
  gap: var(--space-3);
}
.modal__box--fullscreen .modal__footer {
  align-items: center;
}

/* ---------- Widgeti (sažetak) ---------- */
.widgets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}
@media (max-width: 1200px) {
  .widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.widget {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.widget--wide {
  grid-column: span 2;
}
.widget__title {
  font: var(--text-b3-medium);
  color: var(--color-text-muted);
}
.widget__value {
  font: var(--text-h3);
  color: var(--color-text);
}
.widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.widget__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  font: var(--text-b3);
}
.widget__bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--color-bg-muted);
  overflow: hidden;
}
.widget__bar span {
  display: block;
  height: 100%;
  background: var(--green-500);
}

/* ---------- HW: stanje servera (UP/DOWN), isti izgled kao Chip: krug s točkom i tekst u boji stanja ---------- */
.live {
  --live-color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: var(--text-b3-medium);
  font-weight: 700;
  color: var(--live-color);
  white-space: nowrap;
}
.live__dot {
  flex: none;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0 2px, transparent 2.5px);
}
.live--up {
  --live-color: var(--color-success-text);
}
.live--warning {
  --live-color: var(--color-warning-text);
}
.live--down {
  --live-color: var(--color-error-text);
}
.widget--link {
  cursor: pointer;
}
.result--warn {
  color: var(--color-warning-text);
}
.result--fail {
  color: var(--color-error-strong);
}
.code-line {
  font: var(--text-c1);
  font-family: monospace;
  word-break: break-all;
}

/* HW > Sažetak: three numbers in one row (not 2 + 1 on a laptop); the server cards are in
   styles/modules/hw.css */
.widgets--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.widget--link:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

/* Pregled servera: SSH ključ aplikacije (javni ključ, naredba, Provjeri vezu) */
.ssh-key {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.copy-field__value {
  display: block;
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  user-select: all;
}
.copy-field__actions {
  align-items: center;
}

/* ---------- Početna (pages/Home.tsx) ---------- */
/* Logotip vodi na Početnu (u gornjoj traci vidi se samo na mobitelu, .topbar__logo) */
.brand-link {
  border-radius: var(--radius-sm);
}
.sidebar .brand-link {
  display: inline-flex;
}
.brand-link:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.widgets--home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
@media (max-width: 1200px) {
  .widgets--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.home-widget {
  position: relative;
}
.home-widget:hover {
  box-shadow: 0 0 0 1px var(--color-border);
}
.home-widget__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font: var(--text-h6);
  color: var(--color-text);
}
.home-widget__title .icon {
  color: var(--color-action);
}
/* Cijela kartica je cilj klika poveznice s nazivom modula */
.home-widget__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
}
.home-widget__link:focus-visible {
  outline: none;
}
.home-widget__link:focus-visible::after {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.home-widget__title .home-widget__chevron {
  margin-left: auto;
  color: var(--color-text-subtle);
}
.home-widget__big {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.home-widget__value {
  font: var(--text-b3-medium);
  text-align: right;
  white-space: nowrap;
}
.home-widget__subtitle {
  margin: 0;
  font: var(--text-c1-medium);
  color: var(--color-text-muted);
}
/* AI agenti: the sum of all modules closes each list */
.home-widget__sum {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font: var(--text-b3-medium);
}
.home-widget__failing {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.home-widget__failing-item {
  font: var(--text-b3);
  overflow-wrap: anywhere;
}
.home-widget__ok {
  font: var(--text-b3-medium);
  color: var(--color-success-text);
}
.home-widget__empty,
.home-widget__note {
  font: var(--text-c1);
}
.table td.changelog__name {
  min-width: 160px;
  font: var(--text-c1-medium);
}
.table td.changelog__description {
  min-width: 260px;
}

/* ---------- Povijest ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.timeline__item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font: var(--text-b3);
}
.timeline__item:last-child {
  border-bottom: 0;
}
.timeline__date {
  color: var(--color-text-muted);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.toolbar .select {
  min-width: 200px;
}
.table__num {
  width: 56px;
  color: var(--color-text-muted);
}
.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ---------- Predselekcija i kriteriji ---------- */
.score-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--space-3);
  min-width: 200px;
  color: var(--color-text-muted);
}
.score-list > span {
  display: contents;
}
.score-list strong {
  color: var(--color-text);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.table .chip {
  white-space: nowrap;
}
.table__row--total td,
.table__row--total td.table__action {
  font: var(--text-b3-medium);
  background: var(--color-bg-subtle);
}
.table--form td {
  padding: var(--space-2) var(--space-4);
}
.table--form .input {
  width: 100%;
}
.input--number {
  width: 88px;
  text-align: right;
}
.table__num .input--number {
  width: 88px;
}
.text-error {
  color: var(--color-error-strong);
}
/* Tekst s prijelomima redaka kako ih je napisao AI (npr. sažetak) */
.pre-line {
  white-space: pre-line;
  margin: 0;
}
.table-wrap--scroll {
  max-height: var(--table-scroll-max-height);
  overflow: auto;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: var(--text-b3);
  cursor: pointer;
  align-self: flex-start;
  min-height: var(--control-height);
}
.modal__footer-note {
  margin-right: auto;
  align-self: center;
}
/* Obrazac u popupu (npr. Dodaj administratora): dva stupca, na mobitelu jedan */
.modal__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.modal__form-wide {
  grid-column: 1 / -1;
}
/* Oznaka "vaša tvrtka" uz naziv u popisu tvrtki */
.company-own {
  margin-left: var(--space-2);
}
.progress {
  height: 8px;
  border-radius: 4px;
  background: var(--color-bg-muted);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: var(--color-action);
  transition: width 0.3s ease;
}
/* Prozor napretka uvoza i dugih poslova (components/ProgressWindow.tsx): što se radi, traka, postotak */
.progress-window {
  display: grid;
  gap: var(--space-2);
  min-width: min(420px, 100%);
}
.progress-window__name {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.progress-window__step {
  margin: 0;
}
.progress-window__bar {
  height: 12px;
  border-radius: 6px;
}
.progress-window__bar--error .progress__bar {
  background: var(--color-error-strong);
}
.progress-window__percent {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* Preuzimanje u tijeku (progress-window.js): poveznica je zaključana dok izvoz traje */
a[data-progress-download][aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Korisničke upute (/upute) ----------
   Isti raspored kao aplikacija: sadržaj uputa u tamnom sidebaru, poglavlja kao bijele kartice.
   Napomene u bojama Chipa (plava = savjet, žuta = upozorenje). Ispis (PDF) je na dnu datoteke. */
.guide__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.guide__header {
  max-width: 100%;
}
.guide__search {
  max-width: 480px;
}
.guide__search input {
  min-width: 0;
}
.guide__search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.guide__empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.guide__where {
  font: var(--text-c1-medium);
}
.guide__where-step {
  color: var(--color-text);
}
.guide-chapter,
.guide-section {
  scroll-margin-top: var(--space-4);
}
.guide-section + .guide-section {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
}
.guide-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.guide-chapter .section-title {
  margin: 0;
}
.guide-features + .section-title {
  margin-top: var(--space-3);
}
.guide-text,
.guide-steps,
.guide-list {
  font: var(--text-b3);
  max-width: 72ch;
  margin: 0;
}
.guide-steps,
.guide-list {
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.guide-subtitle {
  font: var(--text-b3-medium);
  color: var(--color-text);
  margin: var(--space-2) 0 0;
}
.guide-fields {
  margin: 0;
  max-width: 96ch;
  display: grid;
  gap: var(--space-2);
}
.guide-fields > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: var(--space-2) var(--space-4);
}
.guide-fields dt {
  font: var(--text-b3-medium);
}
.guide-fields dd {
  margin: 0;
  font: var(--text-b3);
}
.guide-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid;
  border-radius: var(--radius-md);
  font: var(--text-b3);
  color: var(--color-text);
  max-width: 96ch;
}
.guide-note--tip {
  background: var(--color-info-bg);
  border-color: var(--blue-500);
}
.guide-note--tip .icon {
  color: var(--color-info-text);
}
.guide-note--warning {
  background: var(--color-warning-bg);
  border-color: var(--yellow-500);
}
.guide-note--warning .icon {
  color: var(--color-warning-text);
}
/* Naredba za kopiranje u uputama (blok "code"): doslovni tekst, dugi redak se prelama */
.guide-code {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 96ch;
}
.guide-code__text {
  margin: 0;
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font: var(--text-c1);
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.guide-code__actions {
  align-items: center;
}
.guide-features {
  margin: 0;
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font: var(--text-b3);
  max-width: 96ch;
}
.guide-features li > * {
  display: block;
  width: fit-content;
}
.guide-features li::marker {
  font: var(--text-b3-medium);
}
.guide-features a:hover {
  color: var(--color-action-hover);
}
.guide-features__where {
  font: var(--text-c1);
}
.guide__toc .nav-group__items {
  padding-left: var(--space-6);
}
.guide__print-only {
  display: none;
}
@media (min-width: 769px) {
  /* The contents stay in view while the guide scrolls */
  .guide .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    align-self: start;
  }
}

/* ---------- Testovi za kandidate ----------
   Područja i pitanja u obrubljenim blokovima, odgovori s kvačicom "Točan" u retku. */
.test-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.test-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.test-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.option-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.icon-flip {
  display: inline-grid;
  transform: rotate(180deg);
}
/* AI suggestions of areas: chips that are switched on and off */
.chip-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip-toggle {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.chip-toggle:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ChoiceOption: one answer of a choice question (Input Field look; chosen = active input) */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.choice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  font: var(--text-b3);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}
.choice:hover {
  border-color: var(--color-border-strong);
}
.choice:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.choice--checked,
.choice--checked:hover {
  background: var(--color-selected-bg);
  border-color: var(--green-500);
}
.choice .checkbox__box {
  flex: none;
}
.choice--checked .checkbox__box {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--color-text-on-fill);
}
.choice--single .checkbox__box {
  border-radius: 50%;
}
.choice:disabled {
  cursor: default;
}
.choice__label {
  overflow-wrap: anywhere;
}
/* A picture before the label and a short description under it (e.g. Postavke izgleda) */
.choice__media {
  flex: none;
  display: flex;
}
.choice__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.choice__hint {
  font: var(--text-c1);
  color: var(--color-text-muted);
}

/* The candidate's test page (/test/:token): no sidebar, a centred white card */
.public-test {
  min-height: 100vh;
  background: var(--color-bg-app);
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.public-test__header,
.public-test__card {
  width: 100%;
  max-width: var(--reading-width);
}
.public-test__card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font: var(--text-b3);
  color: var(--color-text);
}
.public-test__facts {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.public-test__privacy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.public-test__privacy p {
  margin: 0;
}
.public-test__privacy summary {
  cursor: pointer;
  font: var(--text-b3-medium);
  color: var(--color-link);
}
.public-test__privacy details[open] {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* The online form (/prijava/:key): the test page's card, short sections one under another */
.apply-form__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.apply-form__header h1 {
  margin: 0;
}
.apply-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.apply-form p {
  margin: 0;
}
.apply-form__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.apply-form__section h2 {
  margin: 0;
}
.apply-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.apply-form__questions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.apply-form__files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.apply-form__files li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.apply-form__file-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.apply-form__privacy {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.apply-form__privacy a {
  color: var(--color-link);
}
/* The field only a robot fills in: off the screen, not display:none (robots skip those) */
.apply-form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.apply-form__done {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.apply-form__done h2 {
  margin: 0;
}

/* The public privacy policy (/zastita-podataka): the test page's card, a header with the company,
   the language and the PDF version, and a numbered list of sections */
.policy__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.policy__tools {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.policy__languages {
  display: flex;
  gap: var(--space-3);
}
.policy__language {
  background: none;
  border: 0;
  padding: 0;
  font: var(--text-b3);
  color: var(--color-text-muted);
  cursor: pointer;
}
.policy__language--selected {
  color: var(--color-text);
  font: var(--text-b3-medium);
}
.policy__card {
  overflow-wrap: anywhere;
}
.policy__card p,
.policy__card ul,
.policy__card ol {
  margin: 0;
}
.policy__card ul,
.policy__card ol {
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.policy__heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.policy__heading h1 {
  margin: 0;
}
.policy__contents {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.policy__card a {
  color: var(--color-link);
}
.policy__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  scroll-margin-top: var(--space-4);
}
.policy__section h2 {
  margin: 0;
}
.runner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.runner__top {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-bg-surface);
}
.runner__status {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font: var(--text-b3-medium);
}
.runner__timer {
  color: var(--color-text-secondary);
}
.runner__question {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.runner__text {
  margin: 0;
  font: var(--text-b1);
}
.runner__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.runner__jump {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  font: var(--text-b3);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}
.runner__jump-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.runner__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}
.runner-preview {
  max-width: var(--reading-width);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ---------- Mobitel (do 768 px) ----------
   Izbornik postaje ladica koja se otvara gumbom ☰ u gornjoj traci (Figma: New Design - Mobile),
   blokovi polja idu u jedan stupac, a popup zauzima cijeli ekran. */
@media (max-width: 768px) {
  .shell,
  .shell--collapsed {
    --sidebar-width: 280px;
    --topbar-height: 64px;
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 40;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar--pinned {
    height: auto;
    align-self: auto;
  }
  .shell--drawer .sidebar {
    transform: none;
  }
  .shell--drawer .shell__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    z-index: 30;
  }
  .sidebar__tools {
    display: none;
  }
  .sidebar__close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: var(--space-4);
    border: 0;
    border-radius: 50%;
    background: var(--color-bg-chrome-control);
    color: var(--color-text-chrome-strong);
    cursor: pointer;
  }
  .shell--collapsed .sidebar__logo {
    width: auto;
  }
  .shell--collapsed .nav-group__title span {
    display: inline;
  }
  .shell--collapsed .nav-group__items {
    display: block;
  }
  .shell--collapsed .nav-group__chevron {
    display: block;
  }
  .shell--collapsed .sidebar__version {
    display: block;
  }
  .topbar {
    justify-content: space-between;
    padding: 0 var(--space-4);
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .topbar__menu {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: calc(-1 * var(--space-2));
    border: 0;
    background: none;
    color: var(--color-text-chrome-strong);
    cursor: pointer;
  }
  .topbar__logo {
    display: inline-flex;
    align-items: center;
  }
  .topbar__logo .brand__name {
    font: var(--text-h6);
  }
  .topbar__logo .brand__by {
    font: var(--text-c2);
  }
  .user-menu {
    padding: 0 var(--space-1);
  }
  .user-menu__name,
  .user-menu > .icon,
  .user-menu__toggle .icon,
  .topbar__company {
    display: none;
  }
  .content {
    padding: var(--space-4) var(--space-4) var(--space-6);
  }
  .card {
    padding: var(--space-4);
  }
  .block {
    padding: var(--space-4);
  }
  /* The record's header on a phone (design A1): stacked, the icons stay in the top right corner */
  .record-frame__head {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .record-frame__picture {
    width: 56px;
    height: 56px;
  }
  .record-frame__title {
    flex: none;
    width: 100%;
  }
  .record-frame__corner {
    display: contents;
  }
  .record-frame__divider {
    display: none;
  }
  .record-frame__head .record-frame__icons {
    position: absolute;
    top: var(--space-1);
    right: var(--space-1);
  }
  /* Room for the icons next to the first row (the picture, or the title without one) */
  .record-frame--icons .record-frame__title:first-child .record-frame__over {
    padding-right: 136px;
  }
  .record-frame__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3) var(--space-4);
    padding: var(--space-4);
  }
  .record-frame__band {
    padding-left: var(--space-4);
  }
  .record-frame__rows {
    padding: var(--space-4);
  }
  .record-frame__content {
    padding: var(--space-4);
  }
  .record-frame__content > .block.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3) var(--space-4);
  }
  /* A phone or an e-mail takes the whole row, Kopiraj a finger-sized target at its end */
  .record-frame__body .field--contact {
    grid-column: 1 / -1;
  }
  .contact-value {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
  .contact-value .record-key__copy {
    width: var(--control-height);
    height: var(--control-height);
    margin: calc(-1 * var(--space-2)) 0;
  }
  .grid-3,
  .widgets,
  .widgets--three {
    grid-template-columns: minmax(0, 1fr);
  }
  .widget--wide {
    grid-column: auto;
  }
  .card__actions {
    width: 100%;
  }
  .card__actions .search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .toolbar .select,
  .toolbar .field {
    min-width: 0;
    width: 100%;
  }
  .table th,
  .table td {
    padding: var(--space-3);
  }
  .access-module__toggle {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .access-module__toggle .access-count {
    flex-basis: 100%;
    margin-left: calc(var(--space-4) + var(--space-2));
  }
  .table__row--group td:first-child:not(.table__rb),
  .table__row--group td.table__rb + td {
    padding-left: calc(var(--space-3) + var(--space-3));
  }
  .table__row--child td:first-child:not(.table__rb),
  .table__row--child td.table__rb + td {
    padding-left: calc(var(--space-3) + var(--space-6));
  }
  .modal {
    padding: 0;
  }
  .modal__box,
  .modal__box--wide {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal__body {
    flex: 1;
  }
  .modal__header,
  .modal__body,
  .modal__footer {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  .modal__footer {
    flex-wrap: wrap;
  }
  .modal__footer-note {
    flex-basis: 100%;
  }
  .modal__form {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Prozor portala: slika ide od ruba do ruba (preglednik na serveru nije uži od 360 px), adresa se
     otvara tipkom Enter (Idi) na tipkovnici, a uputa je već uz gumb na izvoru */
  .portal__screen {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .portal__go,
  .portal__help {
    display: none;
  }
  .login {
    padding: var(--space-4);
  }
  .timeline__item {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }
  .guide-chapter,
  .guide-section {
    scroll-margin-top: calc(var(--topbar-height) + var(--space-4));
  }
  .guide-fields > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }
  .guide__search {
    max-width: none;
    min-width: 0;
  }
  .guide__actions {
    gap: var(--space-2);
  }
  /* Test page on a phone: 16 px gutter, full-width card, progress and timer stay on top, Natrag /
     Dalje at the bottom (in the page flow while the keyboard is open), tap targets of 44 px */
  .public-test {
    padding: var(--space-4);
  }
  .public-test__card {
    padding: var(--space-4);
  }
  .apply-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .runner__top {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: var(--space-2) 0;
  }
  .runner__nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: var(--space-3) 0;
    background: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
  }
  .runner__nav--static {
    position: static;
  }
  .runner__nav .btn {
    flex: 1;
  }
  .choice,
  .runner__jump,
  .runner__nav .btn {
    min-height: calc(var(--control-height) + var(--space-1));
  }
  .option-row .input {
    min-width: 0;
  }
  .list-toolbar__filters,
  .list-toolbar__paging {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .filter-bar__search {
    flex: 1 1 100%;
    width: auto;
  }
  /* Na mobitelu: "1–50 od 345" i broj redaka u prvom redu, strelice ispod */
  .pagination {
    justify-content: flex-start;
  }
  .pagination__nav {
    flex: 1 1 100%;
  }
}

/* ---------- Ispis korisničkih uputa (PDF verzija) ----------
   A4, naslovnica i sadržaj, svako poglavlje na novoj stranici. Raspored je blok, ne flex/grid,
   jer prijelomi stranica unutar flex spremnika nisu pouzdani. */
@media print {
  /* Privacy policy: only the text, on white */
  .policy {
    padding: 0;
    background: var(--white);
    display: block;
  }
  .policy__tools,
  .policy__contents {
    display: none !important;
  }
  .policy__card {
    max-width: none;
    padding: 0;
  }
  .policy__section {
    display: block;
    margin-top: var(--space-4);
  }
  .policy__section > * + * {
    margin-top: var(--space-2);
  }
  .policy__section h2 {
    break-after: avoid;
  }
  .policy__card li {
    break-inside: avoid;
  }
  @page {
    size: A4;
    margin: 16mm;
  }
  .guide .sidebar,
  .guide .topbar,
  .guide .shell__overlay,
  .guide__search,
  .guide__screen-only {
    display: none !important;
  }
  .guide,
  .guide .content {
    display: block;
    gap: 0;
    padding: 0;
    min-height: 0;
    background: var(--white);
  }
  body {
    background: var(--white);
  }
  .guide .card {
    padding: 0;
    border-radius: 0;
    display: block;
  }
  .guide .card > * + *,
  .guide-section > * + * {
    margin-top: var(--space-3);
  }
  .guide-section {
    display: block;
    margin-top: var(--space-6);
  }
  .guide-chapter {
    break-before: page;
  }
  .guide-chapter h2,
  .guide-chapter h3,
  .guide-subtitle {
    break-after: avoid;
  }
  .guide-note,
  .guide-fields div,
  .guide li {
    break-inside: avoid;
  }
  .guide * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .guide__print-only {
    display: block;
  }
  .guide__cover {
    padding-top: 30vh;
  }
  .guide__cover > * + * {
    margin-top: var(--space-4);
  }
  .guide__cover-app {
    font: var(--text-h4-bold);
  }
  .guide__cover-title {
    font: var(--text-h2);
  }
  .guide__print-toc {
    break-before: page;
  }
  .guide__cover-subtitle {
    font: var(--text-h4);
    margin-bottom: var(--space-4);
  }
  .guide__print-toc ol {
    list-style: none;
    padding-left: 0;
    font: var(--text-b3);
  }
  .guide__print-toc ol ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-2);
  }
  .guide-features a {
    text-decoration: none;
  }
}

/* ---------- AI termin za intervju (kandidat, odabir termina) ---------- */
.scheduling {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.scheduling__header,
.scheduling__alert,
.scheduling__message-head,
.slot-day__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.scheduling__alert {
  margin: 0;
  font: var(--text-b3);
}
.scheduling__title {
  font: var(--text-b3-medium);
  margin: 0;
}
.scheduling__message {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.scheduling__body {
  overflow-wrap: anywhere;
}
.scheduling__problems,
.scheduling__slot-list {
  margin: 0;
  padding-left: var(--space-5);
}
.slot-picker__toolbar {
  align-items: flex-end;
}
.slot-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.slot-day__header {
  justify-content: space-between;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
}
.slot-grid__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font: var(--text-c1);
}
@media (max-width: 768px) {
  .slot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Povlačenje izvora (Izvori: zadnje povlačenje, povijest) ---------- */
/* Vrijeme i rezultat zadnjeg povlačenja u retku popisa izvora */
.fetch-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}
/* Vrijeme, trajanje i način pokretanja u povijesti povlačenja ostaju u jednom retku */
.table .table__nowrap {
  white-space: nowrap;
}
/* Brojevi u povijesti povlačenja su poravnati desno */
.table th.table__numeric,
.table td.table__numeric {
  text-align: right;
  white-space: nowrap;
}
/* U tablicama Corea sa stupcem Rb. brojevi su kao i ostali stupci poravnati lijevo, naslov i sadržaj jednako (jezgra #377) */
.table:has(th.table__rb) th.table__numeric,
.table:has(th.table__rb) td.table__numeric {
  text-align: left;
}
/* Dnevnik jednog povlačenja (popup s klika na status u povijesti): vrijeme HH:MM:SS i tekst koraka */
.fetch-log {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.fetch-log__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.fetch-log__lines {
  list-style: none;
  margin: 0;
  padding: var(--space-3);
  max-height: 60vh;
  overflow: auto;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: var(--text-b3);
}
.fetch-log__line {
  display: flex;
  gap: var(--space-3);
  padding: 2px 0;
}
.fetch-log__time {
  flex: none;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.fetch-log__text {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Pravila za agenta u pregledu izvora: tekst kakav je upisan, u okviru s vlastitim pomicanjem */
.agent-rules {
  width: 100%;
  min-width: 0;
  max-height: 480px;
  overflow: auto;
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: var(--text-b3);
}
/* Poruka greške ispod statusa povlačenja ne širi tablicu */
.fetch-message {
  min-width: 200px;
  max-width: 360px;
  margin-top: var(--space-1);
  white-space: normal;
}

/* ---------- Modeli AI agenta (the "i" next to Model) ----------
   A panel under the "i", always within the window (position and width from ModelInfo.tsx);
   on a phone the table becomes one block per model with the column name over each value. */
.model-info {
  position: fixed;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow: auto;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px var(--color-shadow);
}
.model-info__title {
  font: var(--text-h6);
  color: var(--color-text);
}
.model-info__table td {
  vertical-align: top;
  padding: var(--space-3);
}
.model-info__table th {
  padding: var(--space-3);
}
.model-info__name,
.model-info__price {
  white-space: nowrap;
}
.model-info__price .muted {
  display: block;
  white-space: normal;
  font: var(--text-c1);
}
.model-info__note {
  font: var(--text-c1);
  color: var(--color-text-muted);
}
@media (max-width: 768px) {
  .model-info__table thead {
    display: none;
  }
  .model-info__table,
  .model-info__table tbody,
  .model-info__table tr,
  .model-info__table td {
    display: block;
    width: 100%;
  }
  .model-info__table tr {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
  }
  .model-info__table td {
    padding: var(--space-1) 0;
    white-space: normal;
  }
  .model-info__table td::before {
    content: attr(data-label);
    display: block;
    font: var(--text-c1);
    color: var(--color-text-muted);
  }
  .model-info__table td.model-info__name::before {
    content: none;
  }
  .model-info__name {
    font: var(--text-b3-medium);
  }
}

/* Kopija bez izmjena iz starog Vortexa (vortex-erp/ecomobile-erp, develop cdcf698ef),
   frontend/src/styles/modules/crm.css, retci 13-44 (ikona s brojem na partneru) i 212-300 (Ponude, Postavke ponuda).
   Iznimka za CSS iz pravila rada v1.09, točka 5. */
.meeting-icons {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.meeting-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
}
.meeting-icon:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}
.meeting-icon__badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--color-action);
  color: var(--color-text-on-fill);
  font: var(--text-c2);
}
/* Postavke ponuda: the logo and the payment details as the offer shows them */
.offer-logo {
  display: block;
  max-width: 240px;
  max-height: 96px;
  object-fit: contain;
}

.payment-details {
  display: grid;
  gap: var(--space-1);
  margin: 0;
}

.payment-details div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.payment-details dt {
  color: var(--color-text-secondary);
  min-width: 140px;
}

.payment-details dd {
  margin: 0;
}

/* The payment barcode: always on white (a scanner reads it in every theme) */
.offer-barcode {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  margin: var(--space-3) 0 0;
}

.offer-barcode img {
  background: var(--white);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  max-width: 100%;
  height: auto;
}

/* CRM > Ponude: Stavke (rows in the form, a table in the view) and the totals under them */
.offer-lines {
  display: grid;
  gap: var(--space-3);
}

.offer-line__title {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.offer-lines__description {
  white-space: pre-line;
}

.offer-totals {
  display: grid;
  gap: var(--space-1);
  margin: 0 0 0 auto;
  min-width: min(100%, 320px);
}

.offer-totals div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

.offer-totals dt {
  color: var(--color-text-secondary);
}

.offer-totals dd {
  margin: 0;
  white-space: nowrap;
}

.offer-totals__total {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font-weight: 600;
}

/* Postavke ponuda: logotip s gumbima za odabir i uklanjanje */
.field__stack {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
}

.field__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}



/* Choice indicator shared with the standalone portal.css bundle. Keep the rules in sync. */
/* #400: one decorative chevron for an existing choice field; no extra control or value. */
:root :is(select:not([multiple]):not([size]), select[size="0"], select[size="1"], .search-select__control > input[type="text"], input[role="combobox"], input[list]) {
  appearance: none;
  padding-right: var(--space-8, 32px);
  background-image:
    linear-gradient(45deg, transparent 43%, var(--color-text-muted, #6b7280) 44% 64%, transparent 65%),
    linear-gradient(135deg, transparent 43%, var(--color-text-muted, #6b7280) 44% 64%, transparent 65%);
  background-position: right 16px center, right 10px center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* Keep existing toggle buttons, their hit areas and keyboard behaviour; don't draw two arrows. */
:root .select:has(> select) > .icon,
:root .search-select__toggle > svg {
  visibility: hidden;
}

/* A read-only view, a locked field and a disabled field must not advertise a choice. */
:root :is(select, .search-select__control > input[type="text"], input[role="combobox"], input[list]):is(:disabled, [readonly], [aria-readonly="true"], [aria-disabled="true"]) {
  background-image: none;
}
:root .search-select__control:has(input:is(:disabled, [readonly], [aria-readonly="true"], [aria-disabled="true"])) > .search-select__toggle {
  visibility: hidden;
}

/* Chromium otherwise draws a second native datalist indicator over the shared chevron. */
:root input[list]::-webkit-calendar-picker-indicator {
  opacity: 0;
}

/* Podijeljeni ekran s kartom (J-EE3, #358). */
/*
 * Podijeljeni ekran s kartom (jezgra #358, J-EE3). Ova pravila idu u r3-ui/v1/r3.css kao zajednička komponenta;
 * prikaz faze 1. Koriste samo tokene iz tokens.css.
 */
.map-split {
  --map-split-width: 33.333%;
  display: flex;
  align-items: stretch;
  min-height: 560px;
  margin-top: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-surface);
}
.map-split__list { flex: 1 1 auto; min-width: 0; padding: var(--space-4); overflow-x: auto; }
.map-split__handle {
  flex: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  cursor: col-resize;
}
.map-split__handle:focus-visible { outline: 2px solid var(--color-action); outline-offset: -2px; }
.map-split__handle--closed { flex-basis: 40px; border-right: 0; cursor: pointer; }
.map-split__handle--closed:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.map-split__map { flex: 0 0 var(--map-split-width); display: flex; flex-direction: column; min-width: 0; }
.map-split__map-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.map-split__map-title { font: var(--text-b3-medium); color: var(--color-text); }
.map-split__choice { flex: 1 1 auto; min-width: 0; max-width: 200px; }
.map-split__choice .select__input { min-width: 120px; }
.map-split__width--on { background: var(--color-selected-bg); border-color: var(--color-action); color: var(--color-text); }
.map-frame {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  text-align: center;
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
}
.map-frame__text { margin: 0; font: var(--text-b3-medium); color: var(--color-text); }
.map-frame__sub { margin: 0; font: var(--text-c1); max-width: 320px; }
.map-frame--detail { height: 420px; margin-top: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.map-split__toggle { display: none; }

/* Mobitel (do 768 px): karta se ne dijeli s tablicom, nego se gumbom Karta / Tablica prebacuje preko cijele širine. */
@media (max-width: 768px) {
  .map-split { min-height: 0; border: 0; border-radius: 0; }
  .map-split__list { padding: 0; }
  .map-split__handle, .map-split__map { display: none; }
  .map-split__toggle { display: inline-flex; }
  .map-split--mobile-map .map-split__map { display: flex; flex-basis: 100%; min-height: 420px; }
  .map-split__map-head .map-split__width { display: none; }
  .map-frame--detail { height: 300px; }
}


.map-split__handle { touch-action: none; }
.map-split [hidden] { display: none; }
@media (min-width: 769px) {
  .map-split--closed .map-split__map { display: none; }
}
@media (max-width: 768px) {
  .map-split--mobile-map .map-split__list { display: none; }
  .map-split__map-head { flex-wrap: wrap; }
}

/* Postavke kartografije (J-EE4, #359). */
.map-providers { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.map-providers__guide { padding: 0 var(--space-5) var(--space-5); }
.map-providers__title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.map-access td, .map-access th { position: relative; }
