/* ── Theme Tokens ───────────────────────────────────────────────────────────── */
:root {
  --bg-primary:    #f0f2f5;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #e8eaf0;
  --surface:       #ffffff;
  --surface-hover: #f4f6fa;
  --surface-active:#eaecf5;
  --border:        rgba(80,80,160,.13);
  --border-hover:  rgba(80,80,160,.24);
  --text-primary:  #0c0c1e;
  --text-secondary:#3d3d6b;
  --text-muted:    #8888b0;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06);
  --shadow-card:   0 4px 24px rgba(0,0,0,.08);
  --shadow-modal:  0 24px 64px rgba(0,0,0,.18);
  --bg-elevated:   #eceef5;
  --accent-brand:  #6366f1;
  --accent-brand-h:#4f46e5;
  --chat-wallpaper:#efeae2;
  --chat-header:   #008069;
  --bubble-own:    #d9fdd3;
  --bubble-other:  #ffffff;
  --bubble-tail-own:   #d9fdd3;
  --bubble-tail-other: #ffffff;
  color-scheme: light;
}
html.dark {
  --bg-primary:    #13141f;
  --bg-secondary:  #1a1b2e;
  --bg-tertiary:   #1f2040;
  --surface:       #21223a;
  --surface-hover: #292b48;
  --surface-active:#31355a;
  --border:        rgba(120,120,200,.12);
  --border-hover:  rgba(120,120,200,.22);
  --text-primary:  #e8eaf6;
  --text-secondary:#8892b0;
  --text-muted:    #4a5280;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow-card:   0 4px 24px rgba(0,0,0,.45);
  --shadow-modal:  0 24px 64px rgba(0,0,0,.65);
  --bg-elevated:   #21223a;
  --chat-wallpaper:#0b141a;
  --chat-header:   #1f2c34;
  --bubble-own:    #005c4b;
  --bubble-other:  #1f2c34;
  --bubble-tail-own:  #005c4b;
  --bubble-tail-other:#1f2c34;
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--bg-primary); color: var(--text-primary); height: 100vh; overflow: hidden; }
#root { height: 100vh; display: flex; flex-direction: column; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: rgba(99,102,241,.28); }

/* ── Components ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:focus {
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.input::placeholder { color: var(--text-muted); }
select.input { cursor: pointer; }
textarea.input { resize: vertical; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; border: none;
  background: var(--accent-brand); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.btn-secondary:hover { background: var(--surface-hover); color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-todo        { background: rgba(99,102,241,.1);  color: #6366f1; }
.badge-in_progress { background: rgba(245,158,11,.1);  color: #f59e0b; }
.badge-done        { background: rgba(16,185,129,.1);  color: #10b981; }
.badge-blocked     { background: rgba(249,115,22,.1);  color: #f97316; }
.badge-high        { background: rgba(239,68,68,.1);   color: #ef4444; }
.badge-medium      { background: rgba(245,158,11,.1);  color: #f59e0b; }
.badge-low         { background: rgba(16,185,129,.1);  color: #10b981; }

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes messagePop {
  0%   { opacity: 0; transform: translateY(8px) scale(.95); }
  60%  { transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

.shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.animate-pulse { animation: shimmer 1.5s infinite; }

/* ── Chat ───────────────────────────────────────────────────────────────────── */
.chat-shell { display: flex; height: 100%; overflow: hidden; }

.chat-rail {
  width: 264px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--bg-secondary); border-right: 1px solid var(--border); overflow: hidden;
}
.chat-grouplabel {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 10px; margin: 4px 0 6px;
}
.chat-item {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px;
  border-radius: 8px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; margin-bottom: 2px; transition: background .12s;
}
.chat-item:hover { background: var(--surface-hover); }
.chat-item.active { background: var(--surface-active); color: var(--text-primary); font-weight: 600; }
.chat-item-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--accent-brand); color: #fff; font-size: 10px; font-weight: 700;
}

.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-secondary); }
.chat-head {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 20px; border-bottom: 1px solid var(--border);
}
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 0; }

.chat-daysep { display: flex; align-items: center; gap: 14px; padding: 12px 20px 14px; }
.chat-daysep .rule { flex: 1; height: 1px; background: var(--border); }
.chat-daysep span { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }

.msg { display: flex; gap: 11px; padding: 4px 20px; position: relative; }
.msg:hover { background: var(--surface-hover); }
.msg-gut { width: 34px; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.msg-time { font-size: 11.5px; color: var(--text-muted); }
.msg-text { font-size: 14px; line-height: 1.55; color: var(--text-primary); word-wrap: break-word; }
.msg-actions {
  position: absolute; top: -10px; right: 16px; display: none; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-sm); z-index: 2;
}
.msg:hover .msg-actions { display: flex; }
.msg-action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: none; background: none; border-radius: 6px;
  cursor: pointer; color: var(--text-muted);
}
.msg-action:hover { background: var(--surface-hover); color: var(--text-primary); }

.mention { background: rgba(99,102,241,.12); color: var(--accent-brand); font-weight: 600; border-radius: 4px; padding: 0 3px; }

/* Reactions — the emoji is content the sender picked, so it stays an emoji */
.rx-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.rx {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  border-radius: 20px; border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; cursor: pointer; color: var(--text-secondary);
}
.rx:hover { border-color: var(--border-hover); }
.rx.mine { border-color: var(--accent-brand); background: rgba(99,102,241,.1); color: var(--accent-brand); font-weight: 600; }
.rx-count { font-size: 11px; font-weight: 600; }

/* Attachments */
.att-img {
  max-width: 320px; max-height: 260px; border-radius: 10px; display: block;
  cursor: zoom-in; border: 1px solid var(--border); background: var(--surface);
}
.att-file {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  text-decoration: none; color: inherit; max-width: 340px;
}
.att-file:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.att-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; color: #fff;
}
.att-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-meta { font-size: 11px; color: var(--text-muted); }
.att-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }

/* Composer */
.composer { flex-shrink: 0; padding: 0 20px 18px; }
.composer-box { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.composer-box.dragover { border-color: var(--accent-brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.composer-input {
  width: 100%; border: none; outline: none; background: none; resize: none;
  padding: 12px 14px; font-family: inherit; font-size: 14px; line-height: 1.5;
  color: var(--text-primary); min-height: 44px; max-height: 168px; display: block;
}
.composer-bar { display: flex; align-items: center; gap: 4px; padding: 6px 10px 10px; }
.composer-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: none; background: none; border-radius: 7px;
  cursor: pointer; color: var(--text-muted);
}
.composer-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.composer-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: var(--accent-brand); color: #fff; cursor: pointer;
}
.composer-send:disabled { opacity: .4; cursor: not-allowed; }
.composer-hint { font-size: 11.5px; color: var(--text-muted); margin-right: 8px; }

/* Files staged above the composer, uploaded but not yet sent */
.stage { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.stage-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary);
  font-size: 12px; color: var(--text-secondary); max-width: 240px;
}
.stage-thumb { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.stage-x {
  border: none; background: none; cursor: pointer; color: var(--text-muted);
  display: inline-flex; padding: 2px; border-radius: 4px;
}
.stage-x:hover { color: #ef4444; }

/* Emoji palette — content, not chrome */
.emoji-pop {
  position: absolute; bottom: 100%; margin-bottom: 8px; z-index: 20;
  width: 268px; padding: 8px; border-radius: 12px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
}
.emoji-pop button {
  border: none; background: none; cursor: pointer; font-size: 19px;
  line-height: 1; padding: 5px 0; border-radius: 6px;
}
.emoji-pop button:hover { background: var(--surface-hover); }

/* Image lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  justify-content: center; padding: 32px; background: rgba(0,0,0,.82);
  animation: fadeIn .12s ease;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 18px; right: 20px; width: 36px; height: 36px;
  border-radius: 50%; border: none; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center;
}

.typing-line { padding: 2px 20px 6px; font-size: 12px; color: var(--text-muted); font-style: italic; min-height: 20px; }

/* ── Message content ────────────────────────────────────────────────────────── */
.message-content code {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  background: var(--bg-tertiary); padding: 2px 6px; border-radius: 4px; color: #06b6d4;
}
.message-content strong { font-weight: 600; color: var(--text-primary); }

/* ── Sidebar item ────────────────────────────────────────────────────────────── */
.sidebar-item { transition: all .15s; }
.sidebar-item:hover { background: var(--surface-hover) !important; }
.sidebar-item.active { background: var(--surface-active) !important; }

/* ── Kanban ──────────────────────────────────────────────────────────────────── */
.kanban-dragging { opacity: .4; transform: scale(.98); }

/* ── Priority left border ────────────────────────────────────────────────────── */
.priority-high   { border-left: 3px solid #ef4444; }
.priority-medium { border-left: 3px solid #f59e0b; }
.priority-low    { border-left: 3px solid #10b981; }

/* ── No scrollbar ────────────────────────────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Gradient text ───────────────────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Bug tracker: table view ─────────────────────────────────────────────────── */
/* min-width forces horizontal scroll rather than crushing fourteen columns into
   the viewport — the bug sheet is wide by nature. */
.ats-table {
  width: 100%; min-width: 1500px;
  border-collapse: collapse; font-size: 13px;
}
.ats-table thead { background: var(--bg-secondary); position: sticky; top: 0; z-index: 5; }
.ats-table th {
  text-align: left; padding: 9px 12px; white-space: nowrap;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.ats-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ats-table tbody tr.task-row { cursor: pointer; transition: background .12s; }
.ats-table tbody tr.task-row:hover { background: var(--surface-hover); }
.ats-table tbody tr.task-row:hover .row-btn { opacity: 1; }

.row-title {
  font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-sub { font-size: 11px; color: var(--text-muted); }

.row-btn {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px 5px; border-radius: 6px; font-size: 12px; opacity: .35; transition: .15s;
}
.row-btn:hover { opacity: 1; background: var(--surface-active); color: var(--text-primary); }
.del-task-btn:hover, .del-remark-btn:hover,
.del-comment-btn:hover, .del-file-btn:hover { color: #ef4444; }

/* Inline editors: quiet until pointed at, so a dense table stays readable. */
.cell-select {
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 6px; font-size: 12px; font-family: inherit;
  color: var(--text-secondary); max-width: 150px; cursor: pointer;
}
.cell-select:hover  { border-color: var(--border-hover); background: var(--surface); }
.cell-select:focus  { outline: none; border-color: var(--accent-brand); background: var(--surface); }
input.cell-select   { cursor: text; }
.cell-select option { background: var(--surface); color: var(--text-primary); }

/* ── Bug tracker: board view ─────────────────────────────────────────────────── */
.kb-wrap {
  display: flex; gap: 14px; padding: 16px 20px;
  align-items: flex-start; min-height: 100%;
}
/* Six stages share the width when there is room and scroll horizontally only
   once a column would fall below 180px — so on a normal laptop every stage,
   Closed and On Hold included, is on screen without scrolling. */
.kb-col {
  flex: 1 1 0; min-width: 180px; max-width: 340px;
  display: flex; flex-direction: column;
}
.kb-col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; margin-bottom: 10px;
}
.kb-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.kb-add {
  background: none; border: none; cursor: pointer; color: inherit;
  font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 6px; opacity: .7;
}
.kb-add:hover { opacity: 1; background: rgba(255,255,255,.18); }

.kb-drop {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 120px; border-radius: 10px; padding: 2px;
  border: 2px dashed transparent; transition: background .15s, border-color .15s;
}
.kb-drop.drag-over { border-color: var(--accent-brand); background: var(--surface-hover); }
.kb-empty {
  border: 2px dashed var(--border); border-radius: 10px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-muted);
}
/* Hide the placeholder once the column has cards, no re-render needed. */
.kb-card ~ .kb-empty { display: none; }

.kb-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.kb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.kb-card.dragging { opacity: .45; transform: scale(.97); }
.kb-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.kb-card-title {
  font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.kb-card-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.kb-remark {
  font-size: 11px; color: var(--text-secondary); background: var(--bg-primary);
  border-radius: 7px; padding: 5px 7px; margin-bottom: 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kb-card-foot {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-muted);
}
.kb-remark-btn {
  background: none; border: 1px solid var(--border); border-radius: 20px;
  padding: 1px 7px; font-size: 11px; color: var(--text-muted); cursor: pointer;
}
.kb-remark-btn:hover { border-color: var(--accent-brand); color: var(--accent-brand); }

/* ── Task detail modal ───────────────────────────────────────────────────────── */
.td-tabs {
  display: flex; gap: 2px; padding: 12px 20px 0;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.td-side {
  width: 250px; flex-shrink: 0; overflow-y: auto; padding: 16px;
  background: var(--bg-secondary); border-left: 1px solid var(--border);
}
.td-side-rule { height: 1px; background: var(--border); margin: 14px 0; }
.side-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 5px;
}
.td-side .input { font-size: 12px; padding: 6px 8px; width: 100%; }

.kv-grid {
  display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px;
  font-size: 13px; align-items: baseline;
}
.kv-k { color: var(--text-muted); font-size: 12px; }
.kv-v { color: var(--text-primary); }

.note-box {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--text-secondary);
}
.note-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 4px;
}
.remark-item {
  border-left: 2px solid var(--border); padding: 0 0 10px 12px; margin-left: 4px;
}
.link-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 20px; font-size: 12px; text-decoration: none;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.22); color: #6366f1;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-chip:hover { background: rgba(99,102,241,.18); }

/* ── File pickers and screenshots ────────────────────────────────────────────── */
.file-drop {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border: 2px dashed var(--border); border-radius: 10px;
  font-size: 13px; color: var(--text-muted); cursor: pointer; transition: .15s;
}
.file-drop:hover { border-color: var(--accent-brand); color: var(--accent-brand); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 20px; font-size: 11px;
  background: var(--surface-active); color: var(--text-secondary);
}
.chip-x { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 11px; }
.chip-x:hover { color: #ef4444; }

.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shot {
  margin: 0; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.shot img { display: block; width: 100%; height: 112px; object-fit: cover; cursor: zoom-in; }
.shot figcaption {
  display: flex; align-items: center; gap: 4px; padding: 5px 8px;
  font-size: 11px; color: var(--text-muted);
}
.shot figcaption span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Notification panel ──────────────────────────────────────────────────────── */
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-width: 92vw;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-modal); z-index: 40; overflow: hidden;
  animation: modalIn .15s ease;
}
.notif-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.notif-tabs { display: flex; gap: 6px; padding: 10px 14px 2px; }
.notif-tab {
  padding: 4px 11px; border-radius: 20px; border: 1px solid var(--border);
  background: none; font-size: 12px; color: var(--text-muted); cursor: pointer;
}
.notif-tab[data-on="true"] {
  background: var(--accent-brand); border-color: var(--accent-brand);
  color: #fff; font-weight: 600;
}
.notif-list { max-height: 400px; overflow-y: auto; padding: 8px; }
.notif-item {
  display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px;
  cursor: pointer; transition: background .12s;
}
.notif-item:hover { background: var(--surface-hover); }
.notif-item[data-unread="true"] { background: rgba(99,102,241,.07); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 12px; color: var(--accent-brand);
}
.notif-link:hover { text-decoration: underline; }

/* ── Bug sheet table: read like the spreadsheet it replaces ────────────────── */
/* The description is the column people actually read, so it gets the room and
   wraps to two lines instead of being cut off at one. */
.ats-table .col-desc { min-width: 320px; max-width: 460px; }
.ats-table .col-desc .row-title {
  white-space: normal; overflow: hidden; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* Dates lead each row; keep them narrow and unwrapped. */
.ats-table td:first-child { width: 118px; }
.ats-table td:first-child input.cell-select { width: 112px; max-width: 112px; }
/* Component and Module are short labels, not free text. */
.ats-table td:nth-child(2) input.cell-select,
.ats-table td:nth-child(3) input.cell-select { max-width: 118px; }
/* Reported Under holds "Admin/Manager/Recruiter" — the sheet shows it whole,
   and the default 150px cut it to "Admin/Manager/Recr". */
.ats-table td:nth-child(8) input.cell-select { max-width: 190px; width: 185px; }
