/* Бежевое меню (тон темнее фона), светло-бежевый фон, белые колонки и окна, зелёные кнопки.
   Смысл цветов: красный — важно или просрочено, жёлтый — есть замечания, зелёный — хорошо и выполнено. */
:root {
  --bg: #f8f4ec;
  --surface: #ffffff;
  --card: #fbf8f2;
  --card-line: #ece4d4;
  --menu: #ece2cf;
  --menu-line: #dccfb5;
  --menu-text: #4d3f2c;
  --text: #1f2a24;
  --text-2: #3f3b33;
  --muted: #6f695d;
  --faint: #a49c8c;
  --line: #e8e0d1;
  --line-strong: #d7ccb9;
  --hover: #f1ebdf;
  --soft: #eee7da;
  --soft-2: #e9e1d2;
  --well: #ece4d5;
  --panel-bg: #faf6ee;
  --primary: #3a7d5a;
  --primary-soft: #e6f1e9;
  --light: #d6ecdc;
  --light-text: #1f5537;
  --warn: #f2cf5b;
  --warn-text: #5c4300;
  --danger: #c43d33;
  --ok: #2e8a57;
  --shadow-sm: 0 1px 2px rgba(48, 40, 26, .06);
  --shadow: 0 1px 3px rgba(48, 40, 26, .08), 0 1px 2px rgba(48, 40, 26, .04);
  --shadow-lg: 0 12px 32px rgba(48, 40, 26, .16);
  --radius: 10px;
  --col-w: 272px;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
/* именованные цвета блоков, типов и колонок: --c — основной, --cs — мягкий фон */
/* ключи indigo и purple оставлены ради сохранённых данных: теперь это хвойный и терракотовый */
.c-blue { --c: #3a6c9e; --cs: #e8eff6; }
.c-indigo { --c: #2f6b4f; --cs: #e3eee6; }
.c-purple { --c: #b4613a; --cs: #f7e9e0; }
.c-pink { --c: #b8566f; --cs: #f8e9ed; }
.c-red { --c: #c43d33; --cs: #fbe9e7; }
.c-orange { --c: #c66a2b; --cs: #fbeee2; }
.c-amber { --c: #9a7406; --cs: #fdf3d3; }
.c-green { --c: #2e8a57; --cs: #e4f2e8; }
.c-lime { --c: #4f8a2f; --cs: #ebf5e1; }
.c-teal { --c: #2a7a80; --cs: #e2f0ef; }
.c-sand { --c: #8a6c40; --cs: #f3ebdc; }
.c-gray { --c: #78716a; --cs: #efebe4; }

* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body { background: var(--bg); font-size: 14.5px; line-height: 1.4; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.danger, .danger-text { color: var(--danger) !important; }
.stack { display: grid; gap: 14px; }
.stack.tight { gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---------- элементы форм ---------- */
.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select, .input, .select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--text); font-size: 14.5px; font-weight: 400;
}
.field input:focus, .field textarea:focus, .field select:focus, .input:focus, .select:focus, .search:focus {
  outline: 3px solid rgba(47, 107, 79, .18); border-color: var(--primary);
}
.btn { border: 0; border-radius: 8px; padding: 8px 14px; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.secondary { background: var(--soft); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: #fff; filter: none; }
.btn.danger { background: transparent; color: var(--danger); padding-left: 0; padding-right: 0; }
.link-btn { border: 0; background: none; color: var(--primary); padding: 0; font-size: 13px; }
.error { color: var(--danger); font-size: 13.5px; min-height: 1em; }

/* ---------- вход ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 10%, #dcebdf, transparent 40%), var(--bg); }
.login form { width: 100%; max-width: 360px; background: #fff; padding: 28px; border-radius: 14px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.login p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- шапка ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 16px; white-space: nowrap; }
.brand.big { font-size: 20px; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #4f9a6e, #24563d); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; inset: 7px 7px 7px 7px; border-left: 3px solid #fff; border-right: 3px solid rgba(255, 255, 255, .6); }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); min-height: 56px; position: sticky; top: 0; z-index: 5; }
.crumb-sep { color: var(--line-strong); font-size: 20px; }
.crumb { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; min-width: 0; }
.crumb-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me { border: 1px solid transparent; background: none; padding: 4px 8px 4px 4px; border-radius: 20px; display: flex; align-items: center; gap: 8px; }
.me:hover, .me.on { background: var(--hover); border-color: var(--line); }
.me-avatar { position: relative; display: inline-flex; }
.dot-new { position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.me-name { font-size: 13.5px; color: var(--text); font-weight: 500; }
.me .caret { color: var(--muted); font-size: 11px; }
.nav { display: flex; gap: 4px; margin-left: 18px; background: var(--hover); padding: 3px; border-radius: 10px; }
.nav-tab { padding: 6px 16px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav-tab:hover { color: var(--text); }
.nav-tab.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.page-title { margin: 0; font-size: 22px; letter-spacing: -.2px; }
.menu-count { margin-left: auto; background: var(--hover); color: var(--muted); border-radius: 10px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.menu-ver { margin-left: auto; color: var(--muted); font-size: 12px; }
.menu-new { background: #fee2e2; color: #b91c1c; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.menu-new + .menu-ver { margin-left: 6px; }
.menu button.active { font-weight: 600; background: var(--primary-soft); }
.hint { color: var(--faint); font-weight: 400; }
.tile-icon.folder { font-size: 20px; background: var(--cs); }
.tile-icon.sm.folder { font-size: 14px; }
.space-tile { min-height: 190px; }
.in-space { padding-top: 12px; }
.seg { display: inline-flex; background: var(--soft-2); border-radius: 9px; padding: 3px; gap: 2px; margin-left: 6px; }
.seg-btn { border: 0; background: none; padding: 5px 14px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.seg-btn.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.role-badge { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--hover); border-radius: 5px; padding: 1px 7px; }
.role-badge.admin { color: #1d4ed8; background: #eff6ff; }
.role-badge.super { color: #7c2d12; background: #ffedd5; }
.menu-note .role-badge { margin-top: 4px; }
.user-form { display: grid; grid-template-columns: 1fr 1fr 1fr 150px auto; gap: 8px; align-items: end; }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-action { border: 0; background: none; color: #9fd8b0; font-weight: 700; padding: 0; }

/* ---------- главная ---------- */
.home { max-width: 1240px; margin: 0 auto; padding: 28px 20px 40px; }
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.home-head h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.3px; }
.home-head p { margin: 0; }
.summary { display: flex; gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; display: grid; min-width: 112px; box-shadow: var(--shadow-sm); }
.stat b { font-size: 22px; line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--muted); }
a.stat { color: var(--text); }
a.stat:hover { border-color: var(--primary); }
.stat.danger b { color: var(--danger); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 14px; color: var(--text); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: box-shadow .15s, transform .15s, border-color .15s; align-content: start; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c); }
.tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: transparent; }
.tile-head { display: flex; gap: 12px; align-items: center; }
.tile-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--cs); color: var(--c); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.tile-icon.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 11.5px; }
.tile-title { font-size: 18px; font-weight: 700; }
.tile-desc { font-size: 13px; color: var(--muted); margin-top: 1px; }
.tile-types { display: flex; flex-wrap: wrap; gap: 6px; }
.type-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--cs); border-radius: 20px; padding: 3px 10px; font-size: 12.5px; color: var(--text-2); }
.type-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.type-pill b { color: var(--c); }
.tile-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.tile-stats b { color: var(--text); font-size: 15px; }
.tile-stats .danger b { color: var(--danger); }
.progress { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.tile-foot { font-size: 12px; color: var(--muted); margin-top: -8px; }
.tile-new { border: 2px dashed var(--line-strong); background: transparent; box-shadow: none; place-items: center; align-content: center; color: var(--muted); font-weight: 600; font-size: 15px; min-height: 200px; }
.tile-new::before { display: none; }
.tile-new .plus { font-size: 34px; font-weight: 300; line-height: 1; }
.tile-new:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); box-shadow: none; }

/* ---------- блок ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px 6px; }
.filters { padding: 4px 20px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row > * { max-width: 100%; min-width: 0; }
.filter-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-right: 2px; }
.chip-btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 20px; padding: 5px 12px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chip-btn i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip-btn b { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.chip-btn:hover { border-color: var(--c, var(--primary)); }
.chip-btn.on { background: var(--cs, var(--primary-soft)); border-color: var(--c, var(--primary)); color: var(--c, var(--primary)); font-weight: 600; }
.chip-btn.on b { color: inherit; }
.search { width: 260px; border: 1px solid var(--line-strong); border-radius: 20px; padding: 6px 14px; font-size: 13.5px; background: #fff; }
.select { width: auto; border-radius: 20px; padding: 5px 12px; font-size: 13.5px; }

#app { display: flex; flex-direction: column; }
.home { width: 100%; }
.board-scroll { overflow: auto; flex: 1; min-height: 320px; padding: 0 20px 20px; }
.kanban { min-width: calc(var(--cols) * var(--col-w) + (var(--cols) - 1) * 12px); }
.kb-row { display: grid; grid-template-columns: repeat(var(--cols), minmax(var(--col-w), 1fr)); gap: 12px; }
.kb-head { position: sticky; top: 0; z-index: 3; background: var(--bg); padding-bottom: 8px; }
.kb-colhead { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 8px; padding: 9px 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); }
.kb-colhead i { display: none; }
.kb-colhead b { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; background: var(--hover); border-radius: 10px; padding: 0 8px; }

.lane { margin-bottom: 14px; }
.lane-head { padding: 6px 0; }
.lane-head-inner { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 10px; }
.lane-toggle { border: 0; background: none; color: var(--muted); font-size: 14px; width: 22px; height: 22px; border-radius: 6px; transition: transform .15s; padding: 0; }
.lane-toggle:hover { background: var(--soft-2); }
.lane-toggle.closed { transform: rotate(-90deg); }
.lane-bar { width: 4px; height: 18px; border-radius: 2px; background: var(--c); }
.lane-title { font-weight: 700; font-size: 15.5px; }
.lane-count { background: var(--cs); color: var(--c); font-weight: 600; font-size: 12.5px; border-radius: 10px; padding: 1px 9px; }
.lane-add { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 3px 8px; border-radius: 6px; }
.lane-add:hover { background: var(--soft-2); color: var(--primary); }
.kb-cell { background: var(--well); border-radius: 10px; padding: 8px; min-height: 64px; }
.kb-cell.drop { outline: 2px dashed var(--primary); outline-offset: -3px; background: var(--primary-soft); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.card { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 12px 8px; margin-bottom: 8px; cursor: pointer; position: relative; border-left: 3px solid var(--c); }
.card:last-child { margin-bottom: 0; }
.card:hover { box-shadow: 0 4px 12px rgba(48, 40, 26, .12); }
.card.dragging { opacity: .4; }
.card.done .title { color: var(--muted); }
.card .who { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; margin-bottom: 6px; min-width: 0; }
.card .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .who .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.card .title { font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.card .comment { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 6px; min-width: 0; }
.card .comment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .comment .avatar { width: 16px; height: 16px; font-size: 7px; }
.card .thumbs { display: flex; gap: 6px; margin-top: 8px; }
.card .thumbs .thumb { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 4px; object-fit: cover; background: #fafafa; display: grid; place-items: center; font-size: 10.5px; color: var(--muted); overflow: hidden; text-transform: uppercase; }
.card .meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; min-height: 18px; color: var(--muted); }
.card .meta .num { color: var(--faint); }
.card .meta .due { color: var(--text-2); background: var(--hover); border-radius: 5px; padding: 1px 6px; }
.card .meta .due.overdue { color: var(--danger); background: #fef2f2; }
.card .check { color: var(--ok); font-size: 16px; line-height: 1; font-weight: 700; }
.new-card { background: #fff; border-radius: 8px; box-shadow: var(--shadow); padding: 8px; margin: 0 0 8px; display: grid; gap: 6px; border-left: 3px solid var(--primary); }
.new-card textarea { border: 0; resize: none; min-height: 56px; outline: none; font-size: 14.5px; }
.new-card .row { display: flex; gap: 6px; align-items: center; }

.card-pills { display: flex; gap: 4px; margin-bottom: 6px; }
.mini-pill { display: inline-flex; align-items: center; background: var(--cs); color: var(--c); border-radius: 5px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
a.mini-pill:hover { filter: brightness(.95); }
.sub-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.sub-progress .bar, .trow-subtoggle .bar { flex: 1; height: 4px; background: var(--soft); border-radius: 2px; overflow: hidden; max-width: 140px; }
.sub-progress .bar span, .trow-subtoggle .bar span { display: block; height: 100%; background: var(--ok); border-radius: 2px; }
.sub-progress.wide .bar { max-width: none; }
.lane-title { color: var(--text); }
a.lane-title:hover { color: var(--primary); }

/* ---------- подзадачи ---------- */
.subtasks { display: grid; gap: 8px; }
.subs { display: grid; gap: 2px; }
.subs { display: grid; gap: 4px; }
.sub { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.sub:hover { border-color: var(--line-strong); }
.sub.mine { background: #eef5ec; }
.sub input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ok); margin: 6px 0 0; }
.sub-body { display: grid; gap: 2px; min-width: 0; }
.sub-title { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 3px 6px; margin-left: -6px; font: inherit; font-size: 14px; line-height: 1.4; min-width: 0; width: calc(100% + 6px); resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.sub-title:hover, .sub-title:focus { border-color: var(--line-strong); background: #fff; outline: none; }
.sub.done .sub-title { text-decoration: line-through; color: var(--muted); }
.sub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.sub-meta .spacer { flex: 1; }
.sub-who { border: 0; background: none; padding: 2px 6px 2px 2px; display: inline-flex; align-items: center; gap: 5px; border-radius: 12px; font-size: 12.5px; color: var(--text); }
.sub-who:hover { background: var(--soft); }
.sub-who .avatar { width: 20px; height: 20px; font-size: 8.5px; }
.sub-who .avatar.ghost + span { color: var(--muted); }
.sub-due { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 2px 4px; font-size: 12.5px; color: var(--muted); width: 122px; }
.sub-due:hover, .sub-due:focus { border-color: var(--line-strong); background: #fff; }
.sub-due.overdue { color: var(--danger); }
.sub-del { border: 0; background: none; color: var(--faint); font-size: 18px; padding: 0 2px; line-height: 1; }
.sub-del:hover { color: var(--danger); }
.link-btn.small { font-size: 12.5px; }
.sub-group { display: grid; gap: 4px; }
.sub-children { display: grid; gap: 4px; margin-left: 28px; padding-left: 10px; border-left: 2px solid var(--line); }
.sub.micro { padding: 4px 8px; background: var(--panel-bg); }
.sub.micro .sub-title { font-size: 13.5px; }
.sub-add { display: flex; gap: 8px; margin-top: 4px; }
.sub-add.micro { margin-top: 0; }
.sub-add .input { padding: 6px 10px; font-size: 14px; }
.sub-add.micro .input { padding: 4px 8px; font-size: 13px; }

/* ---------- раздел «Задачи» ---------- */
.tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; padding: 4px 20px 32px; align-items: start; }
.tcol { background: var(--well); border-radius: 14px; padding: 12px; min-width: 0; }
.tcol-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; }
.tcol-head h2 { margin: 0; font-size: 17px; }
.tcol-head .muted { margin-left: auto; }
.tcol-head .lane-count { background: #fff; color: var(--text); }
.tcol-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.trow { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px; border-left: 3px solid var(--c); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.trow.done .trow-title { color: var(--muted); text-decoration: line-through; }
.trow-main { display: flex; align-items: flex-start; gap: 8px; }
.status-pill { flex: none; background: var(--cs); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); border-radius: 6px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.trow-title { flex: 1; border: 0; background: none; text-align: left; padding: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--text); word-break: break-word; }
.trow-title:hover { color: var(--primary); }
.trow .due { flex: none; font-size: 12.5px; color: var(--text-2); background: var(--hover); border-radius: 5px; padding: 1px 6px; }
.trow .due.overdue { color: var(--danger); background: #fef2f2; }
.trow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.trow-people .warn { color: #b45309; }
.trow-subtoggle { border: 0; background: none; padding: 2px 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); text-align: left; }
.trow-subtoggle:hover { color: var(--primary); }
.trow-subtoggle .caret { display: inline-block; transition: transform .15s; font-size: 10px; }
.trow-subtoggle.open .caret { transform: rotate(90deg); }
.trow-mysubs { display: grid; min-width: 0; gap: 2px; padding: 6px 8px; background: #eef5ec; border-radius: 8px; }
.mysub { display: flex; min-width: 0; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.mysub input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--ok); margin: 2px 0 0; flex: none; }
.mysub-title { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.mysub.done .mysub-title { text-decoration: line-through; color: var(--muted); }
.trow-subs { border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 8px; }

/* ---------- корзина ---------- */
.trash { padding: 4px 20px 32px; display: grid; gap: 8px; max-width: 1000px; }
.trash-row { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; border-left: 3px solid var(--c); display: flex; gap: 16px; align-items: center; }
.trash-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.trash-title { font-weight: 600; word-break: break-word; }
.trash-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }

/* ---------- что нового ---------- */
.changelog { display: grid; gap: 18px; }
.release-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ver { background: var(--hover); color: var(--muted); border-radius: 6px; padding: 1px 8px; font-weight: 700; font-size: 13px; }
.ver.current { background: var(--primary); color: #fff; }
.release ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--text-2); }

.avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 700; object-fit: cover; background: #cfc6b6; letter-spacing: .2px; }
.avatar.ghost { background: #ede6da; color: #b0a796; font-size: 11px; }
.avatar.xl { width: 60px; height: 60px; font-size: 20px; }

/* ---------- модальные окна ---------- */
.overlay { position: fixed; inset: 0; background: rgba(48, 40, 26, .42); display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; z-index: 10; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 820px; box-shadow: var(--shadow-lg); position: relative; }
.modal.small { max-width: 480px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px 0; }
.modal-head h2 { margin: 0; font-size: 17px; flex: 1; color: var(--muted); font-weight: 600; }
.close { border: 0; background: none; font-size: 26px; color: var(--muted); line-height: 1; padding: 0 4px; }
.modal-body { padding: 14px 22px 22px; display: grid; gap: 14px; }
/* форма задачи: на весь экран, три колонки — задача | участники и параметры | комментарии и история.
   Прокручивается не окно, а каждая колонка отдельно, если ей не хватает места. */
.overlay:has(.modal.task) { padding: 14px; align-items: stretch; }
.modal.task { max-width: 1560px; height: calc(100vh - 28px); display: flex; flex-direction: column; }
.modal.task .modal-head { padding: 12px 20px 0; }
.modal.task .modal-body { flex: 1; min-height: 0; padding: 10px 0 0; display: flex; }
.detail { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr) minmax(320px, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.detail > .col { min-height: 0; overflow-y: auto; padding: 4px 18px 14px; display: grid; gap: 10px; align-content: start; }
.col-side, .col-talk { border-left: 1px solid var(--line); background: var(--panel-bg); }
.col-main .desc-field { gap: 6px; }
.detail > .col-talk { display: flex; flex-direction: column; gap: 10px; }
.panel { display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.panel .field { gap: 3px; }
.panel .input, .panel .select { padding-top: 6px; padding-bottom: 6px; }
.panel .section-title { margin: 0; }
.props { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: start; }
.props .wide { grid-column: 1 / -1; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.access-box { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; background: #fff; min-height: 36px; color: var(--text); }
.access-box:disabled { cursor: default; background: var(--panel-bg); }
.access-box .caret { margin-left: auto; color: var(--muted); }
.access-people { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.access-people .chip { padding: 1px 8px 1px 2px; font-size: 12.5px; }
.access-people .chip .avatar { width: 18px; height: 18px; font-size: 8px; }
.menu-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.menu-check:hover { background: var(--hover); }
.menu-check input { margin: 0; accent-color: var(--primary); }
.menu-check .menu-name { flex: 1; }
.menu-check:has(input:disabled) { cursor: default; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex: none; }
.tab { border: 0; background: none; padding: 8px 12px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.feed { flex: 1; min-height: 80px; overflow-y: auto; padding-right: 2px; }
.col-talk .comment-form { flex: none; }
.col-talk .comment-form textarea { min-height: 70px; background: #fff; }
.cm-to { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-to .people-picker { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cm.remark > div { background: #fdf5d6; border: 1px solid #ecd27e; border-radius: 8px; padding: 6px 8px; }
.cm-kind { font-size: 12px; font-weight: 700; color: #7a5a00; }
.cm-private { font-size: 12px; color: #2a7a80; margin-top: 3px; }
.cm.private .text { color: #1d4f53; }
.timeline { display: grid; gap: 0; }
.ev { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.ev::before { content: ''; position: absolute; left: 12px; top: 34px; bottom: -8px; width: 2px; background: var(--line); }
.ev:last-child::before { display: none; }
.ev .head { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; }
.ev .head b { color: var(--text); font-weight: 600; }
.ev-text { font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.ev-text .status-pill { margin: 0 0 0 2px; font-size: 11.5px; padding: 0 7px; }
.ev-note { margin-top: 4px; font-size: 13px; white-space: pre-wrap; background: #fdf5d6; border-left: 3px solid #e2b93b; padding: 4px 8px; border-radius: 0 6px 6px 0; }
.detail .title-input { font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin-left: -9px; resize: none; width: calc(100% + 9px); line-height: 1.3; overflow: hidden; }
.detail .title-input:hover, .detail .title-input:focus { border-color: var(--line-strong); outline: none; }
.detail textarea.desc { min-height: 150px; resize: vertical; }
.save-bar { grid-column: 1 / -1; padding: 10px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.save-bar.busy .btn { opacity: .6; pointer-events: none; }
.bar-info { display: grid; gap: 1px; margin-right: auto; min-width: 0; }
.role-line { font-size: 13px; font-weight: 700; }
.bar-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bar-sep { width: 1px; height: 26px; background: var(--line-strong); margin: 0 4px; }
.save-bar.note { align-items: flex-end; background: #fdf5d6; border-top-color: #ecd27e; }
.note-panel { flex: 1; min-width: 260px; display: grid; gap: 6px; font-size: 13.5px; }
.note-panel textarea { min-height: 64px; background: #fff; }
.save-note { font-size: 13px; color: var(--muted); }
.save-bar.dirty { background: var(--panel-bg); border-top-color: #e0cfa9; }
.save-bar.dirty .save-note { color: #8a6c40; font-weight: 600; }
.detail .changed { border-color: #c9a04a !important; box-shadow: 0 0 0 2px rgba(201, 160, 74, .2); }
.detail .chips.changed, .detail .changed:not(input):not(select):not(textarea) { border: 1px solid #c9a04a; border-radius: 8px; padding: 4px; }
.side { display: grid; gap: 14px; align-content: start; background: var(--panel-bg); border-radius: 10px; padding: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 15px; padding: 3px 9px 3px 3px; font-size: 13px; background: #fff; color: var(--text); }
.chip .avatar { width: 22px; height: 22px; font-size: 9px; }
.chip button { border: 0; background: none; color: var(--muted); padding: 0 0 0 2px; font-size: 15px; line-height: 1; }
.section-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 6px 0 0; font-weight: 600; }
.files { display: grid; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.file img, .file .ext { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; object-fit: cover; flex: none; display: grid; place-items: center; font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .size { color: var(--muted); font-size: 12.5px; }
.file button { border: 0; background: none; color: var(--muted); font-size: 18px; }
.upload { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px; text-align: center; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.upload.drop, .upload:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.comments { display: grid; gap: 12px; }
.cm { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.cm .avatar { width: 30px; height: 30px; }
.cm .head { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.cm .head b { color: var(--text); font-weight: 600; }
.cm .head button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0; margin-left: auto; }
.cm .text { white-space: pre-wrap; word-break: break-word; font-size: 14px; margin-top: 2px; }
.comment-form { display: grid; gap: 8px; }
.comment-form textarea { min-height: 60px; resize: vertical; }
.foot-row { color: var(--muted); font-size: 12px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line-strong); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--c); }
.edit-row { display: grid; grid-template-columns: 10px 1fr 130px auto auto auto; gap: 8px; align-items: center; }
.edit-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.add-row { display: flex; gap: 8px; }

.menu { position: fixed; z-index: 20; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 240px; max-height: 70vh; overflow-y: auto; border: 1px solid var(--line); }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.menu button:hover { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-note { padding: 8px 10px; color: var(--muted); font-size: 12.5px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.table .actions { text-align: right; white-space: nowrap; }
.table .muted { color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.notice { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.notice code { font-size: 15px; background: #fff; padding: 1px 6px; border-radius: 4px; user-select: all; }
.avatar-box { display: flex; gap: 12px; align-items: center; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1f2b24; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px); }


/* ---------- каркас: левое меню + содержимое ---------- */
.shell { display: flex; height: 100%; min-height: 0; }
.sidebar { width: 216px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; padding: 14px 12px; overflow-y: auto; }
.sidebar .brand { padding: 2px 6px 6px; }
.side-new { justify-content: center; }
.side-nav { display: grid; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 14.5px; }
.side-item:hover { background: var(--hover); }
.side-item.on { background: var(--primary-soft); color: var(--primary); }
.side-ico { width: 20px; text-align: center; flex: none; }
.side-count { margin-left: auto; background: var(--hover); color: var(--muted); border-radius: 10px; padding: 0 8px; font-size: 12px; }
.side-item.on .side-count { background: #fff; color: var(--primary); }
.sidebar .me { align-self: stretch; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; }
.main > .board-scroll { min-height: 0; }

/* ---------- задачи: группы, действия, статусы ---------- */
.tgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tgroup + .tgroup { margin-top: 6px; }
.tgroup-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; padding: 2px 2px 0; }
.trow-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.xs { padding: 3px 9px; font-size: 12.5px; border-radius: 6px; }
.btn.ok { background: var(--ok); }
.plist { display: grid; gap: 14px; padding: 4px 20px 32px; max-width: 1000px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.kb-colhead .done-mark { color: var(--ok); font-weight: 700; }
.card .meta .status-pill { margin-top: 0; font-size: 10.5px; padding: 0 6px; }
.card-sel { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); opacity: 0; transition: opacity .1s; }
.card:hover .card-sel, .card.selected .card-sel { opacity: 1; }
.card.selected { outline: 2px solid var(--primary); outline-offset: -1px; }
.card-pills { padding-right: 20px; flex-wrap: wrap; }
.card-pills:empty { display: none; }
.sel-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 8; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 12px; padding: 8px 14px; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); flex-wrap: wrap; }
.edit-row.simple { grid-template-columns: 10px 1fr auto; }
.pick-search { margin-bottom: 6px; }
.pick-list { display: grid; }
.pick-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }

/* ---------- карточка задачи ---------- */
.status-box { display: grid; gap: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-line .status-pill { margin-top: 0; font-size: 12.5px; padding: 2px 9px; }
.field-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.admin-status { margin-left: auto; }
.parent-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 36px; }
.parent-pick > .link-btn:first-child { text-align: left; font-size: 14px; }
.parent-link { justify-self: start; text-align: left; font-size: 13px; }
.children { display: grid; gap: 6px; }
.child { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
.child .status-pill { margin-top: 0; }
.child-title { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font-size: 14px; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
button.child-title:hover { color: var(--primary); }
.child.done .child-title { text-decoration: line-through; color: var(--muted); }
.child-who { display: inline-flex; gap: 2px; }
.child-who .avatar { width: 22px; height: 22px; font-size: 9px; }
.child .due { font-size: 12.5px; color: var(--text-2); background: var(--hover); border-radius: 5px; padding: 1px 6px; flex: none; }
.child .due.overdue { color: var(--danger); background: #fef2f2; }
.pending { border-style: dashed; opacity: .85; }
.cm.pending { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 6px; }
.desk-chip { padding: 3px 9px; }
.desk-chip a { color: var(--text); font-weight: 600; }

/* узкий экран: две колонки, комментарии под ними, окно прокручивается целиком */
@media (max-width: 1180px) {
  .overlay:has(.modal.task) { align-items: flex-start; overflow-y: auto; }
  .modal.task { height: auto; }
  .detail { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); grid-template-rows: none; }
  .detail > .col { overflow: visible; }
  .detail > .col-talk { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .feed { max-height: 50vh; }
  .save-bar { position: sticky; bottom: -14px; z-index: 2; }
}

@media (max-width: 760px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail > .col-side { border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .overlay:has(.modal.task) { padding: 0; }
  .modal.task { border-radius: 0; min-height: 100%; }
  .save-bar { bottom: 0; border-radius: 0; }
  .shell { flex-direction: column; height: auto; min-height: 100%; }
  .sidebar { width: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6; overflow-x: auto; }
  .sidebar .brand { display: none; }
  .side-item:not(.on) .side-count { display: none; }
  .sidebar .spacer { display: none; }
  .side-nav { display: flex; gap: 2px; }
  .side-item { padding: 7px 8px; gap: 4px; font-size: 13px; }
  .side-item .side-label { display: none; }
  .side-item.on .side-label { display: inline; }
  .side-new { padding: 7px 11px; }
  .side-new .side-label { display: none; }
  .sidebar .me { margin-left: auto; }
  .main { overflow: visible; }
  .pick-title { max-width: 240px; }
  :root { --col-w: 250px; }
  .top { padding: 8px 16px; }
  .brand-text, .me-name, .me .caret { display: none; }
  .nav { margin-left: 4px; }
  .nav-tab { padding: 6px 10px; font-size: 13.5px; }
  .tasks, .trash, .plist { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 24px; }
  .trash-row { flex-direction: column; align-items: stretch; }
  .trash-actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .sub, .trow-subs .sub { grid-template-columns: 20px 1fr auto 22px; }
  .sub-due { grid-column: 2 / 4; justify-self: start; }
  .home { padding: 20px 16px 32px; }
  .summary { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 8px 10px; }
  .toolbar, .filters { padding-left: 16px; padding-right: 16px; }
  .toolbar .btn.ghost:last-child { padding: 8px 10px; }
  .search { width: 100%; }
  .board-scroll { flex: none; min-height: 0; overflow-x: auto; overflow-y: visible; padding: 0 16px 16px; }
  .kb-head { position: static; }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .props { grid-template-columns: minmax(0, 1fr); }
  .sub-children { margin-left: 12px; }
  .save-bar { flex-wrap: wrap; bottom: 0; }
  .save-note { flex-basis: 100%; }
  .overlay { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; }
  .inline-form, .grid2, .grid3, .user-form { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  .seg { margin-left: 0; }
  .edit-row { grid-template-columns: 10px 1fr 1fr; }
}

/* ---------- оформление «Шалфей и лён» (2.2) ---------- */
/* кнопки по смыслу: светло-зелёная — на проверку, зелёная — выполнено, жёлтая — с замечаниями */
.btn.light { background: var(--light); color: var(--light-text); }
.btn.warn { background: var(--warn); color: var(--warn-text); }
.btn.ok { background: var(--ok); }
.btn.secondary { background: var(--soft); color: var(--text); }
.btn:not(.secondary):not(.ghost):not(.danger):not(.light):not(.warn) { box-shadow: 0 1px 0 rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .12); }

/* метки «Важно» и «Есть замечания» */
.flag-pill { flex: none; display: inline-flex; align-items: center; gap: 3px; background: var(--cs); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); border-radius: 6px; padding: 0 7px; font-size: 11.5px; font-weight: 700; white-space: nowrap; margin-top: 2px; }
.flag-pill.c-amber { background: #fdf0bf; color: #6b4e00; border-color: #e9c94f; }
.card-pills .flag-pill, .child .flag-pill, .status-line .flag-pill { margin-top: 0; }
.card.important, .trow.important { border-left-color: var(--danger); box-shadow: var(--shadow), inset 0 0 0 1px rgba(196, 61, 51, .22); }
.important-toggle { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.important-toggle input { margin: 0; width: 16px; height: 16px; accent-color: var(--danger); }
.important-toggle.on { border: 1px solid #e7b2ac; background: var(--cs, #fbe9e7); --cs: #fbe9e7; color: var(--danger); font-weight: 600; }
.important-toggle .hint { margin-left: auto; font-size: 12px; }

/* левое меню — фисташковое, выбранный раздел — белый с зелёным текстом */
.sidebar { background: var(--menu); border-right: 1px solid var(--menu-line); color: var(--menu-text); }
.sidebar .brand { color: var(--primary); }
.side-new { background: var(--primary); color: #fff; }
.side-item { color: var(--menu-text); }
.side-item:hover { background: rgba(255, 255, 255, .55); color: var(--text); }
.side-item.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.side-count { background: rgba(255, 255, 255, .7); color: var(--menu-text); }
.side-item.on .side-count { background: var(--primary-soft); color: var(--primary); }
.sidebar .me:hover, .sidebar .me.on { background: rgba(255, 255, 255, .6); border-color: var(--menu-line); }
.sidebar .dot-new { border-color: var(--menu); }

/* рабочая область белая, карточки задач — тёплые бежевые */
.login { background: radial-gradient(circle at 15% 10%, #e3f0e7, transparent 45%), radial-gradient(circle at 90% 90%, #efe8da, transparent 40%), var(--bg); }
.kb-colhead, .stat, .tile, .panel, .modal { background: var(--surface); }
.trow, .card, .trash-row { background: var(--card); border-top: 1px solid var(--card-line); border-right: 1px solid var(--card-line); border-bottom: 1px solid var(--card-line); box-shadow: none; }
.card:hover { box-shadow: var(--shadow); }
.tcol, .kb-cell { background: #fff; border: 1px solid var(--line); }
.kb-head { background: var(--bg); }
.tcol-head .lane-count { background: var(--soft); color: var(--muted); }
.col-side, .col-talk { background: var(--panel-bg); }
.tab.on { color: var(--primary); }
::selection { background: var(--light); }

/* 2.3: копия вложений в Seafile */
.sf-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.sf-pick select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; max-width: 100%; }
.sf-badge { flex: none; font-size: 12px; line-height: 1.5; padding: 0 8px; border-radius: 999px; border: 1px solid transparent; background: var(--primary-soft); color: var(--primary); text-decoration: none; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
a.sf-badge:hover { border-color: var(--primary); }
.file button.sf-badge { font-size: 12px; color: var(--primary); background: var(--primary-soft); cursor: pointer; }
.file button.sf-badge.add { background: none; border-color: var(--line); color: var(--muted); }
.file button.sf-badge.add:hover { border-color: var(--primary); color: var(--primary); }
.file button.sf-badge.err { background: #fdf5d6; border-color: #ecd27e; color: var(--warn-text); }
/* 3.9: Saby — ссылка на документ, ошибка отправки, «→ в Saby» */
.saby-badge { flex: none; display: inline-block; font: inherit; font-size: 12px; line-height: 1.5; padding: 0 8px; border-radius: 999px; border: 1px solid transparent; background: #fdebd9; color: #9a4a0c; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
a.saby-badge:hover { border-color: #e0a35f; }
.saby-badge.err { background: #fdf5d6; border-color: #ecd27e; color: var(--warn-text); }
button.saby-badge { cursor: pointer; }
button.saby-badge.add { background: none; border-color: var(--line); color: var(--muted); }
button.saby-badge.add:hover { border-color: #e0a35f; color: #9a4a0c; }

/* 2.3.1: дерево папок Seafile */
.sf-choose { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.sf-choose span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-choose:hover { border-color: var(--primary); }
.menu.sf-tree { width: min(420px, calc(100vw - 16px)); max-height: 420px; display: flex; flex-direction: column; padding: 8px; }
.sf-search { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
.sf-list { overflow-y: auto; min-height: 0; }
.sf-row { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.sf-row:hover { background: var(--hover); }
.sf-row.on { background: var(--primary-soft); }
.sf-row.on .sf-name { color: var(--primary); font-weight: 600; }
.menu .sf-row button { width: auto; padding: 6px 4px; font-size: 14px; border-radius: 6px; }
.menu .sf-row button:hover { background: none; }
.menu .sf-row .sf-tog { flex: none; width: 22px; justify-content: center; color: var(--muted); }
.menu .sf-row .sf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.menu .sf-row .sf-add { flex: none; font-size: 12.5px; color: var(--primary); opacity: 0; padding: 4px 8px; }
.sf-row:hover .sf-add, .sf-row .sf-add:focus { opacity: 1; }
.menu .sf-row .sf-add:hover { background: var(--primary-soft); }
.sf-new { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px 6px; }
.sf-new-in { flex: 1; min-width: 140px; font: inherit; font-size: 14px; border: 1px solid var(--primary); border-radius: 6px; padding: 5px 8px; }
.menu .sf-new .btn { width: auto; display: inline-flex; padding: 5px 10px; font-size: 13px; }
.sf-new .error { flex-basis: 100%; }
.sf-note { color: var(--muted); font-size: 13px; padding: 6px; }
@media (hover: none) { .sf-row .sf-add { opacity: 1; } }
.menu .sf-new .btn { background: var(--primary); color: #fff; }
.menu .sf-new .btn:hover { background: var(--primary-hover, var(--primary)); }
.menu .sf-new .btn.secondary { background: var(--soft); color: var(--text); }
.sf-new .error:empty { display: none; }

/* 2.5: подключения к другим сервисам */
.hook { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; background: var(--card); }
.hook.off { opacity: .65; }
.hook-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hook-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hook-actions { font-size: 13px; }
.hook-form { border: 1px solid var(--primary); border-radius: 10px; padding: 12px; background: var(--primary-soft); }
.hook-form .check { display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 14px; color: var(--text); text-align: left; }
.hook-form .check input { width: auto; flex: none; margin: 0; padding: 0; }
.hook-sample { background: var(--soft); border-radius: 8px; padding: 8px 10px; font-size: 12px; overflow-x: auto; max-height: 260px; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn-text); }
.link-btn.danger-text { color: var(--danger); }

/* 2.6: API-токены Канбана */
.token-fresh { display: grid; gap: 8px; }
.token-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.token-value { flex: 1; min-width: 0; word-break: break-all; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; user-select: all; }

/* 2.7: просмотр файлов, вставка из буфера, порядок линий, журнал */
.file.pending { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 4px 6px; opacity: 1; }
.file img { cursor: zoom-in; }
.file button.ext { font-size: 10.5px; padding: 0; background: var(--card); cursor: pointer; border: 1px solid var(--line); }
.file button.ext:hover, .file img:hover { border-color: var(--primary); }
.file a.name:hover { text-decoration: underline; }
.paste-btn { justify-self: start; margin-top: -4px; }
.preview { position: fixed; inset: 0; z-index: 40; background: rgba(31, 42, 36, .88); display: flex; flex-direction: column; outline: none; }
.preview-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: #fff; }
.preview-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.preview-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-title span { flex: none; opacity: .75; font-size: 13px; }
.preview-tools { display: flex; gap: 8px; flex: none; }
.preview-btn { color: #fff; background: rgba(255, 255, 255, .14); border-radius: 8px; padding: 6px 12px; text-decoration: none; font-size: 14px; }
.preview-btn:hover { background: rgba(255, 255, 255, .26); }
.preview-close { border: 0; background: none; color: #fff; font-size: 30px; line-height: 1; padding: 0 6px; flex: none; }
.preview-body { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 0 64px 20px; }
.preview-img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; cursor: zoom-in; background: #fff; border-radius: 4px; }
.preview-img.full { max-width: none; max-height: none; cursor: zoom-out; }
.preview-body:has(.preview-img.full) { place-items: start; }
.preview-frame { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 6px; }
.preview-media { max-width: 100%; max-height: calc(100vh - 100px); }
.preview-audio { width: min(560px, 100%); }
.preview-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 34px; line-height: 1; }
.preview-nav:hover { background: rgba(255, 255, 255, .28); }
.preview-nav.prev { left: 10px; }
.preview-nav.next { right: 10px; }
.preview-note { color: #fff; display: grid; gap: 14px; justify-items: center; text-align: center; }
.preview-ext { font-size: 26px; font-weight: 700; text-transform: uppercase; opacity: .7; }
.preview-doc { align-self: start; width: min(900px, 100%); background: #fff; border-radius: 8px; padding: 20px 26px; min-width: 0; }
.preview-doc.paper { padding: 34px 48px; line-height: 1.5; }
.preview-doc.sheet { width: 100%; }
.preview-doc pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.preview-doc p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-doc p:empty { min-height: 1em; }
.preview-doc .center { text-align: center; }
.preview-doc .right { text-align: right; }
.preview-doc p.item { padding-left: 22px; position: relative; }
.preview-doc p.item::before { content: "•"; position: absolute; left: 6px; }
.preview-doc .preview-hint { color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 14px; }
.preview-table { overflow-x: auto; max-width: 100%; }
.preview-table table { border-collapse: collapse; font-size: 13px; margin: 6px 0 12px; }
.preview-table td, .preview-table th { border: 1px solid var(--line-strong); padding: 4px 8px; vertical-align: top; min-width: 24px; max-width: 420px; }
.preview-table th { background: var(--soft); color: var(--muted); font-weight: 500; }
.preview-table td p { margin: 0; }
.preview-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.preview-tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 4px 12px; font-size: 13px; }
.preview-tabs button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.lane-grip { cursor: grab; color: var(--muted); font-size: 17px; line-height: 1; padding: 4px 2px; border-radius: 6px; user-select: none; }
.lane-grip:hover { background: var(--soft-2); color: var(--primary); }
.lane-grip:active { cursor: grabbing; }
.kanban.lane-dragging .lane .kb-row { display: none; }
.kanban.lane-dragging .lane { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 2px 8px; margin-bottom: 8px; background: var(--surface); }
.lane.lane-before { box-shadow: 0 -4px 0 var(--primary); }
.lane.lane-after { box-shadow: 0 4px 0 var(--primary); }
.modal.audit { max-width: 980px; }
.audit-list { display: grid; }
.audit-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.audit-row.bad { background: #fdf1ef; }
.audit-at, .audit-ip { color: var(--muted); font-size: 12.5px; }
.audit-what { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .preview-body { padding: 0 8px 12px; }
  .preview-nav { top: auto; bottom: 12px; transform: none; height: 44px; }
  .preview-doc.paper { padding: 18px; }
  .audit-row { grid-template-columns: 1fr; gap: 2px; }
}

/* 3.0: роли и отделы */
.user-form { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.users-table select { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface); color: var(--text); max-width: 220px; }
.users-table .danger-text { color: var(--danger); }
.check-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.check-line input, .field .check-line input { width: auto; flex: none; margin: 0; }
.edit-row.simple.dept-row { grid-template-columns: 1fr auto auto; }
.title-input[readonly], .desc[readonly] { background: transparent; cursor: default; }

/* 3.1: сворачиваемое меню, список проектов, название линии сбоку */
.side-top { display: flex; align-items: center; gap: 4px; }
.sidebar .side-top .brand { padding: 2px 4px; }
.side-burger { width: 36px; height: 34px; flex: none; border: 0; border-radius: 8px; background: none; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 0; }
.side-burger i { width: 18px; height: 2px; border-radius: 1px; background: var(--menu-text); }
.side-burger:hover { background: rgba(255, 255, 255, .6); }
@media (min-width: 701px) {
  .sidebar.mini { width: 64px; padding: 14px 10px; overflow-x: hidden; }
  .sidebar.mini .side-top { justify-content: center; }
  .sidebar.mini .brand, .sidebar.mini .side-label, .sidebar.mini .me-name { display: none; }
  .sidebar.mini .side-new { padding: 8px 0; font-size: 17px; }
  .sidebar.mini .side-item { justify-content: center; position: relative; padding: 10px 0; }
  .sidebar.mini .side-ico { font-size: 17px; }
  .sidebar.mini .side-count { position: absolute; top: 1px; right: 1px; font-size: 10px; padding: 0 5px; line-height: 15px; }
  .sidebar.mini .me { justify-content: center; padding: 4px 0; }
}
.menu-check .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.kanban { --side: 46px; }
.kanban.sided { min-width: calc(var(--cols) * var(--col-w) + (var(--cols) - 1) * 12px + var(--side) + 8px); }
.kanban.sided .kb-head { padding-left: calc(var(--side) + 8px); }
.kanban.sided .lane { margin-bottom: 10px; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 8px; min-height: 124px; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) > .lane-head { position: sticky; left: 0; z-index: 2; padding: 0; border-radius: 10px; border-left: 4px solid var(--c); background: linear-gradient(var(--cs), var(--cs)), var(--bg); }
/* название не растягивает линию: занимает столько высоты, сколько дали карточки, и видно при прокрутке */
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-side { position: absolute; inset: 0; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-head-inner { position: sticky; top: 52px; left: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; max-height: 100%; padding: 5px 0; overflow: hidden; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-bar, .kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-add-text { display: none; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-title { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 14px; line-height: 16px; min-height: 0; max-width: 34px; overflow: hidden; flex: 0 1 auto; }
.lane-ctl { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-ctl .lane-toggle { width: 18px; height: 20px; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-grip { padding: 0; font-size: 15px; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-count { padding: 0 5px; background: rgba(255, 255, 255, .75); font-size: 11.5px; }
.kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-add { padding: 0 4px; font-size: 16px; line-height: 18px; }
.kanban.sided .lane.collapsed .lane-head { padding: 2px 0; }
@media (max-width: 700px) {
  .side-burger { display: none; }
  .side-top { display: contents; }
  .kanban.sided:not(.lane-dragging) .lane:not(.collapsed) .lane-head-inner { top: 4px; }
}

/* 3.3: единая шапка разделов и структура компании */
.bar { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 9px 20px; flex: none; border-bottom: 1px solid var(--line); }
.bar + main, .bar + .board-scroll { padding-top: 12px; }
.bar-title { margin: 0 8px 0 0; font-size: 20px; letter-spacing: -.2px; white-space: nowrap; }
.bar .btn, .bar .chip-btn, .bar .link-btn { white-space: nowrap; flex: none; }
.bar .btn { height: 38px; justify-content: center; }
.bar .search { flex: 0 1 260px; width: auto; min-width: 110px; }
.bar .select { flex: 0 1 auto; min-width: 110px; max-width: 200px; }
.bar .seg { margin-left: 0; flex: none; }
.bar .crumb { flex: 0 1 auto; max-width: 260px; }
.bar .spacer { flex: 1 1 0; min-width: 0; }
.lanes-select { display: none; }
@media (max-width: 1500px) {
  .lanes-seg { display: none; }
  .bar .lanes-select { display: block; }
}
@media (max-width: 1100px) and (min-width: 701px) {
  .bar { gap: 6px; padding: 9px 14px; overflow-x: auto; }
  .bar .select { max-width: 140px; }
  .bar .seg-btn { padding: 5px 9px; }
}
@media (max-width: 700px) {
  .bar { flex-wrap: wrap; padding: 9px 16px; min-height: 0; }
  .bar .search { flex: 1 1 140px; }
}

/* 3.4: стрелки меню и светофор сроков — важнее цвета типа; класс ставится только незавершённым задачам со сроком */
.side-burger { font-size: 20px; line-height: 1; font-weight: 700; color: var(--menu-text); }
.tl-green { --tl: #2e9a5b; --tl-bg: #e3f4e8; --tl-chip: #c3e6cf; --tl-text: #175c34; }
.tl-yellow { --tl: #e0ad12; --tl-bg: #fdf2c4; --tl-chip: #f6db74; --tl-text: #5c4300; }
.tl-red { --tl: #cf3a2f; --tl-bg: #fbdfdb; --tl-chip: #cf3a2f; --tl-text: #fff; }
.card[class*=" tl-"], .trow[class*=" tl-"] { background: var(--tl-bg); border-left: 6px solid var(--tl); }
.child[class*=" tl-"] { background: var(--tl-bg); border-left: 4px solid var(--tl); }
.field[class*=" tl-"] .input { background: var(--tl-bg); border-color: var(--tl); }
[class*=" tl-"] > .due, [class*=" tl-"] > .meta > .due, [class*=" tl-"] > .trow-main > .due, .field[class*=" tl-"] .due { background: var(--tl-chip); color: var(--tl-text); font-weight: 600; border-radius: 5px; padding: 1px 6px; }
.field .due { font-size: 12px; }
.card[class*=" tl-"] .who, .card[class*=" tl-"] .meta, .card[class*=" tl-"] .meta .num, .trow[class*=" tl-"] .trow-meta, .trow[class*=" tl-"] .muted { color: #5d574c; }
.card.important[class*=" tl-"], .trow.important[class*=" tl-"] { box-shadow: var(--shadow); }

/* 3.5: структура раскрывающимся списком */
.org { padding: 8px 12px 32px; overflow: auto; }
.org-add { width: 52px; padding: 0; font-size: 24px; font-weight: 400; line-height: 1; border-radius: 19px; }
.org-list, .org-list ul { list-style: none; margin: 0; padding: 0; }
.org-list ul { padding-left: 26px; }
.org-row { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 6px; cursor: pointer; width: 100%; }
.org-row:hover, .org-row:focus-within { background: var(--hover); }
.org-title { font-size: 15.5px; overflow-wrap: anywhere; }
.org-row.root > .org-title { font-size: 17.5px; }
.org-grey { color: var(--muted); font-size: 14px; }
.org-tri { flex: none; width: 18px; height: 18px; border: 0; background: none; padding: 0; align-self: center; position: relative; }
button.org-tri::before { content: ""; position: absolute; left: 5px; top: 2px; border: 7px solid transparent; border-left: 9px solid var(--primary); border-right: 0; transition: transform .12s; }
button.org-tri.open::before { transform: rotate(90deg); }
button.org-tri:disabled { visibility: hidden; }
.org-more { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 8px; border-radius: 6px; opacity: 0; }
.org-row:hover .org-more, .org-more:focus-visible { opacity: 1; }
.org-more:hover { background: var(--soft-2); color: var(--text); }
.org-human { align-items: center; border: 0; background: none; text-align: left; }
.org-human .avatar { width: 24px; height: 24px; font-size: 9.5px; }
@media (hover: none) { .org-more { opacity: 1; } }
@media (max-width: 700px) {
  .org-list ul { padding-left: 16px; }
  .org-row { flex-wrap: wrap; gap: 2px 8px; }
}
.org-boss { font-weight: 600; }
.org-human .role-badge { flex: none; }

/* 3.7: одна карточка задачи везде, выполненные — зелёным, знак сворачивания меню */
.tl-done { --tl: #2e8a57; --tl-bg: #d3ecda; --tl-chip: #b4dec2; --tl-text: #175c34; }
.trow { container-type: inline-size; }
@container (max-width: 400px) {
  .trow-main:has(.status-pill) { flex-wrap: wrap; align-items: center; }
  .trow-main:has(.status-pill) .trow-title { order: 3; flex: 1 0 100%; }
  .trow-main .due { margin-left: auto; }
}
.trow-main > .trow-title:only-child { flex: 1; }
.tcard { position: relative; cursor: pointer; margin-bottom: 8px; }
.tcard:last-child { margin-bottom: 0; }
.tcard:hover { box-shadow: 0 4px 12px rgba(48, 40, 26, .12); }
.tcard.dragging { opacity: .4; }
.tcard.selected { outline: 2px solid var(--primary); outline-offset: -1px; }
.tcard .card-sel { top: -6px; right: -6px; z-index: 1; width: 18px; height: 18px; }
.tcard:hover .card-sel, .tcard.selected .card-sel, .card-sel:focus-visible { opacity: 1; }
@media (hover: none) { .tcard .card-sel { opacity: 1; } }
.side-burger { margin-left: auto; }
.side-burger i { width: 11px; height: 11px; border: solid var(--menu-text); border-width: 0 0 3px 3px; border-radius: 1px; background: none; transform: translateX(2px) rotate(45deg); }
.sidebar.mini .side-burger { margin: 0; }
.sidebar.mini .side-burger i { transform: translateX(-2px) rotate(-135deg); }
.side-burger:focus-visible { outline: 2px solid var(--primary); }
.settings-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.settings-list .check-line { cursor: pointer; margin: 0; padding: 4px 0; }
.card-preview { background: var(--well); border-radius: 10px; padding: 12px; }
@media (max-width: 500px) { .settings-list { grid-template-columns: 1fr; } }

/* 3.8: одинаковые отборы в шапке */
.archive-foot { grid-column: 1 / -1; padding: 8px 0; justify-self: center; text-align: center; }
.bar .projects-btn { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
