/* Drbna Plán dne – stylesheet v2 */
/* Roboto hostujeme sami (Apache 2.0). Dřív se tahalo z Google Fonts přes @import –
   ten blokuje vykreslení, dokud se externí soubor nestáhne, a stahuje se AŽ PO
   style.css, takže se zdržení řetězilo. Navíc při každém načtení odcházela IP
   uživatele Googlu, což u interní aplikace nedává smysl.

   Je to VARIABILNÍ řez, takže jeden soubor pokrývá celou škálu 100–900 (proto
   font-weight: 100 900, ne dva samostatné soubory pro 400 a 500). Stejné soubory
   používá i veřejný web, aby se vzhled nerozešel. Rozsahy znaků jsou z Google Fonts:
   latin-ext nese českou diakritiku a stáhne se jen tehdy, když je na stránce potřeba. */
/* Geist (SIL OFL) je písmo ROZHRANÍ od nového vzhledu (Matěj 18. 10. 2026: „dáme Geist, ať je
   stejné všude"). Roboto zůstává: kreslí jím obrázky generátor Šablon (js/sablony.js) a ty se
   měnit nemají. Oba variabilní, stejné rozsahy znaků jako z Google Fonts. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/roboto-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/roboto-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --red: #E20613;
  --red-dark: #b8050f;
  --red-light: rgba(226,6,19,0.08);
  --bg: #eceef3;
  --surface: #ffffff;
  --border: rgba(20,24,35,0.08);
  --border-strong: rgba(20,24,35,0.14);
  --text: #1d1d1f;
  --text-muted: #5e5e66;
  --text-hint: #86868d;
  --today-bg: rgba(255,95,31,0.06);
  --today-accent: #e8590c;
  --weekend-bg: rgba(20,24,35,0.025);
  --tag-bg: rgba(20,24,35,0.06);
  /* Nový vzhled (varianta A „Sklo", Matěj 18. 10. 2026; docs/VZHLED.md). Průsvitné plochy
     jen tam, kde pod nimi není hustý text: lišta, menu, okna, hlášky. */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --glass: rgba(255,255,255,0.62);
  --glass-strong: rgba(255,255,255,0.84);
  --glass-edge: rgba(255,255,255,0.72);
  --blur: saturate(1.8) blur(22px);
  --field-bg: rgba(20,24,35,0.05);      /* podklad vstupních polí a výběrů */
  --wall: radial-gradient(900px 600px at 8% -5%, rgba(226,6,19,0.09), transparent 60%),
          radial-gradient(800px 520px at 95% 10%, rgba(10,132,255,0.09), transparent 60%),
          radial-gradient(900px 700px at 60% 110%, rgba(255,149,0,0.09), transparent 60%);
  --big-topic: #8e3cc0;                 /* puntík „Velké téma" */
  --shadow-sm: 0 1px 2px rgba(20,24,35,0.06), 0 0 0 0.5px rgba(20,24,35,0.08);
  --radius-lg: 18px;
  --side-w: 236px;                      /* boční menu */
  --side-w-sbalene: 72px;
  --green: #3B9E5A;
  --green-light: #EAF5EE;
  --karta-nasazeno: #e2f3e7;   /* podklad karty nasazeného článku (Plán dne) */
  --karta-crm: #fde9da;        /* podklad karty zařazené z CRM */
  --green-text: #2D7D46;
  --shadow-md: 0 18px 50px rgba(20,24,35,0.16), 0 2px 6px rgba(20,24,35,0.07);
  --radius: 12px;
  --radius-sm: 9px;
  --navbar-h: 56px;

  /* Stavové štítky – stejná sada se opakuje v Tipech, Hlášení bugů a nápadů, Adminu i Statistikách.
     Pojmenované proměnné proto, že v tmavém režimu se překlápí na jednom místě. */
  --ok-bg: #e1f5ee;   --ok-text: #0f6e56;
  --warn-bg: #fef3c7; --warn-text: #92400e;
  --err-bg: #fee2e2;  --err-text: #991b1b;
  --info-bg: #dbeafe; --info-text: #1e40af;
  --note-bg: #ede9fe; --note-text: #5b21b6;

  /* Doplňkové odstíny, které se dřív psaly natvrdo. V tmavém režimu se překlápí
     spolu se zbytkem – bez proměnné svítily světlé plošky na tmavé stránce. */
  --banner-bg: #1C1C1E;   --banner-text: #ffffff;   /* proužek živého refreshe */
  --on-red: #ffffff;
  /* Barvy, které byly do 3. 9. 2026 natvrdo ve <style> jednotlivých stránek. Hodnoty
     jsou schválně beze změny — jde jen o to, aby měly jméno a daly se v tmavém režimu
     přebít, až na to dojde. */
  --prepinac-knoflik: #fff;      /* knoflík přepínače (Role) */
  --dv-me-text: #c0271d;         /* text mého pruhu v Dovolených */
  --toast-bg: #1a1a2e;           /* bublina s hláškou */
  --graf-seda: #8b8b8b;          /* neutrální sloupec v grafech (FB, Statistiky) */
  --platno-bg: #111;             /* plátno náhledu v Šablonách */
  --rust-text: #1d9e75;          /* růst proti minulému období */                                /* text na značkové červené – stejný v obou režimech */
  --warm-bg: #FFF0E6;     --warm-border: #F5C4A0;   /* štítky „dnes" a „PR" */
  --err-border: #f5c0bc;                            /* okraj mazacích tlačítek při hoveru */
  --ok-border: #6ee7b7;   --ok-strong: #1e8e3e;     /* hotové téma, úspěšná hláška */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Atribut `hidden` má vyhrát nad `display` z třídy. Prohlížeč ho dává jen jako výchozí
   styl, takže `.btn { display: inline-flex }` ho přebije a prvek zůstane vidět — tlačítko
   passkey na přihlášení to muselo obcházet vloženým `display:none`. (22. 9. 2026) */
[hidden] { display: none !important; }

body {
  font-family: var(--font);
  background: var(--wall), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.003em;
}
/* Na širokém displeji je menu vlevo napevno a obsah se odsune. Bez menu (přihlášení,
   karty) se nic neposouvá — proto podle přítomnosti menu, ne podle stránky. */
@media (min-width: 900px) {
  body:has(#hamburger-menu) { padding-left: var(--side-w); }
  html[data-menu="sbalene"] body:has(#hamburger-menu) { padding-left: var(--side-w-sbalene); }
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 0.5px solid var(--border);
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  min-width: 0;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0;
  text-decoration: none;
  transition: background 0.12s;
}
.navbar-user:hover { color: var(--text); text-decoration: none; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  background: var(--tag-bg);
  color: var(--text);
  transition: background 0.12s, box-shadow 0.12s;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font);
}
.btn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.btn-primary { background: var(--red); color: var(--on-red); box-shadow: 0 4px 14px rgba(226,6,19,0.25); }
.btn-primary:hover { background: var(--red-dark); color: var(--on-red); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--tag-bg); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 11.5px; }
.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  background: var(--surface);
  border: 0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  transition: all 0.12s;
  line-height: 1;
  padding: 0;
}
.btn-icon:hover { background: var(--tag-bg); color: var(--text); }

.btn-add-article {
  width: 100%;
  padding: 6px;
  background: transparent;
  border: 0.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-hint);
  cursor: pointer;
  font-size: 11.5px;
  transition: all 0.12s;
  font-family: var(--font);
}
.btn-add-article:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }

/* === WEEK NAV === */
.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
}

.week-title {
  font-weight: 500;
  font-size: 13px;
  flex: 1;
  text-align: center;
}

/* Sdílené šipky/Dnes pro týdenní i měsíční navigaci */
.nav-arrow { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 0; color: var(--text-muted); background: var(--tag-bg); text-decoration: none; flex-shrink: 0; }
.nav-arrow:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.nav-today { font-size: 13px; font-weight: 500; color: var(--text); border: 0; border-radius: 999px; padding: 8px 14px; text-decoration: none; background: var(--tag-bg); flex-shrink: 0; line-height: 1; }
.nav-today:hover { background: var(--border-strong); text-decoration: none; }

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-current { background: var(--warm-bg); color: var(--today-accent); border: 0.5px solid var(--warm-border); }
/* POZOR: tyhle čtyři názvy se v PHP nikde nevyskytují celé — skládají se za běhu
   jako `badge-<?= $user['role'] ?>` (profil.php, admin/tabs/users.php). Hledání
   podle tokenu je proto označí za mrtvé, ale mrtvé nejsou. */
.badge-admin { background: var(--err-bg); color: var(--err-text); }
.badge-editor { background: var(--info-bg); color: var(--info-text); }
.badge-viewer { background: var(--tag-bg); color: var(--text-muted); }
.badge-marketing { background: var(--warn-bg); color: var(--warn-text); }

/* === HAMBURGER BTN === */
.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* === PLAN LAYOUT === */
.plan-container {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--navbar-h) - 45px - 24px);
  overflow: hidden;
  margin: 0 12px 12px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 0.5px solid var(--glass-edge);
  box-shadow: var(--shadow-sm);
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
}

/* === DAY COLUMN === */
.day-column {
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
}
.day-column.today { background: var(--today-bg); }
.day-column.weekend { background: var(--weekend-bg); }

.day-header {
  padding: 10px 10px 8px;
  border-bottom: 0.5px solid var(--border);
  background: inherit;
  flex-shrink: 0;
}

.day-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.day-column.today .day-name { color: var(--text-muted); }

.day-date {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.3;
  margin: 2px 0 6px;
}
.day-column.today .day-date { color: var(--red); }

.duty-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}
.duty-name { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; font-weight: 500; font-size: 11px; color: var(--text); }
.duty-name.empty { color: var(--text-hint); font-weight: 400; }
.duty-ava-sm { width: 18px; height: 18px; border-radius: 50%; background: var(--red-light); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 500; flex-shrink: 0; }
.duty-name-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Posouvá se celé tělo sloupce (úkoly z CRM, počty, články), ne jen seznam článků —
   jinak úkoly nad seznamem na nízkém displeji zaberou celý sloupec. (23. 9. 2026) */
.day-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* === ARTICLES LIST === */
.articles-list {
  flex: 1 0 auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Tlačítko přidat je součástí listu – zobrazí se za posledním článkem */
.articles-list .btn-add-article {
  margin-top: 0;
  flex-shrink: 0;
}

.article-item {
  background: var(--surface);
  border: 0;
  box-shadow: var(--shadow-sm);
  border-radius: 10px;
  padding: 8px 9px;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.12s;
}
.article-item:hover { box-shadow: 0 0 0 1.5px var(--red); }
/* Nový vzhled (Matěj 18. 10. 2026): stav karty říká podklad, ne pruh vlevo.
   Rozepsaný článek bílý, nasazený zelený, zařazený z CRM oranžový (jako úkoly z CRM nad
   ním) a z CRM i nasazený přechodem ze zelené do oranžové. Řádek bez názvu je jen
   čárkovaný obrys, ať je vidět, že ho je potřeba doplnit. */
.article-item.article-top { background: var(--karta-nasazeno); }
.article-item.article-crm { background: var(--karta-crm); }
.article-item.article-crm.article-top { background: linear-gradient(120deg, var(--karta-nasazeno) 30%, var(--karta-crm)); }
.article-item:not(.article-top):not(.article-draft) { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.article-item:not(.article-top):not(.article-draft):hover { box-shadow: 0 0 0 1.5px var(--red); }
.article-title.is-big-topic { font-weight: 650; }
/* Velké téma: tučně jako dosud a fialový puntík (Matěj 18. 10. 2026) — štítek se nepřidává. */
.article-title.is-big-topic::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--big-topic); margin-right: 6px; vertical-align: 1px; }
.article-item.article-unscheduled { border-style: dashed; opacity: 0.75; }

/* Drag & drop */
.article-item[draggable="true"] { cursor: grab; }
.article-item[draggable="true"]:active { cursor: grabbing; }
.article-item.dragging { opacity: 0.35; pointer-events: none; }
.articles-list.drag-over { background: rgba(205, 44, 30, 0.04); border-radius: var(--radius-sm); }
.article-item.drag-placeholder {
  border: 2px dashed var(--red);
  background: var(--red-light);
  min-height: 44px;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.article-time {
  font-weight: 650;
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.unscheduled-mark { color: var(--text-hint); font-style: italic; font-weight: 400; }

.top-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--surface);   /* „nas.“ je vždy na zeleném podkladu karty */
  color: var(--green-text);
  padding: 1px 6px;
  border-radius: 999px;
}

.pr-badge {
  font-size: 10px;
  font-weight: 600;
  /* Bílý s oranžovým obrysem: PR je na bílé, zelené i oranžové kartě, podklad by splynul. */
  background: var(--surface);
  box-shadow: inset 0 0 0 0.5px var(--warm-border);
  color: var(--today-accent);
  padding: 1px 6px;
  border-radius: 999px;
}

.article-author {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-hint);
  margin-left: auto;
}

.article-title {
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
  color: var(--text);
  margin-top: 3px;
}

/* Akce článku – při hoveru. Překryjí zkratku autora jen při najetí; místo pro ně se
   nedrží napořád — v úzkém sloupci pak zkratka vypadávala z karty (18. 10. 2026). */
.article-actions {
  background: var(--surface);
  border-radius: 8px;
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  gap: 2px;
}
.article-item:hover .article-actions { display: flex; }

.article-actions button {
  background: var(--surface);
  border: 0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.12s;
  line-height: 1;
  padding: 0;
}
.article-actions button:hover { background: var(--tag-bg); color: var(--text); }
.btn-delete-article:hover { background: var(--red-light) !important; color: var(--red) !important; border-color: var(--err-border) !important; }

.article-time-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

/* === POSTRANNÍ PANEL === */
.plan-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: transparent;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-section {
  background: var(--surface);
  border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius);
  padding: 11px 12px; box-shadow: var(--shadow-sm);
}

.sidebar-section h3 {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sidebar-section h3 svg { color: var(--text-hint); flex-shrink: 0; }

.korida-url {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.korida-link {
  font-size: 11px;
  word-break: break-all;
  flex: 1;
  color: var(--red);
}

.topic-list, .task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}
.topic-list li, .task-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  padding: 3px 0;
  color: var(--text);
}
.topic-list li span, .task-list li span { flex: 1; }
.topic-check .tc-check { opacity: 0; }
.topic-list li.topic-done .topic-check { color: var(--ok-strong); }
.topic-list li.topic-done .topic-check .tc-check { opacity: 1; }
.topic-list li.topic-done span { color: var(--ok-strong); }

/* Živý refresh – nenápadný proužek při změně od kolegy */
.live-banner {
  position: fixed; left: 50%; bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  background: var(--banner-bg); color: var(--banner-text);
  padding: 10px 12px 10px 16px; border-radius: 10px;
  font-size: 13px; font-family: var(--font);
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22); z-index: 9999;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.live-banner.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.live-banner button {
  background: var(--red); color: var(--on-red); border: none; border-radius: 6px;
  padding: 6px 12px; font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: var(--font);
}

.add-row {
  display: flex;
  gap: 5px;
}

.input-sm { flex: 1; min-width: 0; padding: 6px 9px; font-size: 12px; }


.notes-textarea { width: 100%; min-height: 70px; padding: 7px 9px; font-size: 12px; resize: vertical; margin-bottom: 5px; }

.empty-text { color: var(--text-hint); font-style: italic; font-size: 11px; }

/* === FORMS === */
/* .form-group a .form-group label: platné znění je níž v oddílu „Form" (sjednoceno
   22. 9. 2026 — do té doby tu stály druhé bloky, které ten dolní tiše přebíjel). */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="time"],
.form-group select,
.form-group textarea { padding: 8px 11px; font-size: 13px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { box-shadow: 0 0 0 3px var(--red-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* JEDNOTNÉ PRVKY (Matěj 18. 10. 2026): zaškrtávátka a přepínače v naší červené, výběrové
   pole všude se stejnou šipkou. Platí pro celé IS — moduly si je nestylují po svém. */
input[type="checkbox"], input[type="radio"] { accent-color: var(--red); width: 16px; height: 16px; }
/* Vstupní pole: JEDNO pravidlo pro celé IS (Matěj 18. 10. 2026). Moduly smějí určit jen
   rozměry (šířka, výška, odsazení, velikost písma); barvu, rámeček, zaoblení a písmo ne —
   do 18. 10. 2026 si je každý modul psal sám a pole vypadala v každém modulu jinak.
   :where() drží specificitu na nule, takže rozměr z modulu vždycky vyhraje. */
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"], [type="hidden"], [type="submit"], [type="button"], [type="image"]), select, textarea) {
  font-family: var(--font); color: var(--text);
  background-color: var(--field-bg); border: 0.5px solid transparent; border-radius: var(--radius-sm);
  outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
:where(input, select, textarea):focus-visible { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-light); }
:where(input, textarea)::placeholder { color: var(--text-hint); }
select { -webkit-appearance: none; appearance: none; padding-right: 30px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }

.author-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.author-select-row select { flex: 1; }
.author-select-row span { font-size: 11px; color: var(--text-muted); }

/* === MODALS === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,12,18,0.30);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 16px;
}
.modal-sm { max-width: 360px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--border);
}
.modal-header h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.modal-close { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--text-hint); }
.modal-close:hover { color: var(--text); }

.modal-body { padding: 18px; }
.modal-footer {
  padding: 12px 18px;
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* === ALERTS === */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin: 10px 0;
  font-size: 13px;
}
.alert-error { background: var(--err-bg); color: var(--err-text); border: 0.5px solid var(--err-text); }
.alert-success { background: var(--ok-bg); color: var(--ok-text); border: 0.5px solid var(--ok-border); }

/* === LOGIN PAGE === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--wall), var(--bg);
}

.login-container {
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 360px;
  border: 0.5px solid var(--glass-edge);
  box-shadow: var(--shadow-md);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.login-logo svg { width: 40px; height: 40px; flex: none; }
.login-logo h1 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }

.login-form { display: flex; flex-direction: column; gap: 4px; }

/* === ADMIN PAGE === */
.admin-page { min-height: 100vh; background: var(--bg); }
.admin-container { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }

.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 0.5px solid var(--border-strong);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.12s;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--red); border-bottom-color: var(--red); }

.admin-card {
  background: var(--surface);
  border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.admin-card h2 { font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.admin-card h2 small { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 8px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-table th {
  text-align: left;
  padding: 7px 10px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border-strong);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table td {
  padding: 9px 10px;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.row-inactive { opacity: 0.45; }

/* Vodorovný scroll pro tabulky na úzkých displejích */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.label-text { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.checkbox-label:hover { background: var(--tag-bg); }
.checkbox-label small { color: var(--text-hint); }
.text-muted { color: var(--text-muted); }

code { background: var(--bg); padding: 1px 5px; border-radius: 3px; font-size: 11px; }

/* === BOČNÍ MENU (partials/nav.php) ===
   Od nového vzhledu (Matěj 18. 10. 2026) je menu na širokém displeji vlevo napevno,
   průsvitné a dá se sbalit na pruh ikon (stav v `html[data-menu]`, drží ho appHead()
   z localStorage ještě před vykreslením). Pod 900 px je to dál vysouvací panel. */
.hamburger-menu { display: none; position: fixed; inset: 0; z-index: 500; }
.hamburger-menu.open { display: block; }
.hamburger-backdrop { position: absolute; inset: 0; background: rgba(10,12,18,0.30); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.hamburger-panel {
  position: absolute; top: 10px; left: 10px; bottom: 10px;
  width: calc(var(--side-w) - 20px);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; overflow: hidden;
}
.hamburger-header { display: flex; align-items: center; gap: 8px; padding: 14px 12px 10px 14px; font-weight: 650; font-size: 14px; letter-spacing: -0.01em; }
.hamburger-header button { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--text-hint); }
.nv-znacka { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; white-space: nowrap; color: var(--text); text-decoration: none; }
.nv-znacka:hover { text-decoration: none; }
.nv-znacka svg { width: 28px; height: 28px; flex: none; display: block; }
.hamburger-header .nv-sbalit { width: 28px; height: 28px; border-radius: 8px; display: none; place-items: center; background: var(--tag-bg); color: var(--text-muted); font-size: 0; }
.hamburger-header .nv-sbalit:hover { background: var(--border-strong); color: var(--text); }
html[data-menu="sbalene"] .nv-sbalit svg { transform: rotate(180deg); }

/* flex: 1 + overflow drží patičku menu (uživatel, Administrace, Odhlásit) dole
   a nechá scrollovat jen seznam sekcí – jinak by ji na nízkém displeji odsunul pryč. */
.hamburger-nav { padding: 4px 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.hamburger-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); transition: background 0.12s; }
.hamburger-link:hover { background: var(--tag-bg); text-decoration: none; }
.hamburger-link.active { background: var(--red); color: var(--on-red); }
.hamburger-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted); }
.hamburger-icon svg { width: 19px; height: 19px; }
.hamburger-link.active .hamburger-icon { color: var(--on-red); }
.hamburger-link-title { font-weight: 500; font-size: 13.5px; white-space: nowrap; }
/* Popisek sekce zůstává v HTML pro čtečky, v úzkém menu se nevejde. */
.hamburger-link-desc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nv-pocet { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: var(--on-red); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.hamburger-link.active .nv-pocet { background: var(--on-red); color: var(--red); }

@media (min-width: 900px) {
  .hamburger-menu { display: block; inset: 0 auto 0 0; width: var(--side-w); z-index: 150; }
  .hamburger-backdrop, #hamburger-close { display: none; }
  .hamburger-panel { background: var(--glass); box-shadow: var(--shadow-sm); }
  .hamburger-header .nv-sbalit { display: grid; }
  html[data-menu="sbalene"] .hamburger-menu { width: var(--side-w-sbalene); }
  html[data-menu="sbalene"] .hamburger-panel { width: calc(var(--side-w-sbalene) - 20px); }
  html[data-menu="sbalene"] .nv-znacka span, html[data-menu="sbalene"] .hamburger-link-title,
  html[data-menu="sbalene"] .nv-patka-text, html[data-menu="sbalene"] .nv-pocet { display: none; }
  html[data-menu="sbalene"] .hamburger-header { flex-direction: column; padding: 14px 0 10px; }
  /* Sbalená položka je čtverec 40 × 40 s ikonou uprostřed. Obal názvu (div) i text patičky
     se schovávají celé — prázdný obal s mezerou 10 px odsouval ikonu doleva (Matěj 18. 10. 2026).
     Název pro čtečky nese bublina (data-popis → title, js/spolecne.js). */
  html[data-menu="sbalene"] .hamburger-nav, html[data-menu="sbalene"] .nv-patka { padding-left: 6px; padding-right: 6px; align-items: center; }
  html[data-menu="sbalene"] .hamburger-link > div { display: none; }
  html[data-menu="sbalene"] .hamburger-link, html[data-menu="sbalene"] .nv-patka-radek { justify-content: center; gap: 0; padding: 0; width: 40px; height: 40px; margin: 0 auto; }
}

/* === RESPONZIVITA === */
@media (max-width: 768px) {
  .week-nav { flex-wrap: wrap; gap: 6px; padding: 7px 12px; }
  .week-title { width: 100%; text-align: center; order: -1; font-size: 12px; }
  .plan-container { flex-direction: column; height: auto; overflow: visible; }
  .days-grid { grid-template-columns: 1fr; overflow: visible; height: auto; }
  .day-column { border-right: none; border-bottom: 0.5px solid var(--border); }
  .day-body, .articles-list { max-height: none; overflow: visible; }
  .plan-sidebar { width: 100%; border-left: none; border-top: 0.5px solid var(--border-strong); }
  .modal-dialog {
    margin: 0;
    border-radius: 14px 14px 0 0;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
  }
  .modal-header { flex-shrink: 0; }
  .modal-footer { flex-shrink: 0; }
  .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }

  /* Zabraň iOS Safari přibližování při focusu na input (font-size musí být ≥ 16px) */
  input[type="time"],
  input[type="text"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  select,
  textarea { font-size: 16px !important; }
  .form-row { grid-template-columns: 1fr; }
  .author-select-row { flex-direction: column; align-items: flex-start; }
  .author-select-row select { width: 100%; }

  /* Admin na mobilu: užší padding, scrollovatelné tabulky */
  .admin-container { padding: 16px 10px; }
  .admin-card { padding: 14px 12px; }
  .admin-card h2 { flex-wrap: wrap; }
  .tbl-scroll { margin: 0 -12px; padding: 0 12px; }
  .email-chip-input { min-width: 120px; }

  /* Větší písmo globálně na mobilu */
  body { font-size: 15px; }
  .navbar-brand { font-size: 16px; }
  .btn { font-size: 13px; }
  .week-title { font-size: 13px; }
  .day-name { font-size: 13px; }
  .day-date { font-size: 14px; }
  .article-time { font-size: 14px; }
  .article-title { font-size: 14px; }
  .article-author { font-size: 12px; }
  .top-badge, .pr-badge { font-size: 10px; }
  .sidebar-section h3 { font-size: 13px; }

  /* Větší touch targety pro tlačítka editovat/smazat */
  .btn-icon { width: 34px; height: 34px; font-size: 15px; border-radius: 6px; }
  .article-actions button { width: 34px; height: 34px; font-size: 15px; border-radius: 6px; }
  .article-actions { gap: 4px; top: 6px; right: 6px; }

  /* Větší odsazení řádků článku kvůli větším ikonkám */
  .article-time-row { padding-right: 82px; }
  .article-title { padding-right: 82px; }

  /* Akce článku vždy viditelné na mobilu */
  .article-actions { display: flex; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 10px; gap: 8px; }
}

/* Číslo, které je součtem víc FB příspěvků téhož profilu – tečkované podtržení
   napovídá, že se za ním něco skrývá (vysvětlení je v title). */
.mon-vice { border-bottom: 1px dotted var(--text-hint); cursor: help; }

/* === STRÁNKOVÁNÍ (Tipy, Hlášení bugů a nápadů) === */
.strankovani { display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 18px 0 4px; flex-wrap: wrap; }
.str-btn { font-size: 13px; padding: 7px 14px; border-radius: 999px;
  border: 0; background: var(--tag-bg);
  color: var(--text); text-decoration: none; line-height: 1; }
.str-btn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.str-vypnuto { opacity: .4; pointer-events: none; }
.str-kde { font-size: 12px; color: var(--text-hint); font-variant-numeric: tabular-nums; }

/* === NENAPLÁNOVANÉ ČLÁNKY === */
.article-unscheduled { border-style: dashed; opacity: 0.75; }
#art-time-group.hidden { opacity: 0.3; pointer-events: none; }

/* === LOG FILTER === */

/* === PŘEDVYPLNIT TÝDEN === */
.btn-prefill {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-prefill:hover {
  background: var(--tag-bg);
  border-color: var(--red);
  color: var(--red);
}
.btn-prefill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty-title { color: var(--text-hint); font-style: italic; }


/* ═══════════════════════════════════════════════════════════════════════
   TMAVÝ REŽIM

   Jedna sada hodnot, žádná duplicita: skript v hlavičce (bootstrap.php →
   appHead) nasadí na <html> data-tema="tmave" nebo "svetle" JEŠTĚ PŘED
   vykreslením, takže se sem stav „podle zařízení" nikdy nedostane a není
   potřeba psát paletu podruhé do @media (prefers-color-scheme).

   Selektor html[data-tema] má vyšší specificitu než :root, takže přebije
   i barvy z Adminu – světlé pozadí v tmavém režimu nedává smysl.
   Značková červená zůstává, mění se jen podklady, linky a texty.
   ═══════════════════════════════════════════════════════════════════════ */
/* --- Co na webu vyšlo (Plán dne) ---
   V sloupci je jen řádek s počty a šipka; seznam se otevírá v okně přes kalendář.
   Ve sloupci širokém jako mobil se dlouhé titulky lámaly do nečitelné kaše.
   Barvy jen přes proměnné, jinak by to v tmavém režimu svítilo. (Matěj 15. 8. 2026) */
.vyslo-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px; font-size: 11px; color: var(--text-muted);
    border-bottom: 0.5px solid var(--border); white-space: nowrap;
}
/* Popisky se nelámou (Matěj 18. 10. 2026); v úzkém sloupci se raději zkrátí. */
.vyslo-pocty { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vyslo-pocty b { color: var(--text); font-weight: 600; }
.vyslo-open {
    background: none; border: 0; padding: 0 2px; cursor: pointer;
    color: var(--red); font-size: 13px; line-height: 1;
}
.vyslo-open:hover { opacity: 0.7; }

/* Okno je širší než ostatní – jsou v něm celé titulky, ne formulář. */
.modal-wide { max-width: 720px; width: min(720px, calc(100vw - 32px)); }
.vyslo-seznam { list-style: none; margin: 0; padding: 0; }
.vyslo-seznam li {
    padding: 7px 0; border-bottom: 1px solid var(--border);
    line-height: 1.4; font-size: 13px;
}
.vyslo-seznam li:last-child { border-bottom: 0; }
.vyslo-seznam a { color: var(--text); text-decoration: none; }
.vyslo-seznam a:hover { text-decoration: underline; }
.vyslo-cas { color: var(--text-muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.vyslo-autor { color: var(--text-muted); font-size: 12px; }
.vyslo-autor::before { content: ' · '; }
.vyslo-pr {
    background: var(--warm-bg); border: 1px solid var(--warm-border);
    border-radius: 3px; padding: 0 3px; margin-left: 5px; font-size: 10px;
}

/* Výběr reakce v Šablonách: v tlačítku je od 17. 8. 2026 obrázek místo znaku, protože
   nativní emoji vypadá na každém systému jinak a čtenář pak na Facebooku hledá tlačítko,
   které tam takhle nevypadá. */
.emoji-btn img { display: block; width: 30px; height: 30px; }

/* --- Produkční úkoly z CRM (Plán dne) ---
   Vizuálně odlišené od redakčních řádků schválně: je to obchodní zadání, ne položka,
   kterou si redakce naplánovala — a nikdo si je nesmí splést. Jen ke čtení; stav
   a termín se mění v CRM. (18. 8. 2026) */
.crm-ukoly { padding: 5px 8px 0; display: flex; flex-direction: column; gap: 4px; }
.crm-ukol {
    display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap;
    font-size: 11px; line-height: 1.35;
    background: var(--warm-bg); border: 1px solid var(--warm-border);
    border-radius: var(--radius-sm); padding: 4px 6px;
}
.crm-znacka {
    text-transform: uppercase; font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
    color: var(--today-accent); border: 1px solid var(--warm-border);
    border-radius: 3px; padding: 0 3px; background: var(--surface);
}
.crm-ukol a, .crm-nazev { color: var(--text); font-weight: 600; text-decoration: none; }
.crm-ukol a:hover { text-decoration: underline; }
.crm-firma, .crm-resitel { color: var(--text-muted); }
.crm-resitel::before { content: '· '; }
.crm-hotovo { color: var(--green-text); font-weight: 700; }
/* Hotový nebo vydaný úkol už nepotřebuje pozornost, jen ať je vidět, že existoval. */
.crm-hotovo ~ *, .crm-hotovo { opacity: 1; }
.crm-ukol.crm-hotovo { opacity: 0.72; }

html[data-tema="tmave"] {
  color-scheme: dark;            /* nativní prvky: posuvníky, výběr data, autofill */
  --bg: #0d0f14;
  --surface: #23252c;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #f2f2f7;
  --text-muted: #a7a7b0;
  --text-hint: #949aa4;   /* světlejší než návrh – aby i nápověda prošla normou 4.5 */
  --tag-bg: rgba(255,255,255,0.08);
  --weekend-bg: rgba(255,255,255,0.02);
  --today-bg: rgba(255,122,61,0.08);
  --today-accent: #ff8a4c;
  --red-light: rgba(255,69,58,0.16);
  --green-light: #12301f;
  --karta-nasazeno: rgba(59,158,90,0.17);
  --karta-crm: rgba(232,128,58,0.17);
  --green-text: #7fcfa4;
  --shadow-md: 0 18px 50px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 0 0 0.5px rgba(255,255,255,0.07);
  --glass: rgba(30,32,40,0.55);
  --glass-strong: rgba(38,40,48,0.84);
  --glass-edge: rgba(255,255,255,0.08);
  --field-bg: rgba(255,255,255,0.07);
  --wall: radial-gradient(900px 600px at 8% -5%, rgba(226,6,19,0.18), transparent 60%),
          radial-gradient(800px 520px at 95% 10%, rgba(10,132,255,0.14), transparent 60%),
          radial-gradient(900px 700px at 60% 110%, rgba(255,149,0,0.07), transparent 60%);
  --big-topic: #c98af0;

  --ok-bg: #12301f;   --ok-text: #7fcfa4;
  --warn-bg: #3a2f14; --warn-text: #fcd34d;
  --err-bg: #33191a;  --err-text: #fca5a5;
  --info-bg: #16263d; --info-text: #93c5fd;
  --note-bg: #241d3d; --note-text: #c4b5fd;

  /* Proužek refreshe byl v tmavém režimu bílý text na skoro bílém podkladu (background
     byl var(--text), a ten je tady světlý) – tedy nečitelný. Tady se překlápí obráceně. */
  --banner-bg: #2f343c;   --banner-text: #f2f4f6;
  --warm-bg: rgba(232,128,58,0.16); --warm-border: rgba(232,128,58,0.42);
  --err-border: rgba(252,165,165,0.45);
  --ok-border: rgba(127,207,164,0.45); --ok-strong: #7fcfa4;
}

/* Obrázky a náhledy v tmavém režimu trochu ztlumíme, ať ze stránky nesvítí */
html[data-tema="tmave"] img:not([src*=".svg"]) { filter: brightness(.92); }


/* ==========================================================================
   STYLY MODULŮ
   Do 3. 9. 2026 měl každý modul svůj <style> přímo ve stránce: 607 řádků, které
   se nedaly cachovat, chodily s každým načtením a bránily zapnutí CSP.
   (audit 2. 9. 2026, bod 4.6)

   Pořadí je schválně až tady, na konci. Šestnáct selektorů se překrývá s pravidly
   výš a stránky je dosud přebíjely tím, že jejich <style> byl až za odkazem na
   tenhle soubor — po přesunu na konec zůstává vítěz stejný.
   ========================================================================== */

/* --- Navigace a hamburger menu (partials/nav.php) --- */
.nv-menubtn { width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--tag-bg); color: var(--text-muted); cursor: pointer; padding: 0; flex-shrink: 0; }
.nv-menubtn:hover { background: var(--border-strong); color: var(--text); }
/* Tlačítko ☰ jen pro vysouvací menu; na širokém displeji je menu vidět napevno. */
@media (min-width: 900px) { .nv-menubtn { display: none; } }
.nv-title { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
/* Výběr webu v Plánu dne — rozbalovací nabídka místo pruhu přes celý řádek (Matěj 18. 10. 2026). */
.nv-web { display: inline-flex; align-items: center; gap: 8px; background: var(--tag-bg); border-radius: 999px; padding: 0 0 0 10px; min-width: 0; }
.nv-web::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); flex: none; }
.nv-web select { border: 0; background-color: transparent; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--text); padding: 7px 30px 7px 0; max-width: 60vw; }
.nv-btn { font-size: 13px; color: var(--text); border: 0; border-radius: 999px; padding: 8px 13px; background: var(--tag-bg); text-decoration: none; line-height: 1; }
.nv-btn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.app-tooltip { position: fixed; background: var(--banner-bg); color: var(--banner-text); font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 7px; max-width: 240px; z-index: 99999; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.app-tooltip.show { opacity: 1; }
.nv-tema { padding: 6px 9px; display: inline-flex; align-items: center; cursor: pointer; }
/* Odesílaný formulář: tlačítko zešedne a nejde znovu kliknout. Vědomě BEZ atributu
   disabled – ten by z odeslání vyřadil jeho vlastní name/value. */
.odesila { opacity: .55; pointer-events: none; }
.koncept-obnoven { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); }
.koncept-obnoven button { font-size: 12px; padding: 1px 8px; border: 1px solid currentColor; border-radius: var(--radius-sm); background: transparent; color: inherit; cursor: pointer; }
/* Ikona ukazuje AKTUÁLNÍ volbu, ne tu příští: monitor = podle zařízení. */
html[data-tema-volba="auto"]   .ico-mesic, html[data-tema-volba="auto"]   .ico-slunce { display: none; }
html[data-tema-volba="tmave"]  .ico-auto,  html[data-tema-volba="tmave"]  .ico-slunce { display: none; }
html[data-tema-volba="svetle"] .ico-auto,  html[data-tema-volba="svetle"] .ico-mesic  { display: none; }
/* ── Patička bočního menu (jen na úzkém displeji) ───────────────────────────────
   Sem se z lišty stěhuje uživatel, Administrace a Odhlásit. */
.nv-patka { margin-top: auto; border-top: 0.5px solid var(--border); padding: 8px; }
.nv-patka-radek { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.nv-patka-radek:hover { background: var(--tag-bg); text-decoration: none; }
.nv-patka-text { min-width: 0; }
.nv-odhlasit { margin: 0; }
.nv-odhlasit button { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nv-patka-jmeno { font-size: 13px; font-weight: 500; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-patka-role { font-size: 11.5px; color: var(--text-muted); display: block; white-space: nowrap; }
.nv-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--tag-bg); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; font-weight: 700; }
.nv-patka-ico { width: 28px; height: 22px; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }



/* --- Administrace – rozvržení (admin/index.php) --- */
.log-filter { margin-bottom: 16px; }
/* Email chipy */
.email-chip-wrap {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-height: 36px; padding: 4px 8px;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); cursor: text;
}
.email-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--tag-bg); border: 0.5px solid var(--border-strong);
  border-radius: 20px; padding: 2px 10px 2px 10px;
  font-size: 12px; font-weight: 500; color: var(--text);
}
.email-chip-remove {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--text-hint); font-size: 14px; line-height: 1;
  display: flex; align-items: center;
}
.email-chip-remove:hover { color: var(--red); }
.email-chip-input {
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--text); min-width: 180px; flex: 1; padding: 2px 4px;
}
.badge-action-create { background:var(--ok-bg);color:var(--ok-text); }
.badge-action-update { background:var(--info-bg);color:var(--info-text); }
.badge-action-delete { background:var(--err-bg);color:var(--err-text); }
.badge-action-export { background:var(--warn-bg);color:var(--warn-text); }
.badge-action-import { background:var(--note-bg);color:var(--note-text); }
/* Nahlédnutí není změna, tak ať v protokolu nekřičí. */
.badge-action-view   { background:var(--tag-bg);color:var(--text-muted); }
.badge-action-notify { background:var(--warn-bg);color:var(--warn-text); }


/* --- Administrace – Diagnostika (admin/tabs/diagnostika.php) --- */
.dg-legend { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.dg-tabulka { width: 100%; border-collapse: collapse; }
.dg-tabulka td { padding: 9px 4px; border-bottom: 0.5px solid var(--border); vertical-align: top; }
.dg-tabulka tr:last-child td { border-bottom: none; }
.dg-tecka { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-top: 5px; flex-shrink: 0; }
.dg-tecka.ok { background: var(--green); }
.dg-tecka.warn { background: var(--today-accent); }
.dg-tecka.err { background: var(--red); }
.dg-tecka.info { background: var(--border-strong); }
.dg-td-tecka { width: 18px; }
.dg-nazev { font-weight: 500; color: var(--text); }
.dg-hodnota { color: var(--text); font-variant-numeric: tabular-nums; }
.dg-hodnota.err { color: var(--err-text); font-weight: 600; }
.dg-hodnota.warn { color: var(--today-accent); font-weight: 600; }
.dg-pozn { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.dg-pozn code { font-size: 11.5px; background: var(--tag-bg); padding: 1px 4px; border-radius: 3px; }
.dg-vpravo { text-align: right; white-space: nowrap; padding-left: 12px; }
@media (max-width: 640px) {
  .dg-vpravo { text-align: left; white-space: normal; padding-left: 0; }
  .dg-tabulka td { display: block; border: none; padding: 2px 4px; }
  .dg-tabulka tr { display: block; border-bottom: 0.5px solid var(--border); padding: 8px 0; }
  .dg-td-tecka { display: none !important; }
}


/* --- Administrace – Facebook (admin/tabs/fb.php) --- */
    .fb-h2, .fb-h3 { display:flex; align-items:center; gap:9px; }
    .fb-h3 svg { color: var(--text-muted); }
    .secret-field { position: relative; }
    .secret-field input { padding-right: 40px; width: 100%; }
    .secret-reveal { position:absolute; top:0; right:0; height:100%; width:38px; display:flex; align-items:center; justify-content:center; background:none; border:none; cursor:pointer; color:var(--text-hint); }
    .secret-reveal:hover { color: var(--red); }
    .secret-reveal.on { color: var(--red); }


/* --- Administrace – Role (admin/tabs/roles.php) --- */
    .rl-sec { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; }
    .rl-sec svg { color: var(--text-hint); flex-shrink: 0; }
    .rl-toggle { display: inline-flex; cursor: pointer; vertical-align: middle; }
    .rl-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
    .rl-slider { width: 36px; height: 20px; border-radius: 20px; background: var(--border-strong); position: relative; transition: background .15s; }
    .rl-slider::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--prepinac-knoflik); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
    .rl-toggle input:checked + .rl-slider { background: var(--red); }
    .rl-toggle input:checked + .rl-slider::after { transform: translateX(16px); }
    .rl-toggle input:focus-visible + .rl-slider { box-shadow: 0 0 0 3px var(--red-light); }


/* --- Administrace – Vzhled (admin/tabs/vzhled.php) --- */
    .color-setting{display:flex;flex-direction:column;gap:8px}
    .color-setting label{font-size:13px;font-weight:500;color:var(--text)}
    .color-setting label small{font-weight:400;color:var(--text-muted);margin-left:4px}
    .color-row{display:flex;align-items:center;gap:8px}
    .color-row input[type="color"]{width:44px;height:36px;padding:2px;border:0.5px solid var(--border-strong);border-radius:6px;cursor:pointer;background:none}
    .color-text{width:90px;padding:6px 8px;border:0.5px solid var(--border-strong);border-radius:6px;font-size:13px;font-family:monospace}


/* --- Administrace – Weby (admin/tabs/webs.php) --- */
    .wm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 0.5px solid var(--border-strong); border-radius: var(--radius); }
    .wm-table { border-collapse: collapse; width: auto; }
    .wm-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
    .wm-table th, .wm-table td { border-bottom: 0.5px solid var(--border); }
    .wm-table tbody tr:last-child td { border-bottom: none; }
    .wm-corner { position: sticky; left: 0; z-index: 3; background: var(--surface); text-align: left; padding: 8px 12px; font-size: 11px; color: var(--text-hint); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; border-right: 0.5px solid var(--border-strong); }
    .wm-webhead { height: 96px; vertical-align: bottom; padding: 0; border-right: 0.5px solid var(--border); }
    .wm-webhead span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 11px; font-weight: 500; color: var(--text-muted); padding: 8px 0; }
    .wm-name { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: 7px 12px; font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; border-right: 0.5px solid var(--border-strong); }
    .wm-inactive .wm-name { color: var(--text-hint); }
    .wm-cell { width: 36px; text-align: center; padding: 6px 0; border-right: 0.5px solid var(--border); }
    .wm-table tbody tr:hover .wm-cell, .wm-table tbody tr:hover .wm-name { background: var(--bg); }
    .wm-cell input { cursor: pointer; }
    .webs-manage input[type=text] { width: 100%; padding: 6px 8px; font-size: 13px; }
    .webs-manage input[type=number] { width: 58px; padding: 6px 8px; font-size: 13px; }


/* --- Hlášení bugů a nápadů (bugs/index.php) --- */
.bug-wrap { max-width: 760px; margin: 0 auto; padding: 16px 12px 60px; }
.bug-hint { font-size: 12px; color: var(--text-hint); }
.bug-card { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.bug-card h3 { font-size: 14px; margin: 0; }
.bug-form input[type=text], .bug-form textarea { width: 100%; padding: 9px 11px; font-size: 13px; }
.bug-form textarea { min-height: 76px; resize: vertical; }
.bug-form label { font-size: 12px; font-weight: 500; color: var(--text-muted); display: block; margin: 12px 0 5px; }
.bug-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bug-badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.bug-badge.open { background: var(--warn-bg); color: var(--warn-text); }
.bug-badge.resolved { background: var(--ok-bg); color: var(--ok-text); }
.bug-badge.rejected { background: var(--red-light); color: var(--red); }
.bug-meta { font-size: 11.5px; color: var(--text-hint); }
.bug-desc { font-size: 13px; line-height: 1.55; margin: 10px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.bug-file { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--red); text-decoration: none; margin-top: 8px; }
.bug-file-wrap { display: inline-flex; align-items: center; gap: 2px; }
.bug-file-del { display: inline; margin: 0; }
/* Křížek je vidět pořád, jen nenápadně – schovat ho do hoveru by ho na dotyku znepřístupnilo */
.bug-file-del button { border: 0; background: none; padding: 0 4px; margin-top: 8px; cursor: pointer;
    font-size: 13px; line-height: 1; color: var(--text-hint); }
.bug-file-del button:hover, .bug-file-del button:focus { color: var(--red); }
.bug-comments { margin-top: 12px; border-top: 0.5px solid var(--border-strong); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bug-comment { background: var(--bg); border-radius: var(--radius-sm); padding: 8px 11px; font-size: 12.5px; line-height: 1.5; }
.bug-comment .who { font-weight: 600; margin-right: 6px; }
.bug-comment .when { color: var(--text-hint); font-size: 11px; }
.bug-comment p { margin: 4px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.bug-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.bug-btn { border: 0; border-radius: 999px; background: var(--tag-bg); color: var(--text); cursor: pointer; font-size: 12px; padding: 6px 12px; }
.bug-btn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.bug-btn.ok:hover { color: var(--ok-text); }
.bug-cform { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bug-cform textarea { flex: 1; min-width: 200px; min-height: 40px; padding: 8px 10px; font-size: 12.5px; resize: vertical; }
.bug-cform input[type=file] { font-size: 11px; max-width: 180px; }


/* --- Dovolené (dovolene/index.php) --- */
.dv-page { max-width: 1000px; margin: 0 auto; padding: 8px 14px 48px; }
.dv-nav { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.dv-nav-title { flex: 1; text-align: center; font-size: 14px; font-weight: 500; color: var(--text); }
.dv-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.dv-legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.dv-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dv-grid { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.dv-hrow { display: flex; align-items: stretch; border-top: 0.5px solid var(--border); min-height: 30px; }
.dv-hrow.dv-head { border-top: none; }
.dv-name { width: 140px; flex-shrink: 0; display: flex; align-items: center; padding: 0 12px; font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 0.5px solid var(--border-strong); }
.dv-head .dv-name { font-size: 11px; color: var(--text-hint); }
.dv-track { flex: 1; position: relative; display: flex; min-width: 0; }
.dv-dh { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10px; color: var(--text-hint); padding: 5px 0; line-height: 1.25; border-right: 0.5px solid var(--border); }
.dv-dh:last-child { border-right: none; }
.dv-dh.weekend { background: var(--weekend-bg); }
.dv-dh.today { color: var(--red); background: var(--red-light); }
.dv-dnum { font-size: 11px; font-weight: 400; }
.dv-day { flex: 1 1 0; min-width: 0; border-right: 0.5px solid var(--border); }
.dv-day:last-child { border-right: none; }
.dv-day.weekend { background: var(--weekend-bg); }
.dv-day.today { background: var(--red-light); }
.dv-day.clk { cursor: pointer; }
.dv-day.clk:hover { background: rgba(0,0,0,.04); }
.dv-bar { position: absolute; top: 4px; bottom: 4px; display: flex; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 500; overflow: hidden; white-space: nowrap; z-index: 2; }
.dv-bar.clk { cursor: pointer; }
.dv-bar.col { background: var(--info-bg); color: var(--info-text); }
.dv-bar.me { background: rgba(208,46,38,.13); color: var(--dv-me-text); }
.dv-bar-label { overflow: hidden; text-overflow: ellipsis; }
.dv-empty-info { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 9px 13px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; box-shadow: var(--shadow-sm); }
@media (max-width: 720px) {
  .dv-grid { min-width: 660px; }
}
.toast { position:fixed;bottom:20px;right:20px;padding:10px 18px;background:var(--toast-bg);color:var(--banner-text);border-radius:8px;font-size:13px;font-weight:500;z-index:9999;transform:translateY(20px);opacity:0;transition:all .25s;box-shadow:0 4px 16px rgba(0,0,0,.25); }
.toast.show { transform:translateY(0);opacity:1; }
.toast.toast-error { background:var(--red); }
.toast.toast-success { background:var(--ok-text); }


/* --- FB Dashboard (facebook/index.php) --- */
.fb-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 12px 60px; }

.fb-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.fb-toolbar label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.fb-toolbar label svg { color: var(--text-hint); }
.fb-toolbar select, .fb-toolbar input[type=number] { padding: 6px 10px; font-size: 13px; }
.fb-toolbar input[type=number] { width: 80px; }
.fb-toolbar-sep { flex: 1; }

.fb-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
@media (max-width: 700px) { .fb-stats { grid-template-columns: repeat(2, 1fr); } }
.fb-stat-card {
  background: var(--surface); border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.fb-stat-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--text-hint); margin-bottom: 4px; }
.fb-stat-value { font-size: 24px; font-weight: 500; color: var(--text); }
.fb-stat-sub { font-size: 11px; color: var(--text-hint); margin-top: 2px; }

.fb-posts { display: flex; flex-direction: column; gap: 10px; }
.fb-post {
  background: var(--surface); border: 0.5px solid var(--glass-edge);
  border-radius: var(--radius); padding: 14px 16px;
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
  transition: border-color .12s; box-shadow: var(--shadow-sm);
}
.fb-post:hover { border-color: var(--red); }
.fb-post.is-viral { box-shadow: inset 0 0 0 1px var(--red), var(--shadow-sm); background: var(--red-light); }
.fb-post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.fb-post-page {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-hint); background: var(--tag-bg); padding: 2px 8px; border-radius: 20px;
}
.fb-post-time { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-hint); }
.viral-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500; background: var(--red); color: var(--on-red);
  padding: 2px 7px; border-radius: 20px;
}
.fb-post-message {
  font-size: 13px; color: var(--text); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fb-post-metrics { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.fb-metric { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
.fb-metric svg { color: var(--text-hint); flex-shrink: 0; }
.fb-metric strong { color: var(--text); font-size: 14px; }
.fb-metric-avg { height: 4px; background: var(--border-strong); border-radius: 2px; flex: 1; overflow: hidden; margin-top: 6px; }
.fb-metric-fill { height: 4px; border-radius: 2px; background: var(--red); transition: width .3s; }
.avg-line { font-size: 11px; color: var(--text-hint); margin-top: 6px; }
.avg-line span { font-weight: 500; color: var(--text-muted); }
.avg-line .ind-lbl { color: var(--text-muted); }
.fb-metric-fill.fill-views { background: var(--graf-seda); }
.fb-post-actions { display: flex; flex-direction: column; gap: 6px; min-width: 130px; }
.fb-post-actions .btn { width: 100%; justify-content: center; font-size: 12px; }
.fb-loading { text-align: center; padding: 60px; color: var(--text-hint); }
.fb-error { background: var(--err-bg); border: 0.5px solid var(--err-text); border-radius: var(--radius); padding: 16px; color: var(--err-text); margin-bottom: 16px; }
.fb-hint { font-size: 12px; color: var(--text-hint); margin: 0 0 10px; }
.fb-empty { text-align: center; padding: 60px; color: var(--text-hint); font-size: 14px; }
.fb-no-token { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 32px; text-align: center; box-shadow: var(--shadow-sm); }
.fb-progress { font-size: 13px; color: var(--text-hint); margin-top: 8px; }


/* --- Monitoring (monitoring/index.php) --- */
.mon-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 12px 60px; }
.mon-hint { font-size: 12px; color: var(--text-hint); }
.mon-article { margin-top: 18px; padding-top: 18px; border-top: 0.5px solid var(--border-strong); }
.mon-article:first-child { border-top: none; padding-top: 0; }
.mon-search { display: flex; gap: 8px; }
.mon-search input { flex: 1; padding: 10px 12px; font-size: 14px; }
.mon-remove { width: 40px; border: 0; border-radius: 999px; background: var(--tag-bg); color: var(--text); cursor: pointer; font-size: 20px; line-height: 1; flex-shrink: 0; }
.mon-remove:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.mon-result { margin-top: 12px; }
.mon-art-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mon-toggle { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 999px; background: var(--tag-bg); color: var(--text); cursor: pointer; font-size: 10px; line-height: 1; flex-shrink: 0; }
.mon-toggle:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.mon-karta-row { border: 0; border-radius: 999px; background: var(--tag-bg); color: var(--text); cursor: pointer; font-size: 11px; padding: 2px 6px 0; margin-left: 6px; vertical-align: -2px; }
.mon-karta-row:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.mon-karta-row:disabled { opacity: .6; cursor: default; }
.mon-result.collapsed .mon-web-row { display: none; }
.mon-tbl-scroll { overflow-x: auto; }
.mon-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 880px; }
.mon-table th, .mon-table td { padding: 9px 12px; border-bottom: 0.5px solid var(--border-strong); white-space: nowrap; }
.mon-table th { text-align: left; color: var(--text-muted); font-weight: 500; }
.mon-table td.num, .mon-table th.num { text-align: right; }
.mon-table tr.total { font-weight: 600; }
.mon-table tr.total td { border-top: 2px solid var(--border-strong); }
.mon-fbcol { color: var(--text-muted); }
#mon-add { margin-top: 16px; }
.mon-grand { margin-top: 20px; }
.mon-card { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.mon-grand-title { font-weight: 600; margin-bottom: 12px; }
.mon-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mon-tile { border: 0.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; }
.mon-tile-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.mon-tile-val { font-size: 22px; font-weight: 600; }


/* --- Čtenářské persony (persony/index.php) --- */
.pz-wrap { max-width: 1080px; margin: 0 auto; padding: 16px 14px 80px; }
.pz-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.pz-head h1 { font-size: 24px; margin: 0; }
.pz-sub { color: var(--text-muted); font-size: 13px; margin: 2px 0 0; }
.pz-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pz-actions select { padding: 8px 10px; font-size: 13px; }
.pz-note { background: var(--surface); box-shadow: var(--shadow-sm); border-radius: var(--radius); padding: 10px 14px; font-size: 12.5px; color: var(--text-muted); margin: 12px 0 22px; }
.pz-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 30px 0 12px; font-weight: 600; }
.pz-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.pz-tile { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.pz-tile-val { font-size: 26px; font-weight: 700; line-height: 1.1; }
.pz-tile-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.pz-card { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.pz-card h3 { margin: 0 0 12px; font-size: 15px; }
.pz-bars { display: flex; flex-direction: column; gap: 7px; }
.pz-bar-row { display: grid; grid-template-columns: 120px 1fr 64px; align-items: center; gap: 8px; font-size: 12.5px; }
.pz-bar-label { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-bar-track { background: var(--border); border-radius: 5px; height: 9px; overflow: hidden; }
.pz-bar-fill { display: block; height: 100%; background: var(--red); border-radius: 5px; }
.pz-bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.pz-hours { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.pz-hour { flex: 1; background: var(--red); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.pz-hours-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-hint); margin-top: 4px; }
.pz-empty { color: var(--text-hint); font-size: 12px; }
/* Persony */
.pz-personas { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.pz-persona { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.pz-persona-top { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--on-red); }
.pz-avatar { flex-shrink: 0; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.pz-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pz-avatar-fallback { font-size: 32px; }
.pz-persona-headtext { min-width: 0; }
.pz-persona-name { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.pz-persona-tag { font-size: 12.5px; opacity: .92; }
.pz-persona-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; }
.pz-demo { font-size: 12px; color: var(--text-muted); }
.pz-quote { font-style: italic; font-size: 14px; border-left: 3px solid var(--border-strong); padding-left: 11px; color: var(--text); }
.pz-bio { font-size: 13px; line-height: 1.5; }
.pz-attrs { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.pz-attr { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.pz-attr b { color: var(--text-muted); font-weight: 500; }
.pz-value { margin-top: 2px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.45; }
.pz-value b { color: var(--red); }
@media print {
  @page { margin: 12mm; }
  body { background: #fff; padding-left: 0 !important; }
  .navbar, .hamburger-menu, .pz-actions, .pz-note-print-hide { display: none !important; }
  .pz-wrap { max-width: none; padding: 0; }
  .pz-persona, .pz-card, .pz-tile { break-inside: avoid; border-color: #ccc; }
  .pz-persona { page-break-inside: avoid; }
  .pz-personas { display: block; }
  .pz-persona { margin-bottom: 14px; }
  .pz-persona-top { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pz-bar-fill, .pz-hour { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* --- Můj profil (profil.php) --- */
/* Na širokém displeji dva sloupce: vlevo účet, vpravo přihlašování. Na mobilu se
   nechává původní tok pod sebou, proto se flex zapíná až v media query. */
@media (min-width: 900px) {
    .profil-grid { display: flex; align-items: flex-start; gap: 16px; }
    .profil-col { flex: 1; min-width: 0; }
}


/* --- Šablony FB & IG (sablony/index.php) --- */
.sablony-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 12px 60px; }
.sablony-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }

/* Panel */
.sablony-panel {
  background: var(--surface); border: 0.5px solid var(--border-strong);
  border-radius: var(--radius); padding: 18px; position: sticky; top: 68px;
}
.sablony-panel h2 { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--text-hint); margin-bottom: 12px; }

/* Typy šablon */
.template-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.template-btn {
  padding: 10px 4px; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer; font-size: 11px; font-weight: 500; color: var(--text-muted);
  text-align: center; transition: all .12s; line-height: 1.25;
}
.template-btn:hover { border-color: var(--red); color: var(--red); }
.template-btn.active { border-color: var(--red); background: var(--red-light); color: var(--red); font-weight: 500; }
.template-btn .tb-icon { display: flex; justify-content: center; margin-bottom: 6px; }

/* Form */
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 13px; }
.form-group label { font-size: 12px; font-weight: 500; color: var(--text-muted); display: block; margin-bottom: 5px; }
.form-group input[type=text], .form-group textarea, .form-group select { width: 100%; padding: 8px 10px; font-size: 13px; }
.form-group textarea { resize: vertical; min-height: 72px; line-height: 1.4; }
.form-group input[type=url] { width: 100%; padding: 8px 10px; font-size: 13px; }
.url-row { display: flex; gap: 6px; }
.url-row input { flex: 1; }
.dropzone { margin-top: 8px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 18px 12px; text-align: center; cursor: pointer; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color .15s, background .15s, color .15s; }
.dropzone:hover { border-color: var(--red); color: var(--red); }
.dropzone.dragover { border-color: var(--red); background: var(--red-light); color: var(--red); }
.dz-text { font-size: 12px; }
.dz-link { color: var(--red); font-weight: 500; }
.upload-name { font-size: 11px; color: var(--text-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Soutěž extra pole */
.soutez-fields { display: none; }
.soutez-fields.visible { display: block; }

/* Canvas area */
.canvas-area { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.canvas-wrap {
  background: var(--bg); border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  padding: 14px; display: flex; align-items: center; justify-content: center; width: 100%;
}
canvas { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; display: block; border-radius: 4px; margin: 0 auto; }
.canvas-placeholder {
  width: 100%; max-width: 460px; aspect-ratio: 4/5;
  background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.ph-empty, .ph-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ph-icon { color: var(--text-hint); }
.ph-title { font-size: 14px; font-weight: 500; color: var(--text); }
.ph-hint { font-size: 12px; color: var(--text-hint); max-width: 240px; line-height: 1.5; }

/* Emoji picker */
.emoji-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.emoji-btn {
  font-size: 22px; background: var(--tag-bg); border: 0.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 8px; cursor: pointer;
  transition: transform .1s;
}
.emoji-btn:hover { transform: scale(1.2); }

/* Ořez nástroj */
.crop-wrap {
  display: none; flex-direction: column; align-items: center; gap: 10px;
  width: 100%;
}
.crop-wrap.visible { display: flex; }
.crop-canvas-wrap {
  position: relative; overflow: hidden;
  width: 100%; max-width: 480px;
  aspect-ratio: 4/5;
  background: var(--platno-bg); border-radius: 6px; cursor: grab;
  touch-action: none;
}
.crop-canvas-wrap:active { cursor: grabbing; }
#crop-canvas { width: 100%; height: 100%; display: block; }
.crop-controls {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 480px;
}
.crop-controls label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.crop-controls input[type=range] { flex: 1; accent-color: var(--red); }
.crop-hint { font-size: 11px; color: var(--text-hint); text-align: center; }

.spinner { width: 32px; height: 32px; border: 3px solid var(--border-strong); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobil: jeden sloupec – formulář NORMÁLNĚ SCROLLUJE (žádné sticky), pod ním celý náhled.
   POZOR: blok musí být až ZA základními pravidly, jinak je sticky přepíše. */
@media (max-width: 900px) {
  .sablony-layout { grid-template-columns: 1fr; }
  .sablony-panel { position: static; }
  canvas { max-height: none; }
}
.vp-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:9999; align-items:center; justify-content:center; }
.vp-overlay.show { display:flex; }
.vp-box { background:var(--surface); border-radius:14px; padding:28px 32px; width:min(90vw,360px); text-align:center; box-shadow:0 12px 40px rgba(0,0,0,.3); }
.vp-spinner { width:38px; height:38px; margin:0 auto 16px; border:4px solid var(--border-strong); border-top-color:var(--red); border-radius:50%; animation:vpspin .8s linear infinite; }
@keyframes vpspin { to { transform:rotate(360deg); } }
.vp-status { font-size:14px; color:var(--text); margin-bottom:14px; line-height:1.4; }
.vp-track { height:8px; background:var(--border-strong); border-radius:4px; overflow:hidden; }
.vp-bar { height:100%; width:0; background:var(--red); transition:width .2s; border-radius:4px; }


/* --- Přehled služeb (sluzby/index.php) --- */
.sv-wrap { max-width: 920px; margin: 0 auto; padding: 8px 14px 48px; }
.sv-monthnav { display: flex; align-items: center; gap: 10px; max-width: 920px; margin: 14px auto 2px; padding: 0 14px; }
.sv-monthnav-title { flex: 1; text-align: center; font-size: 14px; font-weight: 500; color: var(--text); }
.sv-navbtn { width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 0; color: var(--text); background: var(--tag-bg); text-decoration: none; flex-shrink: 0; }
.sv-navbtn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.sv-todaybtn { font-size: 13px; color: var(--text); border: 0; border-radius: 999px; padding: 6px 13px; text-decoration: none; background: var(--tag-bg); flex-shrink: 0; }
.sv-todaybtn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.sv-navph { width: 30px; flex-shrink: 0; }
.sv-info { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 8px 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.sv-block { margin-bottom: 22px; }
.sv-heading { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--text-hint); padding: 0 4px 8px; }
.sv-card { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.sv-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sv-table thead th { padding: 9px 16px; font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-hint); text-align: left; white-space: nowrap; }
.sv-table thead th:first-child { width: 132px; }
.sv-table tbody tr { border-top: 0.5px solid var(--border); }
.sv-table tbody tr.sv-weekend { background: rgba(0,0,0,.025); }
.sv-table tbody tr.sv-today { background: var(--red-light); }
.sv-daycell { padding: 8px 16px; white-space: nowrap; }
.sv-day { font-size: 13px; font-weight: 500; color: var(--text); text-transform: none; letter-spacing: normal; }
.sv-date { font-size: 13px; color: var(--text-hint); font-weight: 400; margin-left: 6px; }
.sv-today .sv-date { color: var(--red); font-weight: 500; }
.sv-dutycell { padding: 7px 16px; }
.sv-inner { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.sv-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--tag-bg); border: 0.5px solid var(--border-strong); border-radius: 20px; padding: 3px 12px 3px 3px; font-size: 13px; font-weight: 500; color: var(--text); }
.sv-ava { width: 23px; height: 23px; border-radius: 50%; background: rgba(208,46,38,.12); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 500; flex-shrink: 0; }
.sv-actions { display: none; gap: 2px; margin-left: 2px; }
.sv-inner:hover .sv-actions { display: flex; }
.sv-empty { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-hint); background: none; border: 0.5px dashed rgba(0,0,0,.22); border-radius: 20px; padding: 4px 13px; cursor: pointer; transition: border-color .12s, color .12s; }
.sv-empty:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 640px) {
  .sv-wrap, .sv-monthnav { padding-left: 10px; padding-right: 10px; }
  .sv-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sv-table { table-layout: auto; min-width: 520px; }
  .sv-actions { display: flex; }
}


/* --- Statistiky (statistiky/index.php) --- */
.st-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 12px 60px; }
.st-hint { font-size: 12px; color: var(--text-hint); }
.st-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.st-filters select, .st-filters input { padding: 8px 12px; font-size: 13px; }
.st-filters input { flex: 1; min-width: 180px; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-tile { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.st-tile-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.st-tile-val { font-size: 22px; font-weight: 600; }
.st-delta { font-size: 12px; font-weight: 500; margin-left: 6px; }
.st-delta.up { color: var(--rust-text); }
.st-delta.dn { color: var(--red); }
.st-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-card { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.st-card h3 { font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.st-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.st-bar-row .bl { width: 86px; color: var(--text-muted); flex-shrink: 0; }
.st-bar-track { display: block; flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.st-bar-fill { display: block; height: 8px; border-radius: 4px; background: var(--red); }
.st-bar-fill.g { background: var(--graf-seda); }
.st-bar-row .bv { width: 42px; text-align: right; font-weight: 500; }
.st-trend { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.st-trend span { flex: 1; background: var(--red); opacity: .85; border-radius: 2px 2px 0 0; min-height: 2px; }
.st-tbl-scroll { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.st-table th, .st-table td { padding: 7px 8px; border-bottom: 0.5px solid var(--border-strong); white-space: nowrap; }
.st-table th { text-align: left; color: var(--text-muted); font-weight: 500; }
.st-table td.num, .st-table th.num { text-align: right; }
.st-table td a { color: var(--red); text-decoration: none; max-width: 300px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.st-table td a:hover { text-decoration: underline; }
.st-table th.sortable { cursor: pointer; user-select: none; }
.st-table th.sortable:hover { color: var(--red); }
.st-table th.sorted { color: var(--text); font-weight: 600; }
.st-pager { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.st-pager button { border: 0; border-radius: 999px; background: var(--tag-bg); color: var(--text); padding: 5px 11px; cursor: pointer; font-size: 13px; }
.st-pager button:disabled { opacity: .4; cursor: default; }
.st-pager button:not(:disabled):hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.st-section { margin-bottom: 16px; }
.st-idx { display: inline-block; padding: 1px 8px; border-radius: 20px; font-weight: 600; font-size: 11px; }
.st-idx.up { background: var(--ok-bg); color: var(--ok-text); }
.st-idx.mid { background: var(--border); color: var(--text-muted); }
.st-idx.dn { background: var(--red-light); color: var(--red); }
.st-fblink { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.st-fblink:hover { color: var(--red); }


/* --- Tipy pro redakci (tipy/index.php) --- */
.tip-wrap { max-width: 760px; margin: 0 auto; padding: 16px 12px 60px; }
.tip-hint { font-size: 12px; color: var(--text-hint); }
.tip-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--info-bg); color: var(--info-text); font-size: 13px; line-height: 1.55; }
.tip-card { background: var(--surface); border: 0.5px solid var(--glass-edge); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.tip-card h3 { font-size: 14px; margin: 0; }
.tip-card.mine { border-color: var(--red); }
.tip-form input[type=text], .tip-form textarea, .tip-form select { width: 100%; padding: 9px 11px; font-size: 13px; }
.tip-form textarea { min-height: 76px; resize: vertical; }
.tip-form label { font-size: 12px; font-weight: 500; color: var(--text-muted); display: block; margin: 12px 0 5px; }
.tip-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tip-badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.tip-badge.open { background: var(--warn-bg); color: var(--warn-text); }
.tip-badge.done { background: var(--ok-bg); color: var(--ok-text); }
.tip-badge.rejected { background: var(--bg); color: var(--text-muted); }
.tip-web { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--red-light); color: var(--red); white-space: nowrap; }
.tip-meta { font-size: 11.5px; color: var(--text-hint); }
.tip-desc { font-size: 13px; line-height: 1.55; margin: 10px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.tip-file { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--red); text-decoration: none; margin-top: 8px; }
.tip-file-wrap { display: inline-flex; align-items: center; gap: 2px; }
.tip-file-del { display: inline; margin: 0; }
.tip-file-del button { border: 0; background: none; padding: 0 4px; margin-top: 8px; cursor: pointer; font-size: 13px; line-height: 1; color: var(--text-hint); }
.tip-file-del button:hover, .tip-file-del button:focus { color: var(--red); }
.tip-comments { margin-top: 12px; border-top: 0.5px solid var(--border-strong); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tip-comment { background: var(--bg); border-radius: var(--radius-sm); padding: 8px 11px; font-size: 12.5px; line-height: 1.5; }
.tip-comment .who { font-weight: 600; margin-right: 6px; }
.tip-comment .when { color: var(--text-hint); font-size: 11px; }
.tip-comment p { margin: 4px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.tip-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.tip-btn { border: 0; border-radius: 999px; background: var(--tag-bg); color: var(--text); cursor: pointer; font-size: 12px; padding: 6px 12px; }
.tip-btn:hover { background: var(--border-strong); color: var(--text); text-decoration: none; }
.tip-btn.ok:hover { color: var(--ok-text); }
.tip-cform { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tip-cform textarea { flex: 1; min-width: 200px; min-height: 40px; padding: 8px 10px; font-size: 12.5px; resize: vertical; }
.tip-cform input[type=file] { font-size: 11px; max-width: 180px; }
.tip-filter { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; flex-wrap: wrap; }
.tip-filter select { padding: 6px 10px; font-size: 12.5px; }


/* --- PR úkol z CRM do plánu (tlačítko, okno, řádek s vazbou; 23. 9. 2026) --- */
.crm-do-planu {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 3px;
  font-size: 11px; line-height: 1.4; padding: 1px 6px; cursor: pointer;
  border: 1px solid var(--warm-border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--today-accent);
}
.crm-do-planu:hover { border-color: var(--today-accent); }
.article-crm-zdroj { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.crm-novy-termin { display: inline-block; font-size: 11px; font-weight: 600; margin-top: 3px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); }
.crm-plan-popis { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.crm-plan-volba { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; cursor: pointer; }
.crm-plan-volba input[type="time"] { margin-left: 4px; }
.crm-plan-nadpis { font-size: 12px; color: var(--text-muted); margin: 10px 0 2px; }
.crm-plan-nasazeno { margin-top: 10px; padding-left: 0; font-size: 13px; }
#crm-plan-radky { max-height: 220px; overflow-y: auto; }
.crm-plan-chyba { color: var(--err-text); font-size: 13px; margin-top: 10px; }

/* Náhradní volno v Dovolených — jiná barva než dovolená (Matěj 24. 9. 2026). */
.dv-bar.nv { background: var(--ok-bg); color: var(--ok-text); }
.dv-bar.nv.me { box-shadow: inset 0 0 0 1px var(--ok-text); }
.dv-dot-nv { background: var(--ok-text); }
.dv-dot-col { background: var(--info-text); }
.dv-dot-me { background: rgba(208,46,38,.5); }   /* jako .dv-bar.me, jen sytější, ať je v legendě vidět */
.dv-dot-vikend { background: var(--weekend-bg); border: 0.5px solid var(--border-strong); }
