/*
 * ZZS Orlického kraje — společný vizuální systém
 * Sdílené proměnné a komponenty záměrně přepisují původní lokální styly,
 * aby všechny části portálu působily jako jeden celek.
 */

:root {
  color-scheme: dark;
  --site-bg: #070910;
  --site-bg-soft: #0c1018;
  --site-surface: #111620;
  --site-surface-2: #171d29;
  --site-surface-3: #202736;
  --site-text: #f4f7fb;
  --site-muted: #9aa6b7;
  --site-faint: #697588;
  --site-line: rgba(255, 255, 255, 0.1);
  --site-line-strong: rgba(255, 255, 255, 0.18);
  --site-red: #f04444;
  --site-red-strong: #d42e36;
  --site-red-soft: rgba(240, 68, 68, 0.13);
  --site-blue: #4ea1ff;
  --site-green: #32c983;
  --site-amber: #f7b84b;
  --site-radius: 20px;
  --site-radius-sm: 12px;
  --site-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --site-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.18);

  /* Kompatibilita s původními stránkami. */
  --primary: var(--site-red);
  --primary-dark: var(--site-red-strong);
  --bg: var(--site-bg);
  --bg-dark: var(--site-bg);
  --card-bg: var(--site-surface);
  --panel: var(--site-surface);
  --panel-2: var(--site-surface-2);
  --card: var(--site-surface);
  --text: var(--site-text);
  --muted: var(--site-muted);
  --mutedText: var(--site-muted);
  --border: var(--site-line);
  --line: var(--site-line);
  --red: var(--site-red);
}

html[data-theme="light"] {
  color-scheme: light;
  --site-bg: #edf1f6;
  --site-bg-soft: #f5f7fa;
  --site-surface: #ffffff;
  --site-surface-2: #f7f9fc;
  --site-surface-3: #e8edf3;
  --site-text: #10151e;
  --site-muted: #556274;
  --site-faint: #7a8798;
  --site-line: rgba(21, 31, 46, 0.12);
  --site-line-strong: rgba(21, 31, 46, 0.2);
  --site-red: #d72f3a;
  --site-red-strong: #b9202d;
  --site-red-soft: rgba(215, 47, 58, 0.1);
  --site-blue: #176fc1;
  --site-green: #118558;
  --site-amber: #a96600;
  --site-shadow: 0 22px 60px rgba(32, 45, 66, 0.12);
  --site-shadow-soft: 0 10px 30px rgba(32, 45, 66, 0.09);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Jednotný horní panel portálu. */
.home-header.global-site-header {
  top: 12px;
  min-height: 84px;
  margin-top: 16px;
  margin-bottom: 30px;
  padding: 12px 16px;
  overflow: visible;
  border: 1px solid var(--site-line-strong);
  border-radius: 23px;
  background:
    radial-gradient(circle at 8% 0, color-mix(in srgb, var(--site-red) 14%, transparent), transparent 29%),
    linear-gradient(120deg, var(--site-surface), color-mix(in srgb, var(--site-surface) 86%, var(--site-blue) 14%));
  box-shadow: var(--site-shadow-soft), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(22px) saturate(1.3);
}
.home-header.global-site-header::before {
  content: '';
  position: absolute;
  top: -1px;
  right: 28px;
  left: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--site-red), color-mix(in srgb, var(--site-blue) 48%, transparent), transparent 85%);
  pointer-events: none;
}
.global-site-header .home-brand {
  gap: 12px;
  padding: 5px 12px 5px 5px;
  border-radius: 16px;
  transition: background 160ms ease;
}
.global-site-header .home-brand:hover { background: color-mix(in srgb, var(--site-text) 5%, transparent); }
.global-site-header .home-brand img {
  width: 51px;
  height: 51px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--site-red) 34%, var(--site-line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--site-red) 9%, var(--site-surface-2));
  filter: none;
}
.global-site-header .home-brand__name { font-size: 1.04rem; letter-spacing: -.04em; }
.global-site-header .home-brand__meta { font-size: .64rem; letter-spacing: .11em; }
.global-site-header .home-nav {
  gap: 4px;
  padding: 6px;
  border-color: var(--site-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--site-bg) 45%, var(--site-surface-2));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .13);
}
.global-site-header .home-nav a,
.global-site-header .home-nav button {
  min-height: 43px;
  padding-inline: 14px !important;
  border-radius: 11px !important;
  color: var(--site-muted);
  font-weight: 800 !important;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.global-site-header .home-nav a:hover,
.global-site-header .home-nav button:hover { color: var(--site-text) !important; background: var(--site-surface-2) !important; transform: translateY(-1px); }
.global-site-header .home-nav [aria-current="page"] {
  color: var(--site-text) !important;
  background: color-mix(in srgb, var(--site-red) 13%, var(--site-surface-2)) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--site-red) 26%, transparent), inset 0 -2px var(--site-red);
}
.global-site-header .home-nav .home-nav__discord {
  color: #fff !important;
  background: linear-gradient(135deg, #6875ff, #5865f2) !important;
  box-shadow: 0 7px 18px rgba(88, 101, 242, .25);
}
.global-site-header .home-nav .home-nav__discord:hover { color: #fff !important; background: #7280ff !important; }
@media (max-width: 1100px) {
  .home-header.global-site-header { top: 0; gap: 12px; padding: 13px; }
  .global-site-header .home-nav { width: 100%; }
}
@media (max-width: 760px) {
  .home-header.global-site-header { margin-top: 10px; border-radius: 18px; }
  .home-header.global-site-header::before { right: 18px; left: 18px; }
  .global-site-header .home-brand img { width: 42px; height: 42px; }
  .global-site-header .home-nav { margin-inline: 0; padding: 5px; border-width: 1px; border-radius: 12px; background: color-mix(in srgb, var(--site-bg) 45%, var(--site-surface-2)); }
  .global-site-header .home-nav a, .global-site-header .home-nav button { min-height: 39px; padding-inline: 11px !important; }
}
.home-discord-profile { display: inline-flex; align-items: center; gap: 12px; margin: 12px 0 22px; padding: 10px 16px; border: 1px solid rgba(120, 155, 200, .3); border-radius: 16px; color: inherit; text-decoration: none; background: rgba(90, 130, 185, .1); }
.home-discord-profile img { width: 48px; height: 48px; border-radius: 50%; }
.home-discord-profile span { display: grid; gap: 3px; }
.home-discord-profile small { opacity: .7; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--site-bg);
}

body {
  margin: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--site-text) !important;
  background:
    linear-gradient(90deg, var(--site-red) 0 72px, transparent 72px) top left / 100% 3px no-repeat,
    radial-gradient(circle at 8% -10%, rgba(240, 68, 68, 0.14), transparent 28rem),
    radial-gradient(circle at 93% 2%, rgba(78, 161, 255, 0.08), transparent 32rem),
    var(--site-bg) !important;
  font-family: "Plus Jakarta Sans", "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(circle, var(--site-line-strong) 0.65px, transparent 0.8px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 64%);
}

html[data-theme="light"] body {
  background:
    linear-gradient(90deg, var(--site-red) 0 72px, transparent 72px) top left / 100% 3px no-repeat,
    radial-gradient(circle at 8% -10%, rgba(215, 47, 58, 0.09), transparent 28rem),
    radial-gradient(circle at 93% 2%, rgba(23, 111, 193, 0.07), transparent 32rem),
    var(--site-bg) !important;
}

::selection { color: #fff; background: var(--site-red); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--site-bg); }
::-webkit-scrollbar-thumb { border: 3px solid var(--site-bg); border-radius: 999px; background: var(--site-faint); }

a { color: inherit; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(78, 161, 255, 0.55) !important; outline-offset: 3px !important; }

.discord-author-field input[readonly],
input[data-discord-personnel-id][readonly],
input[data-discord-display-name][readonly] {
  color: var(--site-text) !important;
  border-color: color-mix(in srgb, #5865f2 35%, var(--site-line)) !important;
  background: color-mix(in srgb, #5865f2 8%, var(--site-surface-2)) !important;
  cursor: default;
}
.discord-author-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 10px 13px;
  color: var(--site-muted);
  border: 1px solid color-mix(in srgb, #5865f2 25%, var(--site-line));
  border-radius: 12px;
  background: color-mix(in srgb, #5865f2 7%, var(--site-surface-2));
  font-size: 0.76rem;
  font-weight: 800;
}
.discord-author-state i { color: #7782f4; font-size: 0.95rem; }
.discord-author-state.is-ready { color: var(--site-green); border-color: color-mix(in srgb, var(--site-green) 28%, var(--site-line)); background: color-mix(in srgb, var(--site-green) 7%, var(--site-surface-2)); }
.discord-author-state.is-ready i { color: var(--site-green); }
.discord-author-state.is-warning { color: var(--site-amber); border-color: color-mix(in srgb, var(--site-amber) 30%, var(--site-line)); background: color-mix(in srgb, var(--site-amber) 8%, var(--site-surface-2)); }
.discord-author-state.is-warning i { color: var(--site-amber); }

h1, h2, h3, h4 {
  color: var(--site-text) !important;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* Společné povrchy */
.glass-panel,
.glass-card,
.glass,
.glass-morphism,
.card,
.section,
.sectionCard,
.sidePanel,
.kpi-card,
.leadership-member,
.leadership-mini,
.protocol,
.checks,
.drugGrid,
.infItem,
.brandBox,
.hintCard {
  background: var(--site-surface) !important;
  border-color: var(--site-line) !important;
  box-shadow: var(--site-shadow-soft) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.glass-panel,
.glass-card,
.glass,
.glass-morphism,
.card { border-radius: var(--site-radius) !important; }

.glass-panel:hover,
.glass-card:hover,
.leader-card:hover {
  border-color: var(--site-line-strong) !important;
  box-shadow: var(--site-shadow) !important;
}

/* Navigace a horní lišty */
.topbar,
body > header,
body > nav,
body > .topbar,
.site-module-header {
  color: var(--site-text) !important;
}

.topbar {
  border-color: var(--site-line) !important;
  background: color-mix(in srgb, var(--site-bg) 88%, transparent) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
}

nav.site-scroll-nav {
  scrollbar-width: none;
}

nav.site-scroll-nav::-webkit-scrollbar { display: none; }

nav a,
nav button,
.nav-link,
.nav-item,
.nav-btn,
.back {
  color: var(--site-muted) !important;
  border-radius: 11px !important;
  font-size: 0.88rem !important;
  font-weight: 750 !important;
  letter-spacing: -0.01em;
  text-decoration: none;
}

nav a:hover,
nav button:hover,
.nav-link:hover,
.nav-item:hover,
.nav-btn:hover,
.back:hover { color: var(--site-text) !important; }

.nav-item::after,
.nav-link::after { display: none !important; }

/* Tlačítka */
.btn,
.nav-btn,
button[type="submit"],
button[type="button"] {
  min-height: 44px;
  border-radius: 12px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease !important;
}

.btn:hover,
.nav-btn:hover,
button[type="submit"]:hover,
button[type="button"]:hover { transform: translateY(-1px); }

.btn-primary,
.btn-red,
.nav-btn.primary,
.status-badge,
button.bg-red-600,
button.bg-green-600 {
  color: #fff !important;
  border-color: transparent !important;
  background: var(--site-red) !important;
  box-shadow: 0 9px 22px rgba(215, 47, 58, 0.2) !important;
}

.btn-dark,
.btn-soft,
.nav-btn.ghost {
  color: var(--site-text) !important;
  border: 1px solid var(--site-line) !important;
  background: var(--site-surface-2) !important;
}

button:disabled { cursor: not-allowed; opacity: 0.6; transform: none !important; }

/* Formuláře */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.input-dark,
.form-input {
  min-height: 48px;
  max-width: 100%;
  color: var(--site-text) !important;
  caret-color: var(--site-red);
  border: 1px solid var(--site-line-strong) !important;
  border-radius: 12px !important;
  background: var(--site-surface-2) !important;
  box-shadow: none !important;
}

textarea { min-height: 112px; }
input::placeholder, textarea::placeholder { color: var(--site-faint) !important; opacity: 1; }
input:focus, select:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--site-red) 68%, var(--site-line)) !important;
  box-shadow: 0 0 0 4px var(--site-red-soft) !important;
  outline: none !important;
}
select option { color: var(--site-text) !important; background: var(--site-surface) !important; }
label { color: var(--site-muted) !important; font-size: 0.78rem; font-weight: 800; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--site-red); }

/* Tabulky */
.overflow-x-auto { -webkit-overflow-scrolling: touch; }
table { color: var(--site-text) !important; border-collapse: separate; border-spacing: 0; }
thead { color: var(--site-muted) !important; background: var(--site-surface-2) !important; }
th {
  font-size: 0.72rem !important;
  letter-spacing: 0.08em !important;
  font-weight: 850 !important;
}
td, th { border-color: var(--site-line) !important; }
tbody tr { transition: background-color 150ms ease; }
tbody tr:hover { background: var(--site-surface-2) !important; }

/* Modaly */
.modal-backdrop,
.modal.fixed,
[id$="Modal"].fixed {
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

html[data-theme="light"] .modal-backdrop,
html[data-theme="light"] .modal.fixed,
html[data-theme="light"] [id$="Modal"].fixed { background-color: rgba(32, 42, 57, 0.52) !important; }

/* Formuláře protokolů a HPO */
.wrap { width: min(1440px, calc(100% - 32px)) !important; max-width: 1440px !important; }
.appShell { gap: 22px !important; }
.sidePanel {
  border: 1px solid var(--site-line) !important;
  border-radius: var(--site-radius) !important;
}
.section { border-radius: 16px !important; box-shadow: none !important; }
.sectionTitle { color: var(--site-text) !important; letter-spacing: 0.07em !important; }
.sectionTitle .bar { background: var(--site-red) !important; }
.titleblock .subtitle { color: var(--site-red) !important; }
.protocol .label { color: var(--site-muted) !important; }
.protocol .value { color: var(--site-red) !important; }
.navSteps a { background: transparent !important; border-color: transparent !important; color: var(--site-muted) !important; }
.navSteps a:hover, .navSteps a.active { color: var(--site-text) !important; background: var(--site-surface-2) !important; }
.navSteps a span { color: #fff !important; background: var(--site-red) !important; }
.check, .drug, .drugCard { color: var(--site-text) !important; background: var(--site-surface-2) !important; border-color: var(--site-line) !important; }
.rowNote { color: var(--site-muted) !important; }

/* Tailwindové barevné utility ve světlém režimu */
html[data-theme="light"] .text-white,
html[data-theme="light"] .text-slate-50,
html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .text-slate-200 { color: var(--site-text) !important; }

html[data-theme="light"] .text-slate-300,
html[data-theme="light"] .text-slate-400,
html[data-theme="light"] .text-slate-500 { color: var(--site-muted) !important; }

html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .bg-white\/10,
html[data-theme="light"] .bg-black\/20,
html[data-theme="light"] .bg-black\/30,
html[data-theme="light"] .bg-black\/40,
html[data-theme="light"] .bg-slate-900\/60,
html[data-theme="light"] .bg-slate-900\/70,
html[data-theme="light"] .bg-slate-900\/80,
html[data-theme="light"] .bg-slate-800\/60,
html[data-theme="light"] .bg-slate-800\/70 { background-color: var(--site-surface-2) !important; }

html[data-theme="light"] .border-white\/5,
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .border-slate-800 { border-color: var(--site-line) !important; }

html[data-theme="light"] .divide-white\/5 > :not([hidden]) ~ :not([hidden]) { border-color: var(--site-line) !important; }

/* Vlastní systémové dialogy */
body.site-dialog-open { overflow: hidden !important; }

.site-dialog[hidden] { display: none !important; }

.site-dialog {
  --dialog-accent: var(--site-blue);
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(2, 5, 10, 0.76);
  opacity: 0;
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  transition: opacity 180ms ease;
}

html[data-theme="light"] .site-dialog { background: rgba(21, 29, 42, 0.48); }
.site-dialog.is-open { opacity: 1; }
.site-dialog--success { --dialog-accent: var(--site-green); }
.site-dialog--warning { --dialog-accent: var(--site-amber); }
.site-dialog--error,
.site-dialog--danger { --dialog-accent: var(--site-red); }

.site-dialog__panel {
  position: relative;
  width: min(100%, 510px);
  overflow: hidden;
  padding: clamp(24px, 4vw, 34px);
  color: var(--site-text);
  border: 1px solid var(--site-line-strong);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--dialog-accent) 12%, transparent), transparent 17rem),
    var(--site-surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translateY(16px) scale(0.975);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-dialog.is-open .site-dialog__panel { opacity: 1; transform: none; }

.site-dialog__topline {
  position: absolute;
  inset: 0 auto auto 0;
  width: 112px;
  height: 3px;
  background: var(--dialog-accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--dialog-accent) 45%, transparent);
}

.site-dialog__header {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 15px;
}

.site-dialog__icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--dialog-accent);
  border: 1px solid color-mix(in srgb, var(--dialog-accent) 32%, var(--site-line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--dialog-accent) 13%, var(--site-surface-2));
  font-size: 1.15rem;
  font-weight: 950;
}

.site-dialog__heading { min-width: 0; }

.site-dialog__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--dialog-accent);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-dialog__title {
  margin: 0;
  color: var(--site-text) !important;
  font-size: clamp(1.2rem, 3vw, 1.48rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.18;
  text-wrap: pretty;
}

.site-dialog__close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: var(--site-muted);
  border: 1px solid var(--site-line);
  border-radius: 12px;
  background: var(--site-surface-2);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.site-dialog__close:hover { color: var(--site-text); border-color: var(--site-line-strong); background: var(--site-surface-3); }

.site-dialog__message {
  margin: 24px 0 0;
  color: var(--site-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  white-space: pre-line;
}

.site-dialog__field { display: grid; gap: 8px; margin-top: 22px; }
.site-dialog__field[hidden] { display: none !important; }
.site-dialog__field > span { color: var(--site-muted); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.site-dialog__field input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  color: var(--site-text);
  border: 1px solid var(--site-line-strong);
  border-radius: 12px;
  outline: 0;
  background: var(--site-surface-2);
}
.site-dialog__field input:focus { border-color: color-mix(in srgb, var(--dialog-accent) 72%, var(--site-line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dialog-accent) 12%, transparent); }

.site-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }

.site-dialog__button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.site-dialog__button:hover { transform: translateY(-1px); }
.site-dialog__button--secondary { color: var(--site-text); border-color: var(--site-line); background: var(--site-surface-2); }
.site-dialog__button--secondary:hover { border-color: var(--site-line-strong); background: var(--site-surface-3); }
.site-dialog__button--primary { color: #fff; background: var(--dialog-accent); box-shadow: 0 9px 24px color-mix(in srgb, var(--dialog-accent) 24%, transparent); }
.site-dialog--warning .site-dialog__button--primary { color: #17120a; }
.site-dialog__button--primary:hover { background: color-mix(in srgb, var(--dialog-accent) 88%, #000); }

/* Přepínač motivu */
.site-theme-toggle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 14px;
  color: var(--site-text);
  border: 1px solid var(--site-line-strong);
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--site-surface) 92%, transparent);
  box-shadow: var(--site-shadow);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.site-theme-toggle__icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--site-amber);
}

.site-theme-toggle__label { font-size: 0.78rem; font-weight: 850; }

/* Domovská stránka */
.site-home { padding: 0 22px 40px !important; }
.home-shell { width: min(1320px, 100%); margin-inline: auto; }

.home-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 86px;
  margin-bottom: 34px;
  padding-block: 14px;
  background: color-mix(in srgb, var(--site-bg) 88%, transparent);
  border-bottom: 1px solid var(--site-line);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.global-site-header { isolation: isolate; }
body:not(.site-home) > .global-site-header { width: min(1320px, calc(100% - 44px)); }
.site-unified-header > .wrap .topbar { top: 98px; }
.site-context-header { position: relative !important; z-index: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.site-context-actions { display: flex; justify-content: center; margin-top: 22px; }

.home-brand { display: flex; min-width: 0; align-items: center; gap: 14px; text-decoration: none; }
.home-brand img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(215, 47, 58, 0.18)); }
.home-brand__name { display: block; overflow: hidden; color: var(--site-text); font-size: 1.02rem; font-weight: 900; letter-spacing: -0.035em; text-overflow: ellipsis; white-space: nowrap; }
.home-brand__meta { display: block; margin-top: 2px; color: var(--site-muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

.home-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--site-line);
  border-radius: 14px;
  background: var(--site-surface);
  scrollbar-width: none;
}
.home-nav::-webkit-scrollbar { display: none; }
.home-nav a, .home-nav button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; margin: 0; padding: 8px 10px !important; border: 0; background: transparent; font-size: 0.82rem !important; white-space: nowrap; }
.home-nav .home-nav__discord { color: #fff !important; background: #5865f2 !important; }
.home-nav [aria-current="page"] { color: var(--site-text) !important; background: var(--site-surface-2); }
.home-nav [data-auth-button] { color: var(--site-muted) !important; background: color-mix(in srgb, var(--site-surface-2) 65%, transparent); }
.home-nav [data-auth-button]:hover { color: var(--site-text) !important; background: var(--site-surface-2); }

/* Výjezdové centrum */
.hub-main { display: grid; gap: 18px; }

.hub-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  align-items: end;
  gap: clamp(32px, 6vw, 90px);
  overflow: hidden;
  padding: clamp(34px, 5vw, 66px);
  border: 1px solid var(--site-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--site-red) 10%, transparent), transparent 24rem),
    var(--site-surface);
  box-shadow: var(--site-shadow);
}

.hub-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 76px;
  height: 3px;
  background: var(--site-red);
}

.hub-intro .home-kicker { margin: 0 0 22px; }
.hub-intro h1 { max-width: 750px; margin: 0; font-size: clamp(3rem, 6.2vw, 5.8rem); font-weight: 900; letter-spacing: -0.07em; line-height: 0.94; }
.hub-intro h1 span { display: block; color: var(--site-red); }
.hub-intro__copy > p:last-child { max-width: 660px; margin: 26px 0 0; color: var(--site-muted); font-size: clamp(1rem, 1.45vw, 1.12rem); line-height: 1.7; }

.hub-intro__note {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--site-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--site-surface-2) 88%, transparent);
}

.hub-intro__note-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; color: var(--site-red); border-radius: 13px; background: var(--site-red-soft); }
.hub-intro__note strong, .hub-intro__note small { display: block; }
.hub-intro__note strong { font-size: 0.9rem; font-weight: 900; letter-spacing: -0.02em; }
.hub-intro__note small { margin-top: 3px; color: var(--site-muted); font-size: 0.76rem; line-height: 1.5; }

.hub-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }

.hub-card {
  --hub-accent: var(--site-red);
  --hub-accent-soft: var(--site-red-soft);
  position: relative;
  display: flex;
  grid-column: span 3;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(24px, 3vw, 34px);
  color: var(--site-text);
  border: 1px solid var(--site-line);
  border-radius: 22px;
  background: var(--site-surface);
  box-shadow: var(--site-shadow-soft);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hub-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--hub-accent); opacity: 0; transition: opacity 180ms ease; }
.hub-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--hub-accent) 36%, var(--site-line)); box-shadow: var(--site-shadow); }
.hub-card:hover::before { opacity: 1; }
.hub-card--blue { --hub-accent: var(--site-blue); --hub-accent-soft: color-mix(in srgb, var(--site-blue) 13%, transparent); }
.hub-card--amber { --hub-accent: var(--site-amber); --hub-accent-soft: color-mix(in srgb, var(--site-amber) 13%, transparent); }
.hub-card--green { --hub-accent: var(--site-green); --hub-accent-soft: color-mix(in srgb, var(--site-green) 13%, transparent); }
.hub-card--muted { --hub-accent: var(--site-faint); --hub-accent-soft: color-mix(in srgb, var(--site-faint) 13%, transparent); }
.hub-card--compact { grid-column: span 2; min-height: 300px; }
.hub-card--disabled { cursor: default; opacity: 0.72; }
.hub-card--disabled:hover { transform: none; border-color: var(--site-line); box-shadow: var(--site-shadow-soft); }
.hub-card--disabled:hover::before { opacity: 0; }

.hub-card__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hub-card__icon { display: grid; width: 50px; height: 50px; place-items: center; color: var(--hub-accent); border: 1px solid color-mix(in srgb, var(--hub-accent) 25%, transparent); border-radius: 14px; background: var(--hub-accent-soft); font-size: 1.05rem; }
.hub-card__arrow { color: var(--site-faint); font-size: 0.9rem; transition: color 180ms ease, transform 180ms ease; }
.hub-card:hover .hub-card__arrow { color: var(--hub-accent); transform: translate(3px, -3px); }
.hub-card__soon { padding: 7px 10px; color: var(--hub-accent); border: 1px solid color-mix(in srgb, var(--hub-accent) 25%, transparent); border-radius: 999px; background: var(--hub-accent-soft); font-size: 0.67rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.hub-card__body { margin-top: 34px; }
.hub-card__eyebrow { color: var(--hub-accent); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.hub-card h2 { margin: 8px 0 0; font-size: clamp(1.65rem, 3vw, 2.5rem); font-weight: 900; letter-spacing: -0.055em; line-height: 1.05; }
.hub-card p { max-width: 55ch; margin: 16px 0 0; color: var(--site-muted); font-size: 0.92rem; line-height: 1.68; }
.hub-card__action { display: inline-flex; width: fit-content; align-items: center; gap: 9px; margin-top: auto; padding-top: 28px; color: var(--site-text); font-size: 0.78rem; font-weight: 850; }
.hub-card__action i { color: var(--hub-accent); transition: transform 180ms ease; }
.hub-card:hover .hub-card__action i { transform: translateX(4px); }

/* Databáze HPO */
.hpo-db-main,
.hpo-detail-main { display: grid; gap: 18px; }

.hpo-db-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--site-amber) 11%, transparent), transparent 26rem),
    var(--site-surface);
  box-shadow: var(--site-shadow-soft);
}

.hpo-db-hero h1 { margin: 12px 0 0; font-size: clamp(2.7rem, 6vw, 5.3rem); font-weight: 900; letter-spacing: -0.075em; line-height: 0.95; }
.hpo-db-hero h1 span { color: var(--site-amber); }
.hpo-db-hero > div:first-child > p:last-child { max-width: 64ch; margin: 20px 0 0; color: var(--site-muted); line-height: 1.7; }
.hpo-db-hero__side { display: grid; min-width: 230px; gap: 10px; }
.hpo-db-counter { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 18px; border: 1px solid var(--site-line); border-radius: 15px; background: var(--site-surface-2); }
.hpo-db-counter span { color: var(--site-amber); font-size: 2rem; font-weight: 900; letter-spacing: -0.06em; }
.hpo-db-counter small { color: var(--site-muted); font-size: 0.72rem; font-weight: 800; }
.hpo-db-primary { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; color: #17120a; border-radius: 13px; background: var(--site-amber); font-size: 0.82rem; font-weight: 900; text-decoration: none; box-shadow: 0 10px 28px color-mix(in srgb, var(--site-amber) 19%, transparent); transition: transform 160ms ease, background 160ms ease; }
.hpo-db-primary:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--site-amber) 88%, #fff); }

.hpo-db-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(210px, 0.36fr) minmax(150px, 0.22fr); gap: 12px; padding: 18px; border: 1px solid var(--site-line); border-radius: 18px; background: var(--site-surface); box-shadow: var(--site-shadow-soft); }
.hpo-db-control { display: grid; gap: 7px; }
.hpo-db-control > span:first-child { color: var(--site-faint); font-size: 0.66rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.hpo-db-control input,
.hpo-db-control select { width: 100%; min-height: 48px; padding: 0 14px; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 12px; outline: 0; background: var(--site-surface-2); }
.hpo-db-control input:focus,
.hpo-db-control select:focus { border-color: color-mix(in srgb, var(--site-amber) 64%, var(--site-line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--site-amber) 10%, transparent); }
.hpo-db-input-wrap { position: relative; display: block; }
.hpo-db-input-wrap i { position: absolute; top: 50%; left: 15px; color: var(--site-faint); transform: translateY(-50%); }
.hpo-db-input-wrap input { padding-left: 42px; }

.hpo-db-table-card { overflow: hidden; border: 1px solid var(--site-line); border-radius: 22px; background: var(--site-surface); box-shadow: var(--site-shadow-soft); }
.hpo-db-table-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 28px 30px 22px; }
.hpo-db-table-head h2 { margin: 8px 0 0; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; letter-spacing: -0.055em; }
.hpo-db-live { display: inline-flex; align-items: center; gap: 8px; color: var(--site-muted); font-size: 0.72rem; font-weight: 800; }
.hpo-db-live i { color: var(--site-green); }
.hpo-db-table-shell { overflow-x: auto; border-top: 1px solid var(--site-line); }
.hpo-db-table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.hpo-db-table th { padding: 15px 18px; color: var(--site-faint); background: var(--site-surface-2); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.09em; text-align: left; text-transform: uppercase; }
.hpo-db-table td { padding: 18px; color: var(--site-muted); border-top: 1px solid var(--site-line); font-size: 0.84rem; vertical-align: middle; }
.hpo-db-table tbody tr:first-child td { border-top: 0; }
.hpo-db-table tbody tr { transition: background 160ms ease; }
.hpo-db-table tbody tr:hover { background: color-mix(in srgb, var(--site-amber) 4%, transparent); }
.hpo-db-table tbody tr.is-highlighted { background: color-mix(in srgb, var(--site-green) 9%, transparent); box-shadow: inset 3px 0 var(--site-green); }
.hpo-db-table td strong { display: block; color: var(--site-text); font-size: 0.82rem; }
.hpo-db-table td small { display: block; margin-top: 3px; color: var(--site-faint); }
.hpo-db-number { color: var(--site-text); font-size: 0.9rem; font-weight: 900; text-decoration: none; }
.hpo-db-number:hover { color: var(--site-amber); }
.hpo-db-type { display: inline-flex; padding: 6px 9px; color: var(--site-amber); border: 1px solid color-mix(in srgb, var(--site-amber) 26%, var(--site-line)); border-radius: 999px; background: color-mix(in srgb, var(--site-amber) 9%, transparent); font-size: 0.7rem; font-weight: 850; }
.hpo-db-injured { display: grid; width: 38px; height: 38px; place-items: center; color: var(--site-red); border-radius: 11px; background: var(--site-red-soft); font-weight: 900; }
.hpo-db-open { display: grid; width: 40px; height: 40px; place-items: center; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 11px; background: var(--site-surface-2); text-decoration: none; transition: color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.hpo-db-open:hover { color: var(--site-amber); border-color: color-mix(in srgb, var(--site-amber) 40%, var(--site-line)); transform: translateX(2px); }
.hpo-db-message-row td { padding: 42px !important; color: var(--site-muted) !important; text-align: center; }
.hpo-db-message-row td i { margin-right: 8px; color: var(--site-amber); }
.hpo-db-message-row--error td,
.hpo-db-message-row--error td i { color: var(--site-red) !important; }

/* Detail HPO */
.hpo-detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hpo-detail-actions > div { display: flex; gap: 9px; }
.hpo-detail-actions a,
.hpo-detail-actions button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 12px; background: var(--site-surface); font-size: 0.78rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.hpo-detail-actions a:hover,
.hpo-detail-actions button:hover { border-color: var(--site-line-strong); background: var(--site-surface-2); }
.hpo-detail-document { overflow: hidden; border: 1px solid var(--site-line); border-radius: 24px; background: var(--site-surface); box-shadow: var(--site-shadow-soft); }
.hpo-detail-loading { display: flex; min-height: 420px; align-items: center; justify-content: center; gap: 10px; color: var(--site-muted); }
.hpo-detail-loading i { color: var(--site-amber); }
.hpo-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; padding: clamp(30px, 5vw, 56px); background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--site-red) 12%, transparent), transparent 32rem), var(--site-surface-2); border-bottom: 1px solid var(--site-line); }
.hpo-detail-hero h1 { margin: 12px 0 0; font-size: clamp(2.6rem, 7vw, 5.8rem); font-weight: 900; letter-spacing: -0.075em; line-height: 0.95; }
.hpo-detail-hero h1 span { color: var(--site-red); }
.hpo-detail-hero > div:first-child > p:last-child { margin: 18px 0 0; color: var(--site-muted); }
.hpo-detail-hero__meta { display: grid; min-width: 220px; gap: 9px; }
.hpo-detail-hero__meta > span { padding: 13px 15px; border: 1px solid var(--site-line); border-radius: 13px; background: var(--site-surface); }
.hpo-detail-hero__meta small { display: block; color: var(--site-faint); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.hpo-detail-hero__meta strong { display: block; margin-top: 5px; color: var(--site-text); font-size: 0.94rem; }
.hpo-detail-section { padding: clamp(26px, 4vw, 42px); border-top: 1px solid var(--site-line); }
.hpo-detail-hero + .hpo-detail-section { border-top: 0; }
.hpo-detail-section > h2 { display: flex; align-items: center; gap: 11px; margin: 0 0 22px; font-size: clamp(1.18rem, 3vw, 1.55rem); font-weight: 900; letter-spacing: -0.035em; }
.hpo-detail-section > h2 i { display: grid; width: 38px; height: 38px; place-items: center; color: var(--site-red); border-radius: 11px; background: var(--site-red-soft); font-size: 0.9rem; }
.hpo-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hpo-detail-grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hpo-detail-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hpo-detail-grid--spaced { margin-top: 18px; }
.hpo-detail-field { min-width: 0; padding: 15px; border: 1px solid var(--site-line); border-radius: 13px; background: var(--site-surface-2); }
.hpo-detail-field > span { display: block; color: var(--site-faint); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.hpo-detail-field > strong { display: block; margin-top: 7px; color: var(--site-text); font-size: 0.86rem; overflow-wrap: anywhere; }
.hpo-detail-field--accent > strong { color: var(--site-red); font-size: 1.25rem; }
.hpo-triage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.hpo-triage-card { --triage-color: var(--site-red); padding: 17px; border: 1px solid color-mix(in srgb, var(--triage-color) 28%, var(--site-line)); border-radius: 15px; background: color-mix(in srgb, var(--triage-color) 7%, var(--site-surface-2)); }
.hpo-triage-card--yellow { --triage-color: var(--site-amber); }
.hpo-triage-card--green { --triage-color: var(--site-green); }
.hpo-triage-card--black { --triage-color: var(--site-faint); }
.hpo-triage-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hpo-triage-card > div span { color: var(--triage-color); font-size: 0.76rem; font-weight: 900; text-transform: uppercase; }
.hpo-triage-card > div strong { display: grid; width: 38px; height: 38px; place-items: center; color: var(--triage-color); border-radius: 10px; background: color-mix(in srgb, var(--triage-color) 13%, var(--site-surface)); font-size: 1.05rem; }
.hpo-triage-card p { margin: 13px 0 0; color: var(--site-muted); font-size: 0.83rem; line-height: 1.55; }
.hpo-detail-subtitle { margin: 0 0 10px; color: var(--site-muted); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.hpo-detail-table-shell { overflow-x: auto; border: 1px solid var(--site-line); border-radius: 14px; }
.hpo-detail-table { width: 100%; border-collapse: collapse; }
.hpo-detail-table th { padding: 12px 15px; color: var(--site-faint); background: var(--site-surface-2); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.hpo-detail-table td { padding: 14px 15px; color: var(--site-text); border-top: 1px solid var(--site-line); font-size: 0.84rem; }
.hpo-detail-empty { margin: 0; padding: 18px; color: var(--site-muted); border: 1px dashed var(--site-line-strong); border-radius: 13px; text-align: center; }
.hpo-detail-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.hpo-detail-chips span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--site-text); border: 1px solid color-mix(in srgb, var(--site-blue) 24%, var(--site-line)); border-radius: 12px; background: color-mix(in srgb, var(--site-blue) 8%, var(--site-surface-2)); font-size: 0.78rem; font-weight: 800; }
.hpo-detail-chips i { color: var(--site-blue); }
.hpo-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.hpo-action-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 3px 9px; min-width: 0; padding: 13px; border: 1px solid var(--site-line); border-radius: 13px; background: var(--site-surface-2); }
.hpo-action-item i { grid-row: span 2; display: grid; width: 30px; height: 30px; place-items: center; color: var(--site-faint); border-radius: 9px; background: var(--site-surface-3); font-size: 0.72rem; }
.hpo-action-item span { color: var(--site-text); font-size: 0.75rem; font-weight: 850; line-height: 1.3; }
.hpo-action-item strong { color: var(--site-faint); font-size: 0.66rem; font-weight: 800; text-transform: capitalize; }
.hpo-action-item.is-done { border-color: color-mix(in srgb, var(--site-green) 25%, var(--site-line)); background: color-mix(in srgb, var(--site-green) 6%, var(--site-surface-2)); }
.hpo-action-item.is-done i,
.hpo-action-item.is-done strong { color: var(--site-green); }
.hpo-action-item.is-done i { background: color-mix(in srgb, var(--site-green) 12%, var(--site-surface-3)); }
.hpo-detail-note { min-height: 110px; padding: 18px; color: var(--site-muted); border: 1px solid var(--site-line); border-left: 3px solid var(--site-red); border-radius: 13px; background: var(--site-surface-2); line-height: 1.7; white-space: pre-wrap; }
.hpo-detail-audit { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; padding-top: 16px; color: var(--site-faint); border-top: 1px solid var(--site-line); font-size: 0.68rem; }
.hpo-detail-audit strong { color: var(--site-muted); }
.hpo-detail-error { display: grid; min-height: 420px; place-items: center; align-content: center; gap: 13px; padding: 30px; color: var(--site-red); text-align: center; }
.hpo-detail-error i { font-size: 2rem; }
.hpo-detail-error a { padding: 11px 14px; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 11px; text-decoration: none; }

/* Databáze a detail výjezdových protokolů */
.protocol-db-page .hpo-db-hero {
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--site-red) 13%, transparent), transparent 28rem),
    var(--site-surface);
}
.protocol-db-page .hpo-db-hero h1 span,
.protocol-db-page .hpo-db-counter span { color: var(--site-red); }
.protocol-db-page .hpo-db-primary { color: #fff; background: var(--site-red); box-shadow: 0 10px 28px color-mix(in srgb, var(--site-red) 23%, transparent); }
.protocol-db-page .hpo-db-primary:hover { background: color-mix(in srgb, var(--site-red) 88%, #fff); }
.protocol-db-page .hpo-db-control input:focus,
.protocol-db-page .hpo-db-control select:focus { border-color: color-mix(in srgb, var(--site-red) 64%, var(--site-line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--site-red) 10%, transparent); }
.protocol-db-page .hpo-db-table tbody tr:hover { background: color-mix(in srgb, var(--site-red) 4%, transparent); }
.protocol-db-page .hpo-db-number:hover,
.protocol-db-page .hpo-db-open:hover { color: var(--site-red); }
.protocol-db-page .hpo-db-open:hover { border-color: color-mix(in srgb, var(--site-red) 40%, var(--site-line)); }
.protocol-db-page .hpo-db-type { color: var(--site-blue); border-color: color-mix(in srgb, var(--site-blue) 25%, var(--site-line)); background: color-mix(in srgb, var(--site-blue) 8%, transparent); }
.protocol-db-page .hpo-db-message-row td i { color: var(--site-red); }
.protocol-db-table { min-width: 1240px; }
.protocol-db-table th:last-child,
.protocol-db-table td:last-child { width: 132px; padding-right: 28px; }
.protocol-db-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.protocol-db-delete { display: grid; width: 40px; height: 40px; place-items: center; color: var(--site-red); border: 1px solid color-mix(in srgb, var(--site-red) 28%, var(--site-line)); border-radius: 11px; background: var(--site-red-soft); cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.protocol-db-delete:hover { color: #fff; border-color: var(--site-red); background: var(--site-red); transform: translateY(-1px); }
.protocol-db-delete:disabled { opacity: 0.58; cursor: wait; transform: none; }
.protocol-db-delete.is-deleting i { animation: protocol-delete-pulse 700ms ease-in-out infinite alternate; }
.protocol-detail-delete { color: var(--site-red) !important; border-color: color-mix(in srgb, var(--site-red) 34%, var(--site-line)) !important; background: var(--site-red-soft) !important; }
.protocol-detail-delete:hover { color: #fff !important; border-color: var(--site-red) !important; background: var(--site-red) !important; }
@keyframes protocol-delete-pulse { to { opacity: 0.3; transform: scale(0.82); } }
.protocol-db-urgency { display: grid; width: 38px; height: 38px; place-items: center; color: var(--site-muted); border: 1px solid var(--site-line); border-radius: 11px; background: var(--site-surface-2); font-size: 0.73rem; font-weight: 900; }
.protocol-db-urgency.is-critical { color: var(--site-red); border-color: color-mix(in srgb, var(--site-red) 28%, var(--site-line)); background: var(--site-red-soft); }
.protocol-db-urgency.is-high { color: #ff7a4d; border-color: color-mix(in srgb, #ff7a4d 28%, var(--site-line)); background: color-mix(in srgb, #ff7a4d 9%, var(--site-surface-2)); }
.protocol-db-urgency.is-medium { color: var(--site-amber); border-color: color-mix(in srgb, var(--site-amber) 28%, var(--site-line)); background: color-mix(in srgb, var(--site-amber) 9%, var(--site-surface-2)); }
.protocol-db-urgency.is-low { color: var(--site-green); border-color: color-mix(in srgb, var(--site-green) 28%, var(--site-line)); background: color-mix(in srgb, var(--site-green) 9%, var(--site-surface-2)); }

/* Měsíční statistiky výjezdových protokolů */
.protocol-stats { overflow: hidden; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--site-line); border-radius: 22px; background: var(--site-surface); box-shadow: var(--site-shadow-soft); }
.protocol-stats__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.protocol-stats__head h2 { margin: 7px 0 0; font-size: clamp(1.65rem, 3.5vw, 2.5rem); font-weight: 900; letter-spacing: -0.055em; }
.protocol-stats__head h2 span { color: var(--site-red); }
.protocol-stats__controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 9px; }
.protocol-stats__range { display: flex; min-height: 46px; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--site-line); border-radius: 12px; background: var(--site-bg-soft); }
.protocol-stats__range button { min-height: 36px; padding: 7px 11px; color: var(--site-muted); border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 0.7rem; font-weight: 850; cursor: pointer; white-space: nowrap; }
.protocol-stats__range button.is-active { color: var(--site-text); background: var(--site-surface-2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }
.protocol-stats__month { display: grid; min-width: 190px; gap: 7px; }
.protocol-stats__month > span { color: var(--site-faint); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.protocol-stats__month input { width: 100%; min-height: 46px; padding: 0 13px; color: var(--site-text); color-scheme: dark; border: 1px solid var(--site-line); border-radius: 12px; outline: 0; background: var(--site-surface-2); }
[data-theme="light"] .protocol-stats__month input { color-scheme: light; }
.protocol-stats__month input:focus { border-color: color-mix(in srgb, var(--site-red) 60%, var(--site-line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--site-red) 10%, transparent); }
.protocol-stats__month input:disabled { cursor: not-allowed; opacity: 0.42; }
.protocol-stats__report { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; color: #fff; border: 1px solid color-mix(in srgb, var(--site-red) 72%, transparent); border-radius: 12px; background: var(--site-red); box-shadow: 0 9px 25px color-mix(in srgb, var(--site-red) 24%, transparent); font: inherit; font-size: 0.72rem; font-weight: 900; cursor: pointer; white-space: nowrap; }
.protocol-stats__report:hover:not(:disabled) { transform: translateY(-1px); background: var(--site-red-strong); }
.protocol-stats__report:disabled { cursor: wait; opacity: 0.48; box-shadow: none; }
.protocol-stats__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.protocol-stat-card { display: flex; min-height: 100px; align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--site-line); border-radius: 15px; background: var(--site-surface-2); }
.protocol-stat-card > i { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; color: var(--stat-color, var(--site-red)); border-radius: 13px; background: color-mix(in srgb, var(--stat-color, var(--site-red)) 12%, transparent); }
.protocol-stat-card strong { display: block; color: var(--site-text); font-size: 1.75rem; font-weight: 900; letter-spacing: -0.055em; line-height: 1; }
.protocol-stat-card span { display: block; margin-top: 7px; color: var(--site-muted); font-size: 0.72rem; font-weight: 800; line-height: 1.35; }
.protocol-stat-card.is-blue { --stat-color: var(--site-blue); }
.protocol-stat-card.is-amber { --stat-color: var(--site-amber); }
.protocol-stat-card.is-green { --stat-color: var(--site-green); }
.protocol-stat-card.is-dark { --stat-color: var(--site-faint); }
.protocol-stat-card.is-red { --stat-color: #ff765f; }
.protocol-stat-card.is-loading,
.protocol-stat-card.is-error { grid-column: 1 / -1; justify-content: center; min-height: 120px; }
.protocol-stat-card.is-error { --stat-color: var(--site-red); color: var(--site-red); }
.protocol-stats__insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.protocol-stats__insights > div { min-width: 0; padding: 16px 17px; border: 1px solid var(--site-line); border-radius: 14px; background: color-mix(in srgb, var(--site-surface-2) 82%, transparent); }
.protocol-stats__insights span { display: block; color: var(--site-faint); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.protocol-stats__insights strong { display: block; overflow: hidden; margin-top: 8px; color: var(--site-text); font-size: 0.83rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.protocol-stats__insights small { display: block; margin-top: 5px; color: var(--site-muted); font-size: 0.68rem; }
.protocol-stats__usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.protocol-usage-card { min-width: 0; padding: 18px; border: 1px solid var(--site-line); border-radius: 15px; background: var(--site-surface-2); }
.protocol-usage-card__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.protocol-usage-card__title > span { color: var(--site-text); font-size: 0.82rem; font-weight: 900; }
.protocol-usage-card__title i { margin-right: 7px; color: var(--site-red); }
.protocol-usage-card__title small { color: var(--site-faint); font-size: 0.62rem; line-height: 1.4; text-align: right; }
.protocol-usage-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.protocol-usage-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 9px; color: var(--site-muted); border: 1px solid var(--site-line); border-radius: 999px; background: var(--site-surface); font-size: 0.68rem; }
.protocol-usage-pill strong { color: var(--site-text); font-weight: 800; }
.protocol-usage-pill b { color: var(--site-red); font-weight: 900; }
.protocol-usage-empty { color: var(--site-faint); font-size: 0.72rem; line-height: 1.5; }

/* Podmíněné prvky formuláře protokolu */
.protocol-field-help { display: block; margin-top: 7px; color: var(--site-faint); font-size: 0.68rem; font-weight: 700; line-height: 1.45; }
.crew-picker { position: relative; }
.crew-picker__search { position: relative; display: flex; align-items: center; }
.crew-picker__search > i { position: absolute; z-index: 2; left: 15px; color: #7782f4; pointer-events: none; }
.crew-picker__search input { width: 100%; padding-left: 43px !important; padding-right: 44px !important; }
.crew-picker__search input:disabled { opacity: 0.72; cursor: not-allowed; }
.crew-picker__loader { position: absolute; z-index: 2; right: 15px; color: var(--site-muted); }
.crew-picker__suggestions { position: absolute; z-index: 60; top: calc(100% + 7px); right: 0; left: 0; overflow-y: auto; max-height: 330px; padding: 7px; border: 1px solid var(--site-line-strong); border-radius: 15px; background: color-mix(in srgb, var(--site-surface) 96%, transparent); box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34); backdrop-filter: blur(18px); }
.crew-picker__suggestions[hidden] { display: none !important; }
.crew-picker__option { display: grid; width: 100%; grid-template-columns: 40px minmax(0, 1fr) 30px; align-items: center; gap: 11px; padding: 9px; color: var(--site-text); border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.crew-picker__option:hover,
.crew-picker__option.is-active { background: color-mix(in srgb, #5865f2 11%, var(--site-surface-2)); }
.crew-picker__avatar { display: grid; width: 40px; height: 40px; place-items: center; object-fit: cover; color: #c9ceff; border: 1px solid color-mix(in srgb, #5865f2 34%, var(--site-line)); border-radius: 12px; background: color-mix(in srgb, #5865f2 16%, var(--site-surface-2)); font-size: 0.68rem; font-weight: 900; }
.crew-picker__option-copy,
.crew-picker__member-copy { display: block; min-width: 0; }
.crew-picker__option-copy strong,
.crew-picker__option-copy small,
.crew-picker__member-copy strong,
.crew-picker__member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-picker__option-copy strong { color: var(--site-text); font-size: 0.76rem; font-weight: 900; }
.crew-picker__option-copy small { margin-top: 3px; color: var(--site-muted); font-size: 0.65rem; font-weight: 700; }
.crew-picker__option-add { justify-self: center; color: #7782f4; font-size: 0.75rem; }
.crew-picker__empty { display: flex; min-height: 70px; align-items: center; justify-content: center; gap: 9px; padding: 14px; color: var(--site-muted); font-size: 0.72rem; font-weight: 750; text-align: center; }
.crew-picker__empty i { color: var(--site-faint); }
.crew-picker__selected { display: grid; gap: 7px; margin-top: 8px; }
.crew-picker__selected[hidden] { display: none !important; }
.crew-picker__member { display: grid; grid-template-columns: 40px minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 8px 9px; border: 1px solid color-mix(in srgb, #5865f2 27%, var(--site-line)); border-radius: 13px; background: color-mix(in srgb, #5865f2 8%, var(--site-surface-2)); }
.crew-picker__member-copy strong { color: var(--site-text); font-size: 0.72rem; font-weight: 900; }
.crew-picker__member-copy small { margin-top: 3px; color: #929aff; font-size: 0.61rem; font-weight: 750; }
.crew-picker__remove { display: grid; width: 32px; height: 32px; place-items: center; padding: 0 0 2px; color: var(--site-red); border: 1px solid color-mix(in srgb, var(--site-red) 25%, var(--site-line)); border-radius: 9px; background: var(--site-red-soft); font-family: Arial, sans-serif; font-size: 1.35rem; font-weight: 500; line-height: 1; cursor: pointer; transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.crew-picker__remove:hover { color: #fff; border-color: var(--site-red); background: var(--site-red); }
.protocol-conditional-card { margin: 12px 0 4px; padding: 17px; border: 1px solid color-mix(in srgb, var(--site-green) 30%, var(--site-line)); border-radius: 16px; background: color-mix(in srgb, var(--site-green) 7%, var(--site-surface-2)); }
.protocol-conditional-card[hidden] { display: none !important; }
.protocol-conditional-card__head { display: flex; align-items: center; gap: 12px; }
.protocol-conditional-card__head > i { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; color: var(--site-green); border-radius: 11px; background: color-mix(in srgb, var(--site-green) 14%, transparent); }
.protocol-conditional-card__head strong,
.protocol-conditional-card__head span { display: block; }
.protocol-conditional-card__head strong { color: var(--site-text); font-size: 0.82rem; font-weight: 900; }
.protocol-conditional-card__head span { margin-top: 3px; color: var(--site-muted); font-size: 0.7rem; }
.protocol-conditional-card .grid { margin-top: 14px; }
.infItem--ringer { align-self: start; }
.ringer-add { grid-column: 1 / -1; display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; color: var(--site-green); border: 1px dashed color-mix(in srgb, var(--site-green) 38%, var(--site-line)); border-radius: 11px; background: color-mix(in srgb, var(--site-green) 7%, var(--site-surface-2)); font-size: 0.72rem; font-weight: 900; cursor: pointer; }
.ringer-add[hidden] { display: none !important; }
.ringer-add:hover { border-style: solid; background: color-mix(in srgb, var(--site-green) 12%, var(--site-surface-2)); }
.ringer-extra-list { display: grid; grid-column: 1 / -1; gap: 8px; }
.ringer-extra-list:empty { display: none; }
.ringer-extra { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(120px, 140px) 36px; align-items: center; gap: 9px; padding-top: 8px; border-top: 1px solid var(--site-line); }
.ringer-extra > span { color: var(--site-muted); font-size: 0.72rem; font-weight: 850; }
.ringer-extra select { width: 100%; }
.ringer-remove { display: grid; width: 36px; height: 36px; place-items: center; padding: 0 0 2px; color: var(--site-red); border: 1px solid color-mix(in srgb, var(--site-red) 28%, var(--site-line)); border-radius: 10px; background: var(--site-red-soft); font-family: Arial, sans-serif; font-size: 1.4rem; font-weight: 500; line-height: 1; cursor: pointer; transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.ringer-remove:hover { color: #fff; border-color: var(--site-red); background: var(--site-red); }

.protocol-detail-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
.protocol-detail-urgency { color: var(--site-red) !important; font-size: 1.2rem !important; }
.hpo-detail-field--wide { grid-column: span 2; }
.protocol-detail-narratives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.protocol-detail-narratives > div { min-width: 0; padding: 18px; border: 1px solid var(--site-line); border-left: 3px solid var(--site-red); border-radius: 14px; background: var(--site-surface-2); }
.protocol-detail-narratives h3,
.protocol-detail-resource h3 { margin: 0; color: var(--site-text); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.055em; text-transform: uppercase; }
.protocol-detail-narratives p { min-height: 90px; margin: 14px 0 0; color: var(--site-muted); font-size: 0.85rem; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.protocol-detail-resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.protocol-detail-resource-grid--spaced { margin-top: 11px; }
.protocol-detail-resource { min-width: 0; padding: 17px; border: 1px solid var(--site-line); border-radius: 14px; background: var(--site-surface-2); }
.protocol-detail-resource h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.protocol-detail-resource h3 i { color: var(--site-red); }
.protocol-detail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.protocol-detail-tags > span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--site-text); border: 1px solid color-mix(in srgb, var(--site-blue) 22%, var(--site-line)); border-radius: 10px; background: color-mix(in srgb, var(--site-blue) 7%, var(--site-surface)); font-size: 0.72rem; font-weight: 800; }
.protocol-detail-tags > span i { color: var(--site-blue); font-size: 0.65rem; }
.protocol-detail-resource .hpo-detail-empty { padding: 13px; font-size: 0.75rem; }
.protocol-detail-outcome { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.protocol-detail-outcome > div { padding: 16px; border: 1px solid color-mix(in srgb, var(--site-green) 25%, var(--site-line)); border-radius: 13px; background: color-mix(in srgb, var(--site-green) 6%, var(--site-surface-2)); }
.protocol-detail-outcome > div > span,
.protocol-detail-med-note > span { display: block; color: var(--site-faint); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.protocol-detail-outcome > div > strong { display: block; margin-top: 7px; color: var(--site-green); font-size: 0.9rem; }
.protocol-detail-outcome.is-deceased > div { border-color: color-mix(in srgb, var(--site-red) 25%, var(--site-line)); background: color-mix(in srgb, var(--site-red) 6%, var(--site-surface-2)); }
.protocol-detail-outcome.is-deceased > div > strong { color: var(--site-red); }
.protocol-detail-med-note { margin-top: 15px; padding: 15px; border: 1px solid var(--site-line); border-radius: 13px; background: var(--site-surface-2); }
.protocol-detail-med-note p { margin: 7px 0 0; color: var(--site-muted); font-size: 0.82rem; line-height: 1.6; }
.protocol-detail-subtitle--spaced { margin-top: 24px; }
.protocol-detail-infusion-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.protocol-detail-infusion { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 3px 10px; min-width: 0; padding: 13px; border: 1px solid color-mix(in srgb, var(--site-blue) 22%, var(--site-line)); border-radius: 13px; background: color-mix(in srgb, var(--site-blue) 6%, var(--site-surface-2)); }
.protocol-detail-infusion i { grid-row: span 2; display: grid; width: 32px; height: 32px; place-items: center; color: var(--site-blue); border-radius: 9px; background: color-mix(in srgb, var(--site-blue) 11%, var(--site-surface)); font-size: 0.72rem; }
.protocol-detail-infusion span { color: var(--site-text); font-size: 0.74rem; font-weight: 850; overflow-wrap: anywhere; }
.protocol-detail-infusion strong { color: var(--site-blue); font-size: 0.68rem; }
.protocol-detail-audit { margin-top: 0; padding-top: 0; border-top: 0; }
.hpo-detail-grid + .protocol-detail-audit { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--site-line); }
.protocol-detail-brand { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--site-line); }
.protocol-detail-brand img { width: 48px; height: 48px; object-fit: contain; }
.protocol-detail-brand strong,
.protocol-detail-brand span { display: block; }
.protocol-detail-brand strong { color: var(--site-text); font-size: 0.84rem; }
.protocol-detail-brand span { margin-top: 3px; color: var(--site-faint); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

/* Léková databáze */
.med-page .admin-only,
.med-page .admin-only-inline,
.med-page .admin-only-block { display: none !important; }
.med-page.admin-active .admin-only { display: table-cell !important; }
.med-page.admin-active .admin-only-inline { display: inline-flex !important; }
.med-page.admin-active .admin-only-block { display: block !important; }
.med-page .modal-flex { display: flex !important; }

.med-main { display: grid; gap: 18px; }
.med-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(34px, 6vw, 90px);
  overflow: hidden;
  padding: clamp(34px, 5vw, 64px);
  border: 1px solid var(--site-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--site-red) 11%, transparent), transparent 24rem),
    var(--site-surface);
  box-shadow: var(--site-shadow);
}
.med-hero::before { content: ""; position: absolute; top: 0; left: 0; width: 76px; height: 3px; background: var(--site-red); }
.med-hero .home-kicker { margin: 0 0 20px; }
.med-hero h1 { margin: 0; font-size: clamp(3rem, 6.2vw, 5.8rem); font-weight: 900; letter-spacing: -0.075em; line-height: 0.92; }
.med-hero h1 span { display: block; color: var(--site-red); }
.med-hero__copy > p:last-child { max-width: 660px; margin: 25px 0 0; color: var(--site-muted); font-size: clamp(1rem, 1.45vw, 1.12rem); line-height: 1.7; }
.med-hero__actions { display: flex; min-width: 220px; align-self: start; justify-self: end; flex-direction: column; gap: 10px; }
.med-count { display: flex; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid var(--site-line); border-radius: 15px; background: var(--site-surface-2); }
.med-count strong { color: var(--site-red); font-size: 1.7rem; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.med-count small { color: var(--site-muted); font-size: 0.72rem; font-weight: 800; line-height: 1.35; }
.med-admin-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 13px; background: var(--site-surface-2); font-size: 0.82rem; font-weight: 850; cursor: pointer; }
.med-admin-button i { color: var(--site-red); }
.med-admin-button:hover { border-color: color-mix(in srgb, var(--site-red) 34%, var(--site-line)); background: var(--site-surface-3); }

.med-notice { display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding: 20px 24px; color: var(--site-muted); border: 1px solid color-mix(in srgb, var(--site-red) 34%, var(--site-line)); border-radius: 17px; background: linear-gradient(90deg, var(--site-red-soft), var(--site-surface) 34%, var(--site-surface) 66%, var(--site-red-soft)); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--site-red) 14%, transparent); }
.med-notice__icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; color: var(--site-amber); border: 1px solid color-mix(in srgb, var(--site-amber) 24%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--site-amber) 14%, transparent); font-size: 1.05rem; }
.med-notice__copy { width: fit-content; max-width: 960px; min-width: 0; text-align: left; }
.med-notice__copy strong { display: block; color: var(--site-red); font-size: 0.84rem; font-weight: 900; letter-spacing: -0.01em; }
.med-notice__copy p { margin: 3px 0 0; font-size: 0.84rem; line-height: 1.55; }

.med-admin-panel,
.med-catalog { padding: clamp(24px, 4vw, 38px); border: 1px solid var(--site-line); border-radius: 23px; background: var(--site-surface); box-shadow: var(--site-shadow-soft); }
.med-admin-panel { border-top: 3px solid var(--site-green); }
.med-section-heading { display: flex; align-items: center; gap: 14px; }
.med-section-heading__icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; color: var(--site-red); border-radius: 12px; background: var(--site-red-soft); }
.med-section-heading__icon--green { color: var(--site-green); background: color-mix(in srgb, var(--site-green) 12%, transparent); }
.med-section-heading span:not(.med-section-heading__icon) { display: block; color: var(--site-muted); font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.med-section-heading h2 { margin: 2px 0 0; font-size: 1.3rem; font-weight: 900; letter-spacing: -0.04em; }

.med-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.med-form-grid label,
.med-filter { display: grid; gap: 7px; min-width: 0; color: var(--site-muted); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.med-form-grid__wide { grid-column: 1 / -1; }
.med-input { width: 100%; min-height: 48px; padding: 12px 14px; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 12px; outline: 0; background: var(--site-surface-2); font-size: 0.88rem; font-weight: 600; letter-spacing: normal; text-transform: none; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
textarea.med-input { min-height: 105px; resize: vertical; }
.med-input::placeholder { color: var(--site-faint); opacity: 1; }
.med-input:hover { border-color: var(--site-line-strong); }
.med-input:focus { border-color: color-mix(in srgb, var(--site-red) 55%, var(--site-line)); box-shadow: 0 0 0 4px var(--site-red-soft); background: var(--site-surface); }
.med-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.med-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.med-button--ghost { color: var(--site-text); border-color: var(--site-line); background: var(--site-surface-2); }
.med-button--red { color: #fff; background: var(--site-red); }
.med-button--green { color: #fff; background: var(--site-green); }

.med-catalog__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.med-catalog__eyebrow { display: block; margin-bottom: 5px; color: var(--site-red); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.med-catalog__head h2 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 900; letter-spacing: -0.06em; line-height: 1; }
.med-catalog__live { display: inline-flex; align-items: center; gap: 8px; color: var(--site-muted); font-size: 0.72rem; font-weight: 800; }
.med-catalog__live > span { width: 8px; height: 8px; border-radius: 50%; background: var(--site-green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--site-green) 12%, transparent); }
.med-filters { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.35fr); gap: 12px; margin-top: 28px; padding: 15px; border: 1px solid var(--site-line); border-radius: 16px; background: var(--site-surface-2); }
.med-search-field { position: relative; display: block; }
.med-search-field i { position: absolute; top: 50%; left: 15px; z-index: 1; color: var(--site-faint); transform: translateY(-50%); }
.med-search-field .med-input { padding-left: 42px; background: var(--site-surface); }

.med-table-shell { margin-top: 18px; overflow-x: auto; border: 1px solid var(--site-line); border-radius: 17px; }
.med-table { width: 100%; min-width: 1050px; border-collapse: collapse; text-align: left; }
.med-table th { padding: 16px 18px; color: var(--site-muted); background: var(--site-surface-2); font-size: 0.64rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.med-table td { padding: 18px; color: var(--site-muted); border-top: 1px solid var(--site-line); font-size: 0.8rem; line-height: 1.55; vertical-align: top; }
.med-table td:first-child { color: var(--site-text); font-weight: 900; }
.med-table td:nth-child(3) { color: var(--site-text); font-weight: 700; }
.med-table tbody tr { transition: background-color 150ms ease; }
.med-table tbody tr:hover { background: var(--site-surface-2); }
.med-table-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.med-row-button { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 0 10px; color: var(--site-text); border: 1px solid var(--site-line); border-radius: 10px; background: var(--site-surface-2); font-size: 0.7rem; font-weight: 850; cursor: pointer; }
.med-row-button--delete { color: var(--site-red); border-color: color-mix(in srgb, var(--site-red) 22%, var(--site-line)); background: var(--site-red-soft); }
.med-error { color: var(--site-red); font-weight: 900; }
.med-error-detail { margin-top: 4px; color: var(--site-muted); font-size: 0.78rem; }

.med-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(2, 5, 10, 0.82); backdrop-filter: blur(12px); }
.med-modal__panel { width: min(100%, 580px); max-height: calc(100vh - 36px); overflow-y: auto; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--site-line-strong); border-radius: 22px; background: var(--site-surface); box-shadow: var(--site-shadow); }
.med-modal__panel--small { width: min(100%, 440px); }
.med-modal__fields { display: grid; gap: 11px; margin-top: 24px; }
.med-modal__description { margin: 20px 0 0; color: var(--site-muted); font-size: 0.88rem; line-height: 1.65; }
.med-login-error { margin: 14px 0 0; color: var(--site-red); font-size: 0.78rem; font-weight: 800; }

.home-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 28px;
  background: var(--site-surface);
  box-shadow: var(--site-shadow);
}
.home-hero__copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 34px; padding: clamp(30px, 5vw, 68px); }
.home-kicker { display: inline-flex; align-items: center; gap: 10px; width: fit-content; margin-bottom: 24px; color: var(--site-red); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.home-kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.home-hero h1 { max-width: 780px; margin: 0; font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 900; letter-spacing: -0.075em; line-height: 0.9; }
.home-hero h1 span { display: block; color: var(--site-red); }
.home-hero h1 .home-hero__motto-neutral { color: var(--site-text); }
.home-hero__lead { max-width: 650px; margin: 26px 0 0; color: var(--site-muted); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.7; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-action { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1px solid var(--site-line); border-radius: 12px; background: var(--site-surface-2); font-size: 0.88rem; font-weight: 850; text-decoration: none; }
.home-action--primary { color: #fff !important; border-color: transparent; background: var(--site-red); }
.home-action i { font-size: 0.9em; }

.home-hero__panel { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: clamp(28px, 4vw, 48px); background: var(--site-surface-2); }
.home-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--site-line); }
.home-status__label { color: var(--site-muted); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.home-status__value { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 850; }
.home-status__value::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--site-green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--site-green) 13%, transparent); }
.home-tip { display: grid; flex: 1; width: 100%; align-content: center; justify-items: center; text-align: center; }
.home-tip__eyebrow { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--site-red); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.home-tip__text { width: 100%; max-width: 22ch; min-height: 118px; margin-top: 14px; color: var(--site-text); font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 760; letter-spacing: -0.035em; line-height: 1.35; }
.home-tip__text strong { color: var(--site-red) !important; }

.home-portal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.home-portal[hidden] { display: none; }
.home-portal.home-portal--leadership { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.portal-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 22px;
  color: var(--site-text);
  border: 1px solid var(--site-line);
  border-radius: 18px;
  background: var(--site-surface);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.portal-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--portal-color, var(--site-red)) 52%, var(--site-line)); box-shadow: var(--site-shadow-soft); }
.portal-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.portal-card__icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--portal-color, var(--site-red)); border-radius: 12px; background: color-mix(in srgb, var(--portal-color, var(--site-red)) 12%, transparent); }
.portal-card__arrow { color: var(--site-faint); transition: transform 180ms ease, color 180ms ease; }
.portal-card:hover .portal-card__arrow { color: var(--portal-color, var(--site-red)); transform: translate(3px, -3px); }
.portal-card h2 { margin: 26px 0 5px; font-size: 1.13rem; font-weight: 900; letter-spacing: -0.035em; }
.portal-card p { margin: 0; color: var(--site-muted); font-size: 0.84rem; line-height: 1.55; }

.home-content { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr); gap: 24px; }
.home-section { min-width: 0; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--site-line); border-radius: 24px; background: var(--site-surface); }
.home-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.home-section__eyebrow { margin: 0 0 6px; color: var(--site-red); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.home-section h2 { margin: 0; font-size: clamp(1.8rem, 3.2vw, 2.8rem); font-weight: 900; letter-spacing: -0.055em; line-height: 1.05; }
.home-about__lead { max-width: 720px; margin: 0 0 28px; color: var(--site-muted); font-size: 1.02rem; line-height: 1.75; }
.home-requirements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-requirement { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 12px 14px; border: 1px solid var(--site-line); border-radius: 13px; background: var(--site-surface-2); font-size: 0.86rem; font-weight: 750; }
.home-requirement i { width: 22px; color: var(--site-red); text-align: center; }

.home-recruitment { border-top: 3px solid var(--site-red); }
.home-form { display: grid; gap: 16px; }
.home-field { display: grid; gap: 7px; }
.home-field-grid { display: grid; grid-template-columns: 0.62fr 1.38fr; gap: 12px; }
.home-field label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.home-form input, .home-form textarea { width: 100%; padding: 13px 14px; }
.home-form button { width: 100%; min-height: 52px; color: #fff; border: 0; background: var(--site-red); }
.home-form__note { margin: -4px 0 4px; color: var(--site-muted); font-size: 0.82rem; }

.home-leadership {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 23%, color-mix(in srgb, var(--site-red) 10%, transparent), transparent 30rem),
    var(--site-surface);
}

.home-leadership::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--site-red), transparent);
  opacity: 0.7;
}

.leadership-board { max-width: 1120px; margin-inline: auto; padding-top: 10px; }
.leadership-featured { display: grid; max-width: 1040px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 auto 32px; }
.leadership-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.leadership-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.leadership-group-label { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; color: var(--site-red) !important; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.11em; text-transform: uppercase; }
.leadership-group-label::before, .leadership-group-label::after { content: ""; height: 1px; flex: 1; background: var(--site-line); }
.leadership-group-label span { display: inline-flex; align-items: center; gap: 9px; }

.leader-profile {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 288px;
  align-items: center;
  flex-direction: column;
  padding: 24px 18px 18px;
  overflow: hidden;
  color: var(--site-text);
  border: 1px solid var(--site-line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--site-surface-2) 94%, var(--leader-color, var(--site-red)) 6%);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.1);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.leader-profile::before {
  content: "";
  position: absolute;
  top: -110px;
  left: 50%;
  width: 260px;
  height: 220px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--leader-color, var(--site-red)) 14%, transparent);
  filter: blur(28px);
  transform: translateX(-50%);
}

.leader-profile:hover {
  z-index: 1;
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--leader-color, var(--site-red)) 52%, var(--site-line));
  box-shadow: 0 24px 58px color-mix(in srgb, var(--leader-color, var(--site-red)) 13%, rgba(0, 0, 0, 0.25));
}

.leader-profile--featured {
  display: grid;
  width: 100%;
  min-height: 250px;
  grid-template-columns: 136px minmax(0, 1fr);
  padding: 28px 24px;
  text-align: left;
}

.leader-profile--featured::before { top: 50%; left: 70px; width: 300px; height: 300px; transform: translateY(-50%); }
.leader-profile--department { min-height: 288px; }
.leader-profile--department .leader-profile__body { flex: 1; }
.leader-profile--department .leader-profile__action { margin-top: auto; }
.leader-profile__rank { position: absolute; top: 18px; right: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--leader-color); border: 1px solid color-mix(in srgb, var(--leader-color) 26%, var(--site-line)); border-radius: 999px; background: color-mix(in srgb, var(--leader-color) 10%, transparent); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.leader-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100px;
  height: 100px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: var(--leader-color, var(--site-red));
  border: 3px solid var(--site-surface-2);
  border-radius: 50%;
  background: color-mix(in srgb, var(--leader-color, var(--site-red)) 14%, var(--site-surface-2));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--leader-color, var(--site-red)) 42%, transparent), 0 14px 35px rgba(0, 0, 0, 0.2);
}

.leader-avatar::before { content: attr(data-initials); font-size: 1.65rem; font-weight: 950; letter-spacing: -0.06em; }
.leader-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leader-avatar--large { width: 120px; height: 120px; }
.leader-avatar.is-fallback img { display: none; }

.leader-profile__body { position: relative; z-index: 1; display: flex; min-width: 0; width: 100%; align-items: center; flex-direction: column; }
.leader-profile--featured .leader-profile__body { align-items: flex-start; padding-left: 10px; }
.leader-profile__role { display: inline-flex; max-width: 100%; margin-top: 20px; padding: 6px 9px; color: var(--leader-color, var(--site-red)); border-radius: 999px; background: color-mix(in srgb, var(--leader-color, var(--site-red)) 12%, transparent); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.06em; line-height: 1.3; text-transform: uppercase; }
.leader-profile--featured .leader-profile__role { margin-top: 0; }
.leader-profile strong { display: block; margin-top: 12px; color: var(--site-text); font-size: 1.05rem; font-weight: 900; letter-spacing: -0.035em; line-height: 1.3; }
.leader-profile--featured strong { max-width: 360px; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.leader-profile__handle { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--site-muted); font-size: 0.78rem; font-weight: 750; }
.leader-profile__handle i { color: #5865f2; }
.leader-profile__action { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 11px 12px; color: var(--site-muted); border: 1px solid var(--site-line); border-radius: 11px; background: var(--site-surface); font-size: 0.75rem; font-weight: 850; transition: color 160ms ease, border-color 160ms ease; }
.leader-profile:hover .leader-profile__action { color: var(--leader-color, var(--site-red)); border-color: color-mix(in srgb, var(--leader-color, var(--site-red)) 35%, var(--site-line)); }
.leader-profile--featured .leader-profile__action { width: auto; margin-top: 22px; padding-inline: 16px; }

.home-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 26px 0 8px; color: var(--site-muted); border-top: 1px solid var(--site-line); font-size: 0.78rem; }
.home-footer__mark { color: var(--site-text); font-weight: 900; }

@media (max-width: 1100px) {
  .home-header { position: relative; flex-direction: column; align-items: stretch; padding-top: 20px; }
  .home-nav { overflow-x: auto; justify-content: flex-start; }
  .home-nav > * { flex: 0 0 auto; }
  .hub-intro { grid-template-columns: 1fr; gap: 30px; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-card, .hub-card--compact { grid-column: span 1; }
  .hub-card--disabled { grid-column: 1 / -1; }
  .hpo-db-hero { grid-template-columns: 1fr; gap: 26px; }
  .hpo-db-hero__side { min-width: 0; grid-template-columns: 1fr 1fr; }
  .hpo-db-toolbar { grid-template-columns: 1fr 1fr; }
  .hpo-db-control--search { grid-column: 1 / -1; }
  .hpo-detail-grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpo-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .protocol-detail-infusion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .protocol-stats__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .protocol-stats__insights { grid-template-columns: 1fr; }
  .med-hero { grid-template-columns: 1fr; gap: 30px; }
  .med-hero__actions { min-width: 0; justify-self: stretch; flex-direction: row; }
  .med-hero__actions > * { flex: 1; }
  .home-hero { grid-template-columns: 1fr; }
  .home-hero__panel { min-height: 250px; }
  .home-tip__text { min-height: auto; }
  .home-portal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-portal .portal-card:last-child { grid-column: 1 / -1; }
  .home-content { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .leadership-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leader-profile--featured { display: flex; min-height: 330px; padding: 24px 20px 18px; text-align: center; }
  .leader-profile--featured .leader-profile__body { align-items: center; padding-left: 0; }
  .leader-profile--featured .leader-profile__rank { position: relative; top: auto; right: auto; order: -1; margin-bottom: 16px; }
  .leader-profile--featured .leader-profile__role { margin-top: 18px; }
  .leader-profile--featured .leader-profile__action { width: 100%; margin-top: auto; }
}

@media (max-width: 760px) {
  body { background-size: 100% 3px, auto, auto, auto !important; }
  .site-dialog { align-items: end; padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .site-dialog__panel { width: 100%; padding: 24px 20px 20px; border-radius: 20px; transform: translateY(28px); }
  .site-dialog__header { grid-template-columns: 46px minmax(0, 1fr) 38px; gap: 12px; }
  .site-dialog__icon { width: 46px; height: 46px; border-radius: 14px; }
  .site-dialog__close { width: 38px; height: 38px; }
  .site-dialog__message { margin-top: 20px; }
  .site-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .site-dialog--alert .site-dialog__actions { grid-template-columns: 1fr; }
  .site-home { padding-inline: 14px !important; }
  .home-header { gap: 16px; margin-bottom: 18px; }
  body:not(.site-home) > .global-site-header { width: min(1320px, calc(100% - 28px)); }
  .home-brand__meta { display: none; }
  .home-nav { margin-inline: -14px; padding: 7px 14px; border-width: 1px 0; border-radius: 0; background: transparent; }
  .hub-intro { gap: 24px; padding: 28px 22px; border-radius: 20px; }
  .hub-intro h1 { font-size: clamp(2.55rem, 12vw, 3.6rem); overflow-wrap: anywhere; }
  .hub-intro__copy > p:last-child { margin-top: 20px; }
  .hub-intro__note { align-items: flex-start; padding: 15px; }
  .hub-grid { grid-template-columns: 1fr; gap: 12px; }
  .hub-card, .hub-card--compact, .hub-card--disabled { grid-column: auto; min-height: 290px; padding: 24px 20px; border-radius: 19px; }
  .hub-card__body { margin-top: 28px; }
  .hpo-db-main, .hpo-detail-main { gap: 12px; }
  .hpo-db-hero { gap: 22px; padding: 28px 22px; border-radius: 20px; }
  .hpo-db-hero h1 { font-size: clamp(2.7rem, 15vw, 4rem); overflow-wrap: anywhere; }
  .hpo-db-hero__side { grid-template-columns: 1fr; }
  .hpo-db-toolbar { grid-template-columns: 1fr; padding: 16px; border-radius: 16px; }
  .hpo-db-control--search { grid-column: auto; }
  .protocol-stats { padding: 22px 18px; border-radius: 19px; }
  .protocol-stats__head { align-items: stretch; flex-direction: column; gap: 17px; }
  .protocol-stats__controls { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .protocol-stats__range { width: 100%; }
  .protocol-stats__range button { flex: 1 1 0; }
  .protocol-stats__month { min-width: 0; }
  .protocol-stats__report { width: 100%; }
  .protocol-stats__kpis,
  .protocol-stats__usage-grid { grid-template-columns: 1fr; }
  .protocol-stat-card { min-height: 88px; }
  .protocol-usage-card__title { flex-direction: column; gap: 4px; }
  .protocol-usage-card__title small { text-align: left; }
  .ringer-extra { grid-template-columns: 1fr 110px 36px; }
  .hpo-db-table-card { border-radius: 19px; }
  .hpo-db-table-head { align-items: flex-start; flex-direction: column; padding: 24px 20px 18px; }
  .hpo-db-table-shell { overflow: visible; padding: 12px; }
  .hpo-db-table { min-width: 0; border-collapse: separate; }
  .hpo-db-table thead { display: none; }
  .hpo-db-table, .hpo-db-table tbody, .hpo-db-table tr, .hpo-db-table td { display: block; width: 100%; }
  .hpo-db-table tbody { display: grid; gap: 11px; }
  .hpo-db-table tr { overflow: hidden; border: 1px solid var(--site-line); border-radius: 14px; background: var(--site-surface-2); }
  .hpo-db-table td { display: grid; grid-template-columns: minmax(115px, 0.43fr) minmax(0, 0.57fr); align-items: center; gap: 12px; padding: 11px 13px; border-top: 1px solid var(--site-line); }
  .hpo-db-table td:first-child { border-top: 0; background: color-mix(in srgb, var(--site-amber) 6%, var(--site-surface-2)); }
  .protocol-db-page .hpo-db-table td:first-child { background: color-mix(in srgb, var(--site-red) 6%, var(--site-surface-2)); }
  .hpo-db-table td::before { content: attr(data-label); color: var(--site-faint); font-size: 0.61rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
  .hpo-db-table td > * { justify-self: start; }
  .hpo-db-message-row { display: block !important; }
  .hpo-db-message-row td { display: block !important; padding: 30px 18px !important; }
  .hpo-db-message-row td::before { content: none; }
  .hpo-detail-actions { align-items: stretch; flex-direction: column; }
  .hpo-detail-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .hpo-detail-actions > a { width: 100%; }
  .hpo-detail-document { border-radius: 19px; }
  .hpo-detail-hero { grid-template-columns: 1fr; align-items: start; padding: 28px 22px; }
  .hpo-detail-hero h1 { font-size: clamp(2.5rem, 14vw, 4rem); overflow-wrap: anywhere; }
  .hpo-detail-hero__meta { min-width: 0; grid-template-columns: 1fr 1fr; }
  .hpo-detail-section { padding: 26px 20px; }
  .hpo-detail-grid,
  .hpo-detail-grid--five,
  .hpo-detail-grid--three,
  .hpo-triage-grid,
  .hpo-action-grid,
  .protocol-detail-narratives,
  .protocol-detail-resource-grid,
  .protocol-detail-outcome,
  .protocol-detail-infusion-grid { grid-template-columns: 1fr; }
  .hpo-detail-field--wide { grid-column: auto; }
  .hpo-detail-chips { display: grid; grid-template-columns: 1fr; }
  .hpo-detail-chips span { width: 100%; }
  .med-hero { gap: 25px; padding: 28px 22px; border-radius: 20px; }
  .med-hero h1 { font-size: clamp(2.65rem, 13vw, 3.8rem); overflow-wrap: anywhere; }
  .med-hero__copy > p:last-child { margin-top: 20px; }
  .med-hero__actions { display: grid; grid-template-columns: 1fr; }
  .med-notice { align-items: flex-start; flex-direction: row; padding: 18px 16px; }
  .med-notice__copy { text-align: left; }
  .med-admin-panel, .med-catalog { padding: 24px 18px; border-radius: 19px; }
  .med-form-grid, .med-filters { grid-template-columns: 1fr; }
  .med-form-grid__wide { grid-column: auto; }
  .med-form-actions { display: grid; grid-template-columns: 1fr; }
  .med-catalog__head { align-items: flex-start; flex-direction: column; }
  .med-table-shell { overflow: visible; border: 0; border-radius: 0; }
  .med-table { min-width: 0; border-collapse: separate; }
  .med-table thead { display: none; }
  .med-table, .med-table tbody, .med-table tr, .med-table td { display: block; width: 100%; }
  .med-table tbody { display: grid; gap: 12px; }
  .med-table tr { overflow: hidden; border: 1px solid var(--site-line); border-radius: 14px; background: var(--site-surface-2); }
  .med-table td { display: grid; grid-template-columns: minmax(105px, 0.42fr) minmax(0, 0.58fr); gap: 12px; padding: 13px 14px !important; border-top: 1px solid var(--site-line); overflow-wrap: anywhere; }
  .med-table td:first-child { border-top: 0; background: color-mix(in srgb, var(--site-red) 6%, var(--site-surface-2)); font-size: 1rem; }
  .med-table td::before { content: attr(data-label); color: var(--site-faint); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
  .med-page.admin-active .med-table td.admin-only { display: block !important; }
  .med-table-error-row td { display: block; }
  .med-table-error-row td::before { content: none; }
  .med-table-actions { justify-content: flex-start; margin-top: 8px; }
  .med-modal { align-items: flex-end; padding: 10px; }
  .med-modal__panel { max-height: calc(100vh - 20px); border-radius: 19px; }
  .home-hero { min-height: 0; border-radius: 20px; }
  .home-hero__copy, .home-hero__panel { padding: 26px 22px; }
  .home-hero h1 { max-width: 100%; font-size: clamp(2.55rem, 11vw, 3.4rem); overflow-wrap: anywhere; }
  .home-hero__lead { margin-top: 20px; }
  .home-hero__actions { display: grid; grid-template-columns: 1fr; }
  .home-action { justify-content: center; }
  .home-portal { grid-template-columns: 1fr; }
  .home-portal .portal-card:last-child { grid-column: auto; }
  .portal-card { min-height: 150px; }
  .portal-card h2 { margin-top: 18px; }
  .home-content { gap: 14px; }
  .home-section { padding: 24px 20px; border-radius: 19px; }
  .home-section__head { align-items: flex-start; flex-direction: column; }
  .home-requirements, .home-field-grid { grid-template-columns: 1fr; }
  .leadership-featured { grid-template-columns: minmax(0, 1fr); margin-bottom: 28px; }
  .leadership-grid { grid-template-columns: minmax(0, 1fr); }
  .leadership-group-label { align-items: flex-start; text-align: center; }
  .leadership-group-label span { max-width: 210px; justify-content: center; }
  .leader-profile, .leader-profile--featured { display: flex; width: 100%; min-height: 0; padding: 26px 20px 20px; text-align: center; }
  .leader-profile--featured .leader-profile__body { align-items: center; padding-left: 0; }
  .leader-profile__rank { position: relative; top: auto; right: auto; order: -1; margin-bottom: 20px; }
  .leader-avatar--large { width: 112px; height: 112px; }
  .leader-profile--featured .leader-profile__role { margin-top: 22px; }
  .leader-profile strong { overflow-wrap: anywhere; }
  .leader-profile__action, .leader-profile--featured .leader-profile__action { width: 100%; margin-top: 22px; }
  .home-footer { align-items: flex-start; flex-direction: column; }

  .site-theme-toggle { width: 46px; padding: 0; justify-content: center; }
  .site-theme-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  .wrap { width: min(100% - 20px, 1440px) !important; margin-top: 12px !important; padding-inline: 0 !important; }
  .topbar { align-items: stretch !important; flex-direction: column !important; padding: 10px !important; border-radius: 14px !important; }
  .topbar > * { max-width: 100%; }
  .topbar .actions, .left-actions, .right-actions { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
  .topbar .actions > *, .left-actions > *, .right-actions > * { justify-content: center; width: 100%; white-space: normal !important; text-align: center; }
  .card { padding: 16px !important; }
  .section { padding: 16px !important; }
  .titleblock h1 { font-size: clamp(1.75rem, 8vw, 2.25rem) !important; line-height: 1.05; }
  .protocol { width: 100% !important; }
  .overflow-x-auto > table { min-width: 760px; }
  .wrap, .card, form, .section, .grid, .field { min-width: 0 !important; max-width: 100% !important; }
  form > .no-print { max-width: 100% !important; flex-wrap: wrap !important; }
  form > .no-print > * { max-width: 100%; white-space: normal !important; }
  .zzsTable { width: 100% !important; table-layout: fixed; }
  .zzsTable th, .zzsTable td { overflow-wrap: anywhere; }
  .fc table { min-width: 0 !important; }
  .fc, .fc-view-harness, .fc-view { max-width: 100% !important; min-width: 0 !important; }
  .site-page--leky header > div:first-child { flex-direction: column; max-width: 100%; text-align: center; }
  .site-page--leky header > div:first-child > div { min-width: 0; max-width: 100%; }
  .site-page--leky header h1 { flex-wrap: wrap; justify-content: center; font-size: clamp(1.8rem, 9vw, 2.25rem) !important; }
  header img { max-width: 64px; max-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-theme-toggle,
  .no-print { display: none !important; }
  html, body { color-scheme: light; background: #fff !important; }
  .hpo-detail-page { padding: 0 !important; color: #111827 !important; }
  .hpo-detail-main { display: block; width: 100% !important; max-width: none !important; }
  .hpo-detail-document { color: #111827; border: 0; border-radius: 0; box-shadow: none; }
  .hpo-detail-hero { color: #111827; background: #f8fafc; }
  .hpo-detail-hero h1,
  .hpo-detail-section h2,
  .hpo-detail-field > strong,
  .hpo-detail-table td,
  .hpo-action-item span { color: #111827 !important; }
  .hpo-detail-section { break-inside: avoid; border-color: #dbe2ea; }
  .hpo-detail-field,
  .hpo-triage-card,
  .hpo-action-item,
  .hpo-detail-note,
  .protocol-detail-narratives > div,
  .protocol-detail-resource,
  .protocol-detail-outcome > div,
  .protocol-detail-med-note,
  .protocol-detail-infusion { border-color: #dbe2ea; background: #f8fafc; }
  .protocol-detail-narratives h3,
  .protocol-detail-resource h3,
  .protocol-detail-tags > span,
  .protocol-detail-infusion span,
  .protocol-detail-brand strong { color: #111827 !important; }
}
/* Skryté části portálu nesmí přebít rozvržení stránky. */
[hidden] { display: none !important; }
