/* Entity Notes — sjednocený blok pro vláknové interní poznámky */

.en-block { margin: 0; }
.en-block > *:last-child { margin-bottom: 0; }

/* Header — stejný styl jako karta „Odevzdané dokumenty" v sprava-dokumentu */
.en-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
  padding: 0 0 .85rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.en-title__main {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  color: inherit;
}
.en-title__main svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-accent, #0d9488);
}
.en-title__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.en-title__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .4rem;
  background: var(--color-accent, #0d9488);
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.en-title__meta {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 500;
  color: var(--color-text-muted, #6e7389);
  white-space: nowrap;
}

/* Filtr Vše / Záznamy / Dokumenty — pravý horní roh hlavičky */
.en-title__filter {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 7px;
  overflow: hidden;
}
.en-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .26rem .6rem;
  font-size: .76rem;
  font-weight: 600;
  color: var(--color-text-muted, #6e7389);
  text-decoration: none;
  background: #fff;
  border-right: 1px solid var(--color-border, #e2e8f0);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.en-filter-btn:last-child { border-right: 0; }
.en-filter-btn:hover { background: #f1f5f9; color: var(--color-accent, #0d9488); }
.en-filter-btn.is-active { background: var(--color-accent, #0d9488); color: #fff; }
.en-filter-btn__n { font-size: .68rem; font-weight: 700; opacity: .6; }
.en-filter-btn.is-active .en-filter-btn__n { opacity: .85; }

/* Toolbar „Vystavit:" — tlačítka pro nové klinické dokumenty (recept, neschopenka, …).
   Samostatný řádek pod nadpisem (2026-05-30, sloučení karty Klinické dokumenty). */
.en-doc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 1.1rem;
}
.en-doc-actions__label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-text-muted, #6e7389);
  margin-right: .15rem;
}

/* Form (editor + actions) */
.en-form { margin: 0 0 1.25rem; }
.en-form:last-child { margin-bottom: 0; }
.en-editor {
  border: 1.5px solid #cbd5e1; border-radius: 8px; background: #fff;
  margin: 0;
  transition: border-color .15s, box-shadow .15s;
}
.en-editor:focus-within {
  border-color: var(--color-accent, #0d9488);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.en-editor--inline { margin-top: .5rem; }
.en-toolbar {
  display: flex; gap: .25rem; padding: .35rem .5rem;
  border-bottom: 1px solid #f1f5f9;
}
.en-toolbar button {
  padding: .25rem .55rem; background: transparent; border: 1px solid transparent;
  border-radius: 4px; cursor: pointer; font-size: .85rem; color: #475569;
  font-family: inherit; line-height: 1;
}
.en-toolbar button:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* ── Klinické nástroje lišty ─────────────────────────────────────────────── */
.en-toolbar__sep {
  width: 1px; align-self: stretch; margin: .15rem .25rem;
  background: #e2e8f0;
}
.en-toolbar button[data-en-tool] { font-size: .95rem; }
/* Nápověda k našeptávači — pravá část lišty (flex push) */
.en-toolbar__hint {
  margin-left: auto; align-self: center;
  font-size: .7rem; color: #94a3b8; white-space: nowrap;
  padding-left: .5rem; cursor: help;
}
.en-toolbar__hint strong { color: #64748b; font-weight: 700; }
@media (max-width: 720px) { .en-toolbar__hint { display: none; } }

/* Voice dictation (Web Speech API) */
.en-toolbar button[data-en-voice] { font-size: .95rem; }
.en-toolbar button[data-en-voice].is-recording {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  animation: en-voice-pulse 1.5s ease-in-out infinite;
}
@keyframes en-voice-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(220, 38, 38, .35); }
  50%      { opacity: .85; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0); }
}
/* Feature-detect hide — třídu nasazuje DOMContentLoaded handler */
.no-speech-recognition .en-tool-voice,
.no-speech-recognition .en-toolbar__sep--voice { display: none; }

/* ── Rychlý zápis (⚡) — režim parsování ──────────────────────────────────────
 * ⚡ NEMĚNÍ zadávací pole — jen zvýrazní aktivní režim (pressed tlačítko + akcent
 * editoru) + živý náhled rozpoznaných entit pod editorem. */
.en-qn-toggle {
  font-size: .78rem !important; font-weight: 600; white-space: nowrap;
  color: #92400e !important;
}
.en-qn-toggle:hover { background: #fef3c7 !important; border-color: #fcd34d !important; }
.en-qn-toggle[aria-pressed="true"] {
  background: #f59e0b !important; border-color: #d97706 !important; color: #fff !important;
}
/* Aktivní režim = jemné, elegantní zvýraznění (měkký amber glow), NE tvrdý 1px border. */
.en-editor--quick {
  border-color: #fcd34d;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .14), 0 4px 14px rgba(245, 158, 11, .10);
}
.en-editor--quick:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .22), 0 4px 16px rgba(245, 158, 11, .14);
}
.en-editor--quick .en-toolbar {
  background: linear-gradient(180deg, #fffbeb 0%, #fffdf7 100%);
  border-bottom-color: #fde68a;
}
/* Živý náhled rozpoznaných entit — proužek pod editorem (jen aktivní režim + obsah). */
.en-qn-preview {
  display: flex; flex-wrap: wrap; gap: .3rem;
  padding: .45rem .65rem; background: #fffbeb; border-top: 1px dashed #fcd34d;
}
/* Našeptávač akcí — body-appended, fixed u kurzoru (default skrytý, JS přepíná display). */
.en-qn-suggest {
  position: fixed; z-index: 1000; display: none;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15,23,42,.12), 0 2px 4px rgba(15,23,42,.06);
  max-height: 240px; overflow-y: auto; padding: .25rem 0; min-width: 200px;
}
.en-qn-suggest__item {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; cursor: pointer;
  font-size: .85rem; color: #0f172a;
  border: 0; background: transparent; width: 100%; text-align: left; font-family: inherit;
}
.en-qn-suggest__item:hover,
.en-qn-suggest__item.is-active { background: #fef3c7; }
.en-qn-suggest__key { font-weight: 600; }
.en-qn-suggest__hint { font-size: .72rem; color: #94a3b8; margin-left: auto; padding-left: .5rem; }

/* ── Výkony / kódy pojišťovny — seznam na KONCI záznamu (ne v textu) ──────────
 * Cílí na živý editor (class .en-vykony-list) i uložený/editovaný záznam
 * (class po sanitizaci stripnutá → :has() dle struktury ul > li > vykon chip).
 * Každý kód na vlastním řádku, bez odrážek, s oddělovačem a hlavičkou. */
ul.en-vykony-list,
ul:has(> li > [data-en-chip="vykon"]) {
  list-style: none; margin: .65rem 0 0; padding: .5rem 0 0;
  border-top: 1px dashed #cbd5e1;
}
ul.en-vykony-list > li,
ul:has(> li > [data-en-chip="vykon"]) > li { padding: .12rem 0; }
ul.en-vykony-list::before,
ul:has(> li > [data-en-chip="vykon"])::before {
  content: "Výkony / kódy pojišťovny:";
  display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: #64748b; margin-bottom: .3rem;
}
.en-qn-chip { display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.4; }
.en-qn-chip--tooth    { background: #dbeafe; color: #1e40af; }
.en-qn-chip--sector   { background: #ede9fe; color: #5b21b6; }
.en-qn-chip--action   { background: #d1fae5; color: #065f46; }
.en-qn-chip--material  { background: #fed7aa; color: #9a3412; }

.en-tool-popup {
  position: absolute; z-index: 50;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.16);
  padding: .65rem;
}
.en-tool-popup__title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #64748b; margin: 0 0 .5rem;
}
.en-tool-popup__actions { display: flex; justify-content: flex-end; gap: .35rem; margin-top: .55rem; }

.en-fdi-grid { display: flex; flex-direction: column; gap: .25rem; }
.en-fdi-row  { display: flex; gap: .15rem; justify-content: center; }
.en-fdi-row--gap { margin-bottom: .35rem; }
.en-fdi-tooth {
  width: 30px; height: 30px; padding: 0;
  border: 1px solid #cbd5e1; border-radius: 5px; background: #fff;
  font-size: .68rem; font-weight: 700; color: #475569; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.en-fdi-tooth:hover { background: #f1f5f9; }
.en-fdi-tooth.is-picked { background: #0d9488; border-color: #0d9488; color: #fff; }
.en-fdi-mid { width: .5rem; }

.en-vykon-search {
  width: 480px; max-width: 100%; padding: .35rem .5rem; border: 1px solid #cbd5e1;
  border-radius: 5px; font-size: .85rem; font-family: inherit;
}
.en-vykon-results { max-height: 220px; overflow-y: auto; margin-top: .4rem; }
.en-vykon-item {
  display: block; width: 100%; text-align: left; padding: .35rem .5rem;
  border: 0; background: transparent; cursor: pointer; font-size: .8rem;
  border-radius: 4px; line-height: 1.3;
}
.en-vykon-item:hover { background: #f1f5f9; }
.en-vykon-item__kod { font-weight: 700; color: #0d9488; }
.en-vykon-empty { font-size: .8rem; color: #94a3b8; padding: .35rem .5rem; }

.en-link-menu { display: flex; flex-direction: column; min-width: 180px; }
.en-link-menu button {
  text-align: left; padding: .4rem .55rem; border: 0; background: transparent;
  cursor: pointer; font-size: .85rem; border-radius: 4px; color: #1e293b;
}
.en-link-menu button:hover { background: #f1f5f9; }

/* ── Fráze (klinické textové šablony) popup ── */
.en-phrase-list { max-height: 300px; overflow-y: auto; margin-top: .4rem; min-width: 320px; }
.en-phrase-cat {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: #94a3b8; padding: .45rem .5rem .2rem;
}
.en-phrase-item {
  display: block; width: 100%; text-align: left; padding: .4rem .55rem;
  border: 0; background: transparent; cursor: pointer; border-radius: 5px; line-height: 1.35;
}
.en-phrase-item:hover { background: #f1f5f9; }
.en-phrase-item__label { display: block; font-size: .82rem; font-weight: 600; color: #0f172a; }
.en-phrase-item__body {
  display: block; font-size: .74rem; color: #64748b; margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px;
}

@media (max-width: 640px) {
  .en-tool-popup { left: .5rem !important; right: .5rem; }
  .en-vykon-search { width: 100%; }
}
.en-editor__area {
  /* min-height ~5 řádků (.92rem × 1.6 × 5 ≈ 117.7px + padding 27.2px ≈ 145px) —
     na přání 2026-05-30 (dříve 3 řádky). max-height ~14 řádků s auto-scroll. */
  min-height: 148px; max-height: 360px; overflow-y: auto;
  padding: .85rem 1rem;
  font-size: .92rem; line-height: 1.6; outline: none;
  word-wrap: break-word;
}
.en-editor__area:empty::before {
  content: attr(data-placeholder); color: #94a3b8; pointer-events: none;
}
.en-editor__area p { margin: 0 0 .35rem; }
.en-editor__area ul, .en-editor__area ol { padding-left: 1.5rem; margin: .35rem 0; }

.en-form__actions { display: flex; justify-content: flex-end; gap: .35rem; margin-top: .65rem; }

/* Buttons */
.en-btn {
  padding: .35rem .85rem; border-radius: 6px; font-size: .85rem;
  border: 1px solid #cbd5e1; background: #fff; color: #475569; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.en-btn:hover { background: #f8fafc; }
.en-btn--xs { font-size: .72rem; padding: .25rem .55rem; }
.en-btn--primary { background: #0d9488; border-color: #0d9488; color: #fff; font-weight: 600; }
.en-btn--primary:hover { background: #0f766e; }
.en-btn--danger { color: #dc2626; }
.en-btn--danger:hover { background: #fee2e2; border-color: #fca5a5; }

/* Posts */
.en-empty {
  color: #64748b; font-style: italic; font-size: .9rem;
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
  background: #fafbfc;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
}
.en-posts { display: flex; flex-direction: column; gap: .75rem; margin: 0; }

.en-post {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: .75rem 1rem;
  transition: border-color .15s;
}
.en-post:hover { border-color: #cbd5e1; }
.en-post--deleted { background: #f8fafc; opacity: .65; }
.en-post--reception-only { background: #eff6ff; border-color: #bfdbfe; }
.en-post--hidden-from-reception { border-left: 3px solid #f59e0b; }

.en-post__head {
  display: flex; gap: .55rem; align-items: baseline; flex-wrap: wrap;
  font-size: .78rem; color: #64748b; margin-bottom: .35rem;
}
.en-post__author { font-weight: 700; color: #0f172a; }
.en-post__edited { font-style: italic; color: #94a3b8; }

.en-post__badge {
  display: inline-block; font-size: .65rem; padding: .1rem .45rem;
  border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.en-post__badge--reception { background: #dbeafe; color: #1e40af; }
.en-post__badge--hidden    { background: #fef3c7; color: #92400e; }

.en-post__body { font-size: .9rem; line-height: 1.55; color: #1e293b; }
.en-post__body p { margin: 0 0 .35rem; }
.en-post__body ul, .en-post__body ol { padding-left: 1.5rem; margin: .35rem 0; }
.en-post__body a { color: #0d9488; text-decoration: underline; }
.en-post__body--deleted { color: #94a3b8; font-style: italic; }

.en-post__actions {
  display: flex; gap: .35rem; flex-wrap: wrap;
  margin-top: .5rem; padding-top: .35rem;
  border-top: 1px dashed #f1f5f9;
}

.en-post__children {
  margin-top: .65rem; margin-left: 1.25rem;
  padding-left: .85rem; border-left: 2px solid #e2e8f0;
  display: flex; flex-direction: column; gap: .55rem;
}

/* ── Dekurz (plochý záznam zdravotní dokumentace) ───────────────────────── */
.en-post--dekurz {
  display: flex;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.en-post--dekurz .en-post__date {
  flex-shrink: 0;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .15rem;
  padding: .9rem .5rem;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.en-post__date-dm   { font-size: 1.12rem; font-weight: 800; color: #0f172a; }
.en-post__date-y    { font-size: .82rem;  font-weight: 600; color: #64748b; }
.en-post__date-time { font-size: .95rem;  font-weight: 700; color: #0d9488; margin-top: .2rem; }
.en-post--dekurz .en-post__main { flex: 1; min-width: 0; padding: .75rem 1rem; }
.en-post--dekurz .en-post__head { margin-bottom: .4rem; }

/* Nejnovější záznam — výrazná accent kotva */
.en-post--dekurz.en-post--latest { border-color: #99f6e4; }
.en-post--dekurz.en-post--latest .en-post__date {
  background: #f0fdfa;
  border-right-color: #0d9488;
  box-shadow: inset 3px 0 0 #0d9488;
}

/* Modifikátory se na dekurzu projeví hranou data, ne celé karty */
.en-post--dekurz.en-post--reception-only { background: #fff; }
.en-post--dekurz.en-post--reception-only .en-post__date { background: #eff6ff; border-right-color: #bfdbfe; }
.en-post--dekurz.en-post--hidden-from-reception { border-left: 3px solid #f59e0b; }

@media (max-width: 640px) {
  .en-post--dekurz { flex-direction: column; }
  .en-post--dekurz .en-post__date {
    width: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: .4rem;
    padding: .4rem .85rem;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  .en-post--dekurz.en-post--latest .en-post__date { box-shadow: inset 0 3px 0 #0d9488; }
  .en-post__date-time { margin-top: 0; }
}

/* Reply / Edit inline forms */
.en-reply-wrap, .en-edit-wrap, .en-correct-wrap {
  margin-top: .5rem; padding: .5rem; background: #f8fafc;
  border-radius: 6px;
}
/* §53 oprava se značkou */
.en-correct-wrap { background: #fff7ed; border: 1px solid #fed7aa; }
.en-correct-note { font-size: .8rem; color: #9a3412; line-height: 1.5; margin: 0 0 .5rem; }
.en-post__badge--correction {
  background: #ffedd5; color: #9a3412; text-decoration: none;
  border: 1px solid #fed7aa;
}
.en-post__badge--correction:hover { background: #fed7aa; }
.en-post__badge--corrected {
  background: #fef9c3; color: #854d0e; text-decoration: none; border: 1px solid #fde68a;
}
.en-post__badge--corrected:hover { background: #fde68a; }
/* §53 prohlížeč historie úprav (popup) */
.en-rev-popup { max-width: 440px; max-height: 380px; overflow-y: auto; }
.en-rev-item { border-top: 1px dashed #e2e8f0; padding: .5rem 0; }
.en-rev-item:first-of-type { border-top: 0; }
.en-rev-item__meta { font-size: .7rem; font-weight: 600; color: #94a3b8; margin-bottom: .25rem; }
.en-rev-item__body { font-size: .82rem; color: #334155; line-height: 1.5; }

/* Pagination */
.en-pagination {
  display: flex; justify-content: space-between; align-items: center;
  gap: .75rem; flex-wrap: wrap;
  margin: 1.1rem 0 0; padding: .85rem 0 0; border-top: 1px solid var(--color-border, #e2e8f0);
  font-size: .78rem; color: #64748b;
}
.en-pagination__nav { display: flex; align-items: center; gap: .35rem; }
.en-pagination__nav a, .en-pagination__disabled {
  padding: .25rem .55rem; border: 1px solid #cbd5e1; border-radius: 4px;
  text-decoration: none; color: #475569; background: #fff;
  font-size: .75rem;
}
.en-pagination__nav a:hover { background: #f1f5f9; }
.en-pagination__disabled { opacity: .4; cursor: not-allowed; }
.en-pagination__count { font-variant-numeric: tabular-nums; }

/* Mobile */
@media (max-width: 640px) {
  .en-post__children { margin-left: .5rem; padding-left: .5rem; }
  .en-toolbar { flex-wrap: wrap; }
  .en-post__actions { gap: .25rem; }
  .en-btn--xs { font-size: .7rem; padding: .2rem .45rem; }
}

/* ── Klinické chipy ──────────────────────────────────────────────────────── */
.en-block [data-en-chip] {
  display: inline-flex; align-items: baseline; gap: .15rem;
  padding: .04rem .4rem; margin: 0 .05rem;
  border-radius: 5px; font-weight: 600; font-size: .92em;
  white-space: nowrap;
}
.en-block [data-en-chip] a { color: inherit; text-decoration: none; }
.en-block [data-en-chip="tooth"]      { background: #ccfbf1; color: #0f766e; }
.en-block [data-en-chip="vykon"]      { background: #dbeafe; color: #1e40af; }
.en-block [data-en-chip="toothstate"] { background: #fef3c7; color: #92400e; }
.en-block [data-en-chip="reclink"]    { background: #e2e8f0; color: #334155; }

/* ── Denní dental chart log — záhlaví časového bloku ─────────────────────── */
/* Každý úkon (Hromadný / Rychlý zápis) má vlastní time-header chip uvnitř <p>.
 * Parent <p> dostává top odsazení + jemnou linku pro vizuální oddělení od
 * předchozího bloku. První time-header v dekurzu (pod hlavičkou dne) zůstává
 * blízko hlavičky bez extra odsazení. */
.en-block [data-en-chip="time-header"] {
  display: inline-block;
  background: transparent;
  color: #1e293b;
  padding: 0;
  font-size: 1rem;
  letter-spacing: .01em;
}
.en-block [data-en-chip="time-header"] strong {
  font-size: 1rem;
  font-weight: 700;
}
.en-post__body p:has([data-en-chip="time-header"]) {
  margin-top: 1.4rem;
  padding-top: .85rem;
  border-top: 1px dashed #e2e8f0;
}
/* První časový blok hned po hlavičce dne — bez extra odsazení (lépe se čte) */
.en-post__body > p:first-child + p:has([data-en-chip="time-header"]) {
  margin-top: .6rem;
  padding-top: 0;
  border-top: none;
}

/* ── Quick-note record (api-quick-note.php → entity_notes) ───────────────── */
/* qn-label = fixní šířka labelu pro vertikální zarovnání polí Zub/Sektor/Akce/Materiál.
 * Přepis záznamu od lékaře = label + blockquote s raw textem. */
.en-block [data-en-chip="qn-label"] {
  display: inline-block;
  min-width: 86px;
  background: transparent;
  color: #6b7280;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0;
  margin: 0 .55rem 0 0;
  vertical-align: middle;
  white-space: nowrap;
}
.en-block [data-en-chip="qn-sector"]   { background: #ede9fe; color: #5b21b6; }
.en-block [data-en-chip="qn-action"]   { background: #d1fae5; color: #065f46; }
.en-block [data-en-chip="qn-material"] { background: #fed7aa; color: #9a3412; }
.en-block [data-en-chip="qn-transcript-label"] {
  display: block;
  background: transparent;
  color: #6b7280;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 0;
  margin: 1rem 0 .35rem;
}
/* Quick-note rows mají těsnější vertikální rytmus (label+value v jedné řádce). */
.en-block .en-post__body > p:has(> [data-en-chip="qn-label"]) {
  margin: 0 0 .15rem;
  line-height: 1.55;
}
/* Generický blockquote (přepis záznamu) — citační styl s levým borderem. */
.en-block .en-post__body blockquote {
  margin: .15rem 0 .25rem;
  padding: .65rem .85rem;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #475569;
  font-size: .92rem;
  line-height: 1.5;
}

/* ── Akční dropdown záznamu ──────────────────────────────────────────────── */
.en-post--dekurz .en-post__main { position: relative; }
.en-post__menu { position: absolute; top: .5rem; right: .6rem; }
.en-post__menu-btn { white-space: nowrap; }
.en-post--dekurz .en-post__head { padding-right: 5.5rem; font-size: .9rem; }
.en-post--dekurz .en-post__body { font-size: 1rem; line-height: 1.6; }

.en-menu { display: flex; flex-direction: column; min-width: 210px; }
.en-menu button {
  display: flex; align-items: center; gap: .45rem;
  text-align: left; padding: .4rem .6rem; border: 0; background: transparent;
  cursor: pointer; font-size: .82rem; color: #1e293b; border-radius: 4px;
}
.en-menu button:hover { background: #f1f5f9; }
.en-menu button.en-menu__danger { color: #dc2626; }
.en-menu button.en-menu__danger:hover { background: #fee2e2; }
.en-menu__sep { height: 1px; background: #e2e8f0; margin: .3rem .25rem; }

.en-post--flash { animation: enFlash 2s ease; }
@keyframes enFlash {
  0%, 30% { background: #fef9c3; }
  100% { background: transparent; }
}

.en-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem;
}
.en-modal {
  background: #fff; border-radius: 12px; max-width: 460px; width: 100%;
  overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.en-modal__head {
  padding: 1rem 1.25rem; color: #fff;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  font-weight: 700; font-size: 1.05rem;
}
.en-modal__body { padding: 1.25rem; }
.en-modal__body label {
  display: block; font-size: .75rem; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .03em; margin: .6rem 0 .2rem;
}
.en-modal__body input {
  width: 100%; padding: .45rem .55rem; border: 1px solid #cbd5e1;
  border-radius: 6px; font-size: .9rem; font-family: inherit;
}
.en-modal__row { display: flex; gap: .6rem; }
.en-modal__row > * { flex: 1; }
.en-modal__actions {
  display: flex; justify-content: flex-end; gap: .5rem; padding: 0 1.25rem 1.25rem;
}
.en-modal__feat { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .85rem; color: #334155; line-height: 1.6; }
.en-modal__callout {
  margin-top: .85rem; padding: .6rem .75rem; background: #f0fdfa;
  border-left: 3px solid #0d9488; border-radius: 0 6px 6px 0;
  font-size: .8rem; color: #0f766e;
}

/* ── Karta odevzdaného dokumentu v dekurzu — výrazně odlišená od záznamů ──── */
.en-post--document {
  cursor: pointer;
  background: #f0f6ff;
  border-color: #bfdbfe;
}
.en-post--document .en-post__main { border-left: 3px solid #3b82f6; }
.en-post--document .en-post__date { background: #dbeafe; }
.en-post--document .en-post__date-dm   { color: #1e3a8a; }
.en-post--document .en-post__date-time { color: #2563eb; }
.en-post--document .en-post__author    { color: #1e3a8a; }
.en-post--document.en-post--dekurz.en-post--latest .en-post__date {
  background: #dbeafe; border-right-color: #2563eb; box-shadow: inset 3px 0 0 #2563eb;
}
.en-post--document:hover { box-shadow: 0 2px 12px rgba(37,99,235,.18); }
.en-post__doc-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: #1d4ed8; background: #dbeafe; padding: .12rem .45rem; border-radius: 4px;
  margin-bottom: .4rem;
}
.en-post__doc-meta { font-size: .8rem; color: #64748b; margin: .2rem 0 .4rem; }
.en-post__doc-link { display: inline-block; }

/* Navázaná kalendářová událost — relační řádek pod tělem záznamu */
.en-post__linked-event { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.en-post__linked-event a {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; text-decoration: none;
  color: var(--color-accent, #0d9488);
  background: #f0fdfa; border: 1px solid #99f6e4;
  border-radius: 6px; padding: .25rem .55rem;
}
.en-post__linked-event a:hover { background: #ccfbf1; }

/* ČSK kód vložený z Rychlého zápisu — blok-level chip (read-only atom) */
.en-qn-csk-row {
  display: block;
  padding: .25rem .55rem;
  margin: .35rem 0;
  background: #fef3c7;
  border-left: 3px solid #d97706;
  border-radius: 4px;
  font-family: var(--font-mono, Menlo, Consolas, monospace);
  font-size: .85rem;
  color: #92400e;
  user-select: text;
}
.en-post__linked-event-date { font-weight: 500; color: var(--color-text-muted, #6e7389); }
