/* @balistas/framework – balistas.css. Bez vrstev: zavrství si ho aplikace při importu. */
/* base.css */
/* Stupnice vrstev. Hodnotu --bal-z-overlay (1000) měly vyskakovací prvky z plánu 2 jako výchozí; aplikace ji smí přepsat. */
:root { --bal-z-table: 10; --bal-z-table-corner: 11; --bal-z-bar: 40; --bal-z-scrim: 44; --bal-z-sidebar: 45; --bal-z-overlay: 1000; }

.bal-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* button.css */
.bal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  margin: 0;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--bal-component-control-radius);
  background: transparent;
  box-shadow: none;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 17px;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
}
.bal-button__icon { display: inline-flex; flex: none; width: 16px; height: 16px; }
.bal-button__icon > svg { width: 100%; height: 100%; }
.bal-button--primary { background: var(--bal-action); color: var(--bal-on-dark); }
.bal-button--secondary { background: var(--bal-paper); box-shadow: inset 0 0 0 1.5px var(--bal-line); color: var(--bal-text); }
.bal-button--ghost { background: var(--bal-brand-soft); color: var(--bal-brand-interactive); }
.bal-button--ghost .bal-button__icon { color: var(--bal-brand); }
.bal-button--destructive { background: var(--bal-danger); color: var(--bal-on-dark); }
.bal-button--neutral {
  padding: 9px 14px;
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line);
  color: var(--bal-text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}
.bal-button--neutral .bal-button__icon { width: 15px; height: 15px; }
.bal-button--compact {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bal-brand-interactive);
  color: var(--bal-paper);
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
}
.bal-button--icon-only { box-sizing: border-box; width: 39px; height: 39px; padding: 0; justify-content: center; }
.bal-button--icon-only.bal-button--neutral { width: 34px; height: 34px; }
.bal-button--icon-only.bal-button--compact { width: 27px; height: 27px; }
/* Stavy najetí myší plátno nemá – návrh knihovny, zapsaný v NALEZY-1B-1.md. */
.bal-button--primary:hover:not(:disabled) { background: var(--bal-action-deep); }
.bal-button--secondary:hover:not(:disabled),
.bal-button--neutral:hover:not(:disabled) { background: var(--bal-surface-muted); }
.bal-button--neutral:hover:not(:disabled) { color: var(--bal-text); }
.bal-button--ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--bal-brand-mid); }
.bal-button--destructive:hover:not(:disabled),
.bal-button--compact:hover:not(:disabled) { filter: brightness(0.9); }
.bal-button:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-button:disabled,
.bal-button--disabled,
.bal-button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 899px) {
  .bal-button { min-height: var(--bal-mobile-control-height); }
  .bal-button--icon-only { min-width: var(--bal-mobile-control-height); min-height: var(--bal-mobile-control-height); }
}

/* banner.css */
.bal-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  box-shadow: inset 3px 0 0 var(--bal-banner-accent);
  border-radius: 12px;
  background: var(--bal-banner-bg);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  line-height: 1.5;
}
.bal-banner--success { --bal-banner-accent: var(--bal-success); --bal-banner-bg: var(--bal-success-bg); }
.bal-banner--info { --bal-banner-accent: var(--bal-info); --bal-banner-bg: var(--bal-info-bg); }
.bal-banner--warning { --bal-banner-accent: var(--bal-warning); --bal-banner-bg: var(--bal-warning-bg); }
.bal-banner--danger { --bal-banner-accent: var(--bal-danger); --bal-banner-bg: var(--bal-danger-bg); }
.bal-banner__icon { display: inline-flex; flex: none; width: 20px; height: 20px; color: var(--bal-banner-accent); }
.bal-banner__icon > svg { width: 20px; height: 20px; }
.bal-banner__content { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.bal-banner__title { margin: 0; font-size: 14px; font-weight: 600; line-height: 17px; }
.bal-banner__description { margin: 0; font-size: 13px; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere; }
.bal-banner__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  box-sizing: border-box; width: 28px; height: 28px; margin: -4px -6px 0 0; padding: 0;
  border: 0; border-radius: var(--bal-component-control-radius);
  background: transparent; color: var(--bal-text-muted); cursor: pointer; appearance: none;
}
.bal-banner__close > svg { width: 17px; height: 17px; }
.bal-banner__close:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
@media (max-width: 899px) {
  .bal-banner__close { width: var(--bal-mobile-control-height); height: var(--bal-mobile-control-height); margin: -12px -12px -12px 0; }
}

/* table.css */
.bal-table-wrap {
  container-type: inline-size;
  container-name: bal-table;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--bal-line);
  border-radius: var(--bal-component-control-radius);
  background: var(--bal-paper);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0;
}
.bal-table-wrap:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
/* Lepivé buňky potřebují oddělené rámečky: při border-collapse: collapse linka s lepivou buňkou necestuje. */
.bal-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-variant-numeric: tabular-nums;
}
.bal-table__caption {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.bal-table__head-cell {
  padding: 11px 8px;
  border: 0;
  border-bottom: 1px solid var(--bal-line);
  background: var(--bal-surface-muted);
  color: var(--bal-text);
  font-size: 12px; font-weight: 700; line-height: 15px; letter-spacing: 0.3px;
  text-align: left; vertical-align: middle; white-space: normal; overflow-wrap: normal; word-break: keep-all;
}
.bal-table__cell {
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--bal-line);
  background: transparent;
  color: var(--bal-text);
  font-size: 12.5px; font-weight: 400; line-height: 18px;
  text-align: left; vertical-align: middle; overflow-wrap: break-word;
}
.bal-table__cell--lead { font-weight: 600; }
.bal-table__foot-cell {
  padding: 11px 8px;
  border: 0;
  border-top: 1px solid var(--bal-line);
  background: var(--bal-surface-muted);
  color: var(--bal-text);
  font-size: 12.5px; font-weight: 600; line-height: 18px;
  text-align: left; vertical-align: middle;
}
.bal-table tbody tr:last-child > .bal-table__cell { border-bottom: 0; }
.bal-table__head-cell--numeric, .bal-table__cell--numeric, .bal-table__foot-cell--numeric { text-align: right; }
.bal-table__head-cell--atomic, .bal-table__cell--atomic, .bal-table__foot-cell--atomic { white-space: nowrap; }
.bal-table__head-cell:not(.bal-table__head-cell--sortable):first-child, .bal-table__cell:first-child, .bal-table__foot-cell:first-child { padding-left: 16px; }
.bal-table__head-cell:not(.bal-table__head-cell--sortable):last-child, .bal-table__cell:last-child, .bal-table__foot-cell:last-child { padding-right: 16px; }

.bal-table__row--clickable { cursor: pointer; }
.bal-table__row--clickable:hover > .bal-table__cell { background: var(--bal-surface-muted); }
.bal-table__row--clickable:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: -2px; }
/* Cíl řádku: vypadá jako text buňky, ne jako odkaz ani tlačítko – klikací je celý řádek.
   Cíl buňky přebírá tentýž reset, liší se jen rozměrem a odsazením. */
.bal-table__row-link, .bal-table__cell-link {
  display: inline; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; appearance: none; opacity: 1;
  color: inherit; font: inherit; letter-spacing: inherit; text-align: inherit; text-decoration: none; cursor: pointer;
}

/* Lepivé záhlaví: obal je svislý posuvník s výškou z proměnné, kterou aplikace přepíše ve vlastním CSS. */
.bal-table-wrap--sticky-head { max-height: var(--bal-table-max-height, 65vh); overflow-y: auto; }
/* Lepivé selektory jdou po dětech (> table > …), aby nezasáhly tabulku vnořenou do rozbaleného detailu. */
.bal-table-wrap--sticky-head > table > thead > tr > .bal-table__head-cell { position: sticky; top: 0; z-index: var(--bal-z-table); }
.bal-table-wrap--sticky-head > table > tfoot > tr > .bal-table__foot-cell { position: sticky; bottom: 0; z-index: var(--bal-z-table); }

/* Lepivý první sloupec: neprůhledný podklad, čára vpravo jako stín dovnitř, měkký stín přes posouvaná data. */
.bal-table-wrap--sticky-first > table > * > tr > :is(.bal-table__head-cell, .bal-table__cell, .bal-table__foot-cell):first-child {
  position: sticky; left: 0; z-index: var(--bal-z-table);
  box-shadow: inset -1px 0 0 var(--bal-line), 3px 0 6px color-mix(in srgb, var(--bal-ink) 4%, transparent);
}
.bal-table-wrap--sticky-first > table > tbody > tr > .bal-table__cell:first-child { background: var(--bal-paper); font-size: 13px; font-weight: 600; line-height: 16px; }
.bal-table-wrap--sticky-first > table > tbody > .bal-table__row--clickable:hover > .bal-table__cell:first-child { background: var(--bal-surface-muted); }
/* Lepivá buňka leží nad obrysem řádku, proto se obrys na ní dokreslí stínem dovnitř; dělicí čára a měkký stín zůstávají. */
.bal-table-wrap--sticky-first > table > tbody > .bal-table__row--clickable:focus-visible > .bal-table__cell:first-child {
  box-shadow: inset 2px 0 0 var(--bal-brand-mid), inset 0 2px 0 var(--bal-brand-mid), inset 0 -2px 0 var(--bal-brand-mid),
    inset -1px 0 0 var(--bal-line), 3px 0 6px color-mix(in srgb, var(--bal-ink) 4%, transparent);
}
.bal-table-wrap--sticky-head.bal-table-wrap--sticky-first > table > * > tr > :is(.bal-table__head-cell, .bal-table__foot-cell):first-child { z-index: var(--bal-z-table-corner); }

/* Řaditelné záhlaví: tlačítko přes celou buňku, odsazení buňky přebírá tlačítko. */
.bal-table__head-cell--sortable { padding: 0; }
.bal-table__sort {
  display: flex; align-items: center; gap: 5px;
  box-sizing: border-box; width: 100%; margin: 0; padding: 11px 8px;
  border: 0; border-radius: 0; background: transparent; appearance: none; opacity: 1;
  color: var(--bal-text);
  font: inherit; letter-spacing: inherit; text-align: inherit; text-decoration: none; white-space: inherit;
  cursor: pointer;
}
.bal-table__head-cell--numeric > .bal-table__sort { justify-content: flex-end; }
.bal-table__head-cell--sortable:first-child > .bal-table__sort { padding-left: 16px; }
.bal-table__head-cell--sortable:last-child > .bal-table__sort { padding-right: 16px; }
.bal-table__sort:hover { background: color-mix(in srgb, var(--bal-text) 6%, transparent); }
.bal-table__sort:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: -2px; }
.bal-table__sort-icon { display: block; flex: none; width: 14px; height: 14px; color: var(--bal-text-muted); }
.bal-table__sort-icon--active { width: 15px; height: 15px; color: var(--bal-brand); }
.bal-table__sort-icon > svg { display: block; width: 100%; height: 100%; }

.bal-table__empty { padding: 32px 16px; border: 0; background: transparent; text-align: center; }
/* Prázdný stav v tabulce nesmí být karta v kartě: rámeček, podklad a velké odsazení nese už obal tabulky. */
.bal-table__empty > .bal-empty-state { padding: 8px 0; border-radius: 0; background: transparent; box-shadow: none; }
.bal-table__cell > .bal-skeleton__bar { width: 70%; min-width: 32px; }
.bal-table__cell--numeric > .bal-skeleton__bar { margin-left: auto; }

/* Akce v buňce: odsazení buňky přebírá cíl, aby byl klikací v celé ploše buňky. */
.bal-table__cell.bal-table__cell--action { padding: 0; }
.bal-table__cell-link { display: block; box-sizing: border-box; width: 100%; padding: 10px 8px; }
.bal-table__cell--action:first-child > .bal-table__cell-link { padding-left: 16px; }
.bal-table__cell--action:last-child > .bal-table__cell-link { padding-right: 16px; }
.bal-table__cell-link:hover { background: var(--bal-surface-muted); }
.bal-table__cell-link:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: -2px; }

@container bal-table (max-width: 559px) {
  .bal-table__head-cell:not(.bal-table__head-cell--sortable):first-child, .bal-table__cell:first-child, .bal-table__foot-cell:first-child { padding-left: 12px; }
  .bal-table__head-cell:not(.bal-table__head-cell--sortable):last-child, .bal-table__cell:last-child, .bal-table__foot-cell:last-child { padding-right: 12px; }
  .bal-table__head-cell--sortable:first-child > .bal-table__sort { padding-left: 12px; }
  .bal-table__head-cell--sortable:last-child > .bal-table__sort { padding-right: 12px; }
  /* Krajní pravidla výš mají stejnou váhu, proto se odsazení ruší znovu – remízu rozhoduje pořadí. */
  .bal-table__cell.bal-table__cell--action { padding: 0; }
  .bal-table__cell--action:first-child > .bal-table__cell-link { padding-left: 12px; }
  .bal-table__cell--action:last-child > .bal-table__cell-link { padding-right: 12px; }
}

/* Rozbalovací řádek (plátno a7wl1l, v95pU): sloupec tlačítka 44 px, řádek 44 px i s čarou. Za kontejnerovým dotazem kvůli pořadí. */
:is(.bal-table__head-cell, .bal-table__cell, .bal-table__foot-cell).bal-table__toggle-cell:first-child { box-sizing: border-box; width: 44px; min-width: 44px; padding: 6px 6px 5px; }
/* 32 × 32 i na mobilu; plochu dotyku 44 × 44 dává pseudoprvek. */
.bal-button.bal-button--icon-only.bal-table__toggle { position: relative; display: flex; width: 32px; height: 32px; min-width: 0; min-height: 0; margin: 0 auto; }
.bal-table__toggle::before { content: ""; position: absolute; inset: -6px; }
.bal-table__toggle[aria-expanded="true"] .bal-button__icon { transform: rotate(90deg); }
.bal-table__detail { padding: 12px 16px 16px 44px; border: 0; border-bottom: 1px solid var(--bal-line); background: var(--bal-bg); color: var(--bal-text); text-align: left; vertical-align: top; }
/* Poslední čáru těla kreslí obal. */
.bal-table > tbody > tr:last-child > .bal-table__detail, .bal-table > tbody > tr:has(+ [hidden]:last-child) > .bal-table__cell { border-bottom: 0; }
/* Lepivý první sloupec: lepí se tlačítko i první sloupec dat, čára za ním. Jen děti – vnořená tabulka v detailu zůstane. */
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > * > tr > :first-child { box-shadow: none; }
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > * > tr > :nth-child(2) {
  position: sticky; left: 44px; z-index: var(--bal-z-table);
  box-shadow: inset -1px 0 0 var(--bal-line), 3px 0 6px color-mix(in srgb, var(--bal-ink) 4%, transparent);
}
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > :is(thead, tfoot) > tr > :nth-child(2) { z-index: var(--bal-z-table-corner); }
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > tbody > tr > :nth-child(2) { background: var(--bal-paper); font-size: 13px; font-weight: 600; line-height: 16px; }
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > tbody > .bal-table__row--clickable:hover > :nth-child(2) { background: var(--bal-surface-muted); }
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > tbody > .bal-table__row--clickable:focus-visible > :first-child { box-shadow: inset 2px 0 0 var(--bal-brand-mid), inset 0 2px 0 var(--bal-brand-mid), inset 0 -2px 0 var(--bal-brand-mid); }
.bal-table-wrap--expandable.bal-table-wrap--sticky-first > table > tbody > .bal-table__row--clickable:focus-visible > :nth-child(2) {
  box-shadow: inset 0 2px 0 var(--bal-brand-mid), inset 0 -2px 0 var(--bal-brand-mid), inset -1px 0 0 var(--bal-line), 3px 0 6px color-mix(in srgb, var(--bal-ink) 4%, transparent);
}

/* pagination.css */
.bal-pagination {
  container-type: inline-size;
  container-name: bal-pagination;
  display: block; box-sizing: border-box; width: 100%; margin: 0; padding: 0;
  color: var(--bal-text-secondary);
  font-family: var(--bal-font-ui); font-size: 12px; font-weight: 400; line-height: 15px; letter-spacing: 0;
}
.bal-pagination__summary { margin: 0; color: var(--bal-text-secondary); }
.bal-pagination__pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bal-pagination__pages > li { display: block; margin: 0; padding: 0; }
.bal-pagination:has(> .bal-pagination__pages) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.bal-pagination:not(:has(> .bal-pagination__pages)) { padding: 12px 0; }
.bal-pagination:not(:has(> .bal-pagination__summary)) { justify-content: flex-end; }
.bal-pagination__page {
  display: inline-grid; place-items: center;
  box-sizing: border-box; min-width: 34px; height: 34px; margin: 0; padding: 0 6px;
  border: 0; border-radius: 8px; background: var(--bal-paper); box-shadow: inset 0 0 0 1px var(--bal-line);
  appearance: none; opacity: 1;
  color: var(--bal-text);
  font-family: var(--bal-font-ui); font-size: 12px; font-weight: 500; line-height: 15px; letter-spacing: 0;
  text-decoration: none; font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.bal-pagination__page:hover { background: var(--bal-surface-muted); }
.bal-pagination__page:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-pagination__page--current, .bal-pagination__page--current:hover {
  background: var(--bal-brand-interactive); box-shadow: inset 0 0 0 1px var(--bal-brand-interactive);
  color: var(--bal-on-dark); font-weight: 700; cursor: default;
}
.bal-pagination__page--disabled, .bal-pagination__page--disabled:hover { background: var(--bal-paper); color: var(--bal-text-muted); cursor: not-allowed; opacity: 0.55; }
.bal-pagination__page--step > svg, .bal-pagination__gap > svg { display: block; width: 14px; height: 14px; }
.bal-pagination__pages > li.bal-pagination__gap { display: grid; place-items: center; min-width: 34px; height: 34px; color: var(--bal-text-muted); }
@media (max-width: 899px) {
  .bal-pagination__page, .bal-pagination__pages > li.bal-pagination__gap { min-width: var(--bal-mobile-control-height); height: var(--bal-mobile-control-height); }
}
@container bal-pagination (max-width: 519px) {
  .bal-pagination__pages { justify-content: center; width: 100%; }
  .bal-pagination__summary { width: 100%; text-align: center; }
}

/* status-pill.css */
.bal-status-pill {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
  vertical-align: top;
  padding: 5px 11px;
  border: 0;
  border-radius: var(--bal-radius-pill);
  background: var(--bal-status-pill-bg);
  color: var(--bal-status-pill-fg);
  font-family: var(--bal-font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
  white-space: nowrap;
}
.bal-status-pill--success { --bal-status-pill-fg: var(--bal-success); --bal-status-pill-bg: var(--bal-success-bg); }
.bal-status-pill--info { --bal-status-pill-fg: var(--bal-info); --bal-status-pill-bg: var(--bal-info-bg); }
.bal-status-pill--warning { --bal-status-pill-fg: var(--bal-warning); --bal-status-pill-bg: var(--bal-warning-bg); }
.bal-status-pill--danger { --bal-status-pill-fg: var(--bal-danger); --bal-status-pill-bg: var(--bal-danger-bg); }
.bal-status-pill--done { --bal-status-pill-fg: var(--bal-done); --bal-status-pill-bg: var(--bal-done-bg); }
.bal-status-pill--process-a { --bal-status-pill-fg: var(--bal-process-a); --bal-status-pill-bg: var(--bal-process-a-bg); }
.bal-status-pill--neutral { --bal-status-pill-fg: var(--bal-text); --bal-status-pill-bg: var(--bal-surface-muted); }

/* checkbox.css */
.bal-checkbox {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  box-sizing: border-box;
  margin: 0;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  cursor: pointer;
}
.bal-checkbox__input {
  display: inline-grid;
  place-content: center;
  flex: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1.5px var(--bal-text-muted);
  cursor: pointer;
  appearance: none;
}
.bal-checkbox__input::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--bal-on-dark);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  transform: scale(0);
}
.bal-checkbox__input:checked { background: var(--bal-brand); box-shadow: inset 0 0 0 1.5px var(--bal-brand); }
.bal-checkbox__input:checked::before { transform: scale(1); }
.bal-checkbox__input:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-checkbox__input:disabled { cursor: not-allowed; }
.bal-checkbox:has(.bal-checkbox__input:disabled) { opacity: 0.55; cursor: not-allowed; }
.bal-checkbox__label { min-width: 0; }
/* Plátno fy5Y2, xwCsv, du1Nl: bez viditelného popisku je cílem kliknutí obal 24 × 24 (WCAG 2.2, 2.5.8), čtverec zůstává 20 × 20. */
.bal-checkbox--label-hidden { justify-content: center; min-width: 24px; min-height: 24px; }
@media (max-width: 899px) {
  .bal-checkbox { min-height: var(--bal-mobile-control-height); }
  .bal-checkbox--label-hidden { min-width: var(--bal-mobile-control-height); }
}

/* select.css */
.bal-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
}
.bal-select__label { display: block; color: var(--bal-text); font-size: 14px; font-weight: 600; line-height: 17px; }
.bal-select__control { position: relative; display: flex; }
.bal-select__field {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 36px 0 12px;
  border: 0;
  border-radius: var(--bal-component-control-radius);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-text-muted);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0;
  text-decoration: none;
  text-overflow: ellipsis;
  opacity: 1;
  cursor: pointer;
  appearance: none;
}
.bal-select__field > option { padding: 0; }
/* Stavy najetí, zaměření a nedostupnosti plátno nemá – návrh knihovny, zapsaný v NALEZY-1B-2.md. */
.bal-select__field:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--bal-text); }
.bal-select__field:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-select__field:disabled { cursor: not-allowed; }
.bal-select:has(.bal-select__field:disabled) { opacity: 0.55; }
.bal-select__icon {
  position: absolute;
  top: 14px;
  right: 12px;
  display: block;
  width: 16px;
  height: 16px;
  color: var(--bal-text-secondary);
  pointer-events: none;
}
.bal-select__icon > svg { display: block; width: 16px; height: 16px; }

/* input.css */
.bal-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0;
  text-align: left;
}
.bal-input__label { display: block; margin: 0; padding: 0; color: var(--bal-text); font-size: 14px; font-weight: 600; line-height: 17px; }
.bal-input__field {
  box-sizing: border-box;
  width: 100%;
  height: 39px;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: var(--bal-component-control-radius);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-text-muted);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0;
  text-decoration: none;
  opacity: 1;
  appearance: none;
}
/* Stavy najetí, zaměření a nedostupnosti plátno nemá – návrh knihovny stylem výběru z plánu 2. */
.bal-input__field:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--bal-text); }
.bal-input__field:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-input__field[aria-invalid="true"],
.bal-input__field[aria-invalid="true"]:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--bal-danger); }
.bal-input__field:disabled { cursor: not-allowed; }
.bal-input:has(.bal-input__field:disabled) { opacity: 0.55; }
.bal-input__field::placeholder { color: var(--bal-text-muted); opacity: 1; }
.bal-input__help { display: flex; align-items: center; gap: 5px; color: var(--bal-text-muted); font-size: 12px; line-height: 15px; }
.bal-input__help--error { color: var(--bal-danger); }
.bal-input__help-icon { display: block; flex: none; width: 13px; height: 13px; }
.bal-input__help-icon > svg { display: block; width: 13px; height: 13px; }
.bal-input__help-text { display: block; min-width: 0; }
@media (max-width: 899px) {
  .bal-input__field { height: var(--bal-mobile-control-height); }
}

/* breadcrumb.css */
.bal-breadcrumb {
  box-sizing: border-box;
  margin: 0;
  padding: 2px 0;
  color: var(--bal-text-secondary);
  font-family: var(--bal-font-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
}
.bal-breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bal-breadcrumb__item { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.bal-breadcrumb__link { color: var(--bal-text-secondary); text-decoration: none; border-radius: 4px; }
/* Stav najetí myší plátno nemá – návrh knihovny. */
.bal-breadcrumb__link:hover { color: var(--bal-text); text-decoration: underline; }
.bal-breadcrumb__link:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-breadcrumb__separator { display: inline-flex; flex: none; width: 12px; height: 12px; color: var(--bal-text-muted); }
.bal-breadcrumb__separator > svg { width: 100%; height: 100%; }
.bal-breadcrumb__current { color: var(--bal-text); font-weight: 600; }
@media (max-width: 899px) {
  .bal-breadcrumb__link { display: inline-flex; align-items: center; min-height: var(--bal-mobile-control-height); }
}

/* page-header.css */
.bal-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  margin: 0;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  text-align: left;
}
.bal-page-header__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bal-page-header__title { margin: 0; padding: 0; border: 0; background: none; appearance: none; opacity: 1; text-decoration: none; color: var(--bal-text); font-family: var(--bal-font-ui); font-size: 24px; font-weight: 700; line-height: 29px; letter-spacing: 0; text-transform: none; }
.bal-page-header__description { color: var(--bal-text-secondary); }
.bal-page-header__actions { display: flex; flex: none; align-items: center; gap: 10px; }
@media (max-width: 899px) {
  .bal-page-header { flex-direction: column; align-items: stretch; }
  .bal-page-header__actions { flex-wrap: wrap; }
}

/* stat-card.css */
.bal-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: var(--bal-component-surface-radius);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
}
.bal-stat-card__label {
  margin: 0;
  color: var(--bal-text-muted);
  font-family: var(--bal-font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.bal-stat-card__value { margin: 0; color: var(--bal-text); font-size: 46px; font-weight: 700; line-height: 1.05; letter-spacing: -1.5px; }
.bal-stat-card__detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--bal-text-secondary);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}
.bal-stat-card__indicator { flex: none; width: 7px; height: 7px; border-radius: var(--bal-radius-pill); background: var(--bal-stat-indicator); }
.bal-stat-card__indicator--success { --bal-stat-indicator: var(--bal-success); }
.bal-stat-card__indicator--info { --bal-stat-indicator: var(--bal-info); }
.bal-stat-card__indicator--warning { --bal-stat-indicator: var(--bal-warning); }
.bal-stat-card__indicator--danger { --bal-stat-indicator: var(--bal-danger); }
.bal-stat-card--compact { gap: 5px; padding: 14px; border-radius: var(--bal-component-control-radius); }
.bal-stat-card--compact .bal-stat-card__label {
  color: var(--bal-text-secondary);
  font-family: var(--bal-font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0;
  text-transform: none;
}
.bal-stat-card--compact .bal-stat-card__value { font-size: 22px; font-weight: 700; line-height: 27px; letter-spacing: 0; }
.bal-stat-card--compact .bal-stat-card__detail { font-size: 12px; font-weight: 500; line-height: 15px; }

/* empty-state.css */
.bal-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 48px 30px;
  border: 0;
  border-radius: var(--bal-component-surface-radius);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}
.bal-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: var(--bal-radius-pill);
  background: var(--bal-brand-soft);
  color: var(--bal-brand);
}
.bal-empty-state__icon > svg { width: 28px; height: 28px; }
.bal-empty-state__title { margin: 0; color: var(--bal-text); font-size: 19px; font-weight: 600; line-height: 23px; }
.bal-empty-state__description { max-width: 340px; margin: 0; color: var(--bal-text-secondary); font-size: 14px; font-weight: 400; line-height: 1.5; }
.bal-empty-state__action { display: flex; justify-content: center; }

/* skeleton.css */
.bal-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: var(--bal-component-surface-radius);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
}
.bal-skeleton__top { display: flex; align-items: center; gap: 14px; }
.bal-skeleton__avatar { display: block; flex: none; width: 46px; height: 46px; border-radius: var(--bal-radius-pill); background: var(--bal-line); }
.bal-skeleton__heading { display: flex; flex-direction: column; gap: 8px; width: 170px; max-width: 100%; }
.bal-skeleton__lines { display: flex; flex-direction: column; gap: 12px; }
.bal-skeleton__bar { display: block; height: 13px; border-radius: 6px; background: var(--bal-line); }
.bal-skeleton__bar--subtitle { height: 11px; }
@keyframes bal-skeleton-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: no-preference) {
  .bal-skeleton__avatar,
  .bal-skeleton__bar { animation: bal-skeleton-pulse 1.6s ease-in-out infinite; }
}

/* dialog.css */
.bal-dialog {
  position: fixed;
  inset: 0;
  z-index: var(--bal-z-overlay, 1000);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  height: fit-content;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--bal-component-surface-radius);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  overflow: hidden;
  outline: 0;
  appearance: none;
}
/* Nativní <dialog> je zavřený bez atributu open; display: flex výše by ho jinak ukázal. */
dialog.bal-dialog:not([open]) { display: none; }
html:has(dialog.bal-dialog[open]) { overflow: hidden; }
/* Ztmavené pozadí: plátno má #121A1F s krytím 60 % bez tokenu – knihovna bere --bal-ink (NALEZY-1B-2.md). */
.bal-dialog__backdrop { position: fixed; inset: 0; z-index: var(--bal-z-overlay, 1000); background: color-mix(in srgb, var(--bal-ink) 60%, transparent); }
.bal-dialog::backdrop { background: color-mix(in srgb, var(--bal-ink) 60%, transparent); }
.bal-dialog__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  margin: 0;
  padding: 20px 24px;
  box-shadow: inset 0 -1px 0 var(--bal-line);
}
.bal-dialog__title { margin: 0; color: var(--bal-text); font-family: var(--bal-font-ui); font-size: 18px; font-weight: 700; line-height: 22px; letter-spacing: 0; overflow-wrap: anywhere; }
.bal-dialog__description { margin: 0; padding: 20px 24px 0; color: var(--bal-text-secondary); font-size: 13px; font-weight: 400; line-height: 1.45; }
.bal-dialog__close {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  box-sizing: border-box; width: 32px; height: 32px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: var(--bal-bg); color: var(--bal-text-secondary);
  cursor: pointer; appearance: none;
}
.bal-dialog__close > svg { display: block; width: 16px; height: 16px; }
/* Stav najetí křížku plátno nemá – návrh knihovny. */
.bal-dialog__close:hover { background: var(--bal-surface-muted); color: var(--bal-text); }
.bal-dialog__close:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: 2px; }
.bal-dialog__body {
  flex: 1 1 auto; min-height: 0; box-sizing: border-box; margin: 0; padding: 20px 24px;
  color: var(--bal-text-secondary); font-size: 14px; font-weight: 400; line-height: 1.5;
  overflow-y: auto; overflow-wrap: anywhere;
}
.bal-dialog__footer {
  display: flex; flex: none; align-items: center; justify-content: flex-end; gap: 10px;
  box-sizing: border-box; margin: 0; padding: 16px 24px; box-shadow: inset 0 1px 0 var(--bal-line);
}
@media (max-width: 899px) {
  .bal-dialog { inset: auto 0 0 0; width: 100%; max-height: calc(100dvh - 48px); margin: 0; border-radius: 16px 16px 0 0; }
  .bal-dialog__header { padding: 20px 16px 0; box-shadow: none; }
  .bal-dialog__title { font-size: 20px; line-height: 24px; }
  .bal-dialog__close { width: var(--bal-mobile-control-height); height: var(--bal-mobile-control-height); margin: -10px -6px -10px 0; }
  .bal-dialog__description { padding: 14px 16px 0; }
  .bal-dialog__body { padding: 14px 16px; }
  .bal-dialog__footer { padding: 0 16px 20px; box-shadow: none; }
  .bal-dialog__footer > .bal-button { flex: 1 1 0; }
}

/* menu.css */
.bal-menu-positioner { z-index: var(--bal-z-overlay, 1000); }
.bal-menu {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: max-content;
  min-width: 248px;
  max-width: min(320px, calc(100vw - 32px));
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 12px;
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line), var(--bal-shadow-overlay);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  overflow: hidden;
  outline: 0;
}
/* Python strana: nabídka je prvek s atributem popover, pod spouštěč ji kotví CSS (spouštěč s popovertarget je kotva sám od sebe). */
.bal-menu[popover] { position: fixed; inset: auto; margin: 4px 0 0; position-anchor: auto; position-area: none; top: anchor(bottom); left: anchor(left); left: round(anchor(left), 1px); position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
.bal-menu[popover]:not(:popover-open) { display: none; }
/* Zarovnání k pravému okraji spouštěče (nabídky v pravé části horní lišty). V Reactu ho dělá Base UI (align="end"). */
/* Pravý okraj se zaokrouhlí na celý pixel jako v Base UI (floating-ui zaokrouhluje polohu): spouštěč za textem proměnné šířky
   leží na zlomku pixelu a nabídka by se jinak vykreslila o bod širší. */
.bal-menu--end[popover] { position-anchor: auto; position-area: none; top: anchor(bottom); left: auto; right: anchor(right); right: round(anchor(right), 1px); }
.bal-menu--account { min-width: 252px; }
.bal-menu--apps { min-width: 0; width: 330px; max-width: calc(100vw - 16px); }
/* Python strana: formulář odhlášení uvnitř nabídky nesmí změnit rozvržení položek. */
.bal-menu > form { display: contents; margin: 0; }
.bal-menu__header { display: flex; flex-direction: column; gap: 3px; box-sizing: border-box; margin: 0; padding: 8px 16px 10px; }
.bal-menu__header-title { color: var(--bal-text); font-size: 12px; font-weight: 700; line-height: 15px; overflow: hidden; text-overflow: ellipsis; }
.bal-menu__header-detail { color: var(--bal-text-secondary); font-size: 12px; font-weight: 400; line-height: 15px; overflow: hidden; text-overflow: ellipsis; }
.bal-menu__item {
  display: flex;
  align-items: center;
  gap: 11px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  opacity: 1;
  outline: 0;
  user-select: none;
}
.bal-menu__icon { display: block; flex: none; width: 17px; height: 17px; color: var(--bal-text-secondary); }
.bal-menu__icon > svg { display: block; width: 17px; height: 17px; }
.bal-menu__label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bal-menu__item--danger { color: var(--bal-danger); }
.bal-menu__item--danger .bal-menu__icon { color: var(--bal-danger); }
.bal-menu__item--current { background: var(--bal-brand-soft); color: var(--bal-brand-interactive); font-weight: 600; }
.bal-menu__item--current .bal-menu__icon { color: var(--bal-brand-interactive); }
.bal-menu__check { display: block; flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--bal-brand-interactive); }
.bal-menu__check > svg { display: block; width: 14px; height: 14px; }
/* Zvýrazněnou (fpzv2) i nedostupnou položku (RFM2g, uGnPK) má plátno od 20. 9. 2026 a hodnoty s knihovnou souhlasí (NALEZY-1B-6.md).
   data-highlighted nastavuje Base UI, :hover platí na Python straně. */
.bal-menu__item[data-highlighted],
.bal-menu__item:hover:not(:disabled):not([data-disabled]):not(.bal-menu__item--inactive) { background: var(--bal-surface-muted); }
.bal-menu__item--danger[data-highlighted],
.bal-menu__item--danger:hover:not(:disabled):not([data-disabled]):not(.bal-menu__item--inactive) { background: var(--bal-danger-bg); }
.bal-menu__item--current[data-highlighted],
.bal-menu__item.bal-menu__item--current:focus-visible,
.bal-menu__item--current:hover:not(:disabled):not([data-disabled]):not(.bal-menu__item--inactive) { background: var(--bal-brand-soft); box-shadow: inset 2px 0 0 var(--bal-brand-mid); }
.bal-menu__item:focus-visible { background: var(--bal-surface-muted); box-shadow: inset 2px 0 0 var(--bal-brand-mid); }
.bal-menu__item--danger:focus-visible { background: var(--bal-danger-bg); }
/* Plátno RFM2g a uGnPK: nedostupná položka je šedá bez průhlednosti, i nebezpečná. Zvýrazněná má vždy neutrální podklad:
   --bal-text-muted na --bal-danger-bg nesplní 4,5 : 1. */
.bal-menu__item:disabled,
.bal-menu__item[data-disabled],
.bal-menu__item--inactive { color: var(--bal-text-muted); cursor: not-allowed; }
.bal-menu__item:disabled .bal-menu__icon,
.bal-menu__item[data-disabled] .bal-menu__icon,
.bal-menu__item--inactive .bal-menu__icon { color: var(--bal-text-muted); }
.bal-menu__item[data-disabled][data-highlighted],
.bal-menu__item[data-disabled]:focus-visible,
.bal-menu__item--inactive[data-highlighted],
.bal-menu__item--inactive:focus-visible { background: var(--bal-surface-muted); }
.bal-menu__separator { flex: none; box-sizing: border-box; width: 100%; height: 1px; margin: 0; border: 0; background: var(--bal-line); }
@media (max-width: 899px) {
  .bal-menu__item { min-height: var(--bal-mobile-control-height); }
}

/* tooltip.css */
.bal-tooltip-positioner { z-index: var(--bal-z-overlay, 1000); }
.bal-tooltip {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--bal-ink);
  box-shadow: none;
  color: var(--bal-on-dark);
  font-family: var(--bal-font-ui);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.bal-tooltip__arrow { position: absolute; bottom: -7px; display: block; width: 12px; height: 7px; margin: 0; background: var(--bal-ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
/* Base UI bublinu při nedostatku místa překlopí pod prvek a označí stranu. */
.bal-tooltip-positioner[data-side="bottom"] .bal-tooltip__arrow { top: -7px; bottom: auto; rotate: 180deg; }
/* Python strana: čisté CSS, bublina je potomek obalu spouštěče. Posun o polovinu šířky se zaokrouhluje na celé pixely
   jako poloha z Base UI – text na zlomku pixelu se vykreslí jinak. */
.bal-tooltip-anchor { position: relative; display: inline-flex; }
.bal-tooltip-anchor > .bal-tooltip { position: absolute; bottom: calc(100% + 7px); left: 50%; z-index: var(--bal-z-overlay, 1000); translate: -50% 0; translate: round(-50%, 1px) 0; visibility: hidden; }
.bal-tooltip-anchor:hover > .bal-tooltip,
.bal-tooltip-anchor:focus-within > .bal-tooltip { visibility: visible; }
.bal-tooltip-anchor > .bal-tooltip > .bal-tooltip__arrow { left: calc(50% - 6px); }
/* Python strana: bublina zavřená klávesou Escape (nastavuje balistas-shell.js), dokud ukazatel neodjede nebo prvek neztratí zaměření. */
.bal-tooltip-anchor[data-bal-dismissed]:hover > .bal-tooltip,
.bal-tooltip-anchor[data-bal-dismissed]:focus-within > .bal-tooltip { visibility: hidden; }

/* sidebar.css */
.bal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
  flex: none;
  width: var(--bal-sidebar-expanded);
  margin: 0;
  padding: 16px 16px 12px;
  background: var(--bal-paper);
  box-shadow: inset -1px 0 0 var(--bal-line);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.bal-sidebar__title { display: none; margin: 0; color: var(--bal-text); font-size: 20px; font-weight: 700; line-height: 24px; }
.bal-sidebar__section { box-sizing: border-box; height: 19px; margin: 0; padding: 0 10px 4px; overflow: hidden; color: var(--bal-text-muted); font-size: 12px; font-weight: 600; line-height: 15px; text-transform: uppercase; white-space: nowrap; }
.bal-sidebar__nav + .bal-sidebar__group-heading { height: 29px; padding-top: 10px; }
.bal-sidebar__bottom { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 10px; }
.bal-sidebar__slot { margin: 0; padding: 4px 0 8px; }
.bal-sidebar__nav { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; }
.bal-sidebar__nav--support { margin-top: auto; padding-top: 12px; }
.bal-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  height: var(--bal-nav-item-height);
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: var(--bal-radius-control);
  background: transparent;
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
  appearance: none;
  opacity: 1;
  cursor: pointer;
}
.bal-sidebar__icon { display: block; flex: none; width: 17px; height: 17px; color: var(--bal-text-secondary); }
.bal-sidebar__icon > svg { display: block; width: 100%; height: 100%; }
.bal-sidebar__label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bal-sidebar__badge { display: block; flex: none; box-sizing: border-box; min-width: 24px; height: 20px; margin-left: auto; padding: 2px 8px; border-radius: var(--bal-radius-pill); background: var(--bal-brand-soft); color: var(--bal-brand-interactive); font-size: 12px; font-weight: 600; line-height: 16px; text-align: center; }
/* Stavy najetí a zaměření plátno nemá – návrh knihovny stylem z plánů 1 a 2. */
.bal-sidebar__item:hover { background: var(--bal-surface-muted); }
.bal-sidebar__item:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: -2px; }
.bal-sidebar__item[aria-current="page"],
.bal-sidebar__item[aria-current="page"]:hover { background: var(--bal-brand-soft); color: var(--bal-brand-interactive); font-weight: 700; }
.bal-sidebar__item[aria-current="page"] .bal-sidebar__icon { color: var(--bal-brand-interactive); }
/* Sbalený panel jen tam, kde panel stojí vedle obsahu. Popisky zůstávají v DOM pro čtečky i pro název odkazu. */
@media (min-width: 900px) {
  .bal-sidebar[data-collapsed="true"] { width: var(--bal-sidebar-collapsed); padding-inline: 10px; }
  .bal-sidebar[data-collapsed="true"] .bal-sidebar__section { visibility: hidden; padding-inline: 0; }
  .bal-sidebar[data-collapsed="true"] .bal-sidebar__slot,
  .bal-sidebar[data-collapsed="true"] .bal-sidebar__group-heading { display: none; }
  .bal-sidebar[data-collapsed="true"] .bal-sidebar__item { justify-content: center; gap: 0; padding: 0; }
  .bal-sidebar[data-collapsed="true"] .bal-sidebar__label,
  .bal-sidebar[data-collapsed="true"] .bal-sidebar__badge { position: absolute; width: 1px; height: 1px; min-width: 0; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Pod 900 px hodnoty mobilní zásuvky z plátna (x2Vwg). */
@media (max-width: 899px) {
  .bal-sidebar { gap: 8px; padding: 16px; }
  .bal-sidebar__title { display: block; }
  .bal-sidebar__section { display: none; }
  .bal-sidebar__group-heading { display: block; }
  .bal-sidebar__bottom { gap: 8px; }
  .bal-sidebar__nav { gap: 8px; }
  .bal-sidebar__item { gap: 12px; height: var(--bal-mobile-control-height); padding: 0 12px; border-radius: 8px; font-size: 14px; line-height: 17px; }
  .bal-sidebar__icon { width: 18px; height: 18px; }
}

/* app-bar.css */
.bal-app-bar {
  position: sticky;
  top: 0;
  z-index: var(--bal-z-bar);
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  height: var(--bal-global-bar-height);
  margin: 0;
  padding: 0 16px;
  background: var(--bal-shell);
  color: var(--bal-on-dark);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 17px;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.bal-app-bar__mark { display: flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; }
.bal-app-bar__mark > svg { display: block; width: auto; height: 32px; }
.bal-app-bar__divider { display: block; flex: none; width: 1px; height: 20px; background: color-mix(in srgb, var(--bal-on-dark) 17%, transparent); }
.bal-app-bar__name { display: block; min-width: 0; overflow: hidden; color: var(--bal-on-dark); text-overflow: ellipsis; white-space: nowrap; }
.bal-app-bar__spacer { display: block; flex: 1; }
.bal-app-bar__button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--bal-radius-control);
  background: color-mix(in srgb, var(--bal-on-dark) 6%, transparent);
  box-shadow: none;
  color: color-mix(in srgb, var(--bal-on-dark) 78%, var(--bal-shell));
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 17px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  appearance: none;
}
/* Obaly ikon přepínačů. Selektor míří jen na ně: obecné „> span" by přebilo rozvržení avataru. */
.bal-app-bar__button > [data-bal-when] { display: block; }
.bal-app-bar__button > [data-bal-when][hidden] { display: none; }
.bal-app-bar__button svg { display: block; flex: none; width: 19px; height: 19px; }
.bal-app-bar__button--plain { background: transparent; }
.bal-app-bar__button--labelled { padding: 0 10px; color: var(--bal-on-dark); }
.bal-app-bar__button--labelled svg { width: 17px; height: 17px; }
/* Stavy najetí a zaměření plátno nemá – návrh knihovny. */
.bal-app-bar__button:hover { background: color-mix(in srgb, var(--bal-on-dark) 12%, transparent); color: var(--bal-on-dark); }
.bal-app-bar__button:focus-visible { outline: 2px solid var(--bal-brand-mid); outline-offset: -2px; }
.bal-app-bar__toggle--mobile { display: none; }
.bal-avatar { display: grid; place-items: center; box-sizing: border-box; width: 30px; height: 30px; border-radius: 50%; background: var(--bal-brand-interactive); color: var(--bal-on-dark); font-family: var(--bal-font-ui); font-size: 12px; font-weight: 700; line-height: 15px; letter-spacing: 0; }
@media (max-width: 899px) {
  .bal-app-bar { gap: 8px; padding: 0 12px; }
  .bal-app-bar__divider, .bal-app-bar__toggle--desktop { display: none; }
  .bal-app-bar__toggle--mobile { display: inline-flex; color: var(--bal-on-dark); }
  .bal-app-bar__toggle--mobile svg { width: 24px; height: 24px; }
  .bal-app-bar__button--labelled { padding: 0; }
  .bal-app-bar__button--labelled svg { width: 19px; height: 19px; }
  .bal-app-bar__button-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 339px) {
  .bal-app-bar__mark { display: none; }
}

/* login.css */
.bal-login {
  display: grid;
  grid-template-columns: minmax(280px, 36.11%) 1fr;
  box-sizing: border-box;
  min-height: 100dvh;
  margin: 0;
  background: var(--bal-bg);
  color: var(--bal-text);
  font-family: var(--bal-font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.bal-login__brand { display: flex; flex-direction: column; box-sizing: border-box; min-width: 0; padding: 54px 56px; background: var(--bal-shell); color: var(--bal-on-dark); }
.bal-login__logo { display: block; }
.bal-login__logo > svg { display: block; width: 170px; height: auto; }
.bal-login__message { max-width: 408px; margin-block: auto; }
.bal-login__eyebrow { color: var(--bal-on-dark); font-size: 12px; font-weight: 700; line-height: 15px; letter-spacing: 1.2px; text-transform: uppercase; }
.bal-login__heading { color: var(--bal-on-dark); font-size: 36px; font-weight: 700; line-height: 1.16; }
.bal-login__description { max-width: 350px; color: color-mix(in srgb, var(--bal-on-dark) 78%, var(--bal-shell)); font-size: 14px; line-height: 1.5; }
.bal-login__security { display: flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--bal-on-dark) 55%, var(--bal-shell)); font-size: 12px; line-height: 15px; }
.bal-login__security-icon { display: block; flex: none; width: 16px; height: 16px; }
.bal-login__security-icon > svg { display: block; width: 16px; height: 16px; }
/* Plátno má odsazení plochy 0 × 60 a obsah na střed; svislých 40 px je pojistka pro nízké okno, kde by se karta dotkla okraje. */
.bal-login__main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; box-sizing: border-box; min-width: 0; margin: 0; padding: 40px 60px; }
.bal-login__main > * { box-sizing: border-box; width: min(390px, 100%); }
.bal-login-card { display: flex; flex-direction: column; gap: 18px; margin: 0; color: var(--bal-text); font-family: var(--bal-font-ui); font-size: 14px; font-weight: 400; line-height: 17px; letter-spacing: 0; }
.bal-login-card__identity { display: flex; flex-direction: column; gap: 8px; }
.bal-login-card__tag { display: flex; align-items: center; gap: 7px; color: var(--bal-brand-interactive); font-size: 12px; font-weight: 700; line-height: 15px; letter-spacing: 0.8px; text-transform: uppercase; }
.bal-login-card__tag-icon { display: block; flex: none; width: 16px; height: 16px; color: var(--bal-brand); }
.bal-login-card__tag-icon > svg { display: block; width: 16px; height: 16px; }
.bal-login-card__title { margin: 0; padding: 0; border: 0; background: none; appearance: none; opacity: 1; text-decoration: none; color: var(--bal-text); font-family: var(--bal-font-ui); font-size: 28px; font-weight: 700; line-height: 34px; letter-spacing: 0; text-transform: none; }
.bal-login-card__description { color: var(--bal-text-secondary); }
.bal-login-card__form { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; }
/* Tlačítka karty jsou Button z knihovny roztažený na šířku karty; dlouhý popisek se na úzké obrazovce zalomí. */
.bal-login-card__action { width: 100%; white-space: normal; }
.bal-login-card__notice { display: flex; align-items: flex-start; gap: 9px; box-sizing: border-box; padding: 12px; border-radius: var(--bal-radius-control); background: var(--bal-paper); box-shadow: inset 0 0 0 1px var(--bal-line); color: var(--bal-text-secondary); font-size: 12px; line-height: 1.45; }
.bal-login-card__notice-icon { display: block; flex: none; width: 16px; height: 16px; }
.bal-login-card__notice-icon > svg { display: block; width: 16px; height: 16px; }
.bal-login-card__notice-text { min-width: 0; }
.bal-login-card__divider { display: flex; align-items: center; gap: 9px; color: var(--bal-text-muted); font-size: 12px; line-height: 15px; }
.bal-login-card__divider::before, .bal-login-card__divider::after { content: ""; flex: 1; height: 1px; background: var(--bal-line); }
.bal-login-card__note { color: var(--bal-text-muted); font-size: 12px; line-height: 15px; }
.bal-auth-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  min-height: 170px;
  margin: 0;
  padding: 19px 24px;
  border-radius: var(--bal-radius-surface);
  background: var(--bal-paper);
  box-shadow: inset 0 0 0 1px var(--bal-line);
  color: var(--bal-text-secondary);
  font-family: var(--bal-font-ui);
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: 0;
  text-align: center;
}
.bal-auth-message__icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; }
.bal-auth-message__icon > svg { display: block; width: 18px; height: 18px; }
.bal-auth-message--loading { gap: 10px; }
.bal-auth-message--loading .bal-auth-message__icon { width: 22px; height: 22px; color: var(--bal-brand); }
.bal-auth-message--loading .bal-auth-message__icon > svg { width: 22px; height: 22px; }
.bal-auth-message--forbidden .bal-auth-message__icon { background: var(--bal-danger-bg); color: var(--bal-danger); }
.bal-auth-message--error .bal-auth-message__icon { background: var(--bal-warning-bg); color: var(--bal-warning); }
.bal-auth-message__title { margin: 0; padding: 0; border: 0; background: none; appearance: none; opacity: 1; text-decoration: none; color: var(--bal-text); font-family: var(--bal-font-ui); font-size: 14px; font-weight: 700; line-height: 17px; letter-spacing: 0; text-transform: none; }
.bal-auth-message__text { color: var(--bal-text-secondary); }
.bal-auth-message__action { display: flex; justify-content: center; }
@keyframes bal-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: no-preference) {
  .bal-auth-message--loading .bal-auth-message__icon > svg { animation: bal-spin 900ms linear infinite; }
}
@media (max-width: 1199px) {
  .bal-login { grid-template-columns: 280px 1fr; }
  .bal-login__brand { align-items: center; justify-content: center; padding: 24px; }
  .bal-login__message, .bal-login__security { display: none; }
  .bal-login__main { padding: 40px; }
}
@media (max-width: 599px) {
  .bal-login { grid-template-columns: 1fr; grid-template-rows: 120px 1fr; }
  .bal-login__main { padding: 20px; }
}

/* app-shell.css */
.bal-app-shell { display: block; box-sizing: border-box; min-height: 100dvh; margin: 0; background: var(--bal-bg); color: var(--bal-text); font-family: var(--bal-font-ui); font-size: 14px; font-weight: 400; line-height: 17px; letter-spacing: 0; text-align: left; }
.bal-app-shell__body { display: flex; align-items: flex-start; box-sizing: border-box; min-height: calc(100dvh - var(--bal-global-bar-height)); }
.bal-app-shell__body > .bal-sidebar { position: sticky; top: var(--bal-global-bar-height); height: calc(100dvh - var(--bal-global-bar-height)); overflow-y: auto; }
.bal-app-shell__main { display: block; box-sizing: border-box; flex: 1; min-width: 0; margin: 0; padding: 28px 32px; }
.bal-app-shell__scrim { display: none; }
/* 900–1 199 px: panel leží přes obsah, obsah si drží místo sbaleného panelu. */
@media (min-width: 900px) and (max-width: 1199px) {
  .bal-app-shell__body { padding-left: var(--bal-sidebar-collapsed); }
  .bal-app-shell__body > .bal-sidebar { position: fixed; z-index: var(--bal-z-sidebar); top: var(--bal-global-bar-height); bottom: 0; left: 0; height: auto; }
  .bal-app-shell__body > .bal-sidebar:not([data-collapsed="true"]) { box-shadow: inset -1px 0 0 var(--bal-line), 8px 0 24px color-mix(in srgb, var(--bal-ink) 14%, transparent); }
}
/* Pod 900 px: zásuvka (plátno x2Vwg) a ztmavené pozadí. Tlačítko se samo na šířku neroztáhne, proto výslovná šířka a výška. */
@media (max-width: 899px) {
  .bal-app-shell__body { display: block; }
  .bal-app-shell__main { padding: 24px 20px; }
  .bal-app-shell__scrim:not([hidden]) { position: fixed; z-index: var(--bal-z-scrim); top: var(--bal-global-bar-height); left: 0; display: block; width: 100%; height: calc(100dvh - var(--bal-global-bar-height)); margin: 0; padding: 0; border: 0; border-radius: 0; color: var(--bal-text); background: color-mix(in srgb, var(--bal-ink) 38%, transparent); box-shadow: none; opacity: 1; text-decoration: none; cursor: pointer; appearance: none; }
  .bal-app-shell__body > .bal-sidebar { position: fixed; z-index: var(--bal-z-sidebar); top: var(--bal-global-bar-height); bottom: 0; left: 0; width: min(318px, calc(100vw - 48px)); height: auto; box-shadow: 8px 0 24px color-mix(in srgb, var(--bal-ink) 14%, transparent); visibility: hidden; transform: translateX(-100%); transition: transform 160ms ease, visibility 0s linear 160ms; }
  .bal-app-shell__body > .bal-sidebar[data-mobile-open="true"] { visibility: visible; transform: none; transition-delay: 0s; }
}
@media (prefers-reduced-motion: reduce) {
  .bal-app-shell__body > .bal-sidebar { transition: none; }
}
