:root {
  /* „Paleta konstrukce“ – jednotný barevný systém interních appek TallGuys. */
  --tg-fog: #f2f2f0;
  --tg-cement: #dcdcd8;
  --tg-mist: #9aa3b0;
  --tg-slate: #2c3038;
  --tg-ink: #141619;
  --tg-accent: #3e6c9b;
  --tg-accent-light: #79a9db;

  --ink: var(--tg-ink);
  --ink-soft: var(--tg-slate);
  --paper: var(--tg-fog);
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --border: var(--tg-cement);
  --border-strong: var(--tg-mist);
  --text: var(--tg-slate);
  --text-muted: color-mix(in srgb, var(--tg-slate) 65%, var(--tg-fog) 35%);
  --heading: var(--tg-ink);
  --accent: var(--tg-accent);
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --success: #2e7d4f;
  --shadow: 0 1px 2px rgba(20, 18, 12, 0.04), 0 6px 16px rgba(20, 18, 12, 0.04);
  --radius: 3px;
  --chrome-accent: var(--tg-accent-light);
  --weekend: rgba(44, 48, 56, 0.05);
  --today: #e0722a;
  --grid-line: #e6e6e2;
  --month-line: var(--tg-mist);

  /* Barvy záznamů (pastelové jako v tabulce, tmavý text). */
  --c-blue-bg: #cfe0f6;   --c-blue-fg: #1c3a5e;
  --c-green-bg: #cfe9d3;  --c-green-fg: #1d4b2a;
  --c-yellow-bg: #fbeeb0; --c-yellow-fg: #5a4a05;
  --c-orange-bg: #fbd9b4; --c-orange-fg: #6b3a08;
  --c-red-bg: #f5c6c2;    --c-red-fg: #6b1d16;
  --c-pink-bg: #f6cfe0;   --c-pink-fg: #6b1f45;
  --c-purple-bg: #dfd3f3; --c-purple-fg: #3d2a6b;
  --c-teal-bg: #c6ebe7;   --c-teal-fg: #124d47;
  --c-gray-bg: #dedede;   --c-gray-fg: #3a3a3a;
  --c-brown-bg: #e6d7c8;  --c-brown-fg: #4f3620;

  --label-w: 230px;
  --day-w: 30px;
  --lane-h: 30px;
}

/* Tmavý motiv: automaticky podle systému (prefers-color-scheme), pokud uživatel v appce
   ručně nevybral konkrétní motiv (přepínač v topbaru, viz #themeToggle v app.js – ukládá
   volbu do localStorage a nastaví <html data-theme="light|dark">, což má vždy přednost). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: var(--tg-ink);
    --surface: var(--tg-slate);
    --surface-2: #23262c;
    --border: #3a3f48;
    --border-strong: var(--tg-mist);
    --text: #d5d9e0;
    --text-muted: var(--tg-mist);
    --heading: var(--tg-fog);
    --accent: var(--tg-accent-light);
    --accent-ink: var(--tg-ink);
    --danger: #e5675f;
    --success: #6fc08f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.35);
    --weekend: rgba(255, 255, 255, 0.05);
    --grid-line: #33373f;
    --month-line: #7d8592;

    --c-blue-bg: #2b4d75;   --c-blue-fg: #dbe8fa;
    --c-green-bg: #2c5b3a;  --c-green-fg: #d8f0dd;
    --c-yellow-bg: #6e5c12; --c-yellow-fg: #fbefb8;
    --c-orange-bg: #7a4a1c; --c-orange-fg: #fce0c2;
    --c-red-bg: #7a2b25;    --c-red-fg: #f9d3cf;
    --c-pink-bg: #74305a;   --c-pink-fg: #f8d6e6;
    --c-purple-bg: #4a3a7c; --c-purple-fg: #e4daf8;
    --c-teal-bg: #1f5c56;   --c-teal-fg: #cdefeb;
    --c-gray-bg: #4a4e56;   --c-gray-fg: #e4e4e4;
    --c-brown-bg: #5c432c;  --c-brown-fg: #ecdccb;
  }
}

/* Stejné proměnné jako výše, ale aktivní i na systému se světlým motivem – pro ruční volbu
   "Tmavý" v přepínači bez ohledu na to, co si zrovna žádá OS. */
:root[data-theme="dark"] {
  --paper: var(--tg-ink);
  --surface: var(--tg-slate);
  --surface-2: #23262c;
  --border: #3a3f48;
  --border-strong: var(--tg-mist);
  --text: #d5d9e0;
  --text-muted: var(--tg-mist);
  --heading: var(--tg-fog);
  --accent: var(--tg-accent-light);
  --accent-ink: var(--tg-ink);
  --danger: #e5675f;
  --success: #6fc08f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.35);
  --weekend: rgba(255, 255, 255, 0.05);
  --grid-line: #33373f;
  --month-line: #7d8592;

  --c-blue-bg: #2b4d75;   --c-blue-fg: #dbe8fa;
  --c-green-bg: #2c5b3a;  --c-green-fg: #d8f0dd;
  --c-yellow-bg: #6e5c12; --c-yellow-fg: #fbefb8;
  --c-orange-bg: #7a4a1c; --c-orange-fg: #fce0c2;
  --c-red-bg: #7a2b25;    --c-red-fg: #f9d3cf;
  --c-pink-bg: #74305a;   --c-pink-fg: #f8d6e6;
  --c-purple-bg: #4a3a7c; --c-purple-fg: #e4daf8;
  --c-teal-bg: #1f5c56;   --c-teal-fg: #cdefeb;
  --c-gray-bg: #4a4e56;   --c-gray-fg: #e4e4e4;
  --c-brown-bg: #5c432c;  --c-brown-fg: #ecdccb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, button, input, select, textarea {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
h1, h2, h3 { color: var(--heading); }
a { color: var(--accent); }

/* ---- Topbar ---- */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-soft);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-right: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; color: #fff; }
.brand-text strong { font-size: 14px; letter-spacing: 0.04em; }
.brand-text span { font-size: 11px; color: #a9a89f; letter-spacing: 0.06em; }

.tabs { display: flex; gap: 4px; }

.tab {
  background: transparent;
  border: 1px solid transparent;
  color: #c9ccd3;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tab:hover { color: #fff; border-color: #3a3a42; }
.tab.active { color: #fff; background: #2a2e36; border-color: #3a3f48; }

.topbar-spacer { flex: 1; }
/* Mobil (2026-11-02): užší lišta, ať se logo + ☰ + ikony vejdou na 390 px. */
@media (max-width: 640px) { .topbar { padding: 8px 10px; gap: 8px; } }

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #3a3a42;
  color: #e7e5dc;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-btn:hover { border-color: var(--chrome-accent); color: #fff; }
.topbar-btn.icon { padding: 8px 10px; }
@media (pointer: coarse) { .topbar-btn { min-height: 40px; } }

.bell-wrap { position: relative; }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  min-width: 15px; height: 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.bell-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 150;
  width: 420px; max-width: calc(100vw - 24px); max-height: calc(100vh - 76px); overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.bell-head { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 8px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.bn-headrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bn-headrow strong { letter-spacing: .08em; text-transform: uppercase; }
.bell-head strong { color: var(--text); font-weight: 800; }
.bell-head .link { text-transform: none; letter-spacing: 0; }
.bell-list { overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 6px; display: flex; flex-direction: column; gap: 2px; }
.bell-item { position: relative; padding: 10px 10px 10px 8px; border-radius: var(--radius); cursor: pointer; }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.bell-item.unread:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.bell-item .chip { font-size: 11px; padding: 1px 6px; margin: 0; }
/* Malé ikonky po najetí (stejně jako tg-topbar.js): Připomenout později, (Ne)přečtené, Archivovat */
/* Lišta plave NAD řádkem přes jeho horní hranu (jako ve Slacku) – titulek neuskakuje ani se nepřekrývá (owner 2026-10-22). */
.bell-acts { position: absolute; top: -17px; right: 8px; z-index: 3; display: none; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.bell-item:hover .bell-acts, .bell-acts.choosing { display: inline-flex; }
.bell-act { width: 28px; height: 28px; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.bell-act svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell-act:hover, .bell-choice:hover { background: var(--surface-2); color: var(--text); }
.bell-choice { border: none; background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: var(--text); padding: 5px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.bell-choice.bell-close { padding: 5px 7px; font-size: 15px; line-height: 1; color: var(--text-muted); }
.bell-foot { border-top: 1px solid var(--border); padding: 4px 0; display: flex; flex-direction: column; }
.bell-foot:empty { display: none; }
.bell-foot-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: none; border: none; font: inherit; font-size: 13px; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; }
.bell-foot-item:hover { background: var(--surface-2); }
.bell-foot-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
/* Notion-like řádek notifikace (2026-11-04) */
.bn-filters { display: flex; gap: 4px; }
.bn-filter { border: 1px solid var(--border); background: transparent; color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.bn-filter:hover { color: var(--text); background: var(--surface-2); }
.bn-filter.active { background: var(--text); border-color: var(--text); color: var(--surface); }
.bn-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: 10.5px; line-height: 1; padding: 2px 5px; }
.bn-section { font-size: 11.5px; font-weight: 700; color: var(--text-muted); padding: 12px 10px 4px; }
.bn-item { display: flex; gap: 10px; align-items: flex-start; }
.bn-av-wrap { position: relative; flex: 0 0 auto; width: 30px; height: 30px; margin-top: 1px; }
.bn-av { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.bn-av.sys { background: var(--surface-2); color: var(--text-muted); }
.bn-av.sys svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bn-badge { position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); border: 2px solid var(--surface); }
.bn-badge svg, .bn-ev-ic svg, .bn-tag svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bn-badge.k-mention { background: var(--accent); color: #fff; }
.bn-badge.k-comment { background: #3b82f6; color: #fff; }
.bn-badge.k-assigned { background: #16a34a; color: #fff; }
.bn-at-glyph { font-size: 10px; font-weight: 800; line-height: 1; }
.bn-main { flex: 1 1 auto; min-width: 0; }
.bn-top { display: flex; align-items: flex-start; gap: 8px; }
.bn-head { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--text-muted); }
.bn-head b { color: var(--text); font-weight: 700; }
.bn-time { flex: 0 0 auto; font-size: 11.5px; color: var(--text-muted); padding-top: 1px; }
.bn-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; margin-top: 5px; }

.bn-title { display: flex; align-items: flex-start; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--text); margin-top: 2px; line-height: 1.3; }
.bn-title svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: var(--text-muted); stroke-width: 1.8; stroke-linejoin: round; }
.bn-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.bn-chips .chip { font-size: 11px; padding: 1px 6px; margin: 0; }
.bn-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-muted); }
.bn-tag.at { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent); }
.bn-quote { margin-top: 6px; padding: 2px 0 2px 9px; border-left: 2px solid var(--border-strong); font-size: 12.5px; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.bn-quote b { font-weight: 700; color: var(--text-muted); }
.bn-at { color: var(--accent); font-weight: 600; }
.bn-at.me { color: #e8913a; }
.bn-ev { display: flex; align-items: flex-start; gap: 6px; margin-top: 5px; font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.bn-ev-tx { min-width: 0; flex: 1 1 auto; }
.bn-ev-tx .chip { font-size: 11px; padding: 1px 6px; margin: 0; vertical-align: middle; }
.bn-ev-ic { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); margin-top: 1px; }
.bn-more { margin-top: 5px; font-size: 11.5px; color: var(--text-muted); }
.bell-later { padding: 6px 14px; font-size: 11.5px; color: var(--text-muted); }
.bell-empty { padding: 24px 10px; text-align: center; color: var(--text-muted); font-size: 12.5px; }

.year-nav { display: flex; align-items: center; gap: 2px; }
.year-nav .year { color: #fff; font-weight: 800; font-size: 16px; min-width: 60px; text-align: center; letter-spacing: 0.02em; }
/* Přesunuté ze tmavého topbaru do světlého panelu nástěnky (2026-09) – bílý text ze
   staré dark-only definice by tu byl neviditelný. */
.board-year-nav .year { color: var(--heading); }

/* ---- Obecné komponenty ---- */

main { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.page { padding: 24px 28px 60px; max-width: 2000px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 20px; }
.page-head p { margin: 0; color: var(--text-muted); font-size: 13.5px; max-width: 900px; line-height: 1.5; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
@media (max-width: 640px) { .card { padding: 14px 12px; } }
.card h2 { margin: 0 0 4px; font-size: 15px; }
.card .hint { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.card.collapsible summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card.collapsible summary::-webkit-details-marker { display: none; }
.card.collapsible summary::marker { display: none; content: ''; }
.card.collapsible summary::before { content: '▸'; color: var(--text-muted); font-size: 12px; transition: transform 0.15s ease; }
.card.collapsible[open] summary::before { transform: rotate(90deg); }
.card.collapsible summary h2 { margin: 0; }
.card.collapsible[open] summary { margin-bottom: 4px; }
.card.collapsible > .hint, .card.collapsible > .raw-list, .card.collapsible > .rows-editor, .card.collapsible > .inline-actions { margin-top: 12px; }

button.primary, button.secondary, button.danger {
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: filter 0.15s ease, border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
button.primary { background: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.05); }
button.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
button.secondary:hover { border-color: var(--accent); color: var(--accent); }
button.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
button.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
@media (pointer: coarse) { button.primary, button.secondary, button.danger { min-height: 40px; } }
/* Akce, které na desktopu dělá myš (tažení, pravé tlačítko) – na dotyku tlačítko (2026-11-02). */
.touch-only, div.field.touch-only { display: none; }
@media (pointer: coarse), (max-width: 640px) { button.touch-only { display: inline-flex; } div.field.touch-only { display: flex; } p.touch-only { display: block; } .touch-hide { display: none; } }
button:disabled { opacity: 0.55; cursor: default; }
button.link { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 13px; font-weight: 600; }
button.link.small { font-size: 11.5px; }
button.link.danger { color: var(--danger); }

.comment-list { display: flex; flex-direction: column; gap: 22px; margin-top: 14px; }
.comment-thread { display: flex; flex-direction: column; gap: 12px; }
.comment-reply-slot:empty { display: none; }
.comment-reply-box { margin-left: 38px; }
.comment-item { position: relative; display: flex; gap: 10px; align-items: flex-start; }
/* čára vlákna mezi avatary (jako Notion) */
.comment-thread > .comment-item:not(:nth-last-child(2))::before { content: ''; position: absolute; left: 13px; top: 32px; bottom: -10px; width: 1.5px; background: var(--border); }
.comment-av { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; }
.comment-body { flex: 1 1 auto; min-width: 0; padding-top: 3px; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.comment-time { font-size: 12px; color: var(--text-muted); }
.comment-head strong { font-size: 13.5px; }
.comment-head-acts { margin-left: auto; display: inline-flex; gap: 10px; opacity: 0; transition: opacity .12s; }
.comment-item:hover .comment-head-acts, .comment-head-acts:focus-within { opacity: 1; }
@media (hover: none) { .comment-head-acts { opacity: 1; } }
.comment-reply-btn { color: var(--text-muted); }
.comment-reply-btn:hover { color: var(--text); }
.comment-text { font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
/* Notion-styl vstupní řádek komentáře: avatar | rostoucí textarea | ikonky | odeslat, vše
   v jedné zaoblené pilulce (2026-09-30). */
.comment-add-row {
  display: flex; gap: 6px; align-items: center; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); padding: 5px 6px;
}
.comment-add-row:focus-within { border-color: var(--border-strong); }
.comment-avatar {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  color: var(--text-muted); font-size: 10px; font-weight: 800; display: inline-flex;
  align-items: center; justify-content: center;
}
.comment-add-row textarea {
  flex: 1 1 auto; min-width: 0; min-height: 22px; max-height: 140px; resize: none; border: 0;
  background: transparent; padding: 3px 2px; font-size: 13px; line-height: 1.4; overflow-y: auto;
}
.comment-add-row textarea:focus { outline: none; }
.comment-icon-btn {
  flex: 0 0 auto; border: 0; background: none; color: var(--text-muted); cursor: pointer;
  font-size: 14px; width: 26px; height: 26px; border-radius: var(--radius); display: inline-flex;
  align-items: center; justify-content: center;
}
.comment-icon-btn:hover { background: var(--surface); color: var(--text); }
.comment-send-btn {
  flex: 0 0 auto; border: 0; background: var(--heading); color: var(--surface); cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 800;
}
.comment-send-btn:hover { filter: brightness(1.1); }

input[type="text"], input[type="date"], input[type="number"], select, textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 10px;
  font-size: 13.5px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
/* iOS při fokusu zoomuje pole s písmem pod 16 px. */
@media (max-width: 640px) { input[type="text"], input[type="date"], input[type="number"], select, textarea { font-size: 16px; } }

label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.cat-picker-add-row { display: flex; gap: 8px; align-items: center; }
.cat-picker-add-row .cat-picker { flex: 1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--success);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast.error { background: var(--danger); }

.update-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  max-width: calc(100vw - 32px);
}
.update-banner button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.update-banner button:hover { filter: brightness(1.08); }

.app-tooltip {
  position: fixed;
  z-index: 200;
  max-width: 320px;
  padding: 7px 10px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  white-space: pre-line;
}
.app-tooltip.show { opacity: 1; transform: translateY(0); }

/* Ikonka "i" s vysvětlivkou na hover (2026-10-01) – náhrada za stálý `<p class="muted
   small">` popisek pod polem; text se zobrazí přes stejný tooltip systém výš. */
.info-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--border-strong); color: var(--text-muted);
  font-size: 10px; font-style: italic; font-family: Georgia, serif; line-height: 1;
  cursor: help; margin-left: 5px; transition: color 0.15s ease, border-color 0.15s ease;
}
.info-ico:hover { color: var(--heading); border-color: var(--heading); }

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table th { color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; }
table.data-table tbody tr:hover { background: var(--surface-2); }
table.data-table td.num, table.data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

table.data-table tr.cat-family-row td { background: var(--surface-2); border-bottom: none; padding: 7px 8px; }
table.data-table tr.cat-family-row:hover td { background: var(--surface-2); }
table.data-table tr[data-cat-row] { cursor: default; user-select: none; }
table.data-table .cat-row-cell { display: flex; align-items: center; gap: 6px; }
table.data-table .cat-row-handle { color: var(--text-muted); font-size: 14px; padding: 0 2px; flex: none; cursor: grab; }
table.data-table tr[data-cat-row].row-selected td { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
table.data-table tr[data-cat-row].row-selected:hover td { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
table.data-table tr[data-cat-row].drop-target td { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); outline: 2px dashed var(--accent); outline-offset: -2px; }
table.data-table tr.cat-family-member td:first-child { padding-left: 20px; }
.cat-family-merge { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.cat-family-merge .cat-family-target { width: auto; min-width: 200px; padding: 5px 8px; font-size: 12.5px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  margin: 2px 4px 2px 0;
  white-space: nowrap;
}
.chip small { font-weight: 500; opacity: 0.8; }
/* Mobil: dlouhý název kategorie ve štítku se zalomí místo přetečení stránky. */
@media (max-width: 640px) { .chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; } }
.chip-x { border: 0; background: none; cursor: pointer; padding: 0; margin: 0 0 0 2px; font-size: 13px; line-height: 1; color: inherit; opacity: 0.6; }
.chip-x:hover { opacity: 1; }
/* Řazení prvků (řádků nabídky možností) v "Upravit řádek". */
.opt-row.drag-over { outline: 2px dashed var(--border-strong); outline-offset: 1px; }
.opt-editor { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.opt-editor h4 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.opt-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.opt-row .opt-handle { cursor: grab; color: var(--text-muted); user-select: none; padding: 0 2px; }
.opt-row input[type="text"] { flex: 1 1 auto; min-width: 0; padding: 3px 6px; font-size: 12px; }
.opt-row input.opt-emoji { flex: 0 0 52px; }
.opt-row .opt-color { width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--border-strong); cursor: pointer; flex: 0 0 auto; }
.opt-row .opt-remove { border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 0 4px; }
.opt-row .opt-remove:hover { color: var(--danger, #c0392b); }
.opt-row .opt-mv { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0; align-items: center; justify-content: center; border-radius: 4px; }
@media (pointer: coarse) {
  .opt-row .opt-handle { display: none; }
  .opt-row .opt-mv, .opt-row .opt-remove { min-width: 40px; min-height: 40px; flex: 0 0 auto; }
  .opt-row .opt-color { width: 28px; height: 28px; }
}
.opt-editor .opt-actions { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.opt-editor .opt-actions .muted { margin-left: auto; }
/* Skupiny Stavu (To-do/In progress/Complete, 2026-10-02) – pevné, rozklikávací karty
   místo dřívějšího volného textového pole "Skupina" u každé položky (uživatel: „chci,
   abychom viděli rozdělené to-do, progress, complete + tyto 3 byly předem rozklikávací").
   Stejný vizuální vzor jako .card.collapsible (šipka ▸ u summary), jen menší měřítko. */
.opt-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 8px; background: var(--surface); margin-bottom: 6px; }
.opt-group.drag-over { outline: 2px dashed var(--border-strong); outline-offset: 1px; }
.opt-group summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; }
.opt-group summary::-webkit-details-marker { display: none; }
.opt-group summary::marker { display: none; content: ''; }
.opt-group summary::before { content: '▸'; color: var(--text-muted); font-size: 10px; transition: transform 0.15s ease; }
.opt-group[open] summary::before { transform: rotate(90deg); }
.opt-group-label { flex: 1; }
.opt-group-rows { margin-top: 4px; }
.opt-group .link { margin-top: 2px; }
.chip-toggle-row { display: flex; flex-wrap: wrap; }
button.chip-toggle { border: 1px solid transparent; cursor: pointer; opacity: 0.45; transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
button.chip-toggle.selected { opacity: 1; border-color: color-mix(in srgb, currentColor 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent); }
button.chip-toggle:hover { opacity: 0.75; }
button.chip-toggle.selected:hover { opacity: 1; }
.checkbox-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; color: var(--text); }
.checkbox-row input { width: auto; }
.chip.c-blue { background: var(--c-blue-bg); color: var(--c-blue-fg); }
.chip.c-green { background: var(--c-green-bg); color: var(--c-green-fg); }
.chip.c-yellow { background: var(--c-yellow-bg); color: var(--c-yellow-fg); }
.chip.c-orange { background: var(--c-orange-bg); color: var(--c-orange-fg); }
.chip.c-red { background: var(--c-red-bg); color: var(--c-red-fg); }
.chip.c-pink { background: var(--c-pink-bg); color: var(--c-pink-fg); }
.chip.c-purple { background: var(--c-purple-bg); color: var(--c-purple-fg); }
.chip.c-teal { background: var(--c-teal-bg); color: var(--c-teal-fg); }
.chip.c-gray { background: var(--c-gray-bg); color: var(--c-gray-fg); }
.chip.c-brown { background: var(--c-brown-bg); color: var(--c-brown-fg); }

/* ---- Nástěnka (kalendářní mřížka) ---- */

.board-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.board-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
  font-size: 13px;
}
.board-toolbar .legend { display: flex; gap: 10px; flex-wrap: wrap; color: var(--text-muted); font-size: 12px; }
.board-toolbar .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.board-toolbar .legend .l-weekend::before { background: var(--weekend); border: 1px solid var(--border); }
.board-toolbar .legend .l-today::before { background: var(--today); }
.board-toolbar .legend .l-auto::before { background: var(--surface-2); border: 1px dashed var(--border-strong); }
.board-toolbar .spacer { flex: 1; }
.board-toolbar label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12.5px; cursor: pointer; }
.board-toolbar select { width: auto; padding: 6px 8px; font-size: 12.5px; }
@media (max-width: 640px) { .board-toolbar { padding: 8px 10px; gap: 6px; } }
.view-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 3px; overflow: hidden; }
.view-switch button { border: 0; border-right: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); font: inherit; font-size: 12.5px; padding: 6px 14px; cursor: pointer; }
.view-switch button:last-child { border-right: 0; }
.view-switch button:hover:not(.active) { background: var(--surface-2); }
.view-switch button.active { background: var(--accent); color: #fff; font-weight: 600; }
@media (pointer: coarse) { .view-switch button { min-height: 40px; } }
@media (max-width: 640px) { .view-switch button { padding: 6px 10px; } }

.board-scroll {
  flex: 1;
  overflow: auto;
  position: relative;
  background: var(--surface);
  user-select: none;
}

/* padding-bottom (2026-10-03, uživatel: „poslední řádek je blbě vidět"): Nástěnka končila
   přesně na spodní hraně okna a overlay posuvník na Macu (vodorovný) se kreslil přes
   poslední řádek – vybledlý a useknutý. Volné místo pod ním = jde vždy celý odscrollovat. */
.board { position: relative; width: max-content; min-width: 100%; padding-bottom: 28px; }

/* Hlavička: jediný sticky kontejner (ne stovky sticky buněk). */
.board-head {
  position: sticky;
  top: 0;
  z-index: 46;
  display: flex;
  background: var(--surface-2);
}
.corner {
  position: sticky;
  left: 0;
  z-index: 48;
  flex: 0 0 var(--label-w);
  width: var(--label-w);
  background: var(--surface-2);
  border-right: 2px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.corner strong { color: var(--heading); font-size: 13px; }
.head-cols { display: flex; flex-direction: column; }
.head-months, .head-days, .head-wds { display: flex; }
.hdr {
  flex: 0 0 var(--day-w);
  width: var(--day-w);
  border-right: 1px solid var(--grid-line);
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
}
.hdr.month {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  color: var(--heading);
  height: 34px;
  border-right: 2px solid var(--month-line);
  border-bottom: 1px solid var(--border);
  justify-content: flex-start;
  padding-left: 10px;
}
.hdr.month.has-note { cursor: pointer; }
.hdr.month .note-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; }
.hdr.day { height: 24px; font-weight: 700; color: var(--text); }
.hdr.wd { height: 20px; font-size: 10px; text-transform: lowercase; border-bottom: 2px solid var(--border-strong); }
.hdr.day.weekend, .hdr.wd.weekend { background: color-mix(in srgb, var(--surface-2) 80%, var(--tg-mist) 20%); }
.hdr.day.today { background: var(--today); color: #fff; }
.hdr.day.month-end, .hdr.wd.month-end { border-right: 2px solid var(--month-line); }

/* Tělo: řádek = štítek (sticky vlevo) + dráha s absolutně pozicovanými pruhy. */
.brow { display: flex; }
.row-label {
  position: sticky;
  left: 0;
  z-index: 45;
  flex: 0 0 var(--label-w);
  width: var(--label-w);
  background: var(--surface);
  border-right: 2px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--heading);
  overflow: hidden;
  white-space: nowrap;
  cursor: default;
}
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.row-label .lbl { overflow: hidden; text-overflow: ellipsis; }
.row-label.auto .lbl { font-weight: 600; }
.row-label .auto-tag { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); border: 1px dashed var(--border-strong); padding: 1px 5px; border-radius: 2px; }
/* Odpovědné osoby/role za řádek (row.owners, pole – 2026-10-01 jde přiřadit víc najednou,
   uživatel: „chci aby tam šlo přiřadit více lidí") – badge vedle názvu, klik otevře výběr
   (openSelectPopover, multi). Víc vybraných = stoh překrývajících se koleček (Notion-styl).
   Prázdné kolečko s "+" = řádek zatím nemá nikoho přiřazeného. */
.row-owner-badge {
  flex: 0 0 auto; display: inline-flex; align-items: center; cursor: pointer; font-weight: 800;
}
/* Mobil: úzký sloupec názvů (112 px) – odznaky osob schovat, ať je vidět název řádku. */
@media (max-width: 640px) { .row-owner-badge { display: none; } }
.row-owner-avatar {
  width: 18px; height: 18px; border-radius: 50%; font-size: 9px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  border: 1.5px solid var(--surface);
}
.row-owner-avatar + .row-owner-avatar { margin-left: -6px; }
/* Role (skupina lidí, viz Nastavení → Role) se od jednotlivého člověka vizuálně odliší
   hranatějším odznakem (čtvereček místo kolečka) – stejná barva/iniciály logika. */
.row-owner-avatar.role { border-radius: 5px; }
.row-owner-empty {
  width: 18px; height: 18px; border-radius: 50%; justify-content: center;
  border: 1px dashed var(--border-strong); color: var(--text-muted); font-size: 12px; opacity: 0.6;
}
.row-owner-empty:hover { opacity: 1; border-color: var(--heading); color: var(--heading); }
.group-rename-pop {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); padding: 8px; display: flex; gap: 6px; min-width: 220px;
}
.group-rename-pop input { flex: 1 1 auto; min-width: 0; }
/* Vlajky trhů na pruhu záznamu (modul "Stát", entry.props.markets) – vždy vidět, i u úzkého
   pruhu mají přednost před useknutím textu (flex: 0 0 auto). */
/* Vlajky trhů na pruhu: velké a výrazné (vlastní podklad), vždy hned za názvem – název
   a vlajky drží pohromadě v .entry-head (viz attachEntryMarketFlags v app.js). */
.entry .entry-head { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.entry .entry-head .etext { flex: 0 1 auto; }
.entry:hover .entry-head { overflow: visible; flex: 0 0 auto; }
.entry.rich .entry-head { width: 100%; flex: 0 0 auto; }
.entry.rich .entry-head .etext { width: auto; max-width: 100%; }
.entry .entry-flags {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
  font-size: 17px; line-height: 1; padding: 1px 4px; border-radius: 4px;
  background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 40%, transparent);
}

.group-label {
  position: sticky;
  left: 0;
  z-index: 45;
  flex: 0 0 var(--label-w);
  width: var(--label-w);
  height: 22px;
  background: var(--surface-2);
  border-right: 2px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.group-track {
  flex: 0 0 auto;
  height: 22px;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border-strong);
}

.row-track {
  position: relative;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  cursor: crosshair;
  /* svislé čáry dnů + víkendy jako opakující se gradient – žádné DOM buňky */
  background-image:
    var(--weekend-gradient),
    repeating-linear-gradient(to right, transparent 0, transparent calc(var(--day-w) - 1px), var(--grid-line) calc(var(--day-w) - 1px), var(--grid-line) var(--day-w));
}
.row-track.auto { cursor: default; }
.row-track:not(.auto):hover { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }

/* Zvýraznění sloupce: pod myší (jako řádek) a označený klikem na datum v hlavičce. */
.col-mark { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 1; }
.col-mark.hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.col-mark.pin {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--accent) 45%, transparent), inset -1px 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
}
.hdr[data-col] { cursor: pointer; }
.board-head .hdr.col-pinned { background: var(--accent); color: #fff; }

.month-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--month-line);
  pointer-events: none;
  z-index: 1;
}
.today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--today);
  opacity: 0.8;
  pointer-events: none;
  z-index: 2;
}

.sel-bar {
  position: absolute;
  top: 4px;
  height: calc(var(--lane-h) - 8px);
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  z-index: 2;
  pointer-events: none;
}

.entry {
  position: absolute;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  height: calc(var(--lane-h) - 6px);
  overflow: hidden;
  cursor: pointer;
  z-index: 3;
  /* Vždy vidět, ne jen na hover – jinak dva stejnobarevné záznamy hned vedle sebe
     (typicky konec jedné akce a hned začátek další) splynou v jeden pruh a nejde
     poznat, že jde o dva různé záznamy. */
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  box-shadow: 0 0 0 2px var(--surface);
  /* Flex řádek (text zmenšitelný s vlastní elipsou + badge Stav/Platforma napevno vedle) –
     obyčejné text-overflow:ellipsis přímo na .entry by u smíšeného obsahu (text + badge)
     nespolehlivě překreslilo/schovalo badge, i když měl podle layoutu být v viditelné části. */
  display: flex;
  align-items: center;
}
.entry:hover { filter: brightness(0.96); border-color: color-mix(in srgb, currentColor 55%, transparent); }
/* Najetí myší ukáže celý obsah pruhu, i když je jinak useknutý elipsou (úzký den) nebo
   zmáčknutý na tečku (COMPACT_BADGE_WIDTH v app.js) – "vyskočí" nad okolí (vyšší z-index),
   nezmění výšku, jen šířku podle obsahu. .row-track/.board-scroll nemají overflow:hidden,
   takže se to neořízne, jen to případně zaleze do sousedního dne/týdne vizuálně. */
.entry:hover { z-index: 40; min-width: max-content !important; max-width: calc(100vw - 40px); }
/* z-index 40 tu je vysoko schválně (viz komentář výš), ale sticky levý sloupec (.row-label/
   .group-label/.corner) musí zůstat NAD tím vždycky viditelný – jinak by u záznamu blízko
   levého okraje viditelné oblasti hover-rozšíření (viz výš) přerostlo pod sticky sloupec
   a překrylo název řádku (past bug, uživatel si všiml napravo přeplněné oblasti). */
.entry:hover .etext { white-space: nowrap; overflow: visible; text-overflow: clip; flex: 0 0 auto; width: auto; }
.entry:hover .ebadge.dot { width: auto; height: auto; min-width: 0; border-radius: 3px; padding: 3px 6px; }
.entry:hover .ebadge.dot::after { content: attr(data-full); margin-left: 3px; font-size: 10.5px; }
/* URL uložená v záznamu (props.url) se jinak nezobrazuje (nezabírá místo v úzkém pruhu) –
   při najetí myší (.entry se roztáhne, viz výš) se ukáže jako krátký klikatelný odkaz
   (jen hostname, ne celá adresa), klik ho otevře v nové záložce. */
.entry-url { display: none; }
.entry:hover .entry-url {
  display: inline-block; margin-left: 6px; font-size: 10.5px; color: inherit;
  text-decoration: underline; opacity: 0.85; white-space: nowrap; flex: 0 0 auto;
}
.entry-url:hover { opacity: 1; }
.entry.auto { cursor: default; border: 1px dashed color-mix(in srgb, currentColor 35%, transparent); font-weight: 500; }
.entry.auto:hover { filter: none; }
/* Auto blok žebříčku Produktů jde s právem úprav rozkliknout (openRankingEditor). */
.entry.auto.rank-editable { cursor: pointer; }
.entry.auto.rank-editable:hover { border-style: solid; }
.ranking-pop { width: 440px; max-width: calc(100vw - 16px); display: flex; flex-direction: column; gap: 8px; }
.ranking-pop-head { font-size: 13px; }
.ranking-pop-head .badge { margin-left: 6px; }
.ranking-pop-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.ranking-pop-sub { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
.ranking-pop .cat-picker, .ranking-pop .cat-picker-input { width: 100%; }
.ranking-pop .chip.removed { opacity: 0.65; text-decoration: line-through; }
.ranking-pop .chip.removed .chip-x { text-decoration: none; }
.lbl-edit { border: 0; background: none; cursor: pointer; padding: 0 3px; font-size: 11px; line-height: 1; color: var(--text-muted); vertical-align: middle; }
.lbl-edit:hover { color: var(--text); }
.month-card .chip.manual { border-style: dashed; }
.merge-rules { margin: 4px 0 12px; }
.merge-rules-head { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.merge-rules .chip em { font-style: normal; opacity: 0.8; }
.entry.single { padding: 0 3px; justify-content: center; }
.entry.editable { cursor: grab; }
.entry.editable:active { cursor: grabbing; }
.entry.duplicating { cursor: copy; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
/* Option/Alt-tažení: originál zůstává na místě jako průhledný „duch“, táhne se kopie. */
.entry.dup-ghost { opacity: 0.45; pointer-events: none; }
.entry .etext { flex: 1 1 auto; min-width: 28px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; will-change: transform; }
.hdr.month .mtext { display: inline-block; will-change: transform; }
.entry .entry-badges { flex: 0 1 auto; overflow: hidden; }
/* Platforma/Schvalování (2026-10-02, uživatel: „Stav aby se ukazoval vždy, ostatní stačí,
   až když dám hover") – na rozdíl od Stavu (attachEntryStatusDot, vždy vidět v
   .entry-head) se tyhle dva kreslí pořád (zachovává layout/výšku řádku beze změny), jen
   zůstanou neviditelné, dokud na záznam nenajedeš myší. */
.entry .entry-badges { display: none; }
.entry:hover .entry-badges { display: inline-flex; }
/* Řádky IG/FB/YT/TT a Newslettery (RICH_ROW_IDS) – text, Stav a Platforma každý na svém
   řádku (výška pruhu je pro tyhle řádky vyšší, viz RICH_LANE v app.js), ať jsou Stav a
   Platforma vždy čitelné, ne zmáčklé vedle textu na jedné lince. */
.entry.rich { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 5px 8px; }
.entry.rich .etext { flex: 0 0 auto; width: 100%; }
.entry.rich .entry-badges { flex-direction: column; align-items: flex-start; gap: 3px; margin-left: 0; width: 100%; overflow: visible; }
.entry.rich .ebadge-group { flex-wrap: wrap; }
/* Moc úzký pruh (viz COMPACT_BADGE_WIDTH v app.js) na popisky nemá místo – Stav/Platforma se
   pak zmenší na malé barevné tečky, ale i tak zůstávají pod sebou (ne vedle sebe), aby šly
   od sebe rozeznat. Plný popisek je v title (hover). */
.ebadge.dot { width: 8px; height: 8px; min-width: 8px; padding: 0; border-radius: 50%; }
.ebadge.dot.empty { background: rgba(255, 255, 255, 0.35); }

/* Úchyty pro natažení začátku/konce záznamu myší. */
.entry .rhandle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
  z-index: 1;
}
.entry .rhandle.left { left: 0; }
.entry .rhandle.right { right: 0; }
.entry .rhandle:hover { background: rgba(0, 0, 0, 0.12); }
.row-track.drop-target { background-color: color-mix(in srgb, var(--accent) 10%, transparent); outline: 2px dashed var(--accent); outline-offset: -2px; }

/* Kompaktní zobrazení jen po měsících. */
.hdr.month.compact { border-right: 1px solid var(--border); justify-content: center; padding-left: 0; }
.hdr.month.compact.today { background: color-mix(in srgb, var(--today) 18%, var(--surface-2)); }
.row-track.month-track { background-image: none; }
.row-track.month-track:hover { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }

.head-weeknums, .head-weekranges { display: flex; }
.hdr.weeknum { flex: 0 0 auto; height: 22px; font-size: 13px; font-weight: 700; color: var(--text); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hdr.weekrange { flex: 0 0 auto; height: 18px; font-size: 10.5px; font-style: italic; color: var(--text-muted); border-right: 1px solid var(--border); border-bottom: 2px solid var(--border-strong); }
.hdr.weeknum.today, .hdr.weekrange.today { background: color-mix(in srgb, var(--today) 18%, var(--surface-2)); }
.row-track.week-track { background-image: none; }
.row-track.week-track:hover { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.entry.c-blue { background: var(--c-blue-bg); color: var(--c-blue-fg); }
.entry.c-green { background: var(--c-green-bg); color: var(--c-green-fg); }
.entry.c-yellow { background: var(--c-yellow-bg); color: var(--c-yellow-fg); }
.entry.c-orange { background: var(--c-orange-bg); color: var(--c-orange-fg); }
.entry.c-red { background: var(--c-red-bg); color: var(--c-red-fg); }
.entry.c-pink { background: var(--c-pink-bg); color: var(--c-pink-fg); }
.entry.c-purple { background: var(--c-purple-bg); color: var(--c-purple-fg); }
.entry.c-teal { background: var(--c-teal-bg); color: var(--c-teal-fg); }
.entry.c-gray { background: var(--c-gray-bg); color: var(--c-gray-fg); }
.entry.c-brown { background: var(--c-brown-bg); color: var(--c-brown-fg); }

.sw.c-blue { background: var(--c-blue-bg); border: 1px solid var(--c-blue-fg); }
.sw.c-green { background: var(--c-green-bg); border: 1px solid var(--c-green-fg); }
.sw.c-yellow { background: var(--c-yellow-bg); border: 1px solid var(--c-yellow-fg); }
.sw.c-orange { background: var(--c-orange-bg); border: 1px solid var(--c-orange-fg); }
.sw.c-red { background: var(--c-red-bg); border: 1px solid var(--c-red-fg); }
.sw.c-pink { background: var(--c-pink-bg); border: 1px solid var(--c-pink-fg); }
.sw.c-purple { background: var(--c-purple-bg); border: 1px solid var(--c-purple-fg); }
.sw.c-teal { background: var(--c-teal-bg); border: 1px solid var(--c-teal-fg); }
.sw.c-gray { background: var(--c-gray-bg); border: 1px solid var(--c-gray-fg); }
.sw.c-brown { background: var(--c-brown-bg); border: 1px solid var(--c-brown-fg); }

.board-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

/* ---- Modal ---- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
  overflow-y: auto;
  animation: backdropIn 0.12s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 520px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 92vh;
  overflow: auto;
  animation: modalIn 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal h2 { margin: 0; font-size: 16px; }
/* Animace přechodů (2026-10-01, uživatel: „všude používej i animace na přechody v celém
   marketingovém plánu") – jemný fade/posun při otevření modalu a popoverů, ne nic
   rušivého. Jen `animation` (ne `transition`), ať funguje automaticky i při vložení
   nového elementu přes innerHTML, bez nutnosti JS přepínat třídu se zpožděním. */
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.select-field-pop, .quick-prop-pop, .module-preview-pop, .context-menu, .apply-all-rows-backdrop .modal { animation: popIn 0.12s ease; }
/* Modulární prvky editoru záznamu (pořadí řídí row.modules) – obal musí mít stejnou mezeru jako .modal. */
/* Modulární pole editoru záznamu: mřížka 2 sloupce – Platforma / Stav / Schvalování zabírají
   jen polovinu (uživatel: „Platforma jen na polovinu a Stav v druhé polovině"), ostatní bloky
   (URL+Fotky, Poznámka, Komentáře) celou šířku. Pořadí = pořadí v row.modules. */
/* Rozložení editoru záznamu: sekce (.lsec) → sloupce (.lcols = 12sloupcová mřížka, .lcol =
   span w) → bloky [data-module] nad sebou. Skládá admin po odemčení zámečku (🔒 v nadpisu),
   viz renderLayout() v app.js; uloží se až tlačítkem „Uložit rozložení". */
#fModularFields { display: flex; flex-direction: column; gap: 14px; }
.lsec { position: relative; }
.lcols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 12px; align-items: start; }
.lcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lcol > [data-module] { position: relative; min-width: 0; }
/* Builder rozložení v „Upravit řádek" (sekce → sloupce → prvky, nabídka nepoužitých prvků). */
.rlayout { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rsec { position: relative; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 8px; background: var(--surface-2); }
.rsec-tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rsec-tools .spacer { flex: 1; }
.rsec-tools .rsec-name { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-right: 4px; }
.rsec-tools .rsec-presets { display: inline-flex; gap: 3px; }
.rsec-tools button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); font-size: 11px; padding: 1px 8px; border-radius: 4px; cursor: pointer; font-weight: 700; line-height: 1.6; }
.rsec-tools button.active { background: var(--heading); color: var(--surface); border-color: var(--heading); }
.rsec-tools button:disabled { opacity: 0.35; cursor: default; }
@media (pointer: coarse) { .rsec-tools button { min-height: 40px; min-width: 40px; } }
.rcols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.rcol { display: flex; flex-direction: column; gap: 6px; min-height: 46px; min-width: 0; padding: 6px; border: 1px dotted var(--border-strong); border-radius: 4px; background: var(--surface); }
.rcol.drag-over { border: 2px solid var(--heading); background: color-mix(in srgb, var(--heading) 8%, transparent); }
.rcol-empty { text-align: center; font-style: italic; padding: 8px 4px; }
/* Doladění šířky JEDNOHO sloupce mimo pevné presety sekce (uživatel: „levá polovina 1/2,
   pravá 1/4 a 1/4") – jen u sekcí rozdělených na 2+ sloupce, u jediného sloupce (1/1) nedává
   smysl nic vyvažovat. */
.rcol-tools { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 2px; }
.rcol-tools button { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); font-size: 11px; width: 18px; height: 18px; line-height: 1; border-radius: 4px; cursor: pointer; font-weight: 700; }
.rcol-tools button[data-col-del] { font-size: 10px; }
.rcol-tools button:disabled { opacity: 0.35; cursor: default; }
@media (pointer: coarse) { .rcol-tools button { width: 40px; height: 40px; font-size: 14px; } }
.rcol-w-label { font-size: 10.5px; color: var(--text-muted); font-weight: 700; min-width: 28px; text-align: center; }
.rblock { display: flex; flex-direction: column; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); min-width: 0; overflow: hidden; }
.rblock.dragging { opacity: 0.4; }
.rblock-head { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--heading); color: var(--surface); font-size: 12.5px; font-weight: 700; }
.rblock.fixed .rblock-head { opacity: 0.85; }
.rblock .rblock-handle { cursor: grab; opacity: 0.75; }
.rblock .rblock-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rblock .rblock-x { border: 0; background: none; color: inherit; cursor: pointer; opacity: 0.7; font-size: 12px; padding: 0 2px; }
.rblock .rblock-x:hover { opacity: 1; }
.rblock .rblock-mv { border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: none; color: inherit; cursor: pointer; font-size: 15px; padding: 0; border-radius: 4px; align-items: center; justify-content: center; }
.rblock .rblock-mv:disabled { opacity: 0.3; }
@media (pointer: coarse) {
  .rblock .rblock-handle { display: none; }
  .rblock .rblock-mv, .rblock .rblock-x { min-width: 40px; min-height: 40px; }
}
/* Info ikonka na tmavém pruhu hlavičky karty potřebuje barvu podle pozadí, ne výchozí
   (text-muted/border-strong by na tomhle pozadí skoro nebyly vidět). */
.rblock-head .info-ico { border-color: currentColor; color: inherit; opacity: 0.75; margin-left: 0; }
.rblock-head .info-ico:hover { opacity: 1; }
.rblock-body { padding: 8px; min-width: 0; }
.rblock-body.preview { pointer-events: none; opacity: 0.85; display: flex; flex-direction: column; gap: 6px; }
.rblock-body.preview p { margin: 0; }
.rblock-body .opt-editor { margin: 0; padding: 0; border: 0; background: none; }
.rsec-add { align-self: flex-start; }
.rpalette { margin-top: 10px; position: relative; display: inline-block; }
.rpalette .rpal { cursor: grab; }
.rpalette .rpal.dragging { opacity: 0.4; }
/* "+ Přidat pole" (2026-10-01, Notion styl – uživatel: „Přidej tam více možností a
   přidávání přes '+'") – nahradilo trvale vidtelnou řádku chipů, ať builder vypadá
   hotověji. Popover je jednoduchý absolutně umístěný box hned pod tlačítkem. */
.rpal-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; animation: popIn 0.12s ease;
}
.rpal-pop .chip-toggle-row { display: flex; flex-direction: column; gap: 2px; }
.rpal-pop .rpal { width: 100%; text-align: left; opacity: 1; }
/* Název/Skupina/Barva – vizuálně oddělené od přetahovatelného builderu níž (uživatel:
   „Název, skupina, barva, ať je vizuálně oddělené a je vidět, že to není drag and drop
   část"), jiné pozadí než zbytek modalu signalizuje jinou interakci (napsat/kliknout, ne
   přetahovat). */
.rrow-basics {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px;
}
.modal.modal-wide { max-width: 720px; }
.modal.modal-entry-wide { max-width: 920px; }
.modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
/* Mobil (2026-11-02): okno přes celou obrazovku, akce dole přilepené (vidět bez scrollu). */
@media (max-width: 640px) {
  /* Pod sdílenou lištou (tg-topbar: sticky, z-index 400, výška 56 px + okraj) – popovery
     výběru (z-index 150) musí zůstat nad oknem, proto okno lištu nepřekrývá, ale začíná pod ní. */
  .modal-backdrop { padding: 0; align-items: stretch; top: 57px; }
  .modal { max-width: none; height: calc(100dvh - 57px); max-height: calc(100dvh - 57px); border-radius: 0; border: 0; padding: 16px 14px 0; }
  .modal.modal-entry-wide { max-width: none; }
  .modal-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); margin: auto -14px 0; padding: 10px 14px; flex-wrap: wrap; z-index: 2; }
}
.modal-actions .spacer { flex: 1; }
.modal-actions .save-state { margin-right: 6px; transition: color 0.2s; }
.modal-actions .save-state.ok { color: var(--c-green-fg); }
.modal-actions .save-state.warn { color: var(--c-red-fg); }
.status-group-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin: 6px 0 2px; font-weight: 700; }
.status-group-label:first-child { margin-top: 0; }
button.chip-toggle.status-clear { margin-bottom: 4px; background: var(--surface-2); color: var(--text-muted); }

.color-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.color-picker button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.color-picker button.selected { border-color: var(--heading); box-shadow: 0 0 0 2px var(--surface); }
.color-picker button.c-blue { background: var(--c-blue-bg); }
.color-picker button.c-green { background: var(--c-green-bg); }
.color-picker button.c-yellow { background: var(--c-yellow-bg); }
.color-picker button.c-orange { background: var(--c-orange-bg); }
.color-picker button.c-red { background: var(--c-red-bg); }
.color-picker button.c-pink { background: var(--c-pink-bg); }
.color-picker button.c-purple { background: var(--c-purple-bg); }
.color-picker button.c-teal { background: var(--c-teal-bg); }
.color-picker button.c-gray { background: var(--c-gray-bg); }
.color-picker button.c-brown { background: var(--c-brown-bg); }
.color-picker.small button { width: 20px; height: 20px; border-width: 1px; }

.row-color-preview { display: flex; align-items: center; gap: 8px; }
.sw.big { width: 22px; height: 22px; border-radius: var(--radius); }

/* ---- Produkty ---- */

.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.month-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.month-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.month-card h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.month-card .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.month-card .chips { line-height: 1.7; }
.month-card textarea { min-height: 54px; font-size: 12.5px; }

.heat { border-collapse: collapse; font-size: 12px; width: 100%; }
.heat th, .heat td { padding: 5px 6px; text-align: center; border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.heat th { font-size: 11px; color: var(--text-muted); font-weight: 700; background: var(--surface-2); }
.heat td.name { text-align: left; font-weight: 600; white-space: nowrap; color: var(--heading); }
.heat td.idx { color: var(--text); font-weight: 600; }
.heat td.idx.dark { color: #fff; }
.heat td.peak { outline: 2px solid var(--today); outline-offset: -2px; }
.heat tr:hover td { filter: brightness(0.97); }

.trend-up { color: var(--success); font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; }
.stat .v { font-size: 18px; font-weight: 800; color: var(--heading); margin-top: 4px; }
.stat .s { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Import ---- */

.drop {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop.over, .drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop strong { color: var(--heading); display: block; margin-bottom: 4px; }
.drop input { display: none; }

pre.example {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  overflow-x: auto;
  margin: 8px 0 0;
}

.inline-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- Nastavení řádků ---- */

.rows-editor { display: flex; flex-direction: column; gap: 6px; }
.row-edit {
  display: grid;
  grid-template-columns: 28px 130px 1fr 232px 150px auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.row-edit input, .row-edit select { padding: 7px 8px; font-size: 12.5px; }
.row-edit .handle { color: var(--text-muted); font-size: 16px; text-align: center; }
.row-edit .btns { display: flex; gap: 4px; }
.row-edit .btns button { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); width: 28px; height: 28px; cursor: pointer; color: var(--text); font-size: 12px; }
.row-edit .btns button:hover { border-color: var(--accent); color: var(--accent); }
.row-edit .btns button.del:hover { border-color: var(--danger); color: var(--danger); }
.row-edit .note-input { grid-column: 2 / -1; }
.row-edit.cat-edit { grid-template-columns: 28px 1fr 140px auto; }

@media (max-width: 800px) {
  .row-edit { grid-template-columns: 28px 1fr 1fr; }
  .row-edit .note-input, .row-edit .btns, .row-edit [data-colors] { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
  .lcols, .rcols { grid-template-columns: 1fr; }
  .lcol, .rcol { grid-column: auto !important; }
  .page { padding: 16px; }
  :root { --label-w: 150px; }
}
@media (max-width: 640px) {
  .page { padding: 12px 10px 40px; gap: 14px; }
  :root { --label-w: 112px; }
}

/* ---- Řazení produktů ---- */

.raw-list { display: flex; flex-direction: column; gap: 6px; }
.raw-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.raw-item .raw-name { font-weight: 600; flex: 1; }
.raw-item select { width: auto; min-width: 200px; }
.raw-item.raw-item-grouped { margin-left: 18px; border-style: dashed; }
@media (max-width: 640px) { .raw-item { flex-wrap: wrap; gap: 6px 10px; } .raw-item .raw-name { flex: 1 1 100%; } .raw-item.raw-item-grouped, .raw-group-row { margin-left: 8px; } }
.suggest-badge { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 11px; }

.raw-group-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  margin-left: 18px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius);
}

.cat-genders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.cat-gender-card h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cat-add-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
}
.cat-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.cat-list { display: flex; flex-direction: column; gap: 6px; }
.cat-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}
.cat-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
}
.cat-item summary::-webkit-details-marker { display: none; }
.cat-item summary::marker { display: none; content: ''; }
.cat-item summary::before { content: '▸'; color: var(--text-muted); font-size: 11px; transition: transform 0.15s ease; }
.cat-item[open] summary::before { transform: rotate(90deg); }
.cat-item .cat-handle { color: var(--text-muted); font-size: 14px; cursor: grab; padding: 0 2px; }
.cat-item .cat-handle:active { cursor: grabbing; }
.cat-item .cat-name { font-weight: 700; flex: 1; cursor: text; }
.cat-item .cat-name-edit {
  flex: 1;
  font-weight: 700;
  font-size: inherit;
  font-family: inherit;
  padding: 2px 6px;
  min-width: 0;
}
.cat-item .cat-members { padding: 4px 12px 12px 34px; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); background: var(--surface); }
.raw-chip { padding-right: 4px; }
.raw-chip-label { cursor: pointer; }
.chip-x { background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; font-size: 11px; padding: 0 2px; }
.chip-x:hover { opacity: 1; color: var(--danger); }

.cat-toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; }
.cat-search { width: 200px; padding: 7px 10px; font-size: 12.5px; }
@media (max-width: 640px) { .cat-search { width: 100%; font-size: 16px; } }
.raw-chip[draggable="true"], .raw-item[draggable="true"] { cursor: grab; }
.raw-chip[draggable="true"]:active, .raw-item[draggable="true"]:active { cursor: grabbing; }
.raw-item .raw-name { cursor: pointer; }

.breakdown-list { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.breakdown-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 6px 8px; border-radius: var(--radius); background: var(--surface-2); font-size: 12.5px; }
.breakdown-row.overridden { opacity: 0.7; }
.breakdown-row .bd-name { flex: 1 1 220px; }
.breakdown-row .bd-qty { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.breakdown-move { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.breakdown-move .cat-picker-input { width: 220px; padding: 5px 8px; font-size: 12px; }

/* Výběr kategorie s hledáním (catPickerHtml/attachCatPickers v app.js) */
.cat-picker { display: inline-flex; }
.raw-item .cat-picker-input { width: min(240px, 100%); }
@media (max-width: 640px) { .raw-item .cat-picker { flex: 1 1 auto; min-width: 0; } .raw-item .cat-picker-input { width: 100%; } .breakdown-move { flex-wrap: wrap; margin-left: 0; } .breakdown-move .cat-picker-input { width: min(220px, 100%); } }
@media (pointer: coarse) { .chip-x { min-width: 32px; min-height: 32px; font-size: 14px; } .cat-handle { padding: 8px; } }
.cat-picker-pop {
  position: fixed;
  z-index: 150; /* nad oknem (100), pod toastem (200) */
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  font-size: 13px;
}
.cat-picker-group {
  padding: 8px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cat-picker-opt { padding: 6px 10px; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.cat-picker-opt:hover, .cat-picker-opt.active { background: var(--surface-2); }
.cat-picker-opt.selected { font-weight: 700; }
.cat-picker-empty { padding: 8px 10px; color: var(--text-muted); }
button.secondary.small { padding: 5px 10px; font-size: 12px; }
.person-picker { width: 100%; }
.person-picker .cat-picker-input { width: 100%; }

/* @zmínka v komentáři – popup nad textovým polem (attachMentionAutocomplete v app.js). */
.mention-pop {
  position: fixed;
  z-index: 150;
  overflow-y: auto;
  max-height: 200px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  font-size: 13px;
}
.mention-opt { padding: 6px 10px; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.mention-opt:hover, .mention-opt.active { background: var(--surface-2); }
.mention { color: var(--accent); font-weight: 700; }
.mention.me { color: #e8913a; }

.context-menu {
  position: fixed;
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 180px;
}
.context-menu button {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
}
.context-menu button:hover { background: var(--surface-2); }
@media (pointer: coarse) { .context-menu button { min-height: 40px; } }
.context-menu button.danger { color: var(--danger); }

/* Štítky Stav/Platforma přímo na pruhu záznamu (jen IG/FB/YT/TT, Newslettery) – jedou na
   stejném řádku jako text (entry je jednořádkový, overflow:hidden), klikatelné bez otevření
   celého modalu. */
.entry-badges { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; vertical-align: middle; }
.ebadge, .ebadge-group { display: inline-flex; align-items: center; gap: 2px; }
.ebadge {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.ebadge.empty { background: rgba(255, 255, 255, 0.15); opacity: 0.7; font-weight: 500; font-style: italic; }
.ebadge.clickable, .ebadge-group.clickable .ebadge { cursor: pointer; }
.ebadge.clickable:hover, .ebadge-group.clickable:hover .ebadge { filter: brightness(1.12); }
.ebadge.c-blue { background: var(--c-blue-bg); color: var(--c-blue-fg); }
.ebadge.c-green { background: var(--c-green-bg); color: var(--c-green-fg); }
.ebadge.c-yellow { background: var(--c-yellow-bg); color: var(--c-yellow-fg); }
.ebadge.c-orange { background: var(--c-orange-bg); color: var(--c-orange-fg); }
.ebadge.c-red { background: var(--c-red-bg); color: var(--c-red-fg); }
.ebadge.c-pink { background: var(--c-pink-bg); color: var(--c-pink-fg); }
.ebadge.c-purple { background: var(--c-purple-bg); color: var(--c-purple-fg); }
.ebadge.c-teal { background: var(--c-teal-bg); color: var(--c-teal-fg); }
.ebadge.c-gray { background: var(--c-gray-bg); color: var(--c-gray-fg); }
.ebadge.c-brown { background: var(--c-brown-bg); color: var(--c-brown-fg); }
/* Schváleno: neutrální světlý štítek, kontrastní na pruhu jakékoli barvy (viz attachEntryBadges). */
.ebadge.approved, .cal-pill.approved { background: #f5f5f5; color: #1f1f1f; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); }

/* Malý popup pro rychlou změnu jen Stavu nebo jen Platformy z kalendáře. */
.quick-prop-pop {
  position: fixed;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  max-width: 320px;
  cursor: default;
}
.quick-prop-pop .chip-toggle-row { display: flex; flex-wrap: wrap; gap: 4px; }
.quick-prop-pop .status-group-label:first-of-type { margin-top: 0; }
.cat-item.drag-over, #unmappedCard.drag-over, .drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

@keyframes just-moved-flash {
  0% { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); box-shadow: 0 0 0 2px var(--accent); }
  100% { background: var(--surface-2); box-shadow: none; }
}
.cat-item.just-moved, .raw-chip.just-moved { animation: just-moved-flash 3s ease-out; }
.row-label[draggable="true"] { cursor: grab; }
.row-label[draggable="true"]:active { cursor: grabbing; }
.row-edit[draggable="true"], .row-edit .handle { cursor: grab; }
.row-edit[draggable="true"]:active { cursor: grabbing; }
.row-edit.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---- Barevné skupiny a stavy v přehledu Produktů ---- */

.heat tr.gender-row td, .status-matrix tr.gender-row td {
  text-align: left;
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 6px 8px;
  border-left: 3px solid var(--accent);
}
.heat tr.no-data td.name { opacity: 0.6; }
.heat td.idx.none { color: var(--text-muted); background: var(--surface-2) !important; }

.dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: middle; }
.dot.d-top { background: var(--success); }
.dot.d-rising { background: var(--c-teal-fg); }
.dot.d-falling { background: var(--c-yellow-fg); }
.dot.d-low { background: var(--danger); }
.dot.d-mid { background: var(--border-strong); }
.dot.d-none { background: transparent; border: 1px dashed var(--border-strong); }
.dot.d-thin { background: repeating-linear-gradient(45deg, var(--border-strong), var(--border-strong) 2px, transparent 2px, transparent 4px); border: 1px solid var(--border-strong); }
.badge.warn { background: var(--c-yellow-bg, #fef3c7); color: var(--c-yellow-fg, #92400e); }
.status-matrix td.status-cell { text-align: center; }

.range-bar-wrap { position: relative; display: inline-block; min-width: 90px; height: 18px; vertical-align: middle; }
.range-bar { position: absolute; left: 0; top: 2px; bottom: 2px; background: color-mix(in srgb, var(--today) 55%, var(--c-orange-bg)); border-radius: 2px; opacity: 0.55; }
.range-num { position: relative; z-index: 1; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* Přesuny produktů běžící na pozadí (startMoveWorker v app.js) */
.bg-moves {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120; /* nad oknem (100), pod výběrem kategorie (150) a toastem (200) */
  max-width: min(420px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  line-height: 1.4;
}
.bg-moves.error { border-color: var(--danger); }
.bg-moves-spinner {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: bg-moves-spin 0.9s linear infinite;
}
@keyframes bg-moves-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bg-moves-spinner { animation-duration: 3s; } }

/* ---- Fotky u záznamu a v komentářích (2026-09-29, includes/uploads.php) ---- */
.photo-drop {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 38px;
  padding: 6px 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color 0.12s, background 0.12s;
}
.photo-drop:focus-visible { outline: 2px solid var(--accent, #3b6ea5); outline-offset: 1px; }
.photo-drop.drag-over { border-color: var(--heading); background: color-mix(in srgb, var(--surface-2) 80%, var(--heading) 20%); }
.photo-drop.busy { opacity: 0.7; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-grid:empty { display: none; }
.photo-grid-pending { margin-top: 6px; }
.photo-thumb {
  position: relative; margin: 0; width: 84px; height: 84px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); cursor: zoom-in; flex: 0 0 auto;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .photo-remove {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer;
  opacity: 0; transition: opacity 0.12s;
}
.photo-thumb:hover .photo-remove { opacity: 1; }
.comment-item .photo-grid { margin-top: 6px; }
.comment-item .photo-thumb { width: 64px; height: 64px; }
.comment-add-row #fCommentPhotoBtn { padding-left: 8px; padding-right: 8px; }
/* Značka 📷 za názvem na pruhu v kalendáři. */
.entry .entry-photos { flex: 0 0 auto; font-size: 12px; line-height: 1; cursor: zoom-in; opacity: 0.9; margin-left: 2px; }
.entry .entry-photos:hover { opacity: 1; transform: scale(1.15); }
/* Lightbox – nad vším včetně modalu. */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(8, 10, 14, 0.88);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox { touch-action: none; overflow: hidden; user-select: none; -webkit-user-select: none; }
.lightbox img { max-width: calc(100vw - 96px); max-height: calc(100vh - 80px); border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); cursor: zoom-in; transform-origin: 0 0; }
.lightbox.zoomed { cursor: grab; }
.lightbox.zoomed:active, .lightbox.zoomed:active img { cursor: grabbing; }
.lightbox-zoom { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1; display: flex; gap: 4px; background: rgba(20,22,26,0.8); border-radius: 20px; padding: 3px; box-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.lightbox-zoom button { border: 0; background: transparent; color: #fff; cursor: pointer; min-width: 34px; height: 34px; border-radius: 17px; font: 600 18px/34px Montserrat, sans-serif; padding: 0 8px; }
.lightbox-zoom button, .lightbox-zoom a { border: 0; background: transparent; color: #fff; cursor: pointer; min-width: 34px; height: 34px; border-radius: 17px; font: 600 18px/34px Montserrat, sans-serif; padding: 0 8px; text-align: center; text-decoration: none; }
.lightbox-zoom button:hover, .lightbox-zoom a:hover { background: rgba(255,255,255,0.2); }
.lightbox-zoom .lightbox-download { border-left: 1px solid rgba(255,255,255,0.2); border-radius: 0 17px 17px 0; }
.lightbox-zoom .lightbox-zoom-pct { font-size: 12px; min-width: 58px; }
.lightbox-cap { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 1; color: #eee; font-size: 12.5px; background: rgba(20,22,26,0.8); padding: 4px 12px; border-radius: 12px; white-space: nowrap; pointer-events: none; }
.lightbox-close, .lightbox-nav {
  position: absolute; border: 0; background: rgba(255,255,255,0.12); color: #fff; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 40px; padding: 0;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 14px; right: 14px; font-size: 18px; z-index: 1; }
.lightbox-nav { z-index: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 14px; }
.lightbox-nav.next { right: 14px; }
/* Náhled prvku editoru záznamu po najetí na chip v „Upravit řádek". */
.module-preview-pop {
  position: fixed; z-index: 70; width: 480px; max-width: calc(100vw - 16px); pointer-events: none;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25); padding: 10px 12px;
}
.module-preview-head { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; }
.module-preview-body { display: flex; flex-direction: column; gap: 8px; }
.module-preview-body p { margin: 0; }
.module-preview-body input, .module-preview-body textarea { pointer-events: none; }

/* ---- Kalendář (měsíční mřížka po dnech; redesign 2026-09-29, inspirace Notionem) ---- */
.cal-wrap { padding: 18px 28px 50px; max-width: 2000px; width: 100%; margin: 0 auto; }
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
/* Výběr řádků – kompaktní tlačítko + popover (checkboxy), místo velké stěny chipů. */
.cal-rows-picker { position: relative; }
#calRowsBtn { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius); }
.cal-rows-summary { color: var(--text-muted); font-weight: 500; }
.cal-rows-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 340px;
  /* Uživatel chtěl vidět všechny řádky bez scrollování – strop je jen pojistka pro
     opravdu vysoké okno, běžně se do 90 % výšky obrazovky vejde vše. */
  max-height: 90vh;
  overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px;
}
.cal-rows-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-row-group { margin-bottom: 10px; }
.cal-row-group:last-child { margin-bottom: 0; }
.cal-row-group-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.cal-row-check-list { display: flex; flex-direction: column; gap: 2px; }
.cal-row-check { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: var(--radius); cursor: pointer; font-size: 13px; transition: background-color 0.12s ease; }
.cal-row-check:hover { background: var(--surface-2); }
.cal-row-check input { margin: 0; }
.cal-row-swatch { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
/* Navigace měsícem – jeden blok zarovnaný vpravo (uživatel: „Dnes zarovnej do pravé strany“). */
.cal-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cal-nav .secondary.icon { border-radius: var(--radius); width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.cal-month-label { color: var(--heading); font-weight: 700; font-size: 15px; min-width: 130px; text-align: center; letter-spacing: 0.01em; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 700; }
.cal-weekdays div { padding: 4px 10px; }
.cal-grid {
  display: flex; flex-direction: column; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.cal-week { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
/* Vícedenní task = tenký jednořádkový pruh přes dny (minimalisticky, 2026-10-13). */
.cal-entry.cal-span {
  position: absolute; height: 18px; padding: 0 8px; border: 0; border-radius: var(--radius);
  font-size: 11.5px; font-weight: 700; line-height: 18px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; box-shadow: none; z-index: 1;
}
.cal-entry.cal-span:hover { transform: none; filter: brightness(1.08); }
.cal-entry.cal-span.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-entry.cal-span.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-span-space { flex: 0 0 auto; }
.cal-day { background: var(--surface); min-height: 118px; padding: 8px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: background 0.12s; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.outside { background: var(--surface-2); opacity: 0.5; }
.cal-day.weekend:not(.outside) { background: color-mix(in srgb, var(--weekend) 55%, var(--surface)); }
.cal-day.drag-over { background: color-mix(in srgb, var(--heading) 10%, var(--surface)); outline: 2px dashed var(--heading); outline-offset: -2px; }
.cal-day.today .cal-day-num { background: var(--today); color: #fff; border-radius: var(--radius); width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-day-num { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.cal-day.outside .cal-day-num { font-weight: 500; }
.cal-day-entries { display: flex; flex-direction: column; gap: 6px; }
/* Karta tasku – podbarvená hlavní barvou (2026-10-03, uživatel: „ať jsou pozadí daného
   tasku vyplněné hlavní barvou, abychom to okamžitě rozeznali") – barva pozadí/textu se
   nastavuje inline z e.color v calEntryCardHtml(); tady je jen neutrální fallback. */
.cal-entry {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
  border-radius: var(--radius); padding: 7px 9px; font-size: 12px; cursor: grab; min-width: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); transition: box-shadow 0.12s, transform 0.12s;
}
.cal-entry:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22); transform: translateY(-1px); }
.cal-entry.dragging { opacity: 0.4; }
/* Option/Alt při tažení = kopie – originál zůstává na místě plně viditelný. */
.cal-entry.dragging.duplicating { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.cal-entry-head { display: flex; align-items: flex-start; gap: 6px; }
.cal-entry-text { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.cal-entry-flag { font-size: 12px; margin-left: 2px; }
.cal-entry-comments { flex: 0 0 auto; font-size: 10.5px; color: inherit; opacity: 0.8; white-space: nowrap; }
.cal-entry-person { display: flex; align-items: center; gap: 5px; margin-top: 5px; min-width: 0; }
.cal-avatar { width: 16px; height: 16px; border-radius: var(--radius); font-size: 8.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cal-entry-person-name { color: inherit; opacity: 0.85; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-entry-pills { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.cal-pill { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--radius); white-space: nowrap; }
@media (max-width: 720px) {
  .cal-wrap { padding-left: 14px; padding-right: 14px; }
  .cal-rows-pop { width: calc(100vw - 60px); }
  .cal-day { min-height: 76px; }
  .cal-entry.cal-span { font-size: 10px; padding: 0 4px; }
  .cal-entry-text { -webkit-line-clamp: 1; }
  .cal-entry-person, .cal-entry-pills { display: none; }
}

/* ---- Pořadí menu (Nastavení, 2026-09-29) ---- */
.menu-order-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.menu-order-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: grab; font-size: 13.5px; font-weight: 600; }
.menu-order-item.dragging { opacity: 0.4; }
.menu-order-item.drag-over { outline: 2px dashed var(--border-strong); outline-offset: -2px; }
.menu-order-handle { color: var(--text-muted); }
.menu-order-mv:first-of-type { margin-left: auto; }
.rorder { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; }
.rorder #rOrderLbl { min-width: 48px; text-align: center; }

/* ---- Nastavení – podstránky s vlastní URL (2026-09-29) ---- */
.settings-wrap .page-head { margin-bottom: 4px; }
.settings-layout { display: flex; gap: 24px; align-items: flex-start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; flex: 0 0 200px; position: sticky; top: 16px; }
.settings-nav button {
  text-align: left; background: transparent; border: 1px solid transparent; color: var(--text-muted);
  border-radius: var(--radius); padding: 8px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.settings-nav button:hover { background: var(--surface-2); color: var(--text); }
.settings-nav button.active { background: var(--surface); border-color: var(--border-strong); color: var(--heading); box-shadow: var(--shadow); }
.settings-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.settings-page h3 { margin: 18px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.settings-page h3:first-of-type { margin-top: 4px; }
@media (max-width: 780px) {
  .settings-layout { flex-direction: column; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; position: static; width: 100%; }
}

/* ---- Zámeček nad řádky nástěnky (jen admin) – 2026-09-30 ---- */
/* .corner má už position:sticky (viz výš) – to appka bere jako "positioned" element, takže
   absolutně umístěné tlačítko se ukotví přímo do rohu buňky, ne do viewportu. */
.board-lock-btn {
  position: absolute; top: 6px; right: 6px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-muted); border-radius: var(--radius);
  width: 22px; height: 22px; padding: 0; font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.board-lock-btn:hover { color: var(--text); background: var(--surface-2); }
.board-lock-btn.open { color: var(--heading); border-color: var(--heading); }

/* ---- Notion-styl rozbalovací výběr hodnoty (Stav/Schvalování/Platforma) – 2026-09-30 ---- */
.select-field-value {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 30px;
  width: 100%; text-align: left; padding: 4px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text); cursor: pointer;
}
.select-field-value:hover { border-color: var(--border-strong); }
.select-field-value::after { content: '⌄'; margin-left: auto; color: var(--text-muted); font-size: 13px; line-height: 1; padding-left: 4px; }
.select-field-placeholder { color: var(--text-muted); font-weight: 500; }
.select-field-pop {
  position: fixed; z-index: 150; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column;
  max-height: 360px;
}
.select-field-search {
  width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent;
  padding: 7px 8px; font-size: 13px; color: var(--text); margin-bottom: 4px; flex: 0 0 auto;
}
.select-field-search:focus { outline: none; border-bottom-color: var(--border-strong); }
.select-field-list { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.select-field-group { padding: 8px 8px 2px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.select-field-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0;
  background: none; padding: 3px 8px; border-radius: var(--radius); cursor: pointer; color: var(--text);
}
.select-field-opt:hover, .select-field-opt.selected { background: var(--surface-2); }
@media (pointer: coarse) { .select-field-opt { min-height: 40px; } .select-field-search { font-size: 16px; } }
/* Klávesou (šipky) označená položka – musí být vidět i vedle už vybraných (selected). */
.select-field-opt.active { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
/* Čip uvnitř má vlastní margin (kvůli použití jinde jako volně plynoucí štítek, viz
   .chip-toggle-row) – tady v jednosloupcovém seznamu popoveru je zbytečný a jen zvětšoval
   mezery mezi položkami (uživatel: „mezi Rolí jsou velké mezery, je to zbytečně vysoké"). */
.select-field-opt .chip { margin: 0; }
.select-field-check { margin-left: auto; color: var(--heading); font-weight: 700; }

/* ---- Notion-styl "Files & media" (URL + fotky sloučené) – 2026-09-30 ---- */
.files-field {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 34px;
  padding: 5px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
}
.files-field.drag-over { border-color: var(--heading); background: color-mix(in srgb, var(--heading) 8%, var(--surface-2)); }
.files-field.busy { opacity: 0.6; }
.files-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.file-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px 3px 3px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); font-size: 12px; max-width: 200px; cursor: pointer;
}
.file-pill-icon { font-size: 13px; }
.file-pill-thumb { width: 20px; height: 20px; object-fit: cover; border-radius: 3px; }
.file-pill-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.file-pill-x { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 10px; padding: 0 1px; line-height: 1; }
.file-pill-x:hover { color: var(--text); }
.files-add-btn { border: 0; background: none; color: var(--text-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: var(--radius); }
.files-add-btn:hover { background: var(--surface); color: var(--text); }
.files-add-btn:disabled { cursor: default; }
.files-add-pop {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.files-add-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.files-add-tab { flex: 1; border: 0; background: var(--surface-2); color: var(--text-muted); font-size: 12.5px; font-weight: 700; padding: 6px 8px; border-radius: var(--radius); cursor: pointer; }
.files-add-tab.active { background: var(--heading); color: var(--surface); }
.files-add-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.files-upload-btn, .files-link-btn { width: 100%; }
.files-link-input { width: 100%; }

/* ---- Notion-styl kalendářový výběr data (Od/Do) – 2026-09-30 ---- */
.date-field-value {
  display: block; width: 100%; text-align: left; padding: 4px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text); cursor: pointer; min-height: 30px;
}
.date-field-value:hover { border-color: var(--border-strong); }
/* Přiřazeno (2026-10-02, víc lidí najednou) – stejná klikatelná "field" krabička jako
   Od/Do, uvnitř ale stoh avatarů + jména místo jednoho textu. */
.assignee-field { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.assignee-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Přiřazeno: člověk = štítek s × (odebrání bez otevírání výběru), jako v Notionu. */
.assignee-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 4px 2px 2px; border-radius: 3px; background: rgba(127, 127, 127, 0.14); }
.assignee-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignee-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 3px; font-size: 14px; line-height: 1; opacity: 0.55; cursor: pointer; }
.assignee-chip-x:hover { opacity: 1; background: rgba(127, 127, 127, 0.3); }
.select-field-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.select-field-chips .chip { display: inline-flex; align-items: center; gap: 4px; }
.select-field-chip-x { cursor: pointer; opacity: 0.6; font-size: 13px; line-height: 1; padding: 0 1px; }
.select-field-chip-x:hover { opacity: 1; }
.assignee-empty { color: var(--text-muted); }
.date-pop {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px; width: 252px;
}
.date-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.date-pop-label { font-weight: 700; font-size: 13px; color: var(--heading); }
.date-pop-nav { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-muted); width: 22px; height: 22px; border-radius: var(--radius); cursor: pointer; }
.date-pop-nav:hover { color: var(--text); }
.date-pop-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 2px; }
.date-pop-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.date-pop-day { border: 0; background: none; color: var(--text); padding: 5px 0; border-radius: var(--radius); cursor: pointer; font-size: 12.5px; }
.date-pop-day:hover { background: var(--surface-2); }
.date-pop-day.outside { color: var(--text-muted); opacity: 0.5; }
.date-pop-day.today { font-weight: 800; color: var(--today); }
.date-pop-day.selected { background: var(--heading); color: var(--surface); }
.date-pop-today { width: 100%; margin-top: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 5px; border-radius: var(--radius); cursor: pointer; font-size: 12px; font-weight: 600; }
.date-pop-today:hover { border-color: var(--border-strong); }
.select-field-chips[hidden] { display: none; }

/* Podřádky na Nástěnce (2026-10-13): trh (rodič) se šipkou ▸, podřádky odsazené. */
.row-caret { border: 0; background: none; color: var(--text); cursor: pointer; padding: 0 6px 0 0; display: inline-flex; align-items: center; line-height: 1; transition: transform 0.15s; flex: 0 0 auto; }
.row-caret.open { transform: rotate(90deg); }
.row-caret:hover { color: var(--heading); }
.row-label.sub-row { padding-left: 30px; font-weight: 500; }
.row-label.sub-row .lbl { font-weight: 600; opacity: 0.9; }

/* Odkaz dole v popoveru výběru (např. „Upravit možnosti" v Projektech, 2026-10-13). */
.select-field-footer { border: 0; border-top: 1px solid var(--border); background: none; color: var(--text-muted); font: inherit; font-size: 12.5px; text-align: left; padding: 8px 8px 4px; margin-top: 4px; cursor: pointer; }
.select-field-footer:hover { color: var(--heading); }

/* Plán – přepínač rozložení + filtr Přiřazeno (2026-10-14) */
.plan-tools { display: inline-flex; align-items: center; gap: 8px; }
.plan-assignee-btn { white-space: nowrap; }
@media (max-width: 640px) { .plan-tools { flex-wrap: wrap; max-width: 100%; } .plan-switch { max-width: 100%; overflow-x: auto; } }
.plan-assignee-btn.on { border-color: var(--accent); color: var(--accent); }
.entry-people { display: inline-flex; margin-left: 5px; flex: 0 0 auto; }
.entry-avatar { width: 17px; height: 17px; border-radius: 50%; font-size: 8px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1.5px var(--surface); }
.entry-avatar + .entry-avatar { margin-left: -4px; }
.entry-avatar.more { background: var(--surface-2); color: var(--text-muted); }

/* Podúkoly / výstupy v tasku (2026-10-14) */
.deliv-list { display: flex; flex-direction: column; gap: 4px; }
.deliv-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: var(--radius); }
.deliv-row:hover { background: var(--surface-2); }
.deliv-row.done .deliv-title { text-decoration: line-through; color: var(--text-muted); }
.deliv-check { width: 18px; height: 18px; flex: 0 0 auto; border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.deliv-check.on { background: var(--success); border-color: var(--success); }
.deliv-type { border: 0; cursor: pointer; margin: 0; flex: 0 0 auto; }
.deliv-title { flex: 1; min-width: 120px; border: 1px solid transparent; background: none; font: inherit; font-size: 13px; color: var(--text); padding: 4px 6px; border-radius: var(--radius); }
.deliv-title:hover, .deliv-title:focus { border-color: var(--border); background: var(--surface); outline: none; }
.deliv-person { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; padding: 3px 6px; border-radius: var(--radius); white-space: nowrap; }
.deliv-person:hover { background: var(--surface); }
.deliv-x { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 0 4px; opacity: 0; }
.deliv-row:hover .deliv-x { opacity: 1; }
.deliv-add { align-self: flex-start; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 4px; }
.deliv-add:hover { color: var(--heading); }
.entry-deliv { font-size: 10px; font-weight: 700; margin-left: 5px; padding: 0 4px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.08); flex: 0 0 auto; }
.entry-deliv.all-done { opacity: 0.6; }

/* ===== Zahraničí (DE/AT/PL + GA4), 2026-10-20 ===== */
.foreign-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
@media (max-width: 640px) { .foreign-toolbar { gap: 8px; } .foreign-toolbar .view-switch { max-width: 100%; overflow-x: auto; } .foreign-toolbar .inline-actions { margin-left: 0 !important; flex-wrap: wrap; } }
.foreign-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.foreign-table th, .foreign-table td { padding: 6px 9px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: top; }
.foreign-table th { font-size: 10.5px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface-2); white-space: normal; vertical-align: bottom; line-height: 1.25; }
.foreign-table th small { display: block; font-size: 9.5px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.foreign-table th:first-child, .foreign-table td:first-child { text-align: left; }
.foreign-table td:first-child { font-weight: 600; color: var(--heading); }
.foreign-table td .sub { display: block; font-size: 10.5px; color: var(--text-muted); font-weight: 500; line-height: 1.2; }
.foreign-table td.conv { font-weight: 800; color: var(--heading); }
.foreign-table tr.year-odd td { background: var(--surface-2); }
.foreign-table tr.current td:first-child { box-shadow: inset 3px 0 0 var(--accent); color: var(--accent); }
.foreign-table tr.total td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; background: var(--surface-2); }
.foreign-table tbody tr:hover td { filter: brightness(0.97); }

/* Dashboard Zahraničí – KPI dlaždice, měsíční boxy, grafy (paleta: akcent modrá = aktuální řada, šedá = předchozí rok) */
:root { --fx-series: #2a78d6; --fx-prev: #9aa3b0; --fx-grid: var(--border); }
:root[data-theme="dark"] { --fx-series: #3987e5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fx-series: #3987e5; } }
.fx-loading .card { opacity: 0.6; transition: opacity 0.2s; }
.fx-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .fx-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .fx-tile { padding: 10px 10px 6px; } .fx-tile-value { font-size: 20px; } }
.fx-tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 8px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.fx-tile-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; }
.fx-tile-value { font-size: 26px; font-weight: 800; color: var(--heading); line-height: 1.15; }
.fx-tile-meta { font-size: 12px; color: var(--text-muted); min-height: 16px; }
.fx-delta { font-weight: 700; }
.fx-spark { margin-top: 6px; width: 100%; height: 32px; }
.fx-month { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fx-month-row { display: grid; grid-template-columns: 150px repeat(3, minmax(110px, 1fr)) 1px repeat(3, minmax(110px, 1fr)) 1px repeat(3, minmax(110px, 1fr)) 1px repeat(2, minmax(110px, 1fr)); gap: 10px; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.fx-row-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; color: var(--text-muted); align-self: center; line-height: 1.4; }
.fx-sep { background: var(--border); width: 1px; align-self: stretch; }
.fx-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-width: 0; }
.fx-box-label { font-size: 11px; color: var(--text-muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-box-value { font-size: 17px; font-weight: 800; color: var(--heading); margin-top: 2px; white-space: nowrap; }
.fx-box-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1600px) { .fx-month-row { grid-template-columns: 1fr 1fr 1fr; } .fx-row-label { grid-column: 1 / -1; } .fx-sep { display: none; } }
@media (max-width: 640px) { .fx-month-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; } .fx-box-value { font-size: 15px; white-space: normal; } }
.fx-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 14px; }
.fx-charts-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.fx-chart-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 6px; background: var(--surface-2); min-width: 0; }
.fx-chart-card h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.fx-chart { position: relative; }
.fx-chart-svg { display: block; width: 100%; height: auto; touch-action: pan-y; } /* pan-y: na dotyku jde stránka scrollovat i přes graf, vodorovný tah ukazuje hodnoty */
.fx-grid { stroke: var(--fx-grid); stroke-width: 1; }
.fx-tick { font-size: 10.5px; fill: var(--text-muted); font-family: inherit; }
.fx-cross { stroke: var(--text-muted); stroke-width: 1; pointer-events: none; }
.fx-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.fx-legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.fx-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px 9px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); z-index: 3; min-width: 150px; }
.fx-tip-h { font-weight: 700; color: var(--heading); margin-bottom: 3px; }
.fx-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fx-tip-row i { width: 12px; height: 2px; display: inline-block; }
.fx-tip-row b { color: var(--heading); }
.fx-tip-row span { color: var(--text-muted); }
.fx-bars { display: flex; flex-direction: column; gap: 6px; }
.fx-bar-row { display: grid; grid-template-columns: 90px 1fr 110px; align-items: center; gap: 8px; font-size: 12px; }
@media (max-width: 640px) { .fx-bar-row { grid-template-columns: 64px minmax(0, 1fr) 84px; gap: 6px; } }
.fx-bar-row:hover .fx-bar { filter: brightness(1.12); }
.fx-bar-label { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-bar-track { height: 18px; position: relative; }
.fx-bar { display: block; height: 18px; background: var(--fx-series); border-radius: 0 4px 4px 0; }
.fx-bar-val { color: var(--heading); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.foreign-table tr.weekend td { color: var(--text-muted); }
.foreign-table tr.weekend td:first-child { color: var(--text-muted); }
