/* Cassus Hub — brand: Open Sans, #b50600 + black + white. Layout mirrors ClickUp. */
:root {
  --brand: #b50600; --brand-600: #9a0500; --brand-50: #fdf1f0; --brand-100: #fbe0de;
  --ink: #111316; --ink-2: #2b2f36; --muted: #656f7d; --faint: #9aa3af;
  --line: #e6e8eb; --line-2: #eef0f2; --bg: #ffffff; --bg-soft: #f7f8f9; --bg-hover: #f1f3f5; --bg-side: #fbfbfc;
  --sel: #eef4ff; --focus: #1f6feb;
  --ok: #1a7f37; --warn: #d4760a; --danger: #cf222e; --info: #1f6feb;
  --p1: #cf222e; --p2: #d4a106; --p3: #1f6feb; --p4: #9aa3af;
  --radius: 8px; --radius-sm: 6px;
  --shadow: 0 8px 28px rgba(16, 20, 26, .14), 0 1px 3px rgba(16, 20, 26, .08);
  --shadow-sm: 0 1px 2px rgba(16, 20, 26, .08);
  --side-w: 264px; --top-h: 48px;
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--ink-2); }
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-danger { color: var(--danger); }
.btn-danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn-icon { width: 28px; height: 28px; padding: 0; justify-content: center; border-color: transparent; background: transparent; color: var(--muted); }
.btn-icon:hover { background: var(--bg-hover); color: var(--ink); }
.btn-block { width: 100%; justify-content: center; height: 40px; }
.btn.on { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px; background: #fff; outline: none; min-height: 34px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31, 111, 235, .12); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 12px; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; min-height: 0; margin: 0; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--bg-hover); color: var(--muted); }
.kbd { font: 600 11px/1 var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--muted); background: #fff; }

/* Auth pages */
.auth-body { background: linear-gradient(160deg, #fff 0%, #fff 55%, var(--brand-50) 100%); display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; margin: 18px 0 6px; }
.auth-card .muted { margin: 0 0 18px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; font-size: 15px; }
.auth-brand b { color: var(--brand); }
.auth-foot { font-size: 12px; color: var(--muted); margin: 16px 0 0; text-align: center; }
.ws-picks { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 2px; margin: 0 0 16px; }
.ws-picks legend { font-weight: 600; font-size: 13px; padding: 0 4px; }

/* App layout */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; }
.side { background: var(--bg-side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ws-switch { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; border-bottom: 1px solid var(--line); height: 52px; }
.ws-switch:hover { background: var(--bg-hover); }
.ws-name { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-search { margin: 10px 10px 6px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--muted); cursor: pointer; font-size: 13px; }
.side-search .kbd { margin-left: auto; }
.nav { padding: 4px 6px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; font-weight: 500; user-select: none; }
.nav-item:hover { background: var(--bg-hover); text-decoration: none; }
.nav-item.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; padding: 0 6px; }
.side-section { display: flex; align-items: center; padding: 12px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.side-section .btn-icon { width: 22px; height: 22px; margin-left: auto; }
.side-section.clickable { cursor: pointer; gap: 4px; user-select: none; }
.side-section.clickable:hover { color: var(--ink-2); }
.tree { flex: 1; overflow: auto; padding: 0 6px 12px; }
.tnode { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 6px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-2); user-select: none; position: relative; }
.tnode:hover { background: var(--bg-hover); }
.tnode.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.tnode .caret { width: 16px; height: 16px; display: grid; place-items: center; color: var(--faint); flex: none; border-radius: 4px; }
.tnode .caret:hover { background: #e3e6ea; color: var(--ink); }
.tnode .caret svg { transition: transform .12s; }
.tnode.open > .caret svg { transform: rotate(90deg); }
.tnode .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnode .cnt { font-size: 11px; color: var(--faint); }
.tnode .acts { display: none; gap: 0; }
.tnode:hover .acts, .tnode.menu-open .acts { display: flex; }
.tnode:hover .cnt { display: none; }
.tnode .acts .btn-icon { width: 22px; height: 22px; }
.space-av { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; flex: none; }
.list-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 4px; }
.tchildren { padding-left: 16px; }
.tnode.drop-before { box-shadow: inset 0 2px 0 var(--focus); }
.tnode.drop-after { box-shadow: inset 0 -2px 0 var(--focus); }
.tnode.dragging { opacity: .4; }
.side-foot { border-top: 1px solid var(--line); padding: 8px; display: flex; align-items: center; gap: 6px; }
.me-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); flex: 1; min-width: 0; text-align: left; }
.me-btn:hover { background: var(--bg-hover); }
.me-btn span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; font-size: 13px; }
.side-empty { padding: 10px 14px; color: var(--muted); font-size: 13px; }

/* Header + view tabs */
.topbar { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { color: var(--faint); }
.crumbs .here { color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle { display: none; }
.tabs { display: flex; align-items: flex-end; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); height: 40px; flex: none; overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); flex: none; flex-wrap: wrap; }
.toolbar .search { position: relative; width: 220px; }
.toolbar .search input { padding-left: 30px; height: 30px; min-height: 30px; }
.toolbar .search svg { position: absolute; left: 9px; top: 7px; color: var(--faint); }
.content { flex: 1; overflow: auto; min-height: 0; position: relative; }
.page { padding: 20px 24px 60px; width: 100%; }
.page h1 { font-size: 22px; margin: 0 0 4px; }
.page h2 { font-size: 16px; margin: 28px 0 10px; }

/* Status / priority / avatars */
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .03em;
  text-transform: uppercase; color: #fff; cursor: pointer; border: 0; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 14px; height: 14px; border-radius: 4px; border: 2px solid currentColor; flex: none; cursor: pointer; background: transparent; padding: 0; display: inline-grid; place-items: center; }
.status-dot.complete { background: currentColor; }
.status-dot.complete::after { content: ''; width: 6px; height: 3px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; flex: none; border: 2px solid #fff; }
.av.sm { width: 20px; height: 20px; font-size: 9px; }
.av.lg { width: 32px; height: 32px; font-size: 12px; }
.av.placeholder { opacity: .75; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -6px; }
.av-empty { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed var(--faint); display: inline-grid; place-items: center; color: var(--faint); }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.prio svg { fill: currentColor; }
.prio-1 { color: var(--p1); } .prio-2 { color: var(--p2); } .prio-3 { color: var(--p3); } .prio-4 { color: var(--p4); }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.due { font-size: 12px; color: var(--muted); white-space: nowrap; }
.due.overdue { color: var(--danger); font-weight: 600; }
.due.today { color: var(--warn); font-weight: 600; }
.cid { font-size: 11px; color: var(--faint); font-weight: 600; }

/* List view */
.lv { padding: 8px 16px 80px; min-width: 760px; }
.group { margin: 6px 0 14px; }
.group-h { display: flex; align-items: center; gap: 8px; height: 34px; position: sticky; top: 0; background: #fff; z-index: 2; }
.group-h .caret { cursor: pointer; color: var(--muted); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; }
.group-h .caret:hover { background: var(--bg-hover); }
.group-h .caret svg { transition: transform .12s; transform: rotate(90deg); }
.group.collapsed .group-h .caret svg { transform: rotate(0); }
.group.collapsed .rows, .group.collapsed .add-row, .group.collapsed .cols { display: none; }
.group-h .n { color: var(--faint); font-weight: 600; font-size: 12px; }
.cols, .trow { display: grid; grid-template-columns: var(--grid, 1fr 120px 110px 90px); align-items: center; }
.cols { height: 28px; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line-2); }
.cols > div { padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cols .sortable { cursor: pointer; }
.cols .sortable:hover { color: var(--ink); }
.trow { min-height: 38px; border-bottom: 1px solid var(--line-2); position: relative; }
.trow:hover { background: var(--bg-soft); }
.trow.selected { background: var(--sel); }
.trow > div { padding: 0 8px; min-width: 0; }
.trow .cell { display: flex; align-items: center; gap: 6px; cursor: pointer; height: 100%; min-height: 38px; }
.trow .cell:hover { background: rgba(0, 0, 0, .025); }
.tname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tname .sel { width: 16px; height: 16px; margin: 0; opacity: 0; flex: none; cursor: pointer; }
.trow:hover .tname .sel, .trow.selected .tname .sel, .lv.selecting .tname .sel { opacity: 1; }
.tname .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 500; }
.tname .nm:hover { color: var(--brand); }
.tname .meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; flex: none; }
.tname .meta span { display: inline-flex; align-items: center; gap: 3px; }
.tname .sub-toggle { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; color: var(--faint); cursor: pointer; flex: none; border: 0; background: none; padding: 0; }
.tname .sub-toggle:hover { background: var(--bg-hover); color: var(--ink); }
.tname .sub-toggle.open svg { transform: rotate(90deg); }
.tname .sub-toggle.none { visibility: hidden; }
.trow.done .nm { color: var(--muted); }
.trow .rename { flex: 1; }
.trow.sub { background: #fcfcfd; }
.add-row { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 34px; color: var(--faint); cursor: pointer; border-bottom: 1px solid var(--line-2); }
.add-row:hover { color: var(--ink); background: var(--bg-soft); }
.add-row input { border: 0; padding: 0; min-height: 0; box-shadow: none !important; background: transparent; }
.add-row.editing { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--focus); border-radius: 4px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty h3 { color: var(--ink); margin: 8px 0 6px; font-size: 16px; }
.bulkbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 8px 6px 14px;
  display: flex; align-items: center; gap: 4px; box-shadow: var(--shadow); z-index: 40; font-size: 13px; }
.bulkbar .btn { background: transparent; color: #fff; border-color: transparent; }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .12); }
.bulkbar b { margin-right: 8px; }

/* Board */
.board { display: flex; gap: 12px; padding: 12px 16px 24px; align-items: flex-start; height: 100%; }
.bcol { width: 272px; flex: none; background: var(--bg-soft); border-radius: 10px; display: flex; flex-direction: column; max-height: 100%; border-top: 3px solid var(--c, #aaa); }
.bcol.collapsed { width: 44px; }
.bcol.collapsed .bcards, .bcol.collapsed .badd, .bcol.collapsed .bcol-h .n, .bcol.collapsed .bcol-h .status-pill { display: none; }
.bcol-h { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px; }
.bcol-h .n { color: var(--faint); font-size: 12px; font-weight: 600; }
.bcol-h .wip-over { color: var(--danger); }
.bcards { overflow-y: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.bcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; box-shadow: var(--shadow-sm); }
.bcard:hover { border-color: #cfd4da; }
.bcard .t { font-weight: 600; margin-bottom: 6px; word-break: break-word; }
.bcard .m { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.bcard .where { font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.bcard.dragging { opacity: .4; }
.bcards.drop { background: rgba(31, 111, 235, .06); outline: 2px dashed rgba(31, 111, 235, .35); outline-offset: -4px; border-radius: 8px; }
.badd { margin: 0 8px 10px; }
.drop-marker { height: 3px; background: var(--focus); border-radius: 2px; }

/* Calendar */
.cal { padding: 10px 16px 24px; }
.cal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-h h2 { margin: 0 8px; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.cal-day { min-height: 116px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.other { background: #fafbfc; }
.cal-day.other .d { color: var(--faint); }
.cal-day .d { font-size: 12px; font-weight: 700; padding: 2px 4px; display: flex; align-items: center; }
.cal-day.today .d span { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-day .d .add { margin-left: auto; opacity: 0; }
.cal-day:hover .d .add { opacity: 1; }
.cal-day.drop { background: var(--sel); }
.cal-ev { font-size: 12px; border-radius: 4px; padding: 2px 6px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--c, #aaa); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.done { opacity: .6; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; cursor: pointer; }
.cal-nodate { margin-top: 14px; }

/* Table */
.tbl-wrap { padding: 8px 16px 60px; }
table.tbl { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0 8px; height: 36px; text-align: left; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tbl th { position: sticky; top: 0; background: var(--bg-soft); z-index: 1; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); cursor: pointer; }
.tbl th:first-child, .tbl td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 280px; }
.tbl th:first-child { z-index: 3; background: var(--bg-soft); }
.tbl tr:hover td { background: var(--bg-soft); }
.tbl td.edit { cursor: pointer; }
.tbl td.edit:hover { box-shadow: inset 0 0 0 1px var(--focus); }

/* Popovers, menus, modals */
.pop { position: fixed; z-index: 100; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 200px; max-width: 340px;
  max-height: min(640px, 88vh); overflow: auto; padding: 6px; }
.pop .search-in { margin: 2px 2px 6px; }
.mi { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; font-size: 13px; }
.mi:hover, .mi.hl { background: var(--bg-hover); }
.mi.danger { color: var(--danger); }
.mi .chk { margin-left: auto; color: var(--brand); }
.mi.disabled { opacity: .5; cursor: default; }
.mi-sep { height: 1px; background: var(--line); margin: 5px 2px; }
.mi-h { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px 3px; }
.backdrop { position: fixed; inset: 0; background: rgba(15, 18, 22, .45); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow); width: 100%; max-width: 520px; }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; padding: 16px 20px 0; }
.modal-h h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-b { padding: 16px 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); z-index: 200;
  max-width: 380px; font-size: 13px; display: flex; gap: 10px; align-items: center; animation: tin .15s ease-out; }
.toast.err { background: var(--danger); }
.toast button { background: none; border: 0; color: #fff; font-weight: 700; cursor: pointer; text-decoration: underline; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }

/* Task panel (ClickUp task view) */
.tp-backdrop { position: fixed; inset: 0; background: rgba(15, 18, 22, .45); z-index: 50; display: flex; justify-content: center; align-items: stretch; padding: 3vh 3vw; }
.tp { background: #fff; border-radius: 12px; box-shadow: var(--shadow); width: 100%; max-width: min(1680px, 96vw); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tp-top { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.tp-body { display: grid; grid-template-columns: minmax(0, 1fr) 400px; flex: 1; min-height: 0; }
.tp-main { overflow: auto; padding: 22px 32px 60px; }
.tp-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg-soft); }
.tp-title { font-size: 24px; font-weight: 700; border: 0; padding: 4px 6px; margin: 0 -6px 14px; width: calc(100% + 12px); border-radius: 6px; resize: none; overflow: hidden; line-height: 1.3; min-height: 0; }
.tp-title:hover { background: var(--bg-soft); }
.tp-title:focus { box-shadow: none; background: var(--bg-soft); }
.tp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; margin-bottom: 18px; }
.fld { display: grid; grid-template-columns: 130px 1fr; align-items: center; min-height: 36px; }
.fld .k { color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 13px; }
.fld .v { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; cursor: pointer; min-height: 30px; flex-wrap: wrap; }
.fld .v:hover { background: var(--bg-hover); }
.fld .v.ro { cursor: default; }
.fld .v.ro:hover { background: none; }
.fld .v .empty-v { color: var(--faint); }
.fld .v input { min-height: 28px; padding: 3px 6px; }
.tp-sec { margin-top: 22px; }
.tp-sec-h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.tp-sec-h .n { color: var(--faint); font-weight: 600; font-size: 12px; }
.desc { border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; margin: 0 -10px; cursor: text; min-height: 44px; }
.desc:hover { border-color: var(--line); }
.desc.placeholder { color: var(--faint); }
.desc-edit textarea { min-height: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.md p { margin: 0 0 8px; } .md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { margin: 12px 0 6px; line-height: 1.25; } .md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 22px; }
.md code { background: var(--bg-hover); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.md pre { background: #0f1216; color: #e6e8eb; padding: 10px 12px; border-radius: 8px; overflow: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { border-left: 3px solid var(--line); margin: 0 0 8px; padding-left: 10px; color: var(--muted); }
.md img { max-width: 100%; border-radius: 6px; }
.md .mention { background: var(--brand-50); color: var(--brand); border-radius: 4px; padding: 0 4px; font-weight: 700; }
.md .task-check { margin-right: 6px; }
.md table { border-collapse: collapse; } .md td, .md th { border: 1px solid var(--line); padding: 4px 8px; }
.subrow { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 6px; border-radius: 6px; border-bottom: 1px solid var(--line-2); }
.subrow:hover { background: var(--bg-soft); }
.subrow .nm { flex: 1; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subrow .nm:hover { color: var(--brand); }
.checklist { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; margin-bottom: 10px; }
.checklist-h { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 32px; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; flex: 1; max-width: 140px; }
.progress > i { display: block; height: 100%; background: var(--ok); }
.ci { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.ci input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.ci .txt { flex: 1; cursor: text; }
.ci.done .txt { text-decoration: line-through; color: var(--muted); }
.ci .x { opacity: 0; }
.ci:hover .x { opacity: 1; }
.atts { display: flex; flex-wrap: wrap; gap: 10px; }
.att { width: 150px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; position: relative; }
.att .thumb { height: 90px; background: var(--bg-soft) center/cover no-repeat; display: grid; place-items: center; color: var(--faint); }
.att .nm { font-size: 12px; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .x { position: absolute; top: 4px; right: 4px; background: #fff; opacity: 0; }
.att:hover .x { opacity: 1; }
.dropzone { border: 2px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; font-size: 13px; }
.dropzone.over { border-color: var(--focus); background: var(--sel); }
.links .lk { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.feed-tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); flex: none; }
.feed { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.act { font-size: 12px; color: var(--muted); display: flex; gap: 6px; }
.act b { color: var(--ink-2); font-weight: 600; }
.act time { margin-left: auto; white-space: nowrap; color: var(--faint); }
.cmt { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cmt.reply { margin-left: 22px; }
.cmt-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.cmt-h b { font-weight: 700; }
.cmt-h time { color: var(--faint); font-size: 12px; }
.cmt-h .acts { margin-left: auto; display: flex; opacity: 0; }
.cmt:hover .cmt-h .acts { opacity: 1; }
.cmt .reacts { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.react { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; cursor: pointer; height: 22px; }
.react.mine { border-color: var(--brand-100); background: var(--brand-50); }
.composer { border-top: 1px solid var(--line); padding: 10px 14px 14px; background: #fff; flex: none; position: relative; }
.composer textarea { min-height: 70px; max-height: 240px; }
.composer .row { margin-top: 8px; }
.mention-pop { position: absolute; bottom: 100%; left: 14px; }

/* Command palette */
.palette { max-width: 640px; }
.palette input { border: 0; box-shadow: none !important; font-size: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.palette .results { max-height: 60vh; overflow: auto; padding: 6px; }
.palette .mi { padding: 8px 10px; }
.palette .mi small { color: var(--faint); margin-left: auto; overflow: hidden; text-overflow: ellipsis; }

/* Settings */
.settings { display: grid; grid-template-columns: 210px 1fr; min-height: 100%; }
.settings-nav { border-right: 1px solid var(--line); padding: 16px 8px; background: var(--bg-soft); }
.settings-nav .nav-item { margin-bottom: 2px; }
.settings-body { padding: 24px 32px 60px; width: 100%; }
.settings-body h1 { font-size: 22px; margin: 0 0 4px; }
.settings-body > p.muted { margin: 0 0 20px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; background: #fff; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.mtable { width: 100%; border-collapse: collapse; }
.mtable td, .mtable th { padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-align: left; font-size: 13px; }
.mtable th { font-size: 11px; text-transform: uppercase; color: var(--faint); letter-spacing: .04em; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.app-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.app-card .t { font-weight: 700; }
.app-card .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.app-card .src { font-size: 11px; color: var(--faint); margin-top: 4px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; margin-left: auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd4da; border-radius: 999px; cursor: pointer; transition: .15s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; cursor: default; }
.st-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fff; }
.st-row input[type=text] { min-height: 30px; padding: 4px 8px; }
.st-row select { width: 130px; min-height: 30px; padding: 4px 8px; }
.st-row .grip { cursor: grab; color: var(--faint); }
.st-color { width: 24px; height: 24px; border-radius: 6px; border: 0; cursor: pointer; flex: none; }
.meter { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.meter > i { display: block; height: 100%; background: var(--brand); }

/* Import wizard */
.steps { display: flex; gap: 6px; margin: 4px 0 18px; flex-wrap: wrap; }
.steps .s { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-hover); color: var(--muted); }
.steps .s.on { background: var(--brand); color: #fff; }
.steps .s.done { background: var(--brand-50); color: var(--brand); }
.map-table { width: 100%; border-collapse: collapse; }
.map-table td, .map-table th { padding: 6px; border-bottom: 1px solid var(--line-2); font-size: 13px; text-align: left; vertical-align: middle; }
.map-table th { font-size: 11px; color: var(--faint); text-transform: uppercase; }
.map-table input, .map-table select { min-height: 30px; padding: 4px 8px; }
.logbox { background: #0f1216; color: #cfd6de; font: 12px/1.5 ui-monospace, Menlo, monospace; border-radius: 8px; padding: 10px 12px; max-height: 260px; overflow: auto; white-space: pre-wrap; }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }

/* Home / inbox */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.nrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.nrow:hover { background: var(--bg-soft); }
.nrow.unread { background: var(--brand-50); }
.nrow .txt { flex: 1; min-width: 0; }
.nrow .txt .t { font-weight: 600; }
.nrow .txt .x { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nrow time { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* Filters popover */
.fb { width: 560px; max-width: 92vw; padding: 10px; }
.fb .frow { display: grid; grid-template-columns: 54px 150px 130px 1fr 28px; gap: 6px; align-items: center; margin-bottom: 6px; }
.fb select, .fb input { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.fb .conj { font-size: 12px; color: var(--muted); text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.chip { font-size: 12px; background: var(--bg-hover); border-radius: 4px; padding: 0 6px; }

/* Mobile */
/* Breakpoints (Paul): desktop >= 981px, tablet 769-980px, mobile <= 768px. */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 300px; max-width: 86vw; z-index: 70; transform: translateX(-102%); transition: transform .18s; box-shadow: var(--shadow); }
  .app.side-open .side { transform: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 768px) {
  .tp-backdrop { padding: 0; }
  .tp { border-radius: 0; }
  .tp-body { grid-template-columns: 1fr; overflow: auto; }
  .tp-main { overflow: visible; padding: 16px; }
  .tp-side { border-left: 0; border-top: 1px solid var(--line); min-height: 60vh; }
  .tp-fields { grid-template-columns: 1fr; }
  .toolbar .search { width: 100%; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-body { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .fb .frow { grid-template-columns: 1fr 1fr; }
}

/* @Gabriel */
.av-gabriel { background: linear-gradient(135deg, var(--brand), #6e0400); color: #fff; }
.av-gabriel svg { width: 12px; height: 12px; }
.md .mention.agent { background: #fff1e6; color: #a64b00; }
.cmt.gabriel { border-color: #f1d3cf; background: #fffaf9; }
.gb-fab { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 0; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.gb-fab svg { color: #ffb4ae; }
.gb-fab:hover { background: #000; }
.gb-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 58; background: #fff; border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(16, 20, 26, .12); display: flex; flex-direction: column; animation: gbin .16s ease-out; }
@keyframes gbin { from { transform: translateX(24px); opacity: 0; } }
.gb-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.gb-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-soft); }
.gb-foot { border-top: 1px solid var(--line); padding: 10px 12px 12px; flex: none; }
.gb-foot textarea { min-height: 54px; max-height: 200px; margin-bottom: 6px; }
.gb-empty p { color: var(--muted); margin: 4px 0 12px; }
.gb-idea { display: flex; width: 100%; justify-content: flex-start; margin-bottom: 6px; height: auto; min-height: 32px; white-space: normal; text-align: left; font-weight: 500; }
.gb-msg { display: flex; gap: 8px; align-items: flex-start; }
.gb-msg.user { justify-content: flex-end; }
.gb-msg.user .gb-bubble { background: var(--ink); color: #fff; border-color: var(--ink); max-width: 85%; }
.gb-msg.user .gb-bubble a { color: #ffb4ae; }
.gb-bubble { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; min-width: 0; max-width: 100%; font-size: 13.5px; overflow-wrap: anywhere; }
.gb-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.gb-dots { width: 18px; height: 6px; background: radial-gradient(circle, var(--brand) 2px, transparent 2.5px) 0 0 / 6px 6px repeat-x; animation: gbdots 1s linear infinite; }
@keyframes gbdots { 50% { opacity: .35; } }
.gb-actions { margin-top: 8px; font-size: 12px; color: var(--ok); font-weight: 600; }
@media (max-width: 768px) { .gb-fab span { display: none; } .gb-fab { padding: 0 13px; } }

/* Docs */
.doc-wrap { width: 100%; margin: 0 auto; padding: 28px 40px 80px; }
.doc-wrap.narrow { max-width: 900px; }
.doc-wrap.narrow.editing { max-width: 1400px; }
.doc-title { font-size: 30px; font-weight: 800; border: 0 !important; box-shadow: none !important; padding: 0; margin: 0 0 4px; min-height: 0; background: transparent; }
.doc-toolbar { display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 4px; background: var(--bg-soft); }
.doc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 0 0 8px 8px; min-height: 60vh; }
.doc-src { border: 0 !important; border-right: 1px solid var(--line) !important; border-radius: 0 0 0 8px !important; box-shadow: none !important; min-height: 60vh;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; resize: none; padding: 14px 16px; }
.doc-split .doc-preview { padding: 14px 18px; overflow: auto; max-height: 75vh; }
.doc-preview { font-size: 15px; line-height: 1.65; }
.doc-preview h1 { font-size: 24px; } .doc-preview h2 { font-size: 19px; }
.doc-task { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; background: #fff; font-size: 14px; }
.doc-banner { background: #fff8e6; border-color: #f0d9a6; }
.doc-children { margin-top: 32px; }
@media (max-width: 768px) { .doc-split { grid-template-columns: 1fr; } .doc-src { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; } .doc-wrap { padding: 16px; } }

/* Chat */
.content.chat { display: grid; grid-template-columns: 240px 1fr; overflow: hidden; position: relative; }
body:has(.content.chat) .gb-fab { display: none; }
.chat-list { border-right: 1px solid var(--line); overflow: auto; padding: 4px 6px 16px; background: var(--bg-side); }
.chat-ch { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--ink-2); text-decoration: none !important; }
.chat-ch:hover { background: var(--bg-hover); }
.chat-ch.active { background: var(--brand-50); color: var(--brand); }
.chat-ch.unread .label { font-weight: 800; color: var(--ink); }
.chat-ch .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-ch .hash { width: 20px; text-align: center; color: var(--faint); font-weight: 700; }
.chat-ch .count { font-size: 11px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; padding: 0 6px; }
.chat-more { font-size: 12px; color: var(--muted); padding: 4px 10px; cursor: pointer; }
.chat-conv, .chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-thread { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); border-left: 1px solid var(--line); background: #fff; box-shadow: -10px 0 24px rgba(16, 20, 26, .08); z-index: 3; }
.chat-head { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.chat-msgs { flex: 1; overflow: auto; padding: 12px 0; }
.chat-msg { display: flex; gap: 10px; padding: 4px 16px; position: relative; }
.chat-msg:hover { background: var(--bg-soft); }
.chat-msg.grouped { padding-top: 0; }
.chat-msg.gabriel { background: #fffaf9; }
.chat-av { width: 24px; flex: none; padding-top: 2px; }
.chat-main { flex: 1; min-width: 0; }
.chat-main .md { font-size: 14px; overflow-wrap: anywhere; }
.chat-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chat-meta time { font-size: 11px; color: var(--faint); }
.chat-acts { position: absolute; right: 12px; top: -12px; display: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); }
.chat-msg:hover .chat-acts { display: flex; }
.chat-replies { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 12px; cursor: pointer; padding: 2px 0; }
.chat-task { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 4px; }
.chat-sep { font-size: 12px; color: var(--faint); padding: 6px 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px 14px; border-top: 1px solid var(--line); flex: none; }
.chat-compose textarea { min-height: 38px; resize: none; }
.chat-join { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-soft); }
@media (max-width: 768px) { .content.chat { grid-template-columns: 1fr; } .chat-list { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); } .chat-thread { position: fixed; inset: 0; width: auto; z-index: 55; } }

/* Forms */
.form-card { max-width: 560px; }
.form-card h1 { font-size: 24px; }
.form-done { font-size: 16px; margin: 12px 0 20px; }
.form-q { padding: 10px 12px; margin-bottom: 8px; }
body:has(.tp-backdrop) .gb-fab { display: none; }

/* ---- Time tracking ---- */
.timer-pill { display: flex; align-items: center; gap: 8px; margin: 8px 10px 4px; padding: 6px 6px 6px 10px; border-radius: 8px; background: rgba(181, 6, 0, .08); border: 1px solid rgba(181, 6, 0, .25); font-size: 12.5px; min-width: 0; }
.timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; animation: timerPulse 1.6s ease-in-out infinite; }
@keyframes timerPulse { 50% { opacity: .35; } }
.timer-clock { font-variant-numeric: tabular-nums; font-weight: 700; flex: none; }
.timer-task { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.stop-sq { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--brand); }
.tbl.ts td, .tbl.ts th { font-variant-numeric: tabular-nums; }
.tbl.ts .ts-total td { border-top: 2px solid var(--line); }
.tp-fields .v .row > span:first-child { white-space: nowrap; }

/* ---- Gantt + Timeline ---- */
:root { --g-we: rgba(0, 0, 0, .035); }
.gantt { overflow: auto; height: 100%; min-height: 360px; border-top: 1px solid var(--line); position: relative; }
.g-grid { position: relative; min-height: 100%; }
.g-top { display: flex; position: sticky; top: 0; z-index: 4; background: var(--bg); border-bottom: 1px solid var(--line); }
.g-namehead { width: 300px; flex: none; position: sticky; left: 0; z-index: 5; background: var(--bg); border-right: 1px solid var(--line); display: flex; align-items: flex-end; padding: 0 12px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.g-head { position: relative; flex: 1; height: 52px; }
.g-hrow { position: relative; height: 26px; }
.g-hcell { position: absolute; top: 0; height: 26px; line-height: 26px; font-size: 11.5px; padding-left: 6px; white-space: nowrap; overflow: hidden; border-left: 1px solid var(--line); color: var(--muted); }
.g-hrow:first-child .g-hcell { font-weight: 700; color: var(--ink); }
.g-hcell.c { padding: 0; text-align: center; }
.g-hcell.we { background: var(--g-we); }
.g-hcell.today { color: var(--brand); font-weight: 700; }
.g-rows { position: relative; }
.g-row { display: flex; height: 34px; border-bottom: 1px solid var(--line-2); }
.g-row:hover .g-name, .g-row:hover .g-track { background-color: rgba(0, 0, 0, .018); }
.g-name { width: 300px; flex: none; position: sticky; left: 0; z-index: 3; background: var(--bg); border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding-right: 10px; font-size: 13px; cursor: pointer; min-width: 0; height: 34px; }
.g-name .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.g-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.g-name .nm.done { text-decoration: line-through; color: var(--muted); }
.g-name.lane { cursor: default; font-weight: 600; padding-left: 12px; align-items: flex-start; padding-top: 7px; }
.g-nodate { font-size: 11px; margin-left: auto; white-space: nowrap; }
.g-track { position: relative; flex: none; height: 34px; }
.g-track::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--today); width: 2px; background: var(--brand); opacity: .55; pointer-events: none; }
.g-track.sched { cursor: crosshair; }
.g-bar { position: absolute; top: 7px; height: 20px; border-radius: 5px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid var(--c); display: flex; align-items: center; font-size: 11.5px; cursor: grab; user-select: none; touch-action: none; z-index: 1; overflow: visible; }
.g-bar::before { content: ''; position: absolute; inset: 0; width: var(--p); background: var(--c); opacity: .55; border-radius: 4px; pointer-events: none; }
.g-bar.done { opacity: .55; }
.g-bar .g-lbl { position: relative; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.g-bar.outside .g-lbl { position: absolute; left: 100%; overflow: visible; color: var(--muted); }
.g-bar .g-h { position: absolute; top: -1px; bottom: -1px; width: 8px; cursor: ew-resize; z-index: 2; }
.g-bar .g-h.l { left: -4px; } .g-bar .g-h.r { right: -4px; }
.g-bar:active { cursor: grabbing; }
.g-bar.ghost { background: rgba(181, 6, 0, .15); border: 1px dashed var(--brand); pointer-events: none; }
.g-ms { position: absolute; top: 9px; width: 16px; height: 16px; background: var(--c); transform: rotate(45deg); border-radius: 3px; cursor: pointer; z-index: 1; }
.g-ms.done { opacity: .5; }
.g-links { position: absolute; top: 0; left: 300px; pointer-events: none; z-index: 2; overflow: visible; }
.g-links path { fill: none; stroke: #8b95a1; stroke-width: 1.5; }
.g-links path.late { stroke: var(--danger, #cf222e); }
.g-lane.drop .g-track { background-color: rgba(181, 6, 0, .06); }
.g-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 8px 14px; }
.seg { display: inline-flex; } .seg .btn { border-radius: 0; margin-left: -1px; } .seg .btn:first-child { border-radius: 6px 0 0 6px; } .seg .btn:last-child { border-radius: 0 6px 6px 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g-we: rgba(255, 255, 255, .035); } }
:root[data-theme="dark"] { --g-we: rgba(255, 255, 255, .035); }

/* ---- Repeat editor ---- */
.repeat-ed { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.repeat-ed .row { gap: 8px; }
.repeat-ed .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.repeat-ed .dow { display: flex; gap: 4px; }
.repeat-ed .dow .btn { width: 32px; justify-content: center; padding: 0; }
.repeat-ed .check { margin: 4px 0 0; }

/* ---- Templates ---- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tpl-card { margin: 0; display: flex; flex-direction: column; }
.tpl-card .row:last-child { margin-top: auto; padding-top: 12px; }
.tpl-ic { width: 28px; height: 28px; border-radius: 7px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tpl-opt { display: flex; flex-direction: column; min-width: 0; }
.tpl-opt small { font-size: 11.5px; }

/* ---- Automations ---- */
.auto-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
.auto-row:last-child { border-bottom: 0; }
.auto-row.off { opacity: .55; }
.auto-ic { width: 28px; height: 28px; border-radius: 7px; background: #fff4e0; color: var(--warn); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.auto-main { flex: 1; min-width: 0; }
.auto-main .faint { font-size: 12.5px; }
.auto-builder .auto-sec { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.auto-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.auto-num { width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.auto-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.auto-step { width: 100%; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.auto-params { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.auto-params textarea, .auto-params input:not([type=checkbox]):not([type=number]) { flex: 1 1 260px; }
.auto-people { display: flex; flex-wrap: wrap; gap: 6px; }
.run-ok { color: var(--ok); font-weight: 600; } .run-bad { color: var(--danger); font-weight: 600; }

/* ---- Charts (dashboards + goals) ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --viz-grid: #eceae4; --viz-axis: #c3c2b7; --viz-muted: #898781; --viz-none: #b9bfc7;
  --st-good: #0ca30c; --st-good-ink: #006300; --st-warning: #fab219; --st-warning-ink: #8a5a00; --st-critical: #d03b3b; }
.viz-empty { color: var(--muted); font-size: 13px; margin: 8px 0; }
.viz-note { color: var(--faint); font-size: 11.5px; margin: 8px 0 0; }
.viz-bars { display: flex; flex-direction: column; gap: 2px; }
.viz-bar-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; align-items: center; gap: 10px; padding: 4px 4px; border-radius: 6px; outline: none; }
.viz-bar-row:hover, .viz-bar-row:focus-visible { background: var(--bg-hover); }
.viz-bar-row.click { cursor: pointer; }
.viz-bar-label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.viz-bar-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-bar-track { display: flex; align-items: center; gap: 6px; min-width: 0; }
.viz-bar { height: 14px; border-radius: 0 4px 4px 0; min-width: 0; flex: none; max-width: calc(100% - 44px); }
.viz-bar-val { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.viz-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.viz-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i.line { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.viz-plot { width: 100%; min-height: 200px; }
.viz-svg { display: block; overflow: visible; }
.viz-svg .grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-svg .base { stroke: var(--viz-axis); stroke-width: 1; }
.viz-svg .tick { fill: var(--viz-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-svg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-svg .dot { stroke: var(--bg); stroke-width: 2; }
.viz-svg .cross { stroke: var(--viz-axis); stroke-width: 1; }
.viz-tip { position: fixed; z-index: 400; display: none; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: 12px; pointer-events: none; min-width: 120px; }
.viz-tip-t { color: var(--muted); margin-bottom: 4px; }
.viz-tip-r { display: flex; align-items: center; gap: 8px; }
.viz-tip-r i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.viz-tip-r b { font-size: 13px; color: var(--ink); }
.viz-tip-r span { color: var(--muted); }
.viz-table-wrap { max-height: 280px; overflow: auto; }
.viz-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.viz-table th { font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 6px; position: sticky; top: 0; background: var(--bg); }
.viz-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.viz-stat-v { font-size: 34px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.viz-stat-l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.viz-delta { font-size: 12px; margin-top: 4px; color: var(--muted); }
.viz-delta.up { color: var(--st-good-ink); } .viz-delta.down { color: var(--danger); }
.viz-delta span { color: var(--faint); }
.viz-meter { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--c) 16%, var(--bg)); overflow: hidden; margin: 6px 0; }
.viz-meter i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.health { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.health.good { color: var(--st-good-ink); background: color-mix(in srgb, var(--st-good) 12%, var(--bg)); }
.health.warning { color: var(--st-warning-ink); background: color-mix(in srgb, var(--st-warning) 18%, var(--bg)); }
.health.critical { color: var(--st-critical); background: color-mix(in srgb, var(--st-critical) 10%, var(--bg)); }
.health.none { color: var(--muted); background: var(--bg-soft); }

/* ---- Dashboards ---- */
.dash-row, .goal-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.dash-row:last-child, .goal-row:last-child { border-bottom: 0; }
.dash-row:hover, .goal-row:hover { background: var(--bg-hover); }
.dash-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.dash-filters select { width: auto; max-width: 320px; }
.dash { background: var(--bg-soft); }
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 18px 20px 40px; transition: opacity .15s; }
.dash-grid.loading { opacity: .55; }
.widget { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; }
.widget header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-height: 26px; }
.widget header h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.widget-b { flex: 1; min-width: 0; }
.dash-tasks { display: flex; flex-direction: column; }
.dash-task { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: none; text-align: left; font: inherit; font-size: 13px; color: inherit; border-radius: 6px; cursor: pointer; text-decoration: none; min-width: 0; }
.dash-task:hover { background: var(--bg-hover); }
.dash-task .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-task .nm.done { text-decoration: line-through; color: var(--muted); }
.dash-task .ln { font-size: 11.5px; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.wp-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; font: inherit; color: inherit; }
.wp-item:hover { border-color: var(--brand); }
.wp-item > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.goal-sum { display: block; color: inherit; text-decoration: none; }
.goal-sum .pct, .pct { font-variant-numeric: tabular-nums; }
.goal-t { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; font-size: 12.5px; margin-top: 8px; }
.goal-t .viz-meter { grid-column: 1 / -1; height: 6px; margin: 3px 0 0; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid .widget { grid-column: span 2 !important; } .dash-grid .w-stat { grid-column: span 1 !important; } }
@media (max-width: 560px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; } .dash-grid .widget { grid-column: span 2 !important; } .dash-grid .w-stat { grid-column: span 1 !important; } .viz-stat-v { font-size: 28px; } }

/* ---- Goals ---- */
.goal-folder { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 18px 0 8px; }
.goal-sw { width: 10px; height: 28px; border-radius: 3px; flex: none; }
.goal-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goal-row-main .faint { font-size: 12px; }
.goal-row-meter { width: 160px; flex: none; }
.goal-hero { display: flex; gap: 20px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.goal-hero-v { font-size: 52px; font-weight: 600; line-height: 1; }
.goal-hero-m { flex: 1; min-width: 0; }
.goal-hero-m .viz-meter { height: 12px; border-radius: 6px; }
.card.target { margin-top: 10px; }
.target-tasks { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--line-2); padding-top: 6px; }
@media (max-width: 640px) { .goal-row-meter { display: none; } .goal-hero { flex-direction: column; align-items: flex-start; } }

/* ---- Sharing + integrations ---- */
.share-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.share-link input { flex: 1 1 240px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.share-meta { flex-basis: 100%; font-size: 12px; }
.hook { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.hook-new { margin-top: 12px; }

@media (max-width: 599px) { .g-namehead, .g-name { width: 150px; } .g-links { left: 150px; } .g-nodate { display: none; } }

/* ---- Favorites bar ---- */
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-col > .main { flex: 1; }
.favbar { flex: none; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-soft); min-width: 0; }
.fav-lead { color: #d4a106; display: inline-flex; flex: none; }
.fav-lead svg { fill: #f5c542; }
.fav-hint { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-strip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; align-items: center; }
.fav-strip::-webkit-scrollbar { display: none; }
.fav-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; flex: none; max-width: 220px; border: 1px solid transparent; }
.fav-chip:hover { background: var(--bg-hover); }
.fav-chip.active { background: var(--bg); border-color: var(--line); font-weight: 600; }
.fav-chip.done .fav-l { text-decoration: line-through; color: var(--muted); }
.fav-chip.dragging { opacity: .4; }
.fav-chip.drop { box-shadow: inset 2px 0 0 var(--brand); }
.fav-chip .fav-l { overflow: hidden; text-overflow: ellipsis; }
.fav-chip .list-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fav-space { width: 16px; height: 16px; border-radius: 4px; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fav-goal { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.fav-more { flex: none; width: 26px; height: 26px; }
.fav-star.on svg { fill: #f5c542; stroke: #d4a106; }
.fav-star.sm { width: 26px; height: 26px; }
@media (max-width: 700px) { .fav-hint { display: none; } .favbar.empty { display: none; } }
.dep-ctl { display: inline-flex; align-items: center; gap: 4px; }
.dep-ctl select { width: auto; min-height: 26px; padding: 2px 22px 2px 6px; font-size: 12px; }
.dep-ctl input { width: 48px; min-height: 26px; padding: 2px 4px; font-size: 12px; }
.dep-ro { font-size: 12px; }
.g-base { position: absolute; bottom: 3px; height: 4px; border-radius: 2px; background: #9aa3af; opacity: .75; z-index: 0; }
.g-base.slip { background: repeating-linear-gradient(45deg, #9aa3af 0 3px, transparent 3px 6px); opacity: .9; }

/* ---- Sidebar "More" ---- */
.nav-more { display: none; }
.nav-more.open { display: block; }
.nav-more-btn { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.nav-more-btn .chev { margin-left: auto; transition: transform .15s; }
.nav-more-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ---- People ---- */
.mtable.people td { vertical-align: middle; }
.wdays { display: inline-flex; gap: 2px; }
.wdays i { font-style: normal; width: 16px; height: 16px; border-radius: 3px; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-soft); color: var(--faint); }
.wdays i.on { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.wdays.edit .btn { width: 34px; justify-content: center; padding: 0; }
.off-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: #fff4e0; color: #8a5a00; border-radius: 6px; padding: 1px 4px 1px 8px; margin: 2px 4px 2px 0; }
.off-chip .btn-icon { width: 20px; height: 20px; }
.org ul { list-style: none; padding-left: 26px; margin: 0; border-left: 1px solid var(--line); }
.org > ul { border-left: 0; padding-left: 0; }
.org li { margin: 8px 0; position: relative; }
.org ul ul li::before { content: ''; position: absolute; left: -26px; top: 22px; width: 22px; border-top: 1px solid var(--line); }
.org-card { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: var(--bg); min-width: 220px; }
.org-card .faint { font-size: 12px; }

/* ---- Workload ---- */
.wl { padding: 14px 18px 30px; }
.wl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.wl-def { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0; }
.wl-def input { width: 60px; min-height: 28px; padding: 2px 6px; }
.wl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.wl-grid { display: grid; min-width: max-content; }
.wl-h { font-size: 11.5px; color: var(--muted); text-align: center; padding: 6px 2px; border-bottom: 1px solid var(--line); background: var(--bg-soft); position: sticky; top: 0; }
.wl-h.today { color: var(--brand); font-weight: 700; }
.wl-h.we { background: #f1f2f4; }
.wl-name { position: sticky; left: 0; z-index: 2; background: var(--bg); border-right: 1px solid var(--line); text-align: left; padding: 6px 10px; }
.wl-person { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line-2); min-width: 0; }
.wl-person b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-cell { position: relative; border: 0; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); background: var(--bg); font: inherit; font-size: 12px; color: var(--ink-2); padding: 8px 2px 12px; cursor: pointer; min-height: 46px; font-variant-numeric: tabular-nums; }
.wl-cell:hover { background: var(--bg-hover); }
.wl-cell.nocap { background: repeating-linear-gradient(45deg, var(--bg-soft) 0 4px, var(--bg) 4px 8px); cursor: default; }
.wl-cell.off { background: repeating-linear-gradient(45deg, #fff4e0 0 4px, var(--bg) 4px 8px); }
.wl-cell.over { color: var(--st-critical); font-weight: 700; }
.wl-v { display: inline-flex; align-items: center; gap: 3px; }
.wl-off { font-size: 10.5px; color: #8a5a00; }
.wl-fill { position: absolute; left: 6px; bottom: 5px; height: 4px; max-width: calc(100% - 12px); border-radius: 2px; background: var(--series-1); }
.wl-cell.over .wl-fill { background: var(--st-critical); width: calc(100% - 12px) !important; }
.wl-over-t { color: var(--st-critical); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }

/* ---- Portfolio ---- */
.mtable.portfolio th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.proj-st { display: inline-flex; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg-soft); white-space: nowrap; }
.proj-st.on_track, .proj-st.complete { color: var(--st-good-ink); background: color-mix(in srgb, var(--st-good) 12%, var(--bg)); }
.proj-st.at_risk { color: var(--st-warning-ink); background: color-mix(in srgb, var(--st-warning) 18%, var(--bg)); }
.proj-st.off_track { color: var(--st-critical); background: color-mix(in srgb, var(--st-critical) 10%, var(--bg)); }

/* ---- My Tasks ---- */
.mt-sec { margin-bottom: 18px; }
.mt-h { display: flex; align-items: center; gap: 8px; background: none; border: 0; font: inherit; padding: 6px 0; cursor: pointer; color: var(--ink); width: 100%; text-align: left; }
.mt-h.static { cursor: default; }
.mt-h .count { font-size: 12px; color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 0 8px; }
.mt-h svg.open { transform: rotate(90deg); }
.mt-sec.overdue .mt-h b { color: var(--danger); }
.mt-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.mt-task, .mt-rem, .mt-cmt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; font-size: 13.5px; min-width: 0; }
.mt-task:last-child, .mt-rem:last-child, .mt-cmt:last-child { border-bottom: 0; }
.mt-task:hover { background: var(--bg-hover); }
.mt-task .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-list-name { font-size: 12px; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-cmt { flex-direction: column; align-items: stretch; }
.mt-cmt .md { font-size: 13px; }
.mt-rem.due { background: #fff8ec; }
.cmt-assign { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--info); background: #eef4ff; border-radius: 6px; padding: 2px 4px 2px 8px; margin: 4px 0; }
.cmt-assign.done { color: var(--st-good-ink); background: #eaf7ea; }
.inbox-f { width: auto; min-height: 30px; padding: 2px 26px 2px 8px; font-size: 12.5px; }

/* ---- Chat extras ---- */
.chat-compose-wrap { flex: none; }
.chat-also { margin: -4px 14px 8px; font-size: 12.5px; }
.chat-sched { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 4px 14px; }
.chat-sched-i { display: inline-flex; align-items: center; gap: 2px; background: var(--bg-soft); border-radius: 6px; padding: 0 2px 0 6px; }
.chat-thread-ref { background: none; border: 0; padding: 0; font: inherit; font-size: 11.5px; color: var(--info); cursor: pointer; }
.form-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; }
.form-cond select, .form-cond input { width: auto; min-height: 28px; padding: 2px 24px 2px 6px; font-size: 12.5px; }
.viz-bar.thin { height: 8px; }
.viz-bars.pair .viz-bar-track { margin: 1px 0; }
.viz-legend i.box { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ask-box { display: flex; align-items: center; gap: 6px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 6px 8px; margin-bottom: 10px; }
.ask-box input { flex: 1; min-width: 0; min-height: 30px; background: var(--bg); }
.ask-ic { color: var(--brand); display: inline-flex; }
.ext-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 50vh; overflow: auto; }
.ext-row { display: grid; grid-template-columns: auto 1fr 170px 150px; gap: 8px; align-items: start; padding: 6px; border: 1px solid var(--line-2); border-radius: 8px; }
.ext-row.off { opacity: .5; }
.ext-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.standup { max-height: 60vh; overflow: auto; }
@media (max-width: 640px) { .ext-row { grid-template-columns: auto 1fr; } }

/* ---- Extras ---- */
.btn.mic.on { color: #fff; background: var(--danger); border-color: var(--danger); animation: timerPulse 1.4s ease-in-out infinite; }
.steps-ol { padding-left: 20px; } .steps-ol li { margin-bottom: 12px; }
.totp-key { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 15px; letter-spacing: .06em; background: var(--bg-soft); padding: 8px 10px; border-radius: 8px; flex-wrap: wrap; }
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-size: 15px; }
.backup-codes code { background: var(--bg-soft); padding: 6px 10px; border-radius: 6px; text-align: center; }
.csv-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.csv-col { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.csv-col b, .csv-col .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 4px 0 20px; }
.ym-h { background: none; border: 0; font: inherit; font-weight: 700; font-size: 13.5px; padding: 2px 0 6px; cursor: pointer; color: var(--ink); }
.ym-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ym-dow { font-size: 10px; color: var(--faint); text-align: center; }
.ym-d { border: 0; background: none; font: inherit; font-size: 11.5px; height: 26px; border-radius: 5px; cursor: pointer; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ym-d:hover { background: var(--bg-hover); }
.ym-d.has { background: rgba(42, 120, 214, var(--a)); color: var(--ink); font-weight: 600; }
.ym-d.today { box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- Truncation: text that reaches the edge of its field or container ends in "..." (full text on hover) ---------- */
.tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.i, .av, .status-dot, .list-dot, .space-av, .chk { flex: none; }
.btn, .nav-item, .mi, .tab, .pill, .status-pill, .tag, .fav-chip { min-width: 0; max-width: 100%; }
.btn:not(.btn-icon), .nav-item, .mi, .tab, .pill, .tag { overflow: hidden; }
.pill, .tag { max-width: 240px; }
.tab { max-width: 240px; flex: none; }
.row > *, .toolbar > *, .topbar > *, .tp-top > *, .cmt-h > *, .fld .v > *, .mi > *, .widget header > * { min-width: 0; }
.row > span:not(.av):not(.status-dot):not(.pill):not(.tag):not(.spacer), .row > b, .row > a:not(.btn), .fld .v > span:not(.av):not(.tag),
.cmt-h > b, .mi > span:not(.chk):not(.tx), .mi .row > span:not(.av):not(.pill) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { overflow: hidden; }
.crumbs a, .crumbs > span:not(.sep) { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.crumbs .sep, .crumbs svg, .crumbs .space-av, .crumbs .list-dot { flex: none; }
.crumbs .here { max-width: none; }
.tp-top .crumbs { flex: 0 1 auto; }
input, select { text-overflow: ellipsis; }
.page h1, .settings-body h1, .card h3, .widget header h3, .modal-h h3, .goal-hero h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtable td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtable td .row { flex-wrap: nowrap; }
.bcard .t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bcard .where, .tpl-card h3, .tpl-opt b, .tpl-opt small, .goal-row-main > *, .app-card .t, .nrow .txt .t, .chat-head b, .doc-tree .label, .share-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md, .cmt .md, .chat-msg .md, .desc { overflow-wrap: anywhere; }
.access-sel { max-width: 200px; }

/* Permissions settings */
.perm-matrix th { white-space: normal; vertical-align: bottom; min-width: 96px; }
.perm-matrix td { white-space: nowrap; }
.perm-matrix .pm-head { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink-2); max-width: 150px; }
.perm-matrix .pm-head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.perm-matrix .pm-cell { text-align: center; }
.pm-yes { color: #1a7f37; display: inline-flex; }
.pm-no { color: var(--faint); }
.perm-switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; margin-top: 10px; }
.perm-sw { gap: 10px; font-size: 13px; }
.share-row { padding: 6px 0; border-bottom: 1px solid var(--line-2); gap: 8px; }
.tbl-wrap:has(> .perm-matrix) { overflow-x: auto; }
.settings-body, .page, .widget, .card { min-width: 0; }
.fav-chip { max-width: 220px; }
.perm-matrix th { min-width: 72px; }
.perm-matrix td:first-child, .perm-matrix th:first-child { max-width: 220px; width: 220px; }
.perm-sw .switch { margin-left: 0; }
select { max-width: 100%; }
.topbar select, .toolbar select, .row select, .inbox-f { max-width: 220px; }
.topbar .crumbs { min-width: 48px; }
.topbar .btn, .toolbar .btn { flex-shrink: 0; max-width: 220px; }

/* ---------- Subfolders, icon library, task types, create menu ---------- */
.tchildren .tchildren { padding-left: 14px; }
.tnode.drop-into { background: var(--brand-50); box-shadow: inset 0 0 0 1.5px var(--focus); }
.space-av svg.i { width: 13px; height: 13px; stroke: #fff; }
.side-top { display: flex; align-items: center; gap: 4px; margin: 10px 10px 6px; }
.side-top .side-search { margin: 0; flex: 1; min-width: 0; }
.side-create { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); flex: none; }
.side-create:hover { color: var(--brand); border-color: var(--brand-100); }
.mi-more { margin-left: auto; color: var(--faint); display: inline-flex; }
.ipk-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 236px; overflow-y: auto; margin-top: 8px; }
.ipk-i { width: 34px; height: 34px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.ipk-i:hover { background: var(--bg-hover); }
.ipk-i.on { background: var(--brand-50); box-shadow: inset 0 0 0 1.5px var(--brand-100); }
.ipk-i svg.i { width: 18px; height: 18px; }
.ipk-sw { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ipk-c { width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.ipk-c.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink-2); }
.ipk-c.none { background: linear-gradient(135deg, #fff 45%, var(--danger) 45%, var(--danger) 55%, #fff 55%); border: 1px solid var(--line); }
.ttype-ic { display: inline-flex; align-items: center; flex: none; margin-right: 4px; color: var(--muted); }
.tname .ttype-ic { margin-right: 0; }
.bcard .t .ttype-ic { vertical-align: -2px; }
.tp-type { gap: 6px; }
.tp-nav .btn-icon { width: 24px; height: 24px; }
.tp-created { font-size: 12px; white-space: nowrap; }
.tp-fields.hide-empty .fld-empty { display: none; }
.tp-empties { margin: -4px 0 10px; color: var(--muted); }
.merge-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.merge-res { max-height: 260px; overflow-y: auto; }
.row > .switch:first-child { margin-left: 0; }

/* ---------- Whiteboards ---------- */
.wb { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.wb.embedded { height: 100%; }
.content.wb-host { overflow: hidden; display: flex; flex-direction: column; }
.wb-top { height: var(--top-h); display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: none; background: var(--bg); z-index: 3; }
.wb.embedded .wb-top { height: 44px; }
.wb-title { border: 0 !important; box-shadow: none !important; font-weight: 700; font-size: 15px; padding: 4px 6px; min-height: 0; width: auto; max-width: 360px; background: transparent; border-radius: 6px; }
.wb-title:hover, .wb-title:focus { background: var(--bg-hover); }
.wb-loc { font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-people { display: inline-flex; align-items: center; gap: 2px; }
.wb-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fbfbfc; }
.wb-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; font-family: var(--font); }
.wb-el { cursor: default; }
.wb-el.locked { cursor: not-allowed; }
.wb-el .hit { pointer-events: stroke; }
.wb-el.t-text .hit, .wb-el.t-sticky rect, .wb-el.t-frame rect { pointer-events: all; }
.wb-txt { width: 100%; height: 100%; display: flex; align-items: center; overflow: hidden; line-height: 1.3; font-family: var(--font); box-sizing: border-box; word-break: break-word; }
.wb-txt.top { align-items: flex-start; }
.wb-txt.single { align-items: flex-end; white-space: nowrap; text-overflow: ellipsis; }
.wb-txt-in { width: 100%; white-space: pre-wrap; outline: none; min-height: 1.3em; overflow: hidden; }
.wb-txt.single .wb-txt-in { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-txt-in[contenteditable] { cursor: text; background: rgba(255,255,255,.35); border-radius: 3px; overflow: auto; max-height: 100%; }
.wb-card { width: 100%; height: 100%; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm); font-family: var(--font); font-size: 13px; overflow: hidden; }
.wb-card-st { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.wb-card-t { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wb-card-t.done { text-decoration: line-through; color: var(--muted); }
.wb-card.doc { border-left: 4px solid var(--focus); }
.wb-card-ex { font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wb-selbox { fill: none; stroke: var(--focus); pointer-events: none; }
.wb-marquee { fill: rgba(31,111,235,.07); stroke: var(--focus); }
.wb-target { fill: none; stroke: #1a7f37; pointer-events: none; }
.wb-h { fill: #fff; stroke: var(--focus); cursor: pointer; }
.wb-h.r-nw, .wb-h.r-se { cursor: nwse-resize; } .wb-h.r-ne, .wb-h.r-sw { cursor: nesw-resize; }
.wb-dot { fill: var(--focus); stroke: #fff; cursor: crosshair; opacity: .85; }
.wb-dot:hover { opacity: 1; }
.wb-dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px; box-shadow: var(--shadow); z-index: 4; }
.wb-tool { position: relative; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.wb-tool:hover { background: var(--bg-hover); }
.wb-tool.on { background: var(--brand-50); color: var(--brand); }
.wb-tool:disabled { opacity: .35; cursor: default; background: none; }
.wb-tool svg.i { width: 20px; height: 20px; }
.wb-tool.ai { color: var(--brand); }
.wb-tool .k { position: absolute; right: 4px; bottom: 2px; font-size: 9px; font-weight: 700; color: var(--faint); }
.wb-sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.wb-zoom { position: absolute; left: 14px; bottom: 16px; display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; box-shadow: var(--shadow-sm); z-index: 4; }
.wb-zoom .btn-icon { width: 28px; height: 28px; }
.wb-pct { min-width: 54px; justify-content: center; font-variant-numeric: tabular-nums; }
.wb-mini { position: absolute; left: 14px; bottom: 60px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: var(--shadow-sm); z-index: 4; cursor: pointer; }
.wb-mini.hidden { display: none; }
.wb-mini svg { display: block; }
.wb-mini-vp { fill: rgba(31,111,235,.08); stroke: var(--focus); stroke-width: 1.5; }
.wb-float { position: absolute; z-index: 5; display: flex; align-items: center; gap: 1px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); white-space: nowrap; }
.wb-float.hidden { display: none; }
.wb-fb { height: 30px; min-width: 30px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--ink-2); font: 600 12px var(--font); padding: 0 6px; }
.wb-fb:hover { background: var(--bg-hover); }
.wb-fb.on { background: var(--brand-50); color: var(--brand); }
.wb-fsep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.wb-sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.wb-sw.ring { background: #fff; border-width: 3px; }
.wb-a { font-weight: 800; font-size: 14px; border-bottom: 3px solid; line-height: 1; padding: 0 2px 1px; }
.wb-fs { font-weight: 700; font-size: 12px; min-width: 16px; }
.wb-colors { display: grid; grid-template-columns: repeat(6, 26px); gap: 4px; padding: 2px; }
.wb-c { width: 26px; height: 26px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.wb-c:hover, .wb-c.on { background: var(--bg-hover); box-shadow: inset 0 0 0 1.5px var(--focus); }
.wb-c .wb-sw { width: 18px; height: 18px; }
.wb-cursors { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.wb-cur { position: absolute; display: flex; align-items: flex-start; gap: 2px; color: var(--c); transition: left .9s linear, top .9s linear; }
.wb-cur svg.i { fill: var(--c); stroke: #fff; width: 16px; height: 16px; }
.wb-cur span { background: var(--c); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-top: 12px; }
.wb-pick-res { max-height: 280px; overflow-y: auto; }
.wb-tpl-row { margin-bottom: 18px; }
.wb-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wb-tpl { display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; min-width: 0; }
.wb-tpl:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.wb-tpl > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.wb-tpl b { font-size: 13px; } .wb-tpl small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-tpl-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.wb-table tr:not(:first-child) { cursor: pointer; }
.wb-table tr:not(:first-child):hover { background: var(--bg-soft); }
.space-av.emoji { background: var(--bg-soft); border: 1px solid var(--line); font-size: 12px; font-weight: 400; }

/* Resizable sidebar */
.app { position: relative; }
.side-handle { position: absolute; top: 0; bottom: 0; left: calc(var(--side-w) - 3px); width: 7px; cursor: col-resize; z-index: 30; touch-action: none; }
.side-handle::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .12s, width .12s; }
.side-handle:hover::after, .side-handle:focus-visible::after, .app.side-resizing .side-handle::after { background: var(--focus); width: 3px; left: 2px; }
.app.side-resizing, .app.side-resizing * { cursor: col-resize !important; user-select: none !important; }
.app.side-collapsed { grid-template-columns: 0 1fr; }
.app.side-collapsed .side { visibility: hidden; overflow: hidden; border-right: 0; }
.app.side-collapsed .side-handle { left: 0; }
.side-expand { display: none; position: absolute; left: 6px; top: 6px; z-index: 31; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.app.side-collapsed .side-expand { display: inline-flex; }
@media (max-width: 980px) { .side-handle, .side-expand { display: none !important; } .app.side-collapsed .side { visibility: visible; } }
.app.side-collapsed .favbar { padding-left: 44px; }
@media (max-width: 980px) { .app.side-collapsed { grid-template-columns: 1fr; } .app.side-collapsed .favbar { padding-left: revert; } }

/* ---------- Customizable Home (and dashboard edit mode) ---------- */
.content.dash.home .dash-grid { width: 100%; }
.dash-grid.editing .widget { outline: 1.5px dashed var(--line); outline-offset: -1px; cursor: grab; }
.dash-grid.editing .widget:hover { outline-color: var(--focus); }
.dash-grid .widget.dragging { opacity: .4; }
.dash-grid .widget.drop-before { box-shadow: -4px 0 0 var(--focus); }
.dash-grid .widget.drop-after { box-shadow: 4px 0 0 var(--focus); }
.dash-grid.editing .widget-b { pointer-events: none; }
.wp-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 8px; }
.agenda { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.ag-day .ag-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 2px; border-bottom: 1px solid var(--line-2); }
.ag-day.today .ag-h b { color: var(--brand); }
.ag-day.overdue .ag-h b { color: var(--danger); }
.ag-day.ag-none .ag-h { color: var(--faint); border-bottom-style: dashed; }
.ag-day.ag-none .ag-h b { font-weight: 500; }
.inbox-i.unread .nm b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: 1px; }
.dash-task.due { color: var(--danger); }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.fav-tile { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13px; min-width: 0; }
.fav-tile:hover { background: var(--bg-hover); text-decoration: none; }
.fav-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-quick_add input { width: 100%; }
.qa-done { display: flex; flex-direction: column; margin-top: 6px; }
@media (max-width: 980px) {
  .dash-grid .widget.span-1:not(.w-stat) { grid-column: span 1 !important; }
}
@media (max-width: 700px) {
  .hide-sm { display: none; }
  .dash-filters { flex-wrap: wrap; }
  .dash-grid .widget:not(.w-stat), .dash-grid .widget.span-1:not(.w-stat) { grid-column: 1 / -1 !important; }
  .agenda { max-height: none; }
}
@media (max-width: 560px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; padding: 12px; gap: 10px; }
  .dash-grid .w-stat { grid-column: span 1 !important; }
  .dash-grid .widget:not(.w-stat), .dash-grid .widget.span-1:not(.w-stat) { grid-column: 1 / -1 !important; }
  .dash-grid .w-stat .viz-stat-v { font-size: 26px; }
  .topbar .crumbs .here { font-size: 14px; }
}
a.dash-task { text-decoration: none; }

/* ---------- Sprints ---------- */
.sp-dates { font-size: 10.5px; color: var(--faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.sp-dates.active { color: var(--brand); font-weight: 600; }
.sp-dates.done { text-decoration: line-through; }
.sp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); display: inline-block; }
.tnode:hover .sp-dates { display: none; }
.sp-state { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg-hover); color: var(--muted); white-space: nowrap; flex: none; }
.sp-state.st-active { background: var(--brand-50); color: var(--brand); }
.sp-state.st-done { background: #dafbe1; color: #1a7f37; }
.sprint-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); background: var(--bg-soft); font-size: 13px; flex: none; flex-wrap: wrap; }
.sprint-bar .sp-bar-meter { width: 140px; }
.sprint-bar .viz-meter { margin: 0; }
.pts-pill, .pts { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--bg-hover); color: var(--ink-2); font-size: 11px; font-weight: 700; }
.pts { background: none; font-weight: 600; font-size: 12.5px; }
.g-pts { font-size: 12px; margin-left: 4px; }
.sp-sum { display: flex; flex-direction: column; gap: 8px; }
.sp-sum .row { flex-wrap: wrap; }
.sp-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sp-nums > div { display: flex; flex-direction: column; }
.sp-nums b { font-size: 22px; font-weight: 700; }
.sp-nums span { font-size: 12px; color: var(--muted); }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sp-grid .sp-list { grid-column: 1 / -1; }
.sp-rows { display: flex; flex-direction: column; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(80px, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line-2); }
.sp-row.done { opacity: .75; }
.sp-row.active { background: var(--brand-50); border-radius: 8px; }
.sp-name { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.sp-name b, .sp-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-n { font-size: 12.5px; white-space: nowrap; }
.sp-acts { display: flex; gap: 4px; justify-content: flex-end; }
@media (max-width: 800px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .sp-row .sp-meter, .sp-row .sp-acts { display: none; }
  .sprint-bar .sp-bar-meter { width: 80px; }
}

/* Wide screens: the main area uses the full width; table cells can show more before truncating. */
@media (min-width: 1600px) { .mtable td { max-width: 560px; } .tbl th, .tbl td { max-width: 520px; } }

/* ---------- Mail (Outlook-style client over the member's own mailbox) ---------- */
.mail-top .mail-search { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; height: 34px; color: var(--muted); }
.mail-top .mail-search input { border: 0; background: transparent; min-height: 0; height: 30px; padding: 0; flex: 1; min-width: 0; box-shadow: none; }
.mail-ribbon { display: flex; align-items: center; gap: 2px; padding: 6px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; scrollbar-width: thin; }
.mail-ribbon:empty { display: none; }
.mail-ribbon .rb { border-color: transparent; background: transparent; white-space: nowrap; flex: none; }
.mail-ribbon .rb:hover:not(:disabled) { background: var(--bg-hover); }
.mail-ribbon .rb.btn-primary { background: var(--brand); color: #fff; }
.mail-ribbon .rb:disabled { opacity: .45; }
.mail-ribbon .rb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; flex: none; }
@media (max-width: 1700px) { .mail-ribbon .rb:not(.btn-primary):not(.keep) .rb-l { display: none; } }
@media (max-width: 1100px) { .mail-ribbon .rb.keep .rb-l { display: none; } }
.content.mail { display: grid; grid-template-columns: 230px minmax(320px, 420px) minmax(0, 1fr); overflow: hidden; }
.content.mail.pane-bottom { grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: minmax(180px, 42%) minmax(0, 1fr); }
.content.mail.pane-bottom .mail-folders { grid-row: 1 / 3; }
.content.mail.pane-bottom .mail-list { border-right: 0; border-bottom: 1px solid var(--line); }
.content.mail.pane-off { grid-template-columns: 230px minmax(0, 1fr); }
.content.mail.pane-off .mail-read { display: none; }
.content.mail.pane-off.reading .mail-list { display: none; }
.content.mail.pane-off.reading .mail-read { display: flex; }
.content.mail.mail-empty { grid-template-columns: 1fr; }
.content.mail.mail-empty .mail-folders, .content.mail.mail-empty .mail-list { display: none; }
body:has(.content.mail) .gb-fab { display: none; }
.mail-folders { border-right: 1px solid var(--line); background: var(--bg-side); overflow: auto; padding: 10px 8px 20px; min-width: 0; }
.mail-acct { display: flex; align-items: center; gap: 6px; padding: 6px 6px; font-weight: 700; font-size: 12.5px; color: var(--ink); cursor: pointer; border-radius: 6px; min-width: 0; margin-top: 4px; }
.mail-acct:hover { background: var(--bg-hover); }
.mail-acct:not(.cur) { font-weight: 600; color: var(--ink-2); }
.mail-acct .count { font-size: 12px; color: var(--brand); font-weight: 700; }
.mail-acct .label, .mail-f .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-f { display: flex; align-items: center; gap: 6px; height: 30px; padding-right: 4px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink-2); min-width: 0; position: relative; }
.mail-f:hover { background: var(--bg-hover); }
.mail-f.active { background: var(--sel); color: var(--ink); font-weight: 600; }
.mail-f.drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.mail-f.has-unread .label, .mail-f.has-unread .count { font-weight: 700; color: var(--ink); }
.mail-f .caret { width: 14px; display: inline-grid; place-items: center; color: var(--faint); flex: none; }
.mail-f .count { font-size: 12px; color: var(--brand); font-weight: 700; }
.mail-f .acts { display: none; width: 22px; height: 22px; }
.mail-f:hover .acts { display: inline-flex; }
.mail-f:hover .count { display: none; }
.mail-f.faint { color: var(--muted); }
.mail-manage { margin-top: 10px; text-decoration: none; }
.mail-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.mail-lh { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 46px; flex: none; }
.mail-lt { font-weight: 700; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-lh .btn.on { background: var(--sel); border-color: var(--sel); }
.mail-tabs { display: flex; gap: 14px; }
.mail-tab { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.mail-tab.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--brand); }
.mail-scope { display: flex; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.mail-scope .btn.on { background: var(--sel); }
.mail-check { display: inline-grid; place-items: center; width: 18px; flex: none; margin: 0; }
.mail-check input { width: 15px; height: 15px; min-height: 0; margin: 0; }
.mail-rows { flex: 1; overflow: auto; min-height: 0; }
.mail-grp { position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 8px 14px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.mail-row { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line-2, var(--line)); cursor: pointer; min-width: 0; }
.mail-row:hover { background: var(--bg-hover); }
.mail-row.cur { background: var(--sel); }
.mail-row.sel { background: var(--brand-50); }
.mail-row.unread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.mail-row .mail-check { margin-top: 7px; visibility: hidden; }
.mail-row:hover .mail-check, .mail-row.sel .mail-check, .mail-list:has(.mail-row.sel) .mail-row .mail-check { visibility: visible; }
.mail-av { width: 32px; height: 32px; font-size: 12px; border: 0; flex: none; }
.mail-av.lg { width: 40px; height: 40px; font-size: 14px; }
.mail-av.sm { width: 24px; height: 24px; font-size: 10px; }
.mail-rb { flex: 1; min-width: 0; }
.mail-r1, .mail-r2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mail-from { font-size: 14px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { font-weight: 700; }
.mail-row.unread .mail-subj { color: var(--brand-600); }
.mail-time { font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
.mail-subj { font-size: 13px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-r3 { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mail-due { display: flex; align-items: center; gap: 4px; color: var(--danger); }
.mail-n { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg-hover); border-radius: 999px; padding: 0 6px; }
.mail-draft { color: var(--danger); font-weight: 700; font-size: 13px; }
.mail-imp { color: var(--danger); font-weight: 900; font-size: 14px; line-height: 1; }
.mail-cat { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); border: 1px solid color-mix(in srgb, var(--c) 40%, #fff); white-space: nowrap; flex: none; }
.mail-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.mail-hover { position: absolute; right: 8px; top: 30px; display: none; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px; box-shadow: var(--shadow-sm); }
.mail-row:hover .mail-hover { display: flex; }
.mail-hover .btn { width: 26px; height: 26px; }
.mail-hover .btn.on, .mail-flag { color: var(--danger); }
.mail-flag { display: inline-flex; }
.dens-compact .mail-row { padding-top: 5px; padding-bottom: 5px; }
.dens-compact .mail-av { width: 24px; height: 24px; font-size: 10px; }
.dens-compact .mail-r3 { display: none; }
.dens-compact .mail-hover { top: 3px; }
.mail-note { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.mail-note.big { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: auto; padding: 60px 20px; }
.mail-note.big > .ic { width: 40px; height: 40px; color: var(--faint); }
.mail-read { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; background: var(--bg-soft); }
.mail-rh { display: flex; align-items: center; gap: 8px; padding: 14px 20px 10px; flex-wrap: wrap; }
.mail-rsubj { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mail-back { display: none; }
.mail-stack { padding: 0 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.mail-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; min-width: 0; }
.mail-card:not(.open) { padding: 8px 16px; }
.mail-ch { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 0; }
.mail-chb { flex: 1; min-width: 0; }
.mail-chn { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-cht { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-chr { display: flex; align-items: center; gap: 4px; flex: none; }
.mail-cc { font-size: 12.5px; margin: 6px 0 0 52px; }
.mail-frame { width: 100%; border: 0; display: block; margin-top: 12px; min-height: 60px; background: #fff; }
.mail-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 7px 10px; border-radius: 6px; background: #fff8e1; border: 1px solid #f3e1a7; font-size: 12.5px; color: #6b5300; }
.mail-banner.soft { background: var(--bg-soft); border-color: var(--line); color: var(--muted); }
.mail-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mail-att { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: 12.5px; max-width: 280px; min-width: 0; background: var(--bg); }
.mail-attn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.mail-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-onboard { margin: auto; max-width: 440px; text-align: center; padding: 60px 20px; }
.mail-onboard-ic { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--brand-50); color: var(--brand); }
.mail-onboard-ic .ic { width: 30px; height: 30px; }
/* compose */
.mail-compose { display: flex; flex-direction: column; background: var(--bg); min-height: 100%; }
.mail-ctop { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; background: var(--bg); z-index: 2; }
.mail-ctop .btn.on { background: var(--sel); }
.mail-sendgrp { display: inline-flex; }
.mail-sendgrp .btn-primary:first-child { border-radius: 6px 0 0 6px; }
.mail-split { border-radius: 0 6px 6px 0; padding: 0 6px; border-left: 1px solid rgba(255, 255, 255, .35); }
.mail-saved { font-size: 12px; white-space: nowrap; }
.mail-fields { padding: 4px 16px 0; }
.mail-fromrow, .mail-addr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 40px; border-bottom: 1px solid var(--line); padding: 4px 0; font-size: 13px; }
.mail-fromrow .btn.link { border: 0; background: none; color: var(--muted); }
.mail-from-sel { width: auto; min-height: 30px; }
.mail-addr-l { width: 44px; color: var(--muted); font-size: 13px; flex: none; }
.mail-addr input { border: 0; box-shadow: none; flex: 1; min-width: 140px; min-height: 28px; padding: 2px 4px; background: transparent; }
.mail-chip { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 2px 0 8px; font-size: 13px; background: var(--brand-50); border-radius: 999px; max-width: 280px; }
.mail-chip.bad { background: #fde8e8; color: var(--danger); }
.mail-chip .x { border: 0; background: none; cursor: pointer; display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--muted); border-radius: 50%; }
.mail-chip .x:hover { background: rgba(0, 0, 0, .08); }
.mail-subj-in { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; font-size: 15px; font-weight: 600; min-height: 44px; padding: 4px 0; width: 100%; }
.mail-fmt { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.mail-fmt .btn-icon { width: 30px; height: 30px; }
.mail-fsel { width: auto; min-height: 30px; height: 30px; padding: 2px 6px; font-size: 12.5px; margin-right: 4px; }
.mail-color { width: 30px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; min-height: 0; margin: 0 2px; cursor: pointer; }
.mail-cbody { padding: 12px 16px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.mail-editor { min-height: 220px; outline: none; font: 11pt/1.45 "Open Sans", Calibri, Arial, sans-serif; color: #1f2328; overflow-wrap: anywhere; }
.mail-editor.small { min-height: 110px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.mail-editor img { max-width: 100%; }
.mail-editor blockquote { margin: 0 0 0 .8ex; border-left: 2px solid #d0d7de; padding-left: 1ex; }
.mail-compose .mail-atts { padding: 0 16px 16px; margin: 0; }
.mail-orig { border-top: 1px dashed var(--line); padding-top: 8px; }
.mail-orig .mail-frame { opacity: .85; }
.mail-sug .mi { gap: 8px; }
.mail-sug .mi.hl { background: var(--bg-hover); }
.mail-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-swc { width: 26px; height: 26px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.mail-swc.on { border-color: var(--ink); }
/* settings */
.modal.mail-set { max-width: 920px; width: 96vw; }
.mail-set-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; min-height: 420px; }
.mail-set-side { border-right: 1px solid var(--line); padding-right: 10px; }
.mail-set-body { min-width: 0; }
.mail-set-body h3 { margin: 18px 0 8px; font-size: 15px; }
.mail-set-body h3:first-child { margin-top: 0; }
.mail-set-row { gap: 10px; margin: 6px 0; }
.mail-set-row .switch { margin-left: 0; }
.mail-ftoggle { display: none; }
@media (max-width: 1100px) {
  .content.mail { grid-template-columns: 200px minmax(280px, 360px) minmax(0, 1fr); }
}
@media (min-width: 769px) and (max-width: 980px) {
  .content.mail, .content.mail.pane-off { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .content.mail.pane-bottom { grid-template-columns: minmax(0, 1fr); }
  .content.mail.pane-bottom .mail-folders { grid-row: auto; }
  .mail-folders { display: none; position: fixed; inset: var(--top-h) auto 0 0; width: 260px; z-index: 40; box-shadow: var(--shadow); }
  .content.mail.show-folders .mail-folders { display: block; }
  .mail-ftoggle { display: inline-flex; }
}
@media (max-width: 768px) {
  .content.mail, .content.mail.pane-bottom, .content.mail.pane-off { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .mail-folders { display: none; position: fixed; inset: var(--top-h) auto 0 0; width: 260px; z-index: 40; box-shadow: var(--shadow); }
  .content.mail.show-folders .mail-folders { display: block; }
  .mail-ftoggle { display: inline-flex; }
  .content.mail .mail-read { display: none; }
  .content.mail.reading .mail-list { display: none; }
  .content.mail.reading .mail-read { display: flex; grid-row: 1; }
  .content.mail.pane-bottom .mail-list { border-bottom: 0; }
  .mail-back { display: inline-flex; }
  .mail-top .mail-search { max-width: none; }
  .mail-rh, .mail-stack { padding-left: 12px; padding-right: 12px; }
  .mail-card { padding: 10px 12px; }
  .mail-cc { margin-left: 0; }
  .mail-chr .faint { display: none; }
  .mail-ctop { padding: 8px 10px; }
  .mail-ctop .btn-sm .tx { display: none; }
  .mail-set-grid { grid-template-columns: 1fr; }
  .mail-set-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px; }
  .mail-set-side .mail-f { height: 30px; padding: 0 8px; }
}

/* ---------- Customizable menu: More grid, drag to pin, poof to remove ---------- */
.nav-more-btn { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.nav-more-n { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 700; }
.nav-item.peek { opacity: .8; }
.nav-item.nav-dragging, .nav-tile.nav-dragging { opacity: .35; }
body.nav-drag-on, body.nav-drag-on * { cursor: grabbing !important; user-select: none !important; }
.nav-more-pop { padding: 4px; }
.nav-more-h { display: flex; align-items: center; padding: 2px 4px 8px; }
.nav-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.nav-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; border: 1px solid transparent; touch-action: none; }
.nav-tile:hover { background: var(--bg-hover); text-decoration: none; }
.nav-tile.active { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand); }
.nav-tile-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); }
.nav-tile.active .nav-tile-ic { color: var(--brand); }
.nav-tile-l { font-size: 12px; font-weight: 600; text-align: center; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-more-tip { font-size: 11.5px; padding: 8px 4px 2px; }
.side .nav .nav-item[data-key]:not(.peek) { touch-action: pan-y; }
.nav-ghost { position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 13px; color: var(--ink); transition: opacity .12s, filter .12s; }
.nav-ghost.bye { opacity: .6; filter: grayscale(1); }
.nav-drop-line { position: fixed; height: 2px; background: var(--brand); border-radius: 2px; z-index: 2999; pointer-events: none; }
.poof { position: fixed; z-index: 3001; pointer-events: none; width: 0; height: 0; }
.poof span { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, rgba(160, 166, 175, .9), rgba(160, 166, 175, 0) 70%); animation: poof .55s ease-out forwards; }
@keyframes poof { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.8); opacity: 0; } }

/* Gabriel: conversation names, list, regenerate */
.gb-title-wrap { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.gb-title-wrap b { font-size: 13px; }
.gb-title { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; color: var(--muted); text-align: left; cursor: text; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-title:hover { color: var(--ink); text-decoration: underline dotted; }
.gb-hist-pop { padding: 4px; }
.gb-hist-pop .search-in { margin: 4px 0 6px; }
.gb-hist-list { max-height: 360px; overflow: auto; }
.gb-hist { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 8px; border-radius: 6px; cursor: pointer; min-width: 0; }
.gb-hist:hover, .gb-hist.on { background: var(--bg-hover); }
.gb-hist-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.gb-hist-d { font-size: 11px; white-space: nowrap; }
.gb-hist .btn-icon { width: 24px; height: 24px; display: none; }
.gb-hist:hover .btn-icon { display: inline-flex; }
.gb-hist:hover .gb-hist-d { display: none; }
.gb-regen { margin-top: 8px; height: 26px; font-size: 12px; }
/* Create task from email / comment / chat */
.td-status { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); margin-bottom: 10px; min-height: 40px; }
.td-status > span:not(.av) { flex: 1; min-width: 0; }
.td-status.busy { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }

/* People by name (no avatars) */
.uname { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--bg-hover); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; flex: none; }
.uname.lg { height: auto; padding: 0; background: none; font-size: 14px; }
.uname.placeholder { color: var(--muted); font-style: italic; }
.uname.more { color: var(--muted); }
.unames { display: inline-flex; gap: 4px; min-width: 0; overflow: hidden; align-items: center; }
.me-btn .ic { color: var(--muted); }

/* ---------- Calendar (Microsoft 365 / Google, two-way) ---------- */
.content.cal-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); overflow: hidden; }
.cal-side { border-right: 1px solid var(--line); background: var(--bg-side); overflow: auto; padding: 12px 10px 20px; }
.cal-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cal-bar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-range { font-size: 16px; margin-left: 4px; white-space: nowrap; }
.cal-views { display: inline-flex; gap: 2px; }
.cal-views .btn.on, .cal-bar .btn.on { background: var(--sel); border-color: var(--sel); }
.ic.cal-prev { transform: rotate(180deg); }
.cal-main { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.mini { margin-bottom: 14px; }
.mini-h { display: flex; align-items: center; margin-bottom: 4px; font-size: 13px; }
.mini-h .btn-icon { width: 24px; height: 24px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.mini-dow { font-size: 10.5px; color: var(--faint); font-weight: 700; padding: 2px 0; }
.mini-d { border: 0; background: none; font: inherit; font-size: 12px; height: 26px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.mini-d:hover { background: var(--bg-hover); }
.mini-d.out { color: var(--faint); }
.mini-d.inrange { background: var(--brand-50); }
.mini-d.today { background: var(--brand); color: #fff; font-weight: 700; }
.cal-acct { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 12px 4px 4px; min-width: 0; }
.cal-acct .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cal { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; min-width: 0; margin: 0; }
.cal-cal:hover { background: var(--bg-hover); }
.cal-cal input { width: 15px; height: 15px; min-height: 0; margin: 0; }
.cal-cal .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.cal-sw.task { border: 2px solid var(--muted); background: none; border-radius: 3px; }
.cal-add { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 12px 4px 0; text-decoration: none; }
.cal-connect { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12.5px; }
.cal-connect p { margin: 0 0 8px; }
/* time grid */
.tg { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tg-head, .tg-allday, .tg-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tg-head { border-bottom: 1px solid var(--line); flex: none; }
.tg-dh { display: flex; flex-direction: column; align-items: center; padding: 6px 0; }
.tg-dow { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.tg-dn { border: 0; background: none; font: inherit; font-size: 20px; font-weight: 600; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--ink); }
.tg-dh.today .tg-dn { background: var(--brand); color: #fff; }
.tg-allday { border-bottom: 1px solid var(--line); flex: none; min-height: 30px; }
.tg-lbl { font-size: 10.5px; color: var(--faint); padding: 6px 4px; text-align: right; }
.tg-adcell { border-left: 1px solid var(--line-2); padding: 2px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-scroll { flex: 1; overflow: auto; min-height: 0; }
.tg-hours { position: relative; }
.tg-hr { font-size: 10.5px; color: var(--faint); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.tg-col { position: relative; border-left: 1px solid var(--line-2); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line-2) 47px, var(--line-2) 48px); cursor: cell; }
.tg-col.today { background-color: rgba(181, 6, 0, .02); }
.tg-ev { position: absolute; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 3px solid var(--c); padding: 2px 6px; font-size: 12px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); z-index: 1; touch-action: none; }
.tg-ev b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-ev span { color: var(--ink-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-ev.free { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 10%, #fff), color-mix(in srgb, var(--c) 10%, #fff) 6px, #fff 6px, #fff 12px); }
.tg-ev.dragging { opacity: .85; box-shadow: var(--shadow); z-index: 5; }
.tg-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; cursor: ns-resize; }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--brand); z-index: 2; pointer-events: none; }
.tg-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.tg-task { position: absolute; left: 2px; right: 2px; z-index: 3; }
.cal-chip { display: flex; align-items: center; gap: 4px; width: 100%; border: 0; background: none; font: inherit; font-size: 12px; padding: 1px 4px; border-radius: 4px; cursor: pointer; text-align: left; min-width: 0; color: var(--ink); }
.cal-chip:hover { background: var(--bg-hover); }
.cal-chip.allday { background: color-mix(in srgb, var(--c) 20%, #fff); border-left: 3px solid var(--c); }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.cal-t { color: var(--muted); flex: none; font-size: 11px; }
.cal-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-task { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 4px; border-radius: 4px; background: var(--bg); border: 1px dashed var(--line); color: var(--ink-2); text-decoration: none; min-width: 0; }
.cal-task:hover { border-color: var(--muted); text-decoration: none; }
.cal-task.done .cal-n { text-decoration: line-through; color: var(--muted); }
.cal-tbox { width: 10px; height: 10px; border: 2px solid; border-radius: 3px; flex: none; }
/* month */
.mv { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(110px, 1fr); flex: 1; }
.mv-dow { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); height: auto; }
.mv > .mv-dow { grid-row: 1; }
.mv-cell { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: cell; }
.mv-cell.out { background: var(--bg-soft); }
.mv-cell.out .mv-n { color: var(--faint); }
.mv-n { align-self: flex-start; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
.mv-cell.today .mv-n { background: var(--brand); color: #fff; }
.mv-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mv-more { border: 0; background: none; font: inherit; font-size: 11.5px; color: var(--muted); text-align: left; cursor: pointer; padding: 0 4px; }
.mv-pop { display: flex; flex-direction: column; gap: 3px; padding: 4px; }
/* agenda */
.ag { padding: 12px 20px 30px; }
.ag-day { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.ag-date { display: flex; flex-direction: column; font-size: 13px; }
.ag-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ag-ev { display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; font-size: 13px; text-align: left; padding: 4px 6px; border-radius: 6px; cursor: pointer; min-width: 0; }
.ag-ev:hover { background: var(--bg-hover); }
.ag-time { width: 130px; flex: none; color: var(--muted); font-size: 12.5px; }
.cal-det { padding: 6px; font-size: 13px; }
.cal-det-t { font-size: 15px; }
.cal-det-r { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.cal-det-r .ic { flex: none; margin-top: 2px; color: var(--muted); }
.cal-det-d { margin-top: 8px; padding: 8px; background: var(--bg-soft); border-radius: 6px; white-space: pre-wrap; font-size: 12.5px; max-height: 160px; overflow: auto; }
.cal-quick { padding: 4px; }
.cal-quick input { margin-bottom: 6px; }
.cal-sel { width: 100%; }
@media (max-width: 980px) { .content.cal-page { grid-template-columns: minmax(0, 1fr); } .cal-side { display: none; } }
@media (max-width: 768px) {
  .cal-bar { padding: 8px 10px; }
  .cal-range { font-size: 14px; order: 10; width: 100%; }
  .mv { grid-auto-rows: minmax(70px, 1fr); }
  .mv-items .cal-chip .cal-t { display: none; }
  .ag-day { grid-template-columns: 1fr; gap: 4px; }
  .ag-time { width: 90px; }
  .tg-head, .tg-allday, .tg-body { grid-template-columns: 40px repeat(var(--cols), minmax(0, 1fr)); }
}

/* Connect to MS365 / Google */
.connect-logo { width: 16px; height: 16px; flex: none; display: inline-block; }
.connect-logo.microsoft { background: linear-gradient(90deg, #f25022 0 47%, transparent 47% 53%, #7fba00 53%) top / 100% 47% no-repeat, linear-gradient(90deg, #00a4ef 0 47%, transparent 47% 53%, #ffb900 53%) bottom / 100% 47% no-repeat; }
.connect-logo.google { border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 25% 45%, #34a853 45% 70%, #4285f4 70% 100%); -webkit-mask: radial-gradient(circle, transparent 38%, #000 39%); mask: radial-gradient(circle, transparent 38%, #000 39%); }
.connect-steps { font-size: 13px; color: var(--ink-2); padding-left: 20px; margin: 0 0 12px; }
.connect-steps li { margin-bottom: 6px; }

/* @mentions while typing: the textarea's text is drawn by a layer behind it, with mentions in bold red on a highlight */
.mention-wrap { position: relative; min-width: 0; }
.mention-wrap > .mention-ta { position: relative; z-index: 1; width: 100%; display: block; background: transparent !important; color: transparent !important; caret-color: var(--ink); }
.mention-wrap > .mention-ta::placeholder { color: var(--faint); }
.mention-wrap > .mention-ta::selection { background: rgba(181, 6, 0, .16); color: var(--ink); }
.mention-hl { position: absolute; left: 0; top: 0; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; color: var(--ink); background: var(--bg); border-style: solid; border-color: transparent; border-radius: var(--radius-sm); pointer-events: none; }
.mention-tag { background: var(--brand-50); color: var(--brand); border-radius: 3px; text-shadow: .45px 0 0 currentColor; box-shadow: 0 0 0 1.5px var(--brand-50); }
.chat-compose > .mention-wrap { flex: 1; }

/* ---------- Attachments: cards + full-screen viewer ---------- */
.af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.af { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); cursor: zoom-in; min-width: 0; transition: box-shadow .12s, border-color .12s; }
.af:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.af-thumb { position: relative; height: 104px; background: var(--bg-soft) center / cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.af-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; background: #111; }
.af-play { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.af-badge { min-width: 46px; height: 30px; padding: 0 8px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; display: grid; place-items: center; }
.af-badge.big { min-width: 76px; height: 52px; font-size: 16px; border-radius: 10px; }
.af-badge.big .ic { width: 26px; height: 26px; }
.af-meta { padding: 7px 9px 8px; min-width: 0; }
.af-nm { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.af-acts { position: absolute; top: 6px; right: 6px; display: none; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px; box-shadow: var(--shadow-sm); }
.af:hover .af-acts { display: flex; }
.af-acts .btn-icon { width: 26px; height: 26px; }
@media (hover: none) { .af-acts { display: flex; } }
.af-progress { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.af-progress .meter { margin-top: 4px; height: 6px; }
.af-viewer { position: fixed; inset: 0; z-index: 3000; background: rgba(12, 14, 18, .92); display: flex; flex-direction: column; }
.av-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #fff; flex-wrap: wrap; }
.av-title { display: flex; flex-direction: column; min-width: 0; }
.av-title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.av-title .faint { color: rgba(255, 255, 255, .6); font-size: 12px; }
.av-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.av-acts .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }
.av-acts .btn:hover { background: rgba(255, 255, 255, .2); }
.av-acts .btn-danger { color: #ffb4ae; }
.av-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 64px 24px; }
.av-stage img, .av-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #000; }
.av-doc { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 6px; background: #fff; }
.av-audio, .av-none { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-align: center; }
.av-audio audio { width: min(460px, 80vw); }
.av-none .faint { color: rgba(255, 255, 255, .6); margin: 0; }
.av-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.av-nav:hover { background: rgba(255, 255, 255, .25); }
.av-nav.prev { left: 12px; } .av-nav.prev .ic { transform: rotate(180deg); }
.av-nav.next { right: 12px; }
@media (max-width: 768px) { .av-stage { padding: 4px 8px 16px; } .av-nav { top: auto; bottom: 16px; transform: none; } .af-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .av-title b { max-width: 80vw; } }
