/* Dílna — obrazovky: Moje úkoly, řádky úkolů, projekty, detail projektu, seznam, kanban, detail úkolu, oznámení, nastavení. */

/* ---------- řádek úkolu ---------- */
.trows { overflow: hidden; }
.trow {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 10px; min-height: 52px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: relative; transition: background var(--t-fast), opacity var(--t);
}
.trow:last-child { border-bottom: 0; }
.trow:hover { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.trow.as-btn { width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.t-main { flex: 1; min-width: 0; cursor: pointer; padding: 2px 0; }
.t-name { font-weight: 550; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.trow.done .t-name { text-decoration: line-through; color: var(--muted); }
.trow.leaving { animation: leave .6s var(--ease) .35s forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(8px); } }
.t-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.tmeta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.tmeta svg { width: 13px; height: 13px; }
.t-proj { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-weight: 500; }
.t-proj .sq, .sq { width: 9px; height: 9px; border-radius: 3px; flex: none; display: inline-block; }
.t-side { display: flex; align-items: center; gap: 10px; flex: none; }
.t-side .due { min-width: 64px; justify-content: flex-end; }
.t-more { opacity: .55; }
.trow:hover .t-more, .t-more:focus-visible { opacity: 1; }
.trow-empty { padding: 14px 16px; }

/* ---------- Moje úkoly ---------- */
.my-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface);
  text-align: left; transition: all var(--t-fast);
}
.tile:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tile > svg { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--surface-2); color: var(--muted); flex: none; }
.tile b { display: block; font-size: 22px; line-height: 1.1; font-weight: 700; }
.tile span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.tile.over:not(.zero) > svg { background: var(--danger-soft); color: var(--danger); }
.tile.over:not(.zero) b { color: var(--danger); }
.tile.today:not(.zero) > svg { background: var(--warning-soft); color: var(--warning); }
.tile.week:not(.zero) > svg { background: var(--info-soft); color: var(--info); }
.tile.zero { opacity: .7; }
.tgroup { margin-bottom: 22px; scroll-margin-top: calc(var(--topbar-h) + 12px); }
.tgroup-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; color: var(--text-2); }
.tgroup-h svg { width: 18px; height: 18px; color: var(--muted); }
.tgroup-h h3 { font-size: 14px; }
.tgroup-h .cnt { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 0 7px; border-radius: 99px; }
.tgroup.over .tgroup-h svg, .tgroup.over .tgroup-h h3 { color: var(--danger); }
.tgroup.today .tgroup-h svg { color: var(--warning); }
.tgroup-h.as-btn { border: 0; background: none; padding: 4px 0; width: 100%; text-align: left; cursor: pointer; }

/* ---------- projekty ---------- */
.pr-search { width: min(320px, 100%); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ptile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden; transition: box-shadow var(--t), border-color var(--t), transform var(--t); cursor: pointer; min-width: 0;
}
.ptile::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--pc); }
.ptile:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-1px); }
.ptile.archived { opacity: .75; }
.pt-top { display: flex; align-items: flex-start; gap: 10px; }
.pt-sq { width: 30px; height: 30px; border-radius: 9px; background: var(--pc); flex: none; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ptable .pt-sq { width: 12px; height: 12px; border-radius: 4px; }
.pt-name { display: block; font-weight: 650; font-size: 15px; color: var(--text); }
.pt-name:hover { color: var(--primary); text-decoration: none; }
.pt-client { font-size: 12.5px; color: var(--muted); }
.pt-labels { gap: 5px; }
.pt-desc { margin: 0; }
.pt-prog .row, .pt-budget .row { margin-bottom: 5px; gap: 6px; }
.pt-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.pt-due svg, .ptable td svg.ic { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 3px; }
.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ptable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ptable td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover { background: var(--surface-2); }

/* ---------- detail projektu ---------- */
.project .ph-top { display: flex; align-items: center; gap: 12px; }
.ph-sq { width: 38px; height: 38px; border-radius: 11px; background: var(--pc); flex: none; }
.project h1 { font-size: 23px; }
.ph-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--text-2); margin-top: 3px; }
.ph-members { text-decoration: none !important; }
.ph-desc { margin: 10px 0 0; max-width: 820px; font-size: 13.5px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--warning-soft); color: var(--text); margin-bottom: 14px; font-size: 13.5px; flex-wrap: wrap; }
.banner svg { width: 18px; height: 18px; color: var(--warning); flex: none; }
.banner.info { background: var(--info-soft); }
.banner.info svg { color: var(--info); }
.banner .btn { margin-left: auto; }
.pstats { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pstat { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); min-width: 150px; flex: 0 1 auto; }
.pstat > span { font-size: 12px; }
.pstat b { font-size: 15px; }
.pstat b small { font-weight: 500; font-size: 12px; }
.pstat .progress { margin-top: 3px; height: 5px; }
.pstat.bad b { color: var(--danger); }
.pstat.add { flex-direction: row; align-items: center; justify-content: center; gap: 8px; color: var(--muted); border-style: dashed; cursor: pointer; font-weight: 550; }
.pstat.add:hover { color: var(--primary); border-color: var(--primary); }
.pstat.add svg { width: 18px; height: 18px; }
.ptabs { margin: 18px 0 16px; }
.vtools { gap: 10px; align-items: flex-start; }
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.fb-q { width: 210px; }
.fb-q .inp { min-height: 34px; }
.fb-chips { flex-wrap: wrap; }
.fb-chips .chip svg:last-child { width: 13px; height: 13px; margin-right: -4px; opacity: .6; }

/* seznam */
.lists { display: flex; flex-direction: column; gap: 18px; }
.tlist-h { display: flex; align-items: center; gap: 4px; padding: 0 2px 6px; min-height: 36px; }
.tlist-h h3 { font-size: 15px; cursor: text; padding: 2px 4px; border-radius: 6px; }
.tlist-h h3[data-rename]:hover { background: var(--surface-2); }
.tlist-h .cnt { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; white-space: nowrap; }
.tlist-h .drag-handle { margin-left: -6px; }
.tlist.collapsed .trows, .tlist.collapsed .qadd { display: none; }
.tlist.collapsed .tlist-h { padding-bottom: 0; }
.qadd { display: flex; align-items: center; gap: 4px; margin-top: 6px; position: relative; }
.qadd-ic { position: absolute; left: 12px; color: var(--muted); display: grid; pointer-events: none; }
.qadd-ic svg { width: 17px; height: 17px; }
.qadd .inp { padding-left: 38px; background: transparent; border-style: dashed; min-height: 40px; }
.qadd .inp:focus { background: var(--surface); border-style: solid; }
.lists-foot { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.archived-lists { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.archived-lists summary { padding: 12px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 550; list-style: none; }
.archived-lists summary svg { width: 17px; height: 17px; color: var(--muted); }
.al-row { padding: 8px 16px; border-top: 1px solid var(--border); }

/* kanban */
.kanban {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; align-items: flex-start; scroll-snap-type: x proximity;
  min-height: 300px; scrollbar-width: thin;
}
.kcol { flex: 0 0 290px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 230px); scroll-snap-align: start; }
.kcol-h { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px 14px; }
.kcol-h h3 { font-size: 13.5px; }
.kcol-h .cnt { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); padding: 0 7px; border-radius: 99px; }
.kcol.st-progress .kcol-h h3 { color: var(--info); } .kcol.st-review .kcol-h h3 { color: var(--warning); } .kcol.st-done .kcol-h h3 { color: var(--success); }
.kcol-b:empty::before { content: "Žádné karty — přetáhněte sem nebo přidejte novou"; color: var(--muted); font-size: 12.5px; padding: 14px 8px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--r); }
.kcol-b { display: flex; flex-direction: column; gap: 8px; padding: 2px 8px 8px; overflow-y: auto; min-height: 60px; flex: 1; }
.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 10px 8px 12px; box-shadow: var(--shadow-sm); cursor: grab;
  display: flex; flex-direction: column; gap: 7px; transition: box-shadow var(--t-fast), border-color var(--t-fast); touch-action: manipulation; user-select: none;
}
.kcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kcard.done { opacity: .7; }
.kcard.done .k-name { text-decoration: line-through; color: var(--muted); }
.k-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.k-name { font-weight: 550; font-size: 13.5px; line-height: 1.35; cursor: pointer; overflow-wrap: anywhere; }
.k-name svg { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; margin-right: 4px; }
.k-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; }
.k-foot .icon-btn { margin: -4px -4px -4px 0; }
.kadd { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.kadd textarea { min-height: 64px; }
.kadd-btn { margin: 0 8px 8px; border: 0; background: none; color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 8px; font-weight: 550; font-size: 13px; }
.kadd-btn:hover { background: var(--surface-3); color: var(--text); }
.kadd-btn svg { width: 16px; height: 16px; }

/* soubory a členové */
.file-task { display: flex; align-items: center; gap: 4px; margin-top: 4px; border: 0; background: none; padding: 0; color: var(--primary); font-size: 11.5px; max-width: 100%; text-align: left; }
.file-task svg { width: 13px; height: 13px; flex: none; }
.members-list { overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.mrow:last-child { border-bottom: 0; }
.mrow-role { width: 220px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.mrow-rate { width: 170px; }
.mrow-rate .inp { min-height: 34px; }
.role-chip svg { width: 13px; height: 13px; }
.inline-ic { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; }

/* ---------- detail úkolu ---------- */
.task-modal .modal-b { padding: 0; display: flex; flex-direction: column; }
.tm { display: flex; flex-direction: column; min-height: 100%; }
.tm-loading, .tm-err { padding: 28px; }
.tm-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 3; min-height: 56px; }
.tm-crumbs { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; font-size: 13px; }
.tm-crumbs a { color: var(--text-2); font-weight: 550; display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.tm-crumbs a svg { width: 14px; height: 14px; }
.tm-saved { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tm-saved svg { width: 14px; height: 14px; }
.tm-saved.saving { color: var(--info); }
.tm-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "title side" "main side"; grid-template-rows: auto 1fr;
  column-gap: 28px; padding: 18px 22px 28px; flex: 1; align-items: start;
}
.tm-title-row { grid-area: title; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.check.big { width: 28px; height: 28px; margin-top: 4px; }
.check.big svg { width: 16px; height: 16px; }
.tm-title { flex: 1; font-size: 21px; font-weight: 650; line-height: 1.3; border: 1px solid transparent; background: transparent; resize: none; padding: 3px 6px; border-radius: 8px; overflow: hidden; letter-spacing: -.01em; }
.tm-title:hover:not([readonly]) { border-color: var(--border); }
.tm-title:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); background: var(--surface); }
.tm-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.tm-side { grid-area: side; position: sticky; top: 74px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; }
.done-btn { width: 100%; min-height: 40px; }
.props { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.prop { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 38px; }
.prop dt { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.prop dd { margin: 0; min-width: 0; }
.pbtn { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 34px; padding: 4px 8px; border: 1px solid transparent; background: none; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--text); min-width: 0; }
.pbtn.wrap { flex-wrap: wrap; gap: 4px; }
.pbtn:hover:not([disabled]) { background: var(--surface); border-color: var(--border); }
.pbtn[disabled] { cursor: default; }
.pbtn > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.pbtn .prio svg { width: 15px; height: 15px; }
.sm-inp { min-height: 34px; padding: 5px 8px; font-size: 13.5px; background: var(--surface); }
.tm-meta { padding-top: 6px; border-top: 1px solid var(--border); line-height: 1.6; }
.tm-sec { min-width: 0; }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 30px; }
.sec-h h3 { font-size: 14.5px; }
.sec-h .cnt { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); padding: 0 7px; border-radius: 99px; }
.sec-h .btn { margin-left: auto; }
.tm-md { padding: 10px 12px; border-radius: var(--r); border: 1px solid transparent; cursor: text; }
.tm-md:hover { border-color: var(--border); background: var(--surface-2); }
.tm-md-empty { padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--r); cursor: text; }
.md-tools { margin-left: auto; display: flex; gap: 2px; }
.tm-desc-ed { min-height: 160px; font-size: 14px; }
.subs { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.subs:empty { display: none; }
.subt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface); min-height: 46px; }
.subt:last-child { border-bottom: 0; }
.subt .drag-handle { width: 16px; }
.subt-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px; font-size: 13.5px; overflow-wrap: anywhere; color: var(--text); border-radius: 6px; }
.subt-name:hover { color: var(--primary); }
.subt.done .subt-name { text-decoration: line-through; color: var(--muted); }
.subt-due { border: 0; background: none; font-size: 12px; color: var(--muted); padding: 4px 6px; border-radius: 6px; display: inline-flex; align-items: center; white-space: nowrap; min-height: 30px; }
.subt-due svg { width: 15px; height: 15px; }
.subt-due:hover:not([disabled]), .subt-av:hover:not([disabled]) { background: var(--surface-2); }
.subt-av { border: 0; background: none; padding: 3px; border-radius: 50%; display: grid; }
.subt-edit { min-height: 32px; padding: 4px 8px; }
.subt-add { margin-top: 8px; }
.tm-filelist .files { margin-bottom: 10px; }
.act-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.act-list li { display: flex; gap: 10px; font-size: 13px; }
.tm-activity summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-2); list-style: none; }
.tm-activity summary svg { width: 17px; height: 17px; color: var(--muted); }
.tm-activity summary .cnt { font-size: 12px; color: var(--muted); }
.comments { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; }
.c-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.c-head .icon-btn { opacity: 0; }
.comment:hover .c-head .icon-btn, .c-head .icon-btn:focus-visible { opacity: 1; }
.c-body { background: var(--surface-2); border-radius: 4px var(--r) var(--r) var(--r); padding: 9px 12px; margin-top: 2px; }
.c-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.c-att:first-child { margin-top: 0; }
.composer { display: flex; gap: 10px; align-items: flex-start; }
.composer textarea { min-height: 70px; }
.composer textarea.over { border-color: var(--primary); background: var(--primary-soft); }
.c-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.c-files:empty { display: none; }
.c-actions { margin-top: 6px; }

/* ---------- oznámení ---------- */
.bell-panel { display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 80px)); }
.bp-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.bp-list { overflow-y: auto; }
.bp-foot { display: block; text-align: center; padding: 11px; border-top: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.notif { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; position: relative; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.notif.unread:hover { background: var(--primary-soft); }
.n-av { position: relative; flex: none; }
.n-av .av svg { width: 13px; height: 13px; }
.n-type { position: absolute; right: -5px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); color: var(--primary); }
.n-type svg { width: 11px; height: 11px; }
.n-text { display: block; font-size: 13.5px; line-height: 1.4; }
.notif.unread .n-text { font-weight: 550; }
.n-meta { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.n-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex: none; margin-top: 6px; }

/* ---------- formuláře projektu a úkolu ---------- */
.pform { display: flex; flex-direction: column; gap: 22px; max-width: 980px; margin: 0 auto; }
.pf-sec h3 { margin-bottom: 10px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--r-lg); background: var(--surface); transition: all var(--t-fast); min-width: 0; }
.tpl:hover { border-color: var(--border-strong); }
.tpl.on { border-color: var(--primary); background: var(--primary-soft); }
.tpl small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.tpl-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: #fff; margin-bottom: 4px; }
.tpl-ic svg { width: 18px; height: 18px; }
.tpl:first-child .tpl-ic { color: var(--text-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c); position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch::before { content: ""; position: absolute; inset: -7px; }
.qa-form { display: flex; flex-direction: column; gap: 18px; }
.lg-inp { font-size: 17px; min-height: 48px; font-weight: 550; }
.qa-props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.date-btn { width: 100%; justify-content: flex-start; font-weight: 500; min-width: 0; }
.date-btn span.ellipsis { flex: 1; text-align: left; }
.date-btn .av { box-shadow: none; }

/* ---------- hledání Ctrl+K ---------- */
.pal-modal { width: min(720px, 94vw) !important; max-height: 72vh !important; align-self: start; margin-top: 10vh; }
.pal-modal .modal-b { padding: 0; }
.palette { display: flex; flex-direction: column; max-height: 72vh; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.pal-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.pal-in .inp { border: 0; box-shadow: none !important; font-size: 17px; padding: 8px 0; background: transparent; }
.pal-res { overflow-y: auto; flex: 1; padding: 6px; }
.pal-res .sg-item svg { width: 18px; height: 18px; flex: none; }
.pal-foot { padding: 8px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.pal-foot svg { width: 15px; height: 15px; }

/* ---------- nastavení ---------- */
.set-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { flex-direction: column; border-bottom: 0; gap: 2px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.set-nav a { border-bottom: 0; border-radius: 9px; min-height: 40px; margin: 0; }
.set-nav a.on { background: var(--primary-soft); }
.set-body { display: flex; flex-direction: column; gap: 16px; max-width: 760px; min-width: 0; }
.set-card h3 { margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 12px; }
.kv div { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.toggles { display: flex; flex-direction: column; margin-top: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; min-height: 52px; }
.d-block { display: block; }
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r-lg); background: var(--surface); font-weight: 550; }
.theme-opt svg { width: 17px; height: 17px; display: none; }
.theme-opt.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.tp-prev { width: 100%; height: 56px; border-radius: 8px; border: 1px solid var(--border); }
.tp-prev.light { background: linear-gradient(90deg, #fff 30%, #f4f6f7 30%); }
.tp-prev.dark { background: linear-gradient(90deg, #151b1e 30%, #0d1113 30%); }
.tp-prev.auto { background: linear-gradient(135deg, #fff 50%, #151b1e 50%); }

/* ---------- responzivita ---------- */
@media (max-width: 1100px) {
  .tm-body { grid-template-columns: minmax(0, 1fr) 280px; column-gap: 20px; }
  .my-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tm-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "side" "main"; padding: 14px 16px 28px; }
  .tm-side { position: static; margin-bottom: 18px; }
  .set-wrap { grid-template-columns: 1fr; }
  .set-nav { flex-direction: row; position: static; overflow-x: auto; }
  .set-nav a { white-space: nowrap; }
  .mrow { flex-wrap: wrap; }
  .mrow-role, .mrow-rate { width: auto; }
}
@media (max-width: 768px) {
  .my-tiles { gap: 8px; margin-bottom: 16px; }
  .tile { padding: 10px 12px; gap: 10px; }
  .tile > svg { width: 30px; height: 30px; padding: 6px; }
  .tile b { font-size: 19px; }
  .trow { flex-wrap: wrap; padding: 10px 10px 10px 12px; gap: 8px 10px; align-items: flex-start; }
  .trow .check { margin-top: 1px; }
  .t-main { flex-basis: calc(100% - 80px); }
  .t-side { width: 100%; padding-left: 32px; gap: 8px; flex-wrap: wrap; }
  .t-side .due { min-width: 0; }
  .t-side .t-more { margin-left: auto; opacity: 1; }
  .t-side .t-st { order: -1; }
  .pr-toolbar .seg { width: 100%; }
  .pr-search { width: 100%; }
  .proj-grid { grid-template-columns: 1fr; }
  .project h1 { font-size: 19px; }
  .ph-sq { display: none; }
  .ph-top .icon-btn:first-child { margin-left: -10px; }
  .ph-top { gap: 8px; }
  .pstats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .pstats::-webkit-scrollbar { display: none; }
  .pstat { min-width: 140px; flex: none; }
  .ptabs { margin: 14px -14px 12px; padding: 0 8px; }
  .vtools { flex-direction: column; align-items: stretch; }
  .vtools > .btn { align-self: flex-start; }
  .fbar { width: 100%; }
  .fb-q { width: 100%; }
  .fb-status { width: 100%; }
  .fb-status button { flex: 1; justify-content: center; }
  .fb-chips { flex-wrap: nowrap; width: 100%; }
  .kanban { margin: 0 -14px; padding: 2px 14px 14px; scroll-snap-type: x mandatory; }
  .kcol { flex-basis: 84vw; max-height: none; }
  .kcard { cursor: default; }
  .qa-props { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .theme-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-h { padding: 8px 6px 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); }
  .tm-title { font-size: 18px; }
  .tm-list, .tm-saved span { display: none; }
  .prop { grid-template-columns: 92px minmax(0, 1fr); }
  .c-head .icon-btn { opacity: 1; }
  .pal-modal { width: 100vw !important; max-height: 100% !important; height: 100% !important; margin-top: 0; }
  .palette { max-height: 100%; height: 100%; }
  .pal-foot { display: none; }
  .mrow-rate { width: 100%; }
}
.t-main:focus-visible { box-shadow: var(--focus); border-radius: 6px; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kcol.knew { flex: 0 0 220px; min-height: 64px; align-items: center; justify-content: center; flex-direction: row; gap: 8px; border-style: dashed; color: var(--muted); font-weight: 600; background: transparent; cursor: pointer; }
.kcol.knew:hover { color: var(--primary); border-color: var(--primary); }
.kcol.knew svg { width: 18px; height: 18px; }
