/* Кабинет клиента. Цвет несёт смысл: зелёный - рост и готово, красный - падение
   и критично, оранжевый - внимание, синий - в работе и информация, серый - очередь. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --text: #17191c;
  --text-2: #5b6270;
  --text-3: #8a91a0;
  --accent: #2f5bea;
  --good: #1a8a4a;
  --good-bg: #e6f4ec;
  --bad: #c9362b;
  --bad-bg: #fbe9e7;
  --warn: #c46a00;
  --warn-bg: #fdf0e0;
  --info: #2f5bea;
  --info-bg: #e8eefd;
  --muted-bg: #eef0f3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 1px 3px rgba(20, 24, 31, .06);
  --font: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.lead { font-size: 15px; color: var(--text-2); max-width: 820px; margin: 0 0 12px; }
.note { font-size: 12px; color: var(--text-3); margin: 10px 0 0; }

/* раскладка */
.layout {
  display: grid; grid-template-columns: 232px 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--surface) 231px, var(--border) 231px 232px, transparent 232px);
}
.side {
  position: sticky; top: 0; height: 100vh;
  padding: 20px 14px; display: flex; flex-direction: column; gap: 20px;
}
.brand-name { font-weight: 700; font-size: 16px; }
.brand-sub { color: var(--text-3); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--text-2); padding: 7px 10px; border-radius: 7px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--info-bg); color: var(--accent); }
.side-foot { margin-top: auto; font-size: 12px; color: var(--text-3); }
.main { padding: 24px 32px 40px; min-width: 0; max-width: 1280px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap; }
.top-sub { display: flex; gap: 8px; color: var(--text-2); margin-top: 4px; flex-wrap: wrap; }
.top-meta { text-align: right; }
.stage-note { font-weight: 500; }
.foot { margin-top: 32px; font-size: 12px; color: var(--text-3); max-width: 820px; }

.section { margin-bottom: 16px; }
.section-title { margin: 8px 0 12px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.two > .section { margin-bottom: 0; }
.grid.two { margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.more { font-size: 13px; }

/* KPI */
.kpis { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.small-kpis { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpi { display: block; color: inherit; }
.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi.flat { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.kpi-label { color: var(--text-2); font-size: 13px; }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 2px; }
.kpi-value small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.kpi-sub { font-size: 12px; color: var(--text-3); }
.delta { font-size: 13px; font-weight: 600; }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
.delta.neutral { color: var(--text-3); font-weight: 500; }

/* подсказки к терминам */
.term { position: relative; border-bottom: 1px dotted var(--text-3); cursor: help; }
.term i { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 3px; vertical-align: super; }
.term[data-tip=""] { border-bottom: 0; cursor: inherit; }
.term[data-tip=""] i { display: none; }
.term:not([data-tip=""]):hover::after, .term:not([data-tip=""]):focus::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
  width: max-content; max-width: 280px;
  background: #1f2329; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.45;
  padding: 8px 10px; border-radius: 6px; white-space: normal; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* вкладки и фильтры */
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  padding: 5px 10px; border-radius: 7px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--text); color: #fff; border-color: var(--text); }
.tabs.metrics { margin-bottom: 12px; }
.chart-wrap { position: relative; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.filters label.grow { flex: 1; min-width: 180px; }
.filters select, .filters input { max-width: 100%; }
.filters select, .filters input {
  font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--surface); color: var(--text); min-width: 120px;
}

/* значки */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st-done, .is-fixed, .is-checked { background: var(--good-bg); color: var(--good); }
.st-in_progress, .st-review, .is-in_progress { background: var(--info-bg); color: var(--info); }
.st-planned { background: var(--muted-bg); color: var(--text); }
.st-backlog, .is-open { background: var(--muted-bg); color: var(--text-2); }
.sev-critical { background: var(--bad-bg); color: var(--bad); }
.sev-high { background: var(--warn-bg); color: var(--warn); }
.sev-medium { background: var(--muted-bg); color: var(--text); }
.sev-low { background: var(--muted-bg); color: var(--text-3); }
.chip { display: inline-block; font-size: 11.5px; color: var(--text-2); border: 1px solid var(--border); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.good { background: var(--good); }

/* прогресс */
.progress { height: 6px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--text-3); border-radius: 999px; }
.progress.info span { background: var(--info); }
.progress.good span { background: var(--good); }
.stage-row { margin: 10px 0; }
.stage-row-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.stage-row.current .stage-row-head span:first-child { font-weight: 600; }

/* обзор */
.work { padding: 10px 0; border-top: 1px solid var(--border); }
.work:first-of-type { border-top: 0; padding-top: 0; }
.work-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 2px; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 6px 0; }
.plain { margin: 10px 0 0; padding-left: 18px; }
.plain li { margin: 3px 0; }
.sev-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sev-box { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; color: inherit; font-size: 12px; }
.sev-box:hover { text-decoration: none; filter: brightness(.97); }
.sev-box.zero { opacity: .6; }
.sev-num { font-size: 22px; font-weight: 600; }

/* пустые состояния */
.empty { border: 1px dashed var(--border); border-radius: 8px; padding: 16px; text-align: center; background: var(--surface-2); margin-bottom: 8px; }
.empty-title { font-weight: 500; }
.empty-hint { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.note-card { background: var(--info-bg); border-color: transparent; box-shadow: none; margin-bottom: 16px; }

/* задачи и проблемы */
.task, .issue, .check { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 8px; }
.tasks .task { box-shadow: var(--shadow); }
.task summary, .issue summary, .check summary {
  list-style: none; cursor: pointer; padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
}
.task summary::-webkit-details-marker, .issue summary::-webkit-details-marker, .check summary::-webkit-details-marker { display: none; }
.task[open] summary, .issue[open] summary, .check[open] summary { border-bottom: 1px solid var(--border); }
.task-title, .issue-title { font-weight: 500; }
.task-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.task-body { padding: 12px 14px; }
.why { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; margin: 0; }
.why dt { color: var(--text-2); font-size: 13px; }
.why dd { margin: 0; }
.why.compact { padding: 10px 14px; }
.card .why.compact { padding: 0; margin: 8px 0; }
.task-facts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 12px; }
.task-links { font-size: 13px; margin-top: 8px; }
.filter-count { margin-left: auto; }
.sev-block { margin-bottom: 12px; }
.sev-block .card-head { margin-bottom: 8px; }
.issue { box-shadow: none; }

/* план */
.month-card { max-width: 560px; }
.big { font-size: 24px; font-weight: 600; }
.timeline { display: grid; gap: 12px; }
.stage.current { border-color: var(--info); box-shadow: 0 0 0 1px var(--info) inset, var(--shadow); }
.stage-progress { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.stage-progress .progress { flex: 1; }
.stage-tasks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 16px; }
.stage-tasks li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--surface-2); }

/* таблицы */
.table-wrap { overflow-x: auto; }
.table-wrap.short { max-height: 520px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--border); padding: 8px 10px; position: sticky; top: 0; background: var(--surface); }
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--text); }
.table th.sorted::after { content: " ↓"; }
.table th.sorted.asc::after { content: " ↑"; }
.table td { padding: 7px 10px; border-bottom: 1px solid var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.url { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table + .table { margin-top: 16px; }
.demand-chart-wrap { height: 400px; }
@media (max-width: 640px) { .demand-chart-wrap { height: 340px; } }
.demand-snapshot { margin-top: 12px; }
.demand-snapshot .table-wrap { padding: 0 8px 8px; }
.pager { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.pager button { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 4px 10px; cursor: pointer; font: inherit; }
.pager button:disabled { opacity: .4; cursor: default; }
.pos-up { color: var(--good); font-weight: 600; }
.pos-down { color: var(--bad); font-weight: 600; }
.pos-new { color: var(--info); font-weight: 600; }

/* техническое состояние */
.score { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.score-num { font-size: 48px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.tone-good { color: var(--good); }
.tone-warn { color: var(--warn); }
.tone-bad { color: var(--bad); }
.tone-none { color: var(--text-3); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--surface-2); }
.checks .check { box-shadow: none; }
.check summary { justify-content: flex-start; }
.check-mark { width: 22px; font-weight: 700; text-align: center; }
.check-title { flex: 1; }
.check-body { padding: 10px 14px 12px 48px; display: grid; gap: 4px; }

/* история */
.feed { list-style: none; margin: 0; padding: 0; position: relative; }
.feed-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; margin-bottom: 12px; }
.feed-date { color: var(--text-2); font-weight: 500; padding-top: 16px; }
.feed-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.feed-item.feed-change .feed-card { border-left: 3px solid var(--info); }
.feed-result { margin-top: 6px; }

/* планшеты и телефоны */
@media (max-width: 1024px) {
  .main { padding: 20px; }
  .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); background: none; }
  .side, .main { min-width: 0; }
  .side { position: static; height: auto; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .nav { flex-direction: row; overflow-x: auto; width: 100%; }
  .nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .main { padding: 16px; }
  .top-meta { text-align: left; }
  .why { grid-template-columns: 1fr; }
  .feed-item { grid-template-columns: 1fr; gap: 4px; }
  .feed-date { padding-top: 0; }
  .sev-grid { grid-template-columns: repeat(2, 1fr); }
  .kpis, .small-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-value { font-size: 22px; }
}

/* динамическая часть: вход, ответы, комментарии (только в приложении) */
.user-box { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.link-button { background: none; border: 0; padding: 0; color: var(--info); cursor: pointer; font: inherit; text-decoration: underline; }
form.inline { display: inline; margin-left: 6px; }
.button { background: var(--info); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; font: inherit; cursor: pointer; }
.button:hover { filter: brightness(1.1); }
textarea, .login input { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: inherit; }
.answer { margin-top: 8px; display: grid; gap: 6px; }
.answer-text, .comment-body { white-space: pre-wrap; }
.answer-form form, .comment-form { display: grid; gap: 6px; margin-top: 6px; }
.answer-form form .button { justify-self: start; }
.comments { margin-top: 12px; border-top: 1px solid var(--surface-2); padding-top: 10px; display: grid; gap: 8px; }
.comments-head { font-weight: 600; }
.comment { padding: 8px 10px; border-radius: 6px; background: var(--surface-2); }
.comment-internal { border-left: 3px solid var(--warn); }
.comment-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.login-page { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 16px; box-sizing: border-box; }
.login { width: 100%; max-width: 360px; display: grid; gap: 10px; padding: 24px; }
.login form { display: grid; gap: 12px; }
.login label { display: grid; gap: 4px; }
.login-error { color: var(--bad); }


/* Общая рамка кабинета по макету отчёта: тёмная навигация и верхняя панель. */
:root {
  --bg: #f5f7fc; --text: #101b32; --text-2: #52617b; --text-3: #657594;
  --border: #e4eaf4; --accent: #1763ed; --info: #1763ed; --radius: 14px;
  --shadow: 0 2px 5px #172d5010, 0 0 1px #172d5015;
}
html { scroll-padding-top: 24px; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #77aaff; outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 16px; background: white; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.layout { grid-template-columns: 224px minmax(0, 1fr); background: linear-gradient(to right, #142440 224px, transparent 224px); }
.side { background: linear-gradient(155deg, #101c36, #1c3055); color: #eef4ff; padding: 24px 14px; gap: 26px; overflow-y: auto; }
.brand-link { display: flex; align-items: center; gap: 9px; color: white; }
.brand-link:hover { text-decoration: none; }
.brand-name { font-size: 17px; letter-spacing: -.4px; }
.brand-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #6bc6ff; background: #1e4580; }
.brand-symbol .icon { width: 23px; height: 23px; }
.side-label { display: block; font-size: 11px; color: #acbdd8; margin: 0 8px 8px; }
.project-switch a { display: flex; gap: 10px; align-items: center; color: #f4f8ff; padding: 11px; border-radius: 9px; background: #ffffff12; border: 1px solid #ffffff10; font-size: 13px; }
.nav { gap: 5px; }
.nav a { display: flex; align-items: center; gap: 11px; color: #cbd7ed; padding: 10px; font-size: 13px; min-height: 42px; }
.nav a:hover { background: #ffffff12; color: white; }
.nav a.active { background: linear-gradient(120deg, #3b8bff, #1758e8); color: white; box-shadow: 0 3px 12px #0054e533, inset 0 1px 0 #ffffff30; }
.nav .icon { width: 18px; height: 18px; }
.side-foot { color: #acbdd8; padding: 14px 8px 0; border-top: 1px solid #ffffff16; line-height: 1.8; }
.workspace { min-width: 0; }
.workspace-bar { min-height: 66px; padding: 14px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #ffffffb8; border-bottom: 1px solid var(--border); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); min-width: 0; }
.breadcrumbs a { color: #415579; }
.breadcrumbs .icon { width: 17px; height: 17px; }
.breadcrumbs [aria-current] { overflow-wrap: anywhere; }
.user-box { margin: 0; flex-wrap: nowrap; gap: 10px; font-size: 12px; flex: 0 0 auto; }
.user-name { display: flex; align-items: center; gap: 6px; max-width: 220px; overflow-wrap: anywhere; }
.user-avatar { width: 33px; height: 33px; background: #246bed; color: white; border-radius: 50%; display: grid; place-items: center; font-weight: 600; }
.user-box .link-button { color: var(--text-2); text-decoration: none; padding: 8px 4px; }
.user-box .link-button:hover { color: var(--accent); text-decoration: underline; }
.main { max-width: 1600px; padding: 28px 32px 36px; margin: auto; }
.grid > *, .timeline > * { min-width: 0; }
.card:has(> .table) { overflow-x: auto; }
.stage-tasks { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.top { align-items: center; margin-bottom: 22px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.7px; line-height: 1.25; }
.top-sub { font-size: 13px; margin-top: 7px; }
.top-meta { font-size: 12px; }
.foot { line-height: 1.6; }

/* Экранный отчёт использует зафиксированное содержание; PDF имеет свой шаблон. */
.report-download { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 16px; border: 1px solid var(--border); border-radius: 10px; background: white; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; }
.report-download:hover { background: #eaf1ff; text-decoration: none; }
.report-download .icon { width: 17px; height: 17px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; padding: 4px; border-radius: 11px; background: #eaf0fa; margin-bottom: 18px; }
.report-tabs a { padding: 9px 15px; border-radius: 8px; color: #3b4c69; font-size: 12px; font-weight: 600; }
.report-tabs a.selected { color: white; background: linear-gradient(150deg, #3d8fff, #1259e8); box-shadow: 0 2px 4px #1763ed20; }
.report-tabs a:hover { text-decoration: none; box-shadow: inset 0 0 0 1px #a9c6ff; }
.report-screen { display: grid; gap: 20px; }
.report-periods { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.period-chip { display: inline-flex; gap: 9px; align-items: center; padding: 10px 14px; font-size: 12px; font-weight: 500; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.period-chip .icon { color: var(--accent); width: 17px; height: 17px; }
.report-version { color: var(--text-3); font-size: 11px; margin-left: auto; }
.report-data-note { font-size: 12px; line-height: 1.6; color: var(--text-2); margin: -9px 0 0; }
.report-warning { display: flex; align-items: center; gap: 10px; margin: -8px 0 0; padding: 12px 16px; color: #78551b; background: #fff5db; border: 1px solid #f0dfb1; border-radius: 10px; font-size: 12px; }
.report-panel { padding: 20px; min-width: 0; background: linear-gradient(145deg, #ffffff, #fbfcff); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow); }
.report-panel h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.report-panel h2 .icon { color: var(--accent); }
.report-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.report-panel-head h2 { margin: 0; }
.report-panel-head > a { white-space: nowrap; font-size: 11px; font-weight: 600; }
.report-panel-head > a .icon { width: 15px; height: 15px; }
.report-summary { display: flex; align-items: center; gap: 32px; background: linear-gradient(110deg, white 40%, #eaf2ff); }
.report-summary-copy { flex: 1; min-width: 0; }
.report-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 12px; line-height: 1.6; }
.report-checklist li { display: flex; align-items: flex-start; gap: 10px; }
.report-checklist .icon { border-radius: 50%; background: #2477f3; color: white; width: 15px; height: 15px; padding: 2px; margin-top: 2px; }
.report-illustration { width: 185px; flex: 0 0 auto; transform: rotate(-5deg); }
.report-illustration svg { display: block; width: 100%; }
.report-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.report-total-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-business-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.report-kpi { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(150deg, white, #f7faff); box-shadow: var(--shadow); }
.report-icon-tile { display: inline-grid; place-items: center; width: 34px; height: 34px; background: #e9f0ff; color: #1763ed; border-radius: 8px; margin-bottom: 10px; }
.report-kpi h3 { font-size: 12px; font-weight: 500; min-height: 36px; }
.report-kpi strong { display: block; font-size: clamp(20px, 2vw, 28px); font-weight: 700; letter-spacing: -.7px; margin: 3px 0 0; overflow-wrap: anywhere; line-height: 1.4; }
.report-kpi p { margin: 0; font-size: 11px; color: var(--text-3); }
.report-change { display: block; margin-top: 7px; font-size: 11px; color: var(--text-2); }
.report-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.report-month { white-space: nowrap; font-size: 10px; color: #1658d8; padding: 4px 9px; border-radius: 20px; background: #eaf1ff; }
.report-chart-panel .report-panel-head { min-height: 38px; }
.report-chart-panel h2 { font-size: 14px; }
.report-plot { display: flex; gap: 8px; padding-top: 8px; }
.report-y-axis { display: flex; flex-direction: column; justify-content: space-between; height: 128px; width: 24px; flex-shrink: 0; padding-bottom: 0; font-size: 10px; color: var(--text-3); text-align: right; transform: translateY(-6px); }
.report-chart { display: flex; align-items: flex-end; gap: 4px; min-width: 0; flex: 1; height: 144px; padding-bottom: 24px; background: repeating-linear-gradient(to top, transparent 0 39px, #e5ebf5 39px 40px); background-size: 100% 120px; background-repeat: no-repeat; }
.report-bar-wrap { position: relative; flex: 1; text-align: center; min-width: 0; }
.report-bar { display: block; background: #247b9c linear-gradient(to top, #158bb0, #20b3d0); border-radius: 3px 3px 0 0; min-width: 2px; }
.report-bar-wrap small { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding-top: 7px; font-size: 8px; color: #526582; font-variant-numeric: tabular-nums; }
.report-bar-wrap:nth-child(even):not(:last-child) small { visibility: hidden; }
.report-chart-data { margin-top: 10px; font-size: 11px; color: var(--text-2); }
.report-chart-data summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.report-chart-data .report-scroll { max-height: 250px; margin-top: 8px; }
.report-screen .note { font-size: 11px; color: var(--text-3); line-height: 1.6; }
.report-scroll { overflow: auto; }
.report-screen table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.report-screen th, .report-screen td { padding: 9px 8px; text-align: left; border-bottom: 1px solid #e7edf7; vertical-align: top; }
.report-screen thead { background: #f3f6fc; }
.report-screen th { font-weight: 600; }
.report-screen th small { display: block; color: var(--text-3); font-weight: normal; margin-top: 5px; }
.report-screen td:not(:first-child) { white-space: nowrap; }
.report-screen .report-change-cell { color: var(--text-2); font-size: 10px; }
.report-table-panel { padding: 18px 15px; }
.report-table-panel table { min-width: 480px; }
.report-table-panel h2 { padding: 0 4px; }
.report-table-panel td:first-child { overflow-wrap: anywhere; }
.report-works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.report-work { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(145deg, white, #f7faff); box-shadow: var(--shadow); min-width: 0; }
.report-work-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.report-work-state { font-size: 10px; padding: 3px 7px; border-radius: 12px; background: #edf3fc; color: #42618a; }
.report-work h3 { font-size: 13px; font-weight: 700; }
.report-work p { font-size: 12px; line-height: 1.65; color: #445470; margin: 8px 0 12px; }
.report-work-links { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; font-size: 11px; }
.report-work-links a { display: inline-flex; gap: 3px; align-items: center; }
.report-work-links .icon { width: 12px; height: 12px; }
.report-notes, .report-next { padding-left: 18px; margin: 0; font-size: 12px; line-height: 1.7; }
.report-notes li, .report-next li { padding-left: 2px; margin-bottom: 9px; }
.report-notes li::marker, .report-next li::marker { color: var(--accent); }
.report-bottom { display: flex; align-items: center; gap: 16px; padding: 20px; background: linear-gradient(100deg, #e5eeff, #dae7ff); border-radius: 14px; }
.report-bottom .report-icon-tile { margin: 0; flex: 0 0 auto; background: none; }
.report-bottom strong { font-size: 16px; }
.report-bottom p { margin: 4px 0 0; font-size: 12px; color: #364e74; }
.report-bottom > a { margin-left: auto; white-space: nowrap; font-size: 12px; }
.report-bottom > a .icon { width: 15px; height: 15px; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); background: linear-gradient(to right, #142440 200px, transparent 200px); }
  .side { padding: 22px 10px; }
  .nav a { font-size: 12px; gap: 8px; }
  .main { padding: 24px; }
  .workspace-bar { padding: 14px 24px; }
  .report-kpis { gap: 9px; }
  .report-kpi { padding: 12px; }
  .report-illustration { width: 150px; }
  .report-chart-panel .report-panel-head { flex-wrap: wrap; }
  .report-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-columns { grid-template-columns: minmax(0, 1fr); }
  .report-illustration { display: none; }
  .user-name .chip { display: none; }
  .breadcrumbs { gap: 7px; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: static; height: auto; padding: 12px 16px; gap: 12px; overflow: visible; border: 0; }
  .brand-symbol { width: 29px; height: 29px; }
  .brand-name { font-size: 15px; }
  .project-switch, .side-foot { display: none; }
  .nav { gap: 6px; padding-bottom: 3px; }
  .nav a { padding: 8px 10px; min-height: 40px; }
  .workspace-bar { padding: 12px 16px; gap: 12px; flex-wrap: wrap; min-height: 60px; }
  .user-box { margin-left: auto; }
  .main { padding: 20px 16px 30px; }
  h1 { font-size: 25px; }
  .top-meta { text-align: left; }
  .report-panel { padding: 17px; }
  .report-illustration { display: block; }
}
@media (max-width: 540px) {
  .breadcrumbs { font-size: 10px; gap: 6px; }
  .workspace-bar { align-items: flex-start; gap: 10px; }
  .user-box { width: 100%; font-size: 11px; }
  .user-avatar { width: 27px; height: 27px; }
  .user-box form { margin-left: auto; }
  .user-name .chip { display: inline; }
  .top { gap: 14px; }
  .top-sub { font-size: 12px; }
  .report-download { padding: 9px 12px; font-size: 12px; }
  .report-tabs { width: 100%; gap: 2px; }
  .report-tabs a { font-size: 11px; padding: 9px; }
  .report-screen { gap: 16px; }
  .report-periods { gap: 8px; }
  .period-chip { padding: 9px 10px; font-size: 11px; width: 100%; }
  .report-version { margin-left: 0; }
  .report-data-note { margin: -5px 0 0; }
  .report-warning { align-items: flex-start; }
  .report-illustration { display: none; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpi:last-child { grid-column: 1 / -1; }
  .report-kpi h3 { min-height: auto; }
  .report-kpi strong { font-size: 25px; }
  .report-panel h2 { font-size: 15px; gap: 8px; }
  .report-panel-head { flex-wrap: wrap; }
  .report-chart { gap: 3px; }
  .report-works-grid { grid-template-columns: minmax(0, 1fr); }
  .report-bottom { flex-wrap: wrap; gap: 8px; }
  .report-bottom > div { flex: 1; }
  .report-bottom > a { margin: 6px 0 0 42px; }
}

/* Положительная динамика: позиция и отказы улучшаются при снижении. */
.report-screen .report-change-positive { color: #147d42; font-weight: 650; }
.report-screen .report-metric-unavailable { color: var(--text-3); font-size: 18px; }
@media (max-width: 640px) {
  .report-business-kpis .report-kpi:last-child { grid-column: auto; }
}
