/* TaskFlow — clean light theme (blue #0062E5 / navy #172033), RTL-ready via logical properties */
:root {
  --bg: #fafafc;
  --panel: #ffffff;
  --ink: #172033;
  --ink-2: #344054;
  --muted: #5e6a7d;
  --line: #e3e8ef;
  --line-2: #c3ccd9;
  --brand: #0062e5;
  --brand-dark: #0a4fc4;
  --brand-soft: #e8f1ff;
  --hover: #f2f4f8;
  --ok: #1f845a;
  --ok-soft: #dcfff1;
  --warn: #b35900;
  --bad: #c9372c;
  --bad-soft: #ffeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 32, 51, .08), 0 0 0 1px rgba(23, 32, 51, .04);
  --shadow-md: 0 4px 12px rgba(23, 32, 51, .1);
  --shadow-lg: 0 16px 40px rgba(23, 32, 51, .18);
  --font: Inter, "IBM Plex Sans Arabic", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: Alexandria, "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
}
[dir="rtl"] { --font: "IBM Plex Sans Arabic", Inter, "Segoe UI", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[dir="rtl"] .flip { transform: scaleX(-1); display: inline-block; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 7px 14px; background: var(--hover); cursor: pointer; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.btn:hover { background: #e6e9ef; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.outline { background: #fff; border-color: var(--line-2); }
.btn.outline:hover { background: var(--hover); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: transparent; color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.icon { padding: 5px 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: #fff; outline: none; transition: border-color .1s, box-shadow .1s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 98, 229, .15); }
.input:disabled { background: var(--hover); color: var(--muted); }
textarea.input { resize: vertical; min-height: 72px; }
select.input.inline { width: auto; padding: 4px 8px; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.bold { font-weight: 600; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #e8f1ff, transparent 50%), radial-gradient(circle at 90% 90%, #eef4ff, transparent 40%), var(--bg); }
.auth-card { background: #fff; border-radius: 16px; padding: 32px; width: 100%; max-width: 410px; box-shadow: var(--shadow-lg); }
.auth-card h1 { margin: 18px 0 4px; font-size: 24px; }
.auth-card p.lead { margin: 0 0 20px; color: var(--muted); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); }
.logo img { width: 30px; height: 30px; }

/* ---------- shell ---------- */
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 16px; position: sticky; top: 0; z-index: 20; }
.topbar .search { position: relative; width: min(380px, 40vw); }
.topbar .search .input { padding-inline-start: 32px; background: var(--hover); border-color: transparent; }
.topbar .search .input:focus { background: #fff; border-color: var(--brand); }
.topbar .search::before { content: "⌕"; position: absolute; inset-inline-start: 11px; top: 6px; color: var(--muted); font-size: 16px; }
.dropdown { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 100%; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; max-height: 380px; overflow-y: auto; }
.dropdown .opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.dropdown .opt:hover, .dropdown .opt.active { background: var(--hover); }
.dropdown .head { font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .04em; }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; cursor: pointer; border: 0; background: none; }
.me-btn:hover { background: var(--hover); }
.me-btn .nm { font-weight: 600; line-height: 1.15; text-align: start; }
.lang-btn { font-weight: 700; min-width: 40px; }
.layout { display: flex; height: calc(100% - 56px); }
.sidebar { width: 260px; flex: none; background: #fff; border-inline-end: 1px solid var(--line); padding: 12px 10px 20px; overflow-y: auto; }
.co-switch { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; margin-bottom: 6px; position: relative; }
.co-switch:hover { background: var(--hover); }
.co-switch .nm { font-family: var(--font-head); font-weight: 600; }
.side-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 8px 4px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.side-h .btn { padding: 0 6px; font-size: 16px; line-height: 1.4; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); cursor: pointer; font-weight: 500; }
.nav:hover { background: var(--hover); }
.nav.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav.unread { color: var(--ink); font-weight: 700; }
.nav .ico { width: 18px; text-align: center; color: var(--muted); flex: none; }
.nav.active .ico { color: var(--brand); }
.badge { background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 6px; min-width: 18px; text-align: center; line-height: 18px; }
.badge.soft { background: #e6e9ef; color: var(--ink-2); }
main { flex: 1; overflow: auto; min-width: 0; }
.page { padding: 24px 32px; max-width: 1240px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 14px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-color: var(--brand); }

/* ---------- chips, avatars, icons ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.role-owner { background: #fff4e0; color: #8a4b00; }
.role-admin { background: #f3edff; color: #5e3cbf; }
.role-member { background: var(--brand-soft); color: var(--brand-dark); }
.role-viewer { background: #eef0f4; color: #44546f; }
.chip.platform { background: var(--ink); color: #fff; }
.chip.level { background: linear-gradient(135deg, #ffb020, #f2603d); color: #fff; }
.chip.perm { background: var(--ok-soft); color: var(--ok); }
.chip.perm.off { background: #eef0f4; color: #8590a2; text-decoration: line-through; }
.chip.label { background: #eef0f4; color: var(--ink-2); font-weight: 600; border-radius: 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; position: relative; font-family: var(--font); }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.sq { border-radius: 8px; }
.avatar .dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #fff; inset-inline-end: -1px; bottom: -1px; background: #b3bac5; }
.avatar .dot.on { background: #22a06b; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-inline-start: -6px; border: 2px solid #fff; }
.avatar-stack .avatar:first-child { margin-inline-start: 0; }
.avatar.filter { cursor: pointer; opacity: .55; }
.avatar.filter.on { opacity: 1; box-shadow: 0 0 0 2px var(--brand); }
.xpbar { height: 6px; background: #eef0f4; border-radius: 99px; overflow: hidden; width: 120px; }
.xpbar > i { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, #f2603d); }
.ti { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; color: #fff; font-size: 10px; font-weight: 800; flex: none; line-height: 1; }
.ti-task { background: #4bade8; }
.ti-bug { background: #e5493a; }
.ti-story { background: #63ba3c; }
.ti-epic { background: #904ee2; }
.ti-subtask { background: #4bade8; border-radius: 50%; }
.pri { font-weight: 800; font-size: 13px; line-height: 1; }
.pri-urgent { color: #c9372c; }
.pri-high { color: #e56910; }
.pri-medium { color: #cf9f02; }
.pri-low { color: #1d7afc; }
.lozenge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.lz-todo { background: #e6e9ef; color: #44546f; }
.lz-in_progress { background: #e9f2ff; color: #0055cc; }
.lz-done { background: #dcfff1; color: #216e4e; }
.key { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.key.done { text-decoration: line-through; }

/* ---------- cards, grids, tables ---------- */
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.project-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; cursor: pointer; transition: box-shadow .12s, transform .12s; display: flex; flex-direction: column; gap: 10px; }
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.project-card h3 { margin: 0; font-size: 15px; }
.progress { height: 6px; background: #eef0f4; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.progress.blue > i { background: var(--brand); }
.new-card { border: 1.5px dashed var(--line-2); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); cursor: pointer; min-height: 120px; font-weight: 600; }
.new-card:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-family: var(--font-head); font-weight: 600; }
.stat span { color: var(--muted); font-size: 12px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl th, .tbl td { padding: 9px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 12px; color: var(--muted); background: #fbfcfd; font-weight: 600; white-space: nowrap; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--ink); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fbfcfe; }
.perm-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.perm-toggles label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--hover); padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty h2 { color: var(--ink); margin: 0 0 6px; }
.bars .bar-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.bars .track { height: 10px; background: #eef0f4; border-radius: 99px; overflow: hidden; }
.bars .track > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filterbar .input { width: auto; min-width: 130px; padding: 6px 10px; }
.filterbar .input.q { min-width: 220px; }

/* ---------- board ---------- */
.board-wrap { display: flex; flex-direction: column; height: 100%; }
.board-top { padding: 20px 28px 0; }
.columns { flex: 1; display: flex; gap: 12px; padding: 0 28px 24px; overflow-x: auto; align-items: flex-start; }
.column { width: 286px; flex: none; background: #f1f3f6; border-radius: 12px; display: flex; flex-direction: column; max-height: 100%; }
.col-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.col-head .count { font-weight: 600; }
.col-body { padding: 4px 8px 8px; overflow-y: auto; min-height: 60px; flex: 1; border-radius: 10px; transition: background .1s; }
.col-body.drag-over { background: rgba(0, 98, 229, .07); }
.col-foot { padding: 0 8px 10px; }
.issue-card { background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .1s; }
.issue-card:hover { box-shadow: var(--shadow-md); }
.issue-card.dragging { opacity: .35; }
.issue-card .t { font-weight: 500; word-break: break-word; margin-bottom: 8px; }
.issue-card .parent { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.issue-card .meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.issue-card .meta .grow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.issue-card .pts { background: #eef0f4; color: var(--ink-2); border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.due.overdue { color: var(--bad); font-weight: 600; }
.drop-marker { height: 3px; background: var(--brand); border-radius: 3px; margin: -2px 0 6px; }
.quick-add textarea { min-height: 60px; }

/* ---------- backlog ---------- */
.sprint-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.sprint-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.sprint-head h3 { margin: 0; font-size: 15px; }
.sprint-list { min-height: 44px; padding: 0 6px 6px; }
.sprint-list.drag-over { background: rgba(0, 98, 229, .05); }
.bl-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line); margin-bottom: 4px; background: #fff; cursor: pointer; }
.bl-row:hover { background: #fbfcfe; border-color: var(--line-2); }
.bl-row.dragging { opacity: .35; }
.bl-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-empty { border: 1.5px dashed var(--line); border-radius: 8px; padding: 12px; text-align: center; color: var(--muted); font-size: 13px; margin: 0 4px 6px; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(23, 32, 51, .45); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; z-index: 50; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 980px; box-shadow: var(--shadow-lg); padding: 22px 24px; position: relative; }
.modal.narrow { max-width: 460px; }
.modal.mid { max-width: 640px; }
.modal h2 { margin: 0 0 14px; font-size: 19px; }
.modal .close { position: absolute; top: 12px; inset-inline-end: 12px; }
.issue-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; }
.title-input { font-family: var(--font-head); font-size: 21px; font-weight: 600; border: 1px solid transparent; padding: 4px 6px; margin-inline-start: -7px; width: 100%; border-radius: 6px; background: none; }
.title-input:hover:not(:disabled), .title-input:focus { border-color: var(--line-2); outline: none; }
.details { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; }
.details .drow { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.details .drow:last-child { border-bottom: 0; }
.details .drow > span:first-child { color: var(--muted); font-weight: 600; }
.details .input { padding: 5px 8px; border-color: transparent; background: transparent; }
.details .input:hover:not(:disabled) { background: var(--hover); }
.details .input:focus { background: #fff; border-color: var(--brand); }
.status-select { font-weight: 700; border-radius: 6px; padding: 7px 10px; border: 0; cursor: pointer; }
.status-select.lz-todo { background: #e6e9ef; }
.status-select.lz-in_progress { background: #0055cc; color: #fff; }
.status-select.lz-done { background: #1f845a; color: #fff; }
.section-title { font-size: 14px; font-weight: 700; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; font-family: var(--font-head); }
.subtask-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 4px; cursor: pointer; }
.subtask-row:hover { background: #fbfcfe; }
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment .bubble { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.seg { display: inline-flex; background: var(--hover); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.pick-list label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.pick-list label:hover { background: var(--hover); }

/* ---------- chat ---------- */
.chat { display: flex; height: 100%; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); min-height: 56px; }
.chat-head h2 { margin: 0; font-size: 16px; }
.chat-head .topic { color: var(--muted); font-size: 13px; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 0; }
.day-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; margin: 14px 18px 6px; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; gap: 10px; padding: 4px 18px; position: relative; }
.msg:hover { background: #f8f9fb; }
.msg.cont { padding-top: 1px; padding-bottom: 1px; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .gutter { width: 36px; flex: none; }
.msg .who { font-weight: 700; }
.msg .time { color: var(--muted); font-size: 11px; margin-inline-start: 8px; display: inline-block; }
.msg .who, .msg .time, .key, .nm, .mention, .ellipsis { unicode-bidi: isolate; }
.msg .text { white-space: pre-wrap; word-break: break-word; }
.msg .text .mention { background: var(--brand-soft); color: var(--brand-dark); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.msg .text .mention.me { background: #fff4e0; color: #8a4b00; }
.msg.mentions-me { background: #fffaf0; }
.msg .deleted { color: var(--muted); font-style: italic; }
.msg .actions { position: absolute; top: -12px; inset-inline-end: 18px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-md); display: none; padding: 2px; }
.msg:hover .actions { display: flex; }
.msg .actions button { border: 0; background: none; padding: 4px 7px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.msg .actions button:hover { background: var(--hover); }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.reaction { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 0 8px; font-size: 13px; cursor: pointer; }
.reaction.mine { border-color: var(--brand); background: var(--brand-soft); }
.thread-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 6px; margin-inline-start: -6px; border-radius: 6px; }
.thread-link:hover { background: #fff; box-shadow: var(--shadow); }
.issue-share { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); border-radius: 8px; padding: 8px 12px; margin-top: 6px; max-width: 460px; background: #fff; cursor: pointer; }
.issue-share:hover { box-shadow: var(--shadow-md); }
.composer { padding: 0 18px 16px; position: relative; }
.composer-box { border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.composer-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 98, 229, .12); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; padding: 10px 12px 4px; min-height: 42px; max-height: 200px; background: none; }
.composer .tools { display: flex; align-items: center; gap: 4px; padding: 4px 6px 6px; }
.composer .attached { margin: 6px 10px 0; }
.typing { height: 18px; font-size: 12px; color: var(--muted); padding: 0 18px; }
.thread-panel { width: 380px; flex: none; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; }
.mention-pop { position: absolute; bottom: calc(100% - 8px); inset-inline-start: 18px; width: 260px; }
.emoji-pop { position: absolute; z-index: 30; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.emoji-pop button { border: 0; background: none; font-size: 18px; padding: 4px; border-radius: 6px; cursor: pointer; }
.emoji-pop button:hover { background: var(--hover); }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 360px; animation: pop .15s ease-out; cursor: default; }
.toast.click { cursor: pointer; }
.toast.error { background: var(--bad); }
.toast.success { background: var(--ok); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 900px) {
  .issue-grid { grid-template-columns: 1fr; }
  .thread-panel { position: fixed; inset-block: 56px 0; inset-inline-end: 0; width: min(380px, 100%); z-index: 25; box-shadow: var(--shadow-lg); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .sidebar.open { display: block; position: fixed; inset-block: 56px 0; inset-inline-start: 0; z-index: 30; box-shadow: var(--shadow-lg); }
  .topbar .search { display: none; }
  .me-btn .nm { display: none; }
  .page { padding: 16px; }
  .board-top { padding: 16px 16px 0; }
  .columns { padding: 0 16px 16px; }
}
@media (min-width: 761px) { .menu-toggle { display: none; } }
