:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #ebedf0;
  --col: #e9ebef;
  --text: #1c2230;
  --muted: #687082;
  --border: #d7dbe2;
  --accent: #334bd6;
  --accent-ink: #ffffff;
  --accent-soft: #e5e9ff;
  --danger: #c4314b;
  --shadow: 0 1px 2px rgba(20, 25, 40, .08), 0 2px 8px rgba(20, 25, 40, .06);
  --p1: #d92d4b; --p2: #e8730c; --p3: #3367d6; --p4: #8a96a8;
  --radius: 10px;
  color-scheme: light;
}
:root[data-theme=dark] {
    --bg: #14171d;
    --surface: #1e222b;
    --surface-2: #272c37;
    --col: #1a1e26;
    --text: #e6e9ef;
    --muted: #949cad;
    --border: #323846;
    --accent: #6c80ff;
    --accent-ink: #0d1020;
    --accent-soft: #262d52;
    --danger: #ff6b81;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.25);
    --p1: #ff5c74; --p2: #ff9b42; --p3: #6c8dff; --p4: #7d879a;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #14171d;
    --surface: #1e222b;
    --surface-2: #272c37;
    --col: #1a1e26;
    --text: #e6e9ef;
    --muted: #949cad;
    --border: #323846;
    --accent: #6c80ff;
    --accent-ink: #0d1020;
    --accent-soft: #262d52;
    --danger: #ff6b81;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.25);
    --p1: #ff5c74; --p2: #ff9b42; --p3: #6c8dff; --p4: #7d879a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: var(--bg); color: var(--text);
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }

.btn {
  border: 1px solid var(--border); background: var(--surface); padding: 8px 14px;
  border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }
.icon-btn {
  background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px;
  color: var(--muted); position: relative; display: inline-flex;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.muted { color: var(--muted); font-weight: 400; }
.error { color: var(--danger); min-height: 1em; margin: 8px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.logo {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: inline-block;
  background-image: linear-gradient(var(--accent-ink), var(--accent-ink)), linear-gradient(var(--accent-ink), var(--accent-ink)), linear-gradient(var(--accent-ink), var(--accent-ink));
  background-size: 4px 14px, 4px 9px, 4px 6px;
  background-position: 6px 6px, 11px 6px, 16px 6px;
  background-repeat: no-repeat;
}

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-box {
  width: 100%; max-width: 380px; background: var(--surface); padding: 28px;
  border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.auth-box .brand { margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 13px; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.row { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.board-select {
  width: auto; max-width: 240px; font-weight: 600; padding: 6px 10px;
  background: var(--accent-soft); border-color: transparent;
}
.board-admin {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px;
}
.board-admin-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.board-admin-head input { flex: 1; font-weight: 600; }
.member-grid { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.member-grid label { font-size: 13px; }
.member-grid .muted { font-size: 12px; }
.status-board-pick { margin-bottom: 10px; max-width: 320px; }
.board-tag { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--accent-soft); color: var(--text); white-space: nowrap; }
.views { display: flex; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.view-btn { background: none; border: 0; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 500; }
.view-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.controls { display: flex; gap: 8px; flex: 1; min-width: 0; }
.controls select, .controls input { width: auto; padding: 6px 8px; }
.controls input { min-width: 120px; flex: 0 1 200px; }
.right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bell-wrap, .user-wrap { position: relative; }
.badge {
  position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; font-size: 11px;
  min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; font-weight: 600;
}
.avatar-btn, .avatar {
  width: 32px; height: 32px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; cursor: pointer; flex: none;
}
.avatar { width: 24px; height: 24px; font-size: 10px; cursor: default; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); min-width: 200px; z-index: 20; padding: 6px; overflow: hidden;
}
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 8px; gap: 12px; font-size: 13px; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 6px; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.notif-panel { width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.notif {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 6px;
  cursor: pointer; font-size: 13px;
}
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-soft); }
.notif time { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.empty { color: var(--muted); padding: 12px 8px; font-size: 13px; }

.notice {
  margin: 12px 16px 0; padding: 10px 14px; background: var(--accent-soft); border-radius: 10px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}

/* ---------- board ---------- */
.board {
  display: flex; gap: 14px; padding: 16px; overflow-x: auto; align-items: flex-start;
  min-height: calc(100vh - 60px);
}
.column {
  background: var(--col); border-radius: 12px; width: 290px; flex: none; display: flex; flex-direction: column;
  max-height: calc(100vh - 100px); border: 1px solid var(--border);
}
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; gap: 8px; }
.column-head h2 { font-size: 13px; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.count { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--surface-2); border-radius: 10px; padding: 1px 7px; }
.cards { padding: 4px 8px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; flex: 1; }
.column.drag-over .cards { background: var(--accent-soft); border-radius: 8px; }
.add-in-col { margin: 0 8px 8px; background: none; border: 1px dashed var(--border); color: var(--muted); border-radius: 8px; padding: 6px; cursor: pointer; }
.add-in-col:hover { color: var(--text); background: var(--surface); }

.card {
  background: var(--surface); border-radius: 9px; padding: 10px 10px 8px 12px; box-shadow: var(--shadow);
  cursor: pointer; border: 1px solid var(--border); border-left: 4px solid var(--pc, var(--p3));
  user-select: none;
}
.card:hover { border-color: var(--accent); border-left-color: var(--pc, var(--p3)); }
.card.dragging { opacity: .4; }
.card.done .card-title { text-decoration: line-through; color: var(--muted); }
.card-title { font-weight: 500; word-break: break-word; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.card-foot .spacer { flex: 1; }
.prio { font-weight: 700; font-size: 11px; padding: 1px 6px; border-radius: 5px; color: #fff; background: var(--pc); }
.due.overdue { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--p2); font-weight: 600; }
.drop-marker { height: 3px; background: var(--accent); border-radius: 2px; margin: -4px 0; }

/* ---------- moje zadania ---------- */
.mine { padding: 16px; max-width: 900px; margin: 0 auto; }
.mine h2 { font-size: 18px; margin: 4px 0 12px; }
.mine-list { display: flex; flex-direction: column; gap: 8px; }
.mine-row {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--pc);
  border-radius: 9px; padding: 10px 14px; cursor: pointer;
}
.mine-row:hover { border-color: var(--accent); border-left-color: var(--pc); }
.status-pill { font-size: 12px; background: var(--surface-2); border-radius: 10px; padding: 2px 9px; color: var(--muted); white-space: nowrap; }

/* ---------- modale ---------- */
.modal {
  border: 1px solid var(--border); border-radius: 14px; padding: 0; background: var(--surface); color: var(--text);
  width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal.narrow { width: min(440px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(10, 14, 24, .5); }
.modal > form, .modal > div { padding: 18px 20px 20px; }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 18px; flex: 1; }
.modal-head .close { margin-left: auto; }
.card-num { color: var(--muted); font-weight: 600; }
.title-input { font-size: 18px; font-weight: 600; border-color: transparent; padding: 6px 8px; }
.title-input:hover { border-color: var(--border); }
.card-grid { display: grid; grid-template-columns: 1fr 240px; gap: 20px; }
.card-main { min-width: 0; }
.card-side { display: flex; flex-direction: column; gap: 12px; }
.lbl { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: var(--muted); }
.lbl select, .lbl input { color: var(--text); font-weight: 400; font-size: 14px; }
.card-main > .lbl { margin-bottom: 6px; }
.meta { color: var(--muted); font-size: 12px; margin: 0; }
.side-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
#comments-section h3 { font-size: 14px; margin: 18px 0 8px; }
.comment { padding: 8px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.comment-head { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.comment-head strong { color: var(--text); }
.comment-body { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.mention { color: var(--accent); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.comment-new { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-top: 10px; }

.mention-pop {
  position: fixed; z-index: 1000; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); min-width: 220px; padding: 4px; max-height: 220px; overflow-y: auto;
}
.mention-opt { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.mention-opt.active, .mention-opt:hover { background: var(--accent-soft); }
.mention-opt small { color: var(--muted); }

.admin .status-row, .users-table td { vertical-align: middle; }
.status-row { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.inline-form input[name=name] { flex: 1; min-width: 160px; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--border); }
.users-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); }
.users-table .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--surface-2); }
.tag.warn { background: #ffe4b8; color: #6b4000; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; z-index: 2000; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}

@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 8px 12px; }
  .controls { order: 3; flex-basis: 100%; }
  .controls select, .controls input { flex: 1 1 0; min-width: 0; }
  .brand .app-name { display: none; }
  .board-select { max-width: 150px; }
  .card-grid { grid-template-columns: 1fr; }
  .board { padding: 12px; }
  .column { width: 82vw; }
  .mine-row { grid-template-columns: auto 1fr; }
  .mine-row .status-pill, .mine-row .avatar { display: none; }
}

/* ---------- etykiety ---------- */
[data-color=red]    { --c: #d63a4f; }
[data-color=orange] { --c: #dd6b0e; }
[data-color=yellow] { --c: #b58b00; }
[data-color=green]  { --c: #2f9a4f; }
[data-color=teal]   { --c: #108a8a; }
[data-color=blue]   { --c: #2f63d6; }
[data-color=purple] { --c: #7a4fd6; }
[data-color=pink]   { --c: #c93f8f; }
[data-color=gray]   { --c: #6b7a90; }
:root[data-theme=dark] [data-color=red]    { --c: #ff7a8a; }
:root[data-theme=dark] [data-color=orange] { --c: #ffa25c; }
:root[data-theme=dark] [data-color=yellow] { --c: #f2c94c; }
:root[data-theme=dark] [data-color=green]  { --c: #5fd38a; }
:root[data-theme=dark] [data-color=teal]   { --c: #4fd1d1; }
:root[data-theme=dark] [data-color=blue]   { --c: #7ea2ff; }
:root[data-theme=dark] [data-color=purple] { --c: #b494ff; }
:root[data-theme=dark] [data-color=pink]   { --c: #ff8cc8; }
:root[data-theme=dark] [data-color=gray]   { --c: #a3adbd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) [data-color=red]    { --c: #ff7a8a; }
  :root:not([data-theme=light]) [data-color=orange] { --c: #ffa25c; }
  :root:not([data-theme=light]) [data-color=yellow] { --c: #f2c94c; }
  :root:not([data-theme=light]) [data-color=green]  { --c: #5fd38a; }
  :root:not([data-theme=light]) [data-color=teal]   { --c: #4fd1d1; }
  :root:not([data-theme=light]) [data-color=blue]   { --c: #7ea2ff; }
  :root:not([data-theme=light]) [data-color=purple] { --c: #b494ff; }
  :root:not([data-theme=light]) [data-color=pink]   { --c: #ff8cc8; }
  :root:not([data-theme=light]) [data-color=gray]   { --c: #a3adbd; }
}
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap; max-width: 100%;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
button.chip { cursor: pointer; font-family: inherit; }
button.chip.off { color: var(--muted); background: none; border-color: var(--border); }
button.chip.off::before { background: color-mix(in srgb, var(--c) 60%, transparent); }
button.chip.on { background: var(--c); color: var(--surface); border-color: var(--c); }
button.chip.on::before { background: var(--surface); }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-labels .chip { font-size: 11px; padding: 3px 7px; }
.label-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px 0; }
.label-bar .bar-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.label-picker { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.label-picker .empty { padding: 2px 0; font-weight: 400; }
.small-link { font-size: 12px; align-self: flex-start; margin-top: 4px; font-weight: 500; }
.new-label { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; }
.new-label input { padding: 6px 8px; font-weight: 400; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; }
.swatch.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.admin-sub { font-size: 14px; margin: 18px 0 6px; }
.label-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.label-row select { width: auto; padding: 5px 8px; }
.mine-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mine-labels .chip { font-size: 11px; padding: 3px 7px; }
.prio { white-space: nowrap; }

/* ---------- przełącznik motywu i języka w menu ---------- */
.menu-section { padding: 6px 8px 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.menu-section .menu-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; background: var(--surface-2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted); white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

/* ---------- due time / overdue ---------- */
.card, .mine-row { position: relative; }
.overdue-flag {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface); pointer-events: auto; cursor: default;
}
.due-state { font-size: 12px; color: var(--muted); margin: -6px 0 0; display: flex; align-items: center; gap: 4px; }
.due-state .overdue-flag { position: static; width: 16px; height: 16px; line-height: 16px; font-size: 11px; box-shadow: none; }
.due-state.overdue { color: var(--danger); font-weight: 600; }
.due-state.soon { color: var(--p2); font-weight: 600; }

/* ---------- attachments ---------- */
.attach-section { margin-top: 18px; border-radius: 10px; }
.attach-section.drop { outline: 2px dashed var(--accent); outline-offset: 4px; background: var(--accent-soft); }
.attach-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.attach-head h3 { font-size: 14px; margin: 0; flex: 1; }
.attach-list { display: flex; flex-direction: column; gap: 6px; }
.attach-item {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.attach-thumb {
  width: 40px; height: 40px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--muted); overflow: hidden; text-transform: uppercase;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-name { font-weight: 500; word-break: break-all; color: var(--text); text-decoration: none; }
.attach-name:hover { color: var(--accent); text-decoration: underline; }
.attach-meta { font-size: 12px; color: var(--muted); }
.attach-progress { font-size: 12px; color: var(--muted); padding: 4px 2px; }

/* ---------- right-click menu ---------- */
.ctx-menu {
  position: fixed; z-index: 3000; min-width: 220px; max-width: 280px; max-height: calc(100vh - 16px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px;
}
.ctx-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 8px 4px; }
.ctx-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0;
  padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text);
}
.ctx-item:hover, .ctx-item:focus { background: var(--surface-2); outline: none; }
.ctx-item .check { width: 14px; color: var(--accent); font-weight: 700; flex: none; }
.ctx-item.current { font-weight: 600; }
.ctx-item .avatar { width: 20px; height: 20px; font-size: 9px; }
.ctx-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ---------- browser notification status ---------- */
.notif-status { margin: 0; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notif-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.notif-status .on { background: #2f9a4f; } .notif-status .off { background: var(--p2); } .notif-status .blocked { background: var(--danger); }

/* ---------- subtasks ---------- */
.card.subtask {
  margin-left: 14px; padding-top: 7px; padding-bottom: 6px; background: var(--surface-2);
  border-style: dashed; border-left-style: solid; box-shadow: none;
}
.card.subtask .card-title { font-size: 13px; }
.parent-line { font-size: 11px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-pill { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.progress-pill.complete { background: color-mix(in srgb, #2f9a4f 18%, transparent); color: #2f9a4f; }
.parent-link { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.parent-link a { color: var(--accent); font-weight: 600; cursor: pointer; }
.subtask-section { margin-top: 18px; }
.subtask-row {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 6px; cursor: pointer;
}
.subtask-row:hover { border-color: var(--accent); }
.subtask-row.done .st-title { text-decoration: line-through; color: var(--muted); }
.subtask-row .tick { cursor: pointer; width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border); display: grid; place-items: center; font-size: 11px; color: #fff; }
.subtask-row.done .tick { background: #2f9a4f; border-color: #2f9a4f; }
.subtask-add { display: flex; gap: 8px; }
.subtask-add input { padding: 6px 8px; }
.mine-parent { font-size: 11px; color: var(--muted); }

/* ---------- announcements ---------- */
.ann-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.ann-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ann-row .lbl { min-width: 140px; }
.ann-row .lbl select, .ann-row .lbl input { width: auto; min-width: 140px; }
.ann-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ann-item.inactive .ann-msg { color: var(--muted); }
.ann-msg { font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.ann-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ann-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.menu-version { font-size: 11px; color: var(--muted); padding: 4px 8px 2px; }
