/* ═══════════════════════════════════════════════════════════
   Digitalizace Goodie — interní tiketovací systém
   ═══════════════════════════════════════════════════════════ */

:root{
  --bg:            #0a0c10;
  --bg-2:          #0d1015;
  --surface:       #14181f;
  --surface-2:     #1a1f28;
  --surface-3:     #222833;
  --border:        #242a35;
  --border-soft:   #1c212a;
  --border-strong: #333b49;

  --text:          #e8ecf3;
  --text-2:        #a7b0c0;
  --muted:         #6f7889;
  --faint:         #4a5261;

  --accent:        #5b8cff;
  --accent-2:      #7c5cff;
  --accent-soft:   rgba(91,140,255,.14);

  --st-new:        #4cc2ff;
  --st-open:       #ffb020;
  --st-done:       #34d399;
  --danger:        #ff5f6d;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 24px -8px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.35);
  --shadow-3: 0 24px 60px -20px rgba(0,0,0,.8), 0 6px 18px rgba(0,0,0,.45);

  --topbar-h: 58px;
  --rail-w:   56px;
  --drawer-w: 760px;

  --font: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;
}

*,*::before,*::after{ box-sizing:border-box; }
/* vlastní display na třídě by jinak přebil skrytí atributem hidden */
[hidden]{ display:none !important; }
html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--font); font-size:14px; line-height:1.45;
  -webkit-font-smoothing:antialiased; overflow:hidden;
  text-rendering:optimizeLegibility;
}
button,input,textarea,select{ font:inherit; color:inherit; }
button{ background:none; border:0; cursor:pointer; }
input,textarea,select{ background:none; border:0; outline:none; }
::selection{ background:rgba(91,140,255,.35); }

/* scrollbary */
*::-webkit-scrollbar{ width:10px; height:10px; }
*::-webkit-scrollbar-track{ background:transparent; }
*::-webkit-scrollbar-thumb{ background:#242a35; border-radius:99px; border:3px solid transparent; background-clip:content-box; }
*::-webkit-scrollbar-thumb:hover{ background:#39414f; background-clip:content-box; border:3px solid transparent; }

#app{ height:100%; position:relative; }

.ico{ display:inline-flex; width:16px; height:16px; flex:0 0 auto; }
.ico svg{ width:100%; height:100%; display:block; }

/* ═══ TOPBAR ═══════════════════════════════════════════════ */
.topbar{
  position:absolute; inset:0 0 auto 0; height:var(--topbar-h); z-index:60;
  display:flex; align-items:center; gap:16px; padding:0 14px 0 12px;
  background:rgba(13,16,21,.82); backdrop-filter:blur(18px) saturate(140%);
  border-bottom:1px solid var(--border-soft);
}
.brand{ display:flex; align-items:center; gap:11px; min-width:0; }
.brand-dot{
  width:26px; height:26px; border-radius:9px; flex:0 0 auto;
  background:linear-gradient(140deg,var(--accent),var(--accent-2));
  box-shadow:0 0 0 1px rgba(255,255,255,.09) inset, 0 4px 14px -4px var(--accent);
  position:relative;
}
.brand-dot::after{
  content:""; position:absolute; inset:7px; border-radius:4px;
  background:rgba(255,255,255,.92);
  clip-path:polygon(0 55%,32% 55%,32% 0,68% 0,68% 100%,100% 100%,100% 62%,68% 62%);
  opacity:.9;
}
.brand-title{ font-size:14px; font-weight:640; letter-spacing:-.01em; line-height:1.15; }
.brand-sub{ font-size:11.5px; color:var(--muted); line-height:1.2; }

.topstats{ display:flex; align-items:center; gap:6px; margin-left:6px; flex-wrap:nowrap; overflow:hidden; }
.tstat{
  display:flex; align-items:center; gap:7px; padding:5px 11px 5px 9px;
  background:var(--surface); border:1px solid var(--border-soft); border-radius:99px;
  font-size:12px; color:var(--text-2); white-space:nowrap;
}
.tstat b{ color:var(--text); font-weight:620; font-variant-numeric:tabular-nums; }
.tstat i{ width:7px; height:7px; border-radius:99px; display:block; }
.tstat.total{ background:transparent; border-color:transparent; color:var(--muted); }

.topactions{ margin-left:auto; display:flex; align-items:center; gap:7px; }
.sep{ width:1px; height:22px; background:var(--border); margin:0 3px; }

.btn{
  display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 12px;
  border-radius:10px; font-size:13px; font-weight:520; color:var(--text-2);
  border:1px solid transparent; transition:background .13s, color .13s, border-color .13s, transform .08s;
  white-space:nowrap;
}
.btn:hover{ background:var(--surface-2); color:var(--text); }
.btn:active{ transform:translateY(1px); }
.btn.icon-only{ padding:0; width:34px; justify-content:center; }
.btn-ghost{ border-color:var(--border-soft); background:var(--surface); }
.btn-ghost:hover{ border-color:var(--border-strong); }
.btn-primary{
  background:linear-gradient(140deg,var(--accent),#4a6ff0); color:#fff; font-weight:580;
  box-shadow:0 4px 14px -6px var(--accent), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.btn-primary:hover{ background:linear-gradient(140deg,#6d99ff,#5578f5); color:#fff; }
.btn.danger:hover{ color:var(--danger); border-color:rgba(255,95,109,.35); background:rgba(255,95,109,.08); }
.btn kbd{
  font-family:var(--font); font-size:10.5px; color:var(--faint); background:var(--surface-2);
  border:1px solid var(--border); border-radius:5px; padding:1px 5px; margin-left:2px;
}
.dot-badge{ width:6px; height:6px; border-radius:99px; background:var(--accent); }

@media (max-width:1180px){ .btn .lbl, .btn kbd{ display:none; } .btn{ padding:0 9px; } }
@media (max-width:900px){ .topstats{ display:none; } }

/* ═══ RAIL ═════════════════════════════════════════════════ */
.rail{
  position:absolute; left:12px; top:calc(var(--topbar-h) + 14px); bottom:14px; width:var(--rail-w); z-index:50;
  display:flex; flex-direction:column; align-items:center; gap:4px; padding:7px 0;
  background:rgba(20,24,31,.72); backdrop-filter:blur(18px);
  border:1px solid var(--border-soft); border-radius:var(--r-xl); box-shadow:var(--shadow-2);
}
.rail-btn{
  width:38px; height:38px; border-radius:11px; display:grid; place-items:center;
  color:var(--muted); transition:.14s; position:relative;
}
.rail-btn .ico{ width:17px; height:17px; }
.rail-btn:hover{ background:var(--surface-2); color:var(--text); }
.rail-btn.active{ background:var(--accent-soft); color:#9db9ff; box-shadow:0 0 0 1px rgba(91,140,255,.28) inset; }
.rail-btn:disabled{ opacity:.3; cursor:default; }
.rail-btn:disabled:hover{ background:none; color:var(--muted); }
.rail-sep{ width:22px; height:1px; background:var(--border); margin:5px 0; }
.rail-grow{ flex:1; }

/* ═══ CANVAS ═══════════════════════════════════════════════ */
.canvas-wrap{
  position:absolute; inset:var(--topbar-h) 0 0 0; overflow:hidden;
  background:radial-gradient(1200px 700px at 62% -10%, #121722 0%, var(--bg) 62%);
  cursor:default;
}
.canvas-wrap.pan{ cursor:grab; }
.canvas-wrap.panning{ cursor:grabbing; }
.canvas-wrap.linking{ cursor:crosshair; }

.grid-bg{
  position:absolute; inset:0; pointer-events:none;
  background-image:radial-gradient(circle, #232a36 1px, transparent 1px);
  background-size:26px 26px;
  mask-image:radial-gradient(120% 110% at 50% 40%, #000 55%, transparent 100%);
  -webkit-mask-image:radial-gradient(120% 110% at 50% 40%, #000 55%, transparent 100%);
}

.world{ position:absolute; left:0; top:0; width:0; height:0; transform-origin:0 0; }
.edges{ position:absolute; left:-20000px; top:-20000px; width:40000px; height:40000px; overflow:visible; pointer-events:none; }
#edgeLayer{ transform:translate(20000px,20000px); }
.nodes{ position:absolute; left:0; top:0; }

/* pozn.: záměrně plná barva, ne url(#gradient) — gradient s objectBoundingBox
   se u dokonale vodorovné/svislé čáry (nulový bounding box) vůbec nevykreslí */
.edge{ fill:none; stroke:#5578d8; stroke-width:2; stroke-linecap:round; opacity:.6; transition:opacity .15s, stroke-width .15s, stroke .15s; }
.edge-hit{ fill:none; stroke:transparent; stroke-width:18; pointer-events:stroke; cursor:pointer; }
.edge-group:hover .edge{ opacity:1; stroke:#8fb0ff; stroke-width:2.6; filter:drop-shadow(0 0 6px rgba(91,140,255,.55)); }
.edge-group.dim .edge{ opacity:.16; }
.edge.ghost{ stroke:var(--accent); stroke-dasharray:5 6; opacity:.85; animation:dash 1s linear infinite; }
@keyframes dash{ to{ stroke-dashoffset:-22; } }
.edge-dot{ fill:var(--accent); opacity:0; transition:opacity .15s; }
.edge-group:hover .edge-dot{ opacity:.9; }
.edge-label{
  fill:var(--muted); font-size:10.5px; font-family:var(--font); text-anchor:middle;
  paint-order:stroke; stroke:var(--bg); stroke-width:5px; stroke-linejoin:round;
}

/* ── NODE (karta okruhu) ── */
.node{
  position:absolute; width:270px;
  background:linear-gradient(180deg, var(--surface) 0%, #12161d 100%);
  border:1px solid var(--border); border-radius:var(--r-lg);
  box-shadow:var(--shadow-2);
  transition:box-shadow .16s, border-color .16s, transform .16s, opacity .2s;
  user-select:none; cursor:grab;
}
.node::before{
  content:""; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none;
  background:linear-gradient(180deg, var(--nc, var(--accent)) 0%, transparent 42%);
  opacity:.14; -webkit-mask:linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite:xor; mask-composite:exclude; padding:1px;
}
.node:hover{ border-color:var(--border-strong); box-shadow:var(--shadow-3); }
.node.dragging{ cursor:grabbing; box-shadow:var(--shadow-3); z-index:30 !important; transition:none; }
.node.selected{ border-color:var(--nc,var(--accent)); box-shadow:var(--shadow-3), 0 0 0 3px color-mix(in srgb, var(--nc,var(--accent)) 22%, transparent); }
.node.dim{ opacity:.32; filter:saturate(.4); }
.node.link-target{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft), var(--shadow-3); }
.node.pulse{ animation:nodePulse .55s ease-out; }
@keyframes nodePulse{ 0%{ transform:scale(1);} 40%{ transform:scale(1.035);} 100%{ transform:scale(1);} }

.node-head{ display:flex; align-items:center; gap:10px; padding:13px 13px 10px; }
.node-ico{
  width:34px; height:34px; border-radius:11px; display:grid; place-items:center; flex:0 0 auto;
  background:color-mix(in srgb, var(--nc,var(--accent)) 16%, transparent);
  color:var(--nc,var(--accent));
  box-shadow:0 0 0 1px color-mix(in srgb, var(--nc,var(--accent)) 24%, transparent) inset;
}
.node-ico .ico{ width:18px; height:18px; }
.node-title{ font-size:13.5px; font-weight:620; letter-spacing:-.01em; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.node-meta{
  font-size:11px; color:var(--muted); margin-top:1px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.node-menu{
  margin-left:auto; width:26px; height:26px; border-radius:8px; display:grid; place-items:center;
  color:var(--faint); opacity:0; transition:.14s;
}
.node:hover .node-menu{ opacity:1; }
.node-menu:hover{ background:var(--surface-3); color:var(--text); }

.node-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:0 13px; }
.nstat{
  background:var(--bg-2); border:1px solid var(--border-soft); border-radius:10px;
  padding:7px 8px 6px; text-align:left; transition:.14s; cursor:pointer;
}
.nstat:hover{ background:var(--surface-2); border-color:var(--border-strong); transform:translateY(-1px); }
.nstat .v{ font-size:17px; font-weight:650; line-height:1.1; font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.nstat .k{ font-size:9.5px; text-transform:uppercase; letter-spacing:.055em; color:var(--muted); margin-top:2px; font-weight:560; display:flex; align-items:center; gap:4px; }
.nstat .k i{ width:5px; height:5px; border-radius:99px; }
.nstat.new  .v{ color:var(--st-new); }
.nstat.open .v{ color:var(--st-open); }
.nstat.done .v{ color:var(--st-done); }
.nstat.zero .v{ color:var(--faint); }

.node-progress{ margin:11px 13px 0; height:4px; border-radius:99px; background:var(--surface-3); overflow:hidden; display:flex; }
.node-progress i{ height:100%; transition:width .4s cubic-bezier(.4,0,.2,1); }
.np-done{ background:var(--st-done); }
.np-open{ background:var(--st-open); }
.np-new{ background:var(--st-new); opacity:.55; }

.node-foot{ display:flex; align-items:center; gap:8px; padding:9px 13px 12px; font-size:11px; color:var(--muted); }
.node-foot .pct{ font-variant-numeric:tabular-nums; color:var(--text-2); font-weight:560; }
.node-foot .alert{ color:var(--danger); display:inline-flex; align-items:center; gap:4px; }
.node-foot .alert .ico{ width:12px; height:12px; }
.node-add{
  margin-left:auto; display:inline-flex; align-items:center; gap:5px; height:24px; padding:0 9px;
  border-radius:7px; font-size:11.5px; font-weight:540; color:var(--text-2);
  background:var(--surface-2); border:1px solid var(--border-soft); transition:.14s;
}
.node-add:hover{ background:var(--surface-3); color:var(--text); border-color:var(--border-strong); }
.node-add .ico{ width:12px; height:12px; }

/* porty */
.port{
  position:absolute; width:13px; height:13px; border-radius:99px;
  background:var(--surface-3); border:2px solid var(--border-strong);
  opacity:0; transition:opacity .15s, transform .15s, background .15s, border-color .15s;
  cursor:crosshair; z-index:5;
}
.node:hover .port, .canvas-wrap.linking .port, .node.selected .port{ opacity:1; }
.port:hover{ background:var(--accent); border-color:#a9c2ff; transform:scale(1.35); }
.port.t{ top:-7px;  left:50%; margin-left:-6.5px; }
.port.b{ bottom:-7px;left:50%; margin-left:-6.5px; }
.port.l{ left:-7px;  top:50%;  margin-top:-6.5px; }
.port.r{ right:-7px; top:50%;  margin-top:-6.5px; }

.marquee{ position:absolute; border:1px solid var(--accent); background:var(--accent-soft); border-radius:4px; pointer-events:none; z-index:40; }

.canvas-hint{
  position:absolute; left:50%; bottom:16px; transform:translateX(-50%);
  font-size:11.5px; color:var(--faint); background:rgba(13,16,21,.7); backdrop-filter:blur(10px);
  padding:6px 14px; border-radius:99px; border:1px solid var(--border-soft);
  pointer-events:none; transition:opacity .4s; white-space:nowrap;
}
.canvas-hint.hide{ opacity:0; }

/* minimapa + zoom */
.minimap{
  position:absolute; right:14px; bottom:14px; width:220px; height:150px; z-index:45;
  background:rgba(13,16,21,.78); backdrop-filter:blur(14px);
  border:1px solid var(--border-soft); border-radius:var(--r); overflow:hidden;
  box-shadow:var(--shadow-2); cursor:pointer; transition:opacity .2s;
}
.minimap:hover{ border-color:var(--border-strong); }
.minimap canvas{ display:block; width:100%; height:100%; }
.minimap-view{ position:absolute; border:1.5px solid var(--accent); background:rgba(91,140,255,.09); border-radius:3px; pointer-events:none; }

.zoombar{
  position:absolute; right:14px; bottom:176px; z-index:45; display:flex; align-items:center;
  background:rgba(13,16,21,.78); backdrop-filter:blur(14px);
  border:1px solid var(--border-soft); border-radius:10px; overflow:hidden; box-shadow:var(--shadow-2);
}
.zbtn{ width:32px; height:30px; color:var(--text-2); font-size:15px; display:grid; place-items:center; transition:.13s; }
.zbtn:hover{ background:var(--surface-2); color:var(--text); }
.zval{ width:auto; padding:0 9px; font-size:11.5px; font-variant-numeric:tabular-nums; border-left:1px solid var(--border-soft); border-right:1px solid var(--border-soft); }

/* ═══ DRAWER ═══════════════════════════════════════════════ */
.overlay{
  position:absolute; inset:0; z-index:70; background:rgba(5,7,10,.5);
  backdrop-filter:blur(2px); animation:fade .18s ease;
}
@keyframes fade{ from{ opacity:0; } }

.drawer{
  position:absolute; top:0; right:0; bottom:0; width:var(--drawer-w); max-width:94vw; z-index:80;
  background:var(--bg-2); border-left:1px solid var(--border);
  box-shadow:-30px 0 70px -30px rgba(0,0,0,.9);
  display:flex; flex-direction:column;
  transform:translateX(101%); transition:transform .3s cubic-bezier(.22,1,.36,1);
}
.drawer.open{ transform:none; }
.drawer-grip{ position:absolute; left:-3px; top:0; bottom:0; width:7px; cursor:ew-resize; z-index:2; }
.drawer-grip:hover{ background:linear-gradient(90deg, transparent, var(--accent-soft)); }

.drawer-head{ display:flex; align-items:flex-start; gap:12px; padding:15px 16px 13px; border-bottom:1px solid var(--border-soft); }
.dh-left{ display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
.dh-icon{
  width:42px; height:42px; border-radius:13px; display:grid; place-items:center; flex:0 0 auto;
  background:color-mix(in srgb, var(--nc,var(--accent)) 16%, transparent); color:var(--nc,var(--accent));
  box-shadow:0 0 0 1px color-mix(in srgb, var(--nc,var(--accent)) 26%, transparent) inset;
}
.dh-icon .ico{ width:21px; height:21px; }
.dh-title{
  font-size:19px; font-weight:660; letter-spacing:-.02em; width:100%;
  border-radius:7px; padding:1px 6px; margin-left:-6px; transition:.13s;
}
.dh-title:hover{ background:var(--surface); }
.dh-title:focus{ background:var(--surface); box-shadow:0 0 0 1px var(--border-strong) inset; }
.dh-sub{ font-size:12px; color:var(--muted); margin-top:1px; }
.dh-right{ display:flex; gap:5px; }

.drawer-toolbar{ display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--border-soft); }
.quickadd{
  flex:1; display:flex; align-items:center; gap:9px; height:38px; padding:0 13px;
  background:var(--surface); border:1px solid var(--border); border-radius:11px; transition:.15s;
  color:var(--faint);
}
.quickadd:focus-within{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); color:var(--accent); }
.quickadd input{ flex:1; font-size:13px; color:var(--text); }
.quickadd input::placeholder{ color:var(--faint); }

.seg{ display:flex; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:3px; gap:2px; }
.seg-btn{ height:30px; padding:0 13px; border-radius:7px; font-size:12.5px; font-weight:540; color:var(--muted); transition:.13s; }
.seg-btn:hover{ color:var(--text); }
.seg-btn.active{ background:var(--surface-3); color:var(--text); box-shadow:var(--shadow-1); }

.drawer-body{ flex:1; overflow:auto; padding:14px 16px 24px; }

/* ── BOARD ── */
.board{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; align-items:stretch; min-height:100%; }
.col{ background:var(--surface); border:1px solid var(--border-soft); border-radius:14px; padding:10px; min-height:260px; transition:.15s; }
.col.over{ border-color:var(--accent); background:color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.col-head{ display:flex; align-items:center; gap:7px; padding:2px 4px 10px; font-size:11.5px; font-weight:600; letter-spacing:.03em; text-transform:uppercase; color:var(--text-2); }
.col-head i{ width:7px; height:7px; border-radius:99px; }
.col-head .cnt{ margin-left:auto; font-size:11px; color:var(--muted); background:var(--surface-3); border-radius:99px; padding:1px 7px; font-variant-numeric:tabular-nums; letter-spacing:0; }
.col-list{ display:flex; flex-direction:column; gap:8px; min-height:40px; }
.col-empty{ font-size:11.5px; color:var(--faint); text-align:center; padding:16px 6px; border:1px dashed var(--border); border-radius:10px; }

.card{
  background:var(--surface-2); border:1px solid var(--border); border-radius:11px; padding:10px 11px;
  cursor:grab; transition:.14s; position:relative; overflow:hidden;
}
.card:hover{ border-color:var(--border-strong); transform:translateY(-1px); box-shadow:var(--shadow-2); }
.card.dragging{ opacity:.4; cursor:grabbing; }
.card::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:2.5px; background:var(--pc, transparent); }
.card-title{ font-size:12.8px; font-weight:520; line-height:1.4; word-break:break-word; }
.card.done .card-title{ color:var(--muted); text-decoration:line-through; text-decoration-color:var(--faint); }
.card-tags{ display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
.tag{ font-size:10px; padding:1.5px 6px; border-radius:5px; background:var(--surface-3); color:var(--text-2); border:1px solid var(--border); }
.tag.prio{ font-weight:600; }
.tag.p-urgent{ background:rgba(255,95,109,.14); color:#ff8a94; border-color:rgba(255,95,109,.3); }
.tag.p-high  { background:rgba(255,176,32,.13); color:#ffc766; border-color:rgba(255,176,32,.28); }
.tag.p-low   { color:var(--muted); }
.tag.due.late{ background:rgba(255,95,109,.14); color:#ff8a94; border-color:rgba(255,95,109,.3); }
.tag.due.soon{ background:rgba(255,176,32,.13); color:#ffc766; border-color:rgba(255,176,32,.28); }
.tag.who{ background:transparent; }
.card-foot{ display:flex; align-items:center; gap:8px; margin-top:8px; font-size:10.5px; color:var(--faint); }
.card-foot .ico{ width:12px; height:12px; }
.card-foot .bit{ display:inline-flex; align-items:center; gap:3px; }
.card-check{
  position:absolute; right:8px; top:8px; width:19px; height:19px; border-radius:6px;
  border:1.5px solid var(--border-strong); display:grid; place-items:center; color:transparent;
  opacity:0; transition:.13s; background:var(--surface);
}
.card:hover .card-check{ opacity:1; }
.card-check:hover{ border-color:var(--st-done); color:var(--st-done); }
.card.done .card-check{ opacity:1; background:var(--st-done); border-color:var(--st-done); color:#062; }
.card-check .ico{ width:12px; height:12px; }

/* ── LIST ── */
.list{ display:flex; flex-direction:column; gap:2px; }
.list-group{ margin-bottom:14px; }
.list-group-head{ display:flex; align-items:center; gap:7px; font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-2); font-weight:600; padding:6px 4px; }
.list-group-head i{ width:7px; height:7px; border-radius:99px; }
.list-group-head .cnt{ color:var(--muted); font-weight:500; }
.row{
  display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:10px;
  border:1px solid transparent; transition:.12s; cursor:pointer;
}
.row:hover{ background:var(--surface); border-color:var(--border-soft); }
.row-check{ width:18px; height:18px; border-radius:6px; border:1.5px solid var(--border-strong); display:grid; place-items:center; color:transparent; flex:0 0 auto; transition:.13s; }
.row-check:hover{ border-color:var(--st-done); color:var(--st-done); }
.row.done .row-check{ background:var(--st-done); border-color:var(--st-done); color:#062; }
.row-check .ico{ width:11px; height:11px; }
.row-title{ flex:1; font-size:13px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row.done .row-title{ color:var(--muted); text-decoration:line-through; text-decoration-color:var(--faint); }
.row-side{ display:flex; align-items:center; gap:5px; flex:0 0 auto; }

.empty-state{ text-align:center; padding:60px 20px; color:var(--muted); }
.empty-state .big{ font-size:15px; color:var(--text-2); margin-bottom:5px; font-weight:560; }
.empty-state .small{ font-size:12.5px; }

/* ═══ MODALY ═══════════════════════════════════════════════ */
.modal-root{ position:absolute; inset:0; z-index:100; pointer-events:none; }
.modal-back{ position:absolute; inset:0; background:rgba(5,7,10,.62); backdrop-filter:blur(4px); pointer-events:auto; animation:fade .16s ease; }
.modal{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(620px,92vw); max-height:86vh; pointer-events:auto;
  background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--r-lg);
  box-shadow:var(--shadow-3); display:flex; flex-direction:column; overflow:hidden;
  animation:pop .19s cubic-bezier(.22,1,.36,1);
}
@keyframes pop{ from{ opacity:0; transform:translate(-50%,-46%) scale(.97); } }
.modal.top{ top:88px; transform:translate(-50%,0); animation:popTop .19s cubic-bezier(.22,1,.36,1); }
@keyframes popTop{ from{ opacity:0; transform:translate(-50%,-8px) scale(.98); } }
.modal-head{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border-soft); }
.modal-head h3{ margin:0; font-size:14.5px; font-weight:620; letter-spacing:-.01em; }
.modal-head .btn{ margin-left:auto; }
.modal-body{ padding:16px; overflow:auto; }
.modal-foot{ display:flex; align-items:center; gap:8px; padding:13px 16px; border-top:1px solid var(--border-soft); background:var(--bg-2); }
.modal-foot .grow{ flex:1; }

.field{ margin-bottom:14px; }
.field:last-child{ margin-bottom:0; }
.field label{ display:block; font-size:11.5px; font-weight:560; color:var(--muted); margin-bottom:6px; letter-spacing:.02em; }
.inp{
  width:100%; background:var(--bg-2); border:1px solid var(--border); border-radius:10px;
  padding:9px 12px; font-size:13.5px; transition:.14s;
}
.inp:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.inp::placeholder{ color:var(--faint); }
textarea.inp{ resize:vertical; min-height:80px; line-height:1.55; font-size:13px; }
select.inp{ appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f7889' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 11px center; padding-right:30px;
}
select.inp option{ background:var(--surface); }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }

.chips{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{
  display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 11px; border-radius:8px;
  background:var(--bg-2); border:1px solid var(--border); font-size:12.5px; color:var(--text-2); transition:.13s;
}
.chip:hover{ border-color:var(--border-strong); color:var(--text); }
.chip.on{ background:var(--accent-soft); border-color:rgba(91,140,255,.4); color:#9db9ff; }
.chip i{ width:8px; height:8px; border-radius:99px; }
.chip.st-new.on{ background:rgba(76,194,255,.14); border-color:rgba(76,194,255,.4); color:#8bd8ff; }
.chip.st-open.on{ background:rgba(255,176,32,.14); border-color:rgba(255,176,32,.4); color:#ffcf80; }
.chip.st-done.on{ background:rgba(52,211,153,.14); border-color:rgba(52,211,153,.4); color:#7de8c1; }

.swatches{ display:flex; flex-wrap:wrap; gap:8px; }
.swatch{ width:30px; height:30px; border-radius:9px; box-shadow:0 0 0 1px rgba(255,255,255,.1) inset; transition:.13s; position:relative; }
.swatch:hover{ transform:scale(1.12); }
.swatch.on::after{ content:""; position:absolute; inset:-4px; border-radius:12px; border:2px solid var(--text); }

.iconpick{ display:grid; grid-template-columns:repeat(8,1fr); gap:6px; }
.iconpick button{ height:36px; border-radius:9px; background:var(--bg-2); border:1px solid var(--border); color:var(--text-2); display:grid; place-items:center; transition:.13s; }
.iconpick button:hover{ border-color:var(--border-strong); color:var(--text); }
.iconpick button.on{ background:var(--accent-soft); border-color:rgba(91,140,255,.45); color:#9db9ff; }

/* checklist v detailu */
.checklist{ display:flex; flex-direction:column; gap:4px; }
.cl-item{ display:flex; align-items:center; gap:9px; padding:5px 7px; border-radius:8px; transition:.12s; }
.cl-item:hover{ background:var(--bg-2); }
.cl-box{ width:16px; height:16px; border-radius:5px; border:1.5px solid var(--border-strong); display:grid; place-items:center; color:transparent; flex:0 0 auto; }
.cl-box:hover{ border-color:var(--st-done); color:var(--st-done); }
.cl-item.done .cl-box{ background:var(--st-done); border-color:var(--st-done); color:#062; }
.cl-box .ico{ width:10px; height:10px; }
.cl-item input{ flex:1; font-size:12.8px; }
.cl-item.done input{ color:var(--muted); text-decoration:line-through; }
.cl-del{ width:22px; height:22px; border-radius:6px; color:var(--faint); display:grid; place-items:center; opacity:0; }
.cl-item:hover .cl-del{ opacity:1; }
.cl-del:hover{ background:var(--surface-3); color:var(--danger); }
.cl-del .ico{ width:12px; height:12px; }
.cl-progress{ font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }

/* aktivita */
.activity{ display:flex; flex-direction:column; gap:7px; font-size:11.5px; color:var(--muted); }
.activity div{ display:flex; gap:8px; }
.activity b{ color:var(--text-2); font-weight:540; }

/* ── SEARCH PALETA ── */
.search-inp{ display:flex; align-items:center; gap:11px; padding:14px 16px; border-bottom:1px solid var(--border-soft); color:var(--muted); }
.search-inp input{ flex:1; font-size:15px; color:var(--text); }
.search-inp .ico{ width:18px; height:18px; }
.results{ max-height:min(56vh,460px); overflow:auto; padding:7px; }
.res{ display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:10px; cursor:pointer; }
.res.sel{ background:var(--surface-2); }
.res-ico{ width:28px; height:28px; border-radius:8px; display:grid; place-items:center; flex:0 0 auto;
  background:color-mix(in srgb, var(--nc,var(--accent)) 15%, transparent); color:var(--nc,var(--accent)); }
.res-ico .ico{ width:15px; height:15px; }
.res-main{ flex:1; min-width:0; }
.res-t{ font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.res-s{ font-size:11px; color:var(--muted); }
.res-k{ font-size:10px; color:var(--faint); border:1px solid var(--border); border-radius:5px; padding:1px 6px; }

/* ═══ TOASTY ═══════════════════════════════════════════════ */
.toasts{ position:absolute; left:50%; bottom:22px; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
.toast{
  display:flex; align-items:center; gap:10px; padding:10px 15px; border-radius:11px;
  background:var(--surface-2); border:1px solid var(--border-strong); box-shadow:var(--shadow-3);
  font-size:12.5px; pointer-events:auto; animation:toastIn .22s cubic-bezier(.22,1,.36,1);
}
@keyframes toastIn{ from{ opacity:0; transform:translateY(10px) scale(.96); } }
.toast.out{ animation:toastOut .2s ease forwards; }
@keyframes toastOut{ to{ opacity:0; transform:translateY(6px) scale(.97); } }
.toast .ico{ color:var(--accent); }
.toast.ok .ico{ color:var(--st-done); }
.toast.warn .ico{ color:var(--st-open); }
.toast button{ color:var(--accent); font-size:12.5px; font-weight:560; margin-left:4px; }
.toast button:hover{ text-decoration:underline; }

/* kontextové menu */
.ctx{
  position:absolute; z-index:150; min-width:200px; padding:5px;
  background:var(--surface-2); border:1px solid var(--border-strong); border-radius:11px;
  box-shadow:var(--shadow-3); animation:pop .13s ease;
}
.ctx-item{ display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; border-radius:8px; font-size:12.8px; color:var(--text-2); text-align:left; }
.ctx-item:hover{ background:var(--surface-3); color:var(--text); }
.ctx-item.danger:hover{ background:rgba(255,95,109,.12); color:var(--danger); }
.ctx-item .ico{ width:14px; height:14px; color:var(--muted); }
.ctx-item:hover .ico{ color:inherit; }
.ctx-item .k{ margin-left:auto; font-size:10.5px; color:var(--faint); }
.ctx-sep{ height:1px; background:var(--border); margin:4px 6px; }

.help-grid{ display:grid; grid-template-columns:1fr 1fr; gap:9px 22px; }
.help-row{ display:flex; align-items:center; gap:10px; font-size:12.5px; color:var(--text-2); }
.help-row .k{ margin-left:auto; font-size:10.5px; color:var(--muted); background:var(--bg-2); border:1px solid var(--border); border-radius:5px; padding:2px 7px; white-space:nowrap; }

@media (max-width:1100px){ :root{ --drawer-w: 640px; } .board{ grid-template-columns:1fr; } .minimap{ display:none; } .zoombar{ bottom:14px; } }

/* ═══════════════════════════════════════════════════════════
   Víceuživatelská verze — přihlášení, lidé, oprávnění
   ═══════════════════════════════════════════════════════════ */

/* ── přihlašovací a instalační stránka ── */
.auth-page{ overflow:auto; background:radial-gradient(900px 600px at 50% -10%, #141a26 0%, var(--bg) 60%); }
.auth-wrap{ min-height:100%; display:flex; align-items:center; justify-content:center; padding:40px 20px; }
.auth-wrap.wide .auth-card{ width:min(560px,94vw); }
.auth-card{
  width:min(400px,94vw); background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:var(--shadow-3); padding:26px;
}
.auth-brand{ display:flex; align-items:center; gap:13px; margin-bottom:22px; }
.auth-brand .brand-dot{ width:38px; height:38px; border-radius:12px; }
.auth-title{ font-size:18px; font-weight:660; letter-spacing:-.02em; }
.auth-sub{ font-size:12.5px; color:var(--muted); }
.auth-error{
  background:rgba(255,95,109,.11); border:1px solid rgba(255,95,109,.32); color:#ff9aa2;
  border-radius:10px; padding:10px 13px; font-size:12.8px; margin-bottom:14px; line-height:1.5;
}
.auth-submit{ width:100%; justify-content:center; height:40px; margin-top:4px; }
.auth-foot{ margin-top:16px; text-align:center; font-size:11.5px; color:var(--faint); }
.auth-card .field label{ margin-bottom:6px; }
.auth-card code{ font-family:var(--mono); font-size:12px; color:var(--text-2); }

/* ── odznáčky lidí ── */
.avatar{
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
  border-radius:99px; color:#0b0d11; font-weight:700; letter-spacing:.01em;
  box-shadow:0 0 0 1px rgba(255,255,255,.14) inset;
}
.avatar.xs{ width:16px; height:16px; font-size:8px; }
.avatar.sm{ width:24px; height:24px; font-size:10px; }
.avatar.md{ width:32px; height:32px; font-size:12px; }
.avatar.none{ background:var(--surface-3); color:var(--faint); box-shadow:0 0 0 1px var(--border) inset; }

.avatar-btn{ margin-left:5px; padding:2px; border-radius:99px; transition:.14s; }
.avatar-btn:hover{ background:var(--surface-2); }
.avatar-btn .avatar{ width:30px; height:30px; font-size:11.5px; }

.node-owner{ flex:0 0 auto; margin-left:4px; }
.node-owner.none{
  width:24px; height:24px; border-radius:99px; display:grid; place-items:center;
  background:var(--surface-2); color:var(--faint); font-size:11px; font-weight:600;
  box-shadow:0 0 0 1px var(--border) inset;
}
.mine-badge{
  background:var(--accent-soft); color:#9db9ff; border-radius:5px; padding:1px 6px;
  font-size:10px; font-weight:600;
}

.owner-chip{
  display:flex; align-items:center; gap:7px; height:32px; padding:0 11px 0 5px; margin-right:4px;
  background:var(--surface); border:1px solid var(--border-soft); border-radius:99px;
  font-size:12px; color:var(--text-2); cursor:pointer; transition:.14s; max-width:200px;
}
.owner-chip:hover{ border-color:var(--border-strong); color:var(--text); }
.owner-chip .owner-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.btn.active{ background:var(--accent-soft); color:#9db9ff; border-color:rgba(91,140,255,.35); }
.tstat.late{ border-color:rgba(255,95,109,.35); }

.card.mine{ border-color:rgba(91,140,255,.4); }
.card.mine:hover{ border-color:var(--accent); }
.row.mine .row-title{ color:#c7d6ff; }

/* ── stav spojení ── */
.conn-state{
  position:absolute; left:50%; top:14px; transform:translateX(-50%); z-index:55;
  display:flex; align-items:center; gap:8px; padding:8px 14px; border-radius:99px;
  background:rgba(255,95,109,.14); border:1px solid rgba(255,95,109,.35); color:#ff9aa2;
  font-size:12.5px; backdrop-filter:blur(10px);
}
.conn-state .ico{ width:14px; height:14px; }

/* ── poznámka o oprávnění ── */
.lock-note{
  display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--muted);
  max-width:430px; line-height:1.45;
}
.lock-note .ico{ width:14px; height:14px; flex:0 0 auto; color:var(--faint); }
.hint{ font-size:11.5px; color:var(--muted); margin-top:6px; line-height:1.5; }
.modal-foot .hint{ margin-top:0; max-width:420px; }

/* ── tabulka uživatelů ── */
.utable{ width:100%; border-collapse:collapse; font-size:13px; }
.utable th{
  text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--muted); font-weight:600; padding:0 10px 9px; border-bottom:1px solid var(--border);
}
.utable td{ padding:9px 10px; border-bottom:1px solid var(--border-soft); vertical-align:middle; }
.utable tr:last-child td{ border-bottom:0; }
.utable tr.inactive{ opacity:.5; }
.utable td.num, .utable th:nth-child(4), .utable th:nth-child(5){ text-align:center; }
.utable td.num{ text-align:center; font-variant-numeric:tabular-nums; color:var(--text-2); }
.utable td.dim{ color:var(--muted); font-size:11.5px; white-space:nowrap; }
.utable td.right{ text-align:right; white-space:nowrap; }
.utable td.mono{ font-family:var(--mono); font-size:11.5px; color:var(--text-2); }
.ucell{ display:flex; align-items:center; gap:10px; }
.uname{ font-weight:540; }
.uemail{ font-size:11px; color:var(--muted); }
.you{ font-size:10px; color:var(--accent); font-weight:500; }
.tag.role-admin{ background:var(--accent-soft); color:#9db9ff; border-color:rgba(91,140,255,.35); font-weight:600; }
.tag.late-tag{ background:rgba(255,95,109,.14); color:#ff8a94; border-color:rgba(255,95,109,.3); }
.tag.pw-tag{ background:rgba(255,176,32,.13); color:#ffc766; border-color:rgba(255,176,32,.28); }

/* zaškrtávátko s popiskem ve formuláři */
.check-row{
  display:flex; align-items:center; gap:9px; margin-top:10px; cursor:pointer;
  font-size:12.5px; color:var(--text-2); text-transform:none; letter-spacing:0; font-weight:400;
}
.check-row input{ width:16px; height:16px; accent-color:var(--accent); flex:0 0 auto; }
.field label.check-row{ margin-bottom:0; }

/* ── protokol činnosti ── */
.act-list{ display:flex; flex-direction:column; gap:1px; max-height:min(60vh,480px); overflow:auto; }
.act-row{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:9px; font-size:12.5px; }
.act-row:hover{ background:var(--bg-2); }
.act-main{ flex:1; min-width:0; color:var(--text-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.act-main b{ color:var(--text); font-weight:560; }
.act-detail{ color:var(--muted); }
.act-time{ font-size:11px; color:var(--faint); white-space:nowrap; }

.activity div{ align-items:center; }
