:root {
  --bg: #f4f6f9; --panel: #fff; --ink: #172033; --muted: #5b6678; --line: #e2e7ee; --line2: #cfd6e0;
  --accent: #0f766e; --accent-ink: #fff; --accent-soft: #e0f2f0; --danger: #c62828; --ok: #157f3c; --warn: #b45309;
  --col: #eef1f5; --side: #0f1f24; --side-ink: #c6cede; --side-active: #1b3339;
  --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1420; --panel: #171e2c; --ink: #e5e9f0; --muted: #96a0b2; --line: #263043; --line2: #33405a;
    --accent: #2dd4bf; --accent-ink: #04201d; --accent-soft: #123a36; --col: #131a27; --side: #0a0f19; --side-active: #1a2438;
    --shadow: 0 1px 2px rgba(0,0,0,.4); }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }
h3 { font-size: .95rem; margin: 1rem 0 .5rem; }
.mono, code, pre { font-family: ui-monospace, "JetBrains Mono", Menlo, monospace; font-size: .9em; }
pre { background: var(--col); padding: .75rem; border-radius: 6px; overflow: auto; }
.muted { color: var(--muted); }
.small { font-size: .85em; }

/* layout */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; padding: 4px 8px 14px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg,#14b8a6,#0e7490); display: grid; place-items: center; font-size: .8rem; }
.side a { display: flex; gap: 9px; align-items: center; color: var(--side-ink); padding: 7px 10px; border-radius: 6px; font-size: .93rem; }
.side a:hover { background: var(--side-active); text-decoration: none; color: #fff; }
.side a.on { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.side .sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7b869b; padding: 14px 10px 4px; }
.side .ico { width: 18px; text-align: center; opacity: .85; }
.side .proj { color: #fff; font-weight: 600; padding: 8px 10px 2px; font-size: .95rem; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .grow { flex: 1; }
.topbar form input { width: 260px; }
.content { padding: 20px 22px 40px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs { color: var(--muted); font-size: .85rem; margin-bottom: 2px; }

/* components */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.grid > .card + .card { margin-top: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split, .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .app { grid-template-columns: 1fr; } .side { position: static; height: auto; } .split, .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .9rem; white-space: nowrap; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 3px 8px; font-size: .82rem; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

input[type=text], input[type=number], input[type=date], input[type=email], input[type=url], input[type=password], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 6px 9px; max-width: 100%; }
textarea { width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=color] { width: 44px; height: 30px; padding: 2px; border: 1px solid var(--line2); border-radius: 6px; background: var(--panel); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 3px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea { width: 100%; }
.field .help { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.field .err, .errorlist { color: var(--danger); font-size: .82rem; margin: 3px 0 0; padding: 0; list-style: none; }
.field ul:not(.errorlist) { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 6px 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { padding: 5px 8px; font-size: .88rem; }

table.tbl { width: 100%; border-collapse: collapse; background: var(--panel); }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--col); }
.tbl tr:hover td { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--col); color: var(--muted); white-space: nowrap; }
.state { color: #fff; }
.type-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: #fff; font-size: 10px; flex: none; }
.key { font-family: ui-monospace, monospace; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.closed .ttl { text-decoration: line-through; color: var(--muted); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: .68rem; }
.avatar.md { width: 32px; height: 32px; font-size: .8rem; }
.avatar.empty { background: var(--col); color: var(--muted); border: 1px dashed var(--line2); }
.p-low { color: #64748b; } .p-normal { color: #2563eb; } .p-high { color: #d97706; } .p-urgent { color: #dc2626; } .p-critical { color: #fff; background: #b91c1c; border-radius: 3px; padding: 0 4px; }
.label { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 6px; font-size: .75rem; margin-right: 3px; }
.progress { height: 6px; background: var(--col); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ok); }
.stat { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .8rem; }
.overdue { color: var(--danger); font-weight: 600; }
.messages { list-style: none; padding: 0; margin: 0 0 14px; }
.messages li { padding: 9px 12px; border-radius: 6px; margin-bottom: 6px; background: var(--accent-soft); border: 1px solid var(--line); }
.messages .error { background: #fdecec; color: #8a1c1c; border-color: #f5c2c2; }
.messages .success { background: #e7f6ec; color: #135c2e; border-color: #bfe5cc; }
@media (prefers-color-scheme: dark) { .messages .error { background:#3a1717; color:#ffb4b4; } .messages .success { background:#12301f; color:#9be3b5; } }
.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 10px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; }
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md table { border-collapse: collapse; } .md td, .md th { border: 1px solid var(--line); padding: 4px 8px; }
.md img { max-width: 100%; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .88rem; display: flex; gap: 8px; align-items: flex-start; }
.feed li:last-child { border: 0; }

/* Board */
.board-wrap { overflow-x: auto; padding-bottom: 10px; }
.board { display: grid; column-gap: 10px; row-gap: 0; min-width: min-content; }
.col-wrap { margin-bottom: 10px; display: flex; flex-direction: column; }
.col-wrap > .col { flex: 1; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--col); border-radius: 8px 8px 0 0;
  border-top: 3px solid var(--c, #64748b); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.col-head .wip { font-weight: 600; font-size: .75rem; padding: 1px 7px; border-radius: 99px; background: var(--panel); color: var(--muted); }
.col-head.full .wip { background: #fff3cd; color: var(--warn); }
.col-head.over { background: #fde8e8; } .col-head.over .wip { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .col-head.over { background: #3a1b1b; } }
.lane-title { grid-column: 1 / -1; font-weight: 600; padding: 10px 4px 4px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.col { background: var(--col); border-radius: 0 0 8px 8px; padding: 6px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.lane .col { border-radius: 8px; min-height: 60px; }
.issue-card { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; box-shadow: var(--shadow); cursor: grab; position: relative; }
.issue-card:hover { border-color: var(--line2); }
.issue-card.is-done { opacity: .72; }
.issue-card .ttl { display: block; color: var(--ink); margin: 3px 0 6px; font-size: .92rem; line-height: 1.3; }
.issue-card .meta { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.issue-card .meta .grow { flex: 1; }
.issue-card .cf { font-size: .74rem; color: var(--muted); }
.issue-card .epic-tag { font-size: .7rem; color: #7c3aed; background: #f3ecff; padding: 0 5px; border-radius: 3px; }
@media (prefers-color-scheme: dark) { .issue-card .epic-tag { background:#2b1f47; color:#c4a8ff; } }
.sortable-ghost { opacity: .35; outline: 2px dashed var(--accent); }
.sortable-drag { transform: rotate(2deg); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.drop-flash { animation: flash .8s; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: var(--shadow); } }
.quick-add { display: none; }
.quick-add input { width: 100%; }
.signal { border: 1px solid #f2c94c; background: #fff8e1; color: #6b4e00; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .signal { background:#33290c; color:#f2d98a; border-color:#6b5512; } }
.toast { position: fixed; bottom: 18px; right: 18px; background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 99; max-width: 420px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.err { background: var(--danger); }

/* Backlog */
.bl-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.bl-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bl-head .grow { flex: 1; }
.bl-list { min-height: 44px; padding: 4px; }
.bl-row { display: grid; grid-template-columns: 18px 22px 76px minmax(0,1fr) auto 70px 52px 26px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; background: var(--panel); }
.bl-row:hover { background: var(--col); }
.bl-row .handle { cursor: grab; color: var(--muted); user-select: none; }
.bl-row .pts { text-align: center; background: var(--col); border-radius: 99px; font-size: .78rem; padding: 1px 0; }
.bl-row .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.capacity { font-size: .8rem; }
.capacity.over { color: var(--danger); font-weight: 600; }

/* Gantt */
.gantt-host { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.gantt .bar-wrapper.bar-epic .bar { fill: #7c3aed; } .gantt .bar-wrapper.bar-epic .bar-progress { fill: #5b21b6; }
.gantt .bar-wrapper.bar-done .bar { fill: #86efac; } .gantt .bar-wrapper.bar-done .bar-progress { fill: #16a34a; }
.gantt .bar-wrapper.bar-late .bar { fill: #fca5a5; } .gantt .bar-wrapper.bar-late .bar-progress { fill: #dc2626; }
.gantt .bar-wrapper.bar-milestone .bar { fill: #f59e0b; } .gantt .bar-wrapper.bar-sprint .bar { fill: #cbd5e1; }
.gantt .bar-wrapper.bar-sprint .bar-label, .gantt .bar-wrapper.bar-milestone .bar-label { fill: #1e293b; font-weight: 600; }
.gantt-legend span { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; font-size: .82rem; }
.gantt-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

.diff { font-family: ui-monospace, monospace; font-size: .85rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: auto; }
.diff div { padding: 0 10px; white-space: pre-wrap; }
.diff .add { background: #e6ffec; } .diff .del { background: #ffebe9; } .diff .hunk { color: var(--muted); background: var(--col); }
@media (prefers-color-scheme: dark) { .diff .add { background:#12301f; } .diff .del { background:#3a1717; } }
.wiki-tree a { display: block; padding: 3px 0; }
.chart-box { position: relative; height: 280px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: 360px; }

/* Editor a našepkávač */
.editor-holder { width: 100%; }
.editor-holder .toastui-editor-defaultUI { border-color: var(--line2); border-radius: 6px; }
.editor-holder .toastui-editor-contents, .editor-holder .ProseMirror { font-size: 14px; font-family: inherit; }
.suggest { position: absolute; z-index: 200; min-width: 320px; max-width: 560px; max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.18); padding: 4px; }
.suggest-item { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: .88rem; }
.suggest-item.on, .suggest-item:hover { background: var(--accent-soft); }
.suggest-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-title.closed-t { text-decoration: line-through; color: var(--muted); }
.suggest-empty { padding: 8px; color: var(--muted); font-size: .85rem; }
.issue-picker-wrap { display: flex; gap: 4px; align-items: center; }
.issue-picker-wrap .issue-picker { flex: 1; }
.md img { max-width: 100%; border-radius: 4px; }
.bell { position: relative; display: inline-flex; align-items: center; padding: 4px 6px; border-radius: 6px; color: var(--ink); }
.bell .cnt { position: absolute; top: -3px; right: -4px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 3px; }
.notif-unread { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }

/* Git */
.git-path { margin: 0 0 10px; font-size: .95rem; }
.last-commit { padding: 10px 14px; margin-bottom: 10px; }
.git-tree td:first-child a { color: var(--ink); }
.dfile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.dfile-head { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--col); border-bottom: 1px solid var(--line); font-size: .88rem; flex-wrap: wrap; }
.dtable { width: 100%; border-collapse: collapse; font-family: ui-monospace, "JetBrains Mono", Menlo, monospace; font-size: .8rem; }
.dtable td { padding: 0 8px; vertical-align: top; white-space: pre-wrap; word-break: break-all; line-height: 1.5; }
.dtable td.ln { width: 1%; min-width: 42px; text-align: right; color: var(--muted); user-select: none; border-right: 1px solid var(--line); white-space: nowrap; }
.dtable td.ln a { color: var(--muted); }
.dtable .sign { display: inline-block; width: 1.2em; color: var(--muted); user-select: none; }
.d-add td { background: #e6ffec; } .d-del td { background: #ffebe9; }
.d-add td.ln { background: #ccffd8; } .d-del td.ln { background: #ffd7d5; }
.d-hunk td, .d-meta td { background: var(--accent-soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .d-add td { background: #12301f; } .d-del td { background: #3a1717; } .d-add td.ln { background: #174028; } .d-del td.ln { background: #4a1d1d; } }
.ln-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.ln-btn:hover { color: var(--accent); text-decoration: underline; }
.d-comment td { background: var(--panel) !important; white-space: normal; font-family: inherit; font-size: .88rem; padding: 6px 12px; }
.inline-comment { border-left: 3px solid var(--accent); padding: 4px 10px; background: var(--col); border-radius: 4px; }
.diff-summary { margin: 4px 0 6px; }
.diff-index { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; max-height: 220px; overflow-y: auto; }
.diff-index a { display: block; padding: 4px 12px; font-size: .84rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.dstat { display: inline-block; width: 18px; text-align: center; border-radius: 3px; font-size: .7rem; font-weight: 700; color: #fff; background: #64748b; }
.dstat-A { background: #16a34a; } .dstat-D { background: #dc2626; } .dstat-R { background: #7c3aed; } .dstat-M { background: #2563eb; }
.add-c { color: #16a34a; font-weight: 600; } .del-c { color: #dc2626; font-weight: 600; }
.pr-open { background: #dbeafe; color: #1d4ed8; } .pr-merged { background: #ede9fe; color: #6d28d9; } .pr-declined { background: #fee2e2; color: #b91c1c; }
.rvb-approved { background: #dcfce7; color: #166534; } .rvb-needs_work { background: #fef3c7; color: #92400e; }
.rv { display: inline-block; border-radius: 50%; margin-right: 2px; }
.rv-approved { box-shadow: 0 0 0 2px #16a34a; } .rv-needs_work { box-shadow: 0 0 0 2px #f59e0b; }

/* skupiny a tímy */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .76rem;
  font-weight: 600; background: var(--col); color: var(--ink);
  white-space: nowrap; text-decoration: none; margin: 1px 2px 1px 0; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chip, var(--muted)); flex: none; }
.chip.lead::before { display: none; }
a.chip:hover { text-decoration: none; filter: brightness(.96); }
.chip.lead { background: var(--accent-soft); color: var(--accent); }
.team-card { border-top: 4px solid var(--chip, var(--accent)); }
.team-card h3 { margin: 0 0 4px; }
.role-pick { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.role-pick label { font-size: .8rem; display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form input[type=text], .inline-form input[type=number] { padding: 5px 8px; }

/* retrospektíva */
.retro-board { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(220px, 1fr)); gap: 12px; overflow-x: auto; }
.retro-col { background: var(--col); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--line2); }
.retro-start, .retro-well, .retro-liked, .retro-glad { border-top-color: #16a34a; }
.retro-stop, .retro-bad, .retro-mad, .retro-lacked { border-top-color: #dc2626; }
.retro-continue, .retro-idea, .retro-learned, .retro-longed { border-top-color: #2563eb; }
.retro-sad { border-top-color: #d97706; }
.retro-col-head { padding: 2px 4px 4px; letter-spacing: .04em; }
.retro-item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; box-shadow: var(--shadow); }
.retro-text { white-space: normal; word-break: break-word; }
.retro-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; }
.retro-add textarea { width: 100%; resize: vertical; }
.btn.vote.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) { .retro-board { grid-template-columns: 1fr; } }

/* odhadovanie */
.poker-cards { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.poker-card { width: 64px; height: 92px; border-radius: 10px; border: 2px solid var(--line2); background: var(--panel); font-size: 1.4rem;
  font-weight: 700; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  transition: transform .08s, border-color .08s; }
.poker-card:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--accent); }
.poker-card.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-6px); }
.poker-card:disabled { opacity: .45; cursor: default; }
.poker-dist { display: flex; gap: 10px; align-items: flex-end; min-height: 140px; margin: 10px 0; flex-wrap: wrap; }
.poker-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; }
.poker-bar .bar { width: 36px; background: var(--accent); border-radius: 6px 6px 0 0; }
.poker-bar .val { font-weight: 700; }
.poker-queue li { padding: 4px 6px; border-radius: 6px; list-style: none; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.poker-queue li.current { background: var(--accent-soft); font-weight: 600; }
.poker-queue { padding: 0; margin: 0; }
.poker-status { font-size: 1.05rem; }
[hidden] { display: none !important; }

[hidden] { display: none !important; }
/* ---------------- Kaskáda ---------------- */
.rag { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }
.rag-G { background: #16a34a; } .rag-A { background: #f59e0b; } .rag-R { background: #dc2626; }
.rag-pill { display: inline-flex; gap: 6px; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--col); font-size: .8rem; font-weight: 600; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 1.35rem; }
.kpi span { color: var(--muted); font-size: .8rem; }
.neg { color: var(--danger); } .pos { color: var(--ok); }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl tr.summary td { font-weight: 600; background: var(--col); }
.tbl tr.phase td { font-weight: 700; background: var(--accent-soft); }
.tbl tr.crit td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.indent { display: inline-block; }
.heat { display: grid; grid-template-columns: 28px repeat(5, 1fr); gap: 3px; max-width: 420px; }
.heat div { min-height: 44px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.heat .ax { background: none; color: var(--muted); font-weight: 500; min-height: auto; }
.h-low { background: #dcfce7; color: #166534; } .h-medium { background: #fef3c7; color: #92400e; } .h-high { background: #fee2e2; color: #991b1b; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--col); font-size: .76rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tag.ok { background: #dcfce7; color: #166534; } .tag.warn { background: #fef3c7; color: #92400e; } .tag.bad { background: #fee2e2; color: #991b1b; } .tag.info { background: var(--accent-soft); color: var(--accent); }
.phase-strip { display: flex; gap: 4px; margin: 6px 0 2px; flex-wrap: wrap; }
.phase-strip a { flex: 1; min-width: 110px; padding: 8px 10px; border-radius: 6px; background: var(--col); color: var(--ink); font-size: .82rem; border-top: 4px solid var(--line2); }
.phase-strip a.done { border-top-color: #16a34a; } .phase-strip a.active { border-top-color: var(--accent); background: var(--accent-soft); }
.phase-strip a.late { border-top-color: #dc2626; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.load-cell { font-size: .75rem; text-align: center; border-radius: 4px; padding: 3px 2px; }
.load-0 { color: var(--muted); } .load-ok { background: #dcfce7; } .load-high { background: #fef3c7; } .load-over { background: #fecaca; font-weight: 700; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Gantt */
.gantt-wrap { display: grid; grid-template-columns: var(--gtable, 560px) 6px 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; height: calc(100vh - 210px); min-height: 420px; }
.gantt-split { cursor: col-resize; background: var(--line); }
.gantt-table, .gantt-chart { overflow: auto; position: relative; }
.gantt-table table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: .82rem; }
.gantt-table th { position: sticky; top: 0; background: var(--col); z-index: 2; height: 44px; font-weight: 600; text-align: left; padding: 0 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gantt-table td { height: 28px; padding: 0 6px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.gantt-table tr.sel td { background: var(--accent-soft); }
.gantt-table tr.summary td { font-weight: 600; }
.gantt-table tr.phase td { font-weight: 700; }
.gantt-table td[contenteditable="true"]:focus { outline: 2px solid var(--accent); background: var(--panel); }
.gantt-table td.edit { cursor: text; }
.gantt-table .tw { cursor: pointer; display: inline-block; width: 14px; color: var(--muted); }
.gantt-chart svg { display: block; }
.g-grid line { stroke: var(--line); }
.g-weekend { fill: var(--col); }
.g-head text { font-size: 11px; fill: var(--muted); }
.g-bar { fill: #5b8def; } .g-bar.crit { fill: #e5484d; } .g-bar.done { fill: #94a3b8; }
.g-prog { fill: rgba(0,0,0,.28); }
.g-sum { fill: #334155; } .g-phase { fill: var(--accent); }
.g-base { fill: #cbd5e1; }
.g-ms { fill: #111827; } .g-ms.crit { fill: #e5484d; }
.g-link { fill: none; stroke: #64748b; stroke-width: 1.2; }
.g-link.crit { stroke: #e5484d; }
.g-today { stroke: #f59e0b; stroke-width: 1.5; stroke-dasharray: 4 3; }
.g-status { stroke: #0f766e; stroke-width: 1.5; }
.g-label { font-size: 11px; fill: var(--ink); }
.g-row.sel { fill: var(--accent-soft); }
.g-handle { fill: transparent; cursor: ew-resize; }
.g-dot { fill: var(--panel); stroke: #64748b; cursor: crosshair; opacity: 0; }
.g-task:hover .g-dot { opacity: 1; }
.g-task { cursor: grab; }
.gantt-toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
@media (prefers-color-scheme: dark) { .g-sum { fill: #cbd5e1; } .g-ms { fill: #e5e7eb; } .g-base { fill: #475569; } }
/* PERT */
.pert-node rect { fill: var(--panel); stroke: var(--line2); }
.pert-node.crit rect { stroke: #e5484d; stroke-width: 2; }
.pert-node text { font-size: 11px; fill: var(--ink); }
/* tlač */
@media print {
  .side, .topbar, .no-print, .btn { display: none !important; }
  .app { display: block; } .content { padding: 0; } .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
