/* EBakr Hub — one stylesheet, light and dark. */
:root {
  --bg: #f4f5f9; --surface: #ffffff; --surface-2: #f8f9fc; --line: #e4e7ee; --line-2: #eef0f5;
  --ink: #111827; --ink-2: #374151; --muted: #6b7280; --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: #e6f4f1;
  --danger: #be123c; --ok: #047857; --warn: #b45309;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --side: 252px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --surface: #151a22; --surface-2: #1b212b; --line: #273040; --line-2: #1f2733;
    --ink: #e6e9ef; --ink-2: #c3c9d4; --muted: #8b95a5; --accent: #2bb3a0; --accent-ink: #062823; --accent-soft: #11302c;
    --danger: #fb7185; --ok: #34d399; --warn: #fbbf24; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
code { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
svg { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .lead { margin: -4px 0 16px; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; } .hidden { display: none; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); display: block; } .pad { padding: 12px 16px; }
.spacer { flex: 1; } .between { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--ink); padding: 4px 8px 12px; }
.brand:hover { text-decoration: none; }
.mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #0f766e, #0e9f8a 55%, #34d399); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.brand.big { font-size: 18px; padding: 0 0 6px; } .brand.big .mark { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.nav:hover { background: var(--surface-2); text-decoration: none; }
.nav.on { background: var(--accent-soft); color: var(--accent); }
.nav span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.badge { flex: none !important; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.side-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 10px 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.boards { display: flex; flex-direction: column; gap: 1px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.dot { width: 9px; height: 9px; border-radius: 3px; background: var(--c); display: inline-block; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 18px 28px 14px; position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); z-index: 5; }
.top-title { flex: 1; min-width: 0; }
.top-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.crumb a { color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.top-actions form { margin: 0; }
.content { padding: 4px 28px 48px; display: flex; flex-direction: column; gap: 16px; max-width: 1280px; width: 100%; }
.menu { display: none; }

/* ---------- Buttons & form ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.wide { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn.sm { width: 22px; height: 22px; font-size: 16px; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
input[type=color] { padding: 2px; height: 38px; width: 56px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-2); }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.row2, .row3, .row4 { display: grid; gap: 12px; }
.row2 { grid-template-columns: repeat(2, 1fr); } .row3 { grid-template-columns: repeat(3, 1fr); } .row4 { grid-template-columns: repeat(4, 1fr); }
.actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions.end { align-self: end; }
.form-card { display: flex; flex-direction: column; gap: 12px; }
.form-card.narrow { max-width: 720px; }
.inline { display: inline; margin: 0; } .inline-form { margin: 10px 0; }
.row-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.row-form .actions { grid-column: 1 / -1; }

/* ---------- Cards, lists, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-h h2 { display: flex; align-items: center; gap: 7px; }
.ic { width: 17px; height: 17px; color: var(--accent); }
.link { font-size: 12.5px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; }
.empty p { margin: 0 0 10px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat.warn b { color: var(--danger); } .stat.good b { color: var(--ok); }
.mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.mini li:first-child { border-top: 0; }
.mini li .ellipsis { flex: 1; }
.count { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; font-weight: 600; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: var(--c); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.soft { background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); }
@media (prefers-color-scheme: dark) { .pill.soft { color: color-mix(in srgb, var(--c) 55%, #fff); } }
.avatar { --h: 200; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 11.5px; font-weight: 700;
  background: hsl(var(--h) 65% 88%); color: hsl(var(--h) 55% 28%); }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.empty { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
@media (prefers-color-scheme: dark) { .avatar { background: hsl(var(--h) 35% 28%); color: hsl(var(--h) 70% 85%); } }

/* Task rows (Plaky-style grid) */
.tlist { display: flex; flex-direction: column; }
.thead, .trow { display: grid; grid-template-columns: minmax(0, 1fr) 64px 132px 96px 92px; align-items: center; gap: 10px; padding: 0 14px; }
.tlist.with-board .thead, .tlist.with-board .trow { grid-template-columns: minmax(0, 1fr) 170px 64px 132px 96px 92px; }
.thead { height: 32px; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.thead span:not(:first-child) { text-align: center; }
.trow { min-height: 44px; border-bottom: 1px solid var(--line-2); color: var(--ink); background: var(--surface); }
.trow:hover { background: var(--surface-2); text-decoration: none; }
.tname { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tboard { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tcell { display: flex; justify-content: center; }
.tcell .pill { width: 100%; justify-content: center; }
.due { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.due svg { width: 13px; height: 13px; }
.due.late { color: var(--danger); font-weight: 600; }
.src { display: inline-grid; place-items: center; margin-right: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.card .tlist { margin: 0 -18px -16px; }
.card .tlist .trow:last-child { border-bottom: 0; border-radius: 0 0 12px 12px; }
.tlist.compact .thead { display: none; }

.group { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.group-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.group-h h3 { color: var(--c); }
.gbar { width: 4px; height: 18px; border-radius: 2px; background: var(--c); }
.quick-add { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px auto; gap: 8px; padding: 8px 14px; background: var(--surface-2); }
.quick-add input, .quick-add select { height: 32px; padding: 4px 8px; font-size: 13px; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters input[type=search] { max-width: 260px; }
.filters select { width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 32px; color: var(--muted); font-weight: 600; }
.seg a svg { width: 15px; height: 15px; }
.seg a.on { background: var(--accent-soft); color: var(--accent); }
.seg a:hover { text-decoration: none; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 300px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.col-h h3 { flex: 1; }
.col-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 10px 12px; flex: 1; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 9px; padding: 10px 12px; color: var(--ink); display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); cursor: grab; }
.kcard:hover { text-decoration: none; border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.kcard.dragging { opacity: .5; }
.ktitle { font-weight: 500; }
.kmeta { display: flex; align-items: center; gap: 8px; }
.kmeta .avatar { margin-left: auto; }
.kmeta .pill { height: 20px; font-size: 11px; padding: 0 7px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); cursor: default; }
.table tr[onclick] { cursor: pointer; }
.table.compact td, .table.compact th { padding: 8px 10px; }
.table tr.inactive { opacity: .5; }
.table tr.editing td { background: var(--accent-soft); }
.table th.center, .table td.center { text-align: center; }
.who { display: flex; gap: 10px; align-items: center; }
.matrix-wrap { overflow-x: auto; }
.matrix td:first-child { min-width: 280px; }
.matrix tr.sub td { background: var(--surface-2); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 16px; }
.rname { width: 120px; text-align: center; font-weight: 600; padding: 4px 6px; }
.dept-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; }
.explain p { margin: 6px 0 0; color: var(--ink-2); }

/* Task page */
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.task-main { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 14px 18px; grid-column: 1 / -1; }
.task-main > :not(.task-side) { grid-column: 1; }
.task-side { grid-column: 2; grid-row: 1 / span 5; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--line); padding-left: 18px; }
.task-layout > #comments { grid-column: 1 / -1; }
.status-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.sbtn { flex-direction: row; cursor: pointer; }
.sbtn input { position: absolute; opacity: 0; pointer-events: none; }
.sbtn span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sbtn input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.sbtn input:focus-visible + span { outline: 2px solid var(--accent); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 4px 0 0; font-size: 13px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.comment p { margin: 4px 0 0; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.log { margin-top: 14px; } .log summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.log ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.prose { color: var(--ink-2); }
.transcript { white-space: pre-wrap; font: 13px/1.6 Inter, sans-serif; max-height: 520px; overflow: auto; margin: 10px 0 0; color: var(--ink-2); }
details > summary { cursor: pointer; font-weight: 600; }
details.paste summary { display: flex; align-items: center; gap: 8px; list-style: none; }
details.paste[open] summary { margin-bottom: 12px; }
details.paste form { display: flex; flex-direction: column; gap: 10px; }
.perm-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }

/* Brain */
.brain-card { background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 5px; flex: none; }
.kind.k-task { background: #e0e7ff; color: #3730a3; } .kind.k-meeting { background: #dcfce7; color: #166534; } .kind.k-slack { background: #fce7f3; color: #9d174d; }
@media (prefers-color-scheme: dark) { .kind.k-task { background: #262a52; color: #c7d2fe; } .kind.k-meeting { background: #133222; color: #bbf7d0; } .kind.k-slack { background: #3b1a2b; color: #fbcfe8; } }
.drafts { display: flex; flex-direction: column; gap: 12px; }
.draft { display: flex; flex-direction: column; gap: 10px; border-left: 4px solid #6366f1; }
.draft.k-meeting { border-left-color: #16a34a; } .draft.k-slack { border-left-color: #db2777; }
.draft.failed { border-color: var(--danger); }
.draft-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-title { font-size: 15px; font-weight: 600; border-color: transparent; background: transparent; padding: 4px 6px; margin-left: -6px; }
.draft-title:hover { border-color: var(--line); }
.copy-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 10px; margin-top: 4px; font-weight: 400; }
.copy-box code { border: 0; background: none; padding: 0; flex: 1; }
.int-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.int.wide { grid-column: 1 / -1; }
.int form { display: flex; flex-direction: column; gap: 12px; }
.int > p { margin: 0 0 12px; }

.flash { padding: 10px 14px; border-radius: 9px; border: 1px solid; font-weight: 500; }
.content > .flash, .main > .flash { margin: 0 28px 4px; }
.flash.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash.err { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.flash .copy-box { margin-top: 8px; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.auth-card.wide { max-width: 640px; }
.auth-card h3 { margin-top: 6px; font-size: 13px; }
.auth-card p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid2, .task-layout, .int-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 270px; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .side.open { transform: none; }
  .menu { display: inline-grid; }
  .top { padding: 12px 16px; }
  .content { padding: 4px 16px 40px; }
  .content > .flash, .main > .flash { margin: 0 16px 4px; }
  .row2, .row3, .row4 { grid-template-columns: 1fr; }
  .thead { display: none; }
  .trow, .tlist.with-board .trow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "n n n" "a s d"; padding: 10px 14px; row-gap: 8px; }
  .trow .tname { grid-area: n; white-space: normal; }
  .trow .tboard, .trow .tcell:nth-of-type(4) { display: none; }
  .tcell .pill { width: auto; }
  .quick-add { grid-template-columns: 1fr 1fr; }
  .quick-add input[name=title] { grid-column: 1 / -1; }
  .task-main { grid-template-columns: 1fr; }
  .task-side { grid-column: 1; grid-row: auto; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
  .table td:last-child, .table th:last-child { display: table-cell; }
  .dept-row { grid-template-columns: 48px 1fr; }
  .comment-form { flex-direction: column; align-items: stretch; }
}

/* Fixes: avatar inside nav links, compact task rows in narrow cards */
.nav > .avatar { flex: none; }
.tlist.compact .trow, .tlist.compact .thead { grid-template-columns: minmax(0, 1fr) 28px 120px 78px; }
.tlist.compact .trow .tcell:nth-of-type(3) { display: none; }
.tlist.compact .tboard { display: none; }
.tcell { align-items: center; }
.kanban { grid-template-columns: repeat(5, minmax(200px, 1fr)); }
.int form.row-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; align-items: end; }
.int form.row-form label.check, .int form.row-form .actions { grid-column: 1 / -1; }
@media (max-width: 820px) {
  .top { flex-wrap: wrap; }
  .top-actions { width: 100%; }
  .int form.row-form { grid-template-columns: 1fr; }
}
