/**
 * Compliro - Components stylesheet (Calm Intelligence, 2026-05-13)
 * Drop-in z compliro-redesign/new-components.css + new-topbar.css.
 *
 * Loaded after tokens.css; provides canonical .card/.btn/.modal/.toast/.badge/.form-*
 * /.alert/.sidebar/.tabs + ALL topbar styles (extracted from navigation.js).
 */

/* =====================================================================
   Compliro · Components — Calm Intelligence (2026-05-12)

   Globální komponenty pro novou direkci. Načítat PO tokens.css.

   Obsahuje:
   - Buttons (.btn-*)
   - Cards (.card, .card-stat, .card-module)
   - Badges (.badge + status varianty + pulse dot)
   - Tables (modernizováno)
   - Forms (.form-group, .form-control)
   - Modal (sjednocený)
   - Page header (.page-header)
   - Sidebar (.sidebar nový styling)
   - Tabs (.tabs, .tab)
   - Utility: .stack, .row, .mono, .text-* atd.
   - Animace: pulse, fade-in, progress
   ===================================================================== */

/* ===== BUTTONS ====================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 16px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  letter-spacing: -0.1px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Primary = ink (tmavá na světlém pozadí) */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border-color: var(--color-accent);
}
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }

/* Ink — alternativa pro „neutrální" CTA */
.btn-ink {
  background: var(--color-ink);
  color: var(--color-text-inverse);
  border-color: var(--color-ink);
}
.btn-ink:hover { background: var(--color-ink-soft); border-color: var(--color-ink-soft); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover { background: var(--color-bg-alt); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--color-bg-alt); color: var(--color-text); }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-outline:hover { background: var(--color-bg-alt); }

.btn-danger {
  background: var(--color-error);
  color: var(--color-text-inverse);
  border-color: var(--color-error);
}
.btn-danger:hover { background: var(--color-error-text); border-color: var(--color-error-text); }

/* Velikosti */
.btn-sm { padding: 7px 12px; font-size: var(--font-size-xs); border-radius: 7px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 13px 20px; font-size: var(--font-size-base); }

/* ===== CARDS ======================================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card-hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}
.card-accent { border-top: 2px solid var(--color-accent); }

/* Stat card — pro dashboard čísla */
.card-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.card-stat .stat-label {
  font-family: var(--font-family-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-secondary);
}
.card-stat .stat-value {
  font-size: 40px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-ink);
  letter-spacing: var(--tracking-tighter);
  line-height: 1;
}
.card-stat .stat-caption {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.card-stat .stat-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

/* Module card — s progress barem */
.card-module {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.card-module-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.card-module-title { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-ink); }
.card-module-value { display: flex; align-items: baseline; gap: 4px; }
.card-module-value strong { font-size: 28px; font-weight: var(--font-weight-semibold); color: var(--color-ink); letter-spacing: -1px; }
.card-module-value span { font-size: 13px; color: var(--color-text-secondary); }
.card-module-progress { height: 4px; background: var(--color-border); border-radius: 99px; overflow: hidden; margin-top: var(--space-3); }
.card-module-progress > div { height: 100%; background: var(--color-accent); animation: compliro-progress-fill 800ms var(--ease-out); }
.card-module-caption { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-top: var(--space-3); }

/* Dark hero card — invertovaná pro „další audit" apod. */
.card-inverted {
  background: var(--color-ink);
  color: var(--color-text-inverse);
  border-color: var(--color-ink);
}
.card-inverted .stat-label { color: rgba(255,255,255,0.55); }
.card-inverted .stat-value { color: var(--color-text-inverse); }
.card-inverted .stat-caption { color: rgba(255,255,255,0.7); }

/* ===== BADGES ======================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 99px; display: inline-block; flex-shrink: 0; position: relative; }
.badge-dot.pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.35;
  animation: compliro-pulse 1.8s ease-out infinite;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-success .badge-dot { background: var(--color-success); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
.badge-warning .badge-dot { background: var(--color-warning); color: var(--color-warning); }
.badge-danger  { background: var(--color-error-bg);   color: var(--color-error-text); }
.badge-danger .badge-dot  { background: var(--color-error); color: var(--color-error); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info-text); }
.badge-info .badge-dot    { background: var(--color-info); color: var(--color-info); }
.badge-neutral { background: var(--color-bg-alt);     color: var(--color-text-secondary); }
.badge-neutral .badge-dot { background: var(--color-text-secondary); color: var(--color-text-secondary); }

/* Backwards compat — staré .status-* třídy */
.status-aktivní, .status-success { background: var(--color-success-bg); color: var(--color-success-text); border-radius: var(--radius-full); padding: 3px 9px; font-size: 11px; font-weight: 600; }
.status-archivováno, .status-warning { background: var(--color-warning-bg); color: var(--color-warning-text); border-radius: var(--radius-full); padding: 3px 9px; font-size: 11px; font-weight: 600; }

/* ===== TABLES ======================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table thead { background: var(--color-surface-muted); }
.table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family-mono);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: var(--space-4);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--dur-fast) var(--ease-out); }
.table tbody tr:hover { background: var(--color-surface-muted); }

/* ===== FORMS ======================================================== */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}
.form-label .req { color: var(--color-error); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-focus);
}
.form-control:disabled, .form-control[readonly] {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}
textarea.form-control { min-height: 100px; resize: vertical; }
.form-help { margin-top: 4px; font-size: var(--font-size-xs); color: var(--color-text-secondary); }
.form-error { margin-top: 4px; font-size: var(--font-size-xs); color: var(--color-error); }

/* --- Checkbox chips (multi-select bez <select multiple>) ---------------------------------
   F5 2026-09-18 (formular.html „Zodpovědné osoby"): native list-box ve WebView2 kreslil výběr šedě
   a prostý klik rušil předchozí výběr. Vzor = evidence.html .multiselect-group/.multiselect-item,
   povýšeno na sdílenou komponentu. Struktura:
     <div class="person-checks" role="group">
       <label class="person-chip"><input type="checkbox" …><span>Jméno (role)</span></label>
     </div>
   Checkbox zůstává v DOM (klávesnice, čtečky, form data); vizuál nese <span>. */
.person-checks { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.person-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; max-width: 100%; }
.person-chip input[type="checkbox"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.person-chip > span {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 32px; padding: 4px 12px 4px 9px; box-sizing: border-box;
  font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); line-height: 1.2;
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-full);
  user-select: none; overflow-wrap: anywhere;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.person-chip > span::before {
  content: ''; flex-shrink: 0; width: 15px; height: 15px; box-sizing: border-box;
  border: 1.5px solid var(--color-border-strong); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.person-chip:hover > span { border-color: var(--color-accent); background: var(--color-accent-bg); }
.person-chip input:checked + span {
  background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-inverse);
}
.person-chip input:checked + span::before {
  content: '\2713'; border-color: transparent; background: rgba(255,255,255,0.28); color: inherit;
}
.person-chip input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.person-chip input:disabled + span { opacity: 0.55; cursor: not-allowed; }
/* Osiřelý čip: uložené jméno, které už není v seznamu osob -- zůstává zaškrtnuté, ale tlumeně */
.person-chip--orphan input:checked + span {
  background: var(--color-bg-alt); border: 1px dashed var(--color-border-strong); color: var(--color-text-secondary);
}
.person-chip--orphan input:checked + span::before { background: var(--color-text-muted); color: var(--color-surface); }
.person-checks-empty { font-size: var(--font-size-xs); color: var(--color-text-secondary); font-style: italic; padding: 6px 0; }

/* ===== MODAL ======================================================== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,22,38,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal-overlay.open { display: flex; animation: compliro-fade-in var(--dur-base) var(--ease-out); }
.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 760px; }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h2, .modal-header h3, .modal-title {
  margin: 0; font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-ink);
  letter-spacing: var(--tracking-tight);
}
.modal-close {
  background: none; border: none;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--color-bg-alt); color: var(--color-ink); }
.modal-body { padding: var(--space-6); flex: 1; }
.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex; justify-content: flex-end; gap: var(--space-3);
  position: sticky; bottom: 0;
  background: var(--color-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ===== PAGE HEADER ================================================== */
.page-header {
  padding: var(--space-7) var(--space-7) var(--space-5);
  display: flex;
  align-items: flex-end;
  gap: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}
.page-header-main { flex: 1; min-width: 0; }
.page-header-breadcrumb {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: 10px;
}
.page-header-breadcrumb span {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.page-header-breadcrumb span.current { color: var(--color-text); font-weight: var(--font-weight-medium); }
.page-header-breadcrumb svg { width: 10px; height: 10px; color: var(--color-text-muted); }
.page-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-tighter);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.page-header p.subtitle {
  margin: 6px 0 0;
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}
.page-header-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }

/* ===== SIDEBAR (evidence pattern) =================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-surface-muted);
  border-right: 1px solid var(--color-border);
  flex-shrink: 0;
  padding: var(--space-5) 0;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 0 var(--space-5) var(--space-5);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-3);
}
.sidebar-header-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-teal-soft);
  color: var(--color-teal);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-header h2 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-ink);
  letter-spacing: var(--tracking-tight);
}
.sidebar-header .org-name {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.sidebar-section {
  padding: 10px var(--space-5) 6px;
  font-family: var(--font-family-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-secondary);
}
.sidebar-nav { flex: 1; overflow-y: auto; }
.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  margin: 0 var(--space-2);
  border-radius: 7px;
  border-left: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.sidebar-item:hover { background: var(--color-bg-alt); color: var(--color-text); }
.sidebar-item.active {
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: var(--font-weight-medium);
  border-left-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}
.sidebar-item .count {
  font-family: var(--font-family-mono);
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-mono);
}
.sidebar-item.active .count { color: var(--color-accent); }

/* Dark sidebar variant — used by evidence.html (and future dark-themed sidebar
   contexts). Default light variant above remains the canonical look; this is
   an opt-in modifier applied as `class="sidebar sidebar-dark"`. Eliminates
   page-local inline overrides that drift apart over time. */
.sidebar.sidebar-dark {
  background: linear-gradient(180deg, #0F1626 0%, #1A2438 100%);
  color: rgba(255,255,255,0.92);
}
.sidebar-dark .sidebar-header { border-bottom-color: rgba(255,255,255,0.10); }
.sidebar-dark .sidebar-header h2 { color: #fff; }
.sidebar-dark .sidebar-header .org-name,
.sidebar-dark .sidebar-section { color: rgba(255,255,255,0.55); }
.sidebar-dark .sidebar-item {
  color: rgba(255,255,255,0.85);
  border-left-color: transparent;
  margin: 0;
  border-radius: 0;
}
.sidebar-dark .sidebar-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.sidebar-dark .sidebar-item.active {
  background: rgba(43,163,155,0.18);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid #2BA39B;
  box-shadow: none;
}
.sidebar-dark .sidebar-item .count { color: rgba(255,255,255,0.55); }
.sidebar-dark .sidebar-item.active .count { color: #5DD99B; }

/* ===== TABS ========================================================= */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--space-7);
}
.tab {
  padding: 10px var(--space-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.tab:hover { color: var(--color-text); }
.tab.active {
  color: var(--color-ink);
  border-bottom-color: var(--color-accent);
  animation: compliro-tab-slide var(--dur-base) var(--ease-out);
}

/* ===== RING (donut progress, použít inline SVG; CSS jen pro container) */
.ring-container {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring-container .ring-value {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ring-container .ring-value strong {
  font-size: 44px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-ink);
  line-height: 1;
}

/* ===== UTILITY ====================================================== */
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row   { display: flex; gap: var(--space-2); align-items: center; }
.row-end { display: flex; gap: var(--space-2); align-items: center; justify-content: flex-end; }
.spacer { flex: 1; }

.text-mono {
  font-family: var(--font-family-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-secondary);
}
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }
.text-success   { color: var(--color-success); }
.text-warning   { color: var(--color-warning); }
.text-danger    { color: var(--color-error); }
.text-accent    { color: var(--color-accent); }

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-7) var(--space-7);
}
@media (max-width: 600px) { .container { padding: var(--space-4); } }

/* App layout (s sidebarem) */
.app { display: flex; min-height: calc(100vh - var(--topbar-height)); }
.app .main { flex: 1; min-width: 0; overflow: auto; }

/* ===== ANIMATIONS =================================================== */
@keyframes compliro-pulse {
  0%   { transform: scale(1);   opacity: 0.35; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes compliro-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes compliro-progress-fill {
  from { width: 0; }
}
@keyframes compliro-tab-slide {
  from { transform: translateX(-8px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes compliro-spin {
  to { transform: rotate(360deg); }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
 * TOPBAR (from compliro-redesign/new-topbar.css, Phase 3 extracted)
 * ============================================================ */

/* =====================================================================
   Compliro · Topbar CSS — Calm Intelligence
   Toto je drop-in nahrazení sekce TOPBAR_CSS uvnitř navigation.js.

   Použití:
   1. Otevřete navigation.js
   2. Najděte deklaraci `const TOPBAR_CSS = ` (~kolem ř. 80)
   3. Nahraďte celý obsah backtick stringu obsahem tohoto souboru
   4. Současně NAHRADIT generování loga (viz handoff/HANDOFF.md, krok 2.B)
   ===================================================================== */

/* === TOPBAR BASE — Light glass === */
.topbar {
  background: rgba(246,244,239,0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: var(--color-text);
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  padding: 0 24px;
  height: var(--topbar-height, 56px);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar, 9999);
  gap: 24px;
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(15,22,38,0.04);
  transition: box-shadow 200ms ease;
}
[data-theme="dark"] .topbar {
  background: rgba(10,15,26,0.7);
}
.topbar.scrolled {
  box-shadow: 0 1px 0 rgba(15,22,38,0.06), 0 4px 12px rgba(15,22,38,0.06);
}

/* === LOGO === */
.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
  transition: opacity 150ms ease;
}
.topbar-logo:hover { opacity: 0.75; }
.topbar-logo svg { width: 30px; height: auto; flex-shrink: 0; }

/* === NAVIGATION === */
.topbar-nav {
  display: flex;
  gap: 4px;
  overflow: visible;
  justify-self: center;
}

/* Direct children scope */
.topbar-nav > a,
.topbar-nav-group-trigger {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.topbar-nav > a:hover,
.topbar-nav-group-trigger:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.topbar-nav > a.active,
.topbar-nav-group-trigger.active {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.topbar-nav-group { position: relative; flex-shrink: 0; }
.topbar-nav-group-trigger .arrow { font-size: 10px; opacity: 0.6; }

/* === DROPDOWN MENUS (z navigačních groups) === */
.topbar-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  min-width: 280px;
  max-width: calc(100vw - 24px);
  z-index: var(--z-dropdown, 10000);
  padding: 6px;
  animation: compliro-fade-in 180ms cubic-bezier(0.16,1,0.3,1);
}
.topbar-nav-group.open .topbar-nav-dropdown { display: block; }
.topbar-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 13px;
  transition: background 120ms ease;
}
.topbar-nav-dropdown a:hover { background: var(--color-bg-alt); }
.topbar-nav-dropdown a.active {
  background: var(--color-teal-soft, rgba(43,163,155,0.10));
  color: var(--color-teal, #2BA39B);
  font-weight: 600;
}
.topbar-nav-dropdown a .icon,
.topbar-nav-dropdown a .nav-dd-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-nav-dropdown a:hover .icon,
.topbar-nav-dropdown a:hover .nav-dd-icon,
.topbar-nav-dropdown a.active .icon,
.topbar-nav-dropdown a.active .nav-dd-icon {
  background: var(--color-teal-soft);
  color: var(--color-teal);
}
.topbar-nav-dropdown a .label { flex: 1; font-weight: 500; }
.topbar-nav-dropdown a .desc { font-size: 11px; color: var(--color-text-secondary); display: block; margin-top: 1px; font-weight: 400; }

/* === RIGHT CLUSTER === */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

/* Search trigger (⌘K) — volitelný — viz HANDOFF.md krok 2.C */
.topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
  min-width: 200px;
  cursor: pointer;
  transition: border-color 140ms ease;
}
.topbar-search:hover { border-color: var(--color-border-strong); }
.topbar-search svg { width: 14px; height: 14px; opacity: 0.7; }
.topbar-search .kbd { margin-left: auto; display: flex; gap: 2px; }
.topbar-search kbd {
  font-family: var(--font-family-mono);
  font-size: 10px;
  padding: 2px 5px;
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  border-radius: 4px;
}

/* Cart, language, user — společný styl pro buttons v topbar-right */
.topbar-right .topbar-icon-btn,
.topbar-right .topbar-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 99px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease;
}
.topbar-right .topbar-icon-btn:hover,
.topbar-right .topbar-dropdown-trigger:hover {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}
.topbar-right .topbar-icon-btn svg { width: 18px; height: 18px; opacity: 0.85; }

/* Avatar — kruhový teal gradient */
.topbar-avatar {
  width: 24px; height: 24px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-hover));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* === USER / COMPANY / LANG DROPDOWNS === */
.topbar-dropdown { position: relative; }
.topbar-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  min-width: 220px;
  z-index: var(--z-dropdown, 10000);
  padding: 6px;
  animation: compliro-fade-in 180ms cubic-bezier(0.16,1,0.3,1);
}
.topbar-dropdown.open .topbar-dropdown-menu { display: block; }
.topbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease;
}
.topbar-dropdown-item:hover { background: var(--color-bg-alt); }
.topbar-dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

/* Cart badge */
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-error);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-bg);
}

/* Mobile fallback */
@media (max-width: 768px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .topbar-search { display: none; }
  .topbar-nav { display: none; }
  .topbar-mobile-toggle { display: inline-flex; }
}
.topbar-mobile-toggle {
  display: none;
  background: none; border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--color-text);
}

/* ============================================================
 * COMPATIBILITY SHIM — navigation.js renders legacy class names
 * that new-topbar.css doesn't fully cover. Added 2026-05-13 after
 * Calm Intelligence F1+F2 deploy revealed missing styles.
 * ============================================================ */

/* navigation.js toggles .open on the inner menu element directly,
   not on the parent — make .open class show the menu. */
.topbar-dropdown-menu.open,
.topbar-nav-dropdown.open,
.lang-switcher-dropdown.open { display: block !important; }

/* Topbar right region container */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* === Lang switcher (CZ/SK/PL/EN) === */
.lang-switcher {
    position: relative;
    display: inline-block;
}
.lang-switcher-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 600;
    height: 36px;
    min-width: 50px;
    transition: background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out);
}
.lang-switcher-btn:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-teal);
}
.lang-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 100px;
    z-index: var(--z-dropdown);
    padding: 4px;
}
.lang-switcher-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    text-align: left;
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--color-text);
}
.lang-switcher-dropdown button:hover {
    background: var(--color-bg-alt);
    color: var(--color-teal);
}
.lang-switcher-dropdown button.active {
    background: var(--color-teal-soft);
    color: var(--color-teal-hover);
    font-weight: 600;
}

/* === Cart button (icon only) === */
.topbar-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 36px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}
.topbar-cart-button:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-teal);
}
.topbar-cart-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-error);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    line-height: 1.2;
    min-width: 16px;
    text-align: center;
}
.cart-badge.hidden { display: none; }

/* secondary icon-only button next to cart (e.g. produkty link) */
.topbar-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}
.topbar-icon-button:hover {
    background: var(--color-bg-alt);
    color: var(--color-teal);
}
.topbar-icon-button svg { width: 20px; height: 20px; }

/* === topbar-dropdown wrapper + trigger + menu (company, user) === */
.topbar-dropdown {
    position: relative;
    display: inline-block;
}
.topbar-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    height: 36px;
    min-width: 120px;
    text-align: left;
    transition: background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out);
}
.topbar-dropdown-trigger:hover {
    border-color: var(--color-teal);
}
.topbar-dropdown-trigger strong,
.topbar-dropdown-trigger span:not(.arrow) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.topbar-dropdown-trigger .arrow {
    font-size: 9px;
    opacity: 0.6;
    margin-left: 2px;
    flex-shrink: 0;
}
.topbar-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 240px;
    z-index: var(--z-dropdown);
    padding: 4px;
}
.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    font-size: var(--font-size-sm);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
}
.topbar-dropdown-item:hover {
    background: var(--color-bg-alt);
    color: var(--color-teal);
}
.topbar-dropdown-item.active {
    background: var(--color-teal-soft, rgba(43,163,155,0.10));
    color: var(--color-teal, #2BA39B);
    font-weight: 600;
}
.topbar-dropdown-item.active svg.icon,
.topbar-dropdown-item.active .icon {
    color: var(--color-teal, #2BA39B);
}
.topbar-dropdown-item.danger {
    color: var(--color-error);
}
.topbar-dropdown-item.danger:hover {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}
.topbar-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}
.topbar-dropdown-section { padding: 0 4px; }
.topbar-dropdown-header {
    padding: 6px 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* SVG icons inside dropdown items should size automatically.
   Some inline SVG strings in navigation.js (ICONS.edit/search/userPlus/logout)
   don't carry a class — match any svg child and force 18px so they don't render
   at their viewBox default of 24px. */
.topbar-dropdown-item svg,
.topbar-dropdown-item svg.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================
 * TEAM MANAGEMENT MODAL (restored from navigation.js TOPBAR_CSS; lost during Calm Intelligence replace, restored 2026-05-13)
 * Brand hexes remapped to var(--color-*) for Calm Intelligence compatibility.
 * ============================================================ */

.team-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.team-modal-overlay.open { display: flex; }
.team-modal {
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 640px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.team-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.team-modal-header h3 { margin: 0; font-size: 18px; color: var(--color-primary); }
.team-modal-close {
    background: none; border: none; font-size: 26px;
    cursor: pointer; color: #6b7280; padding: 0; line-height: 1;
}
.team-modal-close:hover { color: var(--color-primary); }
.team-modal-body { padding: 20px 24px; overflow-y: auto; }
.team-section { margin-bottom: 24px; }
.team-section:last-child { margin-bottom: 0; }
.team-section-title {
    font-size: 11px; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.team-invite-form {
    display: grid; grid-template-columns: 1fr 130px auto; gap: 8px;
    background: #f8fafc; padding: 12px; border-radius: 8px;
}
.team-invite-form input, .team-invite-form select {
    padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 13px; background: #fff;
}
.team-invite-form input:focus, .team-invite-form select:focus {
    outline: none; border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Expanded invite form (v3) */
.team-invite-form-v2 {
    background: #f8fafc; padding: 14px; border-radius: 8px;
    display: flex; flex-direction: column; gap: 12px;
}
.team-invite-row { display: flex; gap: 12px; }
.team-field { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.team-field label {
    font-size: 11px; color: #64748b; font-weight: 600;
    text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.3px;
}
.team-field .req { color: #dc2626; }
.team-field .hint { color: #94a3b8; font-weight: normal; text-transform: none; letter-spacing: 0; }
.team-field input, .team-field select, .team-field textarea {
    padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 13px; background: #fff; font-family: inherit; box-sizing: border-box;
}
.team-field input:focus, .team-field select:focus, .team-field textarea:focus {
    outline: none; border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.team-invite-details { margin-top: 4px; }
.team-invite-details > summary {
    cursor: pointer; padding: 6px 0; font-size: 12px; font-weight: 600;
    color: var(--color-accent); user-select: none; list-style: none;
}
.team-invite-details > summary::before {
    content: "▸"; display: inline-block; margin-right: 6px;
    transition: transform 0.15s;
}
.team-invite-details[open] > summary::before { transform: rotate(90deg); }
.team-invite-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-top: 10px;
}
.team-field-full { grid-column: 1 / -1; }
.team-invite-actions { display: flex; justify-content: flex-end; }
@media (max-width: 600px) {
    .team-invite-row { flex-direction: column; gap: 10px; }
    .team-invite-grid { grid-template-columns: 1fr; }
}
.team-invite-btn {
    background: var(--color-accent); color: #fff; border: none;
    padding: 8px 14px; border-radius: 6px; font-size: 13px;
    font-weight: 600; cursor: pointer; white-space: nowrap;
}
.team-invite-btn:hover { background: var(--color-accent-hover); }
.team-invite-btn:disabled { background: #94a3b8; cursor: not-allowed; }
.team-list { list-style: none; padding: 0; margin: 0; }
.team-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.team-item:last-child { border-bottom: none; }
.team-item-info .name { font-weight: 600; color: #1e293b; font-size: 14px; }
.team-item-info .email { color: #64748b; font-size: 12px; margin-top: 2px; }
.team-item-info .meta { color: #94a3b8; font-size: 11px; margin-top: 2px; }
.team-role-select {
    padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 12px; background: #fff;
}
.team-role-badge {
    display: inline-block; padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600;
}
.team-role-owner { background: #fef3c7; color: #92400e; }
.team-role-admin { background: #ede9fe; color: #6d28d9; }
.team-role-editor { background: #dbeafe; color: #1e40af; }
.team-role-viewer { background: #f1f5f9; color: #475569; }
.team-remove-btn {
    background: none; border: none; color: #dc2626;
    cursor: pointer; padding: 6px 8px; border-radius: 6px; font-size: 18px;
}
.team-remove-btn:hover { background: #fee2e2; }
.team-empty {
    text-align: center; padding: 16px; color: #94a3b8; font-size: 13px;
}
.team-toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 12px 18px; background: var(--color-primary); color: #fff;
    border-radius: 8px; font-size: 13px; z-index: 11000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(80px); opacity: 0; transition: all 0.25s;
}
.team-toast.show { transform: translateY(0); opacity: 1; }
.team-toast.success { background: #16a34a; }
.team-toast.error { background: #dc2626; }
@media (max-width: 600px) {
    .team-invite-form { grid-template-columns: 1fr; }
    .team-item { grid-template-columns: 1fr; row-gap: 6px; }
}

/* ============================================================================
   F5 — Compliro hero shared base (2026-05-13)
   ============================================================================
   Shared visual treatment for all 15 per-page bespoke hero sections.
   Each hero element in HTML gets `class="X-hero compliro-hero"` (additive).
   Page-specific inline <style> keeps grid layouts, sub-elements, custom blobs.
   See ROADMAP.md F5 + CLAUDE.md V10 history.
   ============================================================================ */
.compliro-hero {
    background: linear-gradient(135deg, #0F1626 0%, #1A2438 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card-hover, var(--shadow-md));
}

/* Shared mono-uppercase eyebrow label (above hero title).
   Per-page CSS may override font-size/letter-spacing/margin via more specific selector. */
.profile-hero-eyebrow,
.ares-hero .ares-hero-eyebrow,
.catalog-hero-eyebrow,
.firmy-hero-eyebrow,
.cart-hero-eyebrow,
.subs-hero-eyebrow,
.skoleni-hero-eyebrow,
.evidence-hero-breadcrumb,
.formular-hero-eyebrow,
.iso-hero-eyebrow,
.politika-hero-eyebrow,
.struktura-hero-eyebrow,
.matrix-hero-eyebrow,
.posouzeni-hero-eyebrow {
    font-family: var(--font-family-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
}

/* Shared stat-label (small mono uppercase, sits above stat-value).
   Note: targets the inline-style class `.stat-label` *within* hero containers
   to avoid colliding with the generic .stat-label used elsewhere. */
.profile-hero-stats .hero-stat-label,
.firmy-hero-stats .stat-label,
.cart-hero .stat-label,
.subs-stat-label,
.skoleni-stat-label,
.evidence-hero-stats .stat-label,
.politika-stat-label,
.struktura-hero-stats .struktura-stat-label,
.posouzeni-hero-stats .stat-label,
.catalog-prop-label,
.matrix-stat-label {
    font-family: var(--font-family-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
}

/* Shared stat-value (big white number) */
.profile-hero-stats .hero-stat-value,
.firmy-hero-stats .stat-value,
.subs-stat-value,
.skoleni-stat-value,
.evidence-hero-stats .stat-value,
.politika-stat-value,
.struktura-hero-stats .struktura-stat-value,
.matrix-stat-value {
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
}

/* =====================================================================
   TOPBAR V2 (2026-05-15) — V4 segment-group nav + V1 workspace chip
   ---------------------------------------------------------------------
   Appended after existing topbar rules. CSS cascade order: later wins,
   so these definitions override the legacy .topbar / .topbar-nav* /
   .lang-switcher* / .cart-badge rules above. Custom selectors NOT
   covered here (.team-modal-*, .org-name, .org-role, .check-icon,
   .topbar-mobile-toggle, .topbar-search, .topbar-avatar) remain intact.
   Source: compliro-redesign/topbar-v2/new-topbar.css
   ===================================================================== */

/* === TOPBAR BASE — light glass =================================== */
.topbar {
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: var(--color-text, #1E2638);
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  padding: 0 24px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 9999;
  gap: 24px;
  overflow: visible;
  border-bottom: 1px solid var(--color-border, #E4DFD3);
  box-shadow: 0 1px 0 rgba(15, 22, 38, 0.04);
  transition: box-shadow 200ms ease;
}
[data-theme="dark"] .topbar { background: rgba(10, 15, 26, 0.7); }
.topbar.scrolled { box-shadow: 0 1px 0 rgba(15, 22, 38, 0.06), 0 4px 12px rgba(15, 22, 38, 0.06); }

/* === LOGO (SVG shield + wordmark) ================================ */
.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-ink, #0F1626) !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.4px;
  white-space: nowrap;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  background-clip: initial !important;
  transition: opacity 150ms ease;
}
.topbar-logo:hover { opacity: 0.75; }
.topbar-logo svg { width: 22px; height: auto; flex-shrink: 0; color: var(--color-ink, #0F1626); }

/* === NAVIGATION — V4 SEGMENT GROUP =============================== */
.topbar-nav {
  display: inline-flex;
  align-items: stretch;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #E4DFD3);
  border-radius: 9px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 22, 38, 0.04));
  /* HOTFIX 2026-05-15: overflow:visible so child .topbar-nav-dropdown
     (position: absolute, top: 100%) is not clipped by parent's rounded
     corners. Inner segments get matching border-radius to preserve the
     pill-shaped end caps. */
  overflow: visible;
  justify-self: center;
  gap: 0;
}
/* Match rounded corners on first/last segment so .active background does
   not bleed past the parent's outer 9px radius. */
.topbar-nav > a:first-child,
.topbar-nav-group:first-child > .topbar-nav-group-trigger {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.topbar-nav > a:last-child,
.topbar-nav-group:last-child > .topbar-nav-group-trigger {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
.topbar-nav > a,
.topbar-nav-group-trigger {
  padding: 0 16px;
  height: 36px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text, #1E2638);
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 120ms ease, color 120ms ease;
}
.topbar-nav > a:hover,
.topbar-nav-group-trigger:hover {
  background: var(--color-bg-alt, #ECE8DF);
}
.topbar-nav > a.active,
.topbar-nav-group-trigger.active {
  background: var(--color-teal-soft, #D7EEEC);
  color: var(--color-teal, #2BA39B);
  font-weight: 600;
  border-bottom: 2px solid var(--color-teal, #2BA39B);
  height: 36px;
}
.topbar-nav > a + a,
.topbar-nav > a + .topbar-nav-group,
.topbar-nav-group + a,
.topbar-nav-group + .topbar-nav-group {
  border-left: 1px solid var(--color-border, #E4DFD3);
}
.topbar-nav-group { display: inline-flex; align-items: stretch; position: relative; }
.topbar-nav-group-trigger .arrow {
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--color-border, #E4DFD3);
  height: 18px;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  color: var(--color-text-secondary, #5A6478);
  line-height: 1;
}
.topbar-nav-group-trigger.active .arrow {
  border-left-color: rgba(43, 163, 155, 0.3);
  color: var(--color-teal, #2BA39B);
}
.topbar-nav-segment-icon { display: inline-flex; opacity: 0.85; }
.topbar-nav-segment-icon svg { width: 14px; height: 14px; }

/* === NAV DROPDOWN MENU (Compliance, Provoz) ===================== */
.topbar-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  /* HOTFIX 2026-05-15: dedicated keyframe that preserves translateX(-50%)
     during the fade-in. The generic compliro-fade-in keyframe set
     transform: translate(0, 4px) which clobbered the -50% centering,
     causing the dropdown to "jump" right at start and snap back when
     the animation ended. */
  transform: translateX(-50%);
  background: var(--color-surface, #fff);
  border-radius: 14px;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 22, 38, 0.14));
  border: 1px solid var(--color-border, #E4DFD3);
  min-width: 280px;
  max-width: calc(100vw - 24px);
  z-index: 10000;
  padding: 6px;
  animation: compliro-nav-dd-fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes compliro-nav-dd-fade-in {
  from { opacity: 0; transform: translate(-50%, 4px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.topbar-nav-group.open .topbar-nav-dropdown,
.topbar-nav-dropdown.open { display: block; }
.topbar-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--color-text, #1E2638);
  font-size: 13px;
  font-weight: 500;
  transition: background 120ms ease, transform 120ms ease;
}
.topbar-nav-dropdown a:hover {
  background: var(--color-bg-alt, #ECE8DF);
  transform: none;
}
.topbar-nav-dropdown a.active {
  background: var(--color-teal-soft, #D7EEEC);
  color: var(--color-teal, #2BA39B);
  font-weight: 600;
}
.topbar-nav-dropdown a .nav-dd-icon,
.topbar-nav-dropdown a > svg {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 7px;
  background: var(--color-surface-muted, #FAF8F4);
  border: 1px solid var(--color-border, #E4DFD3);
  color: var(--color-text-secondary, #5A6478);
  flex-shrink: 0;
  box-sizing: border-box;
}
.topbar-nav-dropdown a:hover .nav-dd-icon,
.topbar-nav-dropdown a:hover > svg {
  background: var(--color-teal-soft, #D7EEEC);
  border-color: var(--color-teal, #2BA39B);
  color: var(--color-teal, #2BA39B);
}
.topbar-nav-dropdown a .nav-dd-label { flex: 1; }

/* === RIGHT CLUSTER =============================================== */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

/* Icon button (theme toggle, cart, admin) */
.topbar-icon-button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-surface-muted, #FAF8F4);
  border: 1px solid var(--color-border, #E4DFD3);
  color: var(--color-text-secondary, #5A6478);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  /* Stránky s obecným pravidlem pro button (padding 10px 24px: formular, iso27001, admin-tips) jinak tlačítku
     přidaly 24 px z každé strany a ikona (zvoneček, přepínač tmavého režimu) se stlačila na šířku 0. */
  padding: 0;
  box-sizing: border-box;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.topbar-icon-button:hover {
  background: var(--color-surface, #fff);
  border-color: var(--color-border-strong, #CFC9BB);
  color: var(--color-ink, #0F1626);
}
.topbar-icon-button svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Cart badge */
.topbar-cart-button { position: relative; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--color-error, #B83A3A);
  border: 2px solid var(--color-bg, #F6F4EF);
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family, inherit);
}
.cart-badge.hidden { display: none; }

/* === MARKETPLACE PILL ============================================ */
.topbar-marketplace-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 36px;
  background: var(--color-teal-soft, #D7EEEC);
  color: var(--color-teal-hover, #1F7C76);
  border: 1px solid var(--color-teal, #2BA39B);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
.topbar-marketplace-btn:hover {
  background: var(--color-teal, #2BA39B);
  color: #fff;
}
.topbar-marketplace-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar-marketplace-separator {
  width: 1px;
  height: 24px;
  background: var(--color-border, #E4DFD3);
  margin: 0 4px;
  flex-shrink: 0;
}

/* === LANGUAGE SWITCHER (zjednodušeno) ============================ */
.lang-switcher { position: relative; }
.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 36px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary, #5A6478);
  background: var(--color-surface-muted, #FAF8F4);
  border: 1px solid var(--color-border, #E4DFD3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 140ms ease;
}
.lang-switcher-btn:hover {
  background: var(--color-surface, #fff);
  color: var(--color-ink, #0F1626);
}
.lang-switcher-btn::after {
  content: '\25BE';
  font-size: 9px;
  opacity: 0.6;
  margin-left: 2px;
}
.lang-switcher-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #E4DFD3);
  border-radius: 10px;
  padding: 6px;
  min-width: 90px;
  box-shadow: var(--shadow-md, 0 6px 18px rgba(15, 22, 38, 0.08));
  z-index: 10000;
  animation: compliro-fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-switcher-dropdown.open { display: block; }
.lang-switcher-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  background: none;
  border: none;
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text, #1E2638);
  cursor: pointer;
}
.lang-switcher-dropdown button:hover {
  background: var(--color-bg-alt, #ECE8DF);
}

/* === WORKSPACE CHIP (sjednocený firma + uživatel) ================ */
.workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 5px;
  height: 36px;
  box-sizing: border-box;
  background: var(--color-surface-muted, #FAF8F4);
  border: 1px solid var(--color-border, #E4DFD3);
  border-radius: 99px;
  cursor: pointer;
  font-family: inherit;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.workspace-chip:hover {
  background: var(--color-surface, #fff);
  border-color: var(--color-border-strong, #CFC9BB);
}
.topbar-dropdown.open .workspace-chip {
  background: var(--color-surface, #fff);
  border-color: var(--color-teal, #2BA39B);
  box-shadow: var(--shadow-md, 0 6px 18px rgba(15, 22, 38, 0.08));
}
.workspace-chip-org-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--color-ink, #0F1626);
  color: var(--color-bg, #F6F4EF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.workspace-chip-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.workspace-chip-org {
  color: var(--color-ink, #0F1626);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-chip-user {
  color: var(--color-text-secondary, #5A6478);
  font-size: 10px;
  line-height: 1.1;
  margin-top: 1px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--color-teal, #2BA39B), var(--color-teal-hover, #1F7C76));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}
.workspace-chip .arrow {
  font-size: 9px;
  opacity: 0.5;
  color: var(--color-text-secondary, #5A6478);
}
.workspace-chip.viewed {
  border-color: var(--color-warning, #C4882C);
  background: var(--color-warning-bg, #F4E6C8);
}
.workspace-chip.viewed .workspace-chip-org-mark {
  background: var(--color-warning, #C4882C);
  color: #fff;
}

/* === UNIFIED WORKSPACE DROPDOWN =================================== */
.topbar-dropdown { position: relative; }
.topbar-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface, #fff);
  border-radius: 14px;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 22, 38, 0.14));
  border: 1px solid var(--color-border, #E4DFD3);
  min-width: 280px;
  z-index: 10000;
  padding: 6px;
  overflow: visible;
  animation: compliro-fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.topbar-dropdown.open .topbar-dropdown-menu,
.topbar-dropdown-menu.open { display: block; }
.workspace-dropdown-header {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--color-border, #E4DFD3);
  margin-bottom: 4px;
}
.workspace-dropdown-header .workspace-chip-org-mark {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.workspace-dropdown-header-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink, #0F1626);
  margin: 0;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-dropdown-header-meta {
  font-size: 11px;
  color: var(--color-text-secondary, #5A6478);
  margin-top: 2px;
}
.topbar-dropdown-header {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  color: var(--color-text-secondary, #5A6478);
  padding: 8px 10px 6px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.topbar-dropdown-item {
  padding: 9px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text, #1E2638);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  transition: background 120ms ease;
  text-decoration: none;
  font-weight: 500;
}
.topbar-dropdown-item:hover {
  background: var(--color-bg-alt, #ECE8DF);
  color: var(--color-ink, #0F1626);
  transform: none;
}
.topbar-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-secondary, #5A6478);
  flex-shrink: 0;
}
.topbar-dropdown-item:hover svg { color: var(--color-teal, #2BA39B); }
.topbar-dropdown-item.danger { color: var(--color-error, #B83A3A); }
.topbar-dropdown-item.danger:hover {
  background: var(--color-error-bg, #F1D8D8);
  color: var(--color-error-text, #8C2828);
}
.topbar-dropdown-item.danger:hover svg { color: var(--color-error, #B83A3A); }
.topbar-dropdown-divider {
  height: 1px;
  background: var(--color-border, #E4DFD3);
  margin: 4px 2px;
}

/* Organization switcher items (přepnout firmu) */
.topbar-dropdown-section { padding: 4px 0; }
.org-switch-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.org-switch-item.active {
  background: var(--color-teal-soft, #D7EEEC);
  color: var(--color-teal, #2BA39B);
  font-weight: 600;
}
.org-switch-item .org-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-switch-item .org-role {
  font-size: 10px;
  color: var(--color-text-secondary, #5A6478);
  margin-left: 8px;
  flex-shrink: 0;
}
.org-switch-item .check-icon {
  color: var(--color-teal, #2BA39B);
  margin-left: 8px;
  flex-shrink: 0;
}

/* "Zpět na vlastní firmu" — žlutá lišta */
.back-to-own-company {
  background: var(--color-warning-bg, #F4E6C8);
  border-bottom: 1px solid var(--color-warning, #C4882C);
  margin: -6px -6px 4px;
  padding: 0;
  border-radius: 13px 13px 0 0;
  overflow: hidden;
}
.back-to-own-company .topbar-dropdown-item {
  color: var(--color-warning-text, #8A5F1A);
  font-weight: 600;
  border-radius: 0;
}
.back-to-own-company .topbar-dropdown-item:hover {
  background: var(--color-warning, #C4882C);
  color: #fff;
}

/* Viewed badge (na chip i v dropdown) */
.viewed-badge {
  font-size: 9px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--color-warning, #C4882C);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  font-weight: 600;
  text-transform: uppercase;
}

/* === Animations =================================================== */
@keyframes compliro-fade-in {
  from { opacity: 0; transform: translate(var(--tx, 0), 4px); }
  to   { opacity: 1; transform: translate(var(--tx, 0), 0); }
}

/* === RESPONSIVE =================================================== */
@media (max-width: 1100px) {
  .workspace-chip-meta { display: none; }
  .workspace-chip { padding: 4px 12px 4px 4px; }
  .topbar-marketplace-btn { padding: 0 10px; }
  .topbar-marketplace-btn .marketplace-label { display: none; }
}
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto auto;
    height: auto;
    padding: 10px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .topbar-nav {
    grid-column: 1 / -1;
    overflow-x: auto;
    width: 100%;
    border-radius: 9px;
  }
  .topbar-nav-dropdown {
    left: 0;
    transform: none;
    width: 100%;
  }
  .topbar-right { gap: 6px; }
  .lang-switcher-btn { padding: 0 8px; }
}
/* === END TOPBAR V2 ============================================== */

/* === COMPANY SWITCH MODAL (obnoveno 2026-06-26 — CSS se ztratilo při overhaul 0141901,
   stejně jako kdysi team-modal; "Přepnout firmu" bez něj nešlo otevřít) === */
.company-switch-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10500;            /* nad topbarem (9999) i dropdowny (10000) — kanonická modal vrstva */
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.company-switch-modal.open { display: flex; }
.company-switch-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.company-switch-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    flex-shrink: 0;
}
.company-switch-modal-header h3 { margin: 0; font-size: 18px; color: #1f2937; }
.company-switch-close {
    background: none; border: none; font-size: 24px; cursor: pointer;
    color: #6b7280; padding: 0; line-height: 1;
}
.company-switch-close:hover { color: #1f2937; }
.company-switch-modal-body { padding: 20px; overflow-y: auto; }
.company-switch-current {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 20px;
}
.company-switch-label {
    font-size: 12px; color: #6b7280; text-transform: uppercase;
    margin-bottom: 4px; font-weight: 600;
}
.company-switch-name { font-size: 16px; font-weight: 600; color: #1f2937; }
.company-switch-section { margin-top: 4px; }
.company-switch-list { display: flex; flex-direction: column; gap: 8px; }
.company-switch-item {
    padding: 12px 16px; background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.company-switch-item:hover { background: #f0f9ff; border-color: #3b82f6; }
.company-switch-item-name { font-weight: 600; color: #1f2937; margin-bottom: 4px; }
.company-switch-item-info { font-size: 13px; color: #6b7280; }
.company-switch-loading,
.company-switch-empty,
.company-switch-error {
    padding: 20px; text-align: center; color: #6b7280; font-size: 14px;
}
.company-switch-error { color: #dc2626; }
.company-switch-item.currently-viewed { background: #dcfce7; border-color: #86efac; }
.viewed-indicator { font-size: 11px; color: #166534; font-weight: 500; margin-left: 8px; }
.company-switch-item .nav-arrow { float: right; opacity: 0.4; margin-top: 2px; }
.company-switch-item:hover .nav-arrow { opacity: 1; }
/* QA0726 (M3): odlišit přepínatelné (vlastní workspace) vs jen-struktura firmy */
.company-switch-action { float: right; font-size: 12px; font-weight: 600; color: #2BA39B; }
.company-switch-action.muted { color: #9ca3af; font-weight: 500; }
.company-switch-item.not-switchable { background: #fbfbfc; border-style: dashed; }
.company-switch-item.not-switchable:hover { background: #f3f4f6; border-color: #d1d5db; }
.modal-breadcrumb-item {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
    background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px;
    margin-bottom: 12px; cursor: pointer; font-size: 13px; color: #475569; transition: all 0.15s;
}
.modal-breadcrumb-item:hover { background: #e2e8f0; color: #1e293b; }
.modal-breadcrumb-item svg { flex-shrink: 0; }
.btn-select-company {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
    padding: 10px 16px; background: #2563eb; color: #fff; border: none;
    border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.btn-select-company:hover { background: #1d4ed8; }
.btn-select-company svg { flex-shrink: 0; }
/* === END COMPANY SWITCH MODAL === */


/* === PŘEDPLATNÉ MICROSOFT STORE (desktop, 2026-09-19) ===================================
   Červený pruh pod topbarem (7 dní před koncem trialu/předplatného), blokovací overlay po vypršení,
   startovací okno + modal „firma nad rámec předplatného", štítky a zašedlá readonly firma v přepínači.
   Staví navigation.js (blok PŘEDPLATNÉ MICROSOFT STORE); mimo desktop se nic z toho nevykresluje. */

/* --- červený pruh --- */
.sub-bar {
  position: sticky;
  top: var(--topbar-height, 56px);          /* navigation.js přepíše skutečnou výškou topbaru */
  z-index: 9000;                             /* pod topbarem (9999), nad obsahem; stejně jako #licenseBanner */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  min-height: 44px;
  padding: 8px 24px;
  box-sizing: border-box;
  background: var(--color-error, #B83A3A);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.sub-bar__text { flex: 1 1 320px; }
.sub-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.sub-bar__btn {
  background: #fff;
  color: var(--color-error, #B83A3A);
  border: 0;
  border-radius: var(--radius-md, 8px);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease;
}
.sub-bar__btn:hover { background: rgba(255,255,255,0.9); }
.sub-bar__link {
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
/* Dark: --color-error je v tmavém tématu světlá (#E27B7B) -- bílý text by na ní nebyl čitelný,
   proto sytější červená se stejným charakterem. */
[data-theme="dark"] .sub-bar { background: #9B3535; color: #fff; }
[data-theme="dark"] .sub-bar__btn { background: #fff; color: #9B3535; }
body.has-sub-bar #licenseBanner { z-index: 8990; }

/* --- štítky a readonly firma v přepínači --- */
.org-switch-item--readonly { opacity: 0.55; cursor: pointer; }
.org-switch-item--readonly:hover { opacity: 0.8; }
.org-switch-item .sub-lock,
.company-switch-item .sub-lock {
  width: 12px;
  height: 12px;
  margin-left: 6px;
  flex-shrink: 0;
  color: var(--color-text-secondary, #5A6478);
  vertical-align: -1px;
}
.sub-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: var(--radius-full, 999px);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  flex-shrink: 0;
  vertical-align: middle;
}
.sub-badge--grace   { background: var(--color-warning-bg, #F4E6C8); color: var(--color-warning-text, #8A5F1A); }
.sub-badge--pending { background: var(--color-error-bg, #F1D8D8);   color: var(--color-error-text, #8C2828); }
.org-switch-footer,
.sub-companies-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding: 8px 12px 6px;
  font-size: 11px;
  color: var(--color-text-secondary, #5A6478);
}
.sub-companies-footer { margin-top: 10px; padding: 10px 4px 0; border-top: 1px solid var(--color-border, #E4DFD3); font-size: 12px; }
.org-switch-footer a,
.sub-companies-footer a {
  color: var(--color-teal, #2BA39B);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.org-switch-footer a:hover,
.sub-companies-footer a:hover { text-decoration: underline; }

/* --- toast (kanonický) ---
   Stránky od Phase 2 (2026-05-13) nesou komentář „.toast canonical moved to components.css“, ale pravidlo tu
   nikdy nebylo: showToast() z utils.js (#toast + třída .show) tak vykresloval holý text v místě prvku #toast
   (nalezeno 2026-09-19 při QA toastů předplatného). Přepínač: `.show` (utils.js) i legacy `.visible`
   (formular.html alias). Stránkové inline definice .toast (jsou-li) mají přednost -- načítají se později. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: var(--z-toast, 11000);
  max-width: min(92vw, 640px);
  padding: 12px 18px;
  box-sizing: border-box;
  border-radius: var(--radius-md, 8px);
  background: var(--color-text, #1E2638);
  color: var(--color-bg, #F6F4EF);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(15,22,38,0.2));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}
.toast.show,
.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.success { background: var(--color-success, #2A8F5C); color: #fff; }
.toast.error   { background: var(--color-error, #B83A3A); color: #fff; }
.toast.warning { background: var(--color-warning, #C4882C); color: #fff; }
.toast.info    { background: var(--color-teal, #2BA39B); color: #fff; }

/* --- modaly (startovací okno, firma nad limit) --- */
.sub-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 10500);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15,22,38,0.6);
}
.sub-modal__card {
  background: var(--color-surface, #fff);
  color: var(--color-text, #0F1626);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,0.3));
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
  animation: sub-fade-in 200ms ease;
}
.sub-modal__title { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.sub-modal__body { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--color-text-secondary, #5A6478); }
.sub-modal__hint { margin: 0 0 16px; font-size: 12px; }
.sub-modal__hint a { color: var(--color-teal, #2BA39B); }
.sub-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* --- blokovací overlay (předplatné neaktivní) --- */
.sub-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;                            /* nad modaly (10500) i dropdowny; pod #desktopLockOverlay (100000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15,22,38,0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sub-overlay__card {
  background: var(--color-surface, #fff);
  color: var(--color-text, #0F1626);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,0.3));
  max-width: 560px;
  width: 100%;
  padding: 32px 28px;
  box-sizing: border-box;
  text-align: center;
  animation: sub-fade-in 220ms ease;
}
.sub-overlay__logo svg { width: 48px; height: auto; color: var(--color-text, #0F1626); }
.sub-overlay__title { margin: 12px 0 8px; font-size: 22px; font-weight: 700; }
.sub-overlay__body { margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--color-text-secondary, #5A6478); }
.sub-overlay__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sub-overlay__status { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--color-text-secondary, #5A6478); }
.sub-overlay__hint { margin: 16px 0 0; font-size: 12px; color: var(--color-text-secondary, #5A6478); }
.sub-overlay__hint a { color: var(--color-teal, #2BA39B); }
body.sub-blocked { overflow: hidden; }

@keyframes sub-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sub-modal__card, .sub-overlay__card { animation: none; }
  .sub-bar__btn, .org-switch-item--readonly { transition: none; }
}
@media (max-width: 640px) {
  .sub-bar { padding: 8px 16px; font-size: 13px; }
  .sub-overlay__card, .sub-modal__card { padding: 20px 16px; }
}
/* === KONEC PŘEDPLATNÉ MICROSOFT STORE === */
