/* Interní stránky družstva – navazuje na style.css */

/* Atribut hidden musí skrýt prvek vždy (i když má třída nastavené display) */
[hidden] { display: none !important; }

/* Záhlaví: horizontální výřez titulní fotografie (prostřední část) jen na výšku menu */
.d-header {
  position: relative;
  color: var(--paper);
  background:
    linear-gradient(rgba(22,18,12,.55), rgba(22,18,12,.55)),
    url('../images/machalka-hero.jpg') center 50% / cover no-repeat;
}
.d-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 20px clamp(20px, 5vw, 72px); }
.d-nav__logo { display: flex; align-items: center; }
.d-nav__logo img { height: 44px; width: auto; display: block; }
.d-nav__links { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; font-weight: 500; }
.d-nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; color: var(--paper); text-decoration: none; }
.d-nav__links a:hover { background: rgba(244,239,230,.14); opacity: 1; }
.d-nav__links a[aria-current] { background: var(--paper); color: var(--ink); }

.d-main { padding: 56px 0 96px; }
.d-footer { background: var(--darkest); color: var(--dmuted); font-size: 14px; }
.d-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px; }
.d-footer a { color: var(--dmuted); }

.d-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 8px; }
.d-title .h1 { margin: 0; }
.h1--tight { margin-bottom: 0; }
.lead-muted { margin: 8px 0 32px; color: var(--muted); max-width: 720px; }
.back-top { margin: 0 0 12px; font-size: 15px; }
.back-top a, .prose a { color: var(--wine); }

.btn--wine { background: var(--wine); color: var(--paper); border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn--outline { border: 1px solid var(--ink); color: var(--ink); background: transparent; }

/* Štítky typů novinek */
.tag { display: inline-block; margin-right: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--sand); color: var(--ink); }
.tag--clanek { background: #E9D3D6; color: #5A1A26; }
.tag--brigada { background: #DDE3C8; color: #3A4418; }
.tag--zpravodaj { background: #E4DCCB; color: #4A4133; }

/* Novinky – seznam vlevo, obsah vpravo */
.news { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.news__list { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; }
.news__item { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; }
.news__item:hover { border-color: var(--muted); opacity: 1; }
.news__item.is-active { border-color: var(--wine); box-shadow: inset 4px 0 0 var(--wine); }
.news__meta { display: flex; align-items: center; margin: 0; font-size: 13px; color: var(--muted); }
.news__title { font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.news__content { flex: 999 1 560px; min-width: 0; padding: 32px clamp(20px, 3vw, 40px); border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.news__h { margin: 12px 0 20px; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.news__content > .btn { margin-top: 24px; }
.pdf { display: block; width: 100%; height: 80vh; min-height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pdf__fallback { padding: 24px; }
.pdf__links { margin: 12px 0 0; font-size: 15px; }
.pdf__links a { color: var(--wine); }

/* Text článků a brigád */
.prose { max-width: 760px; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose h2, .prose h3 { margin: 32px 0 12px; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.25; }
.prose__intro { font-size: 19px; }
.prose__outro { font-style: italic; }
.prose__img { margin: 24px 0 28px; }
.prose__img img { display: block; width: 100%; max-width: 560px; border-radius: 16px; }
.prose__img figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.sign { font-family: var(--serif); font-size: 19px; }

/* Tabulka zásob v novince */
.stock { margin: 20px 0 24px; max-width: 360px; }
.stock table { width: 100%; border-collapse: collapse; font-size: 16px; }
.stock caption { text-align: left; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stock th, .stock td { padding: 8px 12px; border-bottom: 1px solid var(--line2); text-align: left; }
.stock thead th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stock tbody th { font-weight: 600; }
.stock .r { text-align: right; font-variant-numeric: tabular-nums; }
.stock tr.low td, .stock tr.low th { background: #F6DCDC; }
.stock tfoot th, .stock tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; }

/* Brigáda */
.brig__perex { max-width: 760px; margin: 0 0 28px; font-size: 19px; color: var(--muted); }
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; margin: 0 0 40px; }
.term { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 24px; border-radius: 20px; background: var(--ink); color: var(--paper); }
.term__date { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 16px; background: var(--wine); line-height: 1; }
.term__day { font-family: var(--serif); font-size: 40px; }
.term__month { margin-top: 6px; font-size: 12px; text-align: center; color: #EBD9DC; }
.term__info { flex: 1 1 180px; min-width: 0; }
.term__when { font-weight: 600; font-size: 18px; }
.term__note { margin: 6px 0 0; font-size: 14px; color: var(--dmuted); }
.term__btn { flex: 1 1 100%; justify-content: center; background: var(--paper); color: var(--ink); }

/* Archiv brigád */
.archive { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.archive .h2 { margin-bottom: 24px; }
.archive__item { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.archive__item summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 20px 24px; cursor: pointer; list-style: none; }
.archive__item summary::-webkit-details-marker { display: none; }
.archive__date { grid-column: 1; font-size: 13px; font-weight: 600; color: var(--wine); }
.archive__title { grid-column: 1; font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.archive__perex { grid-column: 1; color: var(--muted); font-size: 15px; }
.archive__more { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 14px; font-weight: 600; color: var(--wine); white-space: nowrap; }
.archive__more::after { content: ' ↓'; }
.archive__item[open] .archive__more::after { content: ' ↑'; }
.archive__body { padding: 8px 24px 24px; border-top: 1px solid var(--line2); }
.archive__body .terms { margin-top: 16px; margin-bottom: 24px; }

/* Formulář */
.form { max-width: 720px; display: flex; flex-direction: column; gap: 20px; padding: 32px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.form__row { display: flex; flex-wrap: wrap; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--grow { flex: 999 1 280px; }
.field--hours { flex: 1 1 160px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 12px 14px; min-height: 48px; border: 1px solid #BDB1A0; border-radius: 12px; background: #fff; color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--wine); outline-offset: 1px; border-color: var(--wine); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field__error { margin: 0; font-size: 14px; color: #B3261E; }
.form .btn { align-self: flex-start; min-width: 140px; justify-content: center; }
.hp { position: absolute; left: -9999px; }
.notice { max-width: 720px; margin: 0 0 20px; padding: 14px 18px; border-radius: 12px; }
.notice--ok { background: #DDE3C8; color: #2E3613; }
.notice--ok a { color: inherit; font-weight: 600; }
.notice--err { background: #F6DCDC; color: #7A1C17; }

/* Tabulky (přehled hodin, deputát) */
.d-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.d-table th, .d-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line2); }
.d-table thead th { background: var(--sand); border-top: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; line-height: 1.4; }
.d-table tbody th { font-weight: 600; white-space: nowrap; }
.d-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-table tbody tr:hover { background: #F6F1E8; }
.hours-table { min-width: 560px; }
.hours-table .total { font-family: var(--serif); font-size: 22px; }
.hours-table .detail { font-size: 13px; color: var(--muted); line-height: 1.6; }
.detail__h { margin-left: 6px; font-weight: 600; color: var(--ink); }

.dep-h { margin: 40px 0 16px; font-size: 30px; }
.dep-table { min-width: 900px; }
.dep-table .dep-code { color: var(--muted); white-space: nowrap; }
.dep-table thead th, .dep-table thead th.r { white-space: normal; max-width: 130px; vertical-align: bottom; }
.dep-table .taken { background: #FBF1D9; }
.dep-table .left { font-weight: 700; color: #3F6B21; }
.dep-table .neg { color: #B3261E; background: #FBE3E3; }
.dep-table .zero { color: #9A8F80; }
.dep-table .dep-empty { color: #9A8F80; }
.dep-table .note { font-size: 13px; color: var(--muted); min-width: 200px; }
.table-box { margin: 0 0 24px; }

/* Přihláška na brigádu (dialog) */
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.signup { width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(22,18,12,.35); }
.signup::backdrop { background: rgba(22,18,12,.6); }
.signup__form { display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.signup__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.signup__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.signup__term { margin: 6px 0 0; font-size: 15px; color: var(--wine); font-weight: 600; }
.signup__close { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); cursor: pointer; }
.signup .btn { align-self: flex-start; min-width: 140px; justify-content: center; }

/* Přehled hodin na mobilu – řádky jako karty, bez vodorovného posouvání */
@media (max-width: 640px) {
  .hours-table { min-width: 0; }
  .hours-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hours-table, .hours-table tbody { display: block; }
  .hours-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; padding: 16px; border-top: 1px solid var(--line2); }
  .hours-table tbody tr:first-child { border-top: 0; }
  .hours-table th, .hours-table td { display: block; padding: 0; border: 0; }
  .hours-table tbody th { white-space: normal; font-size: 17px; }
  .hours-table .total { font-size: 20px; }
  .hours-table .detail { grid-column: 1 / -1; }
  .hours-table .detail div { display: flex; justify-content: space-between; gap: 12px; }
  .hours-table .detail__h { white-space: nowrap; }
}

/* Novinky v jednom sloupci (mobil, úzké okno): buď seznam, nebo obsah vybrané položky */
.news__back { display: none; margin-bottom: 16px; font-weight: 600; color: var(--wine); }
@media (min-width: 981px) {
  .news { flex-wrap: nowrap; }
}
@media (max-width: 980px) {
  .news { flex-direction: column; align-items: stretch; }
  .news__list, .news__content { flex: none; width: 100%; }
  .news:not(.has-selection) .news__content { display: none; }
  .news.has-selection .news__list { display: none; }
  .news.has-selection .news__back { display: inline-block; }
  .news__item.is-active { border-color: var(--line); box-shadow: none; }
}

/* Tabulka údajů v novince */
.facts { margin: 20px 0 24px; }
.facts table { width: 100%; border-collapse: collapse; font-size: 16px; }
.facts caption { text-align: left; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.facts th, .facts td { padding: 10px 12px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: top; }
.facts th { width: 34%; font-weight: 600; white-space: nowrap; }
.facts tr.hl th, .facts tr.hl td { background: #FBF1D9; }
@media (max-width: 560px) {
  .facts th, .facts td { display: block; width: auto; padding: 4px 0; border: 0; }
  .facts td { padding-bottom: 12px; border-bottom: 1px solid var(--line2); }
  .facts tr.hl th, .facts tr.hl td { padding-left: 8px; }
}

/* Kdo už přislíbil účast */
.signups-link { display: flex; align-items: center; gap: 10px; margin: -20px 0 36px; }
.link-btn { padding: 0; min-height: 44px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--wine); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { text-decoration-thickness: 2px; }
.signups-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--wine); color: var(--paper); font-size: 13px; font-weight: 600; }
.signups { width: min(860px, calc(100% - 32px)); }
.signups__box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.signups__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.signups__table th, .signups__table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line2); }
.signups__table thead th { background: var(--sand); border-top: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.signups__table tbody th { font-weight: 600; white-space: nowrap; }
.signups__table .r { text-align: right; }
.signups__table .nowrap { white-space: nowrap; }
.signups__table .work { color: var(--muted); }
@media (max-width: 640px) {
  .signups__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .signups__table, .signups__table tbody { display: block; }
  .signups__table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-top: 1px solid var(--line2); }
  .signups__table tbody tr:first-child { border-top: 0; }
  .signups__table th, .signups__table td { display: block; padding: 0; border: 0; text-align: left; }
  .signups__table td:first-child { grid-column: 1 / -1; font-size: 13px; color: var(--wine); font-weight: 600; }
  .signups__table td[data-label="Příchod"]::before { content: 'příchod '; color: var(--muted); }
  .signups__table td.r { grid-column: 2; grid-row: 2; }
  .signups__table .work { grid-column: 1 / -1; font-size: 14px; }
}

/* ===== Uživatelé, administrace (2026-11) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.stack { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.stack .field { align-self: stretch; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.row-actions form { margin: 0; }
.section-h { margin: 48px 0 16px; font-size: 28px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.table-scroll .d-table { min-width: 640px; }
.back-bottom { margin-top: 20px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }

.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--ok { background: #3F6B21; color: #fff; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn--danger { background: transparent; color: #B3261E; border: 1px solid #B3261E; font: inherit; font-weight: 600; cursor: pointer; }
.btn--outline { font: inherit; font-weight: 600; cursor: pointer; }
.link-btn--light { color: var(--paper); }
.link-btn.small { font-size: 13px; min-height: 32px; }

.d-nav__user { gap: 8px; border: 1px solid rgba(244,239,230,.45); }
.tag--novinka { background: #E9D3D6; color: #5A1A26; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sand); color: var(--ink); }
.badge--warn { background: #FBF1D9; color: #7A5A0C; }
.badge--err { background: #F6DCDC; color: #7A1C17; }
.state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.state--odeslano { background: #FBF1D9; color: #7A5A0C; }
.state--schvaleno { background: #DDE3C8; color: #2E3613; }
.state--zamitnuto { background: #F6DCDC; color: #7A1C17; }
.pending { display: block; font-family: Inter, sans-serif; font-size: 13px; color: #7A5A0C; }

/* Výzva k nastavení hesla */
.pw-prompt { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin: 0 0 28px; padding: 16px 20px; border-radius: 16px; background: #FBF1D9; color: #4A3A0C; }
.pw-prompt__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.pw-prompt form { margin: 0; }

/* Přihlášení */
.auth { max-width: 520px; }
.auth .form { padding: 28px; }
.auth__alt { margin-top: 12px; }
.field__static { margin: 0; padding: 12px 0; }
.field__label { font-weight: 600; font-size: 15px; }
.field--inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--wine); }
.check--disabled { cursor: default; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; }

/* Karty a profil */
.card { margin: 0 0 20px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.card__h { margin: 0 0 14px; font-family: var(--serif); font-weight: 500; font-size: 22px; }
.card--active { border-color: var(--wine); box-shadow: inset 4px 0 0 var(--wine); }
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 20px; align-items: start; }
.profile .card { margin: 0; }
.profile .card--wide { grid-column: 1 / -1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.big { font-family: var(--serif); font-size: 22px; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line2); }
.log:first-child { border-top: 0; }
.log__what { flex: 1 1 240px; }
.log__h { font-weight: 600; }
.log--rejected .log__what, .log--rejected .log__h { text-decoration: line-through; color: var(--muted); }
details.sub { margin-top: 16px; }
details.sub summary { cursor: pointer; color: var(--wine); font-weight: 600; }
.dep-table--one { min-width: 640px; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }

/* Novinky – odkaz na archiv a archiv */
.news__more { padding: 10px 18px; font-weight: 600; color: var(--wine); }
.news__content--solo { max-width: 900px; }
.archive-list { list-style: none; margin: 0; padding: 0; max-width: 900px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.archive-list li + li { border-top: 1px solid var(--line2); }
.archive-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.archive-list a:hover { background: #F6F1E8; opacity: 1; }
.archive-list__date { min-width: 96px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.archive-list__title { flex: 1 1 260px; font-family: var(--serif); font-size: 19px; }
.prose .prose__img img { display: block; width: 100%; max-width: 560px; border-radius: 16px; }
.prose .prose__img .note { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Termíny brigády */
.term--past { opacity: .75; }
.term__mine { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-weight: 600; }
.terms-preview { margin: 0 0 24px; padding-left: 20px; }

/* Evidence a přehled hodin */
.row--rejected th, .row--rejected td { color: var(--muted); }
.row--rejected th { text-decoration: line-through; }
.note-cell { max-width: 320px; font-size: 14px; }
.admin-note { margin-top: 4px; font-size: 13px; color: #7A1C17; }
.actions { white-space: nowrap; }
.actions a { margin-right: 10px; color: var(--wine); }
.hours-table tr.is-me { background: #FBF6EC; box-shadow: inset 4px 0 0 var(--wine); }
.me-badge { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--wine); color: var(--paper); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; vertical-align: middle; }
.detail__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.detail__row.is-rejected > span:not(.state) { text-decoration: line-through; }

/* Administrace */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.admin-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); text-decoration: none; }
.admin-tile:hover { border-color: var(--wine); opacity: 1; }
.admin-tile__h { font-family: var(--serif); font-size: 22px; }
.admin-tile__d { font-size: 14px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px; }
.filters input, .filters select { font: inherit; font-size: 15px; min-height: 44px; padding: 8px 12px; border: 1px solid #BDB1A0; border-radius: 12px; background: #fff; max-width: 100%; }
.filters input[type=search] { flex: 1 1 260px; }
.row--inactive th, .row--inactive td { color: var(--muted); }
.form--wide { max-width: 1000px; margin-bottom: 24px; }
textarea.code-area { display: block; box-sizing: border-box; width: 100%; height: auto; min-height: 420px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.55; padding: 12px 14px; border: 1px solid #BDB1A0; border-radius: 12px; background: #fff; }
.field textarea.code-area { min-height: 560px; }
.terms-edit { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.terms-edit legend { font-weight: 600; padding: 0 6px; }
.terms-edit input, .terms-edit textarea { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #BDB1A0; border-radius: 10px; }
.versions { margin: 0; padding-left: 20px; }
.versions li { margin: 4px 0; }
pre.log { display: block; margin: 0; padding: 12px; border-radius: 12px; background: #F6F1E8; font-size: 13px; white-space: pre-wrap; max-height: 420px; overflow: auto; }

/* Deputát – editace */
.num-in { width: 84px; padding: 6px 8px; font: inherit; font-size: 14px; text-align: right; border: 1px solid #BDB1A0; border-radius: 8px; }
.note-in { width: 100%; min-width: 160px; padding: 6px 8px; font: inherit; font-size: 14px; border: 1px solid #BDB1A0; border-radius: 8px; }
.dep-edit td, .dep-edit th { vertical-align: middle; }
.sticky-actions { position: sticky; bottom: 0; z-index: 2; margin-top: 16px; padding: 14px 0; background: var(--paper); border-top: 1px solid var(--line); }

/* Schvalování prací */
.review-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.review-form .note-in { width: 160px; min-width: 0; }
.review-form__btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* AI */
.ai-providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.ai-providers .card { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.ai-providers select { max-width: 100%; }
details.prompt summary { cursor: pointer; }
details.prompt form { margin-top: 14px; }
.ai-preview { margin: 0 0 24px; }
.ai-preview .news__content { margin-bottom: 16px; }
.diff { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 520px; overflow: auto; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line2); }
.diff__add { background: #E3F0D3; color: #23400F; }
.diff__del { background: #F6DCDC; color: #7A1C17; text-decoration: line-through; }
.diff__same { color: var(--muted); }
.change-table td { vertical-align: top; min-width: 260px; }
.preview-cell { font-size: 14px; }

/* ===== Správa webu a novinek (2026-11, v4) ===== */
.admin-grid--two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); margin-bottom: 24px; }
.admin-grid--two .card { margin: 0; }

/* Editor formátovaného textu */
.rte__visual { border: 1px solid #BDB1A0; border-radius: 12px; background: #fff; overflow: hidden; }
.rte__bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line2); background: #FBF8F2; position: sticky; top: 0; z-index: 1; }
.rte__bar button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.rte__bar button:hover { border-color: var(--wine); }
.rte__area { max-width: none; min-height: 360px; max-height: 70vh; overflow: auto; padding: 16px 18px; outline: none; font-size: 16px; }
.rte__area:focus { box-shadow: inset 0 0 0 2px var(--wine); }
.rte__area:empty::before { content: 'Začněte psát…'; color: var(--muted); }

/* Termíny brigády */
.terms-edit [data-term-list] { display: flex; flex-direction: column; gap: 12px; }
.terms-edit .terms-edit__row { display: grid; grid-template-columns: 170px 140px 1fr; gap: 10px 12px; align-items: end; padding: 12px; border: 1px solid var(--line2); border-radius: 12px; background: #FBF8F2; }
.terms-edit__f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.terms-edit__f--full { grid-column: 1 / -1; }
.terms-edit__row [data-term-remove] { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 640px) { .terms-edit .terms-edit__row { grid-template-columns: 1fr 1fr; } .terms-edit__f--wide { grid-column: 1 / -1; } }

/* Výběr typu novinky */
.type-pick { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.type-pick legend { padding: 0 6px; font-weight: 600; }

/* Záložky jazyků */
.tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; border-radius: 10px 10px 0 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.tabs a[aria-current] { background: var(--card); border: 1px solid var(--line); border-bottom-color: var(--card); margin-bottom: -1px; color: var(--wine); }

/* Generovaný formulář obsahu stránky */
.page-form { gap: 12px; }
.pf-section { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pf-section > summary { padding: 12px 16px; cursor: pointer; font-family: var(--serif); font-size: 20px; }
.pf-section[open] > summary { border-bottom: 1px solid var(--line2); }
.pf-section > .pf-field, .pf-section > .pf-list, .pf-section > .pf-map { margin: 12px 16px; }
.pf-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.pf-field label { font-size: 13px; font-weight: 600; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.pf-field input, .pf-field textarea { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid #BDB1A0; border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.pf-field textarea { resize: vertical; }
.pf-num { max-width: 140px; }
.pf-list, .pf-map { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; }
.pf-list > legend, .pf-map > legend { padding: 0 6px; font-size: 13px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.pf-item { display: flex; gap: 10px; align-items: flex-end; padding: 8px 0; border-top: 1px dashed var(--line2); }
.pf-item:first-child { border-top: 0; }
.pf-item__fields { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 10px; }
.pf-item__fields .pf-field { margin: 0; }
.pf-item > [data-pf-remove] { margin-bottom: 4px; }

/* Kalendář akcí – administrace */
.ev-list { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.ev-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding: 12px 16px; }
.ev-row + .ev-row { border-top: 1px solid var(--line2); }
.ev-row__img { flex: 0 0 auto; width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--sand); }
.ev-row__body { flex: 1 1 260px; min-width: 0; }
.ev-row__when { margin: 0; font-size: 13px; font-weight: 600; color: var(--wine); }
.ev-row__title { font-family: var(--serif); font-size: 20px; color: var(--ink); text-decoration: none; }
.ev-row__perex { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.ev-row__actions { display: flex; gap: 8px; }
.ev-row__actions form { margin: 0; }
.ev-current { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.ev-current img { width: 160px; height: 110px; object-fit: cover; border-radius: 10px; }
.pf-field--check { margin: 4px 0 12px; }

/* Upozornění na ostatní jazykové verze */
.notice--warn { background: #FBF1D9; color: #4A3A0C; }
.translate-notice form { margin: 0; }
.link-btn--inline { min-height: 0; padding: 0; font-size: inherit; vertical-align: baseline; }
.translate-notice__wait { display: block; margin-top: 6px; font-size: 13px; }
.ev-row__langs { margin: 4px 0 0; display: flex; gap: 6px; }

/* Záložky jazyků v náhledu návrhu AI */
.tabs__btn { padding: 10px 16px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.tabs__btn[aria-selected="true"] { background: var(--card); border-color: var(--line); margin-bottom: -1px; color: var(--wine); }
.ai-item { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: #fff; }
.ai-item .pf-field { margin: 0; }
.ai-item__diff { margin-top: 8px; font-size: 13px; }
.ai-item__diff summary { cursor: pointer; color: var(--muted); }

/* Drobečková navigace v administraci */
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 16px; font-size: 15px; }
.crumbs a { color: var(--wine); }
.crumbs__sep { color: var(--muted); }
.crumbs [aria-current] { color: var(--muted); }

/* Obrázky vložené do textu novinek */
.prose img { display: block; max-width: 100%; height: auto; margin: 16px 0; border-radius: 14px; }

/* Hromadné akce (rozesílání) */
.bulk-bar { margin: 16px 0 12px; }

/* Seznam vybraných / připojených příloh */
.file-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.file-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 4px 0; border-top: 1px dashed var(--line2); }
.file-list li:first-child { border-top: 0; }
.file-list .link-btn { min-height: 28px; }

/* Obrázkové položky v ručním editoru stránek */
.pf-image__thumb { display: block; max-width: 220px; max-height: 140px; object-fit: contain; border-radius: 8px; background: var(--sand); margin: 2px 0 4px; }
.pf-image input[type=file] { font-size: 14px; }
