/* ZOKB Manazer — design system s brand paletou.
   Centralizovane barvy a tokeny v :root pro pristi tweaky.
*/

:root {
  /* === BRAND PALETA (navy → aqua) === */
  --brand-aqua-50:  #e8f5fa;
  --brand-aqua-100: #c9e8f4;
  --brand-aqua-200: #a3d6eb;
  --brand-aqua-300: #76bee1;  /* user-vybraná */
  --brand-aqua-400: #4fa9d2;
  --brand-aqua-500: #2e8fbd;  /* primary CTA */
  --brand-aqua-600: #1e75a1;
  --brand-aqua-700: #155b80;

  --brand-navy-700: #1a3a5c;
  --brand-navy-800: #0f2540;  /* hlavní navy */
  --brand-navy-900: #08182c;

  /* === SEMANTIC TOKENY === */
  --color-text:        #1a2332;
  --color-text-muted:  #607080;
  --color-text-dim:    #94a3b8;

  --color-bg:          #f0f4f7;
  --color-surface:     #ffffff;
  --color-surface-glass: rgba(255, 255, 255, 0.72);
  --color-border:      #e2e8f0;
  --color-border-soft: rgba(255, 255, 255, 0.55);

  /* Status barvy (laděné k brandu) */
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger:  #dc2626;
  --color-info:    var(--brand-aqua-500);

  /* Stíny */
  --shadow-sm:   0 1px 2px rgba(15, 37, 64, 0.04);
  --shadow-md:   0 4px 16px rgba(15, 37, 64, 0.06), 0 1px 3px rgba(15, 37, 64, 0.04);
  --shadow-lg:   0 8px 32px rgba(15, 37, 64, 0.10), 0 2px 6px rgba(15, 37, 64, 0.05);
  --shadow-glow: 0 4px 16px rgba(46, 143, 189, 0.25);

  /* Spacing / radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* Aplikační layout — jemný aqua gradient mesh pod glass kartami */
/* Pozadí na html (ne body) + scroll-along místo fixed — fixed gradient repaintuje
   na každém frame scrollu a zabíjí výkon. Statické pozadí stačí pro vizuální tón. */
.body--app {
  background: linear-gradient(135deg, #eef4f8 0%, #e6eff5 60%, #dde9f1 100%);
}

/* === Legacy topbar styly — ponechány pro neauthenticated stránky (login/onboard) === */
.topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: #0f2540;
  color: #fff;
  min-height: 56px;
}
.topbar__brand {
  font-weight: 700;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  font-size: 1.1em;
}
.topbar__nav {
  display: flex;
  align-items: stretch;
  flex: 1;
  margin-left: 2rem;
  justify-content: space-between;
}
.topbar__menu {
  list-style: none;
  display: flex;
  gap: .25rem;
  padding: 0;
  margin: 0;
  align-items: stretch;
}
.topbar__menu li { display: flex; align-items: stretch; }
.topbar__menu a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.topbar__menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.topbar__menu a.is-active {
  border-bottom-color: #4dabf7;
  color: #fff;
  background: rgba(255, 255, 255, .05);
}
.topbar__user-area { display: flex; align-items: center; gap: 1rem; }
.topbar__user {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .92em;
}
.topbar__user-email { opacity: .7; font-size: .9em; }
.badge--dark { background: rgba(255, 255, 255, .15); color: #fff; }

/* === user-menu dropdown === */
.user-menu { position: relative; display: flex; align-items: stretch; }
.user-menu__trigger {
  background: transparent; border: none; color: #fff;
  font: inherit; font-weight: 500; cursor: pointer;
  padding: 0 1rem; display: flex; align-items: center; gap: .5rem;
  transition: background .15s;
}
.user-menu__trigger:hover { background: rgba(255, 255, 255, .08); }
.user-menu__trigger[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.user-menu__chevron { font-size: .7em; opacity: .7; }

.user-menu__panel {
  position: absolute; top: 100%; right: 0;
  background: #fff; color: #1a1d22;
  min-width: 260px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  z-index: 1000;
  overflow: hidden;
}
.user-menu__panel[hidden] { display: none; }

.user-menu__user {
  padding: .9rem 1rem; background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.user-menu__user strong { display: block; font-size: 1.02em; }
.user-menu__email { color: #6b7280; font-size: .88em; margin-top: .15rem; word-break: break-all; }
.user-menu__roles { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .5rem; }

.user-menu__item {
  display: block; padding: .65rem 1rem;
  color: #1a1d22; text-decoration: none;
  background: none; border: none; width: 100%; text-align: left;
  font: inherit; cursor: pointer;
}
.user-menu__item:hover { background: #f1f5f9; }
.user-menu__item--danger { color: #b91c1c; }
.user-menu__item--danger:hover { background: #fee2e2; color: #991b1b; }
.user-menu__divider { border-top: 1px solid #e5e7eb; margin: 0; }
.user-menu__logout-form { display: block; margin: 0; }
.badge + .badge { margin-left: .25rem; }

.role-checkboxes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.role-checkboxes li { display: flex; align-items: center; gap: .4rem; padding: .25rem .5rem; border-radius: 4px; background: #f8fafc; }
.role-checkboxes li:hover { background: #e2e8f0; }
.role-checkboxes input[type="checkbox"] { margin: 0; }
.role-checkboxes label { font-weight: 400; cursor: pointer; margin: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}
/* Užší breakpoint: pod 1280 px viewport → 1000 px container
   (1000 + 260 sidebar = 1260, vejde se i na 1280 px monitory). */
@media (max-width: 1280px) {
  .container { max-width: 1000px; padding: 0 1.5rem; }
}
.body--auth .container { max-width: 720px; }

/* === APLIKAČNÍ LAYOUT: sticky vertikální sidebar + main === */

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* --- SIDEBAR (navy gradient s aqua akcenty) --- */
.sidebar {
  flex: 0 0 260px;
  width: 260px;
  background:
    linear-gradient(180deg,
      var(--brand-navy-900) 0%,
      var(--brand-navy-800) 50%,
      var(--brand-navy-700) 100%);
  color: #cbd5e1;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 2px 0 24px rgba(8, 24, 44, 0.15);
  z-index: 10;
}
.sidebar__brand {
  padding: 1.1rem 1.25rem .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
}
.sidebar__brand a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: .02em;
}
.sidebar__brand a:hover { color: #fff; text-decoration: none; }

.sidebar__logo {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
}
.sidebar__logo img {
  max-width: 100%;
  max-height: 100px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}
.sidebar__org-name {
  margin-top: .55rem;
  font-size: .82em;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: .02em;
}

.sidebar__nav {
  flex: 1 1 auto;
  padding: .75rem 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}
/* Sekce v sidebaru — "Agenda" (výstupy) vs "Evidence" (registry).
   Auditor okamžitě vidí: dokumentace + incidenty jsou produkt,
   aktiva/rizika/lidé/atd. jsou podklady. */
.sidebar__section-label {
  font-size: .68em;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(118, 190, 225, 0.55);
  padding: 1.1rem 1.25rem .4rem;
  font-weight: 700;
  user-select: none;
}
.sidebar__section-label:first-child { padding-top: .35rem; }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.25rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: .94em;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.sidebar__link:hover {
  background: linear-gradient(90deg, rgba(118, 190, 225, 0.08), transparent);
  color: #fff;
  text-decoration: none;
}
.sidebar__link.is-active {
  background: linear-gradient(90deg, rgba(118, 190, 225, 0.22), transparent);
  color: #fff;
  border-left-color: var(--brand-aqua-300);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(118, 190, 225, 0.1);
}
.sidebar__link-icon {
  display: inline-flex;
  width: 1.25em;
  font-size: 1em;
  text-align: center;
  opacity: .75;
  color: var(--brand-aqua-300);
}
.sidebar__link:hover .sidebar__link-icon,
.sidebar__link.is-active .sidebar__link-icon { opacity: 1; }

.sidebar__bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: .5rem 0 0 0;
  display: flex;
  flex-direction: column;
}

/* --- USER BLOCK (dropdown nahoru) --- */
.sidebar__user {
  position: relative;
  padding: .5rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sidebar__user-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .75rem;
  background: transparent;
  color: #cbd5e1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .12s;
}
.sidebar__user-trigger:hover { background: rgba(255, 255, 255, .06); }
.sidebar__avatar {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-aqua-300), var(--brand-aqua-600));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .82em;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(46, 143, 189, 0.35);
}
.sidebar__user-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sidebar__user-info strong {
  color: #fff;
  font-size: .9em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-email {
  font-size: .72em;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-trigger .user-menu__chevron {
  font-size: .75em;
  opacity: .65;
}
.sidebar__user-panel {
  position: absolute;
  bottom: calc(100% + 4px);
  left: .5rem;
  right: .5rem;
  background: #fff;
  color: #1a1d22;
  border-radius: 8px;
  padding: .35rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  z-index: 20;
}
.sidebar__user-roles {
  padding: .5rem .85rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

/* --- MAIN AREA --- */
.main-area {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- Auth header (neauth layout) --- */
.auth-header {
  background: #0f2540;
  color: #fff;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}
.auth-header__brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05em;
}
.auth-header__logo {
  max-height: 32px;
  background: #fff;
  padding: 4px;
  border-radius: 4px;
}

/* --- Responsive: pod 900px sidebar přejde nad obsah jako horizontal --- */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: 60vh;
    position: relative;
  }
  .container { padding: 0 1rem; }
}

.hero {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.hero h1 { margin: 0 0 .5rem 0; }
.next-steps { padding-left: 1.2rem; line-height: 1.6; }

.flash { list-style: none; padding: 0; margin: 0 0 1.25rem 0; }
.flash li {
  padding: .8rem 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: .5rem;
  border-left: 4px solid #888;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}
.flash--info    { border-left-color: var(--brand-aqua-500); background: var(--brand-aqua-50); }
.flash--warning { border-left-color: var(--color-warning); background: #fff7e6; }
.flash--danger  { border-left-color: var(--color-danger); background: #fdecea; }
.flash--success { border-left-color: var(--color-success); background: #eaf7ee; }

.footer {
  text-align: center;
  color: #6b7280;
  margin: 2rem 0 1rem;
}

code {
  background: #eef0f3;
  padding: .1rem .35rem;
  border-radius: 4px;
  font-size: .92em;
}

/* === auth pages === */
.topbar__user { margin-right: 1rem; opacity: .9; }
.topbar__logout { display: inline; margin: 0; padding: 0; }
.link-btn {
  background: none; border: none; color: #fff; cursor: pointer;
  text-decoration: underline; opacity: .85; padding: 0;
}
.link-btn:hover { opacity: 1; }
.topbar__brand a { color: inherit; text-decoration: none; }

.body--auth .topbar__nav { display: none; }

.auth-card {
  max-width: 420px;
  margin: 3rem auto;
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}
.auth-card--wide { max-width: 640px; }
.auth-card h1 { margin: 0 0 .25rem 0; }
.auth-card .muted { color: #6b7280; margin-bottom: 1.25rem; }
.auth-card .small { font-size: .9em; }
.auth-alt { margin-top: 1rem; font-size: .9em; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field .input,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
}
.field--checkbox { display: flex; align-items: center; gap: .5rem; }
.field--checkbox label { font-weight: 400; margin: 0; }
.field__errors { margin: .25rem 0 0 0; padding-left: 1.2rem; color: #c0392b; font-size: .9em; }

/* === Unifikovany btn system ===
   Varianty: --primary (hlavni CTA), --secondary (vedlejsi akce),
             --danger (destruktivni), --ghost (navigacni "back" linky)
*/
.btn {
  display: inline-block; padding: .5rem 1rem;
  border: 1px solid transparent; border-radius: 6px;
  font-size: .95em; font-weight: 600; line-height: 1.35;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.btn--primary {
  background: linear-gradient(135deg, var(--brand-aqua-500), var(--brand-aqua-600));
  color: #fff;
  border-color: var(--brand-aqua-600);
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--brand-aqua-400), var(--brand-aqua-500));
  color: #fff;
  box-shadow: 0 6px 20px rgba(46, 143, 189, 0.35);
  transform: translateY(-1px);
}

.btn--secondary {
  background: #ffffff;
  color: var(--brand-navy-800);
  border-color: var(--brand-aqua-200);
}
.btn--secondary:hover {
  background: var(--brand-aqua-50);
  border-color: var(--brand-aqua-400);
  color: var(--brand-aqua-700);
}

.btn--danger {
  background: #fff;
  color: var(--color-danger);
  border-color: #fca5a5;
}
.btn--danger:hover { background: #fee2e2; border-color: var(--color-danger); color: #991b1b; }

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}
.btn--ghost:hover { background: rgba(118, 190, 225, 0.12); color: var(--brand-aqua-700); }

.btn--small { padding: .3rem .65rem; font-size: .88em; }

a.btn { display: inline-block; }
button.btn { font-family: inherit; }

/* Akce v group – tlacitka vedle sebe s konzistentnimi mezerami */
.actions-bar { display: inline-flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

.alert {
  padding: .85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.alert--warning { background: #fff7e6; border-left: 4px solid #d98800; }

.setup-steps { margin: 1rem 0 1.5rem; padding-left: 1.25rem; line-height: 1.7; }

.totp-setup {
  display: flex; gap: 1.5rem; align-items: center;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}
.totp-setup__qr {
  width: 200px; height: 200px;
  background: #fff; padding: .5rem; border: 1px solid #e5e7eb; border-radius: 6px;
}
.totp-setup__manual { flex: 1; min-width: 200px; }
.secret {
  display: inline-block; padding: .35rem .6rem;
  background: #1f2937; color: #fff; font-size: .95em;
  border-radius: 4px; user-select: all;
}

.recovery-codes {
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem;
  margin: 1rem 0 1.5rem; padding: 1rem;
  background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 6px;
  list-style: none;
}
.recovery-codes li code {
  background: transparent; font-size: 1.05em; font-weight: 600;
}

/* === onboard wizard === */
.wizard { max-width: 720px; margin: 2rem auto; }
.wizard__steps {
  display: flex; gap: 1rem; padding: 0; margin: 0 0 2rem 0;
  list-style: none; justify-content: center;
}
.wizard__step {
  display: flex; align-items: center; gap: .5rem;
  color: #94a3b8; font-size: .92em;
}
.wizard__step.is-active { color: #0f2540; font-weight: 600; }
.wizard__step.is-done { color: #2f8a4f; }
.wizard__step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #cbd5e1; color: #fff; font-size: .85em; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.wizard__step.is-active .wizard__step-num { background: #0f2540; }
.wizard__step.is-done .wizard__step-num { background: #2f8a4f; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.summary { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 1.5rem 0; }
.summary dt { font-weight: 600; color: #475569; }
.summary dd { margin: 0; }
.company-list { list-style: none; padding: 0; margin: 0; }
.company-list li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; }
.company-badge {
  display: inline-block; width: 14px; height: 14px; border-radius: 3px;
  background: #2E86DE;
}

/* === user management === */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap;
}
.page-header h1 {
  margin: 0;
  color: var(--brand-navy-800);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.page-header .muted { margin-top: 4px; }

/* Globální typografie — sladit s brand barvami */
h1, h2, h3, h4 { color: var(--brand-navy-800); letter-spacing: -0.01em; }
a { color: var(--brand-aqua-600); }
a:hover { color: var(--brand-aqua-700); }

.data-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.data-table th, .data-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.data-table th { background: #f8fafc; font-weight: 600; font-size: .9em; color: #475569; }
.data-table tr.is-inactive { opacity: .55; }
.data-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block; padding: .15rem .55rem;
  background: #e2e8f0; border-radius: 4px;
  font-size: .85em; font-weight: 600; color: #475569;
}
.badge + .badge { margin-left: .25rem; }
.badge--dark { background: rgba(255, 255, 255, .15); color: #fff; }

.status { font-size: .9em; padding: .15rem .5rem; border-radius: 4px; }
.status--ok { background: #d1fae5; color: #065f46; }
.status--pending { background: #fef3c7; color: #92400e; }
.status--inactive { background: #fee2e2; color: #991b1b; }

.actions { white-space: nowrap; }
.actions .inline-form { display: inline; margin-right: .5rem; }
.link-btn--danger { color: #c0392b; }
.link-btn--danger:hover { color: #991b1b; }

.muted { color: #6b7280; }
.muted.small, .small { font-size: .9em; }

.role-checkboxes {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem;
}
.role-checkboxes li {
  display: flex; align-items: center; gap: .4rem;
  padding: .25rem .5rem; border-radius: 4px; background: #f8fafc;
}
.role-checkboxes li:hover { background: #e2e8f0; }
.role-checkboxes input[type="checkbox"] { margin: 0; }
.role-checkboxes label { font-weight: 400; cursor: pointer; margin: 0; }

/* === assets === */
.asset-code {
  background: #1f2937; color: #fff; font-weight: 600;
  padding: .15rem .5rem; border-radius: 4px; font-size: .9em;
  white-space: nowrap;   /* T-01 / PA-S-01 nesmi zalomit na dva radky */
}
.asset-name { color: var(--brand-navy-800); text-decoration: none; font-weight: 500; }
.asset-name:hover { color: var(--brand-aqua-600); text-decoration: none; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-bottom: 1.25rem; padding: .75rem;
  background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  align-items: center;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px;
  text-decoration: none; color: #475569;
  background: #f1f5f9; font-size: .9em; font-weight: 500;
  transition: background .15s;
}
.filter-chip:hover { background: #e2e8f0; }
.filter-chip.is-active { background: #0f2540; color: #fff; }
.filter-chip.is-active .filter-chip__count { background: rgba(255,255,255,.25); color: #fff; }
.filter-chip__count {
  display: inline-block; padding: 0 .4rem; border-radius: 999px;
  background: #cbd5e1; color: #475569; font-size: .82em; font-weight: 600;
  min-width: 1.4em; text-align: center;
}
.filter-bar__separator { flex: 1; }
.filter-chip--toggle { background: #fff7e6; color: #92400e; }
.filter-chip--toggle.is-active { background: #d98800; color: #fff; }

.cia {
  display: inline-block; min-width: 1.6em; padding: .1rem .4rem;
  border-radius: 4px; font-size: .85em; font-weight: 600; text-align: center;
  color: #fff; margin-right: 2px;
}
.cia--1 { background: #94a3b8; }
.cia--2 { background: #64748b; }
.cia--3 { background: #2563eb; }
.cia--4 { background: #d97706; }
.cia--5 { background: #dc2626; }

.empty-state {
  text-align: center; padding: 3rem 1rem;
  background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  color: #6b7280;
}

/* Formulář se chová jako každý jiný obsah v containeru — plná šířka.
   (Dřív měl max-width: 800px, takže byl užší než list/detail karty.) */
.card-form { width: 100%; }

.form-section {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}
/* Float-trik: legend default sedí PŘES top border fieldsetu (border se
   pod ní přeruší). Floatem legend vytrhneme z toho speciálního pozicování
   a chová se jako běžný blok uvnitř karty. */
.form-section legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 1.25rem 0;
  font-weight: 600;
  font-size: 1.05em;
  color: var(--brand-navy-800);
  letter-spacing: -0.01em;
}
.form-section legend + * { clear: left; }
.form-row--4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (max-width: 640px) { .form-row--4 { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
/* Bez backdrop-filter: zabíjí scroll FPS když je víc karet na obrazovce.
   Místo glass-blur použijeme vyšší opacity bílé (95%) + jemný border + měkký shadow.
   Vizuálně to vypadá podobně frosty, GPU nepotí. */
.card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow .15s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
}
.card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.05em;
  color: var(--brand-navy-800);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card__header { display: flex; justify-content: space-between; align-items: center; }
.card__header h2 { margin: 0; }

.dep-list { list-style: none; padding: 0; margin: 0; }
.dep-list__item {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: .6rem .75rem; border-radius: 6px;
  border: 1px solid #e5e7eb; margin-bottom: .35rem;
  background: #fafbfc;
}
.dep-list__item:hover { background: #f1f5f9; }
.dep-list__main { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dep-list__main .asset-name { font-weight: 500; }
/* Poznámka pod závislostí zalomí na vlastní řádek (full-width v flex containeru) */
.dep-list__main > .muted.small { flex-basis: 100%; margin: 2px 0 0 0; }

/* === Diff side-by-side === */
.diff-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 1100px) { .diff-grid { grid-template-columns: 1fr; } }

/* === Verdict card (Incident detail) === */
.verdict-card {
  border-left: 6px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.verdict-card--hlasit { border-left-color: #dc2626; background: #fef2f2; }
.verdict-card--kbi    { border-left-color: #f59e0b; background: #fffbeb; }
.verdict-card--kbu    { border-left-color: #16a34a; background: #ecfdf5; }

.verdict-card__header { display: flex; align-items: center; gap: 1.1rem; }
.verdict-card__icon {
  font-size: 1.8em;
  line-height: 1;
  flex: 0 0 2em;
  text-align: center;
}
.verdict-card--hlasit .verdict-card__icon { color: #dc2626; }
.verdict-card--kbi    .verdict-card__icon { color: #d97706; }
.verdict-card--kbu    .verdict-card__icon { color: #16a34a; }

.verdict-card__title { font-size: 1.2em; font-weight: 700; color: var(--brand-navy-800); }
.verdict-card__meta { color: var(--color-text); margin-top: .25rem; font-size: .95em; }
.verdict-card__action {
  margin-top: 1rem;
  padding: .85rem 1.1rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: .95em;
  line-height: 1.5;
}
.verdict-card__action strong { color: var(--brand-navy-800); }

/* === Scale buttons (klikací barevné [1][2][3] místo number inputu) === */
.scale-buttons {
  display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.scale-buttons__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 36px; padding: 0 .6rem;
  border-radius: 6px; border: 2px solid transparent;
  font-weight: 700; font-size: 1em; line-height: 1;
  cursor: pointer; opacity: .45;
  font-family: inherit;
  transition: opacity .12s, transform .1s, border-color .12s, box-shadow .12s;
  user-select: none;
}
.scale-buttons__btn:hover { opacity: .85; transform: translateY(-1px); }
.scale-buttons__btn.is-selected {
  opacity: 1; border-color: #0f2540;
  box-shadow: 0 2px 6px rgba(15,37,64,.18); transform: scale(1.05);
}
.scale-buttons__btn--clear {
  background: #f1f5f9; color: #475569; min-width: 32px;
}
.scale-buttons__btn--clear.is-selected {
  background: #fff; border-color: #475569;
}
.cia.cia--0 { background: #94a3b8; color: #fff; }
.verdict-card__action {
  margin-top: 1rem; padding: .75rem 1rem; background: rgba(255,255,255,.55);
  border-radius: 6px;
}

/* Damage list pro incident detail */
.damage-list { list-style: none; padding: 0; margin: 0; }
.damage-list__item {
  padding: 5px 8px; border-radius: 4px; margin-bottom: 2px;
  color: #6b7280;
}
.damage-list__item.is-active { background: #fef2f2; color: #991b1b; font-weight: 500; }
.dmg-mark {
  display: inline-block; width: 1.4em; text-align: center;
  font-weight: 700; color: #dc2626;
}
.dmg-mark--off { color: #94a3b8; font-weight: 400; }

/* Area block v create form */
.area-block {
  margin-bottom: 1rem; padding: .75rem 1rem;
  background: #fafbfc; border: 1px solid #e5e7eb; border-radius: 6px;
}
.area-block__header { display: flex; justify-content: space-between; align-items: baseline; }
.area-block p { margin: .25rem 0 .5rem 0; }

/* === Compliance summary kachle (BD-01) ===
   Dvě podoby:
   - default (`.compliance-summary`): auto-fit grid — pro málo kachlí (např. eol = 3 ks)
   - split (`.compliance-summary--split` + `.compliance-summary__small` wrapper):
     levá hlavní kachle 33 % (procento ze všech) + pravá mřížka 3 sloupců × N řádků
     pro 5 stavových kachlí (zavedeno/v implementaci/plánováno/nezavedeno/N/A).
*/
.compliance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .85rem; margin-bottom: 1.5rem;
}
.compliance-summary--split { grid-template-columns: 1fr 2fr; }
@media (max-width: 1100px) {
  .compliance-summary--split { grid-template-columns: 1fr; }
}
.compliance-summary__small {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  align-content: start;
}
@media (max-width: 700px) {
  .compliance-summary__small { grid-template-columns: 1fr 1fr; }
}

.compliance-card {
  display: block; padding: .75rem .95rem; border-radius: var(--radius-md);
  background: #fff; border: 1px solid #e5e7eb;
  text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .12s;
}
.compliance-card:hover {
  text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,37,64,.08);
}
.compliance-card--main {
  background: linear-gradient(135deg, var(--brand-navy-800), var(--brand-aqua-700));
  color: #fff; border-color: var(--brand-navy-800);
  padding: 1.1rem 1.25rem;
}
.compliance-card--main .compliance-card__label,
.compliance-card--main .compliance-card__sub { color: rgba(255,255,255,.85); }
.compliance-card__label {
  font-size: .78em; text-transform: uppercase; letter-spacing: .03em;
  font-weight: 600; color: var(--color-text-muted);
}
.compliance-card__value {
  font-size: 1.9em; font-weight: 700; line-height: 1.1; margin: .2rem 0 0 0;
}
/* Malá kachle: hodnota vlevo (větší), procento vpravo (menší, baseline) v jednom řádku. */
.compliance-card--small .compliance-card__value { font-size: 1.65em; }
.compliance-card__value-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem; margin-top: .2rem;
}
.compliance-card__pct {
  font-size: .82em; font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.compliance-card__sub { color: var(--color-text-muted); margin-top: .15rem; }
.compliance-card__alert {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .75rem; padding: .4rem .65rem; border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.22); color: #fecaca; font-size: .85em;
  line-height: 1.35;
}
.compliance-card__alert .fa-solid { color: #fca5a5; }
.compliance-card.status--ok { background: #ecfdf5; border-color: #86efac; }
.compliance-card.status--progress { background: #eff6ff; border-color: #93c5fd; }
.compliance-card.status--planned { background: #fffbeb; border-color: #fcd34d; }
.compliance-card.status--missing { background: #fef2f2; border-color: #fca5a5; }
.compliance-card.status--na { background: #f1f5f9; border-color: #cbd5e1; }

/* Status badges varianty pro kontrolní list */
.status--progress { background: #dbeafe; color: #1e3a8a; }
.status--planned { background: #fef3c7; color: #92400e; }
.status--missing { background: #fee2e2; color: #991b1b; }
.status--na { background: #f1f5f9; color: #475569; }
/* Účinné — aktivní verze dokumentu / politiky.
   Sytější zelená než status--ok (Schváleno), aby auditor poznal "to je
   ta verze co teď platí". */
.status--effective {
  background: #16a34a;
  color: #fff;
  font-weight: 600;
}

/* Highlight řádku Účinné verze v tabulce historie. */
.data-table tr.is-effective td {
  background: #f0fdf4;
  font-weight: 500;
}

/* Priority badges */
.badge.prio--vysoka { background: #fee2e2; color: #991b1b; }
.badge.prio--stredni { background: #fef3c7; color: #92400e; }
.badge.prio--nizka { background: #ecfdf5; color: #166534; }

/* Filter bar pro list view */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  padding: .85rem 1rem; background: #f8fafc;
  border: 1px solid #e5e7eb; border-radius: 6px; margin-bottom: 1rem;
}
.filter-bar__field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.filter-bar__field label { font-size: .82em; font-weight: 600; color: #475569; }
.filter-bar__field select, .filter-bar__field input {
  padding: .45rem .6rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: .95em;
}

/* Control refs chips */
.control-refs { display: flex; flex-wrap: wrap; gap: .5rem; }
.control-ref {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: 6px 12px; border-radius: 6px;
  text-decoration: none; color: #0f2540;
  border: 1px solid #cbd5e1; background: #f8fafc;
  font-size: .9em;
}
.control-ref:hover { text-decoration: none; border-color: #2563eb; background: #eff6ff; }
.control-ref--policy { border-left: 3px solid #2563eb; }
.control-ref--document { border-left: 3px solid #16a34a; }

/* === Schvalovací řetězec (chain progress) === */
.chain-progress {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem;
  margin-bottom: .5rem;
}
.chain-step {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .55rem .85rem; border-radius: 6px;
  min-width: 200px; flex: 1 1 220px;
  border: 1px solid #e5e7eb; background: #f8fafc;
}
.chain-step--done { background: #ecfdf5; border-color: #86efac; }
.chain-step--pending { background: #fffbeb; border-color: #fcd34d; }
.chain-step__icon {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: #94a3b8;
}
.chain-step--done .chain-step__icon { background: #16a34a; }
.chain-step--pending .chain-step__icon { background: #f59e0b; color: #1a1d22; }
.chain-step__body { flex: 1 1 auto; }
.chain-arrow {
  display: inline-flex; align-items: center;
  color: #94a3b8; font-size: 1.4em; padding: 0 .25rem;
}

/* === Unified diff (řádkový) === */
.udiff {
  font-family: 'Consolas', 'Courier New', monospace; font-size: 13px;
  background: #fafbfc; border: 1px solid #e5e7eb; border-radius: 6px;
  overflow-x: auto; max-height: 600px; overflow-y: auto;
}
.udiff__line {
  display: flex; gap: .6rem; padding: 1px 8px;
  white-space: pre-wrap; word-break: break-word;
}
.udiff__marker {
  flex: 0 0 1em; text-align: center; opacity: .65; font-weight: 700;
}
.udiff__line--equal { background: #fff; color: #475569; }
.udiff__line--delete { background: #fee2e2; color: #991b1b; }
.udiff__line--delete .udiff__marker { color: #dc2626; }
.udiff__line--insert { background: #dcfce7; color: #166534; }
.udiff__line--insert .udiff__marker { color: #16a34a; }

/* === Rich-text editor (contenteditable + toolbar) === */
.rich-editor {
  border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; overflow: hidden;
}
.rich-editor__toolbar {
  display: flex; flex-wrap: wrap; gap: 2px;
  background: #f1f5f9; border-bottom: 1px solid #cbd5e1;
  padding: 4px 6px;
}
.rich-editor__toolbar button {
  background: transparent; border: 1px solid transparent;
  padding: 4px 9px; border-radius: 4px;
  font-size: .85em; font-weight: 500;
  cursor: pointer; color: #1a1d22;
  font-family: inherit;
}
.rich-editor__toolbar button:hover { background: #fff; border-color: #cbd5e1; }
.rich-editor__toolbar button:active { background: #e5e7eb; }
.rich-editor__toolbar .sep {
  width: 1px; background: #cbd5e1; margin: 2px 4px;
}
.rich-editor__content {
  min-height: 280px; padding: 1rem 1.1rem;
  font-size: 14px; line-height: 1.55; color: #1a1d22;
  outline: none;
}
.rich-editor__content:focus { background: #fffef7; }
.rich-editor__content h2 { font-size: 1.4em; margin-top: 1.2em; }
.rich-editor__content h3 { font-size: 1.18em; margin-top: 1em; }
.rich-editor__content h4 { font-size: 1.05em; margin-top: .8em; }
.rich-editor__content p { margin: .6em 0; }
.rich-editor__content ul, .rich-editor__content ol { margin: .6em 0; padding-left: 1.6em; }
.rich-editor__content blockquote {
  border-left: 3px solid #cbd5e1; padding: .25em .9em;
  margin: .8em 0; color: #475569; background: #f8fafc;
}
.rich-editor__content code {
  background: #f1f5f9; padding: 1px 5px; border-radius: 3px;
  font-family: 'Consolas', monospace; font-size: .92em;
}
.rich-editor__content pre {
  background: #f1f5f9; padding: .7em 1em; border-radius: 4px;
  overflow-x: auto; font-family: 'Consolas', monospace;
}
.rich-editor__content table {
  border-collapse: collapse; margin: .6em 0; min-width: 60%;
}
.rich-editor__content th, .rich-editor__content td {
  border: 1px solid #cbd5e1; padding: 4px 8px;
}
.rich-editor__content a { color: #2563eb; }

/* Render obsahu dokumentu (mimo editor — detail page) */
.document-content { font-size: 14px; line-height: 1.6; }
.document-content h2 { font-size: 1.4em; margin-top: 1.5em; color: #0f2540; }
.document-content h3 { font-size: 1.18em; margin-top: 1.1em; color: #0f2540; }
.document-content blockquote {
  border-left: 3px solid #cbd5e1; padding: .25em 1em;
  margin: .8em 0; color: #475569; background: #f8fafc;
}
.document-content table { border-collapse: collapse; margin: .6em 0; }
.document-content th, .document-content td { border: 1px solid #cbd5e1; padding: 4px 8px; }

/* === Dashboard: stats grid + roadmap === */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  display: block; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 1rem 1.1rem;
  text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.stat-card:hover {
  border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,.08);
  transform: translateY(-1px); text-decoration: none;
}
.stat-card__label {
  font-size: .85em; color: #6b7280; text-transform: uppercase;
  letter-spacing: .03em; font-weight: 600;
}
.stat-card__value {
  font-size: 2.2em; font-weight: 700; color: #0f2540;
  line-height: 1.1; margin: .2rem 0 .4rem 0;
}
.stat-card__breakdown {
  display: flex; flex-wrap: wrap; gap: 4px; font-size: .82em;
}
.roadmap { display: flex; flex-direction: column; gap: .4rem; }
.roadmap__phase {
  padding: .55rem .85rem; border-radius: 6px; background: #f8fafc;
  border-left: 3px solid #cbd5e1; color: #64748b; font-size: .95em;
}
.roadmap__phase strong { color: #475569; margin-right: .5rem; }
.roadmap__phase--done { background: #ecfdf5; border-left-color: #16a34a; color: #1a1d22; }
.roadmap__phase--done strong { color: #15803d; }
.roadmap__phase--inprogress {
  background: #eff6ff; border-left-color: #2563eb; color: #1a1d22;
  font-weight: 500;
}
.roadmap__phase--inprogress strong { color: #1e40af; }

/* === Metodika hodnocení (collapsible help v form.html) === */
.methodology-help {
  background: linear-gradient(to right, var(--brand-aqua-50), rgba(248, 250, 252, 0.5));
  border: 1px solid var(--brand-aqua-100);
  border-left: 3px solid var(--brand-aqua-400);
  border-radius: var(--radius-md);
  padding: .55rem 1rem;
  margin: .85rem 0;
  font-size: .95em;
}
.methodology-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-navy-800);
  padding: .4rem 0;
  user-select: none;
  display: flex; align-items: center; gap: .6rem;
  list-style: none;       /* Hide default disclosure triangle */
}
.methodology-help summary::-webkit-details-marker { display: none; }
/* Vlastní šipka (rotuje při otevření) — vlevo od ikony */
.methodology-help summary::before {
  content: "";
  display: inline-block;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  width: 6px; height: 6px;
  transform: rotate(-45deg);
  transition: transform .15s ease-out;
  margin-bottom: 2px;
  opacity: .65;
}
.methodology-help[open] summary::before {
  transform: rotate(45deg);
  margin-bottom: 0; margin-top: -2px;
}
.methodology-help summary:hover { color: var(--brand-aqua-600); }
.methodology-help summary .fa-lightbulb {
  color: var(--brand-aqua-500);
  font-size: 1.05em;
}
.methodology-help[open] summary {
  margin-bottom: 1rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--brand-aqua-100);
}
.methodology-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.75rem;
}
@media (max-width: 900px) { .methodology-grid { grid-template-columns: 1fr; } }
.methodology-col h4 {
  font-size: .95em;
  margin: 0 0 .55rem 0;
  color: var(--brand-navy-800);
  border-bottom: 1px solid var(--brand-aqua-200);
  padding-bottom: 3px;
}
.methodology-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.methodology-table td { padding: 4px 6px; vertical-align: top; }
.methodology-table td.m-val { width: 32px; text-align: center; }
.methodology-table tr:hover td { background: rgba(118, 190, 225, 0.08); }

/* === TODO badges/notes (placeholdery pro budoucí funkce) === */
.todo-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: #fef3c7; color: #92400e; font-size: .8em; font-weight: 500;
  margin-left: .5rem; border: 1px dashed #f59e0b;
}
.todo-note {
  background: #fffbeb; border-left: 3px solid #f59e0b;
  padding: .5rem .75rem; border-radius: 3px; margin-top: .5rem;
}
.info-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.info-card + .info-card { margin-top: 0; }  /* margin-bottom stačí */
.info-card--todo {
  background: #fffbeb; border-color: #fcd34d;
}
.info-card h3 {
  margin: 0 0 .6rem 0;
  font-size: 1em;
  color: var(--brand-navy-800);
  display: flex; align-items: center; gap: .5rem;
}
.info-card--todo h3 { color: #92400e; }
.info-card h3 .fa-solid { color: var(--brand-aqua-500); }
.info-card--todo h3 .fa-solid { color: #d97706; }
.info-card ul { margin: 0; padding-left: 1.2rem; }
.info-card li { margin-bottom: .4rem; font-size: .92em; }

/* === Risk level badges (UI varianta v main app.css; PDF má vlastní v _pdf_base.html) === */
.risk-level {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: .85em; font-weight: 600; white-space: nowrap;
}
.level--very-low { background: #16a34a; color: #fff; }
.level--low      { background: #84cc16; color: #1a1d22; }
.level--medium   { background: #eab308; color: #1a1d22; }
.level--high     { background: #f97316; color: #fff; }
.level--critical { background: #dc2626; color: #fff; }

/* === subnav (taby pod page-header pro sekce s vice list pohledy) === */
.subnav {
  display: flex; gap: 0; margin: 0 0 1.25rem 0;
  border-bottom: 2px solid #e5e7eb;
}
.subnav__item {
  padding: .6rem 1.1rem; color: #475569; text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-weight: 500; font-size: .95em; line-height: 1.2;
  transition: color .12s, background .12s, border-color .12s;
}
.subnav__item:hover { color: #0f2540; background: #f1f5f9; text-decoration: none; }
.subnav__item.is-active {
  color: #0f2540; border-bottom-color: #2563eb;
  font-weight: 600; background: transparent;
}

/* ============================================================================
   GLOBAL RULES — odkazy a identifier-style prvky
   ============================================================================ */

/* Žádné podtržené odkazy nikde v aplikaci — vždy jen barevný rozdíl.
   Důvod: podtržení vizuálně rozbíjí badge/code identifikátory uvnitř <a>. */
a, a:link, a:visited, a:hover, a:active, a:focus {
  text-decoration: none;
}

/* Identifier-style prvky (kódy entit, badge, CIA, status, level)
   se NIKDY nesmí zalomit na dva řádky. Vždy pevný blok.
   Příklady: PA-S-01, T-12, BP-04, R-07, RB-03, EoL-003. */
.asset-code,
.badge,
.cia,
.lvl,
.status,
.filter-chip,
.filter-chip__count,
.control-ref,
.risk-level,
code,
kbd,
samp {
  white-space: nowrap;
  word-break: keep-all;
}

/* === ZEK §99 KRIZOVÝ REŽIM — globální banner === */
.crisis-banner {
  background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  padding: .55rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: .95em;
  letter-spacing: .01em;
  border-bottom: 2px solid #7f1d1d;
  animation: crisis-pulse 2.5s ease-in-out infinite;
}
.crisis-banner i { margin-right: .35rem; }
.crisis-banner a { color: #fff !important; }

@keyframes crisis-pulse {
  0%, 100% { background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%); }
  50%      { background: linear-gradient(90deg, #ef4444 0%, #b91c1c 100%); }
}

/* === E-learning student layout === */
.learn-header {
  background: linear-gradient(135deg, #155b80, #2e8fbd);
  color: #fff;
  padding: .8rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.learn-header__brand a {
  color: #fff; text-decoration: none;
  font-size: 1.15em; font-weight: 700;
}
.learn-header__brand a:hover { color: #fff; }
.learn-header__org {
  margin-left: 1rem; font-weight: 400; font-size: .85em; opacity: .85;
}
.learn-header__user { font-size: .92em; }
.learn-header__user strong { margin: 0 .4rem; }
.learn-header__user .muted { color: rgba(255,255,255,.7); }

.slide-content {
  font-size: 1.05em; line-height: 1.7;
}
.slide-content h1, .slide-content h2, .slide-content h3 {
  margin-top: 1.25rem;
}
.slide-content p { margin: .75rem 0; }
.slide-content ul, .slide-content ol { padding-left: 1.5rem; }

/* Inline code + badge uvnitř tmavé compliance-card--main: žádný světlý box, jen monospace text. */
.compliance-card--main code,
.compliance-card--main .asset-code {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
}
.compliance-card--main .badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
