* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f1f5f9;
  --panel: #ffffff;
  --col-bg: #e8edf3;
  --input-bg: #ffffff;
  --chip-bg: #f1f5f9;
  --hover: #f8fafc;
  --sidebar: #0f172a;
  --sidebar-text: #cbd5e1;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --danger: #ef4444;
  --danger-text: #b91c1c;
  --warn-text: #b45309;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .06);
  /* Liquid Glass — svetlý režim */
  --glass-bg: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-brd: rgba(255, 255, 255, .75);
  --glass-hi: rgba(255, 255, 255, .9);
  --glass-shadow: 0 8px 30px rgba(15, 23, 42, .12), 0 1px 0 rgba(255,255,255,.6) inset;
  --glass-blur: saturate(180%) blur(20px);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --panel: #162032;
  --col-bg: #101a2b;
  --input-bg: #0b1220;
  --chip-bg: #1e293b;
  --hover: #1b2740;
  --sidebar: #0a0f1a;
  --sidebar-text: #94a3b8;
  --text: #e2e8f0;
  --muted: #8fa1b8;
  --border: #24304a;
  --danger-text: #f87171;
  --warn-text: #fbbf24;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  /* Liquid Glass — tmavý režim */
  --glass-bg: rgba(30, 41, 59, .55);
  --glass-strong: rgba(30, 41, 59, .72);
  --glass-brd: rgba(255, 255, 255, .12);
  --glass-hi: rgba(255, 255, 255, .16);
  --glass-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 1px 0 rgba(255,255,255,.08) inset;
  --glass-blur: saturate(180%) blur(22px);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* jemný farebný mesh pod sklom — dáva „Liquid Glass" hĺbku */
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(99,102,241,.20), transparent 60%),
    radial-gradient(55% 50% at 92% 12%, rgba(14,165,233,.16), transparent 60%),
    radial-gradient(60% 60% at 78% 96%, rgba(236,72,153,.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;   /* žiadny sivý záblesk pri ťuku */
}
[data-theme="dark"] body {
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(99,102,241,.28), transparent 60%),
    radial-gradient(55% 50% at 92% 12%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(60% 60% at 78% 96%, rgba(139,92,246,.20), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

.hidden { display: none !important; }
.muted-hint { color: var(--muted); font-size: 12px; padding: 4px 10px; }

/* ---------- login ---------- */
.login-screen {
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a, #312e81);
}
.login-box {
  background: var(--panel);
  padding: 40px;
  border-radius: 16px;
  width: 340px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.login-box h1 { font-size: 22px; text-align: center; margin-bottom: 8px; }
.login-box input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--input-bg);
  color: var(--text);
}
.login-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 16px; }

/* ---------- layout ---------- */
.app { display: flex; height: 100vh; }

.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  padding: 18px 12px 12px;
  gap: 12px;
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.sidebar-header .logo { font-size: 17px; font-weight: 700; color: #fff; }

.icon-btn {
  border: none; background: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.4;
}
.icon-btn:hover { background: rgba(128,128,128,.25); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 4px; }
.stat { background: rgba(255,255,255,.06); border-radius: 8px; padding: 8px 10px; }
.stat b { display: block; font-size: 18px; color: #fff; }
.stat span { font-size: 11px; }
.stat.warn b { color: #fca5a5; }

.project-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }

.nav-section {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 10px 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: rgba(203,213,225,.5);
  border: none; background: none;
  width: 100%;
}
.nav-collapse { cursor: pointer; text-align: left; }
.nav-collapse:hover span { color: #fff; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 8px 10px;
  background: none; border: none;
  color: var(--sidebar-text);
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.active { background: rgba(99,102,241,.3); color: #fff; }
.nav-item .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.nav-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 12px; opacity: .6; margin-left: 2px; }
.archived-item { opacity: .65; cursor: default; }
.archived-item:hover { opacity: 1; }

/* projekty — strom */
.proj-item { gap: 6px; position: relative; }
.proj-caret, .proj-caret-spacer {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px;
  opacity: .6; border-radius: 5px;
}
.proj-caret { cursor: pointer; }
.proj-caret:hover { background: rgba(255,255,255,.18); opacity: 1; }
/* vodiaca čiara vnorenia */
.proj-item[style*="padding-left: 26px"] .dot,
.proj-item[style*="padding-left: 42px"] .dot,
.proj-item[style*="padding-left: 58px"] .dot { position: relative; }
.proj-edit, .proj-addsub {
  color: var(--sidebar-text);
  font-size: 12px; padding: 1px 5px;
  border-radius: 5px;
  opacity: 0; flex-shrink: 0;
}
.proj-item:hover .proj-edit,
.proj-item:hover .proj-addsub { opacity: .6; }
.proj-edit:hover, .proj-addsub:hover { opacity: 1 !important; background: rgba(255,255,255,.18); }
.crumb-sep { opacity: .45; margin: 0 2px; font-weight: 400; }

/* na dotykových zariadeniach nie je hover → akcie stále viditeľné */
@media (hover: none) {
  .proj-edit, .proj-addsub { opacity: .5; }
}

/* ---------- prepínač priestoru (admin nahliadnutie) ---------- */
.ws-switch {
  display: flex; align-items: center; gap: 6px;
  margin: 0 4px 4px;
  padding: 5px 8px;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
}
.ws-switch .ws-eye { font-size: 12px; opacity: .7; }
.ws-switch select {
  flex: 1; border: none; background: none;
  color: var(--sidebar-text); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.ws-switch select option { color: initial; }
/* pri nahliadaní do cudzieho priestoru — jantárový akcent + read-only pocit */
body.peeking .ws-switch { background: rgba(245,158,11,.22); box-shadow: inset 0 0 0 1px rgba(245,158,11,.5); }
body.peeking .topbar { box-shadow: inset 0 3px 0 var(--warn, #f59e0b); }

/* ---------- notifikácie ---------- */
.notif-wrap { position: relative; }
#btn-notif { position: relative; padding: 8px 10px; font-size: 16px; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-panel {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: min(360px, 90vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  z-index: 60;
  overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.notif-readall { border: none; background: none; color: var(--primary); font-size: 12px; cursor: pointer; font-family: inherit; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.notif-item:hover { background: var(--hover); }
.notif-item.unread { background: rgba(99,102,241,.08); }
.notif-item.unread::before { content: ''; }
.notif-ic { flex-shrink: 0; font-size: 15px; width: 20px; text-align: center; }
.notif-txt { font-size: 13px; line-height: 1.4; min-width: 0; }
.notif-body { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-when { color: var(--muted); font-size: 11px; margin-top: 3px; }

/* ---------- obálky kariet ---------- */
.card.has-cover { padding-top: 0; overflow: hidden; }
.card-cover {
  margin: -12px -14px 10px;
  height: 130px;
  background: var(--chip-bg);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- @zmienky ---------- */
.comment-box { position: relative; }
.mention { color: var(--primary); font-weight: 600; background: rgba(99,102,241,.12); padding: 0 3px; border-radius: 4px; }
.mention-pop {
  position: absolute; bottom: calc(100% + 4px); left: 0;
  width: min(280px, 90%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  overflow: hidden; z-index: 5;
}
.mention-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer; font-size: 13px;
}
.mention-item i { color: var(--muted); font-style: normal; font-size: 12px; }
.mention-item.sel, .mention-item:hover { background: rgba(99,102,241,.14); }

/* ---------- klikací výber (pilulky) v modali ---------- */
.pill-select { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .1s, background .1s;
}
.pill-opt:hover { border-color: var(--muted); }
.pill-opt .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pill-opt.sel {
  border-color: var(--primary);
  background: rgba(99,102,241,.14);
  color: var(--primary);
  font-weight: 700;
}
/* segmentované (priorita) — vyplní na celú šírku rovnomerne */
.pill-select.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pill-select.seg .pill-opt { justify-content: center; padding: 8px 4px; }
.pill-opt.prio-high.sel { border-color: #dc2626; background: rgba(220,38,38,.14); color: #dc2626; }
.pill-opt.prio-low.sel  { border-color: #64748b; background: rgba(100,116,139,.16); color: var(--muted); }

/* ---------- rozbaľovacie sekcie v modali úlohy ---------- */
.det {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.det > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  user-select: none;
}
.det > summary::-webkit-details-marker { display: none; }
.det > summary::before {
  content: '▸';
  font-size: 10px;
  transition: transform .15s;
}
.det[open] > summary::before { transform: rotate(90deg); }
.det > summary:hover { color: var(--text); background: var(--hover); }
.det-count { color: var(--primary); font-weight: 700; font-size: 12px; }
.det-body {
  padding: 4px 14px 14px;
  display: flex; flex-direction: column; gap: 12px;
}

/* ---------- panel podprojektov nad boardom ---------- */
.project-subbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.subbar-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.subbar-chip, .subbar-up, .subbar-add {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.subbar-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.subbar-chip i { font-style: normal; opacity: .6; font-size: 11px; }
.subbar-chip:hover, .subbar-up:hover { border-color: var(--primary); }
.subbar-up { margin-right: 4px; color: var(--muted); }
.subbar-add { border-style: dashed; color: var(--muted); }
.subbar-add:hover { color: var(--primary); border-color: var(--primary); }
@media (max-width: 900px) { .project-subbar { padding: 10px 14px; } }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px; }

.sidebar-footer { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.sidebar-footer .btn { color: var(--sidebar-text); width: 100%; text-align: left; font-size: 13px; padding: 7px 10px; }
.sidebar-footer .btn:hover { background: rgba(255,255,255,.08); }

/* ---------- chips ---------- */
.chip {
  --c: #64748b;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--c);
  color: var(--c);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.chip.chip-on { background: var(--c); color: #fff; }
.chip i { font-style: normal; opacity: .75; font-size: 10px; }
.chip.mini { padding: 1px 8px; font-size: 10.5px; cursor: inherit; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; align-items: center; }

/* ---------- main ---------- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.topbar h2 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.view-switch {
  display: flex;
  background: var(--chip-bg);
  border-radius: 9px;
  padding: 3px;
}
.view-switch button {
  border: none; background: none;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
}
.view-switch button.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

#filter-priority {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--input-bg);
  color: var(--text);
}
#search {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  width: 190px;
  background: var(--input-bg);
  color: var(--text);
}

/* ---------- board ---------- */
.board {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 20px 24px;
  overflow: auto;
}
.column {
  background: var(--col-bg);
  border-radius: 14px;
  display: flex; flex-direction: column;
  flex: 1 0 260px;
  min-width: 260px;
  max-width: 400px;
  max-height: 100%;
}
.col-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-gear { font-size: 12px; padding: 0 5px; opacity: .6; }
.col-gear:hover { opacity: 1; }
.col-add {
  flex: 0 0 auto;
  align-self: flex-start;
  border: 1px dashed var(--border);
  background: none;
  color: var(--muted);
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
}
.col-add:hover { color: var(--primary); border-color: var(--primary); }
.column-header {
  padding: 13px 16px;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.col-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.col-todo { background: #94a3b8; }
.col-doing { background: #f59e0b; }
.col-done { background: #22c55e; }
.col-count { margin-left: auto; font-weight: 500; }

.column-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 14px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 80px;
}
.column-body.drag-over { background: rgba(99,102,241,.1); border-radius: 0 0 14px 14px; }

/* ---------- card ---------- */
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  cursor: grab;
  border-left: 4px solid transparent;
  transition: transform .1s, box-shadow .1s;
}
.card:hover { box-shadow: 0 4px 12px rgba(15,23,42,.15); transform: translateY(-1px); }
.card.dragging { opacity: .5; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.card.done .card-title { text-decoration: line-through; color: var(--muted); }
.card-desc { font-size: 12px; color: var(--muted); margin-top: 5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.badge-project { color: #fff; }
.badge-due { background: var(--chip-bg); color: var(--muted); }
.badge-due.overdue { background: rgba(239,68,68,.14); color: var(--danger-text); }
.badge-due.today { background: rgba(245,158,11,.16); color: var(--warn-text); }
.badge-due.complete { background: rgba(34,197,94,.15); color: #16a34a; }
.prio { font-size: 11px; font-weight: 700; }
.prio-1 { color: #dc2626; }
.prio-3 { color: #94a3b8; }

.empty-hint { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }
.empty-hint.big { padding: 70px 0; font-size: 15px; }

/* ---------- list / môj deň ---------- */
.list-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.list-group {
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.list-group-title {
  padding: 12px 16px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--hover); }
.row.done .row-title { text-decoration: line-through; color: var(--muted); }
.row-check { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 600; }
.row-meta { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost:hover { background: rgba(100,116,139,.15); }
.btn-danger { background: rgba(239,68,68,.12); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,.22); }

/* ---------- modals ---------- */
dialog {
  margin: auto;
  border: none;
  border-radius: 16px;
  padding: 26px;
  width: min(540px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
dialog::backdrop { background: rgba(10,15,26,.55); }
#task-modal { width: min(620px, 94vw); }
dialog h3 { margin-bottom: 18px; font-size: 18px; }
dialog form { display: flex; flex-direction: column; gap: 14px; }
dialog label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); flex: 1; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
dialog input, dialog textarea, dialog select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
}
dialog input:focus, dialog textarea:focus, dialog select:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.form-row { display: flex; gap: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; align-items: center; }
.spacer { flex: 1; }

.color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.color-swatch.selected { border-color: var(--text); }

/* checklist v modali */
.subtask-progress { font-weight: 500; margin-left: 6px; }
.subtask-list { display: flex; flex-direction: column; gap: 4px; }
.subtask {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--chip-bg);
}
.subtask input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.subtask span { flex: 1; font-size: 13px; font-weight: 400; color: var(--text); }
.subtask.done span { text-decoration: line-through; color: var(--muted); }
.subtask-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 3px; }
.subtask-del:hover { color: var(--danger); }

/* tags modal */
.tags-existing { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin-bottom: 2px; }
.tag-row { display: flex; align-items: center; gap: 10px; }
.tag-usage { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ---------- kalendár ---------- */
.calendar {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column;
}
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.cal-head h3 { font-size: 17px; min-width: 160px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { margin-bottom: 6px; }
.cal-dow div { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cal-body { flex: 1; grid-auto-rows: minmax(96px, 1fr); }
.cal-cell {
  background: var(--panel);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 3px;
}
.cal-cell:hover { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-cell.off { background: transparent; box-shadow: none; cursor: default; }
.cal-cell.off:hover { outline: none; }
.cal-cell.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-day { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-day { color: var(--primary); }
.cal-task {
  --c: #6366f1;
  font-size: 11px; font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--text);
  border-left: 3px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-task:hover { background: color-mix(in srgb, var(--c) 32%, transparent); }
.cal-task.done { text-decoration: line-through; opacity: .55; }
.cal-task.overdue { color: var(--danger-text); }

/* ---------- prehľad ---------- */
.dashboard {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.dash-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.dash-card b { display: block; font-size: 26px; }
.dash-card span { font-size: 12px; color: var(--muted); }
.dash-card.warn b { color: var(--danger); }
.dash-panel {
  background: var(--panel);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.dash-panel h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 14px; }
.dash-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-wrap .bar { width: 100%; max-width: 46px; background: var(--primary); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar-val { font-size: 12px; font-weight: 700; }
.bar-wrap label { font-size: 10.5px; color: var(--muted); }
.proj-progress { margin-bottom: 12px; }
.proj-progress:last-child { margin-bottom: 0; }
.proj-progress-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.proj-progress-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.proj-progress-head .pct { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.progress-track { height: 7px; background: var(--chip-bg); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; }
.prio-split { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.prio-box { border-radius: 10px; padding: 12px; text-align: center; background: var(--chip-bg); }
.prio-box b { display: block; font-size: 22px; }
.prio-box span { font-size: 11px; color: var(--muted); }
.prio-box.p1 b { color: #dc2626; }
.prio-box.p3 b { color: #94a3b8; }

/* ---------- komentáre a aktivita ---------- */
.feed-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.feed-item.comment {
  background: var(--chip-bg);
  border-radius: 8px;
  padding: 8px 10px;
}
.feed-body { font-size: 13px; font-weight: 400; color: var(--text); white-space: pre-wrap; }
.feed-meta { font-size: 11px; color: var(--muted); font-weight: 400; display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.feed-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 2px; }
.feed-del:hover { color: var(--danger); }
.feed-item.activity {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 400; color: var(--muted);
  padding: 2px 4px;
}

/* ---------- import ---------- */
dialog.wide { width: min(780px, 95vw); }
.import-inner { display: flex; flex-direction: column; gap: 4px; }
.import-inner h3 { margin-bottom: 14px; }
#import-step1, #import-step2 { display: flex; flex-direction: column; gap: 14px; }
#import-step1 label, #import-step2 label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
#import-text { font-family: ui-monospace, monospace; font-size: 12px; }
.import-or { text-align: center; font-size: 12px; color: var(--muted); }
.import-error { color: var(--danger); font-size: 13px; min-height: 16px; }
.import-preview-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
#import-preview { border-collapse: collapse; width: 100%; font-size: 12.5px; }
#import-preview th { padding: 8px; background: var(--chip-bg); text-align: left; vertical-align: bottom; min-width: 120px; }
#import-preview th select { width: 100%; padding: 5px 8px; font-size: 12px; margin-bottom: 6px; }
.import-header { font-weight: 700; font-size: 12px; }
#import-preview td { padding: 6px 8px; border-top: 1px solid var(--border); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.import-more { color: var(--muted); font-style: italic; }

/* ---------- Apple Calendar modal ---------- */
.ical-info { font-size: 13px; color: var(--muted); }
.ical-url-row { display: flex; gap: 8px; }
.ical-url-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 12px; }
.ical-steps {
  font-size: 13px;
  line-height: 1.7;
  background: var(--chip-bg);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
}
.ical-steps i { color: var(--primary); font-style: normal; font-weight: 600; }

/* ---------- quick add ---------- */
.quick-add {
  padding: 12px 24px 0;
}
.quick-add input {
  width: 100%;
  padding: 10px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
}
.quick-add input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-style: solid; }

/* ---------- kôš ---------- */
.trash-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.trash-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--chip-bg); border-radius: 10px; }
.trash-row .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.trash-main { flex: 1; min-width: 0; }
.trash-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-meta { font-size: 11px; color: var(--muted); }
.trash-row .btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; }

/* ---------- poznámky ---------- */
.notes-tabs { align-self: flex-start; margin-bottom: 4px; }
#notes-textarea { font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.6; width: 100%; }
.notes-preview {
  min-height: 200px; max-height: 50vh; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px; line-height: 1.65;
}
.notes-preview h2, .notes-preview h3, .notes-preview h4 { margin: 12px 0 6px; }
.notes-preview h2:first-child, .notes-preview p:first-child { margin-top: 0; }
.notes-preview p { margin: 8px 0; }
.notes-preview ul { margin: 8px 0 8px 22px; }
.notes-preview code { background: var(--chip-bg); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.notes-preview a { color: var(--primary); }

/* ---------- prílohy ---------- */
.attach-list { display: flex; flex-direction: column; gap: 4px; }
.attach-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--chip-bg);
}
.attach-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attach-name:hover { color: var(--primary); text-decoration: underline; }
.attach-size { font-size: 11px; color: var(--muted); white-space: nowrap; }
.attach-add { align-self: flex-start; font-size: 13px; padding: 6px 12px; cursor: pointer; }

/* ---------- touch drag ---------- */
.card.touch-ghost {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  opacity: .92;
  transform: rotate(2deg) scale(1.03);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

/* ---------- timeline ---------- */
.timeline {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.tl-scroll {
  overflow-x: auto;
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.tl-grid {
  display: grid;
  grid-template-columns: 210px calc(var(--dayw) * var(--days));
  align-items: stretch;
  min-width: max-content;
}
.tl-corner { position: sticky; left: 0; background: var(--panel); z-index: 2; border-bottom: 1px solid var(--border); }
.tl-head { display: flex; border-bottom: 1px solid var(--border); }
.tl-day {
  width: var(--dayw);
  flex-shrink: 0;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  padding: 6px 0;
  position: relative;
}
.tl-day b { display: block; font-size: 9px; text-transform: uppercase; color: var(--primary); }
.tl-day.wknd { background: var(--chip-bg); }
.tl-day.today { background: rgba(99,102,241,.15); color: var(--primary); font-weight: 700; border-radius: 6px 6px 0 0; }
.tl-project {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 6px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted);
  position: sticky; left: 0;
  width: max-content;
  max-width: 320px;
}
.tl-project .dot { width: 9px; height: 9px; border-radius: 50%; }
.tl-label {
  position: sticky; left: 0;
  background: var(--panel);
  z-index: 1;
  padding: 5px 14px;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
}
.tl-track {
  position: relative;
  border-top: 1px solid var(--border);
  min-height: 30px;
}
.tl-bar {
  --c: #6366f1;
  position: absolute;
  top: 5px; bottom: 5px;
  background: color-mix(in srgb, var(--c) 30%, transparent);
  border: 1.5px solid var(--c);
  border-radius: 7px;
  cursor: pointer;
}
.tl-bar:hover { background: color-mix(in srgb, var(--c) 50%, transparent); }
.tl-bar.late { border-color: var(--danger); }

/* ---------- časovač ---------- */
.timer-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,.15);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timer-chip button {
  border: none; background: var(--primary); color: #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 9px;
  cursor: pointer;
  line-height: 1;
}
.time-controls { display: flex; gap: 8px; }
#btn-timer-toggle { align-self: flex-start; font-size: 13px; padding: 6px 12px; border: 1px dashed var(--border); }
#btn-timer-toggle.timer-running { background: rgba(239,68,68,.12); color: var(--danger); border-style: solid; border-color: var(--danger); }
.time-when { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 6px; }

/* ---------- neskôr / zdieľanie ---------- */
.someday-box {
  display: flex; align-items: center; gap: 8px;
  font-weight: 400; font-size: 13px; color: var(--text);
  padding: 9px 0;
}
.someday-box input { width: 16px; height: 16px; accent-color: var(--primary); }
.share-actions { display: flex; gap: 8px; margin-top: 8px; }
.share-actions .btn { font-size: 13px; padding: 6px 12px; }

/* ---------- read-only sheet ---------- */
.sheet-view {
  flex: 1;
  overflow: hidden;
  padding: 16px 24px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.sheet-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-toolbar .btn { font-size: 13px; padding: 6px 12px; text-decoration: none; }
.sheet-updated { font-size: 12px; color: var(--muted); }
.sheet-table-wrap {
  flex: 1;
  overflow: auto;
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.sheet-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.sheet-table th {
  position: sticky; top: 0;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
  z-index: 1;
}
.sheet-table td {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  min-width: 90px;
  max-width: 340px;
  overflow-wrap: break-word;
}
.sheet-table tbody tr:hover { background: var(--hover); }
.sheet-table a { color: var(--primary); }

@media (max-width: 900px) {
  .sheet-view { padding: 12px 14px; }
}

/* ---------- command palette ---------- */
.palette-dialog {
  margin-top: 10vh;
  padding: 0;
  width: min(580px, 92vw);
  overflow: hidden;
}
#palette-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 16px 18px;
  font-size: 16px;
  background: var(--panel);
  color: var(--text);
}
#palette-input:focus { outline: none; }
.palette-results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.palette-group {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted);
  padding: 8px 12px 3px;
}
.palette-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
}
.palette-item.sel { background: rgba(99,102,241,.14); }
.palette-icon { width: 22px; text-align: center; flex-shrink: 0; display: inline-flex; justify-content: center; }
.palette-icon .dot { width: 10px; height: 10px; border-radius: 50%; }
.palette-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-hint { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- náhľady príloh ---------- */
.attach-thumb {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: var(--bg);
}

/* ---------- používatelia ---------- */
.user-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .3px;
}
.user-avatar.mini { width: 18px; height: 18px; font-size: 8.5px; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  color: #fff;
  font-size: 13px; font-weight: 600;
}
.user-chip .user-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role-tag {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
  padding: 1px 7px; border-radius: 5px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.75);
}
#btn-logout { color: rgba(255,255,255,.7); font-size: 15px; padding: 2px 7px; }
#btn-logout:hover { color: #fff; background: rgba(255,255,255,.15); }
.user-meta { font-style: normal; color: var(--muted); font-size: 11px; font-weight: 400; }
.user-inactive { opacity: .5; }
.field-hint { font-weight: 400; font-size: 11px; }

/* profi správa členov */
.users-head { margin-bottom: 12px; }
.users-summary { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.users-list { display: flex; flex-direction: column; gap: 3px; max-height: 340px; overflow-y: auto; margin-bottom: 16px; }
.user-member { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; transition: background .12s; }
.user-member:hover { background: var(--hover, rgba(120,120,120,.08)); }
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.member-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.member-meta { font-size: 11px; color: var(--muted); }
.you-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(99,102,241,.16); color: var(--primary); }
.role-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: rgba(120,120,120,.14); color: var(--muted); }
.role-badge.admin { background: rgba(99,102,241,.14); color: var(--primary); }
.member-tasks { font-size: 12px; color: var(--muted); min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.member-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.user-member:hover .member-actions,
.user-member:focus-within .member-actions { opacity: 1; }
@media (hover: none), (max-width: 900px) { .member-actions { opacity: 1; } }
.user-form-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.user-avatar.big { width: 42px; height: 42px; font-size: 16px; transition: background .2s; }
.field-col { display: flex; flex-direction: column; gap: 6px; flex: 1; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  padding: 12px 18px;
  border-radius: 12px;
  display: flex; align-items: center; gap: 14px;
  font-size: 14px;
  box-shadow: 0 12px 35px rgba(0,0,0,.35);
  z-index: 300;
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.toast-action {
  border: none;
  background: none;
  color: #a5b4fc;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 4px;
}
.toast-action:hover { text-decoration: underline; }

/* ---------- závislosti ---------- */
.card.blocked { opacity: .55; }
.badge-blocked { background: rgba(239,68,68,.14); color: var(--danger-text); }
.dep-chip { gap: 6px; }
.dep-chip.dep-done { opacity: .7; }
.dep-del {
  border: none; background: none;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  line-height: 1;
  opacity: .8;
}
.dep-del:hover { opacity: 1; }
#deps-select { max-width: 100%; }

/* ---------- šablóny ---------- */
.template-row { display: flex; gap: 8px; align-items: center; }
.template-row select { flex: 1; }
.template-row .icon-btn { color: var(--danger); font-size: 16px; }

.offline-note {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel);
  color: var(--text);
  padding: 22px 28px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  font-size: 15px;
  z-index: 100;
}

/* ---------- responsive ---------- */
.btn-menu { display: none; }
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(5, 10, 20, .5);
  z-index: 49;
}

@media (max-width: 900px) {
  /* sidebar ako vysúvací drawer — všetky funkcie ostávajú dostupné */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(300px, 85vw);
    min-width: 0;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
    overflow-y: auto;
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; }
  .btn-menu {
    display: inline-flex;
    font-size: 20px;
    padding: 4px 10px;
    flex-shrink: 0;
  }

  /* ── mobilná horná lišta: veľké dotykové ciele, čisté riadky ── */
  .topbar {
    display: flex; flex-wrap: wrap; align-items: center;
    padding: 6px 10px;
    padding-top: calc(6px + env(safe-area-inset-top));
    gap: 8px 6px;
  }
  .topbar-actions { display: contents; }   /* deti pretečú priamo do lišty */
  .btn-menu {
    display: inline-flex; align-items: center; justify-content: center;
    order: 0; width: 44px; height: 44px; font-size: 22px; padding: 0; flex-shrink: 0;
  }
  .topbar h2 { order: 1; flex: 1; font-size: 18px; min-width: 0; }
  .notif-wrap { order: 2; }
  #btn-notif { width: 44px; height: 44px; font-size: 20px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  #btn-notes, #btn-edit-project { order: 2; width: 44px; height: 44px; padding: 0; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }

  /* prepínač pohľadov na celú šírku, veľké segmenty */
  .view-switch { order: 4; flex-basis: 100%; width: 100%; padding: 4px; gap: 4px; }
  .view-switch button { flex: 1; min-height: 42px; font-size: 13px; padding: 6px 2px; }

  /* hľadanie + filtre v spodnom riadku, 44 px */
  #search { order: 5; flex: 1 1 100%; min-width: 0; height: 44px; font-size: 15px; }
  #filter-priority, #filter-assignee { order: 6; flex: 1 1 45%; height: 44px; font-size: 14px; }
  .timer-chip { order: 7; flex-basis: 100%; height: 40px; justify-content: center; }

  /* „+ Nová úloha" ako plávajúce tlačidlo (FAB) vpravo dole */
  #btn-new-task {
    order: 3;
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 58px; height: 58px;
    border-radius: 50%;
    padding: 0; font-size: 0;
    box-shadow: 0 6px 20px rgba(99,102,241,.5);
    z-index: 40;
    display: flex; align-items: center; justify-content: center;
  }
  #btn-new-task::before { content: '＋'; font-size: 30px; font-weight: 400; line-height: 1; }

  .sidebar { padding-top: calc(18px + env(safe-area-inset-top)); }
  .board, .list-view, .dashboard, .calendar, .timeline, .sheet-view {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));  /* miesto pod FAB */
  }

  .board { flex-direction: column; overflow-y: auto; padding: 14px; gap: 12px; }
  .column { max-height: none; min-width: 0; max-width: none; flex: none; }
  .col-add { align-self: stretch; text-align: center; }
  .column-body { min-height: 40px; }

  .list-view, .dashboard { padding: 14px; }
  .quick-add { padding: 10px 14px 0; }

  .calendar { padding: 14px; overflow-x: auto; }
  .cal-grid { min-width: 540px; }
  .cal-head h3 { min-width: 0; font-size: 15px; }

  .form-row { flex-direction: column; gap: 14px; }
  dialog { padding: 18px; width: min(540px, 94vw); }

  /* ── väčšie dotykové ciele všeobecne ── */
  #quick-add { height: 46px; font-size: 15px; }
  .sidebar-footer .btn { padding: 12px 12px; font-size: 14px; }
  .nav-item { padding: 11px 10px; }
  .sidebar .icon-btn { min-width: 34px; min-height: 34px; }
  .pill-opt { padding: 11px 14px; font-size: 14px; }
  .pill-select.seg .pill-opt { padding: 11px 4px; }
  dialog .btn { min-height: 44px; }
  dialog input, dialog textarea, dialog select { min-height: 44px; font-size: 16px; }  /* 16px = žiadny iOS zoom */
  .row { padding: 14px 16px; }           /* riadky zoznamu pohodlnejšie na ťuk */
  .row-check { width: 22px; height: 22px; }
  .chip { padding: 6px 12px; font-size: 13px; }
  .subtask input[type="checkbox"] { width: 20px; height: 20px; }
}

/* ===================== LIQUID GLASS (na konci — vyhráva kaskádu) ===================== */
.topbar, dialog, .notif-panel, .palette-dialog,
.timer-chip, .ws-switch, .toast, .mention-pop, .column, .list-group,
.dash-panel, .sheet-table-wrap, .stat, #btn-new-task, .view-switch, #quick-add {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.topbar {
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-brd);
  box-shadow: 0 4px 24px rgba(15,23,42,.06);
}
.column, .list-group, .dash-panel, .sheet-table-wrap {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}
dialog {
  background: var(--glass-strong);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 24px 70px rgba(0,0,0,.4), 0 1px 0 var(--glass-hi) inset;
}
.notif-panel, .palette-dialog, .mention-pop {
  background: var(--glass-strong);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}
.quick-add { background: transparent; }
#quick-add { background: var(--glass-bg); border: 1px solid var(--glass-brd); }
/* štatistiky sú v tmavom drawer-i — tmavé sklo v oboch režimoch (svetlý text ostáva čitateľný) */
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.view-switch { background: var(--glass-bg); border: 1px solid var(--glass-brd); }

/* drawer ako tmavé matné sklo (svetlý text ostáva čitateľný v oboch režimoch) */
.sidebar { background: rgba(12, 18, 32, .72); border-right: 1px solid var(--glass-brd); }
[data-theme="dark"] .sidebar { background: rgba(8, 12, 22, .74); }

/* FAB — vibrant sklo s odleskom */
#btn-new-task {
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,0) 46%), rgba(99,102,241,.9);
  border: 1px solid rgba(255,255,255,.38);
}

/* pružný dotyk — natívny iOS pocit */
.btn, .pill-opt, .chip, .card, .nav-item, .view-switch button,
.icon-btn, .color-swatch, #btn-new-task, .row, .palette-item, .notif-item {
  transition: transform .12s cubic-bezier(.2,.8,.3,1), background .15s, box-shadow .15s, border-color .15s;
}
.btn:active, .pill-opt:active, .chip:active, .view-switch button:active,
.icon-btn:active, #btn-new-task:active, .nav-item:active, .row:active { transform: scale(.96); }
.card:active { transform: scale(.985); }

/* filtre v lište — sklo namiesto natívnej bielej */
#filter-priority, #filter-assignee {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
#search { color: var(--text); }

/* zaoblenejšie rohy pre iOS pocit */
.card, .column, .list-group, .dash-panel { border-radius: 16px; }
dialog { border-radius: 22px; }
.btn, #search, #filter-priority, #filter-assignee, .pill-opt { border-radius: 12px; }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar, .column, .list-group, .dash-panel, .stat, .view-switch, #quick-add { background: var(--panel); }
  dialog, .notif-panel, .palette-dialog, .mention-pop { background: var(--panel); }
}
/* =================================================================================== */
