/* **************************************************************
   Global styles
**************************************************************** */

:root {
  --rz-base: #1a3e69 !important;
  /* Text na plochách "Base" (plná tlačítka, odznaky). Radzen k přebarvenému pozadí nechal
     výchozí tmavý text (#212121), takže „Zrušit“ v dialogu měl kontrast 1,5 : 1. */
  --rz-on-base: #ffffff !important;
  --rz-primary: #1a3e69 !important;
  --rz-primary-light: #244f87 !important;
  --rz-primary-dark: #102947 !important;
  --rz-primary-text: #ffffff !important;
  --rz-secondary: #1a3e69 !important;
  --rz-primary-lighter: white !important;
  --rz-on-primary-lighter: #1a3e69 !important;
  --rz-selectbar-selected-background-color: #1a3e69 !important;
  --rz-selectbar-selected-color: white !important;
  --rz-link-hover-color: #000000 !important;
  --rz-input-font-size: clamp(12px, 0.8vw + 10px, 18px);
}

/* **************************************************************
   Vzhled — světlý a tmavý motiv

   Barvy vlastní vrstvy stylů jdou schválně přes proměnné: tmavý režim je pak
   jen jiná sada hodnot, ne druhá kopie všech pravidel. U Radzen komponent
   (dialogy, nabídky, tabulky) to takhle nejde, těm theme.js prohodí rovnou
   celý stylopis za material-dark-base.css.

   Přepíná se atributem data-theme na <html>, nastavuje ho theme.js.
   Významové barvy (červená pro chybu, zelená pro online) zůstávají napevno —
   znamenají v obou motivech totéž.
**************************************************************** */

:root {
  --app-page-bg: #f8fafc;
  --app-surface: #ffffff;
  --app-surface-alt: #f5f5f5;
  --app-surface-hover: #e9ecef;
  --app-border: #e5e5e5;
  --app-border-strong: #d1d1d1;
  --app-text: #222222;
  --app-text-secondary: #6c757d;
  --app-text-muted: #9aa0a6;
  --app-text-faint: #cccccc;
  --app-shadow-color: rgba(0, 0, 0, 0.1);
  --app-shadow-color-soft: rgba(0, 0, 0, 0.05);
  --app-overlay: rgba(0, 0, 0, 0.45);

  /* Vlastní bublina v chatu. Nejde na ni pustit --rz-primary: v tmavém motivu je
     firemní modrá světlá a bílý text i překryvy rgba(255,255,255,...) uvnitř bubliny
     by na ní zanikly. Bublina proto zůstává sytá v obou motivech. */
  --app-badge-brand-bg: #1a3e69;
  --app-chat-bubble-me: #1a3e69;
  --app-chat-bubble-me-text: #ffffff;
}

html[data-theme="dark"] {
  --app-page-bg: #151515;
  --app-surface: #1e1e1e;
  --app-surface-alt: #262626;
  --app-surface-hover: #303030;
  --app-border: #383838;
  --app-border-strong: #4a4a4a;
  --app-text: #e0e0e0;
  --app-text-secondary: #a0a0a0;
  --app-text-muted: #8a8a8a;
  --app-text-faint: #5c5c5c;

  /* Na tmavém podkladu je stín sám o sobě neviditelný, musí být výrazně sytější. */
  --app-shadow-color: rgba(0, 0, 0, 0.55);
  --app-shadow-color-soft: rgba(0, 0, 0, 0.4);
  --app-overlay: rgba(0, 0, 0, 0.65);

  --app-badge-brand-bg: #2f5d8f;
  --app-chat-bubble-me: #2f5d8f;
  --app-chat-bubble-me-text: #ffffff;

  /* Firemní modrá #1a3e69 je na tmavém pozadí skoro černá — odkazy i tlačítka by v ní
     zanikly. Motiv proto sáhne po jejím světlejším odstínu; značka zůstane poznat. */
  --rz-base: #6ea8dc !important;
  --rz-on-base: #0d1c2b !important;
  --rz-primary: #6ea8dc !important;
  --rz-primary-light: #8dbde8 !important;
  --rz-primary-dark: #4a86c8 !important;
  --rz-secondary: #6ea8dc !important;
  --rz-selectbar-selected-background-color: #6ea8dc !important;

  /* Text na firemní ploše. Se světlejší modrou přestala bílá stačit, tmavá je čitelná. */
  --rz-primary-text: #0d1c2b !important;
  --rz-on-primary: #0d1c2b !important;
  --rz-selectbar-selected-color: #0d1c2b !important;

  /* "lighter" je podklad pod zvýrazněním. Ve světlém motivu bílá, v tmavém by bílá plocha
     praštila do očí — tlumený modrý nádech dělá totéž, aniž by svítil. */
  --rz-primary-lighter: #22303f !important;
  --rz-on-primary-lighter: #a9c8ea !important;

  /* Odkaz po najetí do černé by na tmavém pozadí zmizel. */
  --rz-link-hover-color: #ffffff !important;

  /* Bootstrap si vede vlastní proměnné a jeho pravidla pro body mají přednost
     před Radzenem. Přebarvením tokenů se srovná i vše, co z nich dědí. */
  --bs-body-color: #e0e0e0;
  --bs-body-bg: #151515;
  --bs-secondary-color: #a0a0a0;
  --bs-emphasis-color: #ffffff;
  --bs-border-color: #383838;
}

.rz-form-field.invalid .rz-icon {
  color: var(--rz-danger) !important;
}

.rz-switch .rz-switch-circle {
  border: 1px solid var(--app-border-strong) !important;
}


html, body {
  font-family: 'Inter', sans-serif;
  /* Bootstrap nastavuje body { color: var(--bs-body-color) } a Radzen to nepřebije —
     svoji barvu dává až přes třídy .rz-*. Bez tohohle řádku by v tmavém motivu zůstal
     všechen běžný text tmavě šedý na tmavém pozadí. */
  color: var(--app-text);
  height: 100%;
  margin: 0;
  z-index: 0;
  scrollbar-gutter: stable;
  background-color: var(--app-page-bg) !important;
}

a {
  color: var(--rz-primary) !important;
  text-decoration: none;
}

.linkI {
  cursor: pointer;
}


.formInput {
  width: 100%;
}

.submitButton {
  width: 100%;
}

/* Cílení termínu: Radzen ve světlém motivu kombinoval tmavou značkovou plochu
   s tmavým textem chipu. Odvozená plocha a motivový text zachovají kontrast v obou režimech. */
.slot-targeting-dropdown .rz-chip,
.mobile-safe-picker-chips .rz-chip {
  background-color: color-mix(in srgb, var(--rz-primary) 14%, var(--app-surface)) !important;
  color: var(--app-text) !important;
}

.slot-targeting-dropdown .rz-chip .rz-button,
.slot-targeting-dropdown .rz-chip .rzi,
.mobile-safe-picker-chips .rz-chip .rz-button,
.mobile-safe-picker-chips .rz-chip .rzi {
  color: inherit !important;
}

/* Filtrovatelný plovoucí dropdown se na iOS zavírá při otevření klávesnice.
   Mobilní dialog používá položky v toku stránky a změna viewportu ho proto neukončí. */
.targeting-native-picker {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.targeting-native-picker-button {
  width: 100%;
  min-height: 48px;
  justify-content: flex-start !important;
  padding-inline-end: 48px !important;
  color: var(--app-text) !important;
  border-color: var(--app-border-strong) !important;
  background: var(--app-surface) !important;
}

.targeting-native-picker-clear {
  position: absolute !important;
  inset-inline-end: 4px;
  top: 50%;
  translate: 0 -50%;
  min-width: 40px !important;
  width: 40px;
  height: 40px;
  color: var(--app-text-muted) !important;
}

.targeting-picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: var(--app-surface);
}

.targeting-picker-search .rzi {
  color: var(--app-text-muted);
}

.targeting-picker-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--app-text);
  font: inherit;
}

.targeting-picker-options {
  max-height: min(46dvh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
}

.targeting-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--app-text);
  cursor: pointer;
}

.targeting-picker-option.is-selected {
  background: color-mix(in srgb, var(--rz-primary) 12%, var(--app-surface));
}

.targeting-picker-option input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  accent-color: var(--rz-primary);
}

.targeting-picker-empty,
.targeting-picker-summary {
  padding: 8px 10px;
  color: var(--app-text-secondary);
  font-size: 0.82rem;
}

.baseTextButton {
  width: 100%;
}

.baseTextButton:hover {
  text-decoration: underline !important;
}

.dangerColor {
  color: var(--rz-danger) !important;
}

.successColor {
  color: #2ecc71 !important;
}

.dangerBgColor {
  background-color: var(--rz-danger) !important;
}

.successBgColor {
  background-color: #2ecc71;
}

.validationMessage {
  color: var(--rz-danger);
  font-size: 0.7rem;
  min-height: 1.2rem; /* Rezervuje výšku pro jeden řádek textu */
  display: block;
}


.rz-form-field-content:has(.invalid) {
  border-color: var(--rz-danger) !important;
}

.rz-form-field-content:has(.invalid) .rz-form-field-start i {
  color: var(--rz-danger) !important;
}

.rz-form-field-content:has(.invalid) .rz-textbox.invalid {
  border: none !important;
  box-shadow: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.listItem {
  cursor: pointer;
  padding: 15px;
  background-color: var(--app-surface);
  border-bottom: 1px solid var(--app-border) !important
}

.listItem:active {
  background-color: var(--app-surface-alt);
}

/* Akce, která teď nejde provést — zůstává vidět i s důvodem, ale nereaguje. */
.listItemDisabled {
  cursor: default;
  opacity: 0.55;
}

.listItemDisabled:active {
  background-color: var(--app-surface);
}


/* Hlavní kontejner řádku */
.swipe-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--app-surface-alt); /* Barva pozadí, která "vykoukne" pod tlačítky (např. šedá nebo bílá) */
  border-bottom: 1px solid var(--app-border);
  height: 75px;
  display: flex;
  align-items: center;
}

/* Vnitřní obsah s bílým pozadím */
.row-content {
  position: relative; /* Nutné pro z-index */
  z-index: 2; /* Vyšší vrstva než tlačítka */
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%; /* Aby bílá barva vyplnila celý řádek */
  padding: 0 15px;
  background-color: var(--app-surface); /* KLÍČOVÉ: Neprůhledné pozadí */
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

/* Skryté akce pod vrchní vrstvou */
.actions-reveal {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  z-index: 1; /* Nižší vrstva - je "pod" row-content */
}

/* Tlačítka */
.action-btn {
  width: 60px;
  height: 100%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--app-surface-alt); /* Světle šedá pro jemný kontrast */
  color: var(--rz-primary);
  transition: background 0.2s;
  cursor: pointer;
}

  .action-btn:hover {
    background: var(--app-surface-hover);
  }

  .action-btn.delete {
    color: #dc3545;
  }

/* STAV PŘI POSUNU */
.swipe-container.expanded .row-content {
  /* Posuneme bílou plochu o šířku odkrytých tlačítek (počet × 60px), viz --reveal-width */
  transform: translateX(calc(-1 * var(--reveal-width, 180px)));
}

.swipe-container.expanded .swipe-chevron {
  opacity: 0; /* Schová šipku, když je to vysunuté */
}

.swipe-chevron {
  color: var(--app-text-faint);
  font-size: 1.5rem;
  transition: opacity 0.2s;
}


/* **************************************************************
   Main layout
**************************************************************** */

.app-container {
  height: 100vh; /* celý viewport */
  display: flex;
  flex-direction: column;
}

/* ==============================================================
   Vrstvení překryvů

   Fixní prvky aplikace: hlavička 2000, drobečková navigace 1600,
   filtrační lišta 1500, tab-bar 1400.

   Radzen má ale dialogy ve výchozím stavu na 1001 (maska 1000,
   notifikace 1002) — dialog se tedy vykresloval POD hlavičkou
   i drobečkovou navigací a jeho horní okraj nebyl vidět.
   Celou překryvnou vrstvu proto posouváme nad chrome aplikace
   a zachováváme její vnitřní pořadí: maska < dialog < notifikace.
   Platí globálně, takže se to týká všech dialogů v aplikaci.
   ============================================================== */
:root {
  --rz-dialog-mask-zindex: 2100;
  --rz-dialog-zindex: 2101;
}

/* Notifikace nemá vlastní proměnnou, přebíjíme třídu. */
.rz-notification {
  z-index: 2102;
}

.fixed-header {
  width: 100%;
  height: 60px;
  position: fixed;
  top: 0;
  z-index: 2000;
  background: var(--app-surface);
  padding: 0px 10px 0px 10px;
  background-color: var(--app-surface) !important;
  border-bottom: none !important;
  box-shadow: 0 1px 3px 0 var(--app-shadow-color), 0 1px 2px -1px var(--app-shadow-color) !important;
}

.fixed-footer {
  height: 60px;
  bottom: 0;
  position: fixed;
  width: 100%;
  z-index: 10;
  background-color: var(--app-surface) !important;
  border-top: none !important;
  /* Záporná hodnota u Y (druhé číslo -4px) vytáhne stín nahoru nad patičku */
  box-shadow: 0 -4px 6px -1px var(--app-shadow-color-soft), 0 -2px 4px -2px var(--app-shadow-color-soft) !important;
  /* Volitelně: jemné vnitřní odsazení, aby text nebyl nalepený na hraně */
  display: flex;
  align-items: center;
}

.content-area {
  padding: 60px 0;
  height: 100dvh;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Breadcrumb zabírá 32px hned pod hlavičkou; posuneme obsah i fixní pruhy stránky o stejnou výšku níž. */
.content-area-with-breadcrumb {
  padding-top: 92px;
}

.content-area-with-breadcrumb .filter-bar,
.content-area-with-breadcrumb .filter-bar-events,
.content-area-with-breadcrumb .tab-bar {
  top: 92px;
}

.content-area-with-breadcrumb .filter-bar-tab {
  top: 152px;
}

.logo {
  object-fit: contain;
  width: 90px;
}

/* Offline / backend-unreachable banner shown at the top of the content area. */
.offline-banner {
  background: var(--rz-warning, #f59e0b);
  color: #1a1a1a;
  padding: 8px 14px;
  border-radius: 8px;
  margin: 8px 10px 0;
}

.offline-banner i {
  color: inherit;
  font-size: 0.95rem;
}

/* Count badge for the standard header chrome icons (todo / notifications) rendered by MainLayout.
   The model-driven HeaderActions component has its own scoped copy of this rule. */
.header-action-badge {
    position: absolute;
    top: 18px;
    right: 2px;
    background: var(--rz-danger);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
}

.icon-header {
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0px !important;
  background-color: var(--app-surface) !important;
  font-size: clamp(1.2rem, 0.98rem + 0.1vw, 1.0625rem);
  color: var(--rz-primary) !important;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.icon-header-detail {
  border: none !important;
  box-shadow: none !important;
  padding: 0px !important;
  background-color: var(--app-surface) !important;
  font-size: clamp(1.2rem, 0.98rem + 0.1vw, 1.0625rem);
  color: var(--rz-primary) !important;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
}

.filterForm .rz-form-field-content {
  border: 0 !important;
  background: transparent !important;
  border-bottom: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}


.rz-form-field-content::after {
  background-color: var(--app-surface) !important;
  height: 2px; /* Zde můžete ovlivnit i tloušťku */
}


.footer-btn {
  background: transparent !important;
  color: var(--rz-secondary) !important;
  font-size: 22px !important;
  border: none !important;
  box-shadow: none !important;
}

.footer-btn i {
  font-size: 20px;
}


.left-col {
  display: flex;
  justify-content: flex-start;
}

.center-col {
  display: flex;
  justify-content: center;
  text-align: center;
}

.right-col {
  display: flex;
  justify-content: flex-end;
}

.detail-title {
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.left-menu-fixed {
  position: sticky;
  top: 60px;
  height: 400px;
  width: 50px;
  max-width: 50px;
  overflow-y: hidden;
  overflow-x: hidden;
}

.menuItem {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  cursor: pointer !important;
}

.menuItem span {
    color: var(--rz-secondary) !important;
    font-size: 22px !important;
    margin: 10px;
}

  /* **************************************************************
   HTML note viewer (RadzenHtmlEditor content)
**************************************************************** */
.html-note-dialog {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

.html-note-content {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--rz-text-color, #222);
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-y: auto;
  flex: 1 1 auto;
  padding-right: 4px;
}

.html-note-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rz-border-disabled-color, #e0e0e0);
}

.html-note-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.html-note-content a {
  color: var(--rz-primary);
}

.html-note-content table {
  width: 100%;
  border-collapse: collapse;
}

.html-note-content table td,
.html-note-content table th {
  border: 1px solid var(--rz-border-disabled-color, #e0e0e0);
  padding: 6px 8px;
}

.html-note-content > *:first-child {
  margin-top: 0;
}

.html-note-content > *:last-child {
  margin-bottom: 0;
}

  /* **************************************************************
   Notifications layout
**************************************************************** */
  .notif-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--app-border);
    cursor: pointer;
  }

  .notif-row.notif-unread {
    background: rgba(var(--rz-primary-rgb, 0, 120, 212), 0.06);
  }

  .notif-toolbar {
    padding: 8px 0;
  }

  .notif-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    margin-top: 4px;
  }

.notif-col {
    width: 100%;
    height: 100%;
}

.notif-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--app-text);
}

.notif-message {
  font-size: 12px;
  color: var(--app-text-secondary);
}

.notif-time {
  font-size: 9px;
  color: var(--app-text-muted);
  white-space: nowrap;
}

.notif-icon {
  width: 100%;
  height: 100%;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fa-solid, .fa-regular {
  color: var(--primary-color);
}

.user-group-icon {
  width: 27px;
  height: 27px;
  -webkit-mask-image: url('images/user-group.svg');
  mask-image: url('images/user-group.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

.user-group-icon-fill {
  display: inline-block;
  width: 27px;
  height: 27px;
  -webkit-mask-image: url('images/user-group-fill.svg');
  mask-image: url('images/user-group-fill.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

/* Ikona sekce "Správa" v hlavní navigaci. Na rozdíl od ostatních položek nejde o SVG masku —
   Material Symbols (font, který už dodává Radzen) má variabilní osu FILL, takže se stejný glyf
   vykreslí obrysově i vyplněně a odpadá potřeba dvou obrázků. Font Awesome by tu nešlo použít:
   kit je verze Free, kde k `fa-solid` chybí protějšek `fa-regular`. */
.manage-icon,
.manage-icon-fill {
  display: inline-block;
  font-family: "Material Symbols";
  font-style: normal;
  line-height: 1;
  width: 27px;
  height: 27px;
  /* Sousední ikony jsou SVG masky s pevnou velikostí 27px, na které font-size nemá vliv.
     Tady velikost určuje font, takže ji musíme protlačit přes `.menuItem span` i `.footer-btn i`,
     které si font-size nastavují samy — jinak by ikona v liště vycházela menší než ostatní. */
  font-size: 27px !important;
  /* Ligatura ("admin_panel_settings" -> glyf) se nesmí rozpadnout na písmena. */
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  /* Bez optimizeLegibility se ligatura neaplikuje a místo ikony se vypíše celý název. */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.manage-icon {
  font-variation-settings: 'FILL' 0;
}

.manage-icon-fill {
  font-variation-settings: 'FILL' 1;
}

.gear-icon {
  display: inline-block;
  width: 25px;
  height: 25px;
  -webkit-mask-image: url('images/fa-gear.svg');
  mask-image: url('images/fa-gear.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

.gear-icon-fill {
  display: inline-block;
  width: 25px;
  height: 25px;
  -webkit-mask-image: url('images/fa-gear-fill.svg');
  mask-image: url('images/fa-gear-fill.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

/* **************************************************************
   Login layout
**************************************************************** */

.fade-in-logo {
  animation: fadeIn 3s ease-in-out; /* 2 sekundy trvání */
}


/* **************************************************************
   Home layout
**************************************************************** */

.item-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px var(--app-shadow-color);
  border-color: transparent;
}

.filter-bar-events {
  width: 100%;
  height: 100px;
  position: fixed;
  top: 60px;
  z-index: 1500;
  background-color: var(--app-page-bg) !important;
}

.filter-bar-tab {
  top: 120px;
}

.filter-bar {
  width: 100%;
  position: fixed;
  top: 60px;
  z-index: 1500;
  background-color: var(--app-page-bg) !important;
}

/* Přepínač seznam/kalendář na stránce událostí: první prvek v toku pod fixní filtrační lištou,
   takže mezi hlavičkou a hledáním nezůstane při odrolování prázdné místo. */
.events-view-switcher {
  width: 100%;
  height: 44px;
  margin-top: 44px;
}

.tab-bar {
  width: 100%;
  top: 60px;
  z-index: 1400;
  position: sticky;
  background-color: var(--rz-grid-cell-background-color, var(--app-surface));
}

.rz-tabview-panel {
    padding: 0 !important
}

.rz-tabview-title {
    text-transform: none !important
}

.eventImage {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}

.user-add-icon {
  display: inline-block;
  width: 27px;
  height: 27px;
  -webkit-mask-image: url('images/user-add.svg');
  mask-image: url('images/user-add.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

.tags-icon {
  display: inline-block;
  width: 27px;
  height: 27px;
  -webkit-mask-image: url('images/tags.svg');
  mask-image: url('images/tags.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

.tags-fill-icon {
  display: inline-block;
  width: 28px;
  height: 25px;
  -webkit-mask-image: url('images/tags-fill.svg');
  mask-image: url('images/tags-fill.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

.user-add-icon:hover {
  display: inline-block;
  width: 28px;
  height: 25px;
  -webkit-mask-image: url('images/user-add-fill.svg');
  mask-image: url('images/user-add-fill.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-size: contain;
  background-color: currentColor;
}

.eventInfoLabel {
    font-size: 10px;
}

.columnTextVerticalCenter {
  display: flex;
  align-content: center;
  flex-wrap: wrap;
}

.eventTitle {
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.eventTitle:hover {
    text-decoration: underline;
}

.subTitleIcon {
  color: gray;
  font-size: 12px;
}

.eventSelectBar {
  padding: 0px 30px !important;
  align-content: center !important;
}


/* **************************************************************
   Auth layout
**************************************************************** */

.contentform {
  max-width: 500px;
  margin: 0px auto;
  padding: 10px 15px;
  width: 100%;
}

.logoAuthLayout {
  width: 250px;
  margin-bottom: 30px;
}

.validationMessageBox {
  min-height: 30px;
}

.titleAuthName {
  letter-spacing: 10px;
  margin-bottom: 10px;
}



/* **************************************************************
   Persons
**************************************************************** */

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--app-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-icon {
  font-size: 30px;
}


/* **************************************************************
   User Settings
**************************************************************** */

.anonym-picture-mars {
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0px !important;
  background-color: var(--app-surface) !important;
  width: clamp(80px, 12vw, 150px);
  height: clamp(80px, 12vw, 150px);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--rz-primary) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.venusColor {
  color: deeppink !important;
}

.marsColor {
  color: var(--rz-primary) !important;
}

.anonym-picture-venus {
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0px !important;
  background-color: var(--app-surface) !important;
  width: clamp(80px, 12vw, 150px);
  height: clamp(80px, 12vw, 150px);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: deeppink !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.person-image-detail {
  border-radius: 50%;
  width: clamp(80px, 12vw, 150px);
  height: clamp(80px, 12vw, 150px);
  object-fit: cover;
  box-shadow: var(--rz-shadow-2);
}


/* **************************************************************
   Upload image
**************************************************************** */

.upload-container {
  height: 100%;
  min-height: 400px;
  margin: 20px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 1rem;
}

.upload-icon {
  font-size: 3.5rem;
  color: var(--app-text-muted);
}

.upload-hint {
  font-size: clamp(1rem, 1.25vw, 1.5rem);
  color: var(--app-text-muted);
  margin: 0;
}

.uploadButton {
  border: 1px solid var(--app-border);
}

.cropper-fullscreen {
  width: 100%;
  height: calc(100vh - 80px);
}

.cropper-actions {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
}


/* **************************************************************
   Team
**************************************************************** */

.member-row {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--rz-border-color);
}

  .member-row:last-child {
    border-bottom: none;
  }

  .member-row.selected {
    background: var(--rz-primary-lighter);
  }


/* **************************************************************
   Utilities
**************************************************************** */

.text-muted     { color: var(--app-text-muted); }
.text-secondary { color: var(--app-text-secondary); }
.text-primary   { color: var(--rz-primary); }
.text-warning   { color: var(--rz-warning); }
.fw-semibold    { font-weight: 600; }
.fw-bold        { font-weight: 700; }
.w-full         { width: 100%; }
.w-auto         { width: auto; }
.flex-1         { flex: 1; }
.m-0            { margin: 0; }
.mb-8           { margin-bottom: 8px; }
.mb-16          { margin-bottom: 16px; }
.mt-8           { margin-top: 8px; }
.min-w-auto     { min-width: auto !important; }
.rel            { position: relative; }
.page-pad       { padding: 16px; }


/* **************************************************************
   Empty states
**************************************************************** */

.empty-state {
  text-align: center;
  padding: 40px 0;
}

.empty-state-icon {
  font-size: 40px;
  color: var(--app-text-muted);
}

.empty-state-lg {
  padding: 48px 16px;
  text-align: center;
}

.empty-state-icon-lg {
  font-size: 48px;
  color: var(--app-text-muted);
}


/* **************************************************************
   Info card — light-background panel used in forms/detail pages
**************************************************************** */

.info-card {
  padding: 10px 14px;
  background: var(--app-surface-alt);
  border-radius: 8px;
}


/* **************************************************************
   Form section title (separates form groups)
**************************************************************** */

.form-section-title {
  padding: 8px 10px 0;
  font-weight: 700;
}

.form-section-title--lg {
  padding: 16px 10px 0;
  font-weight: 700;
}


/* **************************************************************
   Section / field label — small caption above a dropdown or field group
**************************************************************** */

.section-label {
  color: var(--app-text-muted);
  margin: 0 0 4px;
}


/* **************************************************************
   Search icon inside a filterForm field start slot
**************************************************************** */

.search-icon {
  color: gray;
  padding-left: 10px;
  padding-right: 20px;
}


/* **************************************************************
   Segment / toggle control bar (type switcher)
**************************************************************** */

.segment-control {
  background: var(--app-surface-alt);
  border-radius: 8px;
  padding: 4px;
}


/* **************************************************************
   Requirement list row
**************************************************************** */

.req-row {
  width: 100%;
  border-bottom: 1px solid var(--app-border);
}


/* **************************************************************
   Qualification filter panel
**************************************************************** */

.qual-filter-card {
  padding: 12px 16px;
  border-radius: 12px;
}

/* Poznámka k požadovanému atributu na přihlašovacím formuláři — má být čitelná,
   ale nesmí přebít název pozice a tlačítko pro přihlášení. */
.position-requirement-note {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--app-surface-alt);
  border-left: 3px solid var(--rz-info, #3b82f6);
  color: var(--rz-text-secondary-color, #5f6368);
}

.position-requirement-note i {
  color: var(--rz-info, #3b82f6);
  font-size: 0.75rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Vložený výběr atributů funguje spolehlivě i v MAUI WebView na iOS.
   Nepoužívá popup, který se při otevření klávesnice může samovolně zavřít. */
.position-attribute-picker {
    margin: 0 10px;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
}

.position-attribute-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--app-border);
}

.position-attribute-search .rzi {
    flex: 0 0 auto;
    color: var(--app-text-muted);
}

.position-attribute-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--app-text);
    font: inherit;
}

.position-attribute-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 2px;
}

.position-attribute-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 6px 9px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rz-primary) 14%, transparent);
    color: var(--rz-primary);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
}

.position-attribute-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.position-attribute-options {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
}

.position-attribute-option {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.position-attribute-option.is-selected {
    background: color-mix(in srgb, var(--rz-primary) 10%, transparent);
}

.position-attribute-option input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    accent-color: var(--rz-primary);
}

.position-attribute-empty,
.position-attribute-summary {
    padding: 10px 12px;
    color: var(--app-text-muted);
    font-size: 0.82rem;
}

.position-attribute-summary {
    border-top: 1px solid var(--app-border);
}

/* Každé kritérium má vlastní ohraničený blok, aby bylo na první pohled vidět,
   který chip patří ke které sekci. */
.filter-section {
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 8px 10px 10px;
  margin-bottom: 10px;
  background: var(--app-surface);
}

.filter-section:last-of-type {
  margin-bottom: 0;
}

.filter-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rz-text-secondary-color, #5f6368);
}

.filter-section-title i {
  color: var(--rz-primary);
  font-size: 0.78rem;
}

/* Počet vybraných hodnot v dané sekci — drží se vpravo. */
.filter-section-count {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--rz-primary-text, #fff);
  background: var(--rz-primary);
  border-radius: 10px;
  padding: 1px 7px;
  letter-spacing: 0;
}

.filter-section-hint {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rz-text-disabled-color);
}

/* Podskupiny atributů jsou o úroveň níž — menší, světlejší a odsazené. */
.qual-category-label {
  color: var(--rz-text-disabled-color);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  margin: 6px 0 3px 2px;
  padding-left: 8px;
  border-left: 2px solid var(--app-border);
  display: block;
}

.qual-filter-count-bar {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rz-border-disabled-color);
}


/* **************************************************************
   Chat
**************************************************************** */

.chat-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-search-bar {
  padding: 8px 14px;
  border-bottom: 1px solid var(--app-border);
}

.chat-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0;
}

.chat-settings-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
}

.chat-input-bar {
  padding: 8px 14px;
  border-top: 1px solid var(--app-border);
  background: var(--rz-base-background);
}

.chat-context-bar {
  padding: 6px 14px;
  background: var(--app-surface-alt);
  border-top: 2px solid var(--rz-primary);
}

.chat-desktop-bar {
  padding: 4px 10px;
  border-bottom: 1px solid var(--app-border);
  background: var(--rz-base-background);
}

.chat-member-list {
  max-height: 320px;
  overflow-y: auto;
  margin: 0 -4px 4px;
  padding: 0 4px;
}

.chat-member-row {
  padding: 10px 0;
  cursor: pointer;
}

.chat-search-result {
  padding: 10px 14px;
  border-bottom: 1px solid var(--app-border);
}

.chat-section-sep {
  margin-top: 24px;
  border-top: 1px solid var(--app-border);
  padding-top: 16px;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.chat-msg-time   { color: var(--app-text-muted); font-size: 0.72rem; }
.chat-msg-edited { color: var(--app-text-muted); font-size: 0.65rem; font-style: italic; }

.chat-read-ticker {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
}

.chat-read-count { font-size: 0.62rem; color: var(--app-text-muted); }

.chat-read-popup {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 8px 10px;
  margin-top: 2px;
  min-width: 190px;
}

.chat-read-popup-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--app-text-secondary);
  margin-bottom: 6px;
}

.chat-read-popup-empty { font-size: 0.78rem; color: var(--app-text-muted); }

.chat-read-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.chat-read-popup-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.chat-read-popup-time { font-size: 0.7rem; color: var(--app-text-muted); white-space: nowrap; }

.chat-action-btns { display: flex; gap: 2px; }

.chat-no-results {
  color: var(--app-text-muted);
  display: block;
  text-align: center;
  padding: 16px 0;
}

.chat-person-chip {
  padding: 6px 10px;
  background: var(--app-surface-alt);
  border-radius: 8px;
}

.chat-person-chip--link {
  padding: 6px 10px;
  background: var(--app-surface-alt);
  border-radius: 8px;
  cursor: pointer;
}

/* Chat profile overlay */
.chat-profile-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--app-overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.chat-profile-card {
  background: var(--app-surface);
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  position: relative;
}

.chat-profile-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: auto;
  border-radius: 50%;
}

.chat-profile-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.chat-profile-icon-wrap {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--rz-primary-lighter, #e8f0fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.chat-profile-icon     { font-size: 2.6rem; color: var(--rz-primary); }
.chat-profile-name     { font-weight: 700; margin: 0; text-align: center; }
.chat-profile-icon-col { color: var(--rz-primary); min-width: 20px; }
.chat-profile-label    { color: var(--app-text-muted); margin: 0; }
.chat-profile-value    { margin: 0; }
.chat-profile-value--break { margin: 0; word-break: break-all; }

.chat-profile-copy-btn {
  min-width: auto;
  margin-left: auto;
  border-radius: 50%;
  color: var(--app-text-muted);
}

/* Kopírovací tlačítko uvnitř RadzenFormField (slot End) — stejný vzhled jako v kartě osoby v chatu. */
.field-copy-btn {
  min-width: auto;
  margin-right: 6px;
  border-radius: 50%;
  color: var(--app-text-muted);
}

.chat-conv-item { width: 100%; padding: 10px 14px; }

.chat-avatar           { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.chat-avatar img       { width: 100%; height: 100%; object-fit: cover; }
.chat-avatar-initials  { display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: #fff; }

/* **************************************************************
   Todo tab buttons with badge
**************************************************************** */

/* Přepínač "Moje úkoly" / "Zadané ostatním" je o úroveň výš než filtr pod ním
   (Aktivní / Vše / Dokončené). Proto záměrně jiný tvar: obě půlky přes celou šířku
   a podtržení místo orámovaného pilulkového tlačítka — aby těch pět tlačítek pod
   sebou nepůsobilo jako jedna řada na stejné úrovni. */

.task-tabs {
    display: flex;
    gap: 4px;
    padding: 0 2px;
    margin-bottom: 6px;
    border-bottom: 2px solid var(--app-border);
}

.task-tab {
    /* Každá záložka zabere přesně půlku šířky, ať je dvojice čitelná jako celek. */
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 10px;
    border: 0;
    border-bottom: 3px solid transparent;
    /* Podtržení aktivní záložky překryje společnou linku pod celou lištou. */
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: var(--app-text-secondary);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.task-tab:hover:not(.active) {
    background: var(--app-surface-alt);
    color: var(--app-text);
}

.task-tab.active {
    background: var(--app-surface-alt);
    border-bottom-color: var(--rz-primary, #357abd);
    color: var(--rz-primary, #357abd);
    font-weight: 700;
}

.task-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

/* **************************************************************
   Breadcrumb navigation
**************************************************************** */

.breadcrumb-trail {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 12px;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--rz-text-secondary-color, #555);
    background: var(--app-surface-alt);
    border-bottom: 1px solid var(--app-border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Pevně přišpendlený hned pod hlavičkou (60px), aby ho nepřekryl fixní filter-bar/tab-bar stránky. */
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    z-index: 1600;
}

.breadcrumb-trail::-webkit-scrollbar {
    display: none;
}

.breadcrumb-link {
    white-space: nowrap;
    color: var(--rz-primary, #1a3e69);
    cursor: pointer;
    flex-shrink: 0;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--app-text-faint);
    flex-shrink: 0;
    font-size: 0.8rem;
    line-height: 1;
}

.breadcrumb-current,
.breadcrumb-static {
    white-space: nowrap;
    color: var(--rz-text-color, #333);
    font-weight: 500;
    flex-shrink: 0;
}

.breadcrumb-ellipsis {
    white-space: nowrap;
    color: var(--app-text-faint);
    flex-shrink: 0;
}

/* **************************************************************
   UpdateRequiredScreen
**************************************************************** */

.update-screen-outer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 32px;
  text-align: center;
  background-color: var(--app-surface-alt);
}

.update-screen-wrap    { max-width: 360px; }
.update-screen-logo    { width: 120px; margin-bottom: 32px; }

.update-screen-icon {
  font-size: 56px;
  color: #dc3545;
  display: block;
  margin: auto;
  margin-bottom: 20px;
}

.update-screen-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--app-text);
  margin-bottom: 12px;
}

.update-screen-body {
  color: var(--app-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.update-screen-version { color: var(--app-text-muted); font-size: 0.75rem; margin: 0; }

/* ── Presence (online/offline) ─────────────────────────────────── */
.presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  /* Ring keeps the dot readable when overlaid on avatars/coloured rows. */
  box-shadow: 0 0 0 2px var(--app-surface);
}

.presence--online .presence-dot { background: #28a745; }
.presence--offline .presence-dot { background: #b7bcc2; }

.presence-label { font-size: 0.75rem; line-height: 1; }
.presence--online .presence-label { color: #28a745; }
.presence--offline .presence-label { color: var(--app-text-muted); }

/* Řádek s přepínačem vzhledu v nastavení. Na rozdíl od ostatních položek nikam nevede,
   proto bez ukazovátka. Na úzkém displeji se přepínač zalomí pod popisek. */
.theme-row {
  cursor: default;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.theme-row-select {
  flex-shrink: 0;
}

/* Logo je tmavě modrá kresba na průhledném pozadí, takže na tmavém podkladu splyne.
   Světlá varianta (logoNew-dark.png) se prohodí přes `content`. Všechna místa v aplikaci
   vykreslují <img>, proto stačí jediné pravidlo podle src — přihlašovací obrazovka,
   hlavička, úvodní načítání i obrazovka aktualizace se chytnou samy.
   Relativní cesta se počítá vůči tomuhle souboru, tedy _content/CrewlioApp.Shared/. */
html[data-theme="dark"] img[src$="logoNew.png"] {
  content: url("logoNew-dark.png");
}

/* **************************************************************
   Přihlašování biometrikou
**************************************************************** */

/* Upozornění v nabídce zapnutí. Zapnutí na cizím telefonu dá jeho majiteli přístup
   k účtu, takže text musí být vidět, ne schovaný v drobném písmu pod tlačítkem. */
.biometric-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--app-surface-alt);
  border-left: 3px solid var(--rz-warning);
}

.biometric-warning .rzi {
  color: var(--rz-warning);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Sekce se seznamem zařízení. Na rozdíl od ostatních položek nikam nevede. */
.device-section {
  cursor: default;
  display: block;
}

.device-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--app-border);
}

.device-row:last-child {
  border-bottom: none;
}

/* **************************************************************
   Podmínky zpracování osobních údajů
**************************************************************** */

/* Text je právní dokument z HTML editoru — potřebuje čitelné odstavce a nadpisy,
   ale nesmí rozbít šířku stránky (dlouhé odkazy, vložené tabulky). */
.gdpr-content {
    color: var(--app-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.gdpr-content h1,
.gdpr-content h2,
.gdpr-content h3,
.gdpr-content h4 {
    margin: 1.2em 0 0.4em;
    line-height: 1.3;
}

.gdpr-content h1 { font-size: 1.35rem; }
.gdpr-content h2 { font-size: 1.2rem; }
.gdpr-content h3 { font-size: 1.05rem; }
.gdpr-content h4 { font-size: 0.95rem; }

.gdpr-content p { margin: 0 0 0.8em; }

.gdpr-content ul,
.gdpr-content ol {
    margin: 0 0 0.8em;
    padding-left: 1.4em;
}

.gdpr-content li { margin-bottom: 0.3em; }

.gdpr-content a { color: var(--rz-primary); }

.gdpr-content blockquote {
    margin: 0 0 0.8em;
    padding: 0.4em 0.9em;
    border-left: 3px solid var(--app-border-strong);
    color: var(--app-text-secondary);
}

/* Vložená tabulka se posouvá uvnitř sebe, ať stránka nezíská vodorovný posuvník. */
.gdpr-content table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0 0 0.8em;
}

.gdpr-content th,
.gdpr-content td {
    border: 1px solid var(--app-border);
    padding: 6px 10px;
    text-align: left;
}

/* Nadpis skupiny uvnitř rozcestníku (CompanyHub). Odděluje řádky, které patří firmě,
   od řádků, které patří aplikaci — bez toho by sedmi řádky splynuly v jeden seznam. */
.hub-section-title {
  margin: 20px 0 0;
  padding: 0 15px 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--app-text-muted);
}

/* Vysvětlivka pod položkou, která vede ven z aplikace. */
.hub-note {
  margin: 8px 0 0;
  padding: 0 15px;
  color: var(--app-text-muted);
}

/* **************************************************************
   Uživatelská příručka (Manual.razor)

   Obsah přichází ze serveru jako úryvek HTML bez vlastních stylů — vzhled mu dává až
   aplikace tady. Díky tomu se příručka drží motivu (světlý i tmavý) a text se dá na
   serveru upravovat bez znalosti našich tříd: stačí běžné h2/p/ul.
**************************************************************** */
.manual-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--app-text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.manual-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 28px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border);
}

.manual-content h2:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 8px;
}

.manual-content p {
  margin: 8px 0;
}

.manual-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.manual-content li {
  margin: 5px 0;
}

.manual-content em {
  color: var(--app-text-secondary);
  font-style: normal;
  font-weight: 600;
}

/* Úvodní odstavec — trochu větší, ať je vidět, o čem příručka je. */
.manual-lead {
  font-size: 1rem;
  color: var(--app-text-secondary);
  margin: 0 0 8px;
}

/* Doplňující informace. */
.manual-note {
  border-left: 3px solid var(--rz-primary);
  background: var(--app-surface-alt);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin: 12px 0;
}

/* Upozornění na nevratnou akci nebo na to, co se dá snadno pokazit. */
.manual-warning {
  border-left: 3px solid var(--rz-warning);
  background: var(--app-surface-alt);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin: 12px 0;
}

.manual-content h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 16px 0 4px;
  color: var(--rz-primary);
}

/* Řetěz stavů. Na úzkém displeji se zalomí místo vodorovného posuvu. */
.manual-flow {
  background: var(--app-surface-alt);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.9;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Rozbalovací kapitoly příručky. Sbalené fungují jako obsah — na jedné obrazovce je vidět,
   co příručka obsahuje, bez posouvání přes celý text. */
.manual-section {
  border: 1px solid var(--app-border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--app-surface);
  overflow: hidden;
}

.manual-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.manual-section-head:active {
  background: var(--app-surface-alt);
}

.manual-section-body {
  padding: 0 14px 12px;
  border-top: 1px solid var(--app-border);
}

/* Uvnitř kapitoly už nadpis druhé úrovně není — jeho roli přebral hlavička kapitoly.
   Proto se ruší odsazení a linka, kterou má nadpis v souvislém textu. */
.manual-section-body > *:first-child {
  margin-top: 12px;
}

.manual-clear {
  cursor: pointer;
  padding: 0 10px;
  color: var(--app-text-muted);
}

/* Výběr s jedinou možností: zůstává vidět a čitelný, ale nejde do něj zasáhnout.
   Radzen ReadOnly u dropdownu rozbalení nabídky sám nezabrání, a vlastní `class`
   předaná komponentě jí přebije její vlastní třídy — proto zámek až na obalu. */
.orgPicker,
.orgPicker > .rz-form-field {
  width: 100%;
}

.orgPickerLocked {
  pointer-events: none;
}

.orgPickerLocked .rz-dropdown-trigger {
  opacity: 0.4;
}

/* Chat safety uses the shared surface, text and brand colors in both themes. */
.chat-wrap > .chat-safety-panel { flex-shrink: 0; max-height: 70%; overflow-y: auto; overscroll-behavior: contain; }
.chat-safety-panel { border-bottom: 1px solid var(--app-border); background: var(--app-surface); }
.chat-safety-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; background: transparent; color: var(--app-text); text-align: left; cursor: pointer; font: inherit; }
.chat-safety-toggle:hover { background: var(--app-surface-hover); }
.chat-safety-toggle:focus-visible, .chat-safety-links a:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: -2px; }
.chat-safety-symbol { display: inline-flex; flex: 0 0 40px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; color: var(--rz-primary); background: var(--app-surface-alt); background: color-mix(in srgb, var(--app-badge-brand-bg) 10%, var(--app-surface)); }
.chat-safety-symbol--muted { background: var(--app-surface-alt); color: var(--app-text-secondary); }
.chat-safety-heading { flex: 1; min-width: 0; display: grid; gap: 3px; }
.chat-safety-heading strong { font-size: 14px; font-weight: 600; }
.chat-safety-heading small { color: var(--app-text-secondary); font-size: 12px; }
.chat-safety-body { padding: 4px 16px 16px; display: grid; gap: 16px; }
.chat-safety-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.chat-safety-card { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--app-border); border-radius: 12px; background: var(--app-surface); }
.chat-safety-card-heading { display: flex; align-items: flex-start; gap: 10px; }
.chat-safety-card h3, .chat-safety-report h3, .chat-safety-empty h3 { margin: 0; color: var(--app-text); font-size: 16px; font-weight: 600; line-height: 1.4; }
.chat-safety-card-heading p { margin: 4px 0 0; font-size: 12px; color: var(--app-text-secondary); line-height: 1.5; }
.chat-safety-field { width: 100%; min-width: 0; }
.chat-safety-field textarea { resize: vertical; min-height: 88px; }
.chat-safety-hint { margin: 0; font-size: 12px; line-height: 1.6; color: var(--app-text-secondary); }
.chat-safety-action { margin-top: auto; align-self: flex-start; }
.chat-safety-effects { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.chat-safety-effects li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; color: var(--app-text-secondary); }
.chat-safety-effects .rzi { font-size: 20px; margin-top: 1px; flex-shrink: 0; }
.chat-safety-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.chat-safety-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 8px; border-radius: 8px; color: var(--app-text-secondary); font-size: 12px; font-weight: 500; text-decoration: none; }
.chat-safety-links a:hover { background: var(--app-surface-hover); color: var(--app-text); }
.chat-safety-links .rzi { font-size: 18px; }
.chat-safety-nav { padding: 4px 8px 10px; }
/* Odkazy pod fixní filtrační lištou (hledání konverzace) — 40px je výška lišty, kterou
   nezabírá v toku. Stejnou hodnotu používají ostatní stránky s .filter-bar. */
.chat-safety-nav--under-filter { margin-top: 40px; }
.chat-safety-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--app-surface-alt); background: color-mix(in srgb, var(--rz-primary) 8%, var(--app-surface)); border: 1px solid var(--app-border); border-radius: 10px; color: var(--app-text); font-size: 13px; line-height: 1.6; }
.chat-safety-notice .rzi { flex-shrink: 0; color: var(--rz-primary); }
.chat-safety-notice--error { border-color: var(--rz-danger); }
.chat-safety-notice--error .rzi { color: var(--rz-danger); }
.chat-safety-page { width: 100%; max-width: 960px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; color: var(--app-text); }
.chat-safety-intro { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border: 1px solid var(--app-border); border-radius: 14px; background: var(--app-surface); }
.chat-safety-intro h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.4; font-weight: 600; }
.chat-safety-intro p { margin: 0; color: var(--app-text-secondary); font-size: 13px; line-height: 1.7; }
.chat-safety-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.chat-safety-section-label { display: flex; align-items: center; gap: 8px; color: var(--app-text-secondary); font-size: 13px; font-weight: 600; }
.chat-safety-count { padding: 2px 8px; border-radius: 20px; background: var(--app-surface-alt); color: var(--app-text); }
.chat-safety-person { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 12px; }
.chat-safety-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--app-badge-brand-bg); color: #fff; font-size: 14px; font-weight: 600; }
.chat-safety-person-info { flex: 1; min-width: 120px; overflow-wrap: anywhere; display: grid; gap: 5px; }
.chat-safety-person-info strong { font-size: 14px; }
.chat-safety-person-info span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--app-text-secondary); }
.chat-safety-person-info .rzi { font-size: 14px; }
.chat-safety-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 24px; text-align: center; border: 1px dashed var(--app-border-strong); border-radius: 14px; }
.chat-safety-empty p { max-width: 380px; margin: 0; color: var(--app-text-secondary); font-size: 13px; line-height: 1.7; }
.chat-safety-report { border: 1px solid var(--app-border); border-radius: 14px; overflow: hidden; background: var(--app-surface); }
.chat-safety-report-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--app-border); }
.chat-safety-report-header .chat-safety-heading { min-width: 130px; }
.chat-safety-report-content { display: grid; gap: 18px; padding: 20px; }
.chat-safety-eyebrow { font-size: 11px; font-weight: 600; color: var(--app-text-secondary); letter-spacing: .035em; text-transform: uppercase; }
.chat-safety-badge { background: var(--app-surface-alt); background: color-mix(in srgb, var(--rz-warning) 12%, var(--app-surface)); color: var(--app-text); border: 1px solid var(--app-border); border: 1px solid color-mix(in srgb, var(--rz-warning) 35%, var(--app-border)); border-radius: 20px; font-size: 11px; font-weight: 600; padding: 5px 10px; }
.chat-safety-badge--resolved { background: var(--app-surface-alt); background: color-mix(in srgb, var(--rz-success) 10%, var(--app-surface)); border-color: color-mix(in srgb, var(--rz-success) 35%, var(--app-border)); }
.chat-safety-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--app-text-secondary); }
.chat-safety-meta span { display: inline-flex; gap: 6px; align-items: center; }
.chat-safety-meta .rzi { font-size: 16px; }
.chat-safety-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; font-size: 14px; line-height: 1.7; }
.chat-safety-evidence { min-width: 0; background: var(--app-surface-alt); border-left: 3px solid var(--app-badge-brand-bg); border-radius: 0 8px 8px 0; padding: 12px 14px; }
.chat-safety-evidence blockquote { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; font-size: 13px; line-height: 1.7; color: var(--app-text); }
.chat-safety-report-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chat-safety-resolution { padding: 14px; border-radius: 10px; background: var(--app-surface-alt); }
.chat-safety-task-icon { color: var(--rz-primary); font-size: 22px; }
@media (max-width: 480px) {
    .chat-safety-page { padding: 12px; gap: 12px; }
    .chat-safety-intro, .chat-safety-report-content, .chat-safety-report-header { padding: 14px; }
    .chat-safety-body { padding: 4px 12px 12px; gap: 12px; }
    .chat-safety-toggle { padding: 12px; }
    .chat-safety-action, .chat-safety-report-actions .rz-button { width: 100%; }
}
