/* Visual language shared with Agenda AI: indigo accent, top bar + icon rail,
   soft grey inputs, segmented controls, rows with a colored left stripe. */
:root { --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f0f2f5; --surface-3: #e7eaef; --border: #e2e5ea; --border-strong: #d3d7de; --grid: #eceef2; --text: #1a1d23; --text-2: #687080; --text-3: #9aa1ad; --accent: #4b63f0; --accent-text: #ffffff; --accent-weak: color-mix(in srgb, var(--accent) 12%, transparent); --danger: #d93d42; --warn: #c56a00; --good: #138a5b; --chart-surface: #ffffff; --other: #9a9ca0; --none: #c4c8cf; --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08); --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06); --radius: 10px; --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --bg: #111317; --surface: #181b20; --surface-2: #20242b; --surface-3: #2a2f37; --border: #2a2e36; --border-strong: #363b45; --grid: #22262d; --text: #e6e8ec; --text-2: #9aa1ad; --text-3: #6d7480; --accent: #7289ff; --accent-text: #0d1020; --danger: #ff6b6f; --warn: #f0a640; --good: #3fcf8e; --chart-surface: #181b20; --other: #7d7f83; --none: #4a4f58; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); color-scheme: dark; }
}
:root[data-theme='dark'] { --bg: #111317; --surface: #181b20; --surface-2: #20242b; --surface-3: #2a2f37; --border: #2a2e36; --border-strong: #363b45; --grid: #22262d; --text: #e6e8ec; --text-2: #9aa1ad; --text-3: #6d7480; --accent: #7289ff; --accent-text: #0d1020; --danger: #ff6b6f; --warn: #f0a640; --good: #3fcf8e; --chart-surface: #181b20; --other: #7d7f83; --none: #4a4f58; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.hidden { display: none !important; }
.boot { padding: 48px; color: var(--text-3); text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.grow { flex: 1; }
/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; white-space: nowrap; font-weight: 500; transition: background 0.12s, border-color 0.12s, color 0.12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn.danger.solid:hover { background: color-mix(in srgb, var(--danger) 88%, black); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 32px; padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.big { height: 36px; padding: 0 16px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 9px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 7px; color: var(--text-2); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); font-weight: 600; }
.seg svg { width: 15px; height: 15px; }
/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input:not([type]), select, textarea { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); min-width: 0; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
input:disabled { color: var(--text-3); }
textarea { height: auto; padding: 8px 10px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin-bottom: 12px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 110px; }
.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
/* ---------- App shell: top bar, icon rail, page ---------- */
.shell { display: grid; grid-template-rows: 56px 1fr; grid-template-columns: 56px 1fr; height: 100vh; transition: grid-template-columns 0.18s ease; }
.shell.rail-open { grid-template-columns: 200px 1fr; }
.shell { position: relative; }
/* Menu handle: a small round button centred on the sidebar's right edge. */
.rail-toggle { position: absolute; top: calc(50% + 28px); left: 56px; z-index: 20; transform: translate(-50%, -50%); width: 24px; height: 24px; padding: 0; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-sm); cursor: pointer; transition: left 0.18s ease, background 0.12s, color 0.12s; }
.rail-toggle:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.rail-toggle svg { width: 13px; height: 13px; transition: transform 0.18s; }
.shell.rail-open .rail-toggle { left: 200px; }
.shell.rail-open .rail-toggle svg { transform: rotate(180deg); }
.tb { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--surface); min-width: 0; }
.tb-l, .tb-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-r { justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-right: 10px; white-space: nowrap; }
.logo { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), #9b6bff); flex: none; }
.tb-title { font-size: 16px; font-weight: 600; margin: 0 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border: 1px solid transparent; border-radius: 16px; background: transparent; cursor: pointer; }
.who-btn:hover { background: var(--surface-2); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: linear-gradient(135deg, var(--accent), #9b6bff); flex: none; }
.who-btn .role { color: var(--text-3); font-size: 12px; }
#timer-pill { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 10px; border-radius: 16px; max-width: 320px; cursor: pointer; background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
#timer-pill b { font-variant-numeric: tabular-nums; color: var(--danger); }
#timer-pill .pill-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 600; }
#timer-pill .pill-btn { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 0; background: var(--danger); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
#timer-pill .pill-btn.soft { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
#timer-pill .pill-btn svg { width: 12px; height: 12px; }
#timer-pill.paused { background: var(--surface-2); border-color: var(--border); }
#timer-pill.paused b { color: var(--text-2); }
#rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; border-right: 1px solid var(--border); background: var(--surface); }
#rail a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--text-2); text-decoration: none; }
#rail a:hover { background: var(--surface-2); color: var(--text); }
#rail a.active { background: var(--accent-weak); color: var(--accent); }
#rail svg { width: 20px; height: 20px; }
#rail .rail-foot { margin-top: auto; }
.rail-label { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; }
#rail { overflow: hidden; }
.shell.rail-open #rail { align-items: stretch; padding: 12px 10px; }
.shell.rail-open #rail a { width: auto; display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.shell.rail-open #rail .rail-label { display: block; }
.shell.rail-open #rail .rail-foot { display: flex; flex-direction: column; }
.main { overflow-y: auto; min-width: 0; padding: 18px 24px 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; }
.page-note { margin: -6px 0 14px; color: var(--text-2); }
h3.sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
h3.sec .count { font-weight: 500; color: var(--text-3); text-transform: none; letter-spacing: 0; }
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px 1fr 56px; }
  #rail { grid-row: 3; flex-direction: row; justify-content: space-around; padding: 0 8px; border-right: 0; border-top: 1px solid var(--border); }
  #rail .rail-foot { margin: 0; }
  .shell.rail-open { grid-template-columns: 1fr; }
  .rail-toggle { display: none !important; }
  .shell.rail-open #rail { flex-direction: row; align-items: center; padding: 0 8px; }
  .shell.rail-open #rail a { width: 40px; padding: 0; justify-content: center; }
  .shell.rail-open #rail .rail-label { display: none; }
  .tb-title, .who-btn .role, .who-btn .name, .brand span.word { display: none; }
  .main { padding: 14px 16px 32px; }
  #timer-pill { max-width: 170px; }
}
/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 12px; }
.card-head h2 { margin: 0; font-size: 14px; }
.card-body { padding: 14px 16px; }
.empty { padding: 32px; text-align: center; color: var(--text-3); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; max-width: 100%; min-width: 0; }
.chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.badge.admin { background: var(--accent-weak); color: var(--accent); }
.badge.off { color: var(--text-3); }
/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 380px; padding: 28px; border-radius: 14px; box-shadow: var(--shadow); }
.auth .logo { width: 36px; height: 36px; border-radius: 10px; }
.auth h1 { margin: 14px 0 4px; font-size: 20px; }
.auth p { margin: 0 0 18px; color: var(--text-2); }
.auth .btn { width: 100%; margin-top: 4px; }
.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }
/* ---------- Tracker ---------- */
.timerbar { position: sticky; top: -18px; z-index: 5; width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; flex-wrap: wrap; border-radius: 12px; box-shadow: var(--shadow-sm); }
.timerbar:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.timerbar .desc { flex: 1 1 240px; min-width: 0; border: 0; background: transparent; font-size: 14px; height: 40px; padding: 0 4px; }
.timerbar .desc:focus { background: transparent; }
.timerbar select { width: auto; max-width: 220px; }
.timerbar .clock { font-size: 18px; font-weight: 600; min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.timerbar .clock.paused { color: var(--text-3); }
.timerbar .manual { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.timerbar .manual input[type=date] { width: 140px; }
.timerbar .manual input[type=time] { width: 124px; }
.timerbar .manual input.dur { width: 76px; text-align: center; }
.paused-tag { font-size: 11px; font-weight: 700; color: var(--warn); letter-spacing: 0.04em; }
.week-total { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 0; color: var(--text-2); font-weight: 600; }
.week-total b { color: var(--text); }
.day { margin-bottom: 4px; }
.day-head { display: flex; justify-content: space-between; margin: 14px 2px 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.day-head .num { text-transform: none; letter-spacing: 0; color: var(--text-3); }
.entry { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(0, 1.4fr) 120px 76px auto; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; margin-bottom: 4px; border: 1px solid transparent; border-radius: 10px; background: var(--surface); box-shadow: inset 3px 0 0 var(--c, var(--none)); }
.entry:hover { border-color: color-mix(in srgb, var(--c, var(--border-strong)) 45%, var(--border)); }
.entry .d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.entry .d.muted { font-weight: 400; }
.entry .chip { color: var(--text-2); font-weight: 500; }
.entry .t { color: var(--text-2); text-align: right; }
.entry .dur { font-weight: 600; text-align: right; }
.entry .acts { display: flex; gap: 2px; opacity: 0.35; transition: opacity 0.12s; }
.entry:hover .acts, .entry:focus-within .acts { opacity: 1; }
@media (max-width: 760px) {
  .entry { grid-template-columns: 1fr auto; row-gap: 2px; }
  .entry .chip, .entry .t { grid-column: 1; text-align: left; }
  .entry .dur { grid-row: 1; grid-column: 2; }
  .entry .acts { grid-row: 2 / 4; grid-column: 2; opacity: 1; }
}
/* ---------- Dashboard ---------- */
.dash-head { margin-bottom: 10px; }
.range-nav { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.range-nav .btn.icon { width: 28px; height: 28px; }
.range-label { min-width: 150px; text-align: center; font-weight: 600; padding: 0 4px; white-space: nowrap; }
.range-custom { display: inline-flex; align-items: center; gap: 6px; }
.range-custom input { width: 140px; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.summary .stat { padding: 14px 18px; border-left: 1px solid var(--border); min-width: 0; }
.summary .stat:first-child { border-left: 0; }
.summary .k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.summary .v { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary .s { color: var(--text-3); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary .stat:nth-child(3) { border-left: 0; }
  .summary .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}
.card-head.plain { border-bottom: 0; padding-bottom: 4px; }
.small-btn { height: 28px; padding: 0 10px; color: var(--text-2); font-size: 12px; }
.card-body.flush { padding: 4px 0 6px; }
.chart-pad { padding: 4px 16px 6px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.chart-wrap .bar-totals text { fill: var(--text-2); font-size: 11px; font-weight: 600; font-family: var(--font); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
@media (max-width: 1000px) {
  .grid2 { grid-template-columns: 1fr; }
}
.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.donut-box { position: relative; flex: none; }
.donut .donut-seg { cursor: default; transition: stroke-width 0.12s; }
.donut .donut-seg:hover { stroke-width: 26; }
.donut .donut-total { fill: var(--text); font-size: 18px; font-weight: 650; font-family: var(--font); }
.donut .donut-sub { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.donut-list { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.dl-row:last-child { border-bottom: 0; }
.dl-row .muted { text-align: right; }
.team-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; cursor: pointer; border-top: 1px solid var(--border); }
.team-row:first-child { border-top: 0; }
.team-row:hover { background: var(--surface-2); }
.team-row .avatar { width: 30px; height: 30px; font-size: 12px; margin-top: 1px; }
.team-main { flex: 1; min-width: 0; }
.team-top { display: flex; justify-content: space-between; gap: 10px; }
.team-top .num { font-weight: 600; }
.team-track { display: flex; gap: 2px; height: 6px; margin: 6px 0; }
.team-track > div { height: 100%; min-width: 2px; }
.team-track > div:first-child { border-radius: 3px 0 0 3px; }
.team-track > div:last-child { border-radius: 0 3px 3px 0; }
.team-track > div:only-child { border-radius: 3px; }
.team-latest { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); min-width: 0; white-space: nowrap; }
.team-latest .latest-desc { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.team-latest .chip { font-weight: 400; flex-shrink: 1; margin-left: 4px; }
.card-body.flush .tbl th:first-child, .card-body.flush .tbl td:first-child { padding-left: 16px; }
.card-body.flush .tbl th:last-child, .card-body.flush .tbl td:last-child { padding-right: 16px; }
.chart-wrap { position: relative; background: var(--chart-surface); }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-wrap .axis text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart-wrap .gridline { stroke: var(--grid); stroke-width: 1; }
.chart-wrap .baseline { stroke: var(--border-strong); stroke-width: 1; }
.chart-wrap .seg-rect { stroke: var(--chart-surface); stroke-width: 2; }
.chart-wrap .hit { fill: transparent; }
.chart-wrap .hit:hover { fill: var(--text); fill-opacity: 0.04; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 16px 12px; color: var(--text-2); font-size: 12px; }
.legend .chip { font-weight: 400; }
.tooltip { position: absolute; pointer-events: none; z-index: 20; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 10px; padding: 10px 12px; min-width: 180px; max-width: 280px; }
.tooltip .tt-head { font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--text-2); }
.tooltip .tt-row .chip { font-weight: 400; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-scroll { overflow-x: auto; }
.running-tag { color: var(--good); font-weight: 600; font-size: 12px; }
/* ---------- Projects / team ---------- */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw, var(--text)); }
.people-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; background: var(--surface-2); }
/* ---------- Modals & toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(10, 12, 18, 0.45); padding: 16px; animation: fade 0.12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.modal h2 { margin: 0; font-size: 16px; padding: 16px 18px 6px; }
.modal .mbody { padding: 8px 18px 4px; overflow-y: auto; }
.modal .mbody > p:first-child { margin-top: 0; }
.modal .mfoot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal .mfoot .spacer { flex: 1; }
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 9px 14px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-weight: 500; max-width: 420px; }
.toast.err { background: var(--danger); color: #fff; }
@media (max-width: 720px) {
  #toasts { bottom: 72px; }
}
/* ---------- Project picker (colored) ---------- */
.pp { position: relative; display: inline-block; min-width: 0; --pc: transparent; }
.pp-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: 280px; width: 100%; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; color: var(--text-2); }
.pp-btn:hover { border-color: var(--border-strong); }
.pp.has-value .pp-btn { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--pc) 13%, var(--surface)); border-color: color-mix(in srgb, var(--pc) 45%, var(--border)); }
.pp-btn > svg:first-child { width: 15px; height: 15px; flex: none; }
.pp-btn .dot { width: 10px; height: 10px; }
.pp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pp-client { color: var(--text-3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pp-chev { width: 14px; height: 14px; margin-left: auto; flex: none; color: var(--text-3); }
.pp-menu { position: fixed; z-index: 60; max-height: 320px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.pp-search { margin: 6px; width: calc(100% - 12px) !important; height: 32px !important; }
.pp-list { overflow-y: auto; padding: 4px; }
.pp-opt { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.pp-opt.active { background: var(--surface-2); }
.pp-opt.on { font-weight: 600; }
.pp-opt.on::after { content: '✓'; margin-left: auto; color: var(--accent); font-weight: 700; }
.pp-opt .dot { width: 10px; height: 10px; }
.pp-opt .dot.pp-none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.pp-empty { padding: 10px; color: var(--text-3); text-align: center; }
.timerbar .pp-btn { width: auto; min-width: 150px; }
.modal .pp { display: block; }
.modal .pp-btn { max-width: none; }
/* ---------- Undo toast ---------- */
#toasts .toast.with-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 6px 6px 6px 14px; }
.toast-action { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); font-weight: 700; cursor: pointer; }
.toast-action:hover { background: color-mix(in srgb, var(--bg) 30%, transparent); }
/* ---------- Inline editing in the entries list ---------- */
.entry { cursor: default; }
.entry .editable { cursor: text; border-radius: 6px; padding: 3px 6px; margin: -3px -6px; transition: background 0.1s; }
.entry .editable:hover, .entry .editable:focus-visible { background: var(--surface-2); outline: none; box-shadow: inset 0 0 0 1px var(--border); }
.entry .d.muted { font-style: italic; }
.entry .t.editable, .entry .dur.editable { justify-self: end; }
.inline-input { height: 30px !important; padding: 0 8px !important; background: var(--surface) !important; border-color: var(--accent) !important; }
.entry .d .inline-input { width: 100%; font-weight: 600; }
.inline-times { display: inline-flex; align-items: center; gap: 4px; }
.inline-times .inline-input { width: 116px; }
.pp.compact .pp-btn { height: 28px; border-color: transparent; background: transparent; font-weight: 500; padding: 0 6px; max-width: 100%; }
.pp.compact.has-value .pp-btn { color: var(--text-2); background: transparent; border-color: transparent; }
.pp.compact .pp-btn:hover, .pp.compact .pp-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--pc) 12%, var(--surface)); border-color: color-mix(in srgb, var(--pc) 40%, var(--border)); color: var(--text); }
.pp.compact .pp-chev { opacity: 0; }
.pp.compact .pp-btn:hover .pp-chev, .pp.compact .pp-btn:focus-visible .pp-chev { opacity: 1; }
.pp.compact .pp-client { display: none; }
/* ---------- Project visibility badges ---------- */
.vis-cell { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vis-badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.vis-badge svg { width: 13px; height: 13px; }
.vis-badge.public { background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good); }
.vis-badge.private { background: var(--accent-weak); color: var(--accent); }
.vis-badge.none { background: var(--surface-2); color: var(--text-2); }
.faces { display: inline-flex; }
.faces .avatar { width: 22px; height: 22px; font-size: 9px; margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.faces .avatar:first-child { margin-left: 0; }
.faces .avatar.more { background: var(--surface-3); color: var(--text-2); }
/* ---------- First-run checklist ---------- */
.checklist { margin-bottom: 14px; padding: 4px 0 6px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: linear-gradient(180deg, var(--accent-weak), transparent 70%), var(--surface); }
.cl-head { display: flex; align-items: center; gap: 16px; padding: 12px 16px 6px; }
.cl-head h2 { margin: 0; font-size: 15px; }
.cl-progress { flex: 1; max-width: 220px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-left: auto; }
.cl-progress > div { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.cl-steps { list-style: none; margin: 0; padding: 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cl-steps li { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; }
.cl-steps li.next { background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, var(--border)); }
.cl-steps li .btn { align-self: flex-start; margin-top: auto; }
.cl-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.cl-mark svg { width: 14px; height: 14px; }
.cl-steps li.done .cl-mark { background: var(--good); color: #fff; }
.cl-steps li.done .cl-text b { text-decoration: line-through; color: var(--text-3); }
.cl-steps li.next .cl-mark { background: var(--accent); color: var(--accent-text); }
.cl-text { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 1000px) {
  .cl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cl-steps { grid-template-columns: 1fr; }
}
/* ---------- Dashboard drill-down ---------- */
.back-btn svg { width: 14px; height: 14px; }
.chart-wrap .hit.clickable, .donut-seg.clickable, .dl-row.clickable, .tbl tr.clickable { cursor: pointer; }
.dl-row.clickable:hover { background: var(--surface-2); }
.dl-row { padding-left: 6px; padding-right: 6px; border-radius: 6px; }
/* ---------- Quick access panel (Projects page) ---------- */
.vis-edit { display: inline-flex; align-items: center; gap: 4px; }
.vis-open { display: inline-flex; align-items: center; padding: 3px 6px; margin: -3px -6px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; color: inherit; }
.vis-open:hover { background: var(--surface-2); border-color: var(--border); }
.btn.vis-add { width: 28px; height: 28px; min-width: 28px; padding: 0; flex: none; aspect-ratio: 1 / 1; margin-left: 6px; color: var(--text-2); border: 1px dashed var(--border-strong); border-radius: 50%; }
.btn.vis-add svg { width: 14px; height: 14px; }
.btn.vis-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-weak); }
.access-pop { position: fixed; z-index: 60; width: 320px; max-height: min(460px, calc(100vh - 24px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; gap: 8px; }
.ap-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ap-everyone { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); cursor: pointer; }
.ap-everyone input, .ap-row input { width: 16px; height: 16px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.ap-everyone > span { display: flex; flex-direction: column; gap: 1px; }
.access-pop.is-public .ap-everyone { background: color-mix(in srgb, var(--good) 12%, transparent); }
.ap-sub { margin-top: 2px; }
.access-pop.is-public .ap-sub, .access-pop.is-public .ap-list { opacity: 0.45; }
.ap-search { height: 32px !important; }
.ap-list { overflow-y: auto; display: flex; flex-direction: column; margin: 0 -4px; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.ap-row:hover { background: var(--surface-2); }
.ap-row .avatar { width: 26px; height: 26px; font-size: 10px; }
.ap-name { display: flex; flex-direction: column; min-width: 0; }
.ap-name .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-empty { padding: 10px 8px; color: var(--text-3); }
.ap-foot { border-top: 1px solid var(--border); padding-top: 8px; }
/* ---------- Dashboard filter bar ---------- */
.filter-bar { display: flex; align-items: flex-end; gap: 0; flex-wrap: wrap; padding: 10px 6px; margin-bottom: 10px; }
.fb-group { display: flex; flex-direction: column; gap: 5px; padding: 0 12px; border-left: 1px solid var(--border); min-width: 0; }
.fb-group:first-child { border-left: 0; }
.fb-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); cursor: help; width: max-content; }
.fb-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-controls select { width: auto; min-width: 150px; }
.fb-end { margin-left: auto; }
.filter-bar select.is-set { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.reset-btn { color: var(--accent); }
@media (max-width: 860px) {
  .fb-group { border-left: 0; padding: 6px 10px; }
  .fb-end { margin-left: 0; }
}
.dash-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 2px 14px; color: var(--text-2); min-height: 28px; }
.st-text { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.st-text b { color: var(--text); }
.st-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 2px 0 8px; border-radius: 13px; background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.st-tag .avatar { width: 18px; height: 18px; font-size: 8px; margin-left: -4px; }
.st-x { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; display: grid; place-items: center; padding: 0; }
.st-x:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.st-hint { font-size: 12px; }
.st-hint::before { content: '·'; margin-right: 8px; }
/* ---------- Multi-choice filter (dashboard Person / Project) ---------- */
.mp { position: relative; display: inline-block; }
.mp-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; min-width: 170px; max-width: 260px; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; color: var(--text); }
.mp-btn:hover { border-color: var(--border-strong); }
.mp.is-set .mp-btn { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.mp-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mp-chev { margin-left: auto; display: inline-flex; color: var(--text-3); }
.mp-chev svg { width: 14px; height: 14px; }
.mp-marks { display: inline-flex; flex: none; }
.mp-marks > * { margin-left: -4px; box-shadow: 0 0 0 2px var(--surface); }
.mp-marks > *:first-child { margin-left: 0; }
.mp-btn .avatar, .mp-opt .avatar { width: 20px; height: 20px; font-size: 8px; }
.mp-btn .dot { width: 10px; height: 10px; }
.mp-all { display: flex; align-items: center; gap: 9px; margin: 4px 4px 0; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; color: var(--text); }
.mp-all:hover { background: var(--surface-2); }
.mp-menu .pp-list { border-top: 1px solid var(--border); margin-top: 4px; }
.mp-box { width: 16px; height: 16px; flex: none; border-radius: 4px; border: 1.5px solid var(--text-3); display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; color: var(--accent-text); }
.mp-box.on { background: var(--accent); border-color: var(--accent); }
.mp-opt.on { font-weight: 600; }
.mp-opt.on::after { content: none; }
.mp-only { margin-left: auto; height: 22px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; opacity: 0; }
.mp-opt:hover .mp-only { opacity: 1; }
.mp-only:hover { background: var(--accent-weak); }
.st-more { color: var(--text-2); font-weight: 600; }
/* "Nothing selected" state of the multi-choice filter */
.mp.is-none .mp-btn { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.mp-box.partial { background: var(--accent); border-color: var(--accent); }
.mp-all-hint { margin-left: auto; font-size: 11px; color: var(--text-3); }
.st-none { color: var(--warn) !important; }
/* Text-style button (e.g. "Forgot your password?") */
.link-btn { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--accent); cursor: pointer; font-weight: 600; padding: 4px; }
.link-btn:hover { text-decoration: underline; }
/* Invite / reset links and password-reset requests */
.link-row { display: flex; gap: 8px; }
.link-row .link-field { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.reset-req { margin-top: 4px; border: 0; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-size: 11px; font-weight: 700; cursor: pointer; }
.reset-req:hover { background: color-mix(in srgb, var(--warn) 24%, transparent); }
/* ---------- Forgotten timer banner ---------- */
.forgot-banner { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 45; width: min(860px, calc(100vw - 32px)); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--border)); box-shadow: var(--shadow); background-image: linear-gradient(90deg, color-mix(in srgb, var(--warn) 12%, transparent), transparent 60%); }
.fb-icon { font-size: 22px; }
.fb-msg { display: flex; flex-direction: column; gap: 2px; flex: 1 1 240px; min-width: 0; }
.fb-msg > b { font-size: 14px; }
.fb-msg span { color: var(--text-2); }
.fb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-at { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.fb-at input { width: 120px; }
/* ---------- Grouped repeated entries ---------- */
.entry.group .d { display: flex; align-items: center; gap: 10px; }
.group-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--c) 50%, var(--border)); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text); font-weight: 700; font-size: 12px; cursor: pointer; flex: none; }
.group-count:hover, .entry.group.open .group-count { background: var(--c); color: #fff; border-color: var(--c); }
.group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-chip { color: var(--text-2); padding-left: 6px; }
.entry.group .t, .entry.group .dur { padding-right: 0; }
.group-children { margin: -2px 0 6px 22px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--border) 80%, transparent); }
.group-children .entry { margin-bottom: 3px; }
/* ---------- Loading bar & offline banner ---------- */
#loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; opacity: 0; transition: opacity 0.2s; overflow: hidden; }
#loadbar.on { opacity: 1; }
#loadbar::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--accent); border-radius: 2px; animation: loadbar 1.1s ease-in-out infinite; }
@keyframes loadbar { from { left: -40%; } to { left: 100%; } }
.main.is-loading .summary, .main.is-loading .dash-chart, .main.is-loading .grid2, .main.is-loading .grid2 + .card { opacity: 0.55; transition: opacity 0.15s; }
#offline { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 90; width: min(720px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--danger) 50%, var(--border)); box-shadow: var(--shadow); transition: transform 0.25s ease; }
#offline.on { transform: translate(-50%, 0); }
#offline > div { flex: 1; min-width: 0; color: var(--text-2); }
#offline b { color: var(--text); }
.off-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (max-width: 720px) {
  #offline { bottom: 72px; }
}
/* Buttons that are links (e.g. backup download) */
a.btn { text-decoration: none; color: inherit; }
/* ---------- Disciplines ---------- */
.disc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.disc-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; font-weight: 500; }
.disc-pill .dot { opacity: 0.45; }
.disc-pill.on { background: color-mix(in srgb, var(--dc) 16%, var(--surface)); border-color: color-mix(in srgb, var(--dc) 55%, var(--border)); color: var(--text); font-weight: 600; }
.disc-pill.on .dot { opacity: 1; }
.disc-mini { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.disc-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--dc) 16%, transparent); color: color-mix(in srgb, var(--dc) 75%, var(--text)); white-space: nowrap; }
.disc-color { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; flex: none; }
.disc-colors { position: fixed; z-index: 60; display: flex; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.editable-name { cursor: text; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; font-weight: 600; }
.editable-name:hover { background: var(--surface-2); }
.tbl tr.is-archived td { opacity: 0.6; }
.disc-add { display: flex; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--border); }
.disc-add input { max-width: 280px; }
/* Discipline in the tracker */
.disc-slot:empty { display: none; }
.disc-picker .pp-btn > svg:first-child { display: none; }
.timerbar .disc-picker .pp-btn { min-width: 130px; }
.disc-cell { min-width: 0; }
.entry .disc-picker.compact .pp-btn { color: var(--text-2); }
@media (max-width: 760px) {
  .entry .disc-cell { grid-column: 1; }
}
/* Dashboard: disciplines */
.summary.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .summary.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary.five .stat:nth-child(4) { border-left: 0; }
  .summary.five .stat:nth-child(n+4) { border-top: 1px solid var(--border); }
}
.small-seg button { height: 24px; font-size: 12px; padding: 0 9px; }
.disc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 1250px) {
  .disc-grid { grid-template-columns: 1fr; }
}
.tbl.matrix th, .tbl.matrix td { white-space: nowrap; }
.mx-cell { background: linear-gradient(90deg, transparent calc(100% - var(--mx)), color-mix(in srgb, var(--dc) 18%, transparent) 0); }
.mx-cell:hover { outline: 1px solid color-mix(in srgb, var(--dc) 60%, var(--border)); outline-offset: -1px; }
/* Mid-size windows: drop the time range column so description, project and discipline keep room */
@media (max-width: 1100px) and (min-width: 761px) {
  .entry { grid-template-columns: minmax(120px, 2fr) minmax(0, 1.1fr) minmax(0, 0.9fr) 76px auto; }
  .entry .t { display: none; }
}
/* Server older than the page */
#outdated { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 95; width: min(760px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--border)); box-shadow: var(--shadow); }
#outdated span { flex: 1 1 300px; color: var(--text-2); }
/* ---------- Discipline settings: drag order and sub-projects ---------- */
.disc-list { display: flex; flex-direction: column; gap: 8px; padding: 6px 12px 14px; }
.disc-block { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: inset 3px 0 0 var(--dc); overflow: hidden; }
.disc-block.dragging, .sub-row.dragging { opacity: 0.45; outline: 2px dashed var(--accent); outline-offset: -2px; }
.disc-block.is-archived { opacity: 0.6; }
.disc-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; flex-wrap: wrap; }
.disc-name { font-size: 14px; }
.disc-total { min-width: 72px; text-align: right; font-weight: 600; }
.grip { width: 22px; height: 28px; border: 0; background: transparent; color: var(--text-3); cursor: grab; font-size: 16px; line-height: 1; border-radius: 6px; padding: 0; flex: none; }
.grip:hover, .grip:focus-visible { color: var(--text); background: var(--surface-2); }
.grip:active { cursor: grabbing; }
.sub-code { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; background: color-mix(in srgb, var(--dc) 18%, transparent); color: color-mix(in srgb, var(--dc) 70%, var(--text)); flex: none; }
.sub-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.sub-list:empty { display: none; }
.sub-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 34px; border-bottom: 1px solid var(--border); }
.sub-row:last-child { border-bottom: 0; }
.sub-row:hover { background: var(--surface-2); }
.sub-row.is-archived { opacity: 0.55; }
.sub-name { font-weight: 500; }
.sub-add { display: flex; align-items: center; gap: 8px; }
.sub-add input { max-width: 300px; height: 30px; }
.code-input { text-transform: none; }
.code-preview { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.sub-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.sub-label-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc-tag.with-sub b { font-weight: 800; }
/* Two-level discipline picker */
.pp-opt.pp-sub { padding-left: 30px; }
/* Discipline title inside the sub-project picker: a label, not a choice. */
.pp-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 3px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); cursor: default; user-select: none; }
.pp-head .dot { width: 8px; height: 8px; }
.pp-opt .sub-code, .pp-btn .sub-code { height: 18px; font-size: 10px; }
.dl-row.dl-sub { padding-left: 22px; font-size: 12px; border-bottom-style: dashed; }
.grip { display: inline-grid; place-items: center; touch-action: none; user-select: none; }
body.is-sorting, body.is-sorting * { cursor: grabbing !important; user-select: none; }
.disc-block.dragging, .sub-row.dragging { box-shadow: var(--shadow); position: relative; z-index: 2; }
/* Sub-project access + header add button */
.sub-access { gap: 6px; padding: 2px 4px; margin: 0; }
.sub-access .vis-badge { height: 22px; font-size: 11px; }
.sub-access .faces .avatar { width: 20px; height: 20px; font-size: 8px; }
.btn.sub-add-btn { width: 26px; height: 26px; min-width: 26px; padding: 0; flex: none; aspect-ratio: 1 / 1; border-radius: 50%; border: 1px dashed var(--border-strong); color: var(--text-2); }
.btn.sub-add-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-weak); }
.btn.sub-add-btn svg { width: 13px; height: 13px; }
.sub-add { border-top: 1px solid var(--border); border-bottom: 0; background: var(--surface-2); padding: 6px 10px 6px 34px; }
/* Projects page: projects grouped under their discipline. */
.disc-list { padding-top: 12px; }
.sub-row { padding-top: 6px; padding-bottom: 6px; }
.sub-row .proj-label .sub-label-name { font-weight: 600; }
.sub-row .vis-edit { flex: 0 0 auto; }
.sub-total { min-width: 70px; text-align: right; }
.sub-empty { padding: 10px 14px 10px 34px; }
.disc-block.no-disc .disc-head { padding-left: 14px; }
.disc-block .dot.pp-none { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.disc-card { margin-bottom: 14px; }
.chip .sub-code { height: 18px; font-size: 10px; }
.sub-row { flex-wrap: wrap; row-gap: 4px; }
.sub-row .proj-label { flex: 1 1 180px; min-width: 0; }
.sub-row > .grow { display: none; }
@media (max-width: 640px) {
  .sub-row { padding-left: 14px; }
  .disc-head .muted.small { display: none; }
}
/* ---------- Period picker (dashboard, right side of the filter bar) ---------- */
.fb-end { display: flex; align-items: flex-end; gap: 4px; align-self: flex-end; padding: 0; }
.fb-end > .reset-btn { margin-bottom: 4px; }
.fb-end .fb-group { border-left: 1px solid var(--border); }
.rp { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); overflow: hidden; }
.rp-step { width: 32px; display: grid; place-items: center; background: none; border: 0; color: var(--text-2); cursor: pointer; }
.rp-step:hover { background: var(--surface-2); color: var(--text); }
.rp-step svg { width: 16px; height: 16px; }
.rp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; background: none; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; }
.rp-btn:hover, .rp-btn[aria-expanded="true"] { background: var(--surface-2); }
.rp-btn[aria-expanded="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
.rp-cal-icon { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.rp-name { font-weight: 700; }
.rp-dates { font-variant-numeric: tabular-nums; font-weight: 600; }
.rp-dates.muted { font-weight: 500; }
.rp-chev { width: 14px; height: 14px; color: var(--text-3); }
.rp-panel { position: fixed; z-index: 60; display: flex; background: var(--surface); border: 1px solid var(--border-strong, var(--border)); border-radius: 12px; box-shadow: var(--shadow-lg, 0 18px 50px rgba(0,0,0,.35)); max-width: calc(100vw - 16px); overflow: hidden; }
.rp-presets { display: flex; flex-direction: column; padding: 8px; gap: 1px; border-right: 1px solid var(--border); background: var(--surface-2); min-width: 150px; }
.rp-preset { text-align: left; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.rp-preset:hover { background: var(--surface); }
.rp-preset.on { background: var(--accent-weak); color: var(--accent); font-weight: 700; }
.rp-cal { padding: 12px 14px 10px; }
.rp-months { display: flex; gap: 22px; }
.rp-month { width: 238px; }
.rp-mhead { display: flex; align-items: center; justify-content: space-between; height: 30px; margin-bottom: 6px; }
.rp-mhead b { font-size: 13px; text-transform: capitalize; }
.rp-nav { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.rp-nav:hover { color: var(--text); background: var(--surface-2); }
.rp-nav svg { width: 15px; height: 15px; }
.rp-nav-sp { width: 28px; }
.rp-grid { display: grid; grid-template-columns: repeat(7, 34px); row-gap: 2px; }
.rp-wd { height: 24px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.rp-day { height: 32px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 0; }
.rp-day.out { cursor: default; }
.rp-day:not(.out):hover { box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 7px; }
.rp-day.today { font-weight: 800; color: var(--accent); }
.rp-day.in { background: var(--accent-weak); }
.rp-day.start, .rp-day.end { background: var(--accent); font-weight: 700; }
.rp-day.start { border-radius: 7px 0 0 7px; }
.rp-day.end { border-radius: 0 7px 7px 0; }
.rp-day.start.end { border-radius: 7px; }
.rp-hint { margin-top: 8px; min-height: 18px; }
@media (max-width: 720px) {
  .rp-panel { flex-direction: column; max-height: calc(100vh - 80px); overflow-y: auto; }
  .rp-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
  .rp-months { flex-direction: column; gap: 10px; }
  .fb-end { width: 100%; justify-content: space-between; }
}
@media (max-width: 720px) {
  .fb-end { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .fb-end .fb-group { border-left: 0; }
  .fb-end > .reset-btn { align-self: flex-start; margin: 0 10px; }
  .rp { width: 100%; }
  .rp-btn { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .rp-dates { overflow: hidden; text-overflow: ellipsis; }
}
/* ---------- Dashboard: People (top of the page) ---------- */
.people-card { margin-bottom: 14px; }
.people-card .card-head { align-items: center; }
.people-count { margin-left: auto; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); font-weight: 700; font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; animation: live-pulse 1.6s ease-out infinite; flex: 0 0 auto; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
.people { display: flex; flex-direction: column; }
.pp-row { display: grid; grid-template-columns: minmax(200px, 2.2fr) 110px 150px 120px minmax(180px, 2.4fr); gap: 16px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--border); cursor: pointer; }
.pp-row:hover { background: var(--surface-2); }
.pp-row .r { text-align: right; }
.pp-headrow { cursor: default; padding-top: 6px; padding-bottom: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.pp-headrow:hover { background: none; }
.pp-row.is-working { box-shadow: inset 3px 0 0 var(--good); background: color-mix(in srgb, var(--good) 5%, transparent); }
.pp-row.is-paused { box-shadow: inset 3px 0 0 var(--text-3); }
.pp-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar-wrap .avatar { width: 34px; height: 34px; font-size: 12px; }
.presence { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2px solid var(--surface); }
.presence.paused { background: var(--text-3); }
.pp-who { display: flex; min-width: 0; }
.pp-who > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sub { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); min-width: 0; }
.pp-sub .sub-code { height: 16px; font-size: 9.5px; }
.pp-sub .dot { width: 7px; height: 7px; flex: 0 0 auto; }
.pp-sub-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pp-last b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pp-last b.live { color: var(--good); }
.pp-when { font-size: 13px; white-space: nowrap; }
.when-live { display: inline-flex; align-items: center; gap: 7px; color: var(--good); font-weight: 700; }
.when-paused { color: var(--text-2); font-weight: 600; }
.pp-total { font-weight: 650; font-size: 14px; }
.pp-projects { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pp-line-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.pp-line { display: flex; gap: 2px; height: 100%; }
.pp-line > div { height: 100%; min-width: 3px; }
.pp-line > div:first-child { border-radius: 4px 0 0 4px; }
.pp-line > div:last-child { border-radius: 0 4px 4px 0; }
.pp-line > div:only-child { border-radius: 4px; }
.pp-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.pp-leg { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.pp-leg .dot { width: 7px; height: 7px; flex: 0 0 auto; }
.pp-leg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
@media (max-width: 1000px) {
  .pp-headrow { display: none; }
  .pp-row { grid-template-columns: 1fr auto; gap: 6px 14px; }
  .pp-person { grid-column: 1; }
  .pp-last { grid-column: 2; grid-row: 1; }
  .pp-when, .pp-total { font-size: 12px; }
  .pp-when { grid-column: 1; }
  .pp-total { grid-column: 2; }
  .pp-total::before { content: 'Total '; color: var(--text-3); font-weight: 500; }
  .pp-projects { grid-column: 1 / -1; }
}
.main.is-loading .people-card { opacity: 0.85; }
.live-badge { white-space: nowrap; }
.people-card .card-head { flex-wrap: wrap; gap: 8px; }
/* Project and description on the same line as the name. */
.pp-who { flex-direction: row; align-items: center; gap: 10px; }
.pp-who > b { flex: 0 0 auto; }
.pp-who > .pp-sub { flex: 1 1 auto; min-width: 0; padding-left: 10px; border-left: 1px solid var(--border); }
@media (max-width: 560px) {
  .pp-who { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pp-who > .pp-sub { padding-left: 0; border-left: 0; width: 100%; }
}
@media (min-width: 1001px) {
  .pp-row { grid-template-columns: minmax(280px, 3.2fr) 100px 140px 110px minmax(170px, 2fr); }
}
/* Dashboard summary: just the total time. */
.summary.single { grid-template-columns: 1fr; }
.summary.single .v { font-size: 26px; }
/* Admins editing a teammate's time (Time tracker) */
.page-head .person-pick { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.person-select { min-width: 200px; width: auto; font-weight: 600; }
.viewing-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--accent-weak); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
.viewing-banner .avatar { width: 28px; height: 28px; font-size: 11px; }
.viewing-banner .btn { margin-left: auto; }
.timerbar.for-other { box-shadow: inset 3px 0 0 var(--accent); }
.pp-entries { margin-left: auto; flex: 0 0 auto; opacity: 0; transition: opacity .12s; }
.pp-row:hover .pp-entries, .pp-entries:focus { opacity: 1; }
@media (hover: none) {
  .pp-entries { opacity: 1; }
}
.pp-noaccess { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; padding: 1px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: var(--text-3); background: var(--surface-2); }
.pp-noaccess svg { width: 10px; height: 10px; }
/* Profile pictures */
img.avatar { object-fit: cover; background: var(--surface-2); padding: 0; display: block; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; }
.pic-body { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pic-preview { flex: 0 0 auto; }
.team-name { display: inline-flex; align-items: center; gap: 9px; }
.team-name .avatar { width: 28px; height: 28px; font-size: 11px; }
/* Profile picture editor */
.crop-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.crop-frame { position: relative; width: 300px; height: 300px; max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.crop-canvas { display: block; cursor: grab; touch-action: none; outline: none; }
.crop-canvas.dragging { cursor: grabbing; }
.crop-canvas:focus-visible + .crop-ring { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55), inset 0 0 0 3px var(--accent); }
/* Darkens outside the circle, which is what people will see. */
.crop-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 255, 255, .85); }
.crop-zoom-row { display: flex; align-items: center; gap: 10px; width: 300px; max-width: 100%; }
.crop-zoom { flex: 1; accent-color: var(--accent); }

/* ================= Workspace tabs (top bar) ================= */
.tabs { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tab.on svg { color: var(--accent); }
#rail a.hidden { display: none; }
@media (max-width: 760px) {
  .tab span { display: none; }
  .tab { padding: 0 10px; }
}

/* ================= Task List: boards page ================= */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.board-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 104px; padding: 12px 14px; border-radius: 12px; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--bc), color-mix(in srgb, var(--bc) 65%, #000)); box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .12s, box-shadow .12s; }
.board-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.board-tile.is-archived { opacity: .55; }
.bt-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; }
.bt-meta { opacity: .85; }
.board-tile.new { align-items: center; justify-content: center; flex-direction: row; gap: 8px; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border-strong); font: inherit; font-weight: 600; cursor: pointer; box-shadow: none; }
.board-tile.new:hover { color: var(--text); }

/* ================= Task List: one board ================= */
.main.main-board { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.bv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.bv-head { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bv-dot { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }
.bv-name { margin: 0; cursor: text; }
.bv-name .inline-input { font-weight: 700; min-width: 240px; }
.bv-search { width: 200px; }
.bv-lane { flex: 1; min-height: 0; display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; overflow-y: hidden; }
.bv-loading { padding: 20px; }
.ls { flex: 0 0 272px; display: flex; flex-direction: column; max-height: 100%; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ls-head { display: flex; align-items: center; gap: 6px; padding: 8px 6px 4px 8px; cursor: grab; user-select: none; }
.ls-grip { color: var(--text-3); font-size: 12px; }
.ls-name { flex: 1; margin: 0; font-weight: 700; padding: 3px 4px; border-radius: 6px; cursor: text; overflow-wrap: anywhere; }
.ls-name:hover { background: var(--surface); }
.ls-name .inline-input { width: 100%; font-weight: 700; }
.ls-count { color: var(--text-3); font-weight: 600; }
.ls-menu { width: 28px; height: 28px; }
.ls-cards { display: flex; flex-direction: column; gap: 7px; padding: 4px 8px 6px; overflow-y: auto; min-height: 8px; }
.ls-foot { padding: 2px 8px 8px; }
.addcard-btn, .addlist-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.addcard-btn:hover { background: var(--surface); color: var(--text); }
.addcard-btn svg, .addlist-btn svg { width: 15px; height: 15px; }
.bv-addlist { flex: 0 0 272px; border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); border: 1px dashed var(--border-strong); padding: 6px; }
.addlist-btn:hover { color: var(--text); }
.composer { display: flex; flex-direction: column; gap: 6px; }
.composer textarea, .composer input { width: 100%; resize: none; }
/* cards */
.cd { position: relative; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 1px rgba(0,0,0,.08); cursor: pointer; user-select: none; touch-action: manipulation; }
.cd:hover { border-color: var(--border-strong); }
.cd:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cd-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cd-label { display: inline-block; min-width: 36px; height: 8px; border-radius: 4px; font-size: 0; }
.cd-label.big { height: auto; min-height: 24px; padding: 3px 10px; font-weight: 700; color: #1d2125; line-height: 18px; }
.cd-title { line-height: 1.35; overflow-wrap: anywhere; }
.cd-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.cd-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cd-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); border-radius: 4px; }
.cd-badge.due { padding: 1px 5px; }
.cd-badge.done { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); padding: 1px 5px; }
.cd-badge.soon { background: color-mix(in srgb, var(--warn) 22%, transparent); color: color-mix(in srgb, var(--warn) 80%, var(--text)); }
.cd-badge.late { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.cd-people { display: flex; margin-left: auto; }
.cd-people .avatar { margin-left: -5px; box-shadow: 0 0 0 2px var(--surface); }
.cd-people .avatar:first-child { margin-left: 0; }
/* dragging */
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; opacity: .95; box-shadow: 0 12px 28px rgba(0,0,0,.28); will-change: transform; }
.ls-ghost { overflow: hidden; }
.drop-ph { opacity: .35; outline: 2px dashed var(--accent); outline-offset: -2px; }
.drop-ph.cd > * { visibility: hidden; }
.drop-ph.ls { background: var(--accent-weak); }
.drop-ph.ls > * { visibility: hidden; }
/* popovers */
.pop { position: fixed; z-index: 120; min-width: 230px; max-width: min(320px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.pop-menu { display: flex; flex-direction: column; gap: 2px; }
.pop-title { font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px 6px; }
.pop-sub { font-size: 12px; color: var(--text-3); padding: 2px 6px; }
.pop-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.pop-item:hover { background: var(--surface-2); }
.pop-item.on { background: var(--accent-weak); }
.pop-item.danger { color: var(--danger); }
.pop-item svg { width: 15px; height: 15px; flex: 0 0 auto; }
.pop-item .avatar { width: 24px; height: 24px; font-size: 10px; }
.pop .swatches { padding: 4px 6px 8px; }
.pop-form { display: flex; flex-direction: column; gap: 8px; }
.label-admin { display: flex; flex-direction: column; gap: 8px; }
.la-row { display: flex; align-items: center; gap: 8px; }
.la-row input { flex: 1; }
.label-color { width: 34px; height: 28px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; flex: 0 0 auto; }
/* card window */
.cw-overlay { align-items: flex-start; overflow-y: auto; padding: 48px 16px; }
.cw { position: relative; width: min(760px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 22px 22px; }
.cw-close { position: absolute; top: 12px; right: 12px; }
.cw-title { width: 100%; resize: none; overflow: hidden; border: 1px solid transparent; background: transparent; font: inherit; font-size: 19px; font-weight: 700; padding: 4px 6px; border-radius: 8px; color: var(--text); }
.cw-title:hover { background: var(--surface-2); }
.cw-title:focus { background: var(--surface); border-color: var(--accent); outline: none; }
.cw-title-wrap { padding-right: 36px; }
.cw-in { display: flex; align-items: center; padding: 2px 6px 0; }
.cw-move { width: auto; height: 28px; padding: 0 8px; font-size: 12.5px; }
.cw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 22px; margin-top: 14px; }
.cw-meta { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 10px; }
.cw-k { font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.cw-people, .cw-labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cw-person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 3px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.cw-person .avatar { width: 22px; height: 22px; font-size: 9px; }
.round-add { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); }
.cw-due { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cw-due .cd-badge { font-size: 12.5px; padding: 3px 8px; }
.cw-section { margin-top: 18px; }
.cw-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.cw-section h3 svg { width: 16px; height: 16px; color: var(--text-2); }
.cw-desc { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 8px; cursor: text; line-height: 1.5; }
.cw-desc:hover { background: var(--surface-2); }
.cw-desc.empty { display: block; width: 100%; min-height: 56px; text-align: left; border: 0; background: var(--surface-2); color: var(--text-2); font: inherit; cursor: pointer; }
.cw-desc-input { width: 100%; resize: vertical; min-height: 120px; }
.cw-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.cw-progress span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.cw-progress span.full { background: var(--good); }
.cw-checks { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.cw-check { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; }
.cw-check:hover { background: var(--surface-2); }
.cw-check-text { flex: 1; cursor: text; overflow-wrap: anywhere; }
.cw-check-text.done { text-decoration: line-through; color: var(--text-3); }
.cw-check-del { opacity: 0; width: 26px; height: 26px; }
.cw-check:hover .cw-check-del, .cw-check-del:focus { opacity: 1; }
.cw-add-item { width: 100%; }
.cw-new-comment, .cw-comment { display: flex; gap: 10px; margin-top: 10px; }
.cw-new-comment .avatar, .cw-comment .avatar { width: 30px; height: 30px; font-size: 11px; flex: 0 0 auto; }
.cw-comment-input { width: 100%; resize: vertical; }
.cw-c-head { display: flex; align-items: baseline; gap: 8px; }
.cw-c-body { margin-top: 3px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cw-c-acts { display: flex; gap: 10px; margin-top: 3px; }
.link-btn.small { font-size: 12px; }
.link-btn.danger { color: var(--danger); }
.cw-side { display: flex; flex-direction: column; gap: 6px; }
.cw-act { justify-content: flex-start; width: 100%; }
.cw-act svg { width: 15px; height: 15px; }
.cw-act.danger { color: var(--danger); }
.cw-created { margin-top: 10px; }
@media (max-width: 720px) {
  .cw-grid { grid-template-columns: 1fr; }
  .cw-side { flex-direction: row; flex-wrap: wrap; }
  .cw-act { width: auto; }
  .bv-search { width: 140px; }
  .ls, .bv-addlist { flex-basis: 85vw; }
}
.board-tile.new svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ================= Personal accent color ================= */
/* theme.js sets --accent-l / --accent-d (and the text color on them) when someone picks a color. */
:root[data-accent] { --accent: var(--accent-l); --accent-text: var(--accent-text-l); }
@media (prefers-color-scheme: dark) {
  :root[data-accent]:not([data-theme='light']) { --accent: var(--accent-d); --accent-text: var(--accent-text-d); }
}
:root[data-accent][data-theme='dark'] { --accent: var(--accent-d); --accent-text: var(--accent-text-d); }
/* The logo and initials follow the accent too. */
.logo, .avatar { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #b06bff)); }
.avatar { color: var(--accent-text); }
.avatar.more { background: var(--surface-3); color: var(--text-2); }
.rp-day.start, .rp-day.end { color: var(--accent-text); }
.accent-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.accent-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; background: var(--sw); cursor: pointer; padding: 0; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.accent-sw:hover { transform: scale(1.08); }
.accent-sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }
.accent-sw.on::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--sw-text, #fff); font-weight: 800; font-size: 14px; }
.accent-custom { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px dashed var(--border-strong); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.accent-custom:hover { color: var(--text); }
.accent-custom .accent-sw { width: 22px; height: 22px; }
.accent-custom input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.accent-preview { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
/* Task List: subtasks with a person, empty project */
.cw-sub-who { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--border-strong); background: none; color: var(--text-3); cursor: pointer; padding: 0; flex: 0 0 auto; opacity: .55; }
.cw-sub-who svg { width: 14px; height: 14px; }
.cw-sub-who.set { border: 0; opacity: 1; }
.cw-sub-who.set .avatar { width: 26px; height: 26px; font-size: 10px; }
.cw-check:hover .cw-sub-who, .cw-sub-who:focus { opacity: 1; }
.cd-people .sub-face { opacity: .55; }
.bv-empty { align-self: center; max-width: 320px; padding: 12px; font-size: 13px; }

/* ================= Task List: ClickUp-style layout (sidebar tree + content) ================= */
.tk-layout { position: relative; display: grid; height: 100%; min-height: 0; transition: grid-template-columns .18s ease; }
.tk-layout.tree-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.tk-tree { overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--border); background: var(--surface); min-width: 0; }
.tk-layout.tree-hidden .tk-tree { padding: 0; border: 0; }
.tk-content { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tk-content.tk-pad { display: block; overflow-y: auto; padding: 18px 24px 48px; }
.tk-tree-toggle { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0; transition: left .18s ease; }
.tk-tree-toggle svg { width: 12px; height: 12px; transform: rotate(180deg); }
.tk-layout.tree-hidden .tk-tree-toggle { left: 11px; }
.tk-layout.tree-hidden .tk-tree-toggle svg { transform: none; }
.tk-tree-toggle:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.tk-tree-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; }
.tk-tree-head .btn.icon { width: 26px; height: 26px; }
.tk-sec { font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.tk-item { display: flex; align-items: center; text-decoration: none; border: 0; background: none; width: 100%; font-family: inherit; cursor: pointer; text-align: left; }
.tk-item:hover { background: var(--surface-2); }
.tk-item.on { background: var(--accent-weak); font-weight: 600; }
.tk-item > svg { flex: 0 0 auto; color: var(--text-2); }
.tk-item.on > svg { color: var(--accent); }
.tk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-count { font-weight: 600; color: var(--text-3); padding: 0 4px; flex: 0 0 auto; }
.tk-count.strong { background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 1px 7px; }
.tk-link { display: flex; align-items: center; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.tk-dot { border-radius: 3px; flex: 0 0 auto; display: inline-block; }
.tk-chev { width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; color: var(--text-3); border-radius: 5px; cursor: pointer; padding: 0; flex: 0 0 auto; }
.tk-chev:hover { background: var(--surface-3); color: var(--text); }
.tk-chev svg { width: 13px; height: 13px; transition: transform .15s; }
.tk-chev.open svg, .tk-chev svg.open { transform: rotate(90deg); }
.tk-cats { margin-left: 18px; border-left: 1px solid var(--border); padding-left: 6px; margin-bottom: 2px; }
.tk-c { color: var(--text-2); }
.tk-none { color: var(--text-3); }
@media (max-width: 760px) {
  /* On phones the tree slides over the content instead of squeezing it. */
  .tk-layout, .tk-layout.tree-hidden { grid-template-columns: 0 minmax(0, 1fr); }
  .tk-layout:not(.tree-hidden) .tk-tree { position: absolute; top: 0; bottom: 0; left: 0; width: 260px; z-index: 5; box-shadow: var(--shadow); padding: 10px 8px 24px; border-right: 1px solid var(--border); }
  .tk-layout:not(.tree-hidden) .tk-tree-toggle { left: 260px; }
}
/* board header: view switch */
.bv-views button { display: inline-flex; align-items: center; gap: 6px; }
.bv-views svg { width: 14px; height: 14px; }
.bv-back { padding: 0 6px; }
.flash { animation: tk-flash 1.4s ease; }
@keyframes tk-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ================= List view ================= */
.bv-lane.as-list { display: block; overflow-y: auto; overflow-x: hidden; }
.lv { min-width: 0; }
.lv-row { display: grid; gap: 12px; align-items: center; padding: 4px 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.lv-row:hover { background: var(--surface-2); }
.lv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lv-row .r { text-align: right; }
.lv-headrow { position: sticky; top: 0; z-index: 2; background: var(--bg); min-height: 32px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; cursor: default; }
.lv-headrow:hover { background: var(--bg); }
.lv-group { margin-top: 14px; border-radius: 10px; }
.lv-ghead { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border-bottom: 2px solid var(--border-strong); }
.lv-ghead .ls-menu { margin-left: auto; }
.lv-title { display: flex; align-items: center; min-width: 0; }
.lv-title .cd-label { min-width: 0; width: 6px; height: 16px; border-radius: 3px; flex: 0 0 auto; }
.lv-people { display: flex; margin: 0; }
.lv-subs { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); }
.lv-subs.done { color: var(--good); }
.lv-bar { width: 54px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; display: inline-block; }
.lv-bar span { display: block; height: 100%; background: var(--accent); }
.lv-subs.done .lv-bar span { background: var(--good); }
.lv-add { padding: 4px 10px 6px 34px; }
.lv-add-input { width: 100%; height: 32px; border: 1px dashed transparent; background: transparent; }
.lv-add-input:hover { border-color: var(--border); }
.lv-addcat { margin-top: 16px; max-width: 300px; }
@media (max-width: 900px) {
  .lv-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .lv-row > :nth-child(4), .lv-row > :nth-child(5), .lv-headrow > :nth-child(4), .lv-headrow > :nth-child(5) { display: none; }
}

/* ================= My tasks ================= */
.mine { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.mine-group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.mine-group.late h2 { color: var(--danger); }
.mine-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "where meta" "title meta" "subs meta"; gap: 2px 14px; align-items: center; padding: 10px 14px; margin-bottom: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.mine-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.mine-where { grid-area: where; display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.mine-title { grid-area: title; }
.mine-title .cd-label { min-width: 0; width: 6px; height: 16px; border-radius: 3px; flex: 0 0 auto; }
.mine-subs { grid-area: subs; display: flex; align-items: center; gap: 5px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-subs svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mine-meta { grid-area: meta; display: flex; align-items: center; gap: 10px; }
.mine-group.done .mine-row { opacity: .6; }
.lv-add .lv-add-input { background: transparent; border: 1px dashed transparent; box-shadow: none; }
.lv-add .lv-add-input:hover { border-color: var(--border); }
.lv-add .lv-add-input:focus { background: var(--surface); border: 1px solid var(--accent); }

/* ================= Top-left workspace switcher (drop-down) ================= */
.ws-switch { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 6px; margin-left: -6px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; min-width: 0; }
.ws-switch:hover, .ws-switch[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); }
.ws-switch .logo { width: 26px; height: 26px; border-radius: 8px; }
.ws-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ws-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.ws-tab { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.ws-tab svg { width: 12px; height: 12px; }
.ws-chev { width: 15px; height: 15px; color: var(--text-3); flex: 0 0 auto; transition: transform .15s; }
.ws-switch[aria-expanded="true"] .ws-chev { transform: rotate(180deg); }
.ws-menu { position: fixed; z-index: 130; width: 290px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.ws-head { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px 6px; }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; color: var(--text); text-decoration: none; }
.ws-item:hover, .ws-item:focus-visible { background: var(--surface-2); outline: none; }
.ws-item.on { background: var(--accent-weak); }
.ws-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: 0 0 auto; }
.ws-item.on .ws-ico { background: var(--accent); color: var(--accent-text); }
.ws-ico svg { width: 17px; height: 17px; }
.ws-lines { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ws-lines b { font-size: 13.5px; }
.ws-lines span { font-size: 12px; color: var(--text-2); }
.ws-item > svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
@media (max-width: 760px) {
  .ws-name { display: none; }
  .ws-tab { font-size: 13px; color: var(--text); }
}

/* ================= Task status ================= */
.st-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font: inherit; font-weight: 700; white-space: nowrap; color: color-mix(in srgb, var(--st) 75%, var(--text)); background: color-mix(in srgb, var(--st) 16%, transparent); border: 1px solid color-mix(in srgb, var(--st) 30%, transparent); }
button.st-pill { cursor: pointer; }
button.st-pill:hover { background: color-mix(in srgb, var(--st) 26%, transparent); }
.st-pill.big { padding: 0 10px; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st); flex: 0 0 auto; display: inline-block; }
.st-caret { font-size: 9px; opacity: .7; }
.ls-status { border-top: 3px solid var(--st); }
.ls-status .ls-head { cursor: default; }
.ls-name.static { cursor: default; }
.ls-name.static:hover { background: none; }
.cd-cat { margin-bottom: 3px; }
.cd-title svg { width: 13px; height: 13px; color: var(--good); vertical-align: -2px; margin-right: 4px; }
.cd.is-done .cd-title, .lv-row.is-done .lv-name { color: var(--text-3); text-decoration: line-through; }
.composer-cat { height: 32px; }
.bv-columns { display: inline-flex; align-items: center; gap: 6px; }
.cw-in { gap: 8px; }
.cw-sep { color: var(--text-3); }
@media (max-width: 900px) {
  .lv-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .lv-row > :nth-child(3), .lv-row > :nth-child(5), .lv-row > :nth-child(6), .lv-headrow > :nth-child(3), .lv-headrow > :nth-child(5), .lv-headrow > :nth-child(6) { display: none; }
  .lv-row > :nth-child(4), .lv-headrow > :nth-child(4) { display: initial; }
}

/* ================= Task List: the project tree replaces the icon column ================= */
body[data-tab="tasks"] .shell, body[data-tab="tasks"] .shell.rail-open { grid-template-columns: 0 1fr; }
/* The icon column stays in the grid (so the page keeps its place) but takes no room. */
body[data-tab="tasks"] #rail { visibility: hidden; width: 0; min-width: 0; padding: 0 !important; border: 0; overflow: hidden; }
body[data-tab="tasks"] .rail-toggle { display: none !important; }
@media (max-width: 720px) {
  body[data-tab="tasks"] .shell { grid-template-rows: 56px 1fr 0; }
}
.tk-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ================= Task List: same text sizes and spacing as the Clocking pages ================= */
/* Base text is 13px everywhere (as in Clocking); small details are 12px, like .small. */
.tk-tree { padding: 12px 10px 24px; }
.tk-tree-head b { font-size: 14px; }
.tk-item { min-height: 36px; font-size: 13px; font-weight: 600; color: var(--text-2); border-radius: 10px; padding: 0 10px; gap: 10px; }
.tk-item:hover { color: var(--text); }
.tk-item.on { color: var(--accent); }
.tk-item > svg { width: 18px; height: 18px; }
.tk-top { padding-left: 10px; gap: 12px; }
.tk-p { padding-left: 4px; }
.tk-link { min-height: 36px; gap: 10px; }
.tk-c { min-height: 32px; font-size: 13px; font-weight: 500; }
.tk-sec { font-size: 12px; padding: 16px 10px 6px; }
.tk-count { font-size: 12px; }
.tk-none { font-size: 12px; padding: 6px 10px; }
.tk-dot { width: 11px; height: 11px; }
.bv-head { padding: 14px 24px; }
.bv-name { font-size: 20px; }
.bv-name .inline-input { font-size: 18px; }
.bv-lane { padding: 16px 24px 24px; }
.bv-lane.as-list { padding: 8px 24px 48px; }
.ls-name { font-size: 14px; }
.ls-count { font-size: 12px; }
.cd { padding: 10px 12px; }
.cd-title { font-size: 13px; font-weight: 600; }
.cd.is-done .cd-title { font-weight: 500; }
.cd-badge { font-size: 12px; }
.cd-badge svg { width: 14px; height: 14px; }
.cd-cat { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.cd-people .avatar { width: 24px; height: 24px; font-size: 10px; }
.addcard-btn, .addlist-btn { font-size: 13px; }
.st-pill { font-size: 12px; height: 22px; padding: 0 8px; }
.st-pill.big { font-size: 13px; height: 28px; }
.lv-row { min-height: 44px; }
.lv-name { font-size: 13px; font-weight: 600; }
.lv-row.is-done .lv-name { font-weight: 500; }
.lv-headrow { font-size: 11px; }
.lv-ghead b { font-size: 14px; }
.lv-subs { font-size: 12px; }
.mine-where { font-size: 12px; }
.mine-title b { font-size: 13px; }
.mine-subs { font-size: 12px; }
.mine-group h2 { font-size: 14px; }
.cw-k { font-size: 12px; }
.cw-person { font-size: 13px; }
.cw-section h3 { font-size: 14px; }
.cd-label.big { font-size: 12px; }
.pop-title { font-size: 12px; }
.pop-item { font-size: 13px; }
.bt-meta { font-size: 12px; }

/* ================= Category icon and color ================= */
.tk-layout { grid-template-columns: 260px minmax(0, 1fr); }
.tk-tree-toggle { left: 260px; }
.cat-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 14px; line-height: 1; flex: 0 0 auto; background: color-mix(in srgb, var(--cc, var(--text-3)) 18%, transparent); }
.cat-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; display: inline-block; }
.cat-dot.cat-none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.tk-c .cat-icon { width: 20px; height: 20px; font-size: 13px; }
.cat-pick { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; flex: 0 0 auto; }
.cat-pick:hover { background: var(--surface-3); }
.ls.has-color { border-top: 3px solid var(--cc); }
.lv-group.has-color .lv-ghead { border-bottom-color: var(--cc); }
.lv-group.has-color .lv-ghead b { color: color-mix(in srgb, var(--cc) 70%, var(--text)); }
.cd-cat { display: flex; align-items: center; gap: 6px; color: color-mix(in srgb, var(--cc, var(--text-3)) 75%, var(--text-2)); }
.cd-cat .cat-icon { width: 18px; height: 18px; font-size: 12px; }
.cat-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 6px; margin-bottom: 8px; }
.cat-ic { height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; cursor: pointer; padding: 0; }
.cat-ic:hover { background: var(--surface-2); }
.cat-ic.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak); background: var(--accent-weak); }
.cat-ic.none, .swatch.none { color: var(--text-3); font-size: 15px; }
.swatch.none { background: var(--surface-2); border: 1px dashed var(--border-strong); display: grid; place-items: center; }
.cat-own { width: 140px; }
.cat-preview { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: color-mix(in srgb, var(--cc, var(--text-3)) 14%, var(--surface-2)); font-weight: 600; }

/* ================= Team and My profile: shared by both tabs, at the top right ================= */
.tb-link { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 16px; color: var(--text-2); font-weight: 600; text-decoration: none; }
.tb-link svg { width: 16px; height: 16px; }
.tb-link:hover { background: var(--surface-2); color: var(--text); }
.tb-link.on, .who-btn.on { background: var(--accent-weak); color: var(--accent); }
.who-btn.on .name { color: var(--accent); }
/* Shared pages are full width: no left menu (like the Task List's own layout). */
body[data-tab="shared"] .shell, body[data-tab="shared"] .shell.rail-open { grid-template-columns: 0 1fr; }
body[data-tab="shared"] #rail { visibility: hidden; width: 0; min-width: 0; padding: 0 !important; border: 0; overflow: hidden; }
body[data-tab="shared"] .rail-toggle { display: none !important; }
@media (max-width: 720px) {
  body[data-tab="shared"] .shell { grid-template-rows: 56px 1fr 0; }
  .tb-link span { display: none; }
  .tb-link { padding: 0 8px; }
}

/* ================= Sidebar: … and + on hover ================= */
.tk-acts { display: none; align-items: center; gap: 2px; flex: 0 0 auto; }
.tk-act { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--text-2); cursor: pointer; }
.tk-act svg { width: 16px; height: 16px; }
.tk-act:hover { background: var(--surface-3); color: var(--text); }
/* While hovering (or using the keyboard, or with its menu open), the buttons replace the count. */
.tk-item:hover > .tk-acts, .tk-item:focus-within > .tk-acts { display: inline-flex; }
.tk-item:hover > .tk-count, .tk-item:focus-within > .tk-count { display: none; }
@media (hover: none) {
  .tk-acts { display: inline-flex; }
  .tk-item > .tk-count { display: none; }
}
.tk-c { padding-right: 6px; }
.tk-c .tk-link { min-height: 32px; gap: 8px; }
.tk-add-cat { padding: 4px 6px 6px 4px; }
.tk-add-cat input { width: 100%; height: 32px; }
.tk-add-link { background: none; border: 0; cursor: pointer; text-align: left; color: var(--accent); font: inherit; font-size: 12px; }

/* ================= Category line icons ================= */
.cat-icon { color: color-mix(in srgb, var(--cc, var(--text-2)) 85%, var(--text)); }
.cat-icon svg { width: 14px; height: 14px; }
.tk-c .cat-icon svg { width: 13px; height: 13px; }
.cd-cat .cat-icon svg { width: 12px; height: 12px; }
.cat-ic { display: grid; place-items: center; color: var(--text-2); }
.cat-ic svg { width: 18px; height: 18px; }
.cat-ic:hover { color: var(--text); }
.cat-ic.on { color: var(--cc, var(--accent)); }

/* ================= Sidebar: drag categories to reorder ================= */
.tk-ghost { top: 0; background: var(--surface); border-radius: 10px; }
.tk-c.drop-ph { opacity: 1; background: var(--accent-weak); outline-offset: -2px; }
.tk-c.drop-ph > * { visibility: hidden; }

/* ================= List view: status first, assign / due date / subtasks from the row ================= */
.lv-row { grid-template-columns: minmax(0, 1fr) 150px 130px 110px 48px; }
.lv-title { gap: 8px; }
.lv-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Status: a round button on the left of the name */
.st-ring { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; border: 2px solid var(--st); color: #fff; }
.st-ring:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 25%, transparent); }
.st-ring.st-doing { background: conic-gradient(var(--st) 0 50%, transparent 50% 100%); }
.st-ring.st-review { background: conic-gradient(var(--st) 0 75%, transparent 75% 100%); }
.st-ring.st-done { background: var(--st); }
.st-ring svg { width: 11px; height: 11px; stroke-width: 3.5; }
/* Status headings inside a category */
.lv-sthead { display: flex; align-items: center; gap: 7px; padding: 10px 10px 4px 36px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--st) 75%, var(--text)); }
.lv-sthead .tk-count { font-weight: 600; letter-spacing: 0; }
/* Subtask chevron and the + that shows on hover */
.lv-subchev, .lv-subchev-gap { width: 18px; height: 18px; flex: 0 0 auto; }
.lv-subchev { display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--text-3); cursor: pointer; }
.lv-subchev:hover { background: var(--surface-3); color: var(--text); }
.lv-subchev svg { width: 14px; height: 14px; transition: transform .15s; }
.lv-subchev svg.open { transform: rotate(90deg); }
.lv-subadd { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; opacity: 0; }
.lv-subadd svg { width: 14px; height: 14px; }
.lv-subadd:hover { color: var(--accent); border-color: var(--accent); }
.lv-row:hover .lv-subadd, .lv-row:focus-within .lv-subadd { opacity: 1; }
/* Assign: faces, then a dashed round + */
.lv-people { align-items: center; gap: 0; }
.lv-assign { width: 24px; height: 24px; margin-left: 4px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text-3); cursor: pointer; opacity: 0; }
.lv-assign svg { width: 13px; height: 13px; }
.lv-assign.empty { opacity: 1; margin-left: 0; }
.lv-row:hover .lv-assign, .lv-assign:focus-visible { opacity: 1; }
.lv-assign:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }
.more-faces { font-size: 11px; color: var(--text-3); margin-left: 4px; }
/* Due date: the whole cell is a button */
.lv-due { display: inline-flex; align-items: center; min-height: 28px; padding: 0 6px; margin-left: -6px; border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--text-3); }
.lv-due:hover { background: var(--surface-3); }
.lv-due-empty { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; opacity: .55; }
.lv-due-empty svg { width: 14px; height: 14px; }
.lv-row:hover .lv-due-empty { opacity: 1; }
.lv-due-pop { min-width: 240px; }
.lv-due-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.lv-due-fields input[type="date"] { flex: 1; }
.lv-due-actions { display: flex; justify-content: space-between; align-items: center; }
button.lv-subs { border: 0; background: none; padding: 4px 0; cursor: pointer; }
button.lv-subs:hover { color: var(--text); }
/* Subtasks under a task */
.lv-subs-box { background: none; }
.lv-sub { cursor: default; min-height: 36px; padding-left: 62px; }
.lv-sub.lv-row:hover { background: var(--surface-2); }
.lv-sub-title { cursor: pointer; font-size: 13px; color: var(--text-2); }
.lv-sub-title input { width: 15px; height: 15px; accent-color: var(--accent); flex: 0 0 auto; }
.lv-sub.is-done .lv-name { text-decoration: line-through; color: var(--text-3); }
.lv-sub-who { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text-3); cursor: pointer; }
.lv-sub-who.set { border: 0; }
.lv-sub-who svg { width: 13px; height: 13px; }
.lv-sub-who .avatar { width: 24px; height: 24px; font-size: 10px; }
.lv-sub-del { opacity: 0; width: 26px; height: 26px; }
.lv-sub:hover .lv-sub-del, .lv-sub-del:focus-visible { opacity: 1; }
.lv-sub-add { display: block; padding: 4px 10px 8px 62px; border-bottom: 1px solid var(--border); }
.lv-sub-input { width: 100%; max-width: 480px; height: 30px; background: transparent; border: 1px dashed transparent; box-shadow: none; }
.lv-sub-input:hover { border-color: var(--border); }
.lv-sub-input:focus { background: var(--surface); border: 1px solid var(--accent); }
.lv-add { padding-left: 62px; }
@media (hover: none) {
  .lv-subadd, .lv-assign, .lv-sub-del { opacity: 1; }
}
@media (max-width: 760px) {
  .lv-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .lv-row > :nth-child(2), .lv-row > :nth-child(3), .lv-headrow > :nth-child(2), .lv-headrow > :nth-child(3) { display: initial; }
  .lv-row > :nth-child(4), .lv-row > :nth-child(5), .lv-headrow > :nth-child(4), .lv-headrow > :nth-child(5) { display: none; }
  .lv-sub, .lv-sub-add, .lv-add { padding-left: 36px; }
}
.lv-due-pop { width: 270px; }
.lv-due-fields { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 6px; }
.lv-due-fields input { width: 100%; min-width: 0; }
.lv-due-actions > :first-child { margin-right: auto; }

/* ================= Custom statuses ================= */
.st-ring { background: conic-gradient(var(--st) 0 calc(var(--fill, 0) * 1%), transparent 0); }
.st-ring.is-done { background: var(--st); }
.modal:has(.stm) { width: min(660px, 100%); }
.stm { min-width: 0; }
.stm-list { display: flex; flex-direction: column; margin: 8px 0 12px; }
.stm-row { display: grid; grid-template-columns: 36px 30px minmax(0, 1fr) 104px 64px 32px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }
.stm-headrow { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; border-bottom: 0; padding-bottom: 0; }
.stm-row.off .stm-name { color: var(--text-3); }
.stm-row.off .stm-color { opacity: .45; }
.stm-use { display: grid; place-items: center; cursor: pointer; }
.stm-use input, .stm-done input { width: 16px; height: 16px; accent-color: var(--accent); }
.stm-color { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.stm-color:hover { background: var(--surface-3); }
.stm-color .st-ring { width: 18px; height: 18px; cursor: pointer; }
.stm-name { height: 32px; min-width: 0; }
.stm-done { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.stm-moves { display: inline-flex; }
.stm-moves .btn { width: 28px; height: 28px; font-size: 14px; }
.stm-add { display: flex; align-items: center; gap: 8px; }
.stm-add input { flex: 1; height: 34px; }
.btn.icon.danger { color: var(--danger); }
@media (max-width: 560px) {
  .stm-row { grid-template-columns: 28px 28px minmax(0, 1fr) 30px; }
  .stm-done, .stm-moves, .stm-headrow > :nth-child(4), .stm-headrow > :nth-child(5) { display: none; }
}

/* ================= Quick category picks ================= */
.cat-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cat-preset { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.cat-preset .cat-icon { width: 20px; height: 20px; }
.cat-preset .cat-icon svg { width: 12px; height: 12px; }
.cat-preset:hover { border-color: var(--cc); color: var(--text); background: color-mix(in srgb, var(--cc) 10%, var(--surface)); }
.cat-preset.on { border-color: var(--cc); color: var(--text); background: color-mix(in srgb, var(--cc) 18%, var(--surface)); box-shadow: inset 0 0 0 1px var(--cc); }
.cat-preset-plus { color: var(--text-3); font-weight: 700; }
.tk-add-cat .cat-presets { gap: 4px; margin: 6px 0 4px; }
.tk-add-cat .cat-preset { height: 24px; font-size: 11.5px; padding-right: 8px; }
.tk-add-cat .cat-preset .cat-icon { width: 18px; height: 18px; }
.composer .cat-presets { margin: 4px 0 8px; }

/* ================= One category shown ================= */
.bv-crumb { color: var(--text-2); text-decoration: none; }
.bv-crumb:hover { color: var(--accent); }
.bv-sep { color: var(--text-3); font-size: 20px; }
.bv-cat { display: inline-flex; align-items: center; gap: 8px; }
.bv-allcats { text-decoration: none; display: inline-flex; align-items: center; }
.tk-c.on { background: var(--accent-weak); }
.tk-c.on .tk-link { color: var(--accent); }

/* ================= Customize quick categories ================= */
.cat-preset-edit { border-style: dashed; color: var(--text-3); padding: 0 10px; }
.cat-preset-edit svg { width: 13px; height: 13px; }
.cat-preset-edit:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-weak); }
.modal:has(.qc) { width: min(520px, 100%); }
.qc-list { display: flex; flex-direction: column; margin: 8px 0 12px; max-height: 50vh; overflow: auto; }
.qc-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 64px 32px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }
.qc-name { height: 32px; min-width: 0; }
.qc-look { width: 32px; height: 32px; }

/* ================= "By status" view: tasks and subtasks as single lines ================= */
.fl-summary { display: flex; flex-direction: column; gap: 10px; padding: 14px 4px 10px; }
.fl-total { font-size: 14px; }
.fl-total b { font-size: 20px; margin-right: 2px; }
.fl-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.fl-bar span { display: block; min-width: 4px; }
.fl-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-count { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: color-mix(in srgb, var(--st) 14%, var(--surface)); font-size: 12px; font-weight: 600; }
.fl-count b { color: color-mix(in srgb, var(--st) 70%, var(--text)); }
.fl-ghead { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-bottom: 2px solid var(--st); }
.fl-ghead b { font-size: 14px; color: color-mix(in srgb, var(--st) 70%, var(--text)); }
.fl-ghead .st-ring { cursor: default; }
.fl-ghead .st-ring:hover { box-shadow: none; }
.fl-empty { padding: 10px 10px 10px 38px; }
.fl-row .lv-title { padding-left: 4px; }
.fl-parent { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-3); }
.fl-sub .lv-name { font-weight: 500; }
.fl-cat { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--cc, var(--text-3)) 75%, var(--text-2)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-cat .cat-icon { width: 18px; height: 18px; }
.fl-cat .cat-icon svg { width: 11px; height: 11px; }
.fl .lv-row { grid-template-columns: minmax(0, 1fr) 140px 120px 140px 16px; }
.cw-check .st-ring { margin: 0 2px; }
@media (max-width: 760px) {
  .fl .lv-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fl .lv-row > :nth-child(n+3), .fl .lv-headrow > :nth-child(n+3) { display: none; }
  .fl-parent { display: none; }
}

/* ================= "+" next to a status: add a task in it ================= */
.st-add { width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0; margin-left: 4px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; text-transform: none; }
.st-add svg { width: 14px; height: 14px; }
.st-add:hover, .st-add:focus-visible { color: var(--st, var(--accent)); border-color: var(--st, var(--accent)); background: color-mix(in srgb, var(--st, var(--accent)) 12%, transparent); }
.st-add-box { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 36px; border-bottom: 1px solid var(--border); }
.st-add-box input { flex: 1; max-width: 520px; height: 32px; border: 1px solid var(--st, var(--accent)); }
.st-add-cat { height: 32px; max-width: 180px; }
.fl .st-add-box { padding-left: 38px; }
.lv-gadd { margin-left: auto; }
.lv-gadd + .ls-menu { margin-left: 0; }
.lv-gadd svg { width: 16px; height: 16px; }

/* ================= Line actions (+ subtask, rename): same spot on every line ================= */
.lv-title { width: 100%; }
.lv-name { flex: 0 1 auto; }
.lv-acts { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding-left: 8px; }
.lv-act { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; opacity: 0; }
.lv-act svg { width: 14px; height: 14px; }
.lv-act:hover { color: var(--accent); border-color: var(--accent); }
.lv-row:hover .lv-act, .lv-row:focus-within .lv-act { opacity: 1; }
.lv-name.editing { flex: 1 1 auto; }
.lv-name .inline-input { width: 100%; height: 30px; font: inherit; }
@media (hover: none) {
  .lv-act { opacity: 1; }
}

/* ================= More room between status groups ================= */
.lv-sthead { margin-top: 18px; padding-top: 6px; padding-bottom: 6px; }
.lv-ghead + .lv-sthead { margin-top: 6px; }
.lv-sthead .st-add { order: 0; }
.fl-group { margin-top: 26px; }
.fl-group:first-of-type { margin-top: 14px; }

/* ================= Teplight logo ================= */
.logo, .auth .logo, .ws-switch .logo { background: url("/logo.svg") center / contain no-repeat; border-radius: 0; }
.brand .logo { width: 24px; height: 24px; }
.lv-group:not(:has(> .lv-ghead)) > .lv-sthead:first-child { margin-top: 4px; }
/* Subtask due date in the task window */
.cw-sub-due { display: inline-flex; align-items: center; min-height: 26px; padding: 0 6px; border: 0; border-radius: 7px; background: none; color: var(--text-3); cursor: pointer; flex: 0 0 auto; }
.cw-sub-due svg { width: 14px; height: 14px; }
.cw-sub-due:hover { background: var(--surface-3); color: var(--text); }
.cw-check:not(:hover) .cw-sub-due:not(.set) { opacity: .45; }

/* ================= My tasks: subtasks as their own lines ================= */
.mine-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mine-title b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-parent { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mine-row.is-done b { color: var(--text-3); text-decoration: line-through; }
.mine-sub b { font-weight: 600; }

/* ================= List view: drag a line ================= */
.lv-row[data-card] { cursor: grab; }
.lv-row.lv-dragging { opacity: .35; }
.lv-ghost { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); transform-origin: left center; }
.lv-drop-marker { position: fixed; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak); z-index: 95; pointer-events: none; }

/* ================= Task history ================= */
.cw-history-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 0; border: 0; background: none; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.cw-history-toggle svg { width: 16px; height: 16px; color: var(--text-2); }
.cw-history-toggle .muted { margin-left: auto; font-weight: 500; }
.cw-acts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cw-acts li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.cw-acts .avatar { width: 22px; height: 22px; font-size: 9px; flex: 0 0 auto; }
.cw-act-text { flex: 1; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.cw-act-text b { color: var(--text); }
.cw-act-when { flex: 0 0 auto; white-space: nowrap; }

/* ================= Archived items ================= */
.modal:has(.arch) { width: min(560px, 100%); }
.arch h3 { font-size: 13px; margin: 14px 0 6px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.arch h3:first-child { margin-top: 0; }
.arch-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.arch-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= Drag subtasks / "By status" lines ================= */
.lv-sub[data-sub], .fl-row { cursor: grab; }
.lv-drop-marker.hidden { display: none; }
.fl-group.drop-into { outline: 2px dashed var(--st); outline-offset: 2px; border-radius: 8px; background: color-mix(in srgb, var(--st) 7%, transparent); }

/* ================= My tasks: show / group by, clearer subtasks ================= */
.mine-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.mine-bar .grow { flex: 1; }
.mine-tag { flex: 0 0 auto; height: 18px; padding: 0 7px; border-radius: 9px; display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); background: var(--accent-weak); }
.mine-sub { border-left: 3px solid var(--accent-weak); }
.mine-parent-name { color: var(--text-2); font-weight: 600; }
.mine-group h2 .tk-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 8px; }

/* ================= Clocking <-> tasks ================= */
.tb-tasks { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.tb-task-btn { height: 34px; gap: 6px; color: var(--text-2); }
.tb-task-btn svg { width: 16px; height: 16px; }
.task-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.task-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 240px; height: 26px; padding: 0 4px 0 8px; border-radius: 13px; background: color-mix(in srgb, var(--bc) 14%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc) 35%, transparent); font-size: 12px; font-weight: 600; }
.task-chip-name { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--text); text-decoration: none; }
.task-chip-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-chip-name svg { width: 12px; height: 12px; flex: 0 0 auto; color: var(--bc); }
.task-chip-name:hover { text-decoration: underline; }
.task-chip-sub { color: var(--bc); font-weight: 700; }
.task-chip-x { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-3); cursor: pointer; }
.task-chip-x svg { width: 11px; height: 11px; }
.task-chip-x:hover { background: var(--surface-3); color: var(--text); }
.task-chips.compact .task-chip { height: 20px; font-size: 11px; padding-right: 8px; }
.entry .d-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.entry .d-col .d { min-width: 0; }
/* task picker */
.tp { display: flex; flex-direction: column; gap: 8px; }
.tp input { height: 34px; }
.tp-list { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.tp-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.tp-item:hover { background: var(--surface-2); }
.tp-item.on { background: var(--accent-weak); }
.tp-check { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 5px; border: 1.5px solid var(--border-strong); color: #fff; }
.tp-check.on { background: var(--accent); border-color: var(--accent); }
.tp-check svg { width: 12px; height: 12px; stroke-width: 3; }
.tp-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tp-where { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-where .tk-dot { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.tp-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sub { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); background: var(--accent-weak); padding: 1px 6px; border-radius: 8px; }
.tp-mine { font-size: 11px; font-weight: 600; color: var(--text-3); }
.tp-empty { padding: 10px 4px; }
.tp-foot { display: flex; justify-content: flex-end; }
/* Task List: clock on tasks */
.lv-clock.on, .cw-sub-clock.on, .mine-clock.on { color: var(--accent); border-color: var(--accent); opacity: 1; }
.lv-extra { display: inline-flex; gap: 6px; justify-content: flex-end; align-items: center; }
.lv-row .r.lv-extra { min-width: 0; }
.cw-act.on-timer { color: var(--accent); border-color: var(--accent); opacity: 1; }
.cw-sub-clock { width: 26px; height: 26px; flex: 0 0 auto; }
.cw-check:not(:hover) .cw-sub-clock:not(.on) { opacity: .45; }
.mine-clock { width: 28px; height: 28px; }
.pop:has(.tp) { max-width: min(440px, calc(100vw - 16px)); max-height: 70vh; overflow-x: hidden; }
.tp { width: min(420px, calc(100vw - 40px)); }

/* ================= Sidebar: + next to "Projects"; tasks' "Add" box lines up with tasks ================= */
.tk-tree { padding-top: 10px; }
.tk-sec-row { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.tk-sec-add { width: 26px; height: 26px; color: var(--text-2); }
.tk-sec-add svg { width: 16px; height: 16px; }
/* "+ Add a task" starts where task lines start (subtasks are indented further). */
.lv-add, .lv-group .lv-add { padding-left: 10px; }
.st-add-box, .fl .st-add-box { padding-left: 10px; }
@media (max-width: 760px) {
  .lv-add { padding-left: 10px; }
}

/* ================= All projects: every task ================= */
.gv-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.gv-tools .bv-search { width: 220px; }
.gv-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 110px 120px 40px; gap: 12px; align-items: center; min-height: 48px; padding: 4px 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.gv-row:hover { background: var(--surface-2); }
.gv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gv-row .r { text-align: right; }
.gv-headrow { position: sticky; top: 0; z-index: 2; background: var(--bg); min-height: 32px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; cursor: default; }
.gv-headrow:hover { background: var(--bg); }
.gv-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gv-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.gv-text b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gv-row.is-done .gv-text > b, .gv-row.is-done .gv-subline b { color: var(--text-3); text-decoration: line-through; }
.gv-where, .gv-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gv-where .tk-dot { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.gv-where b { color: var(--text-2); font-size: 11.5px; }
.gv-cat { color: color-mix(in srgb, var(--cc, var(--text-3)) 75%, var(--text-2)); font-weight: 600; }
.gv-cat .cat-icon { width: 16px; height: 16px; }
.gv-cat .cat-icon svg { width: 10px; height: 10px; }
.gv-subline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gv-sub { border-left: 3px solid var(--accent-weak); }
.gv-row > span:nth-child(4) { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.gv-clock { width: 28px; height: 28px; opacity: .5; }
.gv-row:hover .gv-clock, .gv-clock.on { opacity: 1; }
.gv-clock.on { color: var(--accent); }
.gv-group { margin-top: 18px; }
.gv-ghead { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border-bottom: 2px solid var(--bc); }
.gv-ghead .tk-dot { width: 11px; height: 11px; border-radius: 3px; }
.gv-pname { font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; }
.gv-pname:hover { color: var(--accent); }
.gv-none { padding: 10px 12px; }
@media (max-width: 760px) {
  .gv-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .gv-row > :nth-child(2), .gv-row > :nth-child(4) { display: none; }
  .gv-tools .bv-search { width: 100%; }
}
/* Settings → Task List → hide the "SUBTASK" tag */
.no-sub-tag .mine-tag, .no-sub-tag .tp-sub { display: none; }
/* Task picker: filters and groups */
.tp-filters { display: flex; gap: 6px; align-items: center; }
.tp-sel { flex: 1 1 0; min-width: 0; height: 32px; }
.tp-mine-filter { flex: 0 0 auto; font-size: 12px; }
.tp-group-head { display: flex; align-items: center; gap: 7px; margin-top: 8px; padding: 6px 6px 4px; font-size: 12.5px; font-weight: 700; color: var(--text); border-bottom: 2px solid var(--bc, var(--border)); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.tp-group-head:first-child { margin-top: 0; }
.tp-group-head .tk-dot { width: 9px; height: 9px; border-radius: 3px; }
.tp-linked { color: var(--accent); border-bottom-color: var(--accent); }
.tp-cat-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 2px; font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--cc, var(--text-3)) 75%, var(--text-2)); }
.tp-cat-head .cat-icon { width: 18px; height: 18px; }
.tp-cat-head .cat-icon svg { width: 11px; height: 11px; }
.tp-item.is-sub { padding-left: 30px; }
.tp-parent { font-weight: 500; font-size: 11.5px; color: var(--text-3); margin-left: 4px; }
