/* VetrexTask – stylesheet. Plain, dense, tool-like. No webfonts, no frameworks. */

:root {
  --accent: #5b27d9;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --hover: #f3f2ee;
  --border: #e3e0d9;
  --border-strong: #cdc9bf;
  --text: #1d1c1a;
  --text-2: #66625b;
  --text-3: #98938a;
  --ink: #1d1c1a;
  --ink-text: #ffffff;
  --success: #2f7d32;
  --warning: #b8650a;
  --danger: #c92a2a;
  --shadow-pop: 0 8px 28px rgba(29, 28, 26, .16), 0 1px 3px rgba(29, 28, 26, .08);
  --r: 6px;
  --r-sm: 4px;
  --sidebar: 224px;
  --font: system-ui, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121211;
  --surface: #191918;
  --surface-2: #20201e;
  --hover: #232321;
  --border: #2c2b28;
  --border-strong: #3b3a36;
  --text: #ecebe6;
  --text-2: #a29e96;
  --text-3: #6f6b64;
  --ink: #ecebe6;
  --ink-text: #121211;
  --success: #51a356;
  --warning: #e09a3c;
  --danger: #e5534b;
  --shadow-pop: 0 10px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

:root[data-accent="orange"] { --accent: #d9480f; }
:root[data-accent="blue"] { --accent: #1c6fd1; }
:root[data-accent="violet"] { --accent: #5b27d9; }
:root[data-accent="green"] { --accent: #2f7d32; }
:root[data-accent="red"] { --accent: #c92a2a; }
:root[data-accent="cyan"] { --accent: #0b7285; }
:root[data-theme="dark"][data-accent="orange"] { --accent: #f2711c; }
:root[data-theme="dark"][data-accent="blue"] { --accent: #4c94e8; }
:root[data-theme="dark"][data-accent="violet"] { --accent: #8f6cf5; }
:root[data-theme="dark"][data-accent="green"] { --accent: #51a356; }
:root[data-theme="dark"][data-accent="red"] { --accent: #e5534b; }
:root[data-theme="dark"][data-accent="cyan"] { --accent: #22a3b8; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 20px; letter-spacing: -.01em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 13px; height: 13px; }
.icon.lg { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------------------ layout */

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 14px 10px; background: var(--bg); border-right: 1px solid var(--border);
}
.wordmark { display: flex; align-items: center; gap: 8px; padding: 2px 8px 16px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.wordmark::before { content: ""; width: 22px; height: 22px; flex: none; background: url(img/logo.png) center / contain no-repeat; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--r-sm); position: relative;
  color: var(--text-2); text-decoration: none; border: 0; background: none; width: 100%; cursor: pointer; text-align: left; font-size: 13.5px;
}
.nav-item .icon { color: var(--text-3); }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { color: var(--text); font-weight: 600; background: var(--surface-2); }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); }
.nav-item.active .icon { color: var(--text); }
.nav-item .count, .nav-item .kbd { margin-left: auto; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; border-top: 1px solid var(--border); font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 28px; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar .search-box { max-width: 360px; flex: 1; }
.content { padding: 22px 28px 96px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-3); margin-left: 10px; font-size: 13px; font-weight: 400; }
.page-head > div > .sub { margin-left: 0; margin-top: 3px; }
.tabbar, .mobile-only { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { padding: 8px 14px; }
  .content { padding: 16px 14px 92px; }
  .mobile-only { display: inline-flex; }
  .topbar .new-label { display: none; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface);
    border-top: 1px solid var(--border); padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0;
    font-size: 11px; color: var(--text-3); text-decoration: none; background: none; border: 0; cursor: pointer;
  }
  .tabbar .active { color: var(--text); font-weight: 600; }
}

/* ------------------------------------------------------------------ controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.btn.primary:hover { opacity: .88; }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12.5px; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.sm.icon-only { width: 26px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.link-btn { border: 0; background: none; padding: 0; color: var(--text-2); cursor: pointer; font-size: 12.5px; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.link-btn:hover { color: var(--text); }

.input, select.input, textarea.input {
  width: 100%; height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); outline: none;
}
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input::placeholder { color: var(--text-3); }
input[type="range"].input { border: 0; box-shadow: none; padding: 0; accent-color: var(--accent); }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box .input { padding-left: 30px; }
.kbd { font-family: var(--mono); font-size: 10.5px; padding: 0 5px; border: 1px solid var(--border); border-radius: 3px; color: var(--text-3); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.checkbox-line { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-line input { width: 15px; height: 15px; accent-color: var(--accent); }

.segmented { display: inline-flex; align-self: flex-start; width: fit-content; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.segmented button { border: 0; border-right: 1px solid var(--border-strong); background: var(--surface); padding: 5px 12px; cursor: pointer; color: var(--text-2); font-size: 13px; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--ink); color: var(--ink-text); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search-box { width: 240px; }
.toolbar select.input { width: auto; min-width: 140px; }
@media (max-width: 640px) { .toolbar .search-box, .toolbar select.input { width: 100%; } }

/* ------------------------------------------------------------------ panels & lists */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); font-weight: 600; }
.card-head a, .card-head .small { font-size: 12px; color: var(--text-3); }
.card-body { padding: 4px 14px 8px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); align-items: start; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
@media (max-width: 640px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

/* Key figures: one strip instead of icon cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 14px; }
.kpi { padding: 12px 16px; border-right: 1px solid var(--border); text-decoration: none; color: inherit; display: block; }
.kpi:last-child { border-right: 0; }
a.kpi:hover { background: var(--hover); }
.kpi-value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.kpi-value.alert { color: var(--danger); }
.kpi-label { font-size: 12px; color: var(--text-2); }
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-bottom: 1px solid var(--border); }
  .kpi:nth-child(2n) { border-right: 0; }
}

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--border); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row.clickable { cursor: pointer; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.row.clickable:hover { background: var(--hover); }
.row-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-2); font-size: 12px; margin-top: 1px; align-items: center; }
.row-meta span { display: inline-flex; align-items: center; gap: 4px; }
.row-time { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.group-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 14px 0 2px; display: flex; gap: 6px; align-items: baseline; }
.group-title .n { font-family: var(--mono); font-weight: 400; }
.group-title.danger { color: var(--danger); }
.colorbar { width: 3px; align-self: stretch; border-radius: 2px; flex: none; min-height: 18px; }

/* Project table */
.ptable { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.prow {
  display: grid; grid-template-columns: 3px minmax(0, 2.4fr) minmax(0, 1fr) 150px 90px 70px; gap: 14px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; color: inherit; text-decoration: none;
}
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--hover); }
.prow.head { cursor: default; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding-top: 8px; padding-bottom: 8px; }
.prow.head:hover { background: none; }
.prow .name { font-weight: 500; }
.prow .sub { font-size: 12px; color: var(--text-2); }
.prow .num { font-family: var(--mono); font-size: 12px; color: var(--text-2); text-align: right; }
.progress-cell { display: flex; align-items: center; gap: 8px; }
.progress-cell .mono { width: 34px; text-align: right; color: var(--text-2); }
@media (max-width: 760px) {
  .prow { grid-template-columns: 3px minmax(0, 1fr) 70px; }
  .prow > :nth-child(3), .prow > :nth-child(4), .prow > :nth-child(5) { display: none; }
  .prow.head { display: none; }
}

/* Status / tags: text with a small square, no tinted pills */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); white-space: nowrap; line-height: 1.4; }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--c, currentColor); flex: none; }
.badge.boxed { border: 1px solid var(--border-strong); border-radius: 3px; padding: 0 6px; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; text-align: center; line-height: 18px; }
.prio-high { color: var(--warning); font-weight: 600; font-size: 12px; }
.prio-critical { color: var(--danger); font-weight: 700; font-size: 12px; }
.chip-list { display: flex; gap: 4px 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); background: none; border: 0; padding: 0; text-decoration: none; }
a.chip:hover { color: var(--text); text-decoration: underline; }
button.chip { cursor: pointer; border: 1px solid var(--border-strong); border-radius: 3px; padding: 2px 8px; background: var(--surface); }
button.chip.active { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }

.progress { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; flex: 1; }
.progress > div { height: 100%; background: var(--accent); }

.checkbox {
  width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid var(--border-strong); background: var(--surface); flex: none;
  display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink-text);
}
.checkbox:hover { border-color: var(--text-2); }
.checkbox.done { background: var(--ink); border-color: var(--ink); }
.checkbox .icon { width: 11px; height: 11px; stroke-width: 3; }
.task-title.done { text-decoration: line-through; color: var(--text-3); }
.overdue { color: var(--danger) !important; }
.due-today { color: var(--warning) !important; }

.empty { padding: 18px 0; color: var(--text-2); }
.empty strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; }
.empty .btn, .empty .link-btn { margin-top: 10px; }

.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 0; cursor: pointer; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; }
.tabs button.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 5px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.back { font-size: 12.5px; color: var(--text-3); display: inline-block; margin-bottom: 10px; text-decoration: none; }
.back:hover { color: var(--text); }
.mark { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; border: 1px solid var(--border); background: var(--surface); }

/* ------------------------------------------------------------------ dialogs, menus, toasts */

.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(18, 18, 17, .45); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 14px 14px; overflow-y: auto; }
.modal { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; }
.modal.wide { max-width: 780px; }
.modal.narrow { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.modal-foot .left { margin-right: auto; }

.menu { position: fixed; z-index: 120; min-width: 190px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); padding: 4px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: none; border-radius: 3px; cursor: pointer; text-align: left; font-size: 13.5px; }
.menu button .icon { color: var(--text-3); }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; }
@media (max-width: 900px) { .toasts { bottom: 76px; } }
.toast { padding: 8px 14px; border-radius: var(--r-sm); background: var(--ink); color: var(--ink-text); font-size: 13px; box-shadow: var(--shadow-pop); max-width: min(460px, calc(100vw - 28px)); }
.toast.error { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------------ auth & install */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 14px; }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth-card .wordmark { padding: 0 0 6px; font-size: 17px; }
.auth-card .wordmark::before { width: 26px; height: 26px; }
.auth-card h2 { font-size: 18px; }
.auth-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.auth-foot { font-size: 13px; color: var(--text-2); }
.notice { padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.notice.warn { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
.notice.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.notice.ok { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.install-card { max-width: 560px; }
.install-form { display: flex; flex-direction: column; gap: 12px; }
.install-form h3 { margin-top: 8px; }
.install-submit { width: 100%; }
.check-ok { color: var(--success); }
.check-bad { color: var(--danger); }

/* ------------------------------------------------------------------ calendar */

.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head h2 { min-width: 150px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-dow { padding: 5px 6px; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 96px; padding: 4px 5px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; background: var(--surface); }
.cal-day:hover { background: var(--hover); }
.cal-day.other { background: var(--bg); }
.cal-day.other .num { color: var(--text-3); }
.cal-day .num { font-size: 12px; font-family: var(--mono); color: var(--text-2); }
.cal-day.today .num { color: var(--accent); font-weight: 700; }
.cal-day.selected { box-shadow: inset 0 0 0 1.5px var(--text); }
.cal-item { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.cal-item::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--c, var(--accent)); flex: none; }
.cal-more { font-size: 11px; color: var(--text-3); }
.cal-dot { display: none; width: 5px; height: 5px; border-radius: 1px; background: var(--accent); }
@media (max-width: 900px) { .cal-layout { grid-template-columns: 1fr !important; } }
@media (max-width: 700px) { .cal-day { min-height: 54px; } .cal-item, .cal-more { display: none; } .cal-dot { display: block; } }

/* ------------------------------------------------------------------ charts */

.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 8px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar { width: 100%; max-width: 36px; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 1px; }
.bars .bar-label { font-size: 10.5px; color: var(--text-3); white-space: nowrap; font-family: var(--mono); }
.bars .bar-value { font-size: 11px; color: var(--text-2); font-family: var(--mono); }
.hbar { display: grid; grid-template-columns: 120px 1fr 36px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.hbar .track { height: 6px; background: var(--surface-2); border-radius: 1px; overflow: hidden; }
.hbar .fill { height: 100%; }
.hbar strong { font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--text-2); text-align: right; }

/* ------------------------------------------------------------------ misc */

.color-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 3px; border: 0; cursor: pointer; padding: 0; outline-offset: 2px; }
.swatch.active { outline: 2px solid var(--text); }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, 32px); gap: 4px; }
.icon-picker button { width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-picker button.active { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.subtask-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.subtask-row .input { height: 28px; }
.quick-add { display: flex; gap: 6px; margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th { text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table tr:last-child td { border-bottom: 0; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--text-3); font-size: 13px; }
.settings-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: 0; }
.settings-section .title { font-weight: 600; }
.settings-section .desc { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
@media (max-width: 760px) { .settings-section { grid-template-columns: 1fr; gap: 10px; } }
.catalog { border: 1px solid var(--border); border-radius: var(--r); padding: 10px 14px; background: var(--surface); }
.catalog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Settings page: sections are separated by rules inside one card */
.card-pad.settings { padding-top: 0; padding-bottom: 0; }
.mark.sm { width: 26px; height: 26px; }
.note-row { align-items: flex-start; }
.note-body { font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; max-height: 3.2em; overflow: hidden; margin-top: 2px; }

/* Shared projects */
.member-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.member-add .input { flex: 1 1 260px; max-width: 420px; }
.row-meta .assignee { color: var(--text); }
