/* ───────────────────────────────────────────────────────────────
   Tasks — Monday-style board
   Palette taken from monday.com brand: indigo brand, status pills
   ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #f5f6f8;
  --bg-card:     #ffffff;
  --sidebar-bg:   #1f2742;
  --sidebar-fg:   #d6d9e3;
  --sidebar-active: #2a3358;
  --text:         #292f4c;
  --text-soft:    #676879;
  --border:       #e6e9ef;
  --brand:        #5559df;
  --brand-2:      #0073ea;

  --st-not_started: #c4c4c4;
  --st-working:     #fdab3d;
  --st-stuck:       #e2445c;
  --st-done:        #00c875;

  --p-low:      #579bfc;
  --p-medium:   #a25ddc;
  --p-high:     #fdab3d;
  --p-critical: #e2445c;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.12);
  --radius: 6px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Login ──────────────────────────────────────────────────── */
body.login-body {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5559df 0%, #0073ea 100%);
}
.login-card {
  background: #fff;
  width: 360px;
  padding: 32px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-brand h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.brand-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 180deg, #fdab3d 0 33%, #e2445c 33% 66%, #5559df 66% 100%);
}
.login-card h2 { margin: 0 0 16px; font-weight: 600; font-size: 18px; }
.login-card label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-soft); }
.login-card input {
  display: block; width: 100%; margin-top: 4px;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px;
}
.login-card input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.err { background: #fff0f0; color: #b80b27; padding: 8px 10px; border-radius: var(--radius); margin-bottom: 12px; font-size: 13px; }
.small { font-size: 12px; color: var(--text-soft); }

/* ─── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: 230px;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  padding: 14px 0;
  display: flex; flex-direction: column;
  flex: 0 0 230px;
  height: 100vh;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar         { width: 8px; }
.sidebar::-webkit-scrollbar-thumb   { background: #3a4368; border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #4b557d; }
.sidebar::-webkit-scrollbar-track   { background: transparent; }
.sidebar-brand { padding: 0 16px 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.sidebar-section-title { padding: 12px 16px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #8b94b0; }
.board-list { list-style: none; padding: 0; margin: 0; }
.board-list li a, .board-list li.empty {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 16px; color: var(--sidebar-fg);
  font-size: 14px;
}
.board-list li.empty { color: #6a738f; font-style: italic; }
.board-list li a:hover { background: var(--sidebar-active); text-decoration: none; }
.board-list li.active a { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.board-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sidebar-add {
  margin: 10px 16px; padding: 8px 12px;
  background: transparent; color: #fff; border: 1px dashed #444f74; border-radius: var(--radius);
  cursor: pointer; font-size: 13px;
}
.sidebar-add:hover { background: var(--sidebar-active); border-color: #5b6792; }
.sidebar-link {
  display: block; padding: 8px 16px; color: var(--sidebar-fg); font-size: 13px;
}
.sidebar-link:hover { background: var(--sidebar-active); text-decoration: none; }
.sidebar-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid #2a3358; display: flex; align-items: center; gap: 8px; }
.sidebar-foot .me { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--sidebar-fg); }
.sidebar-foot .me:hover { text-decoration: none; }
.logout-form { margin: 0; }
.link-btn { background: none; border: none; color: #8b94b0; cursor: pointer; padding: 0; font-size: 12px; }
.link-btn:hover { color: #fff; text-decoration: underline; }

/* ─── Main ──────────────────────────────────────────────────── */
.board-main, .admin-main {
  flex: 1; padding: 24px 28px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge legacy */
}
.board-main::-webkit-scrollbar,
.admin-main::-webkit-scrollbar { width: 0; height: 0; display: none; }
.empty-state { text-align: center; margin-top: 80px; color: var(--text-soft); }

.board-header {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px; margin-bottom: 8px;
  border-bottom: 2px solid var(--accent, #0073ea);
}
.board-header h1 { margin: 0 auto 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }

.btn-primary, .btn-ghost, .btn-danger {
  font-size: 13px; padding: 7px 14px; border-radius: var(--radius); cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #4347c4; }
.btn-primary.small { padding: 5px 10px; font-size: 12px; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #f1f2f5; }
.btn-danger { background: #fff; color: #e2445c; border-color: #f3c4cc; }
.btn-danger:hover { background: #fff0f2; }

/* ─── Groups + table ─────────────────────────────────────────── */
.groups { display: flex; flex-direction: column; gap: 24px; padding-top: 14px; }
.group { background: transparent; }
.group-title {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 6px; padding: 4px 8px;
  font-size: 15px; font-weight: 700; color: var(--group-color);
}
.group-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--group-color); }
.group-count { font-size: 12px; font-weight: 500; color: var(--text-soft); margin-left: 4px; }

.task-table {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--group-color);
  overflow: hidden;
  min-width: 980px;
}

.task-row {
  display: grid;
  grid-template-columns: 24px minmax(260px, 1fr) 60px 160px 110px 80px 100px 40px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.task-row-add { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.task-row-add .col-handle { flex: 0 0 auto; }
.task-row-add .col-title  { flex: 1; }
.task-row-add .col-add-btn { flex: 0 0 auto; padding-right: 8px; }
.add-task-btn {
  background: var(--brand); color: #fff; border: none;
  padding: 6px 14px; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.add-task-btn:hover { background: #4347c4; }
.task-row:last-child { border-bottom: none; }
.task-row-head {
  background: #fafbfc; color: var(--text-soft); font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 0;
  font-weight: 600;
}
.task-row:not(.task-row-head):not(.task-row-add):hover { background: #f5f8ff; cursor: pointer; }
.col { padding: 6px 10px; min-width: 0; }
.col-handle { color: #c4c8d4; cursor: grab; text-align: center; padding: 0 4px; }
.col-title { font-weight: 500; }
.col-title .title-text { display: inline-block; padding: 4px 0; }
.col-owner, .col-status, .col-priority, .col-working, .col-chat { text-align: center; }
.col-due { text-align: center; color: var(--text-soft); }
.col-due.overdue { color: #e2445c; font-weight: 600; }
.col-chat .chat-icon { opacity: .35; transition: opacity .15s; }
.task-row:hover .col-chat .chat-icon { opacity: 1; }
.task-row-add .col-title input {
  width: 100%; border: none; background: transparent; color: var(--text-soft); padding: 8px 0; font-size: 13px;
}
.task-row-add .col-title input:focus { outline: none; color: var(--text); }
.task-row-add { background: transparent; }
.task-row-add .col-handle { color: #c4c8d4; }

/* Pills */
.pill {
  display: inline-block; min-width: 90px; padding: 4px 10px;
  border-radius: 4px; font-size: 12px; font-weight: 600; color: #fff;
  text-align: center; letter-spacing: .01em;
}
.status-not_started { background: var(--st-not_started); color: #333; }
.status-working    { background: var(--st-working); }
.status-stuck      { background: var(--st-stuck); }
.status-done       { background: var(--st-done); }

.prio-low      { background: var(--p-low); }
.prio-medium   { background: var(--p-medium); }
.prio-high     { background: var(--p-high); }
.prio-critical { background: var(--p-critical); }

.role-admin  { background: var(--brand); color: #fff; padding: 3px 8px; font-size: 11px; min-width: 0; }
.role-member { background: #e6e9ef; color: var(--text); padding: 3px 8px; font-size: 11px; min-width: 0; }

/* Avatars */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 12px;
}
.avatar.tiny { width: 24px; height: 24px; font-size: 11px; }
.avatar.ghost { background: #e6e9ef !important; color: #999; }

/* Working dot */
.dot {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #cdd1dc;
}
.dot.on { background: var(--st-working); border-color: var(--st-working); box-shadow: 0 0 0 3px rgba(253,171,61,.2); }

/* ─── Drawer ─────────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,24,42,.35); z-index: 50;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 480px; max-width: 100%;
  background: #fff; box-shadow: -10px 0 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column; z-index: 51;
}
.drawer-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); gap: 10px; }
.drawer-title { flex: 1; font-size: 18px; font-weight: 700; border: none; outline: none; padding: 4px 0; min-width: 0; }
.drawer-title:focus { border-bottom: 2px solid var(--brand); }
.drawer-close {
  background: none; border: none; font-size: 24px; line-height: 1;
  color: var(--text-soft); cursor: pointer; padding: 0 4px;
}
.drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 22px; }
.drawer-meta label { display: block; font-size: 12px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.drawer-meta label.check { grid-column: span 2; text-transform: none; font-size: 13px; font-weight: 500; color: var(--text); }
.drawer-meta label.check input { margin-right: 6px; }
.drawer-meta select, .drawer-meta input[type=date] {
  width: 100%; padding: 6px 8px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: var(--radius); font: inherit;
}
.drawer-section h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; color: var(--text-soft); letter-spacing: .04em; }
.comments { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; max-height: 280px; overflow-y: auto; }
.comment { display: flex; gap: 10px; }
.comment .body { background: #f1f3f9; padding: 8px 12px; border-radius: 10px; flex: 1; }
.comment .body .meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-soft); margin-bottom: 2px; }
.comment .body .meta .meta-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment .body .text { white-space: pre-wrap; word-wrap: break-word; }
.comment-del {
  margin-left: auto; flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--text-soft); font-size: 15px; line-height: 1; padding: 0 2px;
  opacity: 0; transition: opacity .12s;
}
.comment:hover .comment-del, .comment-del:focus-visible { opacity: 1; }
.comment-del:hover { color: #e44258; }
@media (hover: none) { .comment-del { opacity: 1; } }
.comment-deleted .body { background: #f6f7fb; }
.deleted-note { display: flex; align-items: center; gap: 10px; font-size: 12px; font-style: italic; color: var(--text-soft); }
.comment-restore { font-style: normal; background: none; border: none; cursor: pointer; color: #0073ea; font-size: 12px; padding: 0; }
.comment-restore:hover { text-decoration: underline; }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: stretch; border-radius: var(--radius); }
.comment-form.dragging { outline: 2px dashed #0073ea; outline-offset: 3px; }
.comment-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px; font: inherit; resize: vertical; min-height: 40px;
}
.comment-form-actions { display: flex; align-items: center; gap: 8px; }
.comment-form-actions .btn-primary { margin-left: auto; }
.icon-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px 9px; font-size: 15px; line-height: 1; cursor: pointer; color: var(--text-soft);
}
.icon-btn:hover { background: #f1f3f9; color: var(--text); }

/* Pending (not-yet-sent) attachment chips */
.att-pending { display: flex; flex-wrap: wrap; gap: 6px; }
.att-pending:empty { display: none; }
.att-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 220px;
  background: #eef1f8; border: 1px solid var(--border); border-radius: 14px;
  padding: 3px 6px 3px 11px; font-size: 12px;
}
.att-chip .att-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip button { background: none; border: none; cursor: pointer; color: var(--text-soft); font-size: 15px; line-height: 1; padding: 0 2px; }
.att-chip button:hover { color: #e44258; }

/* Attachments rendered on posted comments */
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  text-decoration: none; color: #0073ea; font-size: 12px;
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; background: #fff;
}
.att:hover { background: #f6f8fb; }
.att .att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .att-size { color: var(--text-soft); font-size: 11px; flex-shrink: 0; }
.att-img { flex-direction: column; align-items: stretch; max-width: 160px; padding: 4px; }
.att-img img { max-width: 152px; max-height: 152px; border-radius: 5px; object-fit: cover; display: block; }
.att-img .att-name { margin-top: 3px; font-size: 11px; color: var(--text-soft); }

.drawer-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,24,42,.45);
  display: flex; align-items: center; justify-content: center; z-index: 60;
}
.modal { background: #fff; border-radius: 8px; box-shadow: var(--shadow-md); width: 420px; max-width: 92%; padding: 22px; }
.modal h3 { margin: 0 0 12px; font-size: 18px; }
.modal label { display: block; font-size: 12px; color: var(--text-soft); margin: 10px 0 0; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.modal input[type=text], .modal input[type=email], .modal input[type=password], .modal select {
  width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal .check-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; margin-top: 4px; }
.modal .check-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); text-transform: none; font-weight: normal; margin: 4px 0; }

/* ─── Admin tables ───────────────────────────────────────────── */
.admin-main h1 { margin: 0 0 20px; font-size: 26px; font-weight: 700; }
.admin-panel { background: #fff; padding: 18px 20px; border-radius: 8px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.admin-panel header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-panel header h2 { margin: 0; font-size: 17px; flex: 1; }
.monday-form {
  display: grid; grid-template-columns: 1fr 200px auto auto;
  gap: 12px; align-items: end; margin-top: 8px;
}
.monday-form label { display: block; font-size: 12px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.monday-form input { width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; }
.monday-form button { height: 36px; }
.monday-form #mi-status { white-space: nowrap; }

.purge-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.purge-row label { font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.purge-row select { padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; }
.purge-row #purge-status { white-space: nowrap; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.user-state { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.state-active      { background: #e0f5e8; color: #037f4c; }
.state-invited     { background: #fff3dc; color: #b8730d; }
.state-notinvited  { background: #fde6ea; color: #b80b27; }
.state-disabled    { background: #e6e9ef; color: #676879; }
.admin-table th, .admin-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { font-size: 11px; text-transform: uppercase; color: var(--text-soft); letter-spacing: .04em; font-weight: 600; }

/* ─── Drag-and-drop reordering ──────────────────────────────── */
.drag-handle, .board-drag-handle {
  cursor: grab;
  color: #b3bac5;
  font-size: 12px;
  letter-spacing: -2px;
  user-select: none;
}
.drag-handle:hover, .board-drag-handle:hover { color: #6a738f; }
.group-title[draggable="true"] { cursor: grab; }
.group-title[draggable="true"]:active { cursor: grabbing; }
.group.dragging { opacity: 0.45; }
.group.drop-before { box-shadow: 0 -3px 0 0 var(--brand) inset; }
.group.drop-after  { box-shadow: 0  3px 0 0 var(--brand) inset; }

.board-list li[draggable="true"] { cursor: grab; }
.board-list li[draggable="true"]:active { cursor: grabbing; }
.board-list li.dragging { opacity: 0.4; }
.board-list li.drop-before { box-shadow: inset 0 2px 0 0 var(--brand); }
.board-list li.drop-after  { box-shadow: inset 0 -2px 0 0 var(--brand); }
.board-list li[draggable="true"] {
  display: flex; align-items: center; gap: 4px;
}
.board-list li[draggable="true"] .board-drag-handle {
  padding-left: 8px;
  flex: 0 0 auto;
}
.board-list li[draggable="true"] a { flex: 1; padding-left: 4px; }

/* ─── Watchers ──────────────────────────────────────────────── */
.drawer-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 18px 0 8px;
}
.drawer-section-head h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.drawer-section-head .link-btn { font-size: 12px; color: #0073ea; }
.drawer-section-head .link-btn:hover { color: #4347c4; }

.watchers {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 28px;
}
.watcher-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 4px;
  background: #f1f3f8; color: var(--text);
  border-radius: 999px; font-size: 12px;
  border: 1px solid transparent;
}
.watcher-chip.me { background: #e7f0ff; border-color: #c8dafd; }
.watcher-chip .avatar.tiny { width: 18px; height: 18px; font-size: 10px; }
.watcher-chip .bell {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  font-size: 12px; color: #b3bac5; line-height: 1;
}
.watcher-chip .bell.on { color: #0073ea; }
.watcher-chip .bell:hover { color: #4347c4; }
.watcher-chip .remove {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  font-size: 14px; color: #a0a4ab; line-height: 1;
}
.watcher-chip .remove:hover { color: #e2445c; }
.watchers-empty { color: var(--text-soft); font-size: 12px; font-style: italic; }

.watcher-add { margin-top: 8px; }
.watcher-add select {
  width: 100%; padding: 6px 8px; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
}

/* ─── Archive + bulk-select ─────────────────────────────────── */
.archive-pill {
  display: inline-block; padding: 2px 10px;
  background: #e6e9ef; color: #676879;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  vertical-align: middle; letter-spacing: .03em; text-transform: uppercase;
  margin-left: 6px;
}
.task-row .col-handle input.task-select,
.task-row .col-handle input.task-select-all {
  width: 14px; height: 14px; margin: 0 0 0 4px; cursor: pointer;
}
.task-row.selected { background: #eff6ff; }
.task-row.selected:hover { background: #e0eeff; }

.bulk-bar {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  border-radius: 999px; padding: 8px 14px;
  display: flex; align-items: center; gap: 10px;
  z-index: 60; font-size: 13px;
}
.bulk-bar .bulk-count { font-weight: 600; }
.bulk-bar .btn-primary, .bulk-bar .btn-ghost, .bulk-bar .btn-danger {
  padding: 5px 12px; font-size: 12px;
}

/* ─── My Work: sidebar entry + badge ────────────────────────── */
.sidebar-mywork {
  display: flex; align-items: center; gap: 9px;
  margin: 4px 12px 6px; padding: 8px 10px;
  color: #fff; border-radius: var(--radius);
  background: rgba(255,255,255,.06); font-weight: 600; font-size: 14px;
}
.sidebar-mywork:hover { background: var(--sidebar-active); text-decoration: none; }
.sidebar-mywork.active { background: var(--brand); }
.sidebar-mywork .mw-icon { font-size: 15px; line-height: 1; }
.sidebar-mywork .mw-label { flex: 1; }
.att-badge {
  background: var(--st-stuck); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── Board: filter chips + unread marker ───────────────────── */
.board-filters { display: flex; gap: 8px; }
.filter-chip {
  font-size: 12px; padding: 6px 12px; border-radius: 999px; font-weight: 600;
  border: 1px solid var(--border); background: #fff; color: var(--text-soft); cursor: pointer;
}
.filter-chip:hover { background: #f1f2f5; }
.filter-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.unread-dot {
  display: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-2); margin-right: 6px; vertical-align: middle;
}
.task-row.is-unread { background: #f4f8ff; }
.task-row.is-unread:hover { background: #e9f1ff; }
.task-row.is-unread .unread-dot { display: inline-block; }
.task-row.is-unread .col-title .title-text { font-weight: 700; }

/* ─── My Work page ──────────────────────────────────────────── */
.mywork-header { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 2px solid var(--brand); }
.mywork-header h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.mywork-header p { margin: 0; }

.mw-section { margin: 24px 0; }
.mw-section-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.mw-section-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; display: inline-flex; align-items: center; gap: 8px; }
.mw-section-bar .mw-section-title { margin: 0; }
.mw-count { background: #e6e9ef; color: var(--text-soft); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.mw-count.attn { background: var(--st-stuck); color: #fff; }
.mw-empty { background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; color: var(--text-soft); text-align: center; }

.mw-list { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; min-width: 760px; }
.mw-task {
  display: grid;
  grid-template-columns: 14px 150px minmax(220px,1fr) 44px 150px 96px 60px 80px;
  align-items: center; gap: 8px;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 13px;
}
.mw-task:last-child { border-bottom: none; }
a.mw-task:hover { background: #f5f8ff; text-decoration: none; }
.mw-head { background: #fafbfc; color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.mw-head:hover { background: #fafbfc; }
.mw-dot { width: 8px; height: 8px; }
a.mw-task.is-unread .mw-dot { background: var(--brand-2); border-radius: 50%; }
a.mw-task.is-unread .mw-title { font-weight: 700; }
.mw-board { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mw-swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #0073ea); flex: 0 0 auto; }
.mw-title { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mw-owner, .mw-col { text-align: center; }
.mw-due { text-align: center; color: var(--text-soft); }
.mw-due.overdue { color: var(--st-stuck); font-weight: 700; }
.mw-when { text-align: right; color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.mw-task .pill { min-width: 0; width: 100%; }

.mw-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg-btn { padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-soft); background: #fff; border-right: 1px solid var(--border); }
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { background: #f1f2f5; text-decoration: none; }
.seg-btn.on { background: var(--brand); color: #fff; }
.mw-status-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 12px; background: #fff; }
