/* Прогресс проектов.
   Раскладка: шапка с вкладками → сводка (главная цифра + график) → сетка проектов → детали.
   Нейтральные цвета чуть уходят в синеву; у каждого проекта свой цвет (--c) из фиксированной палитры. */
:root {
  color-scheme: light;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e8ebf0;
  --border: #e3e6ec;
  --border-strong: #cdd2db;
  --text: #11151c;
  --text-2: #4a5263;
  --text-3: #6e7687;
  --accent: #2a78d6;
  --accent-hover: #256abf;
  --accent-soft: #e6effb;
  --accent-text: #1c5cab;
  --grid: #eceef2;
  --good: #0ca30c;
  --good-soft: #e3f5e3;
  --good-text: #006300;
  --warning: #fab219;
  --warning-soft: #fff3d6;
  --warning-text: #8a5a00;
  --critical: #d03b3b;
  --critical-soft: #fbe6e6;
  --critical-text: #b42c2c;
  --idea: #a4aab6;
  --planned: #86b6ef;
  --progress: #2a78d6;
  /* цвета проектов — категориальная палитра, порядок фиксирован */
  --p1: #2a78d6; --p2: #eb6834; --p3: #1baf7a; --p4: #eda100;
  --p5: #e87ba4; --p6: #008300; --p7: #6250d6; --p8: #e34948;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-hover: 0 4px 16px rgba(16, 24, 40, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d1015;
    --surface: #151a21;
    --surface-2: #1b2129;
    --surface-3: #232a34;
    --border: #252c36;
    --border-strong: #353e4a;
    --text: #e8ecf1;
    --text-2: #a9b2bf;
    --text-3: #808a98;
    --accent: #3987e5;
    --accent-hover: #5598e7;
    --accent-soft: #16273d;
    --accent-text: #86b6ef;
    --grid: #1f252e;
    --good-soft: #10291a;
    --good-text: #4cc44c;
    --warning-soft: #2c2410;
    --warning-text: #fab219;
    --critical-soft: #2e1618;
    --critical-text: #e66767;
    --idea: #5f6774;
    --planned: #256abf;
    --progress: #6da7ec;
    --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500;
    --p5: #d55181; --p6: #0ca30c; --p7: #9085e9; --p8: #e66767;
    --shadow: none;
    --shadow-hover: 0 0 0 1px var(--border-strong);
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 24px; line-height: 1.2; }
h2 { font-size: 16px; }
h3 { font-size: 13.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.sm { width: 14px; height: 14px; vertical-align: -2px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { max-width: 1320px; margin: 0 auto; height: 58px; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a {
  display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--text-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.sync { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.dot.stale { background: var(--warning); }
.dot.off { background: var(--idea); }
.dot.busy { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: .5; cursor: default; }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.user { position: relative; }
.user > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 99px; }
.user > summary::-webkit-details-marker { display: none; }
.user > summary:hover { background: var(--surface-2); }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 650; font-size: 12px; flex: none;
}
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
}
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 6px;
  border: 0; background: none; color: var(--text); text-align: left; cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }

main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { margin-top: 6px; color: var(--text-2); }
.crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.crumbs a { color: var(--text-2); }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px;
  padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; color: var(--text);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--critical-text); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
  height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  min-width: 0; transition: border-color .12s;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 96px; width: 100%; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); font-weight: 550; }
label.field > input, label.field > select, label.field > textarea { font-size: 14px; color: var(--text); font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* ---------- поверхности ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.list-card { padding: 2px 18px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 36px 0 14px; }
.section-title .count { color: var(--text-3); font-weight: 500; font-size: 13px; }
.section-title.first { margin-top: 0; }

/* ---------- метки ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good-text); }
.pill.warn { background: var(--warning-soft); color: var(--warning-text); }
.pill.bad { background: var(--critical-soft); color: var(--critical-text); }
.pill.neutral { background: var(--surface-2); color: var(--text-2); }
.pill .dot { width: 6px; height: 6px; }
.pill.good .dot { background: var(--good); }
.pill.neutral .dot { background: var(--idea); }

/* монограмма и метка проекта */
.mono-tag {
  --c: var(--p1);
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 72%, var(--text));
  font-weight: 700; font-size: 13px; letter-spacing: -.02em;
}
.mono-tag.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 19px; }
.mono-tag.xs { width: 20px; height: 20px; border-radius: 5px; font-size: 10px; }
.proj-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
a.proj-chip:hover { color: var(--text); text-decoration: none; }
.proj-chip i { --c: var(--p1); width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }

/* ---------- сводка ---------- */
.hero { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 28px; align-items: stretch; padding: 22px 24px; }
.hero .label { color: var(--text-2); font-weight: 550; }
.hero .big { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin: 12px 0 10px; }
.hero .chart-side { min-width: 0; display: flex; flex-direction: column; }
.hero .chart-side .cap { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--border); }
.stat { padding: 14px 24px; display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat .v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.stat .l { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- сетка проектов ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.general-card { background: transparent; border-style: dashed; box-shadow: none; }
.general-card .mono-tag svg.i { width: 17px; height: 17px; }
.general-card .list li { padding: 8px 0; }
@media (max-width: 440px) { .projects { grid-template-columns: 1fr; } }
.project-card {
  --c: var(--p1);
  display: flex; flex-direction: column; gap: 16px; cursor: pointer; padding: 18px;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.project-card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-head .name { min-width: 0; flex: 1; }
.pc-head h2 a { color: var(--text); }
.pc-head .meta { font-size: 12px; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-desc { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; margin-top: -4px; }
.pc-metrics { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: end; }
.pc-metrics .big { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.pc-metrics .cap { font-size: 12px; color: var(--text-3); margin-top: 6px; white-space: nowrap; }
.pc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.pc-facts .k { color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.pc-facts .v { margin-top: 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-facts > div { min-width: 0; }
.pc-last { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.pc-last a { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-plans { background: var(--surface-2); border-radius: 10px; padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; }
.pc-plans .head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.pc-plans .head b { font-weight: 600; }
.pc-plans ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.pc-plans li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.pc-plans li .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.pc-plans.empty { flex-direction: row; align-items: center; color: var(--text-3); font-size: 12.5px; }

/* ---------- планы: полоса и статусы ---------- */
.segbar { display: flex; gap: 2px; height: 6px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.segbar > span { display: block; height: 100%; }
.seg-done { background: var(--good); }
.seg-in_progress { background: var(--progress); }
.seg-planned { background: var(--planned); }
.seg-idea { background: var(--idea); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; white-space: nowrap; color: var(--text-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status.idea::before { background: var(--idea); }
.status.planned::before { background: var(--planned); }
.status.in_progress::before { background: var(--progress); box-shadow: 0 0 0 3px color-mix(in srgb, var(--progress) 22%, transparent); }
.status.done::before { background: var(--good); }
.status.dropped::before { border: 1.5px solid var(--idea); width: 5px; height: 5px; }
/* срочность: «срочно» — янтарная метка со значком, «не срочно» — приглушённая; «обычно» без метки */
.urg { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.urg.urgent { color: var(--warning-text); }
.urg.urgent svg.i { fill: var(--warning); stroke: var(--warning-text); }
.urg.low { color: var(--text-3); font-weight: 500; }
.list .urg { margin-left: auto; padding-left: 8px; }
.err { color: var(--critical-text); font-size: 12.5px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; }
.notice.bad { background: var(--critical-soft); color: var(--critical-text); }
.notice.info { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- графики ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .bar { fill: var(--c, var(--accent)); }
.chart .bar.dim { fill: color-mix(in srgb, var(--c, var(--accent)) 40%, var(--surface)); }
.chart .hit { fill: transparent; }
.chart g.col:hover .bar { fill: color-mix(in srgb, var(--c, var(--accent)) 78%, var(--text)); }
.chart g.col:hover .hit { fill: var(--surface-2); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--border-strong); stroke-width: 1; }
.chart text { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--font); }
.charts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .charts-2 { grid-template-columns: 1fr; } }
details.table-view summary { cursor: pointer; font-size: 12px; color: var(--text-3); margin-top: 10px; width: max-content; }
details.table-view table { margin-top: 8px; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--text); color: var(--bg); border-radius: 8px; padding: 7px 10px;
  font-size: 12px; line-height: 1.4; max-width: 280px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.tooltip b { font-weight: 650; font-size: 13px; }

/* ---------- страница проекта ---------- */
.proj-head { --c: var(--p1); display: flex; gap: 16px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.proj-head .titles { flex: 1; min-width: 240px; }
.proj-head .sub { color: var(--text-2); margin-top: 4px; }
.strip { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 16px; }
.strip .stat:first-child { padding-left: 20px; }
@media (max-width: 900px) { .strip { grid-template-columns: 1fr 1fr; } .strip .stat { border-left: 0 !important; border-top: 1px solid var(--border); } .strip .stat:nth-child(-n+2) { border-top: 0; } }

/* ---------- доска планов ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr; } }
.column { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 130px; display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .12s, background .12s; }
.column.drop { border: 1px dashed var(--accent); background: var(--accent-soft); }
.column-head { display: flex; align-items: center; gap: 6px; padding: 4px 6px 12px; }
.column-head .count { color: var(--text-3); font-weight: 500; font-size: 12px; margin-left: auto; background: var(--surface); border-radius: 99px; padding: 0 7px; min-width: 22px; text-align: center; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.plan-card {
  --c: var(--p1);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px;
  cursor: grab; box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s;
}
.plan-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.plan-card.dragging { opacity: .4; }
.plan-card .t { font-weight: 550; word-break: break-word; line-height: 1.4; }
.plan-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.plan-card .who { display: inline-flex; align-items: center; gap: 5px; }
.plan-card .who .avatar { width: 18px; height: 18px; font-size: 9.5px; }
.column .empty-col { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 18px 10px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.pr-link { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; white-space: nowrap; font-weight: 550; }
.pr-link.merged { color: var(--good-text); }
.pr-link.open { color: var(--accent-text); }
.pr-link.closed, .pr-link.unknown { color: var(--text-3); }
.add-plan { width: 100%; justify-content: center; margin-top: 8px; }

/* ---------- списки ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--surface-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: center; }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover .what { color: var(--accent-text); }
.list .when { color: var(--text-3); font-size: 12px; white-space: nowrap; margin-left: auto; padding-left: 8px; }
.list .what { min-width: 0; flex: 1; }
.list .what .sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.prnum { font-family: var(--mono); font-size: 12px; color: var(--text-3); flex: none; min-width: 42px; }
a.prnum:hover { color: var(--accent-text); }
.cols-side { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .cols-side { grid-template-columns: 1fr; } }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty-state svg.i { width: 22px; height: 22px; color: var(--text-3); opacity: .7; }

/* ---------- лента ---------- */
.feed-day { margin-top: 26px; }
.feed-day h3 { font-size: 13px; color: var(--text-2); margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.feed-day h3 .n { color: var(--text-3); font-weight: 500; }
.timeline { position: relative; padding: 6px 18px; }
.feed-item { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 0; position: relative; }
.feed-item + .feed-item { border-top: 1px solid var(--border); }
.kind { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.kind svg.i { width: 15px; height: 15px; }
.kind.pr { background: color-mix(in srgb, var(--p7) 14%, var(--surface)); color: color-mix(in srgb, var(--p7) 80%, var(--text)); }
.kind.release { background: color-mix(in srgb, var(--p4) 18%, var(--surface)); color: color-mix(in srgb, var(--p4) 70%, var(--text)); }
.kind.plan { background: var(--accent-soft); color: var(--accent-text); }
.kind.done { background: var(--good-soft); color: var(--good-text); }
.feed-item .body { min-width: 0; }
.feed-item .body .by { color: var(--text-3); font-size: 12px; }
.feed-item .time { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .feed-item { grid-template-columns: 28px 1fr auto; } .feed-item .proj-chip { display: none; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg.i { position: absolute; left: 10px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 32px; width: 220px; }

/* ---------- диалог ---------- */
dialog {
  border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(580px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
}
dialog::backdrop { background: rgba(10, 14, 20, .45); backdrop-filter: blur(2px); }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
dialog .dlg-head { display: flex; align-items: center; gap: 10px; }
dialog .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
dialog .actions { display: flex; gap: 8px; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); }
.title-input { font-size: 17px !important; font-weight: 600; height: 42px !important; }
.plan-history { font-size: 12px; color: var(--text-3); }

/* ---------- вход ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.login { width: min(380px, 100%); padding: 28px; }
.login form, .login .login-body { display: flex; flex-direction: column; gap: 16px; }
.login .logo { width: 44px; height: 44px; margin-bottom: 4px; }
.login .btn { height: 40px; justify-content: center; }
.login .divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; }
.login .divider::before, .login .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Ссылка-приглашение в настройках: видна один раз, пока не скопируют */
.invite-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; margin-bottom: 12px;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.invite-box input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); display: flex; align-items: center; gap: 8px;
}
.toast.error { background: var(--critical); color: #fff; }

@media (max-width: 760px) {
  .topbar-in { padding: 0 12px; gap: 12px; }
  .brand span, .nav a span, .sync .when, .user .uname { display: none; }
  main { padding: 20px 14px 48px; }
  .hero .big { font-size: 44px; }
}

/* открытые PR и issues */
.open-pair { display: inline-flex; align-items: baseline; gap: 8px; }
.open-pair small { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.open-pair .sep { color: var(--text-3); font-weight: 400; }
.chip.new { background: var(--accent-soft); color: var(--accent-text); flex: none; }
.pc-facts .wk { margin-top: 2px; font-size: 12px; color: var(--accent-text); }
