@font-face{font-family:'WINLINE Sans';font-weight:700;font-style:normal;font-display:swap;src:url(/assets/winline-sans-bold.5b89ced47c.woff2) format('woff2')}
/* ===== Токены 0.2 =====
   Основа — фирменные цвета WINLINE: Premium Black #141419, Victory Orange #FF6A13, Pure White #FFFFFF.
   Согласованные адаптации для рабочего интерфейса (брендбук — ориентир):
   - светлая рабочая область и чёрная боковая панель по умолчанию; тёмная тема — в настройках;
   - нейтральные серые для второстепенного текста, линий и подложек;
   - функциональные цвета только со словом или значком: жёлтый — предупреждения и риски,
     красный — ошибки, просрочки, перерасход, зелёный — завершение;
   - прямые формы с мягкими скруглениями, мало рамок и жирного, плавные переходы. */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --surface-3: #efeff2;
  --line: #e7e7eb;
  --line-2: #d5d5db;
  --text: #141419;
  --text-2: #4d4d56;
  --text-3: #6b6b74;
  --on-text: #ffffff;
  --accent: #ff6a13;
  --accent-2: #ff8a45;
  --accent-ink: #141419;
  --accent-text: #c24e0a;
  --accent-soft: rgba(255, 106, 19, 0.12);
  --ok: #1e9a57;
  --ok-soft: #e6f5ec;
  --ok-text: #16804a;
  --risk: #c98a00;
  --risk-soft: #fff4d6;
  --risk-text: #8a5e00;
  --help: #d6393a;
  --help-soft: #fcebea;
  --help-text: #b52b2c;
  --info: #4d4d56;
  --info-soft: #efeff2;
  --side-bg: #141419;
  --side-text: #ffffff;
  --side-muted: #a4a4ad;
  --side-hover: #24242b;
  --map-bg: #f5f5f7;
  --map-dot: #e2e2e7;
  --edge: #c9c9d1;
  --scrim: rgba(20, 20, 25, 0.45);
  --shadow: 0 1px 2px rgba(20, 20, 25, 0.04), 0 2px 10px rgba(20, 20, 25, 0.04);
  --shadow-lg: 0 16px 48px rgba(20, 20, 25, 0.18);
  --r: 14px;
  --r-s: 9px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --f-ui: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-disp: var(--f-ui);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .app[data-app-theme='system'],
  :root:not([data-theme='light']) .app:not([data-app-theme]) {
    --bg: #0e0e12;
    --surface: #18181d;
    --surface-2: #1d1d23;
    --surface-3: #26262d;
    --line: #2b2b33;
    --line-2: #3b3b44;
    --text: #f2f2f4;
    --text-2: #c2c2ca;
    --text-3: #93939c;
    --on-text: #141419;
    --accent-text: #ff8a45;
    --accent-soft: rgba(255, 106, 19, 0.16);
    --ok: #3ccb7f;
    --ok-soft: rgba(60, 203, 127, 0.14);
    --ok-text: #5bd695;
    --risk: #f0b429;
    --risk-soft: rgba(240, 180, 41, 0.15);
    --risk-text: #f3c254;
    --help: #ff5c61;
    --help-soft: rgba(255, 92, 97, 0.14);
    --help-text: #ff7a7e;
    --info: #c2c2ca;
    --info-soft: #26262d;
    --side-bg: #0a0a0d;
    --side-hover: #1c1c22;
    --map-bg: #0e0e12;
    --map-dot: #23232a;
    --edge: #4a4a54;
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
.app[data-app-theme='dark'] {
  --bg: #0e0e12;
  --surface: #18181d;
  --surface-2: #1d1d23;
  --surface-3: #26262d;
  --line: #2b2b33;
  --line-2: #3b3b44;
  --text: #f2f2f4;
  --text-2: #c2c2ca;
  --text-3: #93939c;
  --on-text: #141419;
  --accent-text: #ff8a45;
  --accent-soft: rgba(255, 106, 19, 0.16);
  --ok: #3ccb7f;
  --ok-soft: rgba(60, 203, 127, 0.14);
  --ok-text: #5bd695;
  --risk: #f0b429;
  --risk-soft: rgba(240, 180, 41, 0.15);
  --risk-text: #f3c254;
  --help: #ff5c61;
  --help-soft: rgba(255, 92, 97, 0.14);
  --help-text: #ff7a7e;
  --info: #c2c2ca;
  --info-soft: #26262d;
  --side-bg: #0a0a0d;
  --side-hover: #1c1c22;
  --map-bg: #0e0e12;
  --map-dot: #23232a;
  --edge: #4a4a54;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ===== Основа ===== */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#root {
  height: 100%;
}
* {
  box-sizing: border-box;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  padding: 7px 10px;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[type='checkbox'] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}
textarea {
  resize: vertical;
  width: 100%;
}
kbd {
  font-family: var(--f-ui);
  font-size: 11px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 5px;
  color: var(--text-3);
  background: var(--surface-2);
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}
.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.muted {
  color: var(--text-3);
}
.small {
  font-size: 12px;
}
.strong {
  font-weight: 600;
}
.red {
  color: var(--help);
}
.green {
  color: var(--ok);
}
.grow {
  flex: 1;
}
.ic {
  flex: none;
}
.rot90 {
  transform: rotate(90deg);
}
.lnk {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  text-align: left;
}
.lnk:hover {
  text-decoration-color: var(--accent);
}

/* ===== Каркас ===== */
.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}
.demo-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 16px;
  background: #151515;
  color: #efefec;
  font-size: 12px;
  border-bottom: 2px solid var(--accent);
}
.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 21, 0.25);
  flex: none;
}
.demo-bar strong {
  font-size: 11px;
}
.demo-txt {
  color: #b9b9b3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.demo-link {
  margin-left: auto;
  background: none;
  border: 1px solid #3a3a3e;
  color: #efefec;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 12px;
  flex: none;
}
.demo-link:hover {
  border-color: var(--accent);
}
.shell {
  flex: 1;
  display: flex;
  min-height: 0;
}
.side {
  width: 224px;
  flex: none;
  background: var(--side-bg);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  gap: 2px;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  position: relative;
  flex: none;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2.5px solid #151515;
  border-radius: 50%;
}
.brand-t {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-t b {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.brand-t small {
  color: var(--side-muted);
  font-size: 11px;
  margin-top: 3px;
}
.side-g {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.side-gl {
  font-size: 10.5px;
  color: var(--side-muted);
  padding: 4px 10px;
}
.side-i {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: var(--side-text);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  position: relative;
  opacity: 0.86;
}
.side-i:hover {
  background: var(--side-hover);
  opacity: 1;
}
.side-i.on {
  background: var(--side-hover);
  opacity: 1;
}
.side-i.on::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.side-i.on .ic {
  color: var(--accent);
}
.nb {
  margin-left: auto;
  font-size: 11px;
  border-radius: 999px;
  padding: 0 7px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.nb-red {
  background: #ff5c61;
  color: #150505;
  font-weight: 600;
}
.nb-live {
  background: var(--accent);
  color: #151515;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top {
  flex: none;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--text-3);
  text-align: left;
}
.top-search span {
  flex: 1;
}
.top-search:hover {
  border-color: var(--line-2);
}
.top-add kbd.kbd-in {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.2);
  color: #151515;
}
.bell {
  position: relative;
}
.bell-n {
  position: absolute;
  top: 2px;
  right: 1px;
  background: var(--help);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px 3px 3px;
}
.user-btn:hover {
  border-color: var(--line);
}
.view {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.page {
  padding: 22px 24px 48px;
  max-width: 1480px;
  margin: 0 auto;
}
.page-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-h h1 {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.sub {
  color: var(--text-2);
  margin-top: 4px;
}
.page-h-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Кнопки и контролы ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  padding: 7px 14px;
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  border-color: var(--text-3);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.btn-ghost {
  background: transparent;
}
.btn-danger {
  background: var(--help);
  border-color: var(--help);
  color: #fff;
}
.btn-link {
  border: 0;
  background: none;
  padding: 4px 6px;
  color: var(--accent-text);
}
.btn-link:hover:not(:disabled) {
  text-decoration: underline;
}
.btn-s {
  padding: 5px 10px;
  font-size: 13px;
}
.btn-on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ib {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--text-2);
  flex: none;
}
.ib:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}
.ib.on {
  color: var(--accent-text);
}
.ib-s {
  width: 22px;
  height: 22px;
}
.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}
.seg-b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  border-radius: 7px;
  padding: 5px 11px;
  color: var(--text-2);
  white-space: nowrap;
}
.seg-sm .seg-b {
  padding: 3px 9px;
  font-size: 12.5px;
}
.seg-b:hover {
  color: var(--text);
}
.seg-b.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}
.seg-b.on.seg-red {
  color: var(--help);
}
.seg-b.on.seg-ok {
  color: var(--ok);
}
.seg-b.on.seg-risk {
  color: var(--risk);
}
.seg-b.on.seg-help {
  color: var(--help);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 13px;
}
.chip:hover {
  border-color: var(--text-3);
}
.chip.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.chip-s {
  padding: 2px 9px;
  font-size: 12px;
}
.chip-date input {
  border: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: 12.5px;
}
.chk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  border-radius: 5px;
  padding: 0 6px;
  line-height: 19px;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}
.tag-block {
  background: var(--help-soft);
  color: var(--help);
}
.tag-discuss {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.tag-ask {
  background: var(--info-soft);
  color: var(--info);
}
.tag-risk {
  background: var(--risk-soft);
  color: var(--risk);
}
.tag-dec {
  background: var(--ok-soft);
  color: var(--ok);
}
.tag-warn {
  background: var(--risk-soft);
  color: var(--risk);
}
.tag-ex {
  background: var(--accent);
  color: #151515;
}
.tag-muted {
  background: transparent;
  color: var(--text-3);
}
.demo-tag {
  font-size: 11px;
  border: 1px dashed var(--accent);
  color: var(--accent-text);
  border-radius: 5px;
  padding: 0 5px;
  margin-left: 4px;
  white-space: nowrap;
}
.cnt {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.av {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--avc) 22%, var(--surface));
  color: color-mix(in srgb, var(--avc) 70%, var(--text));
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: none;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--avc) 55%, transparent);
  line-height: 1;
}
.av-none {
  background: var(--surface-3);
  color: var(--text-3);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.av-stack {
  display: inline-flex;
}
.av-stack .av + .av {
  margin-left: -6px;
}
.sel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: none;
  border-radius: 7px;
  padding: 2px 6px;
  min-height: 28px;
}
.sel:hover {
  border-color: var(--line-2);
  background: var(--surface);
}
.sel-compact {
  padding: 2px 3px;
}
.sel-t {
  font-size: 13px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  border-radius: 999px;
  padding: 1px 9px 1px 7px;
  background: color-mix(in srgb, var(--pc) 14%, transparent);
  color: var(--text);
  white-space: nowrap;
  line-height: 20px;
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pc);
  flex: none;
  display: inline-block;
}
.due {
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.due-none {
  color: var(--text-3);
}
.due-over {
  color: var(--help);
  font-weight: 600;
}
.due-today {
  color: var(--accent-text);
  font-weight: 600;
}
.due-soon {
  color: var(--text);
}
.prio {
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}
.prio-high {
  color: var(--accent-text);
}
.prio-low {
  color: var(--text-3);
}
.hdot {
  display: inline-block;
  border-radius: 50%;
  flex: none;
  background: var(--ok);
}
.hdot.h-risk {
  background: var(--risk);
}
.hdot.h-help {
  background: var(--help);
}
.hbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 9px 1px 8px;
  white-space: nowrap;
  line-height: 20px;
}
.hbadge .hdot {
  width: 7px;
  height: 7px;
}
.hbadge.h-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.hbadge.h-risk {
  background: var(--risk-soft);
  color: var(--risk);
}
.hbadge.h-help {
  background: var(--help-soft);
  color: var(--help);
}
.sigs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.sig {
  font-size: 11.5px;
  border-radius: 5px;
  padding: 0 6px;
  line-height: 19px;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}
.sig-red {
  background: var(--help-soft);
  color: var(--help);
  font-weight: 600;
}
.sig-amber {
  background: var(--risk-soft);
  color: var(--risk);
  font-weight: 600;
}
.sig-ask {
  background: var(--info-soft);
  color: var(--info);
}
.sig-muted {
  background: transparent;
  color: var(--text-3);
  padding: 0;
}
.sig-suggest {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.sig-plain {
  background: transparent;
  padding: 0;
  color: var(--text-2);
}
.hcount {
  display: inline-flex;
  gap: 3px;
}
.hc {
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  border-radius: 5px;
  line-height: 18px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.hc.h-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.hc.h-risk {
  background: var(--risk-soft);
  color: var(--risk);
}
.hc.h-help {
  background: var(--help-soft);
  color: var(--help);
}

/* ===== Поповеры, меню, модальные ===== */
.pop {
  position: fixed;
  z-index: 90;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: min(460px, 80vh);
  overflow: auto;
}
.menu {
  display: flex;
  flex-direction: column;
  padding: 4px;
}
.menu-pad {
  padding: 10px 12px;
}
.menu-lbl {
  font-size: 11px;
  color: var(--text-3);
  margin: 6px 0 6px;
}
.menu-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.menu-scroll {
  max-height: 340px;
  overflow: auto;
}
.menu-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  color: var(--text-3);
}
.menu-search input {
  border: 0;
  flex: 1;
  padding: 4px;
  box-shadow: none;
  background: none;
}
.mi {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: none;
  text-align: left;
  padding: 7px 9px;
  border-radius: 7px;
  width: 100%;
  font-size: 13.5px;
}
.mi:hover:not(:disabled) {
  background: var(--surface-3);
}
.mi.on {
  background: var(--accent-soft);
}
.mi.danger {
  color: var(--help);
}
.mi-ck {
  margin-left: auto;
  color: var(--accent-text);
}
.mi-note {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
}
.mi-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.mi-col .mi-note {
  margin-left: 0;
  white-space: normal;
}
.mi-asset {
  margin-top: 4px;
}
.mi-proj {
  padding-left: 22px;
}
.mi-date input {
  margin-left: auto;
  padding: 3px 6px;
  font-size: 12.5px;
}
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 8, 8, 0.45);
  display: grid;
  place-items: start center;
  padding: 8vh 16px 16px;
  overflow: auto;
}
.modal {
  width: 100%;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  animation: pop-in 0.14s ease-out;
}
@keyframes pop-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
}
.modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 0 20px;
}
.modal-h h3 {
  font-size: 16px;
}
.modal-b {
  padding: 14px 20px 18px;
}
.modal-b p {
  margin: 0 0 6px;
}
.qc-title {
  width: 100%;
  font-size: 17px;
  font-weight: 500;
  padding: 10px 12px;
}
.qc-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 6px 2px 12px;
}
.qc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.qc-row-top {
  align-items: flex-start;
}
.qc-lbl {
  width: 76px;
  flex: none;
  color: var(--text-3);
  font-size: 13px;
}
.qc-row textarea {
  flex: 1;
}
.qc-users {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qc-u {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 11px 3px 3px;
  font-size: 13px;
}
.qc-u.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.qc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 0;
  margin: 14px -20px 0;
  border-top: 1px solid var(--line);
}
.modal-b .qc-foot {
  margin-bottom: -4px;
}
.ctx-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 8px;
  padding: 5px 10px;
  max-width: 100%;
  text-align: left;
}
.ctx-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctx-static {
  border-style: dashed;
}
.gs .modal-b {
  padding: 0;
}
.gs-in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
}
.gs-in input {
  flex: 1;
  border: 0;
  font-size: 16px;
  padding: 4px;
  box-shadow: none;
  background: none;
  color: var(--text);
}
.gs-res {
  max-height: 60vh;
  overflow: auto;
  padding: 6px;
}
.gs-hint {
  padding: 16px;
  color: var(--text-3);
}
.gs-r {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
}
.gs-r.on {
  background: var(--surface-3);
}
.gs-type {
  font-size: 11px;
  color: var(--text-3);
  width: 64px;
  flex: none;
}
.gs-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-ctx {
  color: var(--text-3);
  font-size: 12px;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(560px, calc(100% - 32px));
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1b1b1d;
  color: #f2f2ef;
  border-radius: 10px;
  padding: 8px 8px 8px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: pop-in 0.16s ease-out;
  max-width: 100%;
}
.toast > span {
  flex: 1;
  min-width: 0;
}
.toast-b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #3a3a3e;
  color: #ffb07e;
  border-radius: 7px;
  padding: 3px 9px;
  white-space: nowrap;
}
.toast-x {
  background: none;
  border: 0;
  color: #8a8a85;
  display: grid;
  place-items: center;
  padding: 4px;
}
.empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  padding: 14px 4px;
  font-size: 13px;
}

/* ===== Карточки и таблицы ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.card-flush {
  padding: 0;
  overflow: hidden;
}
.card-flush > .card-h {
  padding: 14px 16px 10px;
}
.card-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.card-h h2 {
  font-size: 14.5px;
  font-weight: 700;
}
.card-note {
  font-size: 12.5px;
  color: var(--text-2);
  margin: -4px 0 10px;
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}
.col-main,
.col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.tbl-wrap {
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-weight: 600;
  color: var(--text-3);
  font-size: 11.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl th.num {
  text-align: right;
}
.tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tfoot td {
  font-weight: 700;
  border-bottom: 0;
  border-top: 2px solid var(--line-2);
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tr-link {
  cursor: pointer;
}
.tr-link:hover td {
  background: var(--surface-2);
}
.tr-link.open td {
  background: var(--surface-2);
}
.tr-detail > td {
  background: var(--surface-2);
  padding: 12px 14px 16px;
}
.tr-cur td {
  background: var(--accent-soft);
}
.tbl-assets td,
.tbl-assets th {
  padding: 7px 6px;
}
.tbl-assets th {
  white-space: normal;
  line-height: 1.2;
  vertical-align: bottom;
}
.kv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.kv > span:first-child {
  width: 150px;
  flex: none;
  color: var(--text-3);
  font-size: 13px;
}
.assume {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.assume .ic {
  color: var(--accent-text);
  margin-top: 2px;
}
.assume-ai {
  background: var(--info-soft);
  border-color: color-mix(in srgb, var(--info) 35%, transparent);
}
.assume-ai .ic {
  color: var(--info);
}
.warn {
  color: var(--risk);
  font-size: 13px;
}
.ok-line {
  color: var(--ok);
  font-size: 13px;
}
.note-line {
  margin: -4px 0 10px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-grid input,
.form-grid select {
  width: 100%;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}
.row-gap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== Фильтры ===== */
.fbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.fbar-c {
  margin-bottom: 10px;
}
.fbar-c .fsearch {
  flex-basis: 200px;
  min-width: 160px;
}
.fsearch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 0 6px 0 10px;
  color: var(--text-3);
  min-width: 200px;
  flex: 0 1 260px;
}
.fsearch:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.fsearch input {
  border: 0;
  box-shadow: none;
  padding: 6px 2px;
  flex: 1;
  background: none;
  color: var(--text);
}
.fsearch-find {
  flex-basis: 220px;
}
.fgroup {
  display: flex;
  gap: 2px;
}
.fav {
  border: 2px solid transparent;
  background: none;
  border-radius: 50%;
  padding: 1px;
  opacity: 0.75;
}
.fav:hover {
  opacity: 1;
}
.fav.on {
  border-color: var(--accent);
  opacity: 1;
}
.lbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lbar select {
  padding: 5px 8px;
  max-width: 240px;
}

/* ===== Строки задач ===== */
.rows {
  display: flex;
  flex-direction: column;
}
.trow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  min-height: 44px;
}
.trow + .trow {
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.trow:hover {
  background: var(--surface-2);
}
.trow.dim {
  opacity: 0.4;
}
.trow-c {
  min-height: 36px;
  padding: 3px 6px;
}
.tcheck {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: transparent;
  flex: none;
  padding: 0;
}
.tcheck:hover {
  border-color: var(--ok);
  color: var(--ok);
}
.tcheck.on {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.trow-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.trow-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.tt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.trow.is-done .tt {
  text-decoration: line-through;
  text-decoration-color: var(--text-3);
  color: var(--text-3);
}
.trow.is-cancel .tt {
  color: var(--text-3);
}
.trow-ctx {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trow-f {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.inline-add {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 2px 4px 2px 10px;
  color: var(--text-3);
  margin: 6px 0;
}
.inline-add input {
  border: 0;
  flex: 1;
  box-shadow: none;
  background: none;
  padding: 6px 2px;
  color: var(--text);
}
.inline-add-2 {
  padding: 4px;
  flex-wrap: wrap;
}
.inline-add-2 input[type='date'] {
  flex: none;
  border: 1px solid var(--line);
  padding: 4px 6px;
}

/* ===== Главная ===== */
.mw-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 2px 12px;
  margin-bottom: 16px;
  color: var(--text-3);
}
.mw-quick:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mw-quick input {
  flex: 1;
  border: 0;
  box-shadow: none;
  background: none;
  padding: 10px 2px;
  font-size: 15px;
  color: var(--text);
}
.grp {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 10px 6px;
}
.grp-h {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px 6px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.g-over {
  border-color: color-mix(in srgb, var(--help) 40%, var(--line));
}
.g-over .grp-h {
  color: var(--help);
}
.nlist {
  display: flex;
  flex-direction: column;
}
.nitem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 10px;
  align-items: center;
  border: 0;
  background: none;
  text-align: left;
  padding: 8px 6px;
  border-radius: 8px;
}
.nlist-big .nitem {
  grid-template-columns: 120px 1fr auto auto;
  padding: 10px 14px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.nitem:hover {
  background: var(--surface-2);
}
.nitem.read {
  opacity: 0.6;
}
.ntype {
  font-size: 11px;
  border-radius: 5px;
  padding: 0 6px;
  line-height: 19px;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}
.nt-assign {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.nt-mention {
  background: var(--info-soft);
  color: var(--info);
}
.nt-deadline,
.nt-overdue {
  background: var(--help-soft);
  color: var(--help);
}
.nt-birthday {
  background: var(--ok-soft);
  color: var(--ok);
}
.ntext {
  min-width: 0;
  font-size: 13px;
}
.nwhen {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.plist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prow {
  display: flex;
  align-items: center;
  gap: 6px;
}
.prow-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 8px;
  align-items: center;
  border: 0;
  background: none;
  text-align: left;
  padding: 6px 4px;
  border-radius: 8px;
}
.prow-main:hover {
  background: var(--surface-2);
}
.prow-t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow-s {
  grid-column: 2;
  font-size: 12px;
  color: var(--text-3);
}
.bd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.bd-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.bd-row .ic {
  color: var(--accent-text);
}
.hq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hq-row {
  display: flex;
  gap: 8px;
}
.hq-row input {
  flex: 1;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--kc, var(--line-2));
}
.kpi:hover {
  border-color: var(--line-2);
}
.kpi.on {
  border-color: var(--kc, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kc, var(--accent)) 18%, transparent);
}
.kpi-n {
  font-family: var(--f-disp);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-l {
  font-size: 12.5px;
  color: var(--text-2);
}
.k-help {
  --kc: var(--help);
}
.k-risk {
  --kc: var(--risk);
}
.k-sig {
  --kc: var(--accent);
}
.k-stale {
  --kc: var(--text-3);
}
.k-ask {
  --kc: var(--info);
}
.k-over {
  --kc: var(--help);
}
.k-help .kpi-n,
.k-over .kpi-n {
  color: var(--help);
}
.k-risk .kpi-n {
  color: var(--risk);
}
.grid-dir {
  grid-template-columns: minmax(0, 1fr) 380px;
}
.att {
  display: flex;
  flex-direction: column;
}
.att-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  position: relative;
}
.att-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}
.h-row-help::before {
  background: var(--help);
}
.h-row-risk::before {
  background: var(--risk);
}
.att-row:hover {
  background: var(--surface-2);
}
.att-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.att-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.att-t {
  font-weight: 600;
  font-size: 14.5px;
}
.att-a {
  font-size: 12px;
  color: var(--text-3);
}
.att-note {
  font-size: 13px;
  color: var(--text-2);
}
.att-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}
.bmini {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bbar-h {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.bbar-n {
  font-weight: 600;
}
.bbar-t {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
}
.bbar-t i {
  display: block;
  height: 100%;
}
.bb-paid {
  background: var(--text);
}
.bb-appr {
  background: var(--accent);
}
.bb-plan {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, transparent 3px 6px);
  opacity: 0.6;
}
.bb-free {
  background: transparent;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 10px;
}
.lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: -1px;
}
.lg-paid {
  background: var(--text);
}
.lg-appr {
  background: var(--accent);
}
.lg-plan {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 2px, transparent 2px 4px);
}
.lg-free {
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.ms-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 8px;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 13px;
}
.ms-row:hover {
  background: var(--surface-2);
}
.ms-d {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ms-p {
  grid-column: 2;
  font-size: 12px;
  color: var(--text-3);
}

/* ===== Дерево ===== */
.page-tree {
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 14px;
}
.tree-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tree-top-l,
.tree-top-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tree-top-l {
  flex: 1 1 auto;
}
.lod-0 .n-hide0 {
  display: none;
}
.tree-top h1 {
  font-family: var(--f-disp);
  font-size: 24px;
  font-weight: 700;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.crumb {
  border: 0;
  background: none;
  padding: 3px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
}
.crumb:hover {
  background: var(--surface-3);
  color: var(--text);
}
.crumb.on {
  color: var(--text);
  font-weight: 600;
}
.crumb-sep {
  color: var(--text-3);
}
.map {
  flex: 1;
  min-height: 460px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: var(--map-bg);
  background-image: radial-gradient(var(--map-dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.map:active {
  cursor: grabbing;
}
.map-inner {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.map-edges {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}
.map-edges path {
  fill: none;
  stroke: var(--edge);
  stroke-width: 1.5;
}
.map-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  box-shadow: var(--shadow);
}
.zoom-pct {
  font-size: 12px;
  width: 42px;
  text-align: center;
  color: var(--text-2);
}
.map-hint {
  position: absolute;
  left: 12px;
  bottom: 14px;
  font-size: 11.5px;
  color: var(--text-3);
  pointer-events: none;
  max-width: calc(100% - 260px);
}
.node {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 7px 34px 7px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.12s, border-color 0.12s, opacity 0.12s;
}
.node:hover {
  border-color: var(--text-3);
  box-shadow: var(--shadow);
  z-index: 2;
}
.node.sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
  z-index: 3;
}
.node.dim {
  opacity: 0.28;
}
.n-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
}
.n-tt {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-width: 0;
}
.n-ov {
  flex: none;
  margin-left: auto;
  background: var(--help);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}
.n-group {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.n-group .n-title {
  font-weight: 500;
  color: var(--text-2);
  font-size: 12.5px;
}
.o-g .o-grp {
  color: var(--text-2);
  font-style: italic;
}
.n-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
}
.n-sig {
  display: flex;
  gap: 4px;
  position: absolute;
  right: 34px;
  top: 6px;
}
.n-sig:empty {
  display: none;
}
.n-ms {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.n-st {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.n-root {
  background: #151515;
  color: #f2f2ef;
  border: 0;
  border-bottom: 3px solid var(--accent);
  padding-right: 14px;
}
.n-root .n-title {
  font-family: var(--f-disp);
  font-size: 15px;
}
.n-root .n-meta {
  color: #b5b5b0;
}
.n-asset {
  border: 0;
  background: var(--text);
  color: var(--bg);
  padding-right: 64px;
}
.n-asset .n-title-asset {
  font-family: var(--f-disp);
  font-size: 16px;
  font-weight: 700;
}
.n-asset .n-meta {
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}
.n-asset .n-tog {
  color: var(--bg);
  border-color: color-mix(in srgb, var(--bg) 30%, transparent);
}
.n-asset .n-add {
  color: var(--bg);
}
.n-project {
  border-left: 4px solid var(--ok);
}
.n-project.hs-risk {
  border-left-color: var(--risk);
}
.n-project.hs-help {
  border-left-color: var(--help);
  background: color-mix(in srgb, var(--help) 5%, var(--surface));
}
.n-project.is-done {
  opacity: 0.65;
}
.n-task,
.n-sub {
  padding-top: 5px;
  padding-bottom: 5px;
}
.n-sub {
  background: var(--surface-2);
}
.n-sub .n-title {
  font-weight: 500;
  font-size: 12.5px;
}
.n-task .n-title {
  font-weight: 500;
}
.node.is-over {
  border-color: color-mix(in srgb, var(--help) 55%, var(--line-2));
  box-shadow: inset 3px 0 0 var(--help);
}
.node.is-done .n-title span {
  text-decoration: line-through;
  color: var(--text-3);
}
.n-tog {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  display: grid;
  place-items: center;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}
.n-tog:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}
.n-add {
  position: absolute;
  right: 34px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 0;
  background: var(--accent);
  color: #151515;
  display: none;
  place-items: center;
  padding: 0;
}
.n-asset .n-add {
  background: var(--accent);
  color: #151515;
}
.node:hover .n-add,
.node.sel .n-add {
  display: grid;
}
.n-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--accent);
  color: #151515;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 0 9px 0 7px;
  padding: 1px 6px;
}
.n-badge-inline {
  position: static;
  border-radius: 6px;
}
/* уровни детализации карты */
.lod-0 .n-meta:not(.n-meta-always),
.lod-0 .n-sig {
  display: none;
}
.lod-0 .n-title {
  font-size: 15.5px;
  line-height: 1.2;
}
.lod-0 .n-asset .n-title-asset {
  font-size: 19px;
}
.lod-0 .n-meta-always {
  font-size: 13px;
}
.lod-0 .n-ov {
  font-size: 13px;
  height: 22px;
  line-height: 22px;
  min-width: 22px;
}
.lod-0 .n-sub .n-title,
.lod-0 .n-group .n-title {
  font-size: 14px;
}
.lod-0 .n-add {
  display: none !important;
}
.lod-1 .n-sig .sig-ask,
.lod-1 .n-sig .sig-suggest {
  display: none;
}
.lod-2 .n-meta {
  font-size: 12px;
}

.outline {
  flex: 1;
  min-height: 300px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}
.outline:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.orow {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 54px 96px 170px minmax(150px, 220px);
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-bottom: 1px solid var(--line);
  min-height: 38px;
  cursor: default;
}
.orow-h {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  min-height: 32px;
}
.orow:not(.orow-h):hover {
  background: var(--surface-2);
}
.orow.sel {
  background: var(--accent-soft) !important;
  box-shadow: inset 3px 0 0 var(--accent);
}
.orow.dim {
  opacity: 0.35;
}
.oc-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.o-t {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
}
.o-t > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.o-tog {
  width: 22px;
  height: 22px;
  border: 0;
  background: none;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  padding: 0;
  flex: none;
  transition: transform 0.12s;
}
.o-tog.open {
  transform: rotate(90deg);
}
.o-tog:hover {
  background: var(--surface-3);
  color: var(--text);
}
.o-tog-none {
  display: inline-block;
}
.o-a {
  background: var(--surface-2);
}
.o-asset {
  font-family: var(--f-disp);
  font-size: 14px;
}
.o-proj {
  font-weight: 600;
}
.o-task.is-done {
  text-decoration: line-through;
  color: var(--text-3);
}
.o-s .o-t {
  font-size: 13px;
  color: var(--text-2);
}
.o-cnt {
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 0 5px;
  flex: none;
}
.o-add {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #151515;
  display: none;
  place-items: center;
  padding: 0;
  flex: none;
}
.orow:hover .o-add,
.orow.sel .o-add {
  display: grid;
}
.oc-sig {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== Задачи: список, канбан, календарь ===== */
.lgroups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lgroup {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}
.lgroup-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 6px;
  flex-wrap: wrap;
}
.lgroup-t {
  border: 0;
  background: none;
  font-weight: 700;
  font-size: 14px;
  padding: 0;
  text-align: left;
}
.lgroup-t:disabled {
  opacity: 1;
}
.lgroup-t:not(:disabled):hover {
  color: var(--accent-text);
}
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: start;
}
.kcol {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  min-height: 200px;
  transition: border-color 0.1s, background 0.1s;
}
.kcol.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.kcol-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  padding: 4px 6px 10px;
}
.kcol-h .cnt {
  margin-left: auto;
}
.kcol-b {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kcard:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.kcard.is-over {
  box-shadow: inset 3px 0 0 var(--help);
}
.kcard-t {
  font-weight: 500;
  display: flex;
  gap: 5px;
}
.kcard-ctx {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kcard-f {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-title {
  font-family: var(--f-disp);
  font-size: 15px;
  min-width: 150px;
  text-align: center;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}
.cal-wd {
  background: var(--surface-2);
  font-size: 11px;
  color: var(--text-3);
  padding: 6px 8px;
  font-weight: 600;
}
.cal-d {
  background: var(--surface);
  min-height: 118px;
  padding: 4px 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cal-d.other {
  background: var(--surface-2);
}
.cal-d.other .cal-n {
  color: var(--text-3);
}
.cal-d.today .cal-n {
  background: var(--accent);
  color: #151515;
  border-radius: 999px;
  padding: 0 7px;
}
.cal-d.over {
  background: var(--accent-soft);
}
.cal-n {
  font-size: 12px;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.cal-i {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: var(--surface-2);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 11.5px;
  text-align: left;
  min-width: 0;
  width: 100%;
}
.cal-i > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-i > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
.cal-i:hover {
  background: var(--surface-3);
}
.cal-i.is-over {
  color: var(--help);
  font-weight: 600;
}
.cal-i.is-done span {
  text-decoration: line-through;
  color: var(--text-3);
}
.cal-ms {
  background: var(--info-soft);
  color: var(--info);
}
.cal-bd {
  background: var(--ok-soft);
  color: var(--ok);
}
.cal-more {
  border: 0;
  background: none;
  font-size: 11.5px;
  color: var(--accent-text);
  text-align: left;
  padding: 0 5px;
}
.cal-pop {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.agenda {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ag-day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.ag-day.today {
  border-color: var(--accent);
}
.ag-d {
  font-weight: 700;
  margin-bottom: 4px;
}
.ag-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ===== Карточки (выдвижная панель) ===== */
.drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}
.drawer-bg {
  flex: 1;
  background: rgba(10, 10, 10, 0.22);
  animation: fade 0.15s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.drawer {
  width: min(560px, 100%);
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  animation: slide 0.18s ease-out;
}
.drawer-p {
  width: min(780px, 100%);
}
@keyframes slide {
  from {
    transform: translateX(24px);
    opacity: 0.6;
  }
}
.drawer-in {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.dr-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.dr-path {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-size: 13px;
}
.dr-path .crumb {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dr-acts {
  display: flex;
  gap: 2px;
  flex: none;
}
.dr-b {
  flex: 1;
  overflow: auto;
  padding: 14px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dr-b > * {
  flex-shrink: 0;
}
.dr-title {
  width: 100%;
  font-family: var(--f-ui);
  font-size: 20px;
  font-weight: 700;
  border: 1px solid transparent;
  background: none;
  padding: 4px 6px;
  margin: 0 -6px;
  resize: none;
  overflow: hidden;
  line-height: 1.3;
}
.dr-title:hover {
  border-color: var(--line);
}
.fgrid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px 12px;
  align-items: center;
}
.fl {
  color: var(--text-3);
  font-size: 13px;
}
.dr-flags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.flag-block {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--help-soft);
  color: var(--help);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}
.flag-block .muted {
  color: inherit;
  opacity: 0.7;
}
.flag-edit {
  display: flex;
  gap: 6px;
  flex: 1;
}
.flag-edit input {
  flex: 1;
}
.dr-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.dr-sec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.dr-sec-h .muted,
.dr-sec-h .btn,
.dr-sec-h .cnt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.dr-sec-tog {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}
.add-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--line-2);
  background: none;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-3);
  align-self: flex-start;
}
.add-line:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}
.etext {
  white-space: pre-wrap;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  cursor: text;
}
.etext:hover {
  background: var(--surface-2);
}
.einput {
  width: 100%;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  flex-wrap: wrap;
}
.doc-t {
  flex: 1;
  min-width: 120px;
}
.doc-ext {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 4px;
  padding: 1px 5px;
  min-width: 36px;
  text-align: center;
}
.cmt {
  display: flex;
  gap: 10px;
  padding: 6px 0;
}
.cmt-t {
  font-size: 13.5px;
  white-space: pre-wrap;
}
.cmt-new {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cmt-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.evs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ev {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
}
.ev-b {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ev-d {
  color: var(--text-2);
}
.ev-t {
  color: var(--text-3);
  font-size: 11.5px;
  white-space: nowrap;
  margin-left: auto;
}
.duel-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border-left: 3px solid var(--accent);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.duel-on {
  color: var(--accent-text);
  background: var(--accent-soft);
}
.pc-top {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.pc-f {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pc-dates {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pc-nav {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  position: sticky;
  top: -14px;
  background: var(--surface);
  padding: 8px 0;
  z-index: 3;
  margin: -6px 0 -6px;
}
.pc-state {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
}
.pc-state.hs-risk {
  border-left-color: var(--risk);
}
.pc-state.hs-help {
  border-left-color: var(--help);
}
.pc-state-h {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.pc-note {
  font-weight: 500;
}
.suggest {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--accent-text);
  font-size: 13px;
}
.upd-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upd {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
}
.ms-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 13.5px;
  cursor: pointer;
}
.ms-item.done span {
  color: var(--text-3);
  text-decoration: line-through;
}
.ms-item.late .ms-d {
  color: var(--help);
}
.ms-item .ms-d {
  width: 52px;
  text-align: left;
}
.item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13.5px;
  flex-wrap: wrap;
}
.item.closed {
  opacity: 0.55;
}
.item-t {
  flex: 1;
  min-width: 160px;
}
.item-new {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.item-new input {
  flex: 1;
  min-width: 180px;
}

/* ===== Бюджет ===== */
.pb {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pb-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pb-tile {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
}
.pb-tile.neg {
  border-color: color-mix(in srgb, var(--help) 50%, var(--line));
}
.pb-tile.neg .pb-v {
  color: var(--help);
}
.pb-k {
  font-size: 11.5px;
  color: var(--text-3);
}
.pb-v {
  font-weight: 700;
  font-size: 15px;
  text-align: left;
}
.pb-v.clickable {
  cursor: pointer;
  text-decoration: underline dotted var(--line-2);
  text-underline-offset: 3px;
}
.pb-h {
  font-size: 11.5px;
  color: var(--text-3);
}
.pb-in {
  width: 100%;
  font-weight: 700;
}
.tbl-months td,
.tbl-months th {
  padding: 6px 8px;
}
.lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.line {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.line-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px 9px 12px;
  cursor: pointer;
}
.line-main {
  flex: 1;
  min-width: 0;
}
.line-t {
  font-weight: 600;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.line-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  margin-top: 3px;
  align-items: center;
}
.art-chip {
  background: var(--surface-3);
  border-radius: 5px;
  padding: 0 6px;
  line-height: 19px;
  color: var(--text-2);
  white-space: nowrap;
}
.line-r {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
}
.stage {
  font-size: 11.5px;
  border-radius: 5px;
  padding: 0 6px;
  line-height: 19px;
  font-weight: 600;
  white-space: nowrap;
}
.st-planned {
  background: var(--surface-3);
  color: var(--text-2);
}
.st-approved {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.st-partial {
  background: var(--info-soft);
  color: var(--info);
}
.st-paid {
  background: var(--ok-soft);
  color: var(--ok);
}
.st-cancelled {
  background: transparent;
  color: var(--text-3);
  text-decoration: line-through;
}
.l-cancelled {
  opacity: 0.6;
}
.pbar {
  width: 110px;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.pbar i {
  display: block;
  height: 100%;
  background: var(--ok);
}
.line-b {
  padding: 0 12px 12px 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.line-note {
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 6px 10px;
}
.tbl-pay td,
.tbl-pay th {
  padding: 5px 8px;
}
.line-hist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan-cell {
  border: 0;
  background: none;
  padding: 2px 4px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px dashed var(--line-2);
}
.plan-cell:hover {
  background: var(--surface-3);
}
.plan-changed {
  color: var(--accent-text);
  margin-left: 4px;
  font-weight: 800;
}
.tbl-budget td,
.tbl-budget th {
  white-space: nowrap;
}
.example {
  margin-top: 16px;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.split-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 6px;
  align-items: center;
}

/* ===== Планёрка ===== */
.meet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}
.meet-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.tabs-scroll {
  overflow-x: auto;
}
.meet-sec {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meet-side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live {
  font-size: 12px;
  background: var(--accent);
  color: #151515;
  border-radius: 999px;
  padding: 0 8px;
  font-weight: 600;
}
.chips-stat,
.rep-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-2);
}
.stat b {
  font-family: var(--f-disp);
  color: var(--text);
  font-size: 16px;
  margin-right: 4px;
}
.mrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  font-size: 13.5px;
}
.mrow:last-child {
  border-bottom: 0;
}
.det summary {
  cursor: pointer;
  padding: 6px 0;
}
.mproj {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 4px solid var(--ok);
}
.mproj.hs-risk {
  border-left-color: var(--risk);
}
.mproj.hs-help {
  border-left-color: var(--help);
}
.mproj-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mblock {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.mblock-r {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 38px;
  flex-wrap: wrap;
}
.dec-new {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dec-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.decs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dec {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dec-t {
  font-weight: 600;
}
.dec-m {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dec-task {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12.5px;
  text-align: left;
}
.past {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.past ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

/* ===== Отчёты ===== */
.rep {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.rep-set {
  position: sticky;
  top: 0;
}
.rep-set select {
  width: 100%;
}
.rep-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.rep-ta {
  width: 100%;
  min-height: 320px;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.rsec h3 {
  font-size: 13px;
  margin: 10px 0 4px;
}
.rsec ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
}
.rsec li.gap {
  list-style: none;
  margin-left: -18px;
  color: var(--risk);
  display: flex;
  gap: 6px;
}
.ref {
  font-size: 11px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: none;
  padding: 0 5px;
  color: var(--text-2);
  margin-left: 2px;
}
.ref:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}
.srcs {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===== Документы, партнёры, настройки ===== */
.docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.docs:has(.docs-side) {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.docs-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.docs-side .kv > span:first-child {
  width: 80px;
}
.pcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.pcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pcard.soon {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}
.pcard-h {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.pcard-when {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 92px;
}
.pcard-d {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 13px;
}
.pcard-in {
  font-size: 11.5px;
  color: var(--text-3);
}
.pcard-in.hot {
  color: var(--accent-text);
  font-weight: 600;
}
.pcard .kv > span:first-child {
  width: 100px;
}
.pcard-note {
  font-size: 12.5px;
  color: var(--text-2);
  padding: 6px 0;
}
.pcard .btn {
  align-self: flex-start;
  margin-top: 6px;
}
.sw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
  cursor: pointer;
}
.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.settings > section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.egg-note {
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}
.st-ed {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.st-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 130px 76px 30px 30px 30px;
  gap: 6px;
  align-items: center;
}
.st-row input,
.st-row select {
  padding: 5px 8px;
}
.st-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.swatch {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
  padding: 0;
}
.swatch.on {
  box-shadow: 0 0 0 2px var(--accent);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  font-size: 13.5px;
}
.scen {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===== Мобильная навигация ===== */
.bnav,
.fab {
  display: none;
}
.sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 10, 10, 0.35);
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 10px 10px calc(76px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sheet-i {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
}

/* ===== Пасхалки: собственные абстрактные эффекты, без изображений и звуков из игр ===== */
.eggs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  overflow: hidden;
}
.egg {
  position: absolute;
  inset: 0;
}
.egg-text {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #ff6a13;
  color: #141419;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.1;
  padding: 10px 22px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(20, 20, 25, 0.25);
  animation: egg-pop 1.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  white-space: nowrap;
}
.egg-text small {
  font-size: 13px;
  font-weight: 600;
}
@keyframes egg-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  28% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(0.98); }
}
/* Даня: искры и тройной залп */
.spark {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  opacity: 0;
  animation: spark 1s ease-out forwards;
}
@keyframes spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), calc(-1 * var(--h))) scale(1); }
}
.rz {
  position: absolute;
  bottom: 80px;
  width: 0;
  height: 0;
}
.rz i {
  position: absolute;
  left: -90px;
  top: -90px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 6px solid #ff6a13;
  opacity: 0;
  animation: ring 0.9s ease-out forwards;
  animation-delay: inherit;
}
.rz i + i {
  border-width: 2px;
  border-color: #ffc08f;
  animation-duration: 1.2s;
}
@keyframes ring {
  0% { opacity: 0; transform: scale(0.2); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5); }
}
/* Мурат: трещина, пыль, волна и толчок */
.crack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  width: 100%;
  height: 60px;
}
.crack polyline {
  fill: none;
  stroke: #141419;
  stroke-width: 3;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: crack 0.7s ease-out forwards, fade-late 1.5s linear forwards;
}
.crack .crack-b {
  stroke-width: 2;
  animation-delay: 0.35s, 0s;
}
.app[data-app-theme='dark'] ~ * .crack polyline,
.eggs .crack polyline {
  stroke: #ff6a13;
}
@keyframes crack {
  to { stroke-dashoffset: 0; }
}
@keyframes fade-late {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}
.dust {
  position: absolute;
  bottom: 40px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #9a9aa3;
  opacity: 0;
  animation: dust 1.1s ease-out forwards;
}
@keyframes dust {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-60px) scale(1.6); }
}
.wave {
  position: absolute;
  left: 50%;
  bottom: -120px;
  width: 240px;
  height: 240px;
  margin-left: -120px;
  border-radius: 50%;
  border: 3px solid #ff6a13;
  opacity: 0;
  animation: wave 1.2s ease-out forwards;
}
@keyframes wave {
  0% { opacity: 0.9; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(5); }
}
.shake {
  animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake {
  10%, 90% { transform: translate(-1px, 0); }
  20%, 80% { transform: translate(3px, 1px); }
  30%, 50%, 70% { transform: translate(-5px, -1px); }
  40%, 60% { transform: translate(5px, 1px); }
}
/* Прежние эффекты (до rc.8): росчерк */
.streak {
  position: absolute;
  left: -40%;
  top: 44%;
  width: 40%;
  height: 90px;
  animation: charge 0.8s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}
.streak i {
  position: absolute;
  right: 0;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, #ff6a13);
}
.streak i:nth-child(1) { top: 10px; width: 70%; }
.streak i:nth-child(2) { top: 40px; width: 100%; height: 16px; }
.streak i:nth-child(3) { top: 76px; width: 55%; }
@keyframes charge {
  0% { transform: translateX(0); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(360%); opacity: 0; }
}
/* Знамя, конфетти и таракан */
.blade {
  position: absolute;
  top: 36%;
  width: 34vw;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #141419 0 22%, #d9d9de 22% 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.blade-l {
  right: 50%;
  transform-origin: right center;
  animation: blade-l 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, fade-late 2.2s linear forwards;
}
.blade-r {
  left: 50%;
  transform-origin: left center;
  background: linear-gradient(270deg, #141419 0 22%, #d9d9de 22% 100%);
  animation: blade-r 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, fade-late 2.2s linear forwards;
}
@keyframes blade-l {
  0% { transform: translateX(-60vw) rotate(-24deg); }
  100% { transform: translateX(22px) rotate(-24deg); }
}
@keyframes blade-r {
  0% { transform: translateX(60vw) rotate(24deg); }
  100% { transform: translateX(-22px) rotate(24deg); }
}
.burst {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 0;
  height: 0;
}
.burst i {
  position: absolute;
  left: 0;
  top: -2px;
  width: var(--l);
  height: 4px;
  border-radius: 2px;
  background: #ff6a13;
  transform-origin: left center;
  opacity: 0;
  animation: burst 0.7s ease-out 0.45s forwards;
}
@keyframes burst {
  0% { opacity: 1; clip-path: inset(0 100% 0 0); }
  60% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; clip-path: inset(0 0 0 70%); }
}
.egg-bash .burst i {
  animation-delay: 0.1s;
}
.banner {
  position: absolute;
  left: 50%;
  top: 0;
  width: 280px;
  margin-left: -140px;
  height: 170px;
  background: #ff6a13;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  display: grid;
  place-items: center;
  padding-bottom: 28px;
  transform: translateY(-110%);
  animation: banner 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.banner b {
  color: #141419;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  padding: 0 20px;
}
@keyframes banner {
  0% { transform: translateY(-110%); }
  20% { transform: translateY(0); }
  82% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
.conf {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(20, 20, 25, 0.12);
  opacity: 0;
  animation: conf 2.4s cubic-bezier(0.3, 0.6, 0.4, 1) forwards;
}
@keyframes conf {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(105vh) rotate(var(--r)); }
}
.roach {
  position: absolute;
  bottom: 18px;
  left: -120px;
  animation: roach 3.1s cubic-bezier(0.5, 0.1, 0.5, 0.9) forwards;
}
.roach svg {
  display: block;
  filter: drop-shadow(0 3px 4px rgba(20, 20, 25, 0.25));
}
.roach-legs {
  animation: legs 0.12s steps(2) infinite;
  transform-origin: 60px 32px;
}
@keyframes legs {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(-1); }
}
@keyframes roach {
  0% { transform: translate(0, 0); }
  30% { transform: translate(38vw, -6px); }
  42% { transform: translate(40vw, -6px) rotate(-8deg); }
  52% { transform: translate(44vw, 0) rotate(0); }
  100% { transform: translate(calc(100vw + 240px), 0); }
}
.eggs-rm .spark,
.eggs-rm .rz,
.eggs-rm .dust,
.eggs-rm .wave,
.eggs-rm .streak,
.eggs-rm .blade,
.eggs-rm .burst,
.eggs-rm .conf,
.eggs-rm .crack,
.eggs-rm .roach {
  display: none;
}
.eggs-rm .banner {
  animation: none;
  transform: none;
}
.duel-on {
  color: var(--accent);
  background: var(--accent-soft);
}
.duel-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border-radius: var(--r-s);
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}
.egg-note {
  background: var(--surface-2);
  border-radius: var(--r-s);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

/* ===== Версия 0.1.1: входящие, черновики отчёта, ошибки форм ===== */
.field-err {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--help-text);
  font-size: 13px;
  line-height: 1.35;
  padding: 6px 10px;
  border-radius: var(--r-s);
  background: var(--help-soft);
}
input[aria-invalid='true'],
select[aria-invalid='true'] {
  border-color: var(--help);
}
.rep-drafts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.g-inbox {
  background: var(--surface);
  border-radius: var(--r);
  padding: 14px 16px 8px;
  margin-bottom: 8px;
  box-shadow: inset 3px 0 0 var(--accent);
}
.grp-note {
  margin: -2px 6px 8px;
}
.inbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inbox-row + .inbox-row {
  border-top: 1px solid var(--line);
}
.inbox-row .trow {
  flex: 1;
  min-width: 0;
}
.inbox-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--r-s);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.inbox-note .ic {
  color: var(--accent-text);
}
.n-inbox {
  border: 1px dashed var(--accent);
}
.o-inbox .o-asset {
  color: var(--accent-text);
}
.pcard .grow {
  min-width: 0;
}

.legend + .card-note {
  margin-top: 8px;
}
.rep-set .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.modal-f {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
}

/* ===== Адаптив ===== */
@media (max-width: 1180px) {
  .grid-2,
  .grid-dir,
  .meet {
    grid-template-columns: minmax(0, 1fr);
  }
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .meet-side {
    position: static;
  }
  .settings {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .rep {
    grid-template-columns: minmax(0, 1fr);
  }
  .rep-set {
    position: static;
  }
  .docs:has(.docs-side) {
    grid-template-columns: minmax(0, 1fr);
  }
  .orow {
    grid-template-columns: minmax(200px, 1fr) 44px 86px 150px;
  }
  .oc-sig {
    display: none;
  }
}
@media (max-width: 760px) {
  .side {
    display: none;
  }
  .top {
    padding: 0 12px;
    height: 52px;
  }
  .top-search span,
  .top-search kbd {
    display: none;
  }
  .top-search {
    width: auto;
    padding: 8px 10px;
  }
  .top-add {
    display: none;
  }
  .user-n {
    display: none;
  }
  .demo-txt {
    display: none;
  }
  .page {
    padding: 16px 16px 96px;
  }
  .page-h h1,
  .tree-top h1 {
    font-size: 20px;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-n {
    font-size: 22px;
  }
  .bnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: var(--side-bg);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .bn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 0;
    background: none;
    color: var(--side-muted);
    font-size: 10px;
    padding: 4px 1px;
    flex: 1;
    min-width: 0;
  }
  .bn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .bn.on {
    color: var(--accent);
  }
  .fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 0;
    background: var(--accent);
    color: #151515;
    box-shadow: 0 6px 20px rgba(255, 106, 21, 0.45);
    z-index: 56;
  }
  .drawer,
  .drawer-p {
    width: 100%;
  }
  .drawer-bg {
    display: none;
  }
  .dr-b {
    padding: 12px 16px 90px;
  }
  .trow {
    flex-wrap: wrap;
  }
  .trow-main {
    flex-basis: calc(100% - 40px);
  }
  .trow-f {
    margin-left: 30px;
  }
  .fsearch {
    flex: 1 1 100%;
  }
  .page-tree {
    height: auto;
    min-height: 100%;
  }
  .map {
    min-height: 60vh;
  }
  .map-hint {
    display: none;
  }
  .outline {
    max-height: none;
  }
  .orow {
    grid-template-columns: minmax(0, 1fr) 36px 78px;
  }
  .oc-st,
  .oc-sig,
  .orow-h .oc-st {
    display: none;
  }
  .fgrid {
    grid-template-columns: 110px 1fr;
  }
  .pb-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nlist-big .nitem {
    grid-template-columns: 1fr auto;
  }
  .nlist-big .nitem .ntype {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .st-row {
    grid-template-columns: 28px minmax(0, 1fr) 110px 30px 30px;
  }
  .st-row .num,
  .st-row .ib:nth-of-type(2) {
    display: none;
  }
  .modal-bg {
    padding: 16px 8px;
  }
  .qc-lbl {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .toasts {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .line-r .pbar {
    width: 70px;
  }
  .pc-nav {
    top: -12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Версия 0.2: облегчённый вид, меню, создание, бюджет, конвейеры ===== */
body {
  line-height: 1.45;
}
h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
h2 {
  font-size: 15px;
  font-weight: 600;
}
.page-h h1,
.tree-top h1 {
  font-family: var(--f-ui);
}
.sub,
.muted {
  color: var(--text-3);
}
.small {
  font-size: 12.5px;
}
.strong {
  font-weight: 600;
}
.red,
.st-red {
  color: var(--help-text);
}
.st-red .ic {
  vertical-align: -2px;
}
.green {
  color: var(--ok-text);
}
.rot180 {
  transform: rotate(180deg);
}
button,
a,
.btn,
.chip,
.side-i,
.seg-b,
.mi,
.trow,
.node,
.pipe-item,
.start-user {
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), opacity 0.16s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}

/* Кнопки: прямые формы, мягкие радиусы, меньше рамок */
.btn {
  border-radius: var(--r-s);
  border: 0;
  background: var(--surface-3);
  color: var(--text);
  padding: 8px 14px;
  font-weight: 500;
  min-height: 36px;
  justify-content: center;
}
.btn:hover:not(:disabled) {
  background: var(--line);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-2);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}
.btn-s {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 13px;
}
.btn-link {
  background: none;
  box-shadow: none;
  color: var(--text);
  padding: 4px 4px;
  min-height: 0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 106, 19, 0.55);
  text-underline-offset: 3px;
  font-weight: 500;
}
.btn-link:hover:not(:disabled) {
  background: none;
  text-decoration-color: var(--accent);
}
.btn-danger {
  background: var(--help);
  color: #fff;
}
.btn-on {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: none;
}
.btn:disabled {
  opacity: 0.45;
}
.ib {
  border-radius: var(--r-s);
}
.card {
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card-flush {
  padding: 0;
  overflow: hidden;
}
.card-h {
  gap: 8px;
  margin-bottom: 10px;
}
.card-h-pad {
  padding: 14px 16px 10px;
  margin: 0;
  display: flex;
  align-items: center;
}
.cnt {
  color: var(--text-3);
  font-weight: 500;
  font-size: 12.5px;
}
.page {
  padding: 26px 28px 40px;
}
.page-h {
  margin-bottom: 20px;
  align-items: flex-end;
}
.seg {
  background: var(--surface-3);
  border: 0;
  border-radius: var(--r-s);
  padding: 3px;
}
.seg-b {
  border-radius: 7px;
  color: var(--text-3);
}
.seg-b.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(20, 20, 25, 0.08);
}
.chip {
  border: 0;
  background: var(--surface-3);
  border-radius: 8px;
}
.chip.on {
  background: var(--text);
  color: var(--surface);
}
.chip-static {
  cursor: default;
}
.demo-tag {
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-3);
  border: 0;
  font-size: 11.5px;
  font-weight: 500;
  padding: 1px 8px;
  text-transform: none;
  letter-spacing: 0;
}
.tag {
  border-radius: 6px;
  border: 0;
  background: var(--surface-3);
  color: var(--text-2);
  font-weight: 500;
}
.tag-block {
  background: var(--help-soft);
  color: var(--help-text);
}
.tag-ask {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.tag-risk {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.tag-dec,
.tag-discuss {
  background: var(--surface-3);
  color: var(--text);
}

/* Функциональные метки — всегда с текстом или значком */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 18px;
}
.badge-green {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.badge-yellow {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.badge-red {
  background: var(--help-soft);
  color: var(--help-text);
}
.badge-grey {
  background: var(--surface-3);
  color: var(--text-2);
  font-weight: 500;
}

/* Состояние проекта: «нужна помощь» — красный, «есть риск» — жёлтый, «по плану» — нейтральный */
.hdot {
  background: #b9b9c2;
}
.hdot.h-risk {
  background: #e8a600;
}
.hdot.h-help {
  background: var(--help);
}
.hbadge.h-ok {
  background: var(--surface-3);
  color: var(--text-2);
}
.hbadge.h-risk {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.hbadge.h-help {
  background: var(--help-soft);
  color: var(--help-text);
}
.hc.h-ok {
  background: var(--surface-3);
  color: var(--text-2);
}
.hc.h-risk {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.hc.h-help {
  background: var(--help-soft);
  color: var(--help-text);
}
.sig {
  border-radius: 6px;
}
.sig-red {
  background: var(--help-soft);
  color: var(--help-text);
}
.sig-amber,
.sig-ask {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.due-over {
  color: var(--help-text);
  font-weight: 600;
}
.due-today,
.due-soon {
  color: var(--risk-text);
  font-weight: 600;
}

/* ---------- Каркас: чёрная панель с логотипом ---------- */
.demo-bar {
  background: #141419;
  border-bottom: 0;
  min-height: 28px;
  font-size: 12px;
}
.demo-bar strong {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
.demo-dot {
  box-shadow: none;
}
.side {
  width: 236px;
  padding: 10px 12px 14px;
  gap: 0;
}
.brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0 0 8px;
  margin-bottom: 6px;
}
.wl-logo {
  display: inline-block;
  line-height: 0;
}
.wl-logo img {
  display: block;
  max-width: none;
  user-select: none;
}
.brand .brand-t {
  display: block;
  color: var(--side-muted);
  font-size: 12px;
  line-height: 1.3;
  padding: 0 10px;
}
.side-g {
  margin-bottom: 14px;
}
.side-gl {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
  color: #7d7d87;
  padding: 2px 10px 4px;
}
.side-i {
  opacity: 1;
  color: #d8d8de;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.25;
}
.side-i:hover {
  background: var(--side-hover);
  color: #fff;
}
.side-i.on {
  background: var(--side-hover);
  color: #fff;
}
.side-i.on::before {
  left: -12px;
}
.side-i .ic {
  color: #9a9aa3;
}
.side-i.on .ic {
  color: var(--accent);
}
.nb-red {
  background: var(--help);
  color: #fff;
}
.top {
  height: 60px;
  padding: 0 24px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.top-search {
  border-radius: var(--r-s);
  border: 0;
  background: var(--surface-3);
  padding: 8px 12px;
}
.top-create {
  gap: 8px;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  border-radius: var(--r-s);
  padding: 4px 8px 4px 4px;
}
.user-btn:hover {
  background: var(--surface-3);
}
.bell-n {
  background: var(--accent);
  color: #141419;
}
.view {
  background: var(--bg);
}

/* Меню «Создать» */
.create-menu .mi-big {
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
}
.create-menu .mi-big > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.create-menu .mi-big .ic {
  margin-top: 2px;
  color: var(--accent-text);
}
.mi-sub {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.35;
}
.pop {
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.modal {
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.modal-bg {
  background: var(--scrim);
}

/* Аватары: своя картинка или собственная эмблема */
.av-img {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: inline-block;
}
.av-em {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #141419;
  color: var(--accent);
  flex: none;
}
.av-em-flame {
  background: #ff6a13;
  color: #141419;
}
.av-em-charge {
  background: #2a2a31;
  color: #ff8a45;
}
.av-em-quake {
  background: #ffe1cf;
  color: #141419;
}
.side .av-em-duel,
.app[data-app-theme='dark'] .av-em-duel {
  box-shadow: inset 0 0 0 1.5px #3a3a42;
}
.emblems {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.emb {
  background: none;
  border: 0;
  padding: 3px;
  border-radius: 50%;
}
.emb.on {
  box-shadow: 0 0 0 2px var(--accent);
}

/* ---------- Стартовый экран ---------- */
.app-start {
  background: var(--bg);
}
.start {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: 100%;
}
.start-brand {
  background: #141419;
  color: #fff;
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.start-logo {
  align-self: flex-start;
}
.start-copy h1 {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.015em;
  max-width: 560px;
}
.start-copy p {
  margin: 14px 0 0;
  color: #b9b9c2;
  font-size: 16px;
  max-width: 480px;
}
.start-line {
  display: block;
  max-width: 100%;
  height: auto;
}
.start-foot {
  margin-top: auto;
  color: #7d7d87;
  font-size: 12.5px;
}
.start-enter {
  display: grid;
  place-items: center;
  padding: 40px 32px;
}
.start-box {
  width: min(420px, 100%);
}
.start-box h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.start-box > p {
  margin: 0 0 20px;
  font-size: 13.5px;
}
.start-users {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.start-user {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  text-align: left;
  color: var(--text);
}
.start-user:hover {
  box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow);
}
.start-user-t {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- Главная ---------- */
.kpi {
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.kpi.on {
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow);
}
.bbar {
  padding: 8px 0;
}
.bbar + .bbar {
  border-top: 1px solid var(--line);
}
.bbar-t {
  display: flex;
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-3);
  margin: 6px 0 5px;
}
.bbar-t i {
  display: block;
  height: 100%;
}
.bb-paid,
.lg-paid {
  background: #141419;
}
.app[data-app-theme='dark'] .bb-paid,
.app[data-app-theme='dark'] .lg-paid {
  background: #f2f2f4;
}
.bb-plan,
.lg-plan {
  background: #ffb58a;
}
.bb-free,
.lg-free {
  background: var(--surface-3);
}
.bb-over {
  background: var(--help);
}
.bbar-h {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}
.bbar-n {
  font-weight: 600;
}
.bbar-f {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-3);
}
.bbar-f b {
  color: var(--text);
  font-weight: 600;
}
.bbar-f .st-red b {
  color: var(--help-text);
}
.bbar.clickable {
  cursor: pointer;
}

/* ---------- Проекты: заметное создание ---------- */
.tree-top h1 {
  font-size: 26px;
}
.n-title-asset {
  display: flex;
  align-items: center;
  gap: 6px;
}
.n-addp,
.o-addp {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 7px;
  flex: none;
}
.n-addp:hover,
.o-addp:hover {
  background: var(--accent);
}
.o-addp {
  margin-left: 10px;
}
.n-first,
.o-first {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 3px 10px;
  margin-top: 6px;
}
.o-first {
  margin: 0 0 0 10px;
}
.n-first:hover,
.o-first:hover {
  background: var(--accent-soft);
}
.node {
  border-radius: 10px;
}
.first-task {
  background: var(--accent-soft);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 4px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.first-task-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.first-task .inline-add {
  background: var(--surface);
  border-radius: var(--r-s);
}

/* ---------- Карточка задачи: первый экран ---------- */
.dr-ctl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 18px;
}
.ctl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ctl .fl {
  font-size: 12px;
  color: var(--text-3);
}
.dr-sec-c .dr-sec-h {
  font-size: 13px;
}
.dr-sec-h {
  color: var(--text-2);
  font-weight: 600;
}
.dr-more {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}
.dr-more-t {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--text-2);
  font-size: 13.5px;
  text-align: left;
}
.dr-more-t:hover {
  color: var(--text);
}
.dr-more-b {
  padding-top: 8px;
}
.flag-block {
  background: var(--help-soft);
  color: var(--help-text);
  border: 0;
  border-radius: var(--r-s);
}
.cmt-new textarea {
  min-height: 38px;
}
.drawer {
  box-shadow: -12px 0 40px rgba(20, 20, 25, 0.14);
}

/* ---------- Формы ---------- */
.fld {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.fld-l {
  font-size: 12.5px;
  color: var(--text-3);
}
.fld-h {
  font-size: 12px;
  color: var(--text-3);
}
.fld input,
.fld select,
.fld textarea {
  width: 100%;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.form-err {
  color: var(--help-text);
  background: var(--help-soft);
  border-radius: var(--r-s);
  padding: 6px 10px;
  font-size: 13px;
}
.src-fixed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-weight: 500;
}
.src-fixed .fld-h {
  flex-basis: 100%;
  font-weight: 400;
}
.row-gap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.np-form .qc-users {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rule {
  background: var(--surface-2);
  border-radius: var(--r-s);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.xfer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--r-s);
  padding: 10px 12px;
}

/* ---------- Бюджет ---------- */
.month-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.month-t {
  min-width: 132px;
  text-align: center;
  font-weight: 600;
}
.asof-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -6px 0 14px;
}
.asof-bar input {
  width: auto;
}
.kpis-budget {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.kpi-static {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  cursor: default;
  text-align: left;
}
.kpi-static .kpi-l {
  font-size: 12.5px;
  color: var(--text-3);
  order: 0;
}
.kpi-static .kpi-n {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  order: 1;
}
.kpi-sub {
  order: 2;
  font-size: 12px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kpi-red {
  box-shadow: inset 0 0 0 1.5px var(--help), var(--shadow);
}
.kpi-red .kpi-n {
  color: var(--help-text);
}
.kpi-zero .kpi-n {
  color: var(--text-3);
}
.limit-line {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
  padding: 0 4px;
}
.limit-line b {
  color: var(--text);
  font-weight: 600;
}
.budget-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.budget-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tbl th {
  font-weight: 500;
  color: var(--text-3);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
}
.tbl td,
.tbl th {
  border-color: var(--line);
}
.tr-group td {
  background: var(--surface-2);
  font-weight: 600;
  font-size: 13px;
}
.tr-total td {
  font-weight: 600;
  border-top: 1px solid var(--line-2);
}
.tr-expected td {
  color: var(--text-3);
}
.tbl-exp td {
  vertical-align: middle;
}
.tbl-mini {
  width: 100%;
  font-size: 13px;
  margin-top: 8px;
}
.tbl-mini td,
.tbl-mini th {
  padding: 5px 4px;
}
.tbl-note {
  padding: 10px 16px 14px;
}
.cash-sum {
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  padding: 4px 16px 12px;
  font-size: 13px;
}
.how {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.how b {
  color: var(--text);
}
.lh {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lh .dr-sec-h {
  margin-top: 10px;
}
.lh-row {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.lh-row.is-cancelled > .num {
  text-decoration: line-through;
  color: var(--text-3);
}
.asof-note {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--r-s);
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.xd-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13.5px;
}
.xd-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.xd-kpis > div,
.pb-tiles > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--surface-2);
  border-radius: var(--r-s);
  padding: 10px 12px;
}
.xd-kpis .fl,
.xd-meta .fl,
.pb-tiles .fl,
.pb-src .fl {
  font-size: 12px;
  color: var(--text-3);
}
.xd-kpis b,
.pb-tiles b {
  font-size: 16px;
  font-weight: 600;
}
.xd-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.xd-meta > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.xd-note {
  margin-bottom: 8px;
}
.xd-sec {
  margin-top: 16px;
}
.xd-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.xd-form {
  margin-top: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.xd-form-h {
  font-weight: 600;
}
.tbl-entries {
  width: 100%;
  font-size: 13px;
}
.tbl-entries td,
.tbl-entries th {
  padding: 6px 6px;
}
.is-reversed td {
  color: var(--text-3);
  text-decoration: line-through;
}
.is-reversed td:last-child,
.is-reversed td:nth-child(2) {
  text-decoration: none;
}
.pb {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pb-src {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.pb-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pb-list {
  display: flex;
  flex-direction: column;
}
.pb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  text-align: left;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.pb-row:hover {
  background: var(--surface-2);
}
.pb-t {
  flex: 1;
  min-width: 0;
}
.pb .btn-ghost {
  align-self: flex-start;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}
.legend .lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}

/* ---------- Конвейеры брифов и презентаций ---------- */
.pipe {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pipe-list {
  display: flex;
  flex-direction: column;
}
.pipe-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: none;
  border: 0;
  text-align: left;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.pipe-item:hover {
  background: var(--surface-2);
}
.pipe-item.on {
  background: var(--accent-soft);
}
.pipe-item-t {
  font-weight: 500;
}
.pipe-empty {
  padding: 10px 16px 16px;
}
.pipe-new {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.pipe-new select {
  flex: 1;
  min-width: 0;
}
.pipe-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pipe-h {
  font-size: 17px;
}
.pipe-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pipe-title-in {
  font-size: 20px;
  font-weight: 700;
  border: 0;
  background: none;
  padding: 2px 0;
  flex: 1 1 320px;
  border-radius: 0;
}
.pipe-title-in:focus {
  box-shadow: none;
  border-bottom: 2px solid var(--accent);
}
.pipe-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pipe-sec h3 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-3);
}
.stepper li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.st-n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.stepper li.on {
  color: var(--text);
  font-weight: 600;
}
.stepper li.on .st-n {
  background: var(--accent);
  color: #141419;
}
.stepper li.done .st-n {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.stepper li.off {
  opacity: 0.6;
}
.pipe-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pipe-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface-2);
  border: 0;
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  color: var(--text);
}
.pipe-type.on {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--surface);
}
.tpl-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.45;
}
.tpl-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
}
.tpl-layouts {
  margin: 6px 0;
}
.brief-secs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bsec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bsec-h {
  display: flex;
  align-items: baseline;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.bsec-l {
  font-weight: 600;
  font-size: 13.5px;
}
.bsec-empty textarea {
  background: var(--surface-2);
  border-style: dashed;
}
.fc {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fc-ok {
  background: var(--ok-soft);
  color: var(--ok-text);
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.fc-warn {
  background: var(--risk-soft);
  color: var(--text);
}
.fc-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--risk-text);
}
.q-fld .fld-l {
  color: var(--text);
  font-weight: 500;
}
.ver-row input {
  flex: 1 1 240px;
}
.slide-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.slide-n {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
}
.slide-b {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.slide-b input {
  font-weight: 600;
}
.slide-empty .slide-n {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.slide-acts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- Telegram (демо) ---------- */
.tg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 10px 0;
}
.tg-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.tg-bubble {
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
}
.tg-me {
  background: var(--accent-soft);
}
.tg-other {
  background: var(--surface-3);
}
.tg-bot {
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--text-3);
}
.tg-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tg-task {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.tg-task span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tg-log-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.tg-log-t {
  flex: 1 1 240px;
  min-width: 0;
}
.tg-preview {
  white-space: pre-wrap;
  font-family: var(--f-ui);
  font-size: 13px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  max-height: 320px;
  overflow: auto;
  margin: 12px 0 0;
}

/* Спокойные заголовки групп и таблиц */
.grp-h {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}
.g-over {
  border-color: transparent;
}
.g-over .grp-h {
  color: var(--help-text);
}
.pill {
  background: none;
  padding: 1px 2px;
  color: var(--text-2);
}
.sel-pill .pill,
.sel .pill {
  color: var(--text);
}
.pill-dot {
  width: 8px;
  height: 8px;
}
.dr-sec-h {
  font-size: 13.5px;
}
.orow-h {
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
}
.o-proj {
  font-weight: 500;
}
.nitem {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'type when' 'text text';
  gap: 2px 10px;
  padding: 9px 8px;
}
.nitem .ntype {
  grid-area: type;
  justify-self: start;
}
.nitem .ntext {
  grid-area: text;
  font-size: 13.5px;
  line-height: 1.35;
}
.nitem .nwhen {
  grid-area: when;
  font-size: 12px;
  color: var(--text-3);
}
.dr-more-t {
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
}
.dr-more-t > span:first-of-type {
  flex: 1 1 0;
  min-width: 0;
}
.dr-more-t > .muted {
  flex-basis: 100%;
  padding-left: 20px;
}
.dr-more-t .ic {
  margin-top: 3px;
}
.n-row-add {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.n-row-add .n-addp {
  margin-left: 0;
}
.budget-body {
  grid-template-columns: minmax(0, 1fr) 272px;
}
.tbl-exp {
  font-size: 13px;
}
.tbl-exp td:last-child {
  white-space: nowrap;
}
.tbl-exp td,
.tbl-exp th {
  padding: 9px 8px;
}

.n-asset .n-addp {
  background: var(--accent);
  color: #141419;
}
.n-asset .n-addp:hover {
  background: var(--accent-2);
}
.n-asset .n-first {
  color: #fff;
}
.n-asset.n-empty .n-first:hover {
  background: rgba(255, 106, 19, 0.2);
}
.lod-0 .n-addp {
  font-size: 13px;
  padding: 3px 9px;
}

.assume {
  background: var(--surface);
  border: 0;
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 12px 16px;
  line-height: 1.45;
  color: var(--text-2);
}
.assume strong {
  color: var(--text);
}
.assume > .ic {
  color: var(--text-3);
  margin-top: 2px;
}
.app[data-app-theme='dark'] .av-em-duel,
.app[data-app-theme='dark'] .bb-paid {
  box-shadow: inset 0 0 0 1.5px #3a3a42;
}
.app[data-app-theme='dark'] .av-em-quake {
  background: #3a2a20;
  color: #ffb58a;
}

.app[data-app-theme='dark'] .pill-dot {
  box-shadow: 0 0 0 1px #5a5a63;
}

.app-start {
  height: auto;
  min-height: 100%;
}

.settings .tg {
  grid-column: 1 / -1;
}
.pipe-title-in {
  flex-basis: 100%;
}

/* ---------- Адаптив 0.2 ---------- */
@media (max-width: 1280px) {
  .kpis-budget {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .budget-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 980px) {
  .start {
    grid-template-columns: minmax(0, 1fr);
  }
  .start-brand {
    padding: 28px 24px;
  }
  .start-copy h1 {
    font-size: 32px;
  }
  .pipe {
    grid-template-columns: minmax(0, 1fr);
  }
  .pipe-types {
    grid-template-columns: minmax(0, 1fr);
  }
  .tg-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .page {
    padding: 16px 16px 90px;
  }
  .kpis-budget {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid2,
  .xd-kpis,
  .xd-meta,
  .pb-tiles,
  .dr-ctl {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .dr-ctl .ctl:last-child {
    grid-column: 1 / -1;
  }
  .form-grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .top {
    padding: 0 12px;
    gap: 8px;
  }
  .top-search span,
  .top-search kbd,
  .user-n {
    display: none;
  }
  .top-search {
    width: auto;
  }
  .top-create span {
    display: none;
  }
  .start-brand {
    gap: 18px;
  }
  .start-line {
    width: 280px;
  }
  .month-t {
    min-width: 110px;
  }
}
.asof-current {
  background: var(--risk-soft);
  flex-wrap: wrap;
}
.tpl-box-c {
  margin-top: 8px;
  padding: 10px 12px;
}
.brief-saved {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--surface-2);
}
.brief-saved-changed {
  background: var(--risk-soft);
}
.brief-saved .row-gap {
  flex-wrap: wrap;
}
.doc-vers {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
}
.doc-ver {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.fc-warn .chk {
  margin-top: 6px;
  color: var(--text);
}
.docs-side .btn {
  white-space: normal;
  height: auto;
  text-align: left;
  max-width: 100%;
}

/* ================= 0.3 ================= */
.demo-bar .demo-link ~ .demo-link { margin-left: 0; }
.demo-off { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: #ffcf9e; flex: none; }
.demo-off + .demo-link { margin-left: 0; }
.storage-err { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--help-soft); color: var(--help-text); font-size: 13px; font-weight: 600; }
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #141419; color: #efefec; }
.boot-t { font-size: 14px; color: #b9b9b3; }
.nb-new { background: var(--accent); color: #151515; font-weight: 700; font-size: 10px; line-height: 16px; }
.card-pad { padding: 8px 16px 12px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.st-warn { color: var(--risk-text); }
.warn-box { background: var(--risk-soft); color: var(--risk-text); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.warn-box .row-gap { color: var(--text); }
.demo-banner { display: flex; align-items: center; gap: 8px; background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 14px; }

/* Главная: три показателя внимания */
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpis-3 .kpi { padding: 14px 18px 16px; gap: 4px; cursor: pointer; }
.kpis-3 .kpi-l { order: 0; font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpis-3 .kpi-n { order: 1; font-size: 30px; }
.kpi-note { order: 2; font-size: 12px; color: var(--text-3); }
.kpis-3 .kpi.kpi-zero .kpi-n { color: var(--text-3); }
.k-ask .kpi-n { color: var(--text); }
.att-open { margin-bottom: 16px; }
.att-row .att-side { display: flex; align-items: center; gap: 6px; flex: none; }
.att-row .att-main { flex: 1; min-width: 0; cursor: default; }
.att-row .att-main[role='button'] { cursor: pointer; }
.att-row .att-t { font-weight: 600; }
.ask-form { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 10px; }
.ask-form > input { width: 100%; }
.ask-form select, .ask-form input { max-width: 100%; }
.flag-help { display: flex; align-items: center; gap: 8px; background: var(--help-soft); color: var(--help-text); border-radius: 8px; padding: 6px 10px; font-size: 13px; margin: 6px 0; }
.flag-help .muted { color: inherit; opacity: 0.75; }
.flag-help span { flex: 1; min-width: 0; }
.dr-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.dr-quick .item { width: 100%; }
.i-note .item-t { color: var(--text-2); }

/* Бюджет 0.3 */
.bud-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kpis-budget.kpis-3 .kpi { cursor: default; }
.kpis-budget.kpis-3 .kpi-n { font-size: 24px; }
.kpi-warn { box-shadow: inset 0 0 0 1.5px var(--risk), var(--shadow); background: color-mix(in srgb, var(--risk-soft) 70%, var(--surface)); }
.kpi-warn .kpi-n { color: var(--risk-text); }
.kpi-bar { order: 3; width: 100%; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.kpi-bar i { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.kpi-warn .kpi-bar i { background: var(--risk); }
.kpi-red .kpi-bar i { background: var(--help); }
.tbl-grid th, .tbl-grid td { padding: 6px 8px; font-size: 12.5px; white-space: nowrap; }
.tbl-grid td:first-child, .tbl-grid th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 220px; white-space: normal; }
.tbl-grid .tr-asset td { font-weight: 600; background: var(--surface-2, var(--surface)); }
.tbl-grid .tr-asset td:first-child { background: var(--surface); }
.tbl-grid .y-proj { padding-left: 28px; color: var(--text-2); }
.tbl-grid .c-warn { background: var(--risk-soft); color: var(--risk-text); font-weight: 600; }
.tbl-grid .c-over { background: var(--help-soft); color: var(--help-text); font-weight: 600; }
.tr-focus td { background: color-mix(in srgb, var(--accent) 14%, var(--surface)) !important; }
.lh-c { padding: 5px 0; font-size: 12.5px; }
.pb-none { display: flex; align-items: center; gap: 12px; }
.pb-hist { margin-top: 6px; }
.pbf-p { margin-bottom: 10px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.pbf-rows { display: flex; flex-direction: column; gap: 6px; background: var(--surface-3); border-radius: 10px; padding: 10px 12px; }
.pbf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.pick { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pick-list { max-height: 52vh; overflow: auto; display: flex; flex-direction: column; }

/* Билеты */
.page-tickets .crumbs { margin-bottom: 2px; }
.mc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mc-side { display: flex; flex-direction: column; gap: 16px; }
.rq-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto auto auto; gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 16px; color: inherit; font: inherit; cursor: pointer; }
.rq-row:hover { background: var(--surface-3); }
.rq-row-m { display: flex; flex-direction: column; min-width: 0; }
.rq-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-bottom: 12px; }
.rq-head-1 { grid-template-columns: 1fr; }
.rq-lines { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.rq-lh, .rq-line { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.7fr) 72px 32px; gap: 10px; align-items: start; }
.rq-lh { font-size: 12px; color: var(--text-3); padding: 0 2px; }
.rq-line-wrap { border-top: 1px solid var(--line); padding: 8px 0; }
.rq-who, .rq-fan, .rq-q { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rq-who input, .rq-who select, .rq-fan input, .rq-q select { width: 100%; }
.rq-who .tag-new { align-self: flex-start; }
.rq-qty { width: 72px; }
.rq-hint { margin-top: 6px; background: var(--surface-3); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.rq-warn { background: var(--risk-soft); color: var(--risk-text); }
.rq-save { margin-top: 4px; }
.rq-sum { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0; }
.rq-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.rq-acts { margin: 10px 0; }
.rq-tbl td { vertical-align: top; }
.rq-tg .rq-lh { display: none; }
.rq-tg .rq-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rq-tg .rq-q { grid-column: 1 / -1; }
.tag-new { background: var(--surface-3); color: var(--text-2); font-size: 11px; border-radius: 6px; padding: 0 6px; }
.tk-filters { flex-wrap: wrap; gap: 8px; }
.tk-people { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.tk-panel { position: sticky; top: 12px; }
.qty-in { width: 72px; text-align: right; }
.bsec-ro { white-space: pre-wrap; font-size: 13.5px; padding: 6px 0; }

@media (max-width: 1100px) {
  .mc-grid, .tk-people { grid-template-columns: 1fr; }
  .tk-panel { position: static; }
}
@media (max-width: 760px) {
  .kpis-3 { grid-template-columns: 1fr; }
  .rq-head { grid-template-columns: 1fr; }
  .rq-lh { display: none; }
  .rq-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rq-q { grid-column: 1 / -1; }
  .rq-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .demo-txt { display: none; }
}
.badge-orange { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-text, #b84a00); }
.tk-panel .dr-sec-h { margin-top: 14px; }
.tk-panel .rq-row { grid-template-columns: 54px minmax(0, 1fr) auto; padding: 8px 0; }
.tab-warn { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--risk-soft); color: var(--risk-text); font-size: 13px; font-weight: 600; }
.tag-help { background: var(--help-soft); color: var(--help-text); display: inline-flex; align-items: center; gap: 3px; }

/* Логотипы активов (rc.7): квадрат со скруглением; встроенные и загруженные — на светлой подложке, светлые — на тёмной */
.alogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  border-radius: 24%;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  vertical-align: middle;
  line-height: 1;
}
.alogo img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
}
.alogo-dark {
  background: #1d1d23;
  box-shadow: none;
}
.alogo-mono {
  background: var(--surface-3);
  box-shadow: none;
  color: var(--text-2);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.n-title-asset .n-logo {
  margin-right: 8px;
}
.o-logo {
  margin-right: 6px;
}
.chip .alogo {
  margin-right: 6px;
  margin-left: -2px;
}
.asset-logo-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.asset-logo-empty {
  width: 28px;
  height: 28px;
  border: 1px dashed var(--line, #d9d9de);
  border-radius: 6px;
  display: inline-block;
}
/* Статусы только для чтения (участник) */
.st-ro .st-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; }
/* Билеты rc.6: контакты и парковка строки, панель массовых действий */
.rq-line2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: center; margin-top: 6px; }
.rq-park { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.rq-park input { width: 58px; padding: 4px 6px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.bulk-bar select { padding: 5px 8px; }
#mc-requests select { padding: 4px 6px; max-width: 150px; }
@media (max-width: 760px) { .rq-line2 { grid-template-columns: minmax(0, 1fr); } }
/* Виджет «Билеты на ближайшие матчи» */
.wt-match { padding: 10px 0; border-top: 1px solid var(--line); }
.wt-match:first-of-type { border-top: 0; }
.wt-q { display: flex; flex-wrap: wrap; gap: 4px 12px; }
/* Плашка паузы Telegram — на всех экранах */
.tg-pause-banner { background: var(--yellow-bg, #FFF3D1); color: #4D3500; padding: 8px 24px; font-size: 13px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #F1DFA8; flex-wrap: wrap; }

/* ---- Бриф «Собрать по описанию» (rc.6) ---- */
.bsec-ai textarea { border-color: var(--accent); background: var(--accent-soft); }
.bsec-tag-ai { color: var(--accent-text); font-weight: 600; }
.bsec-conflict { border-left: 3px solid var(--accent); padding-left: 10px; }
.bconf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13.5px; }
.bconf mark, #pre-docx mark { background: var(--risk-soft); color: var(--text); padding: 0 3px; border-radius: 4px; }
.bconflict { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--risk-soft); }
.bconflict input { max-width: 220px; }
.brefine { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.brefine input { flex: 1 1 260px; min-width: 0; }
.brefine-var { display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--accent); padding-left: 10px; }
.bsrc { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; }
.bsrc-i { display: flex; flex-direction: column; gap: 2px; }
.bsrc-doc { padding-left: 26px; color: var(--text-2, inherit); }
.vol { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.vol-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.vol-bar span { display: block; height: 100%; background: var(--accent); }
.vol-over .vol-bar span { background: #d64545; }
.vol-over .small { color: #d64545; }
.frag-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; margin: 8px 0; }
.frag-q { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 8px; }
.brief-how { margin-top: 6px; }
.brief-how > div { margin-top: 6px; }

/* ---- Бюджет: общий бюджет и выбранный актив / проект, правка суммы в строке, выгрузка (rc.6) ---- */
.bud-block-h { font-weight: 600; font-size: 15px; margin: 4px 0 8px; }
.bud-slice { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bud-slice select { max-width: 240px; }
.bud-slice-card { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.bud-slice-row { display: flex; gap: 32px; flex-wrap: wrap; }
.bud-slice-row > div { display: flex; flex-direction: column; gap: 2px; }
.td-edit .lnk-num { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: text; border-bottom: 1px dashed var(--line); }
.td-edit .lnk-num:hover { border-bottom-color: var(--accent); }
.amt-edit { display: inline-flex; align-items: center; gap: 4px; }
.amt-edit input { width: 130px; text-align: right; }
.col-gap { display: flex; flex-direction: column; gap: 12px; }

/* ---- Быстрая задача (rc.6) ---- */
.qc-me { font-weight: 700; min-width: 34px; justify-content: center; }
.qc-suggest { border-style: dashed; }
.qc-more { display: flex; flex-direction: column; gap: 10px; }
.qc-discuss { margin-left: 2px; }
.dr-addline { font-size: 13.5px; padding: 4px 0; }
.dr-addline .lnk { font-size: 13.5px; }
.pc-extra summary { cursor: pointer; list-style: revert; }

/* rc.7: типографика возвращена к rc.5 — системный шрифт устройства, основной текст 14 px (решение владельца) */

/* ===== Боевая версия: строка состояния, главная ред. 2, администрирование, новые разделы ===== */
.status-bar { display: flex; align-items: center; gap: 12px; padding: 4px 16px; font-size: 12px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--text-3); min-height: 26px; }
.status-bar.is-demo { background: var(--risk-soft); color: var(--risk-text); }
.sb-demo, .sb-test { color: var(--risk-text); }
.sb-off { color: var(--help-text); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.sb-err { color: var(--help-text); }
.sb-saving { color: var(--text-3); }
.sb-saved { color: var(--ok-text); }
.sb-rec { color: var(--text-3); }
.ok-box { background: var(--ok-soft); color: var(--ok-text); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.row-g { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.row-g.wrap, .row-g .wrap { flex-wrap: wrap; }
.fl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-3); }
.fl input, .fl select, .fl textarea { font-size: 14px; color: var(--text); }
.in-s { width: 72px; }
.progress { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.card-pad { padding: 12px 16px; }
.card-wide { grid-column: 1 / -1; }
.card-toggle { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; font: inherit; color: inherit; }
.lnk { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.red { color: var(--help-text); }
.orange { color: var(--accent-text); }
.green { color: var(--ok-text); }
.hdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.hdot-green { background: var(--ok); } .hdot-orange { background: var(--accent); } .hdot-red { background: var(--help); } .hdot-grey { background: var(--line-2); }

/* Главная: активные проекты — главное место */
.grid-home { grid-template-columns: minmax(0, 1fr) 360px; }
.attention-panel { margin: 12px 0; }
.ap-group { border-top: 1px solid var(--line); }
.ap-gh { padding: 8px 16px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.ap-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr 0.9fr 1.8fr 0.9fr 0.8fr; gap: 10px; align-items: center; width: 100%; padding: 9px 16px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ap-row:hover { background: var(--surface-2); }
.ap-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ap-t .strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-marks { display: flex; gap: 4px; flex-wrap: wrap; }
.ap-st, .ap-own { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ap-st .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ap-next { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tasks, .ap-b { font-size: 13px; text-align: right; }
.mt-row, .ch-row { display: flex; gap: 8px; align-items: center; width: 100%; background: none; border: 0; padding: 6px 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid var(--line); }
.mt-row:last-child, .ch-row:last-child { border-bottom: 0; }
.mt-d { font-size: 12px; min-width: 76px; color: var(--text-3); }
.mt-t, .ch-t { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ls-row:last-of-type { border-bottom: 0; }
.ls-live .ls-score { color: var(--accent-text); }
.ls-score { font-weight: 700; font-size: 15px; }
.ls-st { color: var(--text-3); }
.ls-lg { text-align: right; }

/* Администрирование */
#admin .seg { margin-bottom: 12px; }
.integ { border: 1px solid var(--line); border-radius: var(--r-s); margin: 6px 0; }
.integ-h { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.integ-b { padding: 0 12px 12px; }
.integ-miss { padding: 0 12px 8px; }
.integ-missing { margin: 0; padding-left: 18px; color: var(--risk-text); }
.audit { max-height: 240px; overflow: auto; }

/* Документы, версии, согласования */
.ver-row { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; flex-wrap: wrap; }
.appr { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.appr-h { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.doc-row { display: flex; gap: 8px; align-items: center; width: 100%; background: none; border: 0; padding: 6px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.rep-row { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; margin: 8px 0; }
.tbl-res td { padding: 5px 8px; }
.tbl-edit input, .tbl-edit select { width: 100%; }

/* Шаблоны проектов */
.tp-prev { border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 10px; max-height: 220px; overflow: auto; }
.tp-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 13px; padding: 3px 0; }
.tp-sub { padding-left: 16px; color: var(--text-2); }

/* Массовая правка и телефон */
.trow-sel { margin: 0 6px 0 2px; width: 16px; height: 16px; accent-color: var(--accent); }
.trow.is-sel { background: var(--accent-soft); }
.bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; background: var(--side-bg); color: var(--side-text); border-radius: var(--r-s); }
.bulk-bar .btn-link { color: var(--side-text); }
.task-sheet { display: flex; flex-direction: column; gap: 10px; }

/* Встречи */
.grid-rec { grid-template-columns: minmax(0, 1fr) 380px; }
.player audio { width: 100%; }
.tr-list { max-height: 70vh; overflow: auto; }
.tr-seg { display: grid; grid-template-columns: 76px 130px 1fr; gap: 8px; padding: 6px 16px; border-top: 1px solid var(--line); align-items: start; }
.tr-seg.on { background: var(--accent-soft); }
.tr-ts { background: none; border: 0; color: var(--accent-text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; text-align: left; }
.tr-sp { font-size: 12px; }
.tr-t { font-size: 14px; white-space: pre-wrap; cursor: text; }
textarea.tr-t { width: 100%; min-height: 60px; }
.tr-fix { color: var(--ok-text); font-size: 12px; }
.chk-row, .prop-row { padding: 4px 0; border-bottom: 1px solid var(--line); }

/* Нейминг и тренды */
.np-card { border-top: 1px solid var(--line); }
.np-h { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 16px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.np-b { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.np-text { white-space: pre-wrap; font-size: 14px; background: var(--surface-2); border-radius: var(--r-s); padding: 10px; }
.np-check { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; }
.np-hist { margin-top: 4px; }
.dir-h { margin: 18px 0 8px; font-size: 15px; }
.tr-card { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

/* Кейсы */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.case-card { display: flex; flex-direction: column; gap: 6px; }
.rep-tabs { margin: 6px 0; }

@media (max-width: 1100px) {
  .grid-home, .grid-rec { grid-template-columns: 1fr; }
  .ap-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ap-st, .ap-own, .ap-b { display: none; }
  .ap-next { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .status-bar { padding: 4px 12px; }
  .tr-seg { grid-template-columns: 64px 1fr; }
  .tr-sp { grid-column: 2; }
  .tr-t { grid-column: 1 / -1; }
  .row-g { flex-wrap: wrap; }
  .bn-plus { color: var(--accent); }
}

/* rc.7: активы — владелец, перенос проектов */
.settings .asset-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(120px, auto) minmax(0, auto); align-items: center; column-gap: 12px; row-gap: 4px; }
.asset-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 10px; }
@media (max-width: 640px) { .settings .asset-row { grid-template-columns: minmax(0, 1fr) auto; } .asset-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.asset-owner { display: inline-flex; align-items: center; gap: 8px; }
.mv-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-s); padding: 4px 10px; }
.mv-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mv-row:last-child { border-bottom: 0; }
.mv-preview { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-s); font-size: 13px; line-height: 1.45; }
.mv-preview .field-err { margin-top: 6px; }

/* rc.7: согласование бюджета */
.br-card { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.br-card.br-pending, .br-card.br-accepted { border-color: var(--risk); }
.br-card.br-counter { border-color: var(--accent); }
.br-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.br-h .muted .av { vertical-align: middle; }
.br-b { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.br-line { line-height: 1.4; }
.br-k { display: inline-block; min-width: 150px; color: var(--text-3); }
.br-note { color: var(--accent-text); font-weight: 600; }
.br-tag { background: var(--risk-soft); color: var(--risk-text); }
.br-tag-counter { background: var(--accent-soft); color: var(--accent-text); }
.br-tag-returned, .br-tag-draft { background: var(--surface-3); color: var(--text-2); }
.br-tag-approved { background: var(--ok-soft); color: var(--ok-text); }
.br-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.br-form { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 2px; border-top: 1px dashed var(--line); }
.br-impact { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-s); padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.br-log { border-top: 1px dashed var(--line); padding-top: 6px; }
.al-rows { display: flex; flex-direction: column; gap: 6px; }
.pb-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.pb-mark-approved { background: var(--ok-soft); color: var(--ok-text); }
.pb-mark-legacy { background: var(--surface-3); color: var(--text-2); }
.pb-req { margin: 10px 0; }
.kpis-budget.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis-budget.kpis-4 .kpi { cursor: default; }
.kpis-budget.kpis-4 .kpi-n { font-size: 22px; }
@media (max-width: 900px) { .kpis-budget.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-pending .kpi-n { color: var(--text-2); }
.tr-pending td { color: var(--text-3); }
.tr-pending-row td { color: var(--text-2); }
.tr-sub td { font-weight: 400; color: var(--text-3); }
.att-budget { padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.att-row-br { display: block; padding: 6px 16px; }
.card-pad-x { padding: 8px 16px 0; }

/* ---------- Материалы слайдов презентаций (rc.7) ---------- */
.dm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-s);
  background: var(--surface-2);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.dm-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dm-h {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dm-h .btn {
  margin-left: auto;
}
.dm-t {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 12px;
}
.dm-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.dm-pv {
  position: relative;
  flex: none;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-3);
  user-select: none;
}
.dm-pv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.dm-pv-click {
  cursor: crosshair;
}
.dm-pv-click:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dm-pv-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
/* Видимая на слайде часть: всё вне рамки затемнено */
.dm-crop {
  position: absolute;
  box-shadow: 0 0 0 999px rgba(20, 20, 25, 0.55);
  outline: 1.5px solid #ffffff;
  pointer-events: none;
}
.dm-focus {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px #ffffff;
  pointer-events: none;
}
.dm-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dm-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-ctl,
.dm-acts {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}
.dm-ctl label,
.dm-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dm-link {
  flex-wrap: wrap;
}
.dm-link input {
  min-width: 220px;
  flex: 1;
}
.dm-req input {
  margin: 0;
}
.dm-acts select {
  max-width: 220px;
}
.dm-del {
  color: var(--help-text);
}
.dm-warn {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--risk-text);
}
.dm-busy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-2);
}
.dm-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.dm-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.dm-sum,
.dm-result {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: var(--surface-2);
}
.dm-result-err {
  background: var(--help-soft);
  color: var(--help-text);
}
.dm-list {
  margin: 4px 0 0;
  padding-left: 18px;
}
.dm-compat {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 8px;
}
.dm-compat .ic {
  flex: none;
  margin-top: 2px;
}
@media (max-width: 760px) {
  .dm-item {
    flex-direction: column;
  }
  .dm-pv {
    max-width: 100%;
  }
}

/* Администрирование → Доступ Claude */
#admin-claude .mcp-steps { margin: 4px 0 10px; padding-left: 22px; }
#admin-claude .mcp-steps li { margin: 3px 0; }
#admin-claude .mcp-steps code { word-break: break-all; }
#claude-mcp-url { flex: 1; min-width: 0; }
#admin-claude .tbl td { vertical-align: top; }

/* rc.7: исполнитель по умолчанию и соисполнители в форме задачи */
.qc .qc-lbl { width: 104px; }
.qc-auto { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.qc-auto .lnk { font-size: 12px; }
.qc-co { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; }
.qc-co-chip { display: inline-flex; align-items: center; gap: 5px; padding-right: 2px; }
.qc-co-chip .ib { width: 20px; height: 20px; }
.dr-ctl .ctl-co .av-stack { display: inline-flex; }
.task-rule { font-size: 12px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 640px) {
  .qc .qc-lbl { width: 100%; }
}
.trow-co { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; margin-left: -4px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; box-sizing: border-box; }
/* rc.7: чат уведомлений Telegram */
.tg-chat { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.tg-steps { gap: 12px; }
.tg-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.tg-step > b { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.tg-step .row-g { margin-top: 6px; }
.ok-text { color: var(--ok-text); }
.qc-owner-box { flex: 1; min-width: 0; }
.qc-row-top .qc-lbl { padding-top: 6px; }

/* Соисполнители в карточке задачи: до двух — с именами */
.co-names { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.co-name { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* rc.7: карточка проекта — сведения в две строки, задачи сразу под ними, остальное свёрнуто */
.pc-line2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 8px; font-size: 13px; }
.pc-line2 .hq-row { flex: 1; min-width: 260px; }
.pc-brief { color: var(--text-2); }
.pc-bmark { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; background: var(--surface-3); color: var(--text-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pc-bmark-approved { background: var(--ok-soft); color: var(--ok-text); font-weight: 600; }
.pc-bmark-pending, .pc-bmark-accepted { background: var(--risk-soft); color: var(--risk-text); font-weight: 600; }
.pc-bmark-counter { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.flag-ask { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; border-radius: var(--r-s); padding: 8px 12px; margin: 0 0 8px; background: var(--risk-soft); color: var(--risk-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pc-tasks { margin-top: 4px; }
.pc-tasks .dr-sec-h { flex-wrap: wrap; gap: 8px; }
.rows-closed { opacity: 0.75; }
.fold { padding-top: 0; }
.fold-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 0; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.fold-h:hover .fold-t { color: var(--accent-text); }
.fold-t { font-weight: 600; font-size: 14px; }
.fold-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fold-att > .fold-h { background: var(--risk-soft); border-radius: var(--r-s); padding-left: 8px; padding-right: 8px; }
.fold-tag { font-size: 11.5px; }
.fold-b { padding: 2px 0 10px; display: flex; flex-direction: column; gap: 6px; }
/* rc.7: календарь матчей — автозагрузка */
.fx-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.fx-teams { display: inline-flex; align-items: center; gap: 5px; }
.fx-teams .alogo { margin-left: 2px; }
.tr-more td { padding-top: 4px; padding-bottom: 8px; font-size: 12.5px; }
.fx-dlg { gap: 10px; }
.fx-sum { background: var(--surface-2); border-radius: var(--r-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.fx-choose, .fx-changes { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.fx-ch { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

/* rc.8: собственные пасхалки «Штаба» — Звездопад, Сверхзвук, Кубок, Трибуна */
.egg-stars .st { position: absolute; width: var(--s); height: var(--s); opacity: 0; animation: st-fall 1.7s cubic-bezier(0.45, 0, 0.75, 1) forwards; filter: drop-shadow(0 0 6px rgba(255, 106, 19, 0.65)); }
.egg-stars .st svg { display: block; transform: rotate(var(--r)); }
.egg-stars .st::before { content: ''; position: absolute; top: 50%; left: 50%; width: var(--len); height: 2px; border-radius: 2px; background: linear-gradient(90deg, currentColor, transparent); transform-origin: 0 50%; transform: rotate(-64deg); opacity: 0.7; }
@keyframes st-fall { 0% { opacity: 0; transform: translate(0, 0); } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-28vw, 62vh); } }
.egg-starsSmall .st-s { position: absolute; right: 56px; bottom: 96px; transform: translate(var(--x), var(--y)) scale(0); animation: st-pop 0.9s ease-out forwards; }
@keyframes st-pop { 0% { transform: translate(var(--x), var(--y)) scale(0) rotate(0); opacity: 0; } 30% { transform: translate(var(--x), var(--y)) scale(1.25) rotate(30deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) - 24px)) scale(0.9) rotate(60deg); opacity: 0; } }
.egg-sonic .sn-jet { position: absolute; top: 46%; left: -45%; width: 42%; height: 5px; border-radius: 5px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 40%, #ff6a13); box-shadow: 0 0 18px rgba(255, 106, 19, 0.8); animation: sn-fly 0.62s cubic-bezier(0.55, 0, 0.85, 1) forwards; }
.egg-sonic .sn-jet i { position: absolute; right: -6px; top: -5px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 0 22px 8px rgba(255, 106, 19, 0.9); }
@keyframes sn-fly { 0% { left: -45%; opacity: 0.2; } 100% { left: 108%; opacity: 1; } }
.egg-sonic .sn-ring { position: absolute; top: 46%; right: 6%; width: 44px; height: 44px; margin: -22px -22px 0 0; border: 3px solid #ff6a13; border-radius: 50%; opacity: 0; transform: scale(0.2); animation: sn-ring 0.85s ease-out forwards; }
@keyframes sn-ring { 0% { opacity: 0.95; transform: scale(0.2); } 100% { opacity: 0; transform: scale(9) scaleX(0.6); } }
.egg-sonicSmall .sn-line { position: absolute; left: -35%; width: 30%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #ff6a13); animation: sn-line 0.55s ease-in forwards; }
@keyframes sn-line { to { left: 110%; } }
.app.egg-nudge { animation: egg-nudge 0.42s cubic-bezier(0.3, 0.7, 0.3, 1); }
@keyframes egg-nudge { 0% { transform: none; } 25% { transform: translateX(7px); } 55% { transform: translateX(-3px); } 100% { transform: none; } }
.egg-cup .cup { position: absolute; left: 50%; bottom: -220px; transform: translateX(-50%); filter: drop-shadow(0 0 26px rgba(255, 106, 19, 0.55)); animation: cup-rise 2.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.egg-cup .cup-svg { display: block; }
@keyframes cup-rise { 0% { bottom: -220px; transform: translateX(-50%) rotate(-8deg); } 32% { bottom: 26vh; transform: translateX(-50%) rotate(4deg); } 42% { transform: translateX(-50%) rotate(0); } 85% { bottom: 26vh; opacity: 1; } 100% { bottom: 28vh; opacity: 0; } }
.egg-cup .cup-rm { bottom: 26vh; animation: fade-io 2.8s ease forwards; }
.egg-cup .egg-text { top: 24%; }
@keyframes fade-io { 0% { opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.egg-stand .stand { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 2vw; background: linear-gradient(to top, rgba(20, 20, 25, 0.14), transparent); animation: fade-io 2.6s ease forwards; }
.egg-stand .fan { position: relative; display: inline-block; transform-origin: 50% 100%; animation: fan-jump 0.55s ease-out both; animation-delay: calc(var(--i) * 45ms + 0.25s); }
.egg-stand .fan svg { display: block; transform: scaleY(var(--h)); transform-origin: 50% 100%; overflow: visible; }
.egg-stand .fan .arms { opacity: 0; animation: arms-up 0.55s ease-out both; animation-delay: calc(var(--i) * 45ms + 0.25s); }
.egg-stand .scarf { position: absolute; left: 1px; top: -10px; width: 20px; height: 5px; border-radius: 2px; background: #ff6a13; animation: scarf 0.28s ease-in-out infinite alternate; }
@keyframes fan-jump { 0% { transform: translateY(0); } 40% { transform: translateY(-24px); } 100% { transform: translateY(0); } }
@keyframes arms-up { 0% { opacity: 0; } 30% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes scarf { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.egg-stand .stand-rm, .egg-stand .stand-rm .fan, .egg-stand .stand-rm .arms, .egg-stand .stand-rm .scarf { animation: none; }
.egg-stand .stand-rm { animation: fade-io 2.6s ease forwards; }
.egg-claps .clap { position: absolute; bottom: 22px; width: 12px; height: 12px; border-radius: 50%; background: #ff6a13; opacity: 0; animation: clap-pop 0.6s ease-out forwards; }
@keyframes clap-pop { 0% { opacity: 0; transform: scale(0.2); box-shadow: 0 0 0 0 rgba(255, 106, 19, 0.6); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.2) translateY(-14px); box-shadow: 0 0 0 16px rgba(255, 106, 19, 0); } }
.eggs-rm .egg-text { animation: fade-io 1.9s ease forwards; transform: translate(-50%, -50%); }
.egg-sound { display: inline-flex; align-items: center; gap: 8px; }
.egg-sound input[type='range'] { width: 120px; }

.info-box { background: var(--info-soft); color: var(--text-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 4px 0 8px; }
.warn-box.row-g { flex-direction: row; align-items: center; flex-wrap: wrap; }
.est-block { margin-top: 10px; }
.est-block .dr-sec-h { display: flex; align-items: center; gap: 6px; }
.tbl-compact td, .tbl-compact th { padding-top: 5px; padding-bottom: 5px; }
.est-modal .modal-b, .est-modal .modal-body { overflow-x: hidden; }
.est-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.est-c-warn { border-color: var(--risk); color: var(--risk-text); }
.est-c-err { border-color: var(--help); color: var(--help-text); }
.est-vat { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.est-rate input { width: 52px; padding: 3px 6px; text-align: right; }
.est-table-wrap { overflow-x: auto; margin: 0 -4px; }
.est-table { min-width: 860px; }
.est-table td { padding: 3px 4px; vertical-align: middle; }
.est-table th { white-space: nowrap; }
.est-in { width: 100%; min-width: 60px; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px; font: inherit; color: inherit; }
.est-in.wide { min-width: 240px; }
.est-in.num { text-align: right; font-variant-numeric: tabular-nums; min-width: 90px; }
.est-in:hover { border-color: var(--line-2); }
.est-in:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.est-in.changed { background: var(--accent-soft); }
.est-in.est-pct { width: 56px; min-width: 56px; display: inline-block; text-align: right; }
.est-r-warn td:first-child { box-shadow: inset 3px 0 0 var(--risk); }
.est-r-err td:first-child { box-shadow: inset 3px 0 0 var(--help); }
.est-chk { display: inline-block; }
.est-ok { color: var(--ok-text); }
.est-warn { color: var(--risk-text); }
.est-err { color: var(--help-text); }
.est-foot td { border-top: 1px solid var(--line); }
.est-total td { font-variant-numeric: tabular-nums; }
.est-bar { margin-top: 10px; align-items: center; }
.est-an { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.est-an h3 { font-size: 15px; margin: 0; }
.est-an .card-h { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; }
.est-an-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 10px 0; }
.est-v-high, .est-v-low { color: var(--help-text); font-weight: 600; }
.est-v-top, .est-v-bottom, .est-v-few { color: var(--risk-text); }
.est-v-in { color: var(--ok-text); }
.est-v-none, .est-v-noprice { color: var(--text-3); }
.est-sub td { background: var(--surface-2); }
.est-h { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.est-ref input { min-width: 90px; }
.est-qs { padding-left: 22px; margin: 4px 0 8px; display: grid; gap: 6px; }
.est-qs textarea { width: 100%; min-height: 40px; }
.est-newctr input { flex: 1 1 140px; min-width: 0; }
@media (max-width: 760px) { .est-an-cols { grid-template-columns: 1fr; } .est-vat { width: 100%; } }

/* rc.8 — экран роли «Руководитель» */
.app-leader { min-height: 100vh; background: var(--bg); }
.leader-top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.leader-title { font-weight: 600; }
.leader-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.leader-stats { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.leader-stats .stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; display: flex; flex-direction: column; min-width: 150px; }
.leader-stats .stat b { font-size: 26px; line-height: 1.1; }
.leader-stats .stat span { color: var(--text-3); font-size: 13px; }
.leader-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.leader-filters .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.leader-filters .chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; cursor: pointer; font: inherit; color: var(--text); }
.leader-filters .chip.on { background: var(--text); color: var(--on-text); border-color: var(--text); }
.leader-filters input { min-width: 240px; flex: 1; }
.leader-group .card-h { display: flex; align-items: center; gap: 8px; }
.leader-tbl td { vertical-align: middle; }
.leader-pc .kv { margin-top: 12px; }
.pre { white-space: pre-wrap; }
@media (max-width: 720px) {
  .leader-top { padding: 10px 12px; flex-wrap: wrap; }
  .leader-tbl th:nth-child(4), .leader-tbl td:nth-child(4) { display: none; }
}
.leader-scope { display: flex; flex-direction: column; gap: 6px; }
.leader-scope-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.leader-scope-g { display: flex; flex-direction: column; gap: 2px; }
.leader-scope-g .chk.small { padding-left: 20px; }

.dropfile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 14px 14px; background: var(--surface-2); transition: border-color 0.15s ease, background-color 0.15s ease; }
.dropfile.compact { padding: 8px 10px; }
.dropfile.over { border-color: var(--accent); background: var(--accent-soft); }
.dropfile.disabled { opacity: 0.6; }
.dropfile-l { flex: 1 1 200px; color: var(--text-2); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.dropfile-h, .dropfile .field-err { flex-basis: 100%; }
.guests { min-height: 0; }
.guest-chip { padding-right: 4px; }
.chip-x { border: 0; background: none; color: var(--text-3); padding: 0 4px; cursor: pointer; font-size: 12px; line-height: 1; }
.chip-x:hover { color: var(--text); }
.spk { padding: 8px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.spk:last-of-type { border-bottom: 0; }
.spk-h { display: flex; align-items: center; gap: 8px; }
.spk-clips { display: inline-flex; gap: 3px; margin-left: auto; }
.spk-play { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); cursor: pointer; padding: 0; }
.spk-play:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); }
.spk-play:disabled { opacity: 0.4; cursor: default; }
.spk-first { color: var(--text-2); }
/* Имя — шире, «объединить» — уже; вместе не шире панели (без горизонтальной прокрутки) */
.spk .row-g select { max-width: 100%; min-width: 0; flex: 1 1 0; }
.spk .row-g select:first-child { flex: 2 1 0; }
.spk-new input { flex: 1 1 120px; min-width: 0; }
.rs .card-h .small { white-space: nowrap; }
.rs-topic { padding: 8px 0; border-top: 1px solid var(--line); }
.rs-topic p { margin: 4px 0 0; }
.rs-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.rs-item { padding: 6px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; justify-items: start; }
.rs-q { color: var(--text-2); }
.rs-sure { color: var(--ok-text); }
.rs-check { color: var(--risk-text); }
.rs-foot { margin-top: 12px; align-items: center; }
.bulk-row { align-items: center; }
.bulk-row .grow { flex: 1 1 220px; min-width: 0; }
@media (max-width: 900px) { .rs-cols { grid-template-columns: 1fr; } }
.arch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.arch-bar .menu-search { min-width: 220px; }
.arch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.arch-t { font-weight: 600; text-align: left; }
.arch-ctx { flex: 1 1 160px; }
.arch-compact .arch-t { flex: 1 1 200px; }
.flag-archived { display: flex; align-items: center; gap: 8px; background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 6px 0; }
.flag-helpt { border-color: var(--help); }
.trow-grip { cursor: grab; color: var(--text-3); padding: 0 2px; user-select: none; font-size: 13px; letter-spacing: -2px; opacity: 0; transition: opacity 0.12s ease; }
.trow-ord:hover .trow-grip, .trow-ord:focus-within .trow-grip { opacity: 1; }
.trow.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.kcard[data-kcard] { position: relative; }
@media (hover: none) { .trow-grip { display: none; } }
.save-float { position: fixed; right: 16px; bottom: 16px; z-index: 96; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sf { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--text-2); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); border-radius: 10px; padding: 7px 12px; font-size: 13px; animation: sf-in 160ms ease-out; max-width: min(460px, calc(100vw - 32px)); }
.sf-ok { color: var(--ok-text); }
.sf-err { color: var(--help-text); border-color: var(--help); }
@keyframes sf-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .save-float { bottom: 72px; right: 12px; } }
.sf-ok { animation: sf-life 2500ms ease forwards; }
@keyframes sf-life { 0% { opacity: 0; transform: translateY(6px); } 7% { opacity: 1; transform: none; } 86% { opacity: 1; } 100% { opacity: 0; } }
.dropzone { position: relative; }
.dropzone-ov { position: absolute; inset: -4px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--accent-text); z-index: 5; pointer-events: none; }
body.files-over .dropfile, body.files-over .dropzone { outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: 10px; }
.dr-drop { position: relative; }
.dz-inline { display: inline-block; }

:root { --t-tap: 80ms; --t-fast: 120ms; --t-mid: 180ms; --t-slow: 220ms; --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); }
.modal-bg { animation: fade var(--t-mid) ease-out; }
.modal { animation: pop-in var(--t-mid) var(--ease-out); }
.drawer { animation: slide var(--t-slow) var(--ease-out); }
.drawer-bg { animation: fade var(--t-slow) ease-out; }
.page { animation: page-in var(--t-fast) ease-out; }
@keyframes page-in { from { opacity: 0; } }
.toast { animation: toast-in 160ms var(--ease-out); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.fold-b, .att-open, .est-an, .tr-more + tr, .br-form, .flag-edit { animation: unfold var(--t-mid) var(--ease-out); }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }
.fold-h .icon, .fold-h svg { transition: transform var(--t-mid) var(--ease-out); }
.btn, .chip, .seg-b, .ib, .lnk, .mi, .tcheck, .tab { transition: background-color var(--t-tap), color var(--t-tap), border-color var(--t-tap), box-shadow var(--t-tap), opacity var(--t-tap); }
.card, .kcard, .trow, .att-row, .doc-row, .tr-link, .rs-item { transition: box-shadow var(--t-fast), background-color var(--t-fast), border-color var(--t-fast); }
.kcard:hover, .att-row:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.is-new { animation: new-flash 1s ease-out; }
@keyframes new-flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.rows > .trow:nth-child(-n + 100), .kcol-b > .kcard:nth-child(-n + 100) { animation: row-in var(--t-fast) ease-out; }
@keyframes row-in { from { opacity: 0; } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
html[data-motion='min'] *, html[data-motion='min'] *::before, html[data-motion='min'] *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
/* «✓ Сохранено»: угасание за 2,5 с с заливкой forwards при укороченной до 1 мс анимации сразу делало отметку
   прозрачной — без движения она просто видна, пока её не уберёт интерфейс */
html[data-motion='min'] .sf-ok { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) *, html:not([data-motion='full']) *::before, html:not([data-motion='full']) *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  html:not([data-motion='full']) .sf-ok { animation: none !important; }
}

/* rc.8 — билеты: «Для кого», резерв, парковка без получателя, схема занятости */
.rq-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.rq-for { display: flex; align-items: center; gap: 6px; }
.rq-for input { flex: 1; min-width: 0; }
.rq-reserve .rq-line { background: var(--surface-2); border-radius: var(--r-s); }
.rq-pool { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: var(--r-s); }
.rq-pool input { width: 56px; }
.rq-fill { margin-top: 8px; }
.rq-fill-row input { min-width: 0; }
.tr-reserve td { background: var(--surface-2); }
.tr-pool td { background: var(--surface-2); font-style: normal; }
.tk-miss { color: var(--risk-text); }
.rq-forwhom { color: var(--text); }
/* Схема занятости */
.qmap { margin-bottom: 14px; }
.qm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 10px; color: var(--text-2); }
.qm-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.qm-row { padding: 9px 0; border-top: 1px solid var(--line); }
.qm-row:first-of-type { border-top: 0; }
.qm-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.qm-cells { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.qm-grp { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 2px; margin: 0; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--surface); cursor: pointer; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.qm-grp:hover, .qm-grp:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.qm-c { width: 16px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; line-height: 1; box-sizing: border-box; flex: none; }
.qm-free { border: 1.5px solid var(--line-2); background: var(--surface); }
.qm-ready { background: var(--accent); }
.qm-sent { background: var(--text); color: var(--on-text); }
.qm-noFan { border: 1.5px solid var(--accent); color: var(--accent-text); background: repeating-linear-gradient(135deg, var(--accent-soft) 0 3px, transparent 3px 6px); }
.qm-groups { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.qm-chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; cursor: pointer; color: var(--text); font: inherit; }
.qm-chip:hover { border-color: var(--accent); }
.qm-total { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .rq-head { grid-template-columns: 1fr; }
  .qm-c { width: 14px; height: 14px; }
}
/* «Входящие из Telegram» */
.tkin { display: flex; flex-direction: column; gap: 12px; }
.tkin-health { display: block; padding: 9px 12px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); }
.tkin-health.is-bad { border-color: var(--risk); background: var(--risk-soft); color: var(--risk-text); }
.tkin-health .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--risk); }
.tkin-problems { margin-top: 4px; }
.tkin-card { display: flex; flex-direction: column; gap: 8px; }
.tkin-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tkin-kind { max-width: 170px; }
.tkin-msgs { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--line-2); background: var(--surface-2); border-radius: 0 var(--r-s) var(--r-s) 0; }
.tkin-msg { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tkin-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.tkin-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) 80px minmax(0, 1.3fr) 90px 90px; gap: 8px; align-items: end; }
.fld-narrow input { width: 100%; }
.tkin-target { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tkin-rec input { width: 100%; min-width: 0; }
.tr-skip td { opacity: 0.45; }
.tkin-missing { color: var(--help-text); }
.tkin-acts { flex-wrap: wrap; }
.tkin-done { display: flex; flex-direction: column; gap: 4px; }
.tkin-done-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--line); }
.ocr-snip { display: inline-block; vertical-align: middle; border-radius: 4px; border: 1px solid var(--line-2); background-repeat: no-repeat; background-color: var(--surface); }
.fan-digits .fd-low { background: var(--risk-soft); color: var(--risk-text); outline: 1px solid var(--risk); border-radius: 2px; }
.rq-fill-ocr { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) { .tkin-form { grid-template-columns: 1fr 1fr; } }
/* Брифы rc.8 */
.claude-job { margin: 8px 0; }
.claude-job-box { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-s); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.claude-job-box input { flex: 1; min-width: 260px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.brief-provider { margin: 4px 0 8px; }
.brief-examples { margin-bottom: 12px; }
.brief-examples-body { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.brief-examples textarea { width: 100%; font-size: 13px; }
.fx-collapse { margin-left: 8px; }
.tr-flash td { animation: tr-flash 1.2s ease; }
@keyframes tr-flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ---------- Главная: «Ждут решения» строкой под показателями ---------- */
.home9-asks {
  margin-top: 10px;
}
.home9-asks-b {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 8px 12px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.home9-asks-b:hover {
  border-color: var(--line-2);
}
.home9-asks-b[aria-expanded='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.home9-asks-b.has .home9-asks-n {
  color: var(--accent-text);
}
.home9-asks-l {
  font-weight: 600;
  color: var(--text);
}
.home9-asks-n {
  font-variant-numeric: tabular-nums;
}
.home9-asks-s {
  flex: 1;
  min-width: 0;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Смета → сумма бюджета ---------- */
.eq9 .eq9-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface-2);
}
.eq9 .eq9-total b {
  font-family: var(--f-head);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.eq9 .eq9-lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 4px;
  font-size: 13px;
}
.eq9 .eq9-lines .num {
  text-align: right;
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
}
.eq9 .eq9-lines .eq9-sum {
  font-weight: 600;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.eq9 .eq9-fix {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
}
.eq9 .eq9-fix-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 13px;
}
.eq9 .eq9-fix-l {
  width: 118px;
  flex: none;
  color: var(--text-3);
}
.eq9 .eq9-fix-f {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}
.eq9 .eq9-fix-f input {
  width: 96px;
}
.eq9 .eq9-fix select {
  min-width: 0;
  max-width: 100%;
}
.eq9 .eq9-issues {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------- Контакты ---------- */
.pt9-list .row9-t.lnk {
  display: inline;
  text-align: left;
  font-size: inherit;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.pt9-list .row9-t.lnk:hover {
  text-decoration: underline;
}
.ct9-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  font-size: 13px;
}
.ct9-links a {
  color: var(--accent-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.ct9-links a:hover {
  text-decoration: underline;
}
.ct9-card .ct9-links {
  font-size: 14px;
  margin: 0 0 4px;
}

/* ===== rc.9: принятый дизайн — графитовая навигация, светлая рабочая область, оранжевый акцент ===== */
:root {
  --bg: #f2f3f3;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --surface-3: #eef0f1;
  --line: #e7e9eb;
  --line-2: #d6dade;
  --text: #18191c;
  --text-2: #3f444a;
  --text-3: #657078;
  --accent: #ff6a13;
  --accent-2: #ff8442;
  --accent-ink: #141419;
  --accent-text: #c24e0a;
  --accent-soft: #fff0e8;
  --blue: #336d99;
  --blue-soft: #edf4f9;
  --ok-text: #207c59;
  --ok-soft: #eaf5ef;
  --help-text: #b8393d;
  --help-soft: #fff0f0;
  --risk-text: #8b681a;
  --risk-soft: #faf3df;
  --side-bg: #141416;
  --side-text: #ffffff;
  --side-muted: #9aa0a8;
  --side-hover: #24252a;
  --r: 12px;
  --r-s: 8px;
  --f-head: 'WINLINE Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04);
  --shadow-lg: 0 18px 48px rgba(20, 22, 26, 0.16);
  --t-tab: 180ms;
  --t-open: 220ms;
  --t-close: 160ms;
}
.app[data-app-theme='dark'] {
  --bg: #121315;
  --surface: #1c1d20;
  --surface-2: #23252a;
  --surface-3: #2a2c31;
  --line: #31333a;
  --line-2: #42454d;
  --text: #f1f1f2;
  --text-2: #c9ccd2;
  --text-3: #a7adb7;
  --accent-text: #ff9a63;
  --accent-soft: #3b261e;
  --blue: #9dc9ed;
  --blue-soft: #26343f;
  --ok-text: #71cfa6;
  --ok-soft: #21352d;
  --help-text: #ff9697;
  --help-soft: #3d282b;
  --risk-text: #e4c27b;
  --risk-soft: #393325;
  --side-bg: #0b0b0d;
  --side-hover: #1d1e22;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .app[data-app-theme='system'],
  :root:not([data-theme='light']) .app:not([data-app-theme]) {
    --bg: #121315;
    --surface: #1c1d20;
    --surface-2: #23252a;
    --surface-3: #2a2c31;
    --line: #31333a;
    --line-2: #42454d;
    --text: #f1f1f2;
    --text-2: #c9ccd2;
    --text-3: #a7adb7;
    --accent-text: #ff9a63;
    --accent-soft: #3b261e;
    --blue: #9dc9ed;
    --blue-soft: #26343f;
    --ok-text: #71cfa6;
    --ok-soft: #21352d;
    --help-text: #ff9697;
    --help-soft: #3d282b;
    --risk-text: #e4c27b;
    --risk-soft: #393325;
    --side-bg: #0b0b0d;
    --side-hover: #1d1e22;
  }
}
body {
  font-size: 14px;
}

/* ---------- Левая навигация: только разделы, настройки и профиль ---------- */
.side {
  width: 206px;
  padding: 22px 12px 14px;
  gap: 0;
}
.brand9 {
  padding: 4px 12px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.brand9 .wl-logo {
  padding: 0 !important;
}
.brand9-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #fff;
}
.brand9-line {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  transform: skewX(-24deg);
}
.brand9-sub {
  font-size: 11.5px;
  color: var(--side-muted);
}
.side-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.side .side-i {
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  gap: 10px;
  opacity: 1;
  color: #d9dce1;
}
.side .side-i .ic {
  color: #8d939b;
}
.side .side-i:hover {
  background: var(--side-hover);
  color: #fff;
}
.side .side-i.on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.side .side-i.on .ic {
  color: var(--accent-ink);
}
.side .side-i.on::before {
  display: none;
}
.side .side-i.on .nb {
  background: rgba(20, 20, 25, 0.16);
  color: var(--accent-ink);
}
.side .nb {
  background: #2c2e33;
  color: #e6e8eb;
  font-weight: 600;
}
.side .nb-red {
  background: #ff5c61;
  color: #150505;
}
.side-bottom {
  border-top: 1px solid #2a2c31;
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: none;
  border: 0;
  color: #fff;
  text-align: left;
  width: 100%;
}
.side-me:hover {
  background: var(--side-hover);
}
.side-me b {
  display: block;
  font-size: 12.5px;
  line-height: 1.25;
}
.side-me small {
  display: block;
  color: var(--side-muted);
  font-size: 11px;
}
.side-me .av {
  background: #f1e3d8;
  color: #5b3a24;
}

/* ---------- Верхняя строка ---------- */
.top {
  height: 58px;
  padding: 0 26px;
  gap: 8px;
}
.crumb {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb b {
  color: var(--text);
  font-weight: 700;
}
.crumb .sep {
  color: var(--line-2);
}
.top .top-search {
  width: auto;
  max-width: 300px;
  min-width: 0;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 6px 10px;
}
.top .top-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Рабочая область и заголовок раздела ---------- */
.view > .page,
.page {
  padding: 26px 26px 48px;
  max-width: 1440px;
}
.ph {
  margin-bottom: 18px;
}
.ph-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ph-l {
  min-width: 0;
  flex: 1 1 420px;
}
.ph-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.ph-title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
.ph-sub {
  color: var(--text-3);
  margin-top: 8px;
  font-size: 13px;
}
.ph-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 18px;
}
.ph .tabs9 {
  margin-top: 18px;
}

/* ---------- Кнопки ---------- */
.btn {
  border-radius: var(--r-s);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.btn-ghost,
.btn-sec {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
}
.btn-ghost:hover:not(:disabled),
.btn-sec:hover:not(:disabled) {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Вкладки с индикатором ---------- */
.tabs9 {
  position: relative;
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs9::-webkit-scrollbar {
  display: none;
}
.tab9 {
  background: none;
  border: 0;
  padding: 8px 0 11px;
  color: var(--text-3);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border-radius: 4px 4px 0 0;
}
.tab9:hover {
  color: var(--text);
}
.tab9[aria-selected='true'] {
  color: var(--text);
  font-weight: 700;
}
.tab9 .tab9-n {
  color: var(--text-3);
  font-weight: 600;
  font-size: 12px;
}
.tab9[aria-selected='true'] .tab9-n {
  color: var(--text);
}
.tabs9-ind {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform var(--t-tab) var(--ease), width var(--t-tab) var(--ease);
  pointer-events: none;
}
.tab-panel9 {
  animation: tabin9 var(--t-tab) var(--ease);
}
@keyframes tabin9 {
  from {
    opacity: 0.4;
    transform: translateY(3px);
  }
}

/* ---------- Карточки, показатели, чипы ---------- */
.card {
  border-radius: var(--r);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.card-h h2,
.sec9-h h2 {
  font-size: 15px;
  font-weight: 700;
}
.sec9 {
  margin-top: 22px;
}
.sec9-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.sec9-h h2 {
  font-family: var(--f-head);
  font-size: 18px;
}
.sec9-h h2 .cnt {
  font-family: var(--f-ui);
  color: var(--text-3);
  font-weight: 600;
  font-size: 13px;
  margin-left: 8px;
}
.metrics9 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric9 {
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px 16px 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 106px;
}
button.metric9:hover {
  border-color: var(--line-2);
}
.metric9::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.metric9-blue::before {
  background: var(--blue);
}
.metric9-red::before {
  background: var(--help-text);
}
.metric9-green::before {
  background: var(--ok-text);
}
.metric9-l {
  font-size: 12px;
  color: var(--text-3);
}
.metric9-v {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.metric9-s {
  font-size: 12px;
  color: var(--text-3);
}
.chip9 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-2);
}
.chip9-accent,
.chip9-orange {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.chip9-blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.chip9-green {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.chip9-red {
  background: var(--help-soft);
  color: var(--help-text);
}
.chip9-yellow {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.av {
  background: #ece6f6;
  color: #5d4688;
  font-weight: 700;
}
.av[data-tone='1'] {
  background: #e2ecf7;
  color: #2f5f8a;
}
.av[data-tone='2'] {
  background: #e1f2ea;
  color: #2a6e50;
}
.av[data-tone='3'] {
  background: #f6e7dc;
  color: #7a4a2a;
}
.app[data-app-theme='dark'] .av {
  filter: saturate(0.9) brightness(0.92);
}
.alogo {
  border-radius: 6px;
}
.bar9 {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar9 > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--t-open) var(--ease);
}

/* ---------- Списки строк ---------- */
.list9 {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.list9 > * + * {
  border-top: 1px solid var(--line);
}
.row9 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 58px;
}
.row9-main {
  flex: 1;
  min-width: 0;
}
.row9-t {
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.row9-s {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row9-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Раскрытие и «Подробнее» ---------- */
.expand9 {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-tab) var(--ease);
}
.expand9.open {
  grid-template-rows: 1fr;
}
.expand9 > div {
  overflow: hidden;
  min-height: 0;
}
.more9 {
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--text-3);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.more9:hover {
  color: var(--text);
}
.more9 .ic {
  transition: transform var(--t-tab) var(--ease);
}
.more9[aria-expanded='true'] .ic {
  transform: rotate(180deg);
}

/* ---------- Боковая карточка: открытие 220 мс, закрытие 160 мс ---------- */
.drawer {
  animation: drawerin9 var(--t-open) var(--ease) both;
}
.drawer-wrap.closing .drawer {
  animation: drawerout9 var(--t-close) ease-in both;
}
.drawer-bg {
  animation: fadein9 var(--t-open) ease both;
}
.drawer-wrap.closing .drawer-bg {
  animation: fadeout9 var(--t-close) ease-in both;
}
@keyframes drawerin9 {
  from {
    transform: translateX(28px);
    opacity: 0;
  }
}
@keyframes drawerout9 {
  to {
    transform: translateX(28px);
    opacity: 0;
  }
}
@keyframes fadein9 {
  from {
    opacity: 0;
  }
}
@keyframes fadeout9 {
  to {
    opacity: 0;
  }
}

/* ---------- Подтверждение выполнения задачи ~200 мс ---------- */
.trow.done-flash,
.row9.done-flash {
  animation: doneflash9 200ms var(--ease);
}
@keyframes doneflash9 {
  from {
    background: var(--ok-soft);
  }
}
.trow .cbx-done-pop {
  animation: donepop9 200ms var(--ease);
}
@keyframes donepop9 {
  50% {
    transform: scale(1.18);
  }
}

/* ---------- Минимум движения: статусы и подтверждения остаются, движение — нет ---------- */
html[data-motion='min'] .drawer,
html[data-motion='min'] .drawer-bg,
html[data-motion='min'] .tab-panel9 {
  animation: none !important;
}
html[data-motion='min'] .tabs9-ind,
html[data-motion='min'] .expand9,
html[data-motion='min'] .bar9 > i {
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) .drawer,
  html:not([data-motion='full']) .drawer-bg,
  html:not([data-motion='full']) .tab-panel9 {
    animation: none !important;
  }
  html:not([data-motion='full']) .tabs9-ind,
  html:not([data-motion='full']) .expand9 {
    transition: none !important;
  }
}

/* ---------- Узкий экран ---------- */
@media (max-width: 900px) {
  .metrics9 {
    grid-template-columns: 1fr;
  }
  .view > .page,
  .page {
    padding: 16px 14px 90px;
  }
  .ph-title {
    font-size: 24px;
  }
  .ph-actions {
    padding-top: 4px;
  }
  .top {
    padding: 0 12px;
  }
  .crumb {
    display: none;
  }
}

/* ---------- Выбор актива, пустые состояния, меню ---------- */
.afilt9 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  max-width: 260px;
}
.afilt9 span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.afilt9:hover {
  border-color: var(--line-2);
}
.mi.on {
  background: var(--accent-soft);
  font-weight: 600;
}
.blank9 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  color: var(--text-3);
  background: var(--surface);
}
.toolbar9 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.toolbar9 .grow {
  flex: 1;
}
.inp9,
.toolbar9 input[type='search'],
.toolbar9 select {
  min-height: 36px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
}
.toolbar9 input[type='search'] {
  width: min(260px, 100%);
}

/* ===== rc.9 «Бюджет»: календарный год, метрики месяца, план по проектам, распределение; форма бюджета проекта ===== */
.bud9 .ph-actions .btn.on,
.bud9-bar .btn.on {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.bud9-n {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 7px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}
.bud9-bar {
  margin-top: 0;
}
.bud9-bar select {
  max-width: 100%;
}
.bud9-bar #budget-dir {
  min-width: 190px;
}
.bud9-bar .bud-slice {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bud9-back {
  margin: -4px 0 6px;
  padding-left: 0;
}
.bud9-cap {
  font-size: 11.5px;
  color: var(--text-3);
  margin: 2px 0 8px;
}
.bud9 .metric9-yellow::before {
  background: var(--risk-text);
}
.bud9-metrics .metric9-v {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bud9-limit {
  display: flex;
  align-items: center;
  gap: 4px 12px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-2);
}
.bud9-limit .grow {
  flex: 1;
}
.bud9-pend.on b {
  color: var(--accent-text);
}
.bud9 .bud-slice-card {
  margin-top: 12px;
}

/* «План по проектам»: своя горизонтальная прокрутка, первая колонка закреплена, выбранный месяц выделен */
.bud9 .sec9-h h2 .cnt {
  font-family: inherit;
}
.bud9-h-r {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bud9-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow-x: auto;
  max-width: 100%;
}
.bud9-plan {
  font-size: 12.5px;
  min-width: 100%;
  width: max-content;
}
.bud9-plan th,
.bud9-plan td {
  padding: 9px 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bud9-plan th.num,
.bud9-plan td.num {
  min-width: 74px;
}
.bud9-plan thead th {
  background: var(--surface-2);
  position: sticky;
  top: 0;
}
.bud9-plan .bud9-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  min-width: 220px;
  max-width: 280px;
  white-space: normal;
  box-shadow: 1px 0 0 var(--line);
}
.bud9-plan thead .bud9-sticky {
  background: var(--surface-2);
  z-index: 2;
}
.bud9-plan tr.tr-link:hover .bud9-sticky,
.bud9-plan tr.tr-link:hover td {
  background: var(--surface-2);
}
.bud9-pt {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}
.bud9-pa {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
  min-width: 0;
}
.bud9-plan .col-on {
  background: var(--accent-soft);
}
.bud9-plan thead th.col-on {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.bud9-plan tr.tr-link:hover td.col-on {
  background: var(--accent-soft);
}
.bud9-mh {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.bud9-mh:hover {
  color: var(--text);
  text-decoration: underline;
}
.bud9-plan tfoot td {
  border-top: 0;
  font-weight: 600;
  background: var(--surface);
}
.bud9-plan tfoot tr.tr-total td {
  border-top: 2px solid var(--line-2);
  font-weight: 700;
}
.bud9-plan tfoot tr.tr-sub td {
  font-weight: 500;
  color: var(--text-2);
}
.bud9-plan td.muted,
.bud9-plan tfoot tr.tr-total td.muted {
  color: var(--text-3);
  font-weight: 400;
}
.bud9-plan .tr-pending .bud9-sticky {
  white-space: nowrap;
}
.bud9-plan tfoot td.col-on {
  background: var(--accent-soft);
}
.bud9-plan .tr-pending td {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text-2);
}
.bud9-plan .tr-pending-row td {
  color: var(--text-3);
}
.bud9-plan .tr-focus td {
  background: var(--accent-soft);
}
.bud9-plan .td-edit .lnk-num {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text);
  border-bottom: 1px dashed var(--line-2);
  cursor: pointer;
}
.bud9-plan .td-edit .lnk-num:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}
.bud9-plan .amt-edit {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.bud9-plan .amt-edit input {
  width: 110px;
  text-align: right;
  padding: 4px 6px;
}
.bud9-note {
  margin-top: 8px;
}

/* Карточки разделов страницы — высота по содержимому */
.bud9-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.bud9-card .sec9-h h2 {
  font-size: 16px;
}
.bud9-card .list9 {
  box-shadow: none;
}
.bud9-shares {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bud9-share {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) 64px minmax(90px, auto);
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.bud9-share-n {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bud9-share .bar9 {
  height: 6px;
  border-radius: 3px;
}
.bud9-share b {
  text-align: right;
}
.bud9-share .muted {
  text-align: right;
}
.bud9-recent {
  margin-bottom: 8px;
}
.bud9-recent .lh-row {
  font-size: 13px;
}
.bud9-recent .lh-row:last-child {
  border-bottom: 0;
}
.bud9 .how {
  padding-top: 6px;
}
.bud9 #budget-history-sec .lh {
  padding: 0;
}
.bud9 .row9-btn {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.bud9 .row9-btn:hover {
  background: var(--surface-2);
}

/* «Бюджетные запросы» */
.bud9-reqbar {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.bud9-reqs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bud9-reqs .br-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

/* Форма бюджета проекта: «Из сметы…» */
.pbf-est {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-s);
  background: var(--surface-2);
}
.pbf-est-r {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pbf-est-menu .mi {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.pbf-est-none {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
}
.pb-est {
  display: flex;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: wrap;
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-2);
}

/* Узкий экран: таблица прокручивается внутри своей рамки, страница — без горизонтальной прокрутки */
@media (max-width: 900px) {
  .bud9 {
    overflow-x: hidden;
  }
  .bud9-bar select,
  .bud9-bar #budget-dir {
    flex: 1 1 140px;
    min-width: 0;
  }
  .bud9-bar .bud-slice {
    flex: 1 1 100%;
  }
  .bud9-bar .bud-slice select {
    flex: 1 1 120px;
    min-width: 0;
  }
  .bud9-plan .bud9-sticky {
    min-width: 150px;
    max-width: 170px;
  }
  .bud9-share {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 4px 10px;
  }
  .bud9-share .bar9 {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .bud9-share .muted {
    display: none;
  }
  .bud9-card {
    padding: 14px;
  }
  .bud9 .ph-actions {
    width: 100%;
  }
  .bud9 .ph-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .bud9-limit .btn {
    padding-left: 0;
  }
  .bud9 .sec9-h {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .bud9 .sec9-h h2 {
    font-size: 17px;
  }
  .bud9-plan .bud9-sticky {
    overflow: hidden;
  }
  .bud9-plan .tr-pending .bud9-sticky {
    white-space: normal;
  }
}

/* ===== rc.9 «Сметы»: загрузка в документах проекта, исходник рядом с проверкой строк, версии, анализ цен ===== */

/* Блок «Сметы подрядчиков» во вкладке «Документы» проекта */
.est9-block {
  margin-top: 4px;
}
.est9-block-h {
  align-items: flex-start;
  flex-wrap: wrap;
}
.est9-block-l {
  min-width: 0;
  flex: 1 1 260px;
}
.est9-block-l .muted {
  margin-top: 4px;
}
.est9-list .row9-btn,
.est9 .row9-btn {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.est9-list .row9-btn:hover {
  background: var(--surface-2);
}
.est9-list .row9-r {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.est9-ext {
  flex: none;
  width: 40px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.est9-amt {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Окно сметы: страница поверх рабочей области, своя прокрутка */
.modal-bg:has(.est9-sheet) {
  padding: 16px;
  place-items: start center;
}
.modal.est9-sheet {
  max-height: none;
}
.est9-sheet .modal-b {
  padding: 22px 24px 24px;
  overflow-x: hidden;
}
.est9-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.est9-h-l {
  min-width: 0;
}
.est9-h-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.est9-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.est9-title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
}
.est9-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 10px;
}
.est9-ctr {
  font-size: 13.5px;
}
.est9-bar .grow {
  flex: 1;
}
.est9 .est-vat {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.est9-lbl {
  font-size: 12.5px;
  color: var(--text-3);
}
.est9 #est-vat-mode {
  min-height: 34px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 5px 8px;
  font-size: 13px;
}
.est9 .est-rate {
  font-size: 12.5px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.est9 .est-rate input {
  width: 56px;
  padding: 5px 6px;
  text-align: right;
  border-radius: 6px;
}
.est9-file {
  color: var(--ok-text);
  font-weight: 600;
}
.est9-note {
  margin: 0 0 10px;
}
.est9-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: var(--r-s);
  background: var(--ok-soft);
  color: var(--ok-text);
}
.est9-sec-h {
  display: flex;
  align-items: baseline;
  gap: 6px 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.est9-sec-h h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.est9-sec-h h3 .cnt {
  color: var(--text-3);
  font-weight: 600;
  font-size: 12.5px;
  margin-left: 4px;
}
.est9-sec-h > .btn:last-child,
.est9-sec-h > a:last-child {
  margin-left: auto;
}

/* Исходник + проверка строк: связанный сценарий — две колонки */
.est9-main {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.45fr);
  gap: 14px;
  align-items: start;
}
.est9-src,
.est9-rows,
.est9-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  min-width: 0;
}
.est9-src {
  position: sticky;
  top: 0;
}
.est9-src-meta {
  min-width: 0;
}
.est9-src-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface-2);
}
.est9-grid {
  border-collapse: collapse;
  font-size: 11.5px;
  width: max-content;
  min-width: 100%;
}
.est9-grid th,
.est9-grid td {
  border: 1px solid var(--line);
  padding: 3px 6px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  color: var(--text-2);
  background: var(--surface);
}
.est9-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-3);
  color: var(--text-3);
  font-weight: 600;
  text-align: center;
}
.est9-grid td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.est9-grid td.span {
  max-width: none;
}
.est9-rn {
  color: var(--text-3) !important;
  background: var(--surface-3) !important;
  text-align: right !important;
  min-width: 30px;
  font-variant-numeric: tabular-nums;
  position: sticky;
  left: 0;
}
.est9-grid tr.src-item td {
  background: var(--blue-soft);
  color: var(--text);
  cursor: pointer;
}
.est9-grid tr.src-mark td {
  background: var(--surface-2);
  font-weight: 600;
}
.est9-grid tr.on td,
.est9-text .est9-tl.on {
  background: var(--accent-soft) !important;
  color: var(--text);
}
.est9-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
}
.est9-tl {
  display: flex;
  gap: 8px;
  white-space: pre;
}
.est9-tl .est9-rn {
  flex: none;
  padding: 0 6px;
}
.est9-tl.src-item {
  background: var(--blue-soft);
  cursor: pointer;
}
.est9-tl.src-mark {
  font-weight: 600;
}
.est9-src-note {
  padding: 6px 8px;
}
.est9-src-empty {
  padding: 10px 0;
}
.est9-scan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.est9-scan-img img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
}

/* Таблица строк */
.est9 .est-table-wrap {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
}
.est9 .est-table {
  min-width: 760px;
}
.est9 .est-table th {
  background: var(--surface-2);
}
.est9 .est-table td {
  padding: 4px 6px;
}
.est9 .est-in.wide {
  min-width: 230px;
}
.est9 .est-table .est-in.num {
  min-width: 82px;
}
.est9 .est-table .est-in:not(.num):not(.wide) {
  min-width: 64px;
}
.est9 .est-r.on td {
  background: var(--accent-soft);
}
.est9 .est-r-err td:nth-child(6) .est-in,
.est9 .est-r-err td:nth-child(6) .est-ro {
  background: var(--help-soft);
  color: var(--help-text);
}
.est-ro {
  display: block;
  padding: 4px 6px;
  min-height: 26px;
}
.est-ro.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.est-ro.changed {
  background: var(--accent-soft);
  border-radius: 6px;
}
.est9 .est-foot .est-ro {
  display: inline-block;
}
.est9-chk {
  min-width: 180px;
}
.est9-chk .btn-link {
  padding: 0;
  display: block;
}
.est9-nw {
  white-space: nowrap;
}
.est9-empty {
  background: var(--surface-2);
  color: var(--text-2);
}
.est9-fixed {
  display: block;
  color: var(--text-3);
}
.est9-issues {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--help-soft);
  color: var(--help-text);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.est9-issue {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  flex-wrap: wrap;
}
.est9-issue .btn-link {
  color: var(--help-text);
  font-weight: 700;
  padding: 0;
}
.est9-ok {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--r-s);
  background: var(--ok-soft);
  color: var(--ok-text);
}

/* Действия */
.est9-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}
.est9-actions .grow {
  flex: 1;
}
.est9-hint {
  margin-bottom: 8px;
}
.est9 #est-confirm {
  margin: 8px 0;
}

/* Версии и анализ цен — рядом (связанный сценарий), вопросы подрядчику — отдельно */
.est9-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.est9-vers {
  display: flex;
  flex-direction: column;
}
.est9-ver {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 6px;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 0;
}
.est9-ver:first-child {
  border-top: 0;
}
.est9-ver:hover {
  background: var(--surface-2);
}
.est9-ver.on {
  background: var(--surface-2);
  cursor: default;
}
.est9-ver-m {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.est9-ver-m b {
  font-size: 13px;
}
.est9-diff {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.est9-few {
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--risk-soft);
  color: var(--risk-text);
  font-size: 12.5px;
  margin-bottom: 8px;
}
.est9-sum {
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  margin-bottom: 8px;
}
.est9 .est-an {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.est9 .est-an .tbl-wrap {
  margin-bottom: 8px;
}
.est9-qpanel {
  margin-top: 14px;
}
.est9-unclear {
  padding: 8px 12px;
  border-radius: var(--r-s);
  background: var(--risk-soft);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.est9 .est-qs textarea {
  border-radius: var(--r-s);
}

/* Загрузка сметы */
.est9-up .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.est9-up .fl select {
  width: 100%;
}

@media (max-width: 1180px) {
  .est9-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .est9-src {
    position: static;
  }
  .est9-src-wrap {
    max-height: 300px;
  }
}
@media (max-width: 900px) {
  .modal-bg:has(.est9-sheet) {
    padding: 0;
  }
  .modal.est9-sheet {
    border-radius: 0;
    min-height: 100vh;
  }
  .est9-sheet .modal-b {
    padding: 14px 14px 24px;
  }
  .est9-title {
    font-size: 22px;
  }
  .est9-h .est9-h-r .btn {
    padding: 6px 10px;
  }
  .est9-panels {
    grid-template-columns: minmax(0, 1fr);
  }
  .est9-bar {
    padding: 10px;
  }
  .est9 .est-vat {
    width: 100%;
  }
  .est9 #est-vat-mode {
    flex: 1 1 160px;
    min-width: 0;
  }
  .est9-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .est9-actions #est-checked {
    flex-basis: 100%;
  }
  .est9-up .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .est9-list .row9 {
    flex-wrap: wrap;
  }
  .est9-list .row9-r {
    width: 100%;
    justify-content: flex-start;
    padding-left: 52px;
  }
  .est9-block-h .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ===== rc.9 — «Производство»: брифы и презентации, встречи и планёрка, отчёты, тренды, нейминг, кейсы, документы ===== */
/* Только токены основы (zz-rc9-base.css): светлая и тёмная тема без жёстких цветов. */

/* ---------- Общее для экранов области ---------- */
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9, .page-mtg9) .row9-btn {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 0;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9-btn:hover {
  background: var(--surface-2);
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9-btn.on {
  background: var(--accent-soft);
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9-btn:focus-visible {
  outline-offset: -2px;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9 .row9-t {
  white-space: nowrap;
  display: block;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9 .row9-s {
  display: block;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9-done .row9-t {
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
/* Тип файла: короткая метка вместо иконки (DOCX, PDF, XLSX…) */
:is(.page-br9, .page-docs9, .page-rep9) .doc-ext9 {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 30px;
  padding: 0 5px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .sec9:first-of-type {
  margin-top: 0;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9, .page-mtg9) .ph-actions .btn {
  min-height: 38px;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9, .page-mtg9) .ph-actions .btn-primary {
  padding: 0 18px;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .toolbar9 input[type='search'] {
  flex: 0 1 260px;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) :is(.toolbar9, .sec9-h) .seg {
  max-width: 100%;
}
:is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .blank9 {
  margin: 4px 0;
}

/* ---------- Брифы: выбор брифа ---------- */
.br9-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  margin: 0 -2px 14px;
  scrollbar-width: thin;
}
.br9-pick {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 190px;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}
.br9-pick:hover {
  border-color: var(--line-2);
}
.br9-pick.on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.br9-pick-b {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.br9-pick-t,
.br9-pick-s {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.br9-pick-t {
  font-size: 13px;
  font-weight: 600;
}
.br9-pick-s {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---------- Брифы: документ и боковая панель ---------- */
.br9-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}
.br9-doc.card,
.br9-new.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 26px 22px;
  min-width: 0;
}
.br9-doc.card::before,
.br9-new.card::before {
  content: '';
  position: absolute;
  left: 24px;
  top: -1px;
  width: 72px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}
.br9-new.card {
  max-width: 780px;
}
.br9-doc-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.br9-doc-hl {
  min-width: 0;
}
.br9-path {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.br9-path .lnk {
  color: inherit;
  text-decoration: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.br9-path .lnk:hover {
  color: var(--text);
}
.br9-doc-kind,
.br9-new-t {
  margin: 6px 0 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.br9-logo {
  flex: none;
  padding: 2px 0 0 !important;
}
.br9-title {
  width: 100%;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 2px 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  resize: none;
  overflow: hidden;
}
.br9-title:hover {
  border-bottom-color: var(--line);
}
.br9-title:focus {
  box-shadow: none;
  border-bottom-color: var(--accent);
}
.br9-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.br9-prov .chip9 {
  white-space: normal;
}
.br9-prov-note {
  margin-top: -6px;
}
.br9-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.br9-l {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.br9-l .chip9 {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.br9-l-n {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--help-soft);
  color: var(--help-text);
  font-size: 11px;
  letter-spacing: 0;
}
.br9-ta {
  background: var(--surface-2);
  border-color: var(--line);
  font-size: 14px;
  line-height: 1.55;
}
.br9-fields.brief-secs {
  gap: 0;
  border-top: 1px solid var(--line);
}
.br9-doc .bsec {
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.br9-doc .bsec-h {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.br9-doc .bsec-l {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.br9-doc .bsec-src {
  font-size: 11.5px;
  color: var(--text-3);
}
.br9-doc .bsec-src::before {
  content: '· ';
}
.br9-doc .bsec-manual .bsec-src {
  color: var(--blue);
}
.br9-doc .bsec-acts {
  margin-left: auto;
  display: inline-flex;
  gap: 2px;
  flex-wrap: wrap;
}
.br9-doc .bsec-acts .btn-link {
  font-size: 12px;
  padding: 2px 6px;
  color: var(--text-3);
  text-decoration: none;
}
.br9-doc .bsec:hover .bsec-acts .btn-link,
.br9-doc .bsec:focus-within .bsec-acts .btn-link {
  color: var(--text-2);
}
.br9-doc .bsec-acts .btn-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.br9-doc .bsec textarea {
  border: 1px solid transparent;
  background: transparent;
  margin: 0 -8px;
  padding: 5px 8px;
  width: calc(100% + 16px);
  min-height: 34px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  resize: none;
  overflow: auto;
}
.br9-doc .bsec textarea:hover {
  border-color: var(--line);
}
.br9-doc .bsec textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.br9-doc .bsec-empty textarea {
  background: transparent;
  border-style: solid;
}
.br9-doc .bsec-empty textarea::placeholder {
  color: var(--text-3);
  font-style: italic;
}
.br9-doc .bsec-ai textarea {
  background: var(--accent-soft);
  border-color: transparent;
}
.br9-doc .bsec-conflict {
  border-left: 0;
  padding-left: 0;
}
.br9-doc .bconflict {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 12px;
}
.br9-doc .bconf {
  font-size: 13px;
}
.br9-q .q-fld textarea {
  background: var(--surface-2);
}
.br9-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.br9-ver {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.br9-ver input {
  flex: 1 1 220px;
}
.br9-foot .brief-saved {
  border-radius: var(--r-s);
}
.br9-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.br9-card.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}
.br9-card-h {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.br9-card-hr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.br9-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.br9-seg button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.br9-seg button:hover {
  border-color: var(--text-3);
}
.br9-seg button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.br9-method-b {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  animation: tabin9 var(--t-tab) var(--ease);
}
.br9-method-b .claude-job,
.br9-ygpt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.br9-method-b .claude-job-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.br9-cmd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
}
.br9-cmd input {
  flex: 1 1 200px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}
.br9-rules {
  border-top: 1px dashed var(--line-2);
  padding-top: 6px;
}
.br9-chk {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.br9-card-hr + .br9-chk {
  border-top: 0;
  padding-top: 2px;
}
.br9-chk-i {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-3);
}
.br9-chk.ok .br9-chk-i {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.br9-chk.warn .br9-chk-i {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.br9-chk-b {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.br9-chk-t {
  font-size: 13px;
  font-weight: 600;
}
.br9-chk-s,
.br9-chk .fc-list {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.br9-chk .fc-list .fc-i {
  color: var(--text-2);
}
.br9-pend {
  color: var(--risk-text);
}
.br9-src.bsrc {
  border: 0;
  padding: 0;
  margin: 0;
  gap: 0;
}
.br9-src .bsrc-i {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.br9-src .bsrc-i:first-child {
  border-top: 0;
  padding-top: 0;
}
.br9-src .bsrc-i.is-empty {
  opacity: 0.62;
}
.br9-src-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}
.br9-src-row input {
  flex: none;
}
.br9-src-b {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.br9-src-t {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.br9-src-s {
  font-size: 11.5px;
  color: var(--text-3);
}
.br9-src .bsrc-doc {
  padding: 4px 0 0 76px;
  color: var(--text-3);
}
.br9-src .vol {
  margin-top: 10px;
}
.br9-log {
  max-height: 220px;
  overflow: auto;
}
.br9-ex {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.br9-ex .tpl-box {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 16px;
}
.br9-new .tpl-box {
  background: var(--surface-2);
}
.br9-ex-note {
  margin-bottom: 10px;
}
.br9-ex-add {
  margin-top: 10px;
}
.br9-ex-draft {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.page-br9 .ph #brief-tabs {
  margin-top: 10px;
}
.br9-arch-open {
  margin-top: 16px;
}
.br9-arch .row9-r .chip9 {
  white-space: nowrap;
}

/* ---------- Презентации ---------- */
.dk9 {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}
.dk9-list.list9 {
  padding: 0;
}
.dk9-list-h {
  padding: 12px 16px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dk9-list .pipe-item.row9 {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 54px;
  border-top: 0;
}
.dk9-list .pipe-item.on {
  background: var(--accent-soft);
}
.dk9-work.card {
  padding: 20px 22px;
}
.dk9-title.pipe-title-in {
  resize: none;
  overflow: hidden;
  line-height: 1.3;
  width: 100%;
  flex: 1 1 100%;
}
.dk9-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Встречи: список ---------- */
.mt9-asr {
  margin: 0 0 14px;
}
.mt9-ic {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-s);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.mt9-keep {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------- Встречи: карточка встречи ---------- */
.mt9 {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mt9-back {
  margin: -6px 0 8px;
}
.mt9-stale,
.mt9-err {
  margin: 0 0 12px;
}
.mt9-head.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
}
.mt9-head-r {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.mt9-head-l {
  min-width: 0;
  flex: 1 1 320px;
}
.mt9-title {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mt9-meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}
.mt9-meta .lnk {
  color: var(--text-2);
}
.mt9-people {
  margin-top: 4px;
}
.mt9-head-st {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.mt9-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.mt9-skip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.mt9-time {
  flex: none;
  min-width: 96px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.mt9-range-in {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 160px;
  min-width: 80px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) 0 var(--p, 0%), var(--line-2) var(--p, 0%) 100%) center / 100% 4px no-repeat;
  cursor: pointer;
}
.mt9-range-in::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}
.mt9-range-in::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}
.mt9-range-in:focus {
  box-shadow: none;
}
.mt9-range-in:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mt9-rates {
  display: inline-flex;
  gap: 2px;
  flex: none;
}
.mt9-rate {
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
  color: var(--text-3);
}
.mt9-rate:hover {
  color: var(--text);
}
.mt9-rate.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.mt9-noaudio {
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: var(--surface-2);
}
.mt9-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mt9-acts .btn {
  min-height: 36px;
}
.mt9-prov {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mt9-spk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mt9-spk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.mt9-spk:hover {
  border-color: var(--line-2);
}
.mt9-spk > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt9-av {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  flex: none;
}
.mt9-av-g {
  background: var(--blue-soft);
  color: var(--blue);
}
.mt9-av-n {
  background: var(--surface-3);
  color: var(--text-3);
}
.mt9-retention {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.mt9-spk-panel.card {
  margin-top: 12px;
  padding: 16px 18px;
  animation: tabin9 var(--t-open) var(--ease);
}
.mt9-card-h {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}
.mt9-card-h h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.mt9-card-h h2 .cnt {
  color: var(--text-3);
  font-weight: 600;
  font-size: 12.5px;
  margin-left: 4px;
}
.mt9-spk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.mt9-spk-grid .spk {
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 10px 12px;
}
.mt9-spk-grid .spk:last-of-type {
  border-bottom: 1px solid var(--line);
}
.mt9-spk-grid .spk > .row-g {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.mt9-spk-grid .spk > .row-g select {
  flex: none;
  width: 100%;
}
.mt9-tabs.tabs9 {
  margin: 20px 0 14px;
}
.mt9-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}
.mt9-tr.card {
  padding: 16px 0 4px;
  min-width: 0;
}
.mt9-tr .mt9-card-h {
  padding: 0 18px;
}
.mt9-tr > .muted {
  padding: 0 18px 12px;
}
.mt9 .tr-list {
  max-height: calc(100vh - 230px);
  min-height: 160px;
  overflow: auto;
  position: relative;
}
.mt9 .tr-seg {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  align-items: start;
  transition: background-color var(--t-tab) var(--ease);
}
.mt9 .tr-seg.on {
  background: var(--accent-soft);
}
.mt9 .tr-seg.focus {
  box-shadow: inset 3px 0 0 var(--accent);
}
.mt9 .tr-ts {
  padding-top: 2px;
  font-size: 12.5px;
  color: var(--accent-text);
}
.mt9 .tr-ts:disabled {
  color: var(--text-3);
  opacity: 1;
}
.tr-b {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.mt9 .tr-sp {
  field-sizing: content;
  align-self: flex-start;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.mt9 .tr-sp:hover {
  color: var(--accent-text);
}
.mt9 .tr-t {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  overflow-wrap: anywhere;
  cursor: text;
  border-radius: 4px;
}
.mt9 span.tr-t:hover {
  background: var(--surface-2);
}
.mt9 textarea.tr-t {
  min-height: 64px;
  color: var(--text);
}
.mt9-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.mt9-acts-card.card,
.mt9-checks.card {
  padding: 16px 18px;
}
.mt9-group + .mt9-group {
  margin-top: 6px;
  border-top: 1px solid var(--line);
}
.mt9-group-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mt9-group-h .cnt {
  letter-spacing: 0;
}
.mt9-group-h .btn-link {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
}
.mt9-item.rs-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 0;
  border-top: 1px solid var(--line);
}
.mt9-group-h + .mt9-item {
  border-top: 0;
  padding-top: 6px;
}
.mt9-item-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mt9-item-t {
  font-size: 13.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.mt9-owner {
  color: var(--text-2);
}
.mt9-basis {
  color: var(--text-3);
}
.mt9-basis .lnk {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.mt9-item .btn {
  margin-top: 4px;
}
.mt9-checks .chk-row {
  padding: 4px 0;
}
.mt9-sum.card {
  padding: 20px 22px;
}
.mt9-sum .mt9-card-h {
  align-items: baseline;
}
.mt9-sum .card-h .small {
  white-space: normal;
}
.mt9-sum-text {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.mt9-topic.rs-topic {
  padding: 16px 0 14px;
  border-top: 1px solid var(--line);
}
.mt9-topic-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.mt9-topic-h h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.mt9-range {
  flex: none;
  color: var(--text-3);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.mt9-range:hover {
  color: var(--accent-text);
}
.mt9-topic p {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.mt9-topic p b {
  color: var(--text);
}
.bulk-row9 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.bulk-row9 .rs-check {
  padding-left: 26px;
}

/* ---------- Планёрка ---------- */
.page-mtg9 .ph-sub .sub {
  font-size: inherit;
  color: inherit;
  margin: 0;
}
.page-mtg9 .meet-main .tabs9 {
  margin-bottom: 2px;
}
.page-mtg9 .meet-sec > .card,
.page-mtg9 .meet-sec.card,
.page-mtg9 .meet-side.card,
.page-mtg9 .mtg9-past {
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.page-mtg9 .mtg9-past {
  margin-bottom: 14px;
}
.page-mtg9 .mtg9-stats .stat {
  background: var(--surface);
  border: 1px solid var(--line);
}
.page-mtg9 .meet-side .card-h .chip9 .live {
  background: none;
  color: inherit;
  padding: 0;
}

/* ---------- Отчёты ---------- */
.rep9-switch.toolbar9 {
  margin: 0 0 12px;
}
.rep9-note {
  margin: 0 0 12px;
}
.rep9-flt.toolbar9 {
  margin-top: 0;
}
.rep9-sec .sec9-h {
  flex-wrap: wrap;
}
.rep9-row .lnk-row {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.rep9-row .lnk-row:hover .row9-t {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.rep9-foot {
  margin-top: 10px;
}
.rep9-empty {
  padding: 12px 16px;
}
.rep9 .rep-set.card,
.rep9 .rep-text.card {
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.rep9-saved .docs-side {
  position: sticky;
  top: 0;
}

/* ---------- Нейминг и тренды ---------- */
.mon9-health.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  margin-bottom: 4px;
}
.mon9-health-r {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.mon9-posts .np-card {
  border-top: 0;
}
.mon9-posts .np-h.row9 {
  padding: 12px 16px;
}
.mon9-posts .np-b {
  padding: 4px 16px 14px;
}
.mon9-card.tr-card {
  margin: 0;
  padding: 14px 16px;
  gap: 6px;
}
.mon9-card-h {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.mon9-card-t {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.mon9-nums {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.mon9-links .lnk {
  overflow-wrap: anywhere;
}
.mon9-acts {
  margin-top: 4px;
  align-items: center;
}
.mon9-note {
  margin-top: 12px;
}

/* ---------- Кейсы и идеи ---------- */
.cs9-grid.cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  align-items: start;
}
.cs9-card.card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 18px;
  border-top: 3px solid var(--accent);
}
.cs9-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cs9-t {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cs9-card .small {
  line-height: 1.5;
  color: var(--text-2);
}
.cs9-card .small b {
  color: var(--text);
}
.cs9-acts {
  margin-top: 4px;
}
.cs9-add.toolbar9 {
  margin-top: 0;
}
.cs9-add .grow {
  flex: 1 1 240px;
}

/* ---------- Документы ---------- */
.docs9-bar.toolbar9 {
  margin-top: 0;
}
.docs9 .docs9-list {
  max-height: calc(100vh - 300px);
  min-height: 120px;
  overflow: auto;
}
.docs9 .docs-side {
  position: sticky;
  top: 0;
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.docs9-list .row9-r .av,
.docs9-list .row9-r .av-img {
  flex: none;
}

/* ---------- Анимации: «Минимум» и системное уменьшение движения ---------- */
html[data-motion='min'] .br9-method-b,
html[data-motion='min'] .mt9-spk-panel,
html[data-motion='min'] .mt9 .tr-seg {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) .br9-method-b,
  html:not([data-motion='full']) .mt9-spk-panel,
  html:not([data-motion='full']) .mt9 .tr-seg {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Ноутбук ---------- */
@media (max-width: 1180px) {
  .br9-grid,
  .mt9-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* ---------- Узкий экран: колонки складываются, своя прокрутка у длинных списков отключается ---------- */
@media (max-width: 900px) {
  .br9-grid,
  .mt9-grid,
  .dk9 {
    grid-template-columns: minmax(0, 1fr);
  }
  .br9-doc.card,
  .br9-new.card {
    padding: 20px 16px 18px;
  }
  .br9-doc.card::before,
  .br9-new.card::before {
    left: 16px;
  }
  .br9-doc .bsec-acts {
    margin-left: 0;
  }
  .br9-pick {
    min-width: 170px;
  }
  .mt9-head.card,
  .mt9-sum.card {
    padding: 16px;
  }
  .mt9-player {
    flex-wrap: wrap;
  }
  .mt9-range-in {
    order: 5;
    flex: 1 1 100%;
  }
  .mt9 .tr-list,
  .docs9 .docs9-list {
    max-height: none;
  }
  .mt9 .tr-seg {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 10px 14px;
    gap: 8px;
  }
  .mt9-tr .mt9-card-h,
  .mt9-tr > .muted {
    padding-left: 14px;
    padding-right: 14px;
  }
  .mt9-topic-h {
    flex-direction: column;
    gap: 2px;
  }
  .mt9-keep {
    display: none;
  }
  .cs9-grid.cases {
    grid-template-columns: minmax(0, 1fr);
  }
  :is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9 {
    flex-wrap: wrap;
  }
  :is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9 .row9-main {
    flex: 1 1 200px;
  }
  :is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9 .row9-r {
    flex-wrap: wrap;
  }
  :is(.page-br9, .page-mt9, .page-dk9, .page-docs9, .page-mon9, .page-cs9, .page-rep9) .row9 .row9-t {
    white-space: normal;
  }
  .rep9-saved .docs-side,
  .docs9 .docs-side {
    position: static;
  }
  :is(.dk9-work, .br9-doc, .br9-side, .mt9, .page-rep9, .page-mon9, .page-cs9, .page-docs9) .btn {
    white-space: normal;
    text-align: left;
    max-width: 100%;
  }
  .dk9-work.card {
    padding: 16px 14px;
  }
}

/* ===== rc.9: настройки — внутренняя навигация, разделы по содержимому, администрирование вкладками ===== */

/* ---------- Каркас: навигация слева, раздел справа; на узком — строка вкладок ---------- */
.set9-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.set9-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.set9-ni {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-s);
  background: none;
  color: var(--text-3);
  font-size: 13px;
  text-align: left;
  transition: background var(--t-tab) var(--ease), color var(--t-tab) var(--ease);
}
.set9-ni > span:first-child {
  flex: 1;
  min-width: 0;
}
.set9-ni:hover {
  color: var(--text);
  background: var(--surface-3);
}
.set9-ni.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.set9-ni-ic {
  color: var(--text-3);
  flex: none;
}
.set9-ni-n {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.set9-tabs {
  display: none;
}
.set9-body {
  min-width: 0;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.set9-denied {
  margin: 0;
}

/* ---------- Карточка раздела ---------- */
.set9-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.set9-ch {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.set9-ch > div:first-child {
  min-width: 0;
}
.set9-ch h2 {
  margin: 0;
  font-family: var(--f-head);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
}
.set9-ch h2 .cnt {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-left: 6px;
}
.set9-cs a {
  color: var(--accent-text);
}
.set9-cs {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-3);
  max-width: 760px;
}
.set9-sub-h {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.set9-sub-h .muted {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.set9-foot {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.set9-more {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-2);
  padding: 4px 0 2px;
  max-width: 760px;
}
.set9-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-3);
  padding: 10px 0 2px;
}
.set9-list .row9 {
  min-height: 52px;
  padding: 10px 14px;
}
.set9-card .list9 {
  box-shadow: none;
}
.set9-trash-ic,
.set9-tpl-ic {
  color: var(--text-3);
  flex: none;
}

/* ---------- Строки «подпись — управление» ---------- */
.set9-rows {
  display: flex;
  flex-direction: column;
}
.set9-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  min-height: 52px;
}
.set9-rows > .set9-row:first-child {
  border-top: 0;
}
.set9-rl {
  min-width: 0;
  flex: 1 1 260px;
}
.set9-rt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.set9-rh {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3);
  margin-top: 2px;
}
.set9-rl .more9-wrap {
  margin-top: 2px;
}
.set9-rl .egg-note {
  margin-top: 4px;
  max-width: 620px;
}
.set9-rc {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.set9-inl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.set9-inl .in-s {
  width: 70px;
  text-align: center;
}
.set9-names {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.set9-names input {
  width: 100%;
}
.set9-names + .set9-rows > .set9-row:first-child {
  border-top: 0;
}
.set9-pw {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  padding: 2px 0 10px;
}
.set9-pw + .ok-box,
.set9-pw + .field-err {
  margin-bottom: 8px;
}
.set9 .egg-sound input[type='range'] {
  width: 140px;
  accent-color: var(--accent);
}

/* ---------- Тумблер: настоящий флажок поверх дорожки ---------- */
.sw9 {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 36px;
  height: 20px;
}
.sw9 input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.sw9 input:disabled {
  cursor: default;
}
.sw9-t {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: var(--line-2);
  transition: background var(--t-tab) var(--ease);
}
.sw9-t::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 20, 25, 0.25);
  transition: transform var(--t-tab) var(--ease);
}
.sw9 input:checked + .sw9-t {
  background: var(--accent);
}
.sw9 input:checked + .sw9-t::after {
  transform: translateX(16px);
}
.sw9 input:focus-visible + .sw9-t {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sw9.off {
  opacity: 0.55;
}
html[data-motion='min'] .sw9-t,
html[data-motion='min'] .sw9-t::after,
html[data-motion='min'] .set9-ni {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) .sw9-t,
  html:not([data-motion='full']) .sw9-t::after,
  html:not([data-motion='full']) .set9-ni {
    transition: none;
  }
}

/* ---------- Переключатели в две независимые колонки ---------- */
.set9-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}
.set9-sw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  cursor: pointer;
  min-height: 42px;
}
.set9-sw > span:first-child {
  min-width: 0;
}
.set9-sw small {
  display: block;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Активы: одна строка — логотип, название, владелец, меню ---------- */
.set9-asset {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px) 34px;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
}
.set9-asset.archived .row9-t .strong,
.set9-asset.archived .alogo {
  opacity: 0.6;
}
.set9-adz.dropzone {
  display: inline-flex;
  border-radius: 8px;
}
.set9-alogo {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: none;
}
.set9-alogo .alogo {
  box-shadow: inset 0 0 0 1px var(--line);
}
.set9-alogo.busy {
  opacity: 0.5;
}
.set9-aname {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.set9-aname .strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set9-aowner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.set9-aowner.none .sel-t {
  display: none;
}
.set9-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.set9-amenu {
  display: inline-flex;
  justify-content: flex-end;
}
.set9-add {
  display: flex;
  gap: 8px;
  align-items: center;
}
.set9-add input {
  flex: 0 1 280px;
}
.set9-budgets {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.set9-budgets .set9-rh {
  flex-basis: 100%;
}

/* Редактор статусов внутри раздела */
.set9 .st-ed {
  gap: 4px;
}
.set9 .st-row {
  grid-template-columns: 28px minmax(0, 1fr) 140px 70px 30px 30px 30px;
}
.set9 .st-ro .st-row {
  grid-template-columns: 14px minmax(0, 1fr) auto;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.set9 .st-ro .st-row:last-child {
  border-bottom: 0;
}
.set9 .st-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

/* ---------- Администрирование ---------- */
.set9-admin {
  gap: 4px;
}
.set9-admin > .tabs9 {
  margin-top: 6px;
}
.adm9-panel {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.adm9 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.adm9-sep {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.adm9-h {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.adm9-h h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.adm9-h .badge {
  align-self: center;
}
.adm9-h .grow {
  flex: 1;
}
.adm9-hs {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.adm9-h2 h3 {
  font-size: 13.5px;
}
.adm9-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.adm9-inline {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
}
.adm9-inline .grow {
  flex: 1;
}
.adm9-inline input:not([type='checkbox']) {
  flex: 0 1 300px;
}
.adm9-note,
.adm9-more {
  line-height: 1.45;
}
.adm9-wrap {
  overflow-wrap: anywhere;
}
.adm9-list .row9 {
  min-height: 52px;
  padding: 9px 14px;
}
.adm9-list .row9.off .row9-t {
  color: var(--text-3);
}
.adm9-list .chip9 {
  margin-left: 4px;
}
.adm9-eggs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.adm9-egg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.adm9-egg select {
  padding: 5px 8px;
}
.adm9-pause.assume,
.adm9-pause.warn-box {
  margin: 0;
  align-items: stretch;
  box-shadow: none;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adm9-pause.warn-box {
  border-color: transparent;
}
.adm9-integs .integ {
  margin: 0 0 6px;
}
.adm9-integs .integ-h {
  flex-wrap: wrap;
  min-height: 44px;
}
.adm9 .kv {
  padding: 6px 0;
}
.adm9 .kv > span:first-child {
  width: 200px;
}
.adm9 .kv > span:last-child {
  min-width: 0;
  flex: 1 1 260px;
  overflow-wrap: anywhere;
}
.adm9 .tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-s);
}
.adm9 .tbl td,
.adm9 .tbl th {
  vertical-align: top;
}
.adm9-scroll {
  max-height: 360px;
  overflow: auto;
}
.adm9 .audit {
  background: var(--surface-2);
  border-radius: var(--r-s);
  padding: 8px 10px;
  line-height: 1.55;
}
.adm9 .tkchat-admin {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adm9 .tkchat-admin .menu-lbl {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.adm9 .tg-chat .kv > span:first-child {
  width: 90px;
}
.adm9 .mcp-steps {
  margin: 6px 0 0;
  padding-left: 20px;
  line-height: 1.5;
}

/* ---------- Дни рождения: строки ---------- */
.pt9-list .row9 {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto 170px auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
}
.pt9-when {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pt9-d {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.pt9-in {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}
.pt9-in.hot {
  color: var(--accent-text);
  font-weight: 700;
}
.pt9-row.soon {
  box-shadow: inset 3px 0 0 var(--accent);
}
.pt9-list .row9-s {
  white-space: normal;
}
.pt9-asset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}
.pt9-note {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
  white-space: pre-wrap;
}
.pt9-remind {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pt9-lbl {
  font-size: 11.5px;
  color: var(--text-3);
  margin-right: 2px;
}
.pt9-remind .chip {
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--line);
}
.pt9-remind .chip.on {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: transparent;
  font-weight: 600;
}
.pt9-resp .sel {
  max-width: 170px;
}
.pt9-act {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Уведомления: строки ---------- */
.nt9-list .nt9-row {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  min-height: 52px;
  padding: 10px 16px;
}
.nt9-list .nt9-row:hover {
  background: var(--surface-2);
}
.nt9-row .ntype {
  min-width: 96px;
  text-align: center;
}
.nt9-row.read .row9-t {
  color: var(--text-3);
}
.nt9-row:not(.read) .row9-t {
  font-weight: 600;
}
.nt9-row .row9-t {
  white-space: normal;
}
.nt9-prefs {
  margin-top: 18px;
}
.about9 .set9-foot {
  margin-top: 10px;
}
.about9 .row9 {
  min-height: 46px;
  padding: 9px 16px;
}

/* ---------- Узкий экран: вкладки вместо колонки, всё в одну колонку ---------- */
@media (max-width: 900px) {
  .set9-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .set9-nav {
    display: none;
  }
  .set9-tabs {
    display: flex;
    gap: 18px;
  }
  .set9-card {
    padding: 14px;
  }
  .set9-ch h2 {
    font-size: 17px;
  }
  .set9-names {
    grid-template-columns: minmax(0, 1fr);
  }
  .set9-names .btn {
    justify-self: start;
  }
  .set9-row {
    flex-wrap: wrap;
  }
  .set9-rl {
    flex-basis: 100%;
  }
  .set9-rc {
    justify-content: flex-start;
  }
  /* Строка с одним переключателем остаётся в одну линию: подпись слева, тумблер справа */
  .set9-row:has(> .set9-rc > .sw9:only-child) {
    flex-wrap: nowrap;
  }
  .set9-row:has(> .set9-rc > .sw9:only-child) > .set9-rl {
    flex: 1 1 auto;
  }
  .set9-pw {
    grid-template-columns: minmax(0, 1fr);
  }
  .set9-pw .btn {
    justify-self: start;
  }
  .set9-grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .set9-asset {
    grid-template-columns: auto minmax(0, 1fr) 34px;
    grid-template-areas: 'logo main menu' 'logo owner owner';
    row-gap: 6px;
    padding: 10px 12px;
  }
  .set9-asset > .set9-adz,
  .set9-asset > .set9-alogo {
    grid-area: logo;
    align-self: start;
  }
  .set9-asset > .row9-main {
    grid-area: main;
  }
  .set9-asset > .set9-aowner {
    grid-area: owner;
  }
  .set9-asset > .set9-amenu {
    grid-area: menu;
  }
  .set9-add input {
    flex: 1 1 auto;
  }
  .set9 .st-row {
    grid-template-columns: 28px minmax(0, 1fr) 30px 30px 30px;
    row-gap: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }
  .set9 .st-row > select {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .set9 .st-row > .st-used {
    grid-column: 4 / 6;
    grid-row: 2;
    text-align: right;
  }
  .set9 .st-ro .st-row {
    grid-template-columns: 14px minmax(0, 1fr) auto;
  }
  .adm9-inline input:not([type='checkbox']) {
    flex: 1 1 100%;
  }
  .adm9 .kv > span:first-child {
    width: 100%;
  }
  .pt9-list .row9 {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 12px;
    grid-template-areas: 'when main main' 'when remind remind' 'when resp act';
    row-gap: 8px;
    align-items: start;
  }
  .pt9-when {
    grid-area: when;
  }
  .pt9-d,
  .pt9-in {
    white-space: normal;
  }
  .pt9-list .row9 > .row9-main {
    grid-area: main;
  }
  .pt9-remind {
    grid-area: remind;
    justify-content: flex-start;
  }
  .pt9-resp {
    grid-area: resp;
  }
  .pt9-act {
    grid-area: act;
  }
  .adm9-list .row9-s,
  .set9-list .row9-s {
    white-space: normal;
  }
  .pt9-lbl {
    display: none;
  }
  .nt9-list .nt9-row {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .nt9-row .ntype {
    min-width: 0;
  }
  .nt9-row .row9-main {
    flex-basis: 100%;
    order: 3;
  }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .set9-asset {
    grid-template-columns: auto minmax(0, 1fr) minmax(170px, 220px) 34px;
  }
  .pt9-list .row9 {
    grid-template-columns: 90px minmax(0, 1fr) 170px auto;
  }
  .pt9-remind {
    grid-column: 2 / 3;
    grid-row: 2;
    justify-content: flex-start;
  }
}

/* ===== rc.9 — «Билеты»: матчи, заявки и квоты; разбор заявки из Telegram по группам ===== */
.page-tk9 .ph-actions .btn-primary { min-height: 38px; padding: 0 18px; }
.tk-privacy { margin-top: 22px; display: flex; gap: 6px; align-items: flex-start; }
.tk-privacy .ic { flex: none; margin-top: 1px; }
.tk-recheck-note { margin-bottom: 14px; }

/* ---------- Карточка матча ---------- */
.mc-toolbar { margin: 0 0 12px; }
.mc-toolbar .crumbs { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #17181b; color: #fff; border-radius: var(--r); padding: 20px 22px; margin-bottom: 14px;
  border: 1px solid #2a2c31;
}
.mc-head-logo { flex: none; border-radius: 10px; }
.mc-head .alogo { background: #fff; padding: 3px; box-sizing: border-box; }
.mc-head-mono { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--help-text); color: #fff; font-weight: 700; font-size: 20px; }
.mc-head-main { flex: 1 1 260px; min-width: 0; }
.mc-head-t { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: 24px; line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.mc-head-s { margin-top: 6px; font-size: 12.5px; color: #c9ccd2; }
.mc-head-state { flex: none; font-size: 12px; padding: 4px 10px; border-radius: 6px; background: #2c2e33; color: #f1e9c8; }
.mc-reqs .sec9-h { flex-wrap: wrap; }
.mc-req-tbl td { vertical-align: top; }
.mc-req-tbl .lnk.strong { font-weight: 700; }
.mc-park-line { margin-top: 8px; }
.mc-grid9 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-top: 22px; align-items: start; }
.tk-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }

/* ---------- Схема занятости ---------- */
.qmap { padding: 18px 20px; }
.qmap .qm-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.qmap .qm-head h2 { margin: 0 0 4px; }
.qmap .qm-row { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) minmax(110px, 170px); gap: 6px 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.qmap .qm-row:first-of-type { border-top: 0; }
.qmap .qm-h { flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; }
.qmap .qm-r { text-align: right; line-height: 1.45; }
.qmap .qm-c { width: 20px; height: 20px; border-radius: 4px; font-size: 11px; }
.qmap .qm-cells { gap: 4px; }
.qmap .qm-grp { gap: 4px; }
.qmap .qm-idle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.qmap .qm-legend { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.qmap .qm-legend b { color: var(--text); }
.qmap .qm-total { border-top: 0; padding-top: 2px; margin-top: 6px; }

/* ---------- Входящие: черновик ---------- */
.tkin-card { gap: 12px; padding: 18px 20px; }
.tkin-h .tkin-kind { margin-left: 4px; }
.tkin-msgs { border-left: 3px solid var(--accent); padding: 12px 14px; }
.tkin-msgs .tkin-text { font-size: 13px; line-height: 1.5; }
.tkin-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tkin-meta .fld { min-width: 220px; flex: 0 1 300px; }
.tkin-meta-chips { display: inline-flex; gap: 6px; align-items: center; padding-bottom: 6px; }

/* ---------- Группы ---------- */
.tkg-list { display: flex; flex-direction: column; gap: 12px; }
.tkg { position: relative; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tkg.has-err { border-left-color: var(--risk-text); }
.tkg-un { border-left-color: var(--blue); }
.tkg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tkg-h h4 { margin: 0; font-size: 15px; font-weight: 700; }
.tkg-cat { overflow-wrap: anywhere; }
.tkg-quote { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-s); padding: 6px 10px; }
.tkg-grid { display: grid; grid-template-columns: minmax(0, 2fr) 90px 90px minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 10px 12px; align-items: end; }
.tkg-grid select, .tkg-grid input { width: 100%; min-width: 0; }
.tkg-park-mixed input { width: 54px; }
.tkg-recs { display: flex; flex-direction: column; gap: 6px; }
.tkg-rh, .tkg-rec { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 76px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tkg-un .tkg-rec { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto auto; }
.tkg-rec input, .tkg-rec select { min-width: 0; width: 100%; }
.tkg-rec.is-skip { opacity: 0.5; }
.tkg-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tkg-srccell { min-width: 0; overflow: hidden; }
.tkg-acts { display: inline-flex; align-items: center; gap: 4px; }
.tkg-acts .tkg-move { width: auto; max-width: 120px; }
.tkg-notes { display: flex; flex-direction: column; gap: 3px; }
.tkg-err { color: var(--help-text); font-weight: 600; }
.tkg-loose { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tkg-add { align-self: flex-start; }
.tkg-ai { border: 1px solid var(--blue-soft); background: var(--blue-soft); color: var(--text); border-radius: var(--r-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.tkg-ai-off, .tkg-ai-done { padding: 2px 0; }

/* Итоги и действия: липкая полоса внизу черновика */
.tkg-total { position: sticky; bottom: 8px; z-index: 3; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-lg); }
.tkg-total-l { flex: 1 1 280px; min-width: 0; }
.tkg-total-l b { font-size: 15px; }
.tkg-total-r { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 100%; }
.tkg-total-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tkg-why { color: var(--risk-text); max-width: 520px; text-align: right; }

/* ---------- Карточка заявки: группы, тип парковки, сверка ---------- */
.rq-grp { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; margin-right: 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; }
.rq-grp-cap { margin: 4px 0; }
.rq-parktype { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rq-recheck { display: flex; flex-direction: column; gap: 6px; }
.rq-rebuild { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.rq-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.rq-diff-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px; min-width: 0; overflow-x: auto; }
.rq-diff-col[data-diff='proposed'] { border-color: var(--accent); }
.rq-diff-t { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.rq-diff-quota { background: var(--surface); }
.rq-rebuild .tkg-total { position: static; box-shadow: none; }

/* ---------- Узкий экран ---------- */
@media (max-width: 1100px) {
  .tkg-grid { grid-template-columns: minmax(0, 1fr) 90px 90px minmax(0, 1fr); }
  .tkg-f-for { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .mc-grid9 { grid-template-columns: 1fr; }
  .qmap { padding: 14px; }
  .qmap .qm-row { grid-template-columns: 1fr; }
  .qmap .qm-r { text-align: left; }
  .tkg { padding: 12px; }
  .tkg-grid { grid-template-columns: 1fr 1fr; }
  .tkg-f-cat, .tkg-f-for { grid-column: 1 / -1; }
  .tkg-rh { display: none; }
  .tkg-rec, .tkg-un .tkg-rec { grid-template-columns: 1fr 1fr; padding: 8px 0; border-top: 1px solid var(--line); }
  .tkg-acts { grid-column: 1 / -1; justify-content: flex-end; }
  .tkin-card { padding: 14px; }
  .tkin-meta .fld { flex: 1 1 100%; min-width: 0; }
  .tkg-total { position: static; }
  .tkg-total-r { align-items: stretch; width: 100%; }
  .tkg-total-acts { justify-content: stretch; }
  .tkg-total-acts .btn { flex: 1 1 auto; }
  .tkg-why { text-align: left; }
  .rq-diff { grid-template-columns: 1fr; }
  .mc-head { padding: 16px; }
  .mc-head-t { font-size: 20px; }
}
html[data-motion='min'] .tkg, html[data-motion='min'] .qm-grp { transition: none !important; }
.tkg-ai-blocked { flex-direction: row; align-items: flex-start; gap: 6px; background: var(--surface); border-color: var(--line); }
.tkg-ai-sent summary { cursor: pointer; color: var(--text-3); }
.tkg-ai-sent pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; max-height: 220px; overflow: auto; }

/* ===== rc.9 · Работа: главная, проекты, страница проекта, задачи, боковая карточка, руководитель =====
   Цвета отметок едины для всех экранов: «Ждут решения» — акцент, «Нужна помощь» — синий,
   «Просрочено» и блокер — красный. Только токены основы — светлая и тёмная темы без жёстких цветов,
   кроме фирменной тёмной шапки проекта (одинакова в обеих темах). */

/* ---------- Общее ---------- */
.sec9-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sec9-h h2 {
  display: flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
}
.more-link9 {
  margin-top: 8px;
}
.search9 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text-3);
  flex: 0 1 230px;
  min-width: 0;
}
.search9:focus-within {
  border-color: var(--accent);
}
.search9 input,
.toolbar9 .search9 input[type='search'] {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 6px 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  flex: 1;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.toolbar9 select {
  max-width: 210px;
  text-overflow: ellipsis;
}
.toolbar9 .seg {
  flex: none;
}
.pre {
  white-space: pre-wrap;
}
.red {
  color: var(--help-text);
}

/* ---------- Главная ---------- */
.home9-metrics .metric9 {
  cursor: pointer;
  min-width: 0;
}
.home9-metrics .metric9-s {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.home9-metrics .metric9[aria-expanded='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}
.home9-metrics .metric9-blue[aria-expanded='true'] {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), var(--shadow);
}
.home9-metrics .metric9-red[aria-expanded='true'] {
  border-color: var(--help-text);
  box-shadow: 0 0 0 1px var(--help-text), var(--shadow);
}
.home9-att {
  margin-top: 12px;
}
.home9-att .card {
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.home9-widgets {
  columns: 3 300px;
  column-gap: 12px;
}
.home9-w {
  break-inside: avoid;
  margin-bottom: 12px;
}
.home9-w > .card,
.home9-w > section {
  margin: 0;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.home9-w .card-h {
  margin-bottom: 8px;
}
.home9-w .card-h h2 {
  font-size: 14px;
}
.home9-more {
  margin-top: 26px;
}

/* ---------- Карточки проектов (главная, проекты, руководитель) ---------- */
.pgrid9 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.ptile9 {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.ptile9:hover,
.lead9-card:hover {
  border-color: var(--line-2);
}
.ptile9-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 16px 16px 14px;
  border: 0;
  border-radius: inherit;
  background: none;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.ptile9-asset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-3);
}
.ptile9-asset > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptile9-t {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.ptile9-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.ptile9-bar {
  display: block;
}
.ptile9-f {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
  min-width: 0;
}
.ptile9-n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptile9-d {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ptile9-d.red {
  color: var(--help-text);
  font-weight: 600;
}
.ptile9-own {
  display: inline-flex;
  flex: none;
}
.ptile9-arch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px 12px;
}

/* ---------- Проекты ---------- */
.proj9-bar {
  margin-top: 4px;
}
.ptbl9-wrap {
  padding: 0;
  border: 1px solid var(--line);
  overflow-x: auto;
}
.ptbl9 {
  min-width: 860px;
}
.ptbl9 td,
.ptbl9 th {
  padding: 10px 12px;
}
.ptbl9-t {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: var(--text);
  font: inherit;
  min-width: 0;
  max-width: 420px;
}
.ptbl9-t b {
  display: block;
  font-weight: 600;
}
.ptbl9-t small {
  display: block;
  color: var(--text-3);
  font-size: 11.5px;
}
.ptbl9-u {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.ptbl9-sig {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.proj9-scheme .tree9 {
  height: calc(100vh - 250px);
  min-height: 520px;
  padding: 0;
}
.tree9 .tree-top {
  margin-bottom: 10px;
}

/* ---------- Строки задач ---------- */
.list9.rows {
  gap: 0;
}
.list9 > .trow {
  position: relative;
  padding: 10px 14px 10px 16px;
  min-height: 56px;
  gap: 12px;
  border-radius: 0;
}
/* Левое поле строки: ⋮⋮ (порядок) и флажок массовой правки — видны при наведении, фокусе или выборе */
.list9 > .trow-ord {
  padding-left: 26px;
}
.list9 > .trow:has(> .trow-sel) {
  padding-left: 40px;
}
.list9 > .trow > .trow-grip {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}
.list9 > .trow > .trow-sel {
  position: absolute;
  left: 10px;
  top: 50%;
  margin: -8px 0 0;
  width: 16px;
  height: 16px;
  opacity: 0;
}
.list9 > .trow-ord > .trow-sel {
  left: 18px;
}
.list9 > .trow:hover > .trow-sel,
.list9 > .trow:focus-within > .trow-sel,
.list9 > .trow > .trow-sel:checked,
.list9.has-sel > .trow > .trow-sel {
  opacity: 1;
}
@media (hover: none) {
  .list9 > .trow > .trow-sel {
    opacity: 1;
  }
}
.list9 > .trow-c {
  min-height: 44px;
  padding: 6px 12px;
}
.list9 > .trow:hover {
  background: var(--surface-2);
}
.trow .tt {
  font-size: 13.5px;
}
.trow-ctx {
  font-size: 11.5px;
  margin-top: 2px;
}
.trow-f {
  gap: 6px;
}
.trow-f .chip9 {
  flex: none;
}
.trow-st .sel {
  padding: 0;
  min-height: 0;
  border: 0;
}
.trow-st .sel:hover {
  background: none;
}
.trow-st .pill {
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 11.5px;
  line-height: 18px;
  background: var(--surface-3);
  color: var(--text-2);
}
.trow-st .sel:hover .pill {
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.trow-st .pill-dot {
  display: none;
}
.trow-st[data-cat='doing'] .pill {
  background: var(--blue-soft);
  color: var(--blue);
}
.trow-st[data-cat='done'] .pill {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.trow .tcheck {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}
.trow .tcheck.on {
  background: var(--ok-text);
  border-color: var(--ok-text);
  color: var(--surface);
}
.trow .tcheck.pending {
  border-color: var(--accent);
  border-style: dashed;
  color: transparent;
  cursor: progress;
  animation: tspin9 1.1s linear infinite;
}
@keyframes tspin9 {
  to {
    transform: rotate(360deg);
  }
}
.trow.is-saving .tt {
  color: var(--text-2);
}
.trow-saving {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.trow-done {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.trow-done .btn-link {
  min-height: 0;
  padding: 2px 6px;
}
.trow.is-just-done {
  background: var(--ok-soft);
}
html[data-motion='min'] .trow .tcheck.pending {
  animation: none !important;
  border-style: dotted;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) .trow .tcheck.pending {
    animation: none !important;
    border-style: dotted;
  }
}

/* ---------- Задачи ---------- */
.tasks9-bar {
  margin-top: 16px;
}
.lbar9 {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: 0 0 4px;
}
.lbar9-g {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lbar9 select {
  min-height: 32px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 8px;
  font-size: 13px;
  color: var(--text);
}
.lgroups9 {
  display: flex;
  flex-direction: column;
}
.tgroup9 {
  margin-top: 18px;
}
.tgroup9 .sec9-h h2,
.tgroup9-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-ui);
  font-size: 15px;
  min-width: 0;
}
.tgroup9-h .lgroup-t {
  font: inherit;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.tgroup9-h .lgroup-t:hover {
  color: var(--accent-text);
}
.tgroup9 .sec9-h h2 .cnt {
  font-family: var(--f-ui);
  font-size: 12px;
  margin-left: 2px;
  white-space: nowrap;
}
.tgroup9-0att .sec9-h h2 > span:first-child::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
}
.arch-note9 {
  margin: 14px 0 4px;
}
.tasks9 .arch,
.pp9 .arch {
  margin-top: 14px;
}
.tasks9 .arch .rows,
.pp9 .arch .rows {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.tasks9 .arch-row,
.pp9 .arch-row {
  padding: 10px 14px;
  min-height: 48px;
  border-bottom: 0;
}
.tasks9 .arch-bar .menu-search,
.pp9 .arch-bar .menu-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 380px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text-3);
}
.tasks9 .arch-bar .menu-search:focus-within,
.pp9 .arch-bar .menu-search:focus-within {
  border-color: var(--accent);
}
.tasks9 .arch-bar .menu-search input,
.pp9 .arch-bar .menu-search input {
  border: 0;
  background: none;
  box-shadow: none;
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  outline: none;
}
.tasks9 .arch-bar select {
  min-height: 36px;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  padding: 4px 8px;
}
.arch-row .arch-t {
  color: var(--text);
  text-decoration: none;
}
.arch-row .arch-t:hover {
  color: var(--accent-text);
}
.arch-row .arch-ctx {
  flex: 1;
  min-width: 0;
}
.tasks9 .arch-row + .arch-row,
.pp9 .arch-row + .arch-row {
  border-top: 1px solid var(--line);
}
.tasks9 .kanban {
  margin-top: 8px;
}
.tasks9 .kcard {
  border-radius: var(--r-s);
}
.tasks9 .bulk-bar {
  margin: 6px 0;
}

/* ---------- Страница проекта ---------- */
.pp9 {
  max-width: 1240px;
}
.pp9:focus {
  outline: none;
}
.pp9-top {
  margin: -4px 0 10px;
}
.pp9-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 4px 6px 4px 0;
  color: var(--text-3);
  font-size: 12.5px;
}
.pp9-back:hover {
  color: var(--text);
}
.pp9-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #181a1e;
  color: #fff;
  border-radius: var(--r);
  padding: 22px 24px 20px;
}
.pp9-hero::after,
.lead9-hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: 56px;
  width: 54px;
  height: 160%;
  background: var(--accent);
  transform: skewX(-27deg);
  opacity: 0.86;
  z-index: -1;
  pointer-events: none;
}
.pp9-club {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #c6c7ca;
  margin-bottom: 8px;
}
.pp9-hero .dr-title {
  color: #fff;
  font-family: var(--f-head);
  font-size: 28px;
  line-height: 1.15;
  max-width: calc(100% - 140px);
  padding: 2px 6px;
}
.pp9-hero .dr-title:hover {
  background: rgba(255, 255, 255, 0.06);
}
.pp9-hero .dr-title:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}
.pp9-goal {
  margin: 6px 0 0;
  max-width: min(720px, calc(100% - 140px));
  color: #b9bec8;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp9-goal-add {
  display: block;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: #9aa0a8;
}
.pp9-goal-add:hover {
  color: #fff;
}
.pp9-acts {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  max-width: calc(100% - 130px);
}
.pp9-acts .grow {
  flex: 1;
}
.pp9 .pp9-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
}
.pp9 .pp9-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
.pp9-st .sel {
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 6px;
  min-height: 32px;
  padding: 0 10px;
}
.pp9-st .sel:hover {
  background: rgba(255, 255, 255, 0.2);
}
.pp9-st .pill,
.pp9-st .sel .pill {
  color: #fff;
  background: none;
  font-weight: 600;
}
.pp9 .pp9-ib,
.pp9-menu .ib {
  color: #fff;
}
.pp9 .pp9-ib:hover,
.pp9-menu .ib:hover {
  background: rgba(255, 255, 255, 0.14);
}
.pp9-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
}
.pp9-f {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.pp9-f > .fl {
  font-size: 11.5px;
  color: var(--text-3);
}
.pp9-f .sel {
  margin-left: -6px;
}
.pp9-link {
  border: 0;
  background: none;
  padding: 3px 0;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
.pp9-link:hover {
  color: var(--accent-text);
}
.pp9 .pc-bmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: none;
  padding: 3px 0;
  border-radius: 0;
  color: var(--text);
  max-width: 100%;
}
.pp9 .pc-bmark b {
  font-weight: 700;
}
.pc-bmark-l {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  padding: 1px 7px;
  background: var(--surface-3);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-bmark-approved .pc-bmark-l {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.pc-bmark-pending .pc-bmark-l,
.pc-bmark-accepted .pc-bmark-l {
  background: var(--risk-soft);
  color: var(--risk-text);
}
.pc-bmark-counter .pc-bmark-l {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.pp9-state {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 10px;
}
.pp9-state:empty {
  display: none;
}
.pp9-state .hq-row {
  flex: 1;
  min-width: 260px;
}
.pp9 .flag-help,
.pp9 .flag-ask,
.pp9 .flag-archived {
  margin: 10px 0 0;
}
.pp9 .flag-help,
.drawer .flag-help {
  background: var(--blue-soft);
  color: var(--blue);
}
.pp9 .flag-archived {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border-radius: var(--r-s);
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 13px;
}
.pp9 .flag-archived span {
  flex: 1;
}
.pp9 .flag-ask {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.pp9 .upd-list {
  margin-top: 10px;
}
.pp9-tabs {
  margin-top: 16px;
}
.pp9-panel {
  padding-top: 4px;
}
.pp9-panel > .sec9:first-child {
  margin-top: 16px;
}
.pp9 .fold {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 0 16px;
  margin-top: 10px;
}
.pp9 .fold-h {
  padding: 13px 0;
}
.pp9 .fold-att > .fold-h {
  background: none;
  padding-left: 0;
  padding-right: 0;
}
.pp9 .fold-tag {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 5px;
  padding: 1px 7px;
}
.pp9 .fold-b {
  padding: 0 0 14px;
}
.pp9 .first-task {
  margin-top: 16px;
}
.pp9-add {
  background: var(--surface);
  margin: 0 0 10px;
}
.pp9 .pc-tasks .rows-closed {
  margin-top: 10px;
}
.pp9 #pc-estimates {
  margin-top: 16px;
}
.pp9-docs .doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
  color: var(--text);
}
.pp9-docs .doc-row:hover {
  background: var(--surface-2);
}
.pp9-docs .doc-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp9-budget,
.pp9-hist {
  padding: 16px 18px;
}
.pp9-budget > .sec9-h,
.pp9-hist > .sec9-h {
  margin-bottom: 12px;
}
.pp9 .item-t,
.pp9 .att-t,
.att-note {
  white-space: pre-wrap;
}
.app[data-app-theme='dark'] .pp9-hero,
.app[data-app-theme='dark'] .lead9-hero {
  background: #0d0e10;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- Боковая карточка задачи ---------- */
.drawer {
  width: min(600px, 100%);
}
.drawer .dr-h {
  min-height: 52px;
  padding: 8px 12px 8px 20px;
}
.drawer .dr-path {
  font-size: 12px;
  color: var(--text-3);
}
.drawer .dr-path .crumb {
  color: var(--text-3);
  padding: 2px 4px;
}
.drawer .dr-path .crumb:hover {
  color: var(--text);
}
.drawer .dr-b {
  padding: 16px 22px 40px;
  gap: 12px;
}
.drawer .dr-title {
  font-size: 20px;
  line-height: 1.3;
}
.drawer .dr-ctl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 2px 0 4px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r);
}
.drawer .dr-ctl .ctl .fl {
  font-size: 11.5px;
}
.drawer .dr-ctl .sel {
  margin-left: -6px;
}
.drawer .dr-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.drawer .dr-sec {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.drawer .dr-sec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.drawer .etext,
.drawer .cmt-t {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.drawer .cmt {
  padding: 8px 0;
}
.drawer .cmt + .cmt {
  border-top: 1px dashed var(--line);
}
.drawer .flag-help,
.drawer .flag-block,
.drawer .flag-archived {
  border-radius: var(--r-s);
  padding: 8px 12px;
  margin: 0;
}

/* ---------- Руководитель ---------- */
.app-leader {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.leader9 {
  flex: 1;
  min-height: 0;
  display: flex;
}
.leader9 .main {
  min-height: 0;
}
.leader9 .top.leader-top {
  position: static;
  padding: 0 26px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.leader9-me {
  cursor: default;
}
.leader9-me:hover {
  background: none;
}
.leader9-page {
  max-width: 1240px;
}
.lead9-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #181a1e;
  color: #fff;
  border-radius: var(--r);
  padding: 26px 24px 24px;
  margin-bottom: 16px;
}
.lead9-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c6c7ca;
}
.lead9-title {
  font-family: var(--f-head);
  font-size: 30px;
  line-height: 1.15;
  margin: 8px 0 0;
  max-width: calc(100% - 140px);
}
.lead9-sub {
  margin: 8px 0 0;
  color: #b9bec8;
  font-size: 13px;
}
.leader9 .leader-filters input {
  min-width: 0;
}
.leader9 .leader-filters .search9 {
  flex: 0 1 300px;
}
.lead9-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 150px;
}
.leader9 .leader-group {
  margin-top: 2px;
}

/* ---------- Узкий экран ---------- */
@media (max-width: 900px) {
  .pgrid9 {
    grid-template-columns: minmax(0, 1fr);
  }
  .home9-widgets {
    columns: 1;
  }
  .search9 {
    flex: 1 1 100%;
  }
  .toolbar9 select {
    flex: 1 1 140px;
    max-width: none;
    min-width: 0;
  }
  .toolbar9 .grow {
    display: none;
  }
  .pp9-hero,
  .lead9-hero {
    padding: 18px 16px;
  }
  .pp9-hero::after,
  .lead9-hero::after {
    right: 14px;
    width: 26px;
  }
  .pp9-hero .dr-title {
    font-size: 22px;
    max-width: calc(100% - 36px);
  }
  .pp9-goal {
    max-width: calc(100% - 40px);
  }
  .pp9-acts {
    max-width: calc(100% - 40px);
    gap: 6px;
  }
  .pp9-acts .grow {
    display: none;
  }
  .pp9 .pp9-btn {
    padding: 5px 10px;
    font-size: 12.5px;
  }
  .pp9-facts {
    gap: 12px 22px;
  }
  .pp9-tabs {
    gap: 16px;
  }
  .lead9-title {
    font-size: 23px;
    max-width: calc(100% - 40px);
  }
  .drawer .dr-ctl {
    grid-template-columns: minmax(0, 1fr);
  }
  .list9 > .trow {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .list9 > .trow .trow-main {
    flex-basis: calc(100% - 44px);
  }
  .list9 > .trow .trow-f {
    margin-left: 32px;
    flex-wrap: wrap;
  }
  .proj9-scheme .tree9 {
    height: auto;
  }
  .leader9 .top.leader-top {
    padding: 0 12px;
  }
}

/* ---------- Подтверждение выполнения: карточка задачи и канбан (как у строки) ---------- */
.dr-done {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.dr-done .btn-link {
  min-height: 0;
  padding: 2px 6px;
}
.dr-done.done-flash {
  animation: doneflash9 200ms var(--ease);
  border-radius: var(--r-s);
}
.dr-st-pop .sel,
.dr-st-pop select {
  animation: donepop9 200ms var(--ease);
}
.kcard.is-saving {
  opacity: 0.85;
}
/* Три класса — сильнее появления строк .kcol-b > .kcard:nth-child(…) / .rows > .trow:nth-child(…) */
.kcard.done-flash.is-just-done,
.trow.done-flash.is-just-done {
  animation: doneflash9 200ms var(--ease);
}
.kcard.is-just-done {
  background: var(--ok-soft);
}
.kcard-done {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
}
.kcard-done .btn-link {
  min-height: 0;
  padding: 2px 6px;
}
html[data-motion='min'] .dr-done.done-flash,
html[data-motion='min'] .dr-st-pop .sel,
html[data-motion='min'] .dr-st-pop select,
html[data-motion='min'] .kcard.done-flash.is-just-done,
html[data-motion='min'] .trow.done-flash.is-just-done,
html[data-motion='min'] .trow .cbx-done-pop {
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='full']) .dr-done.done-flash,
  html:not([data-motion='full']) .dr-st-pop .sel,
  html:not([data-motion='full']) .dr-st-pop select,
  html:not([data-motion='full']) .kcard.done-flash.is-just-done,
  html:not([data-motion='full']) .trow.done-flash.is-just-done,
  html:not([data-motion='full']) .trow .cbx-done-pop {
    animation: none !important;
  }
}
