/* Projekty (2026-10-13) – Notion-styl: levý sloupec se seznamy projektů přes celou výšku,
   vpravo projekt s pohledy (Tabulka / Kalendář), filtry, podúkoly. Barvy a zaoblení přes
   proměnné appky (--surface, --border, --radius 3px, --c-<barva>-bg/fg). */

.pj-wrap { flex: 1; min-height: 0; display: flex; }
.pj-wrap[hidden] { display: none; }

/* ---- levý sloupec ---- */
.pj-side { width: 250px; flex: 0 0 250px; border-right: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 14px 8px; gap: 2px; }
.pj-side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.pj-side-list { display: flex; flex-direction: column; gap: 1px; }
.pj-side-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background 0.12s; }
.pj-side-item:hover { background: var(--tgt-hover, rgba(127, 127, 127, 0.12)); }
.pj-side-item.active { background: color-mix(in srgb, var(--heading) 10%, transparent); color: var(--heading); }
.pj-side-icon { width: 20px; text-align: center; font-size: 15px; flex: 0 0 auto; }
.pj-side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-side-count { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.pj-side-new { margin-top: 6px; border: 0; background: none; color: var(--text-muted); text-align: left; padding: 6px 8px; font: inherit; font-size: 13px; cursor: pointer; border-radius: var(--radius); }
.pj-side-new:hover { background: var(--tgt-hover, rgba(127, 127, 127, 0.12)); color: var(--text); }

/* ---- hlavní část ---- */
.pj-main { flex: 1; min-width: 0; overflow: auto; padding: 26px 36px 50px; display: flex; flex-direction: column; gap: 12px; }
.pj-head { display: flex; align-items: center; gap: 12px; }
.pj-big-icon { font-size: 34px; border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: var(--radius); line-height: 1; }
.pj-big-icon:hover:not(:disabled) { background: var(--surface-2); }
.pj-title { margin: 0; font-size: 28px; font-weight: 800; color: var(--heading); cursor: text; }
.pj-more { margin-left: auto; font-size: 20px; }
.pj-views { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 6px; flex-wrap: wrap; }
.pj-tabs { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; min-width: 0; }
.pj-tab { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-muted); padding: 6px 11px; border-radius: var(--radius); cursor: pointer; white-space: nowrap; }
.pj-tab:hover { background: var(--surface-2); color: var(--text); }
.pj-tab.active { background: var(--surface-2); color: var(--heading); box-shadow: inset 0 0 0 1px var(--border); }
.pj-tab.add { font-size: 16px; padding: 3px 10px; }
.pj-tools { display: flex; align-items: center; gap: 6px; }
.pj-search { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; padding: 6px 9px; border-radius: var(--radius); width: 170px; }
@media (max-width: 640px) { .pj-tools { flex-wrap: wrap; } .pj-search { font-size: 16px; width: min(170px, 100%); flex: 1 1 140px; } }
@media (pointer: coarse) { .pj-tool, .pj-tab, .pj-icon-btn { min-height: 40px; } .pj-icon-btn.touch-only { min-width: 40px; min-height: 40px; justify-content: center; align-items: center; } .pj-vis-row .pj-handle, .pj-opt-row .pj-handle { display: none; } }
.pj-tool { border: 1px solid transparent; background: none; color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 9px; border-radius: var(--radius); cursor: pointer; white-space: nowrap; }
.pj-tool:hover { background: var(--surface-2); color: var(--text); }
.pj-tool.on { color: var(--accent); }
.pj-new { padding: 7px 14px; }
.pj-icon-btn { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 3px 6px; border-radius: var(--radius); }
.pj-icon-btn:hover { background: var(--surface-2); color: var(--heading); }
.pj-icon-btn:disabled { opacity: 0.3; cursor: default; }

/* pravidla filtru (Notion: „Stav úkolu: POSTNOUT ▾") */
.pj-rules { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pj-rule { border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-rule.add { border-color: transparent; background: none; color: var(--text-muted); }
.pj-rule.add:hover { color: var(--text); }
.pj-rule-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

/* ---- tabulka ---- */
.pj-table-scroll { overflow: auto; border-top: 1px solid var(--border); }
.pj-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13px; }
.pj-table th { text-align: left; font-weight: 600; color: var(--text-muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); white-space: nowrap; cursor: pointer; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pj-table th:hover { background: var(--surface-2); }
.pj-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); vertical-align: middle; height: 36px; }
.pj-table th:last-child, .pj-table td:last-child { border-right: 0; }
.pj-th-ico { display: inline-block; min-width: 16px; margin-right: 6px; font-size: 11px; opacity: 0.75; text-align: center; }
.pj-c-caret { width: 22px; padding: 0 0 0 4px !important; border-right: 0 !important; cursor: default !important; }
.pj-c-done { width: 34px; text-align: center !important; cursor: default !important; }
.pj-c-title { min-width: 340px; max-width: 520px; }
@media (max-width: 640px) { .pj-c-title { min-width: 200px; } }
.pj-c-status, .pj-c-select { min-width: 130px; }
.pj-c-multi_select { min-width: 170px; max-width: 280px; }
.pj-c-person { min-width: 150px; }
.pj-c-date { min-width: 110px; white-space: nowrap; }
.pj-c-url { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-c-text { min-width: 160px; max-width: 320px; }
.pj-c-progress { min-width: 130px; }
.pj-c-add { width: 40px; }
.pj-cell { cursor: pointer; }
.pj-row:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.pj-row.done .pj-item-title { color: var(--text-muted); text-decoration: line-through; }
.pj-title-cell { display: flex; align-items: center; gap: 7px; min-width: 0; cursor: text; }
.pj-item-title { font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pj-parent { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.pj-sub-count, .pj-com-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.pj-open { margin-left: auto; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 2px 7px; border-radius: var(--radius); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.pj-row:hover .pj-open { opacity: 1; }
/* Dotyk: „Otevřít“ je jediná cesta do detailu úkolu (klik na název edituje) – vidět natrvalo. */
@media (hover: none) { .pj-open { opacity: 1; min-height: 32px; } }
.pj-open:hover { color: var(--heading); }
.pj-caret { border: 0; background: none; color: var(--text); cursor: pointer; padding: 2px 4px; display: inline-flex; align-items: center; transition: transform 0.15s; }
.pj-caret.open { transform: rotate(90deg); }
.pj-check { width: 17px; height: 17px; border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; cursor: pointer; padding: 0; line-height: 1; }
.pj-check.on { background: var(--success); border-color: var(--success); }
.pj-check.big { width: 24px; height: 24px; font-size: 14px; flex: 0 0 auto; }
.pj-chip { margin: 1px 4px 1px 0; font-size: 11.5px; padding: 2px 7px; }
.pj-person { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; white-space: nowrap; }
.pj-avatar { width: 20px; height: 20px; border-radius: 50%; font-size: 9px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pj-date.late { color: var(--danger); font-weight: 700; }
.pj-url { color: var(--accent); text-decoration: none; }
.pj-url:hover { text-decoration: underline; }
.pj-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pj-progress span { min-width: 34px; }
.pj-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; min-width: 60px; }
.pj-bar i { display: block; height: 100%; background: var(--success); }
.pj-no-rows { text-align: center; padding: 22px !important; }
.pj-add-row td { border-bottom: 0; }
.pj-add-item { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0; }
.pj-add-item:hover { color: var(--heading); }
.pj-count { padding: 2px 4px; }
.pj-inline-input { position: fixed; z-index: 80; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); resize: vertical; }

/* ---- prázdný stav ---- */
.pj-empty { margin: 60px auto; text-align: center; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pj-empty-icon { font-size: 44px; }
.pj-empty h2 { margin: 0; }

/* ---- popover (filtr, řazení, nový pohled, vlastnosti) ---- */
.pj-pop { position: fixed; z-index: 75; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28); padding: 8px; width: 290px; max-width: calc(100vw - 16px); max-height: 70vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; animation: popIn 0.12s ease; }
.pj-pop-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 2px 4px; }
.pj-pop-input { width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; padding: 7px 9px; border-radius: var(--radius); }
.pj-pop-input:focus { outline: none; border-color: var(--accent); }
.pj-pop-list { display: flex; flex-direction: column; gap: 1px; max-height: 300px; overflow: auto; }
.pj-pop-opt { border: 0; background: none; text-align: left; font: inherit; font-size: 13px; color: var(--text); padding: 6px 8px; border-radius: var(--radius); cursor: pointer; display: flex; align-items: center; }
.pj-pop-opt:hover { background: var(--surface-2); }
.pj-pop-check { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius); cursor: pointer; }
.pj-pop-check:hover { background: var(--surface-2); }
.pj-rule-head { display: flex; align-items: center; gap: 8px; }
.pj-rule-head select, .pj-sort-row select, .pj-opt-row select { font: inherit; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 4px 6px; }
.pj-rule-head strong { font-size: 13px; }
.pj-rule-head .pj-icon-btn { margin-left: auto; }
.pj-sort-row, .pj-opt-row { display: flex; align-items: center; gap: 6px; }
.pj-sort-row select { flex: 1; min-width: 0; }
.pj-opt-row input { flex: 1; min-width: 0; font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 4px 7px; }
.pj-swatch { width: 18px; height: 18px; border-radius: var(--radius); border: 0; cursor: pointer; flex: 0 0 auto; }
.pj-swatch.c-blue { background: var(--c-blue-bg); } .pj-swatch.c-green { background: var(--c-green-bg); } .pj-swatch.c-yellow { background: var(--c-yellow-bg); }
.pj-swatch.c-orange { background: var(--c-orange-bg); } .pj-swatch.c-red { background: var(--c-red-bg); } .pj-swatch.c-pink { background: var(--c-pink-bg); }
.pj-swatch.c-purple { background: var(--c-purple-bg); } .pj-swatch.c-teal { background: var(--c-teal-bg); } .pj-swatch.c-gray { background: var(--c-gray-bg); } .pj-swatch.c-brown { background: var(--c-brown-bg); }
.pj-seg { display: flex; gap: 4px; }
.pj-seg button { flex: 1; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px; border-radius: var(--radius); cursor: pointer; }
.pj-seg button.on { border-color: var(--accent); color: var(--accent); }

/* ---- kalendář projektu ---- */
.pj-cal-nav { display: flex; align-items: center; gap: 8px; }
.pj-cal-sp { flex: 1; }
.pj-cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.pj-cal-wd div { padding: 2px 8px; }
.pj-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pj-cal-day { background: var(--surface); min-width: 0; min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.pj-cal-day.outside { opacity: 0.5; background: var(--surface-2); }
.pj-cal-day.today .pj-cal-num { background: var(--today); color: #fff; }
.pj-cal-num { font-size: 12px; font-weight: 700; color: var(--text-muted); align-self: flex-start; padding: 1px 6px; border-radius: var(--radius); }
.pj-cal-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 8px; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.pj-cal-card:hover { border-color: var(--border-strong); }
.pj-cal-card.done .pj-cal-t { text-decoration: line-through; color: var(--text-muted); }
.pj-cal-t { font-weight: 700; color: var(--heading); }

/* ---- detail úkolu ---- */
.modal.pj-item-modal { max-width: 760px; gap: 12px; }
.pj-crumb { display: flex; align-items: center; gap: 6px; }
.pj-crumb a { color: inherit; }
.pj-crumb-sp { flex: 1; }
.pj-item-head { display: flex; align-items: flex-start; gap: 12px; }
.pj-item-head .pj-check { margin-top: 6px; }
.pj-item-title-input { flex: 1; border: 0; background: none; font: inherit; font-size: 24px; font-weight: 800; color: var(--heading); resize: none; padding: 0; overflow: hidden; line-height: 1.3; }
.pj-item-title-input:focus { outline: none; }
.pj-props { display: grid; grid-template-columns: 170px 1fr; gap: 2px 10px; align-items: center; }
.pj-prop-l { color: var(--text-muted); font-size: 13px; padding: 6px 0; }
.pj-prop-v { min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; padding: 4px 8px; border-radius: var(--radius); font-size: 13px; }
.pj-prop-v.pj-cell:hover { background: var(--surface-2); }
.pj-sec-title { font-size: 13px; font-weight: 700; color: var(--heading); border-top: 1px solid var(--border); padding-top: 12px; display: flex; gap: 8px; align-items: baseline; }
.pj-subs { display: flex; flex-direction: column; gap: 2px; }
.pj-sub { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: var(--radius); }
.pj-sub:hover { background: var(--surface-2); }
.pj-sub.done .pj-sub-title { text-decoration: line-through; color: var(--text-muted); }
.pj-sub-title { flex: 1; min-width: 0; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.pj-sub-title:hover { text-decoration: underline; }
.pj-sub-meta { font-size: 12px; }
.pj-sub-add { border: 0; border-bottom: 1px dashed var(--border); background: none; font: inherit; font-size: 13px; color: var(--text); padding: 7px 6px; }
.pj-sub-add:focus { outline: none; border-bottom-color: var(--accent); }
.pj-comments { display: flex; flex-direction: column; gap: 10px; }
.pj-comment { display: flex; gap: 9px; }
.pj-comment-text { font-size: 13.5px; white-space: pre-wrap; margin-top: 2px; }
.pj-comment-add { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; }
.pj-comment-add textarea { flex: 1; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--text); resize: none; padding: 1px 0; }
.pj-comment-add textarea:focus { outline: none; }
.pj-link { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; padding: 0; }
.pj-modal-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }

@media (max-width: 800px) {
  .pj-side { width: 190px; flex-basis: 190px; }
  .pj-main { padding: 16px; }
  .pj-props { grid-template-columns: 120px 1fr; }
}
/* Mobil (2026-11-02): seznam projektů nahoře jako vodorovný pás (scrolluje do strany jen on). */
@media (max-width: 640px) {
  .pj-wrap { flex-direction: column; }
  .pj-side { width: auto; flex: 0 0 auto; flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .pj-side-head { display: none; }
  .pj-side-list { flex-direction: row; gap: 4px; }
  .pj-side-item { flex: 0 0 auto; min-height: 40px; padding: 6px 10px; }
  .pj-side-name { overflow: visible; flex: 0 0 auto; }
  .pj-side-new { flex: 0 0 auto; margin-top: 0; white-space: nowrap; min-height: 40px; }
}
@media (max-width: 640px) { .pj-main { padding: 12px 10px 40px; } .pj-title { font-size: 22px; } .pj-big-icon { font-size: 26px; } }
@media (max-width: 640px) { .pj-props { grid-template-columns: minmax(90px, 34%) minmax(0, 1fr); } .pj-item-title-input { font-size: 20px; } .pj-cal-day { min-height: 70px; padding: 3px; } .pj-cal-wd div { padding: 2px 3px; } }
.pj-cal-card .pj-chip { align-self: flex-start; }
/* Přetahování sloupců (2026-10-13) – značka, kam sloupec dopadne. */
.pj-table th[draggable="true"] { cursor: grab; }
.pj-table th.dragging { opacity: 0.4; }
.pj-table th.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
.pj-table th.drop-after { box-shadow: inset -3px 0 0 var(--accent); }
/* Editor možností (2026-10-13, uživatel: „není tu vidět Stav, je to moc úzké") – název
   možnosti nesmí zmáčknout výběr skupiny. */
.pj-pop.wide { width: 400px; }
.pj-opt-row input { min-width: 140px; }
.pj-opt-row select { flex: 0 0 120px; width: 120px; }
@media (max-width: 640px) { .pj-opt-row { flex-wrap: wrap; padding: 2px 0; } .pj-opt-row input { min-width: 0; flex: 1 1 120px; font-size: 16px; } .pj-opt-row select { flex: 0 0 auto; width: auto; max-width: 100%; font-size: 16px; } }
.pj-handle { cursor: grab; color: var(--text-muted); padding: 0 2px; user-select: none; }
.pj-palette { display: flex; gap: 5px; flex-wrap: wrap; padding: 4px 0 6px 26px; }
.pj-palette .pj-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--heading); }
#pjOptNew { margin-top: 4px; }
/* Pokročilý filtr (Kde / a / nebo) */
.pj-pop.xwide { width: 640px; max-width: calc(100vw - 20px); }
.pj-fe-rows { display: flex; flex-direction: column; gap: 6px; }
.pj-fe-row { display: grid; grid-template-columns: 60px 150px 160px 1fr 26px; gap: 6px; align-items: center; }
.pj-fe-row select, .pj-fe-input, .pj-fe-rel input, .pj-fe-rel select { font: inherit; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 5px 6px; min-width: 0; width: 100%; }
.pj-fe-conj { font-size: 12.5px; color: var(--text-muted); }
.pj-fe-rel { display: grid; grid-template-columns: 1fr 60px 1fr; gap: 4px; }
.pj-fe-val { font: inherit; font-size: 12.5px; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 5px 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-fe-foot { display: flex; align-items: center; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 4px; }
.danger-text { color: var(--danger) !important; }

/* ---- panely na stránce, zámek ---- */
.pj-panel { display: flex; flex-direction: column; gap: 10px; }
.pj-panel + .pj-panel { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--border); }
.pj-panel-view { font: inherit; font-size: 13px; font-weight: 700; border: 1px solid var(--border); background: var(--surface-2); color: var(--heading); border-radius: var(--radius); padding: 5px 8px; }
.pj-settings-btn { font-size: 16px; padding: 3px 8px; }
.pj-lock-badge { font-size: 12px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.pj-side-lock { font-size: 11px; }
.pj-draft-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: var(--radius); font-size: 13px; }

/* ---- seskupení v tabulce ---- */
.pj-group-row td { padding: 10px 6px 4px !important; border-right: 0 !important; height: auto; }
.pj-group-head { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--heading); cursor: pointer; padding: 2px 4px; border-radius: var(--radius); }
.pj-group-head:hover { background: var(--surface-2); }
.pj-group-head .pj-caret { padding: 0; }
.pj-group-count { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-left: 4px; }

/* ---- Board ---- */
.pj-board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 10px; }
.pj-col { flex: 0 0 min(260px, 82vw); background: var(--surface-2); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; }
.pj-col.drop-on { border-color: var(--accent); }
.pj-col-head { display: flex; align-items: center; gap: 4px; padding: 2px 2px 4px; }
.pj-col-body { display: flex; flex-direction: column; gap: 6px; min-height: 30px; }
.pj-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); font-size: 12.5px; }
.pj-card:hover { border-color: var(--border-strong); }
.pj-card.dragging { opacity: 0.4; }
.pj-card.done .pj-card-t { text-decoration: line-through; color: var(--text-muted); }
.pj-card-t { font-weight: 700; color: var(--heading); font-size: 13px; }
.pj-card-f { display: flex; flex-wrap: wrap; align-items: center; }
.pj-cal-day .pj-card { padding: 6px 8px; }

/* ---- Nastavení pohledu (panel vpravo) ---- */
.pj-settings { position: fixed; right: 16px; z-index: 74; width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 140px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3); padding: 10px; display: flex; flex-direction: column; gap: 4px; animation: popIn 0.12s ease; }
.pj-set-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 6px; font-size: 13.5px; }
.pj-set-row { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; width: 100%; }
.pj-set-row:hover, .pj-set-row.on { background: var(--surface-2); }
.pj-set-ico { width: 20px; text-align: center; flex: 0 0 auto; opacity: 0.85; }
.pj-set-val { margin-left: auto; color: var(--text-muted); font-size: 12.5px; }
.pj-set-arr { color: var(--text-muted); }
.pj-set-val + .pj-set-arr { margin-left: 6px; }
.pj-set-row .pj-set-arr:only-of-type { margin-left: auto; }
.pj-set-sec { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 10px 8px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.pj-set-sec .pj-link { text-transform: none; letter-spacing: 0; font-size: 12px; text-decoration: none; color: var(--accent); }
.pj-set-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); padding: 6px 4px; }
.pj-set-field select { font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 6px; }
.pj-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pj-layout { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; padding: 10px 4px; border-radius: var(--radius); cursor: pointer; }
.pj-layout span { font-size: 18px; }
.pj-layout.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pj-vis-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: var(--radius); font-size: 13px; }
.pj-vis-row:hover { background: var(--surface-2); }
.pj-vis-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-eye { border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 0 4px; }
.pj-eye.on { color: var(--heading); }
@media (pointer: coarse) { .pj-eye { min-width: 40px; min-height: 40px; } }
.pj-set-rules { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; }
.pj-fe-row { grid-template-columns: 70px 150px 160px 1fr 26px; }
@media (max-width: 640px) { .pj-fe-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pj-settings { right: 8px; } }
.pj-col-head[draggable="true"] { cursor: grab; }
