﻿/* Кубышка пользы — тёплый дружелюбный UI по макету банок */

:root {
  --accent: #C4A574;
  --accent-hover: #B8956A;
  --accent-gradient: linear-gradient(135deg, #E0C49A, #C4A574);
  --ink: #4A3F35;
  --muted: #8B7E72;
  --bg: #F6F1EA;
  --surface: #FFFDF9;
  --border: #E8DFD2;
  --lid: #F0C94A;
  --radius: 18px;
  --font: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  --sun:
    radial-gradient(ellipse at 50% 36%, rgba(240, 201, 74, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse at 18% 78%, rgba(168, 198, 134, 0.16) 0%, transparent 42%),
    radial-gradient(ellipse at 82% 72%, rgba(123, 163, 201, 0.14) 0%, transparent 40%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

.app-root {
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--sun);
  background-attachment: fixed;
}

.app-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px 0;
  width: 100%;
  box-sizing: border-box;
}

.app-header-top {
  display: flex;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
}

.app-header-sub {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.app-header-sub-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 12px 16px;
  width: 100%;
  min-width: 0;
}

.period-filter-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  /* выравниваем чипы с полем «Проект» / user-chip */
  min-height: 38px;
}

.period-filter-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
  max-width: 52rem;
}

.header-filter-project {
  flex: 0 1 240px;
  min-width: 180px;
  max-width: 280px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-filter-user {
  flex: 0 0 auto;
  margin-left: 0;
}

/* нет «Проект» (denied / узкий экран) — пользователь у правого края */
.app-header-sub-row > .period-filter-meta + .header-filter-user {
  margin-left: auto;
}

.app-header-brand {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(360px, 100%);
}

.app-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #3D6FA3;
  letter-spacing: -0.02em;
}

.app-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  flex: 1 1 420px;
  max-width: 100%;
  margin-left: auto;
  justify-content: flex-end;
}

.period-dd { min-width: 150px; }
.period-dd-multi { min-width: 180px; max-width: 260px; }

/* дети (год / месяцы / режим) участвуют в flex шапки — одна линия контролов */
.period-filter-bar {
  display: contents;
}
.header-filter-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.period-filter-year {
  min-width: 88px;
  max-width: 100px;
}
.period-filter-months {
  min-width: 160px;
  flex: 1 1 180px;
  max-width: 260px;
}
.header-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  white-space: nowrap;
}
.period-year-dd {
  min-width: 88px;
}
.period-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  min-height: 1.2em;
}
.period-filter-label.is-spacer {
  visibility: hidden;
  user-select: none;
}
.period-agg-chip,
.period-write-chip,
.period-year-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 8px;
  background: #E8F0F7;
  color: #1B4F8A;
  white-space: nowrap;
}
.period-year-chip {
  background: #F3EEE4;
  color: #6B5535;
  border: 1px solid #D9CDB8;
}
.period-agg-chip.is-single {
  background: #F0EEE8;
  color: #6B6560;
}
.period-write-chip {
  background: #E8F3E6;
  color: #3F7A4A;
  border: 1px solid #B7D4B0;
}
.period-chip-k {
  font-weight: 500;
  opacity: 0.85;
}
.period-filter-months.is-multi .period-dd-multi,
.period-filter-bar.is-multi .period-dd-multi {
  border-color: #2B6CB0;
}

/* одинаковая высота контролов Select в шапке */
.header-meta .Select-control,
.header-meta .Select__control {
  min-height: 38px;
}
.header-user-actions .user-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}
.benefit-mode-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 10px;
  background: #F7F5F0;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.benefit-mode-radio .form-check {
  margin: 0;
}
.benefit-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.benefit-step {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F3F0E9;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: #4A3F35;
}
.benefit-outcome {
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 650;
  color: #3D6FA3;
}
.benefit-submit-meta { line-height: 1.35; }
.first-day-banner {
  background: linear-gradient(160deg, #F7FBFF, #EEF4FA);
  border: 1px solid #C5D8EB;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: inset 4px 0 0 #3D6FA3;
}
.first-day-banner strong {
  display: block;
  font-size: 1.05rem;
  color: #2C4A6E;
  margin-bottom: 4px;
}
.first-day-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.benefit-okr-chain {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #FBF9F5 0%, #F3F0E9 100%);
}
.benefit-okr-chain.is-empty {
  background: #F7F5F0;
}
.benefit-okr-chain.is-warn {
  border-color: #D4A59A;
  background: #FBF6F4;
}
.benefit-chain-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.benefit-chain-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.benefit-chain-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px 8px;
}
.benefit-chain-step {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}
.benefit-chain-step.is-company {
  border-color: #3D6FA3;
  box-shadow: inset 3px 0 0 #3D6FA3;
}
.benefit-chain-step.is-dept {
  border-color: #8A7A5C;
  box-shadow: inset 3px 0 0 #8A7A5C;
}
.benefit-chain-step.is-missing {
  border-color: #C45C5C;
  box-shadow: inset 3px 0 0 #C45C5C;
}
.benefit-chain-kicker {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.benefit-chain-title {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  color: #2C3E50;
}
.benefit-chain-desc {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}
.benefit-chain-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 0 2px;
}
.benefit-chain-warn {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #9B3B2F;
}
@media (max-width: 640px) {
  .benefit-chain-arrow {
    display: none;
  }
}
.verify-comment {
  font-size: 0.85rem;
  min-height: 56px;
}
.hist-reject {
  font-size: 0.78rem;
  color: #9B3B2F;
  margin-top: 2px;
}
.person-mini {
  min-width: 88px;
}
.person-mini .dept-name {
  font-size: 0.78rem;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.period-hist-row.is-selected {
  border-color: #2B6CB0;
  background: #F3F7FB;
}
.period-hist-row.is-aggregate {
  border-style: dashed;
  background: #F7F5F0;
  font-weight: 700;
}

.user-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.logout-link {
  color: var(--accent-hover);
  font-weight: 600;
  text-decoration: none;
}
.logout-link:hover { text-decoration: underline; }

.dept-nav-wrap {
  display: none; /* отдел перенесён в шапку (.header-filter-dept) */
}

.dept-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 520px;
}

.dept-nav-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 600;
}

.header-filter-dept {
  min-width: 200px;
  flex: 1 1 220px;
  max-width: 280px;
  order: -1; /* первым в ряду фильтров */
}
.header-filter-dept .dept-nav-dd {
  min-width: 180px;
  width: 100%;
}
.dept-nav-dd {
  flex: 1;
  min-width: 180px;
}

/* Выпадающие списки: однострочные пункты, без наложения длинных названий */
.Select-menu-outer,
.Select__menu {
  z-index: 40 !important;
}
.Select-option,
.Select__option,
.VirtualizedSelectOption {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.35 !important;
  padding: 8px 12px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  box-sizing: border-box !important;
}
.Select-value-label,
.Select__single-value,
.Select__placeholder,
.Select__multi-value__label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100%;
}
.benefit-okr-dd .Select-menu-outer,
.benefit-okr-dd .Select__menu {
  max-height: 320px;
  min-width: min(100%, 420px);
}
.benefit-okr-dd .Select__option,
.benefit-okr-dd .Select-option {
  border-bottom: 1px solid var(--border);
}

.nav-pill {
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.15s ease;
}
.nav-pill:hover, .nav-pill.is-active {
  color: #3D6FA3;
  border-color: #B7CDE4;
  background: #fff;
  box-shadow: 0 4px 14px rgba(61, 111, 163, 0.08);
}

.app-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 48px;
}

.main-tabs .nav-link {
  color: var(--muted) !important;
  font-weight: 600;
  border: none !important;
  border-radius: 999px !important;
  margin-right: 6px;
  padding: 8px 16px !important;
}
.main-tabs .nav-link.active {
  background: var(--accent-gradient) !important;
  color: #fff !important;
}
.main-tabs .tab-content {
  border: none;
  padding-top: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 250px;
  gap: 22px;
  align-items: start;
}
.dashboard-grid:has(.col-depts-wide) {
  grid-template-columns: minmax(320px, 420px) minmax(240px, 1fr) minmax(220px, 260px);
}
.dashboard-grid:has(.col-depts-with-game) {
  grid-template-columns: minmax(480px, 1.15fr) minmax(200px, 0.85fr) minmax(220px, 260px);
}
.col-depts-with-game {
  /* display задаём ниже, после .col-depts — иначе flex column побеждает */
  gap: 10px;
}
.col-depts.col-depts-with-game {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.depts-game-row {
  display: grid;
  grid-template-columns: minmax(96px, 130px) minmax(280px, 1fr);
  gap: 14px 16px;
  align-items: start;
  width: 100%;
}
.col-people {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.col-game {
  min-width: 0;
  width: 100%;
}
.dept-dynamics-wide {
  width: 100%;
  margin-top: 8px;
  min-width: 0;
}
.dept-dynamics-wide .progress-layer-section {
  margin-top: 0;
}
.dept-dynamics-wide .progress-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 10px 0 4px;
  width: 100%;
}
.dept-dynamics-wide .progress-card {
  min-width: 0;
  width: 100%;
}
.dept-dynamics-wide .progress-card .side-label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.dept-dynamics-wide .progress-chart,
.dept-dynamics-wide .js-plotly-plot,
.dept-dynamics-wide .plotly {
  width: 100% !important;
  max-width: 100%;
}
@media (max-width: 900px) {
  .dept-dynamics-wide .progress-grid {
    grid-template-columns: 1fr;
  }
}
.col-game .game-panel.is-compact {
  padding: 10px 12px 12px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.col-game .game-panel.is-compact .form-title {
  font-size: 1.05rem;
  margin-bottom: 8px;
  text-align: left;
}
.col-game .game-panel.is-compact .game-top {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.col-game .game-panel.is-compact .game-stats-row {
  grid-template-columns: 1fr 1fr;
}
.col-game .game-panel.is-compact .ach-grid.is-compact {
  grid-template-columns: 1fr;
  gap: 6px;
}
.col-game .game-panel.is-compact .ach-card {
  padding: 8px 10px;
}
.col-game .game-more-ach {
  font-size: 0.78rem;
  margin-top: 6px;
}
.col-depts-with-game > .side-label,
.col-depts-with-game > .benefit-source-legend {
  text-align: left;
  margin-bottom: 6px;
}
.col-depts-with-game > .side-label:first-child {
  margin-bottom: 8px;
}
.col-depts-with-game > .benefit-source-legend {
  justify-content: flex-start;
}
.dashboard-grid.is-company {
  grid-template-columns: minmax(180px, 240px) minmax(220px, 0.85fr) minmax(280px, 1.15fr);
  align-items: start;
  gap: 16px;
}
.company-top-split {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 320px);
  gap: 20px;
  align-items: start;
}
.company-bottom-split {
  margin-top: 8px;
}
.period-hist-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  min-width: 0;
}
.period-hist.is-compact {
  gap: 6px;
}
.period-hist.is-compact .period-hist-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
}
.period-hist.is-compact .hist-period {
  font-weight: 700;
  color: #3D6FA3;
}
.period-hist.is-compact .hist-total {
  font-weight: 700;
  color: #5A9A6A;
}
.company-jars-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 16px;
  align-items: start;
}
.company-split-grid {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 4px;
}
.col-cascade-main {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 18px;
}
.overview-subtabs-top {
  margin-top: 0;
  margin-bottom: 8px;
}
.overview-pane.is-company-overview .overview-tab-body {
  padding-top: 10px;
}
.col-dynamics {
  min-width: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.progress-layer-section.is-embed {
  margin-top: 0;
  overflow: visible;
}
.progress-layer-section.is-embed .progress-grid {
  /* отдел | ваш вклад — рядом; один график просто занимает колонку */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0;
}
.progress-layer-section.is-embed .progress-grid > .progress-card:only-child {
  grid-column: 1 / -1;
}
@media (max-width: 1100px) {
  .progress-layer-section.is-embed .progress-grid {
    grid-template-columns: 1fr;
  }
}
.progress-layer-section.is-embed .progress-card {
  padding: 8px 10px 4px;
}
.progress-layer-section.is-embed .progress-card .side-label {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-layer-section.is-embed .form-hint,
.progress-card.is-compact .form-hint {
  display: none;
}
.progress-layer-section.is-embed .js-plotly-plot,
.progress-layer-section.is-embed .plotly {
  max-width: 100%;
}
.dept-sparks-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.dept-sparks-compact .dept-spark-card {
  padding: 6px 8px 2px;
}
.dept-sparks-compact .spark-label {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dept-sparks-compact .pace-row {
  margin-bottom: 2px;
}
.dept-sparks-compact .progress-graph.is-spark .js-plotly-plot,
.dept-sparks-compact .progress-graph.is-spark .plotly {
  max-height: 72px;
}
.overview-subnav-label {
  text-align: left;
  margin-bottom: 10px;
}
.overview-tab-body {
  padding-top: 14px;
}
.overview-subtabs {
  margin-bottom: 8px;
}

.col-depts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #3D6FA3;
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.3;
  text-align: center;
}

.dept-card {
  background: transparent;
  text-align: center;
  padding: 4px 0 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}
.dept-card:hover { transform: translateY(-2px); }

.dept-link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 12px;
  box-shadow: 0 8px 24px rgba(120, 95, 70, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.dept-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(120, 95, 70, 0.1);
  border-color: #D9CDBE;
}

.dept-name {
  font-weight: 700;
  color: #3D6FA3;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.dept-progress {
  margin-top: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.mini-bar {
  height: 8px;
  background: #EEE6DB;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.mini-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 999px;
}

.col-hero {
  text-align: center;
  /* без верхнего padding — «Кубышка пользы» на одной линии с боковыми side-label */
  padding: 0 10px 18px;
}

.hero-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #3D6FA3;
  margin: 0 0 8px;
  line-height: 1.3;
  text-align: center;
}

/* три заголовка обзора: одинаковый старт по вертикали */
.dashboard-grid > .col-depts > .side-label:first-child,
.dashboard-grid > .col-hero > .hero-label:first-child,
.dashboard-grid > .col-hero > .side-label:first-child,
.dashboard-grid > .col-person .person-block > .side-label:first-child {
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.3;
  min-height: 1.3em;
}

.col-depts-with-game > .side-label:first-child {
  margin-bottom: 8px;
}

.hero-meta { margin-top: 6px; }
.hero-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-period { color: var(--muted); font-size: 0.92rem; }

.hero-status-bar {
  margin: 18px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(120, 95, 70, 0.06);
}

.title-pill {
  background: linear-gradient(135deg, #F0C94A, #E8A87C);
  color: #4A3500;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 999px;
}

.col-person {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.person-block, .hist-block, .badge-wrap {
  text-align: center;
}

.hist-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.hist-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hist-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}
.hist-more-btn {
  font-weight: 700 !important;
  color: #3D6FA3 !important;
  text-decoration: none !important;
  padding: 4px 8px !important;
}
.hist-more-btn:hover {
  color: #2A5280 !important;
  text-decoration: underline !important;
}
.hist-more-meta {
  font-size: 0.78rem;
}
.hist-full-panel .hist-list {
  max-height: none;
}

.hist-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: start;
}

.hist-delta {
  font-weight: 800;
  color: #5A9A6A;
  font-variant-numeric: tabular-nums;
}

.hist-text { font-size: 0.9rem; line-height: 1.3; }
.hist-when { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.hist-item.is-gift .hist-delta { color: #3D6FA3; }
.hist-item.is-gift-out .hist-delta,
.hist-delta.is-out { color: #A85A3A; }
.share-benefit-form { margin-top: 8px; }

.badge-block { padding: 8px 0; }
.badge-star {
  width: 68px;
  height: 68px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  color: #7a5a00;
  background: radial-gradient(circle at 35% 30%, #fff1b0, #F0C94A 55%, #d4a017);
  box-shadow: 0 6px 18px rgba(240, 201, 74, 0.4);
}
.badge-name {
  font-weight: 800;
  color: #3D6FA3;
  font-size: 1.05rem;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255,253,249,0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.legend-swatch.is-contribution {
  background: #5A9A6A;
}
.legend-swatch.is-execution {
  background: #3D6FA3;
}
.benefit-source-legend {
  justify-content: center;
  margin: -4px 0 8px;
  gap: 8px;
}
.benefit-source-legend .legend-chip {
  font-size: 0.78rem;
}

/* jars */
.jar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: default;
}
.jar-visual {
  position: relative;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(80, 100, 130, 0.12));
  transform-origin: 50% 88%;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    filter 0.35s ease;
}

/* hover + авто-цикл (.is-alive) + hover родителя */
.jar-wrap:hover .jar-visual,
.jar-wrap.is-alive .jar-visual,
.col-hero:hover .jar-visual,
.dept-card:hover .jar-visual,
.dept-link-card:hover .jar-visual,
.project-jar-col:hover .jar-visual {
  transform: translateY(-8px) scale(1.04) rotate(-1.2deg);
  filter: drop-shadow(0 18px 28px rgba(80, 100, 130, 0.22));
}
.jar-wrap:hover .jar-visual.jar-lg,
.jar-wrap.is-alive .jar-visual.jar-lg,
.col-hero:hover .jar-visual.jar-lg {
  transform: translateY(-10px) scale(1.05) rotate(-1.5deg);
}

.jar-lid {
  position: absolute; left: 28%; right: 28%; top: 4%; height: 9%;
  background: linear-gradient(180deg, #ffe56a, var(--lid) 55%, #d4a017);
  border-radius: 6px 6px 3px 3px; z-index: 3;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform-origin: 50% 100%;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.35s ease;
}
.jar-lid::before {
  content: "; position: absolute; left: 12%; right: 12%; top: -35%; height: 45%;
  background: linear-gradient(180deg, #fff1a8, var(--lid)); border-radius: 4px 4px 0 0;
}
.jar-wrap:hover .jar-lid,
.jar-wrap.is-alive .jar-lid,
.col-hero:hover .jar-lid,
.dept-card:hover .jar-lid,
.dept-link-card:hover .jar-lid,
.project-jar-col:hover .jar-lid {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.08);
}

.jar-body {
  position: absolute; left: 16%; right: 16%; top: 14%; bottom: 6%;
  border: 2.5px solid rgba(90, 130, 170, 0.28);
  border-radius: 12% 12% 20% 20% / 7% 7% 24% 24%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(230, 240, 248, 0.12));
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(255,255,255,0.4);
  transition: border-color 0.3s ease, box-shadow 0.35s ease;
}
.jar-wrap:hover .jar-body,
.jar-wrap.is-alive .jar-body,
.col-hero:hover .jar-body,
.dept-card:hover .jar-body,
.dept-link-card:hover .jar-body,
.project-jar-col:hover .jar-body {
  border-color: rgba(90, 130, 170, 0.45);
  box-shadow:
    inset 0 0 22px rgba(255,255,255,0.55),
    inset 0 -12px 24px rgba(196, 165, 116, 0.08);
}

.jar-liquid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.jar-layer {
  opacity: 0.92;
  pointer-events: auto;
  cursor: help;
  z-index: 3;
  transition:
    filter 0.35s ease,
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.35s ease;
  transform-origin: 50% 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.jar-layer-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: 120px;
  max-width: 220px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(74, 63, 53, 0.94);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: center;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.jar-layer-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: rgba(74, 63, 53, 0.94);
}
.jar-layer:hover {
  opacity: 1 !important;
  filter: saturate(1.25) brightness(1.08);
  z-index: 6;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 0 0 2px rgba(255,255,255,0.35);
}
.jar-layer:hover .jar-layer-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.jar-wrap:hover .jar-layer,
.jar-wrap.is-alive .jar-layer,
.col-hero:hover .jar-layer,
.dept-card:hover .jar-layer,
.dept-link-card:hover .jar-layer,
.project-jar-col:hover .jar-layer,
.focus-jar-col:hover .jar-layer {
  opacity: 1;
  filter: saturate(1.18) brightness(1.06);
  transform: scaleY(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 -2px 8px rgba(255,255,255,0.15);
}
.jar-wrap:hover .jar-layer-0,
.jar-wrap.is-alive .jar-layer-0 { transition-delay: 0.02s; }
.jar-wrap:hover .jar-layer-1,
.jar-wrap.is-alive .jar-layer-1 { transition-delay: 0.05s; }
.jar-wrap:hover .jar-layer-2,
.jar-wrap.is-alive .jar-layer-2 { transition-delay: 0.08s; }
.jar-wrap:hover .jar-layer-3,
.jar-wrap.is-alive .jar-layer-3 { transition-delay: 0.11s; }
.jar-wrap:hover .jar-layer-4,
.jar-wrap.is-alive .jar-layer-4 { transition-delay: 0.14s; }
.jar-wrap:hover .jar-layer-5,
.jar-wrap.is-alive .jar-layer-5 { transition-delay: 0.17s; }

.jar-surface {
  position: absolute;
  height: 10px;
  margin-top: -5px;
  z-index: 2;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.55) 0%,
    rgba(255,255,255,0.15) 45%,
    transparent 100%
  );
  opacity: 0.75;
  transform: scaleX(1);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.jar-wrap:hover .jar-surface,
.jar-wrap.is-alive .jar-surface,
.col-hero:hover .jar-surface,
.dept-card:hover .jar-surface,
.dept-link-card:hover .jar-surface,
.project-jar-col:hover .jar-surface {
  opacity: 1;
  animation: jar-wave 1.1s ease-in-out infinite;
}

@keyframes jar-wave {
  0%, 100% { transform: scaleX(1) translateY(0); border-radius: 50%; }
  50% { transform: scaleX(1.04) translateY(1px); border-radius: 48% 52% 50% 50%; }
}

.jar-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.25) 55%, transparent 70%);
  opacity: 0;
  transform: translateY(0) scale(0.6);
  pointer-events: none;
  z-index: 3;
}
.jar-wrap:hover .jar-bubble,
.jar-wrap.is-alive .jar-bubble,
.col-hero:hover .jar-bubble,
.dept-card:hover .jar-bubble,
.dept-link-card:hover .jar-bubble,
.project-jar-col:hover .jar-bubble {
  animation: jar-bubble-rise 1.6s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes jar-bubble-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  18% { opacity: 0.85; }
  70% { opacity: 0.55; }
  100% {
    opacity: 0;
    transform: translateY(calc(-1 * var(--rise, 28%))) scale(1.05);
  }
}

.jar-shine {
  position: absolute; left: 12%; top: 8%; bottom: 12%; width: 12%;
  background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
  border-radius: 20px; pointer-events: none; z-index: 4;
  transition: opacity 0.3s ease, width 0.35s ease;
}
.jar-shine-sweep {
  left: -30%;
  width: 28%;
  opacity: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.15) 40%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.15) 60%,
    transparent 100%
  );
}
.jar-wrap:hover .jar-shine,
.jar-wrap.is-alive .jar-shine,
.col-hero:hover .jar-shine,
.dept-card:hover .jar-shine,
.dept-link-card:hover .jar-shine,
.project-jar-col:hover .jar-shine {
  opacity: 0.85;
  width: 14%;
}
.jar-wrap:hover .jar-shine-sweep,
.jar-wrap.is-alive .jar-shine-sweep,
.col-hero:hover .jar-shine-sweep,
.dept-card:hover .jar-shine-sweep,
.dept-link-card:hover .jar-shine-sweep,
.project-jar-col:hover .jar-shine-sweep {
  opacity: 1;
  animation: jar-shine-pass 1.15s ease-out 1;
}

@keyframes jar-shine-pass {
  0% { left: -35%; opacity: 0; }
  20% { opacity: 0.9; }
  100% { left: 110%; opacity: 0; }
}

.jar-glass-rim {
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
  pointer-events: none; z-index: 4;
  transition: box-shadow 0.35s ease;
}
.jar-wrap:hover .jar-glass-rim,
.jar-wrap.is-alive .jar-glass-rim,
.col-hero:hover .jar-glass-rim,
.dept-card:hover .jar-glass-rim,
.dept-link-card:hover .jar-glass-rim,
.project-jar-col:hover .jar-glass-rim {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.5),
    inset 0 -8px 16px rgba(240, 201, 74, 0.08);
}

.jar-pct {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.25s ease, transform 0.25s ease;
}
.jar-wrap:hover .jar-pct,
.jar-wrap.is-alive .jar-pct {
  color: var(--ink);
  transform: translateY(-1px);
}

.jar-visual.is-full .jar-lid {
  filter: drop-shadow(0 0 4px rgba(240, 201, 74, 0.35));
}

/* салют на выполненных целях / метриках / OKR */
.fw-host {
  position: relative;
  overflow: visible;
}
.fw-host.is-done {
  cursor: pointer;
}
.done-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #E8F3E6;
  color: #3F7A4A;
  white-space: nowrap;
}
.okr-ms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}
.okr-ms-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #F7F3EC;
  color: #6B6B6B;
}
.okr-ms-chip.is-awarded {
  background: #E8F3E6;
  color: #3F7A4A;
  border-color: #C5DFC0;
}
.okr-ms-chip.is-ready {
  background: #EAF1F8;
  color: #3D6FA3;
  border-color: #C5D6EA;
}
.okr-ms-chip.is-locked {
  opacity: 0.75;
}
.fw-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  top: 50%;
  left: 50%;
  z-index: 5;
}
.fw-spark-0 { background: #F0C94A; }
.fw-spark-1 { background: #7BA3C9; }
.fw-spark-2 { background: #A8C686; }
.fw-spark-3 { background: #E8A87C; }
.fw-spark-4 { background: #E6C07B; }
.fw-spark-5 { background: #8BB8B0; }
.fw-spark-6 { background: #D4A5A5; }
.fw-spark-7 { background: #fff; box-shadow: 0 0 4px #F0C94A; }

.fw-host.is-done:hover .fw-spark-0 { --dx: -28px; --dy: -36px; animation-delay: 0s; }
.fw-host.is-done:hover .fw-spark-1 { --dx: 22px; --dy: -40px; animation-delay: 0.04s; }
.fw-host.is-done:hover .fw-spark-2 { --dx: -36px; --dy: -8px; animation-delay: 0.08s; }
.fw-host.is-done:hover .fw-spark-3 { --dx: 34px; --dy: -12px; animation-delay: 0.05s; }
.fw-host.is-done:hover .fw-spark-4 { --dx: -12px; --dy: -48px; animation-delay: 0.1s; }
.fw-host.is-done:hover .fw-spark-5 { --dx: 8px; --dy: -44px; animation-delay: 0.06s; }
.fw-host.is-done:hover .fw-spark-6 { --dx: -40px; --dy: -24px; animation-delay: 0.12s; }
.fw-host.is-done:hover .fw-spark-7 { --dx: 40px; --dy: -28px; animation-delay: 0.02s; }

.fw-host.is-done:hover .fw-spark {
  animation: fw-burst 0.85s ease-out 1;
}
.badge-block.is-done:hover {
  animation: none;
}
.col-hero:hover .jar-visual.is-done .fw-spark,
.jar-wrap:hover .jar-visual.is-done .fw-spark,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark,
.dept-card:hover .jar-visual.is-done .fw-spark {
  animation: fw-burst 0.9s ease-out 1;
}
.col-hero:hover .jar-visual.is-done .fw-spark-0,
.jar-wrap:hover .jar-visual.is-done .fw-spark-0,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-0 { --dx: -28px; --dy: -36px; }
.col-hero:hover .jar-visual.is-done .fw-spark-1,
.jar-wrap:hover .jar-visual.is-done .fw-spark-1,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-1 { --dx: 22px; --dy: -40px; }
.col-hero:hover .jar-visual.is-done .fw-spark-2,
.jar-wrap:hover .jar-visual.is-done .fw-spark-2,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-2 { --dx: -36px; --dy: -8px; }
.col-hero:hover .jar-visual.is-done .fw-spark-3,
.jar-wrap:hover .jar-visual.is-done .fw-spark-3,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-3 { --dx: 34px; --dy: -12px; }
.col-hero:hover .jar-visual.is-done .fw-spark-4,
.jar-wrap:hover .jar-visual.is-done .fw-spark-4,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-4 { --dx: -12px; --dy: -48px; }
.col-hero:hover .jar-visual.is-done .fw-spark-5,
.jar-wrap:hover .jar-visual.is-done .fw-spark-5,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-5 { --dx: 8px; --dy: -44px; }
.col-hero:hover .jar-visual.is-done .fw-spark-6,
.jar-wrap:hover .jar-visual.is-done .fw-spark-6,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-6 { --dx: -40px; --dy: -24px; }
.col-hero:hover .jar-visual.is-done .fw-spark-7,
.jar-wrap:hover .jar-visual.is-done .fw-spark-7,
.jar-wrap.is-alive .jar-visual.is-done .fw-spark-7 { --dx: 40px; --dy: -28px; }

@keyframes fw-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -30px))) scale(0.2);
  }
}

.soft-goal.is-done,
.soft-metric.is-done,
.metric-edit-row.is-done {
  border-color: #C5D9B8;
  background: linear-gradient(180deg, #FBFFF8 0%, #FFFDF9 100%);
}
.soft-goal.is-done:hover,
.cascade-goal-chip.is-done:hover,
.metric-edit-row.is-done:hover {
  box-shadow: 0 8px 22px rgba(100, 140, 80, 0.12);
}
.cascade-goal-chip {
  position: relative;
  overflow: visible;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cascade-goal-chip.is-done:hover {
  transform: translateY(-2px);
}
.chip-pct {
  margin-left: 6px;
  font-weight: 800;
  font-size: 0.8rem;
  color: #3D6FA3;
}
.soft-pct-sm { font-size: 0.85rem; }
.soft-metric-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.metric-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* геймификация */
.game-panel { max-width: none; margin-top: 0; }
.game-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.level-card {
  background: linear-gradient(135deg, #FFF8EE, #F3F7F4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.level-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.level-star { flex-shrink: 0; }
.level-star.is-spiral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}
.level-card.is-company-spiral {
  border-color: #D9CDB8;
}
.xp-fill.is-spiral-fill {
  opacity: 0.95;
}
.xp-bar {
  height: 10px;
  background: #EEE6DB;
  border-radius: 999px;
  overflow: hidden;
}
.xp-bar-sm { height: 8px; margin-top: 8px; width: 100%; }
.xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #A8C686, #E6C07B 55%, #F0C94A);
  transition: width 0.4s ease;
}
.game-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-self: start;
  align-content: start;
}
.game-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(120, 95, 70, 0.04);
}
.game-stat-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.game-stat-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.game-stat-value {
  font-size: 1.15rem;
  color: #3D6FA3;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.game-stat-copy .term-hot {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom-color: rgba(139, 126, 114, 0.45);
}
.game-stat-copy .term-hot:hover {
  color: #3D6FA3;
  border-bottom-color: rgba(61, 111, 163, 0.55);
}
.game-stat-ring {
  --stat-pct: 0;
  --ring-color: #C4A574;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--ring-color) calc(var(--stat-pct) * 1%),
    #EEE6DB 0
  );
  box-shadow: inset 0 0 0 1px rgba(232, 223, 210, 0.9);
}
.game-stat-ring.is-low { --ring-color: #B85C5C; }
.game-stat-ring.is-mid { --ring-color: #C4A574; }
.game-stat-ring.is-high { --ring-color: #5A8C5A; }
.game-stat-ring-hole {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.game-stat-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-stat-bar {
  height: 6px;
  border-radius: 999px;
  background: #EEE6DB;
  overflow: hidden;
}
.game-stat-fill {
  height: 100%;
  border-radius: 999px;
  background: #C4A574;
  transition: width 0.35s ease;
}
.game-stat-fill.is-low { background: #B85C5C; }
.game-stat-fill.is-mid { background: #C4A574; }
.game-stat-fill.is-high { background: #5A8C5A; }
.game-stat-foot {
  font-size: 0.72rem;
  line-height: 1.2;
}
.game-stat strong { font-size: 1.15rem; color: #3D6FA3; }
.game-panel.is-company .game-stats-row {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}
.game-dept-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}
.game-dept-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.game-dept-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.game-dept-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F3EDE3;
  color: #3D6FA3;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.game-dept-level {
  margin-left: auto;
  font-size: 0.85rem;
}
.game-dept-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.game-dept-chip {
  font-size: 0.8rem;
  color: #6B6B6B;
  background: #F7F3EC;
  border-radius: 8px;
  padding: 3px 8px;
}
.game-dept-chip.is-pct {
  color: #5A9A6A;
  font-weight: 700;
  background: #EEF5EE;
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ach-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 72px;
}
.ach-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(120, 95, 70, 0.08);
}
.ach-ico {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  line-height: 1;
  border-radius: 14px;
  background: linear-gradient(160deg, #FFF8EE, #F0E8DC);
  border: 1px solid #E8DFD2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.ach-body { min-width: 0; }
.ach-body strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  margin-bottom: 2px;
}
.ach-body .muted {
  font-size: 0.78rem;
  line-height: 1.3;
}
.ach-card.is-okr1 .ach-ico,
.ach-card.is-okr3 .ach-ico,
.ach-card.is-okr5 .ach-ico { background: linear-gradient(160deg, #EEF4FB, #D9E7F5); border-color: #C5D8EB; }
.ach-card.is-metric1 .ach-ico { background: linear-gradient(160deg, #EEF7F2, #D5EADF); border-color: #BFD9C8; }
.ach-card.is-goal1 .ach-ico { background: linear-gradient(160deg, #FBF0E8, #F0D9C8); border-color: #E5C4AE; }
.ach-card.is-benefit3 .ach-ico,
.ach-card.is-benefit5 .ach-ico,
.ach-card.is-benefit8 .ach-ico,
.ach-card.is-benefit15 .ach-ico { background: linear-gradient(160deg, #F5F8EE, #E2EBCF); border-color: #CDD9B0; }
.ach-card.is-depts3 .ach-ico,
.ach-card.is-dept_full .ach-ico { background: linear-gradient(160deg, #F4F0F8, #E2D8EE); border-color: #CFC0E0; }
.ach-card.is-spiral_green .ach-ico { background: linear-gradient(160deg, #EEF6F0, #D4E8DA); border-color: #B7D4C0; }
.ach-card.is-spiral_yellow .ach-ico { background: linear-gradient(160deg, #FFF8E8, #F0E4C0); border-color: #E2D19A; }
.ach-card.is-company .ach-ico,
.ach-card.is-full .ach-ico { background: linear-gradient(160deg, #FFF4E8, #F5DFC4); border-color: #E8C9A0; }
.col-game .game-panel.is-compact .ach-ico {
  width: 44px;
  height: 44px;
  font-size: 1.55rem;
  border-radius: 12px;
}
.col-game .game-panel.is-compact .ach-card {
  min-height: 64px;
  padding: 10px 12px;
}

@media (max-width: 820px) {
  .game-top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .fw-spark { animation: none !important; opacity: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .jar-visual,
  .jar-lid,
  .jar-layer,
  .jar-bubble,
  .jar-surface,
  .jar-shine-sweep,
  .dept-card,
  .dept-link-card {
    transition: none !important;
    animation: none !important;
  }
  .jar-wrap:hover .jar-visual,
  .jar-wrap.is-alive .jar-visual,
  .col-hero:hover .jar-visual,
  .dept-card:hover .jar-visual,
  .dept-link-card:hover .jar-visual,
  .project-jar-col:hover .jar-visual {
    transform: none;
  }
  .jar-wrap.is-alive { /* no auto motion */ }
}

/* forms */
.friendly-form, .company-extra {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
  box-shadow: 0 10px 28px rgba(120, 95, 70, 0.05);
  max-width: 720px;
  margin: 0 auto;
}
.company-extra { margin-top: 22px; max-width: none; }
.company-extra:empty { display: none; padding: 0; border: 0; margin: 0; box-shadow: none; }
.form-title { margin: 0 0 6px; color: #3D6FA3; font-size: 1.25rem; }
.form-lead { margin: 0 0 16px; color: var(--muted); }
.form-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.warm-btn, .btn.warm-btn {
  background: var(--accent-gradient) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
}
.warm-btn-danger, .btn.warm-btn-danger {
  background: linear-gradient(135deg, #D9897A, #C45C5C) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  text-decoration: none !important;
}
.period-dd-multi {
  min-width: 220px;
  max-width: 360px;
}
.project-dd {
  min-width: 220px;
  max-width: 320px;
}
.project-dd .Select__menu,
.project-dd .Select-menu-outer {
  min-width: 360px;
  width: max(100%, 360px) !important;
}
.project-focus-dd {
  max-width: 480px;
}
.project-focus-dd .Select__menu,
.project-focus-dd .Select-menu-outer {
  min-width: min(100vw - 48px, 520px);
}
.form-msg { margin-top: 12px; color: #5A9A6A; font-weight: 600; min-height: 1.2em; }
.verify-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}
.verify-head { margin-bottom: 4px; }
.verify-text { margin: 0 0 10px; }
.metric-edit-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.metric-title { font-weight: 700; color: var(--ink); }
.soft-hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

.period-hist { display: flex; flex-direction: column; gap: 8px; }
.period-hist-row {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border);
}
.hist-period { font-weight: 700; }
.hist-total { font-weight: 800; color: #5A9A6A; }

.soft-tree { display: flex; flex-direction: column; gap: 12px; }
.soft-goal {
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: #fff;
}
.soft-goal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.soft-pct { margin-left: auto; font-weight: 800; color: #3D6FA3; }
.soft-metric { margin: 8px 0 0 18px; }
.soft-metric-title { font-weight: 600; font-size: 0.92rem; }
.soft-okr-list { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.88rem; }

.cascade-board { margin-top: 8px; }
.cascade-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.cascade-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.cascade-level { margin-bottom: 16px; }
.cascade-level-label {
  font-weight: 700;
  color: #3D6FA3;
  margin: 8px 0 10px;
  font-size: 0.95rem;
}
.cascade-goal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cascade-goal-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 12px; font-size: 0.9rem;
}
.cascade-depts { display: flex; flex-direction: column; gap: 10px; }
.cascade-dept {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
}
.cascade-dept-head {
  display: flex; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.cascade-dept-meta { color: var(--muted); font-size: 0.82rem; }
.cascade-people { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; }
.cascade-okr-list { margin: 0; padding-left: 18px; font-size: 0.9rem; }
.cascade-form-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.cascade-form-title { margin: 0 0 10px; font-size: 1.05rem; color: #3D6FA3; }
.form-hint { margin: -4px 0 8px; font-size: 0.82rem; color: var(--muted); }
.emp-list { margin: 8px 0 0; padding-left: 18px; font-size: 0.88rem; color: var(--muted); }
.emp-list-wrap { margin-top: 12px; }
.soft-hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

.action-toast {
  position: sticky; bottom: 0; z-index: 30;
  text-align: center; padding: 10px;
  background: rgba(255, 253, 249, 0.94);
  border-top: 1px solid var(--border);
  color: #5A9A6A; font-weight: 700;
  min-height: 0;
}
.action-toast:empty { display: none; padding: 0; border: 0; }

.denied-card {
  max-width: 480px; margin: 60px auto; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center;
}

.muted { color: var(--muted); }

.prio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.prio-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.prio-card.is-empty { opacity: 0.45; }
.prio-name { font-weight: 700; color: #3D6FA3; font-size: 0.9rem; }
.prio-amount { font-size: 1.35rem; font-weight: 800; color: #5A9A6A; margin: 4px 0; }
.prio-limit { font-size: 0.75rem; color: var(--muted); }
.benefit-amount-line {
  background: #F3F8F1;
  border: 1px solid #D7E8D4;
  border-radius: 12px;
  padding: 10px 14px;
}

.raci-list { display: flex; flex-direction: column; gap: 8px; }
.raci-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
}
.raci-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.raci-head-edit {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.raci-head-edit .raci-code {
  margin-top: 8px;
  flex-shrink: 0;
}
.raci-head-edit .form-control {
  flex: 1;
  min-width: 0;
}
.raci-code {
  font-weight: 800; color: #3D6FA3; min-width: 2.4rem;
}
.raci-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.raci-chip {
  background: #F6F1EA; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 8px; font-size: 0.78rem; color: var(--muted);
}
.raci-fix { margin-top: 6px; font-size: 0.8rem; color: #A85A3A; }


.raci-authority {
  margin-top: 8px;
  font-size: 0.88rem;
  color: #5a6a7a;
  line-height: 1.35;
}
.raci-card.is-edit { padding: 12px 14px; }
.raci-actions { display: flex; align-items: center; gap: 4px; }
.raci-add-card { margin-top: 12px; }
.raci-mission-edit { margin-bottom: 12px; }

.projects-grid { display: flex; flex-direction: column; gap: 14px; }
.project-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}
.project-jar-col { text-align: center; }
.dept-legend {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  justify-content: center; margin-top: 8px;
}
.dept-legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; color: var(--muted);
}
.dept-swatch {
  width: 10px; height: 10px; border-radius: 3px;
  display: inline-block; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}
.dept-swatch-lg { width: 16px; height: 16px; border-radius: 4px; }

.project-focus-panel { margin-bottom: 8px; }

/* —— Цепочка смысла проекта: цель → метрика → OKR → польза —— */
.project-meaning-chain {
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #FBF9F5 0%, #F0F4F8 55%, #EEF2F6 100%);
}
.project-meaning-chain.is-empty {
  background: #F7F5F0;
}
.pmc-head { margin-bottom: 4px; }
.pmc-lead {
  margin: 0 0 10px;
  font-size: 0.88rem;
  max-width: 52rem;
}
.pmc-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 14px;
}
.pmc-legend-item {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #5A6570;
}
.pmc-legend-item.is-goal { border-color: #3D6FA3; color: #3D6FA3; }
.pmc-legend-item.is-metric { border-color: #8A7A5C; color: #6B5535; }
.pmc-legend-item.is-okr { border-color: #5A8C5A; color: #3F7A4A; }
.pmc-legend-item.is-benefit { border-color: #C4A574; color: #8A6A3A; background: #FBF6EE; }
.pmc-arrow {
  font-weight: 700;
  color: var(--muted);
  user-select: none;
}
.pmc-branches {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pmc-branch {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.6fr);
  gap: 12px 16px;
  align-items: start;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.pmc-node {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  min-width: 0;
}
.pmc-node.is-goal.is-company {
  border-color: #3D6FA3;
  box-shadow: inset 3px 0 0 #3D6FA3;
}
.pmc-node.is-goal.is-dept {
  border-color: #8A7A5C;
  box-shadow: inset 3px 0 0 #8A7A5C;
}
.pmc-node.is-goal.is-missing {
  border-style: dashed;
  opacity: 0.9;
}
.pmc-node.is-metric {
  border-color: #D9CDB8;
  box-shadow: inset 3px 0 0 #C4A574;
}
.pmc-node.is-okr {
  border-color: #B7D4B0;
  box-shadow: inset 3px 0 0 #5A8C5A;
  flex: 1 1 160px;
}
.pmc-node.is-benefit {
  border-color: #E0C9A0;
  background: #FFFBF4;
  box-shadow: inset 3px 0 0 #C4A574;
  flex: 0 1 110px;
  text-align: center;
}
.pmc-node.is-benefit.is-zero {
  background: #F7F5F0;
  opacity: 0.85;
}
.pmc-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.pmc-title {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #2C3E50;
  font-weight: 700;
}
.pmc-benefit-val {
  font-size: 1.25rem;
  color: #8A6A3A;
  font-variant-numeric: tabular-nums;
}
.pmc-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.3;
}
.pmc-branch-total {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3D6FA3;
}
.pmc-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.pmc-metric-block {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1.3fr);
  gap: 8px 12px;
  align-items: start;
}
.pmc-okr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pmc-okr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px 8px;
}
.pmc-gap {
  font-size: 0.82rem;
  padding: 8px 4px;
}
.pmc-orphans {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.pmc-orphan-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.pmc-orphan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pmc-orphan-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px dashed #B7D4B0;
  font-size: 0.85rem;
}
.pmc-chip-amt {
  font-weight: 750;
  color: #8A6A3A;
  font-variant-numeric: tabular-nums;
}
.pmc-foot {
  margin-top: 12px;
  font-size: 0.78rem;
}
.pmc-empty {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .pmc-branch,
  .pmc-metric-block {
    grid-template-columns: 1fr;
  }
}

.projects-board.is-stage {
  max-width: none;
  padding: clamp(12px, 1.5vw, 22px);
  background: transparent;
  border: none;
  box-shadow: none;
}
.project-stage {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 28px);
}
.project-stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}
.project-stage-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  line-height: 1.15;
  color: #2C3E50;
  font-weight: 750;
}
.project-stage-kicker {
  font-size: clamp(0.72rem, 1vw, 0.85rem);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.project-stage-hero {
  display: grid;
  grid-template-columns: minmax(200px, 1.05fr) minmax(200px, 0.9fr) minmax(240px, 1.2fr);
  gap: clamp(14px, 2vw, 28px);
  align-items: start;
}
.project-strategy,
.project-jar-col,
.project-stories-col {
  min-width: 0;
}
.project-goal-card {
  background: linear-gradient(160deg, #F7FBFF, #EEF4FA);
  border: 1px solid #C5D8EB;
  border-radius: 16px;
  padding: clamp(12px, 1.5vw, 20px);
  box-shadow: inset 4px 0 0 #3D6FA3;
}
.project-goal-label {
  display: block;
  font-size: clamp(0.72rem, 0.95vw, 0.82rem);
  color: var(--muted);
  margin-bottom: 4px;
}
.project-goal-title {
  display: block;
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
  line-height: 1.25;
  color: #2C4A6E;
}
.project-goal-desc {
  margin: 8px 0 0;
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
  color: var(--muted);
  line-height: 1.35;
}
.project-metric-block { margin-top: 12px; }
.project-metric-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.project-metric-item {
  font-size: clamp(0.88rem, 1.2vw, 1.05rem);
  color: #4A3F35;
  line-height: 1.35;
  padding-left: 0.85em;
  position: relative;
}
.project-metric-item::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-weight: 700;
}
.project-metric-line {
  font-size: clamp(0.88rem, 1.2vw, 1.05rem);
  color: #4A3F35;
  line-height: 1.35;
}
.project-jar-col {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(10px, 1.2vw, 16px) clamp(8px, 1vw, 14px) clamp(12px, 1.4vw, 18px);
}
.project-stage-pct {
  margin-top: 4px;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  color: #3D6FA3;
}
.project-stage-score {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 700;
  color: #4A3F35;
  margin-top: 4px;
}
.project-stage-meta {
  margin-top: 8px;
  font-size: clamp(0.8rem, 1.05vw, 0.95rem);
  color: var(--muted);
}
.project-jar-col .pace-row {
  justify-content: center;
  margin-top: 8px;
}
.project-stories {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-story-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 5px solid #C4A574;
  border-radius: 14px;
  padding: clamp(10px, 1.2vw, 16px);
}
.project-story-delta {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 800;
  color: #5A9A6A;
  line-height: 1;
  min-width: 3ch;
}
.project-story-text {
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
  font-weight: 650;
  line-height: 1.3;
  color: #2C3E50;
}
.project-story-meta {
  margin-top: 4px;
  font-size: clamp(0.78rem, 1.05vw, 0.92rem);
  color: var(--muted);
  line-height: 1.3;
}
.project-story-empty {
  padding: 16px;
  background: #F7F5F0;
  border-radius: 12px;
}
.project-stage-mid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(14px, 2vw, 24px);
  align-items: start;
}
.project-bars { display: flex; flex-direction: column; gap: 10px; }
.project-bar-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.project-bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: clamp(0.88rem, 1.15vw, 1.05rem);
}
.project-bar-head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-bar-val { font-weight: 750; color: #5A9A6A; }
.project-bar-track {
  height: 10px;
  background: #EEE6DB;
  border-radius: 999px;
  overflow: hidden;
}
.project-bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
}
.project-people-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-people-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: clamp(0.85rem, 1.15vw, 1.02rem);
}
.project-chip-amt { font-weight: 750; color: #5A9A6A; }
.project-silent { margin-top: 8px; font-size: 0.85rem; }
.project-stage-pace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(10px, 1.2vw, 16px);
}
.project-stage-pace .progress-card {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.project-stage-pace.is-secondary {
  opacity: 0.92;
}
.project-stage-pace.is-secondary .project-stage-kicker {
  margin-bottom: 4px;
}
/* ТВ / широкие мониторы: крупнее воздух и кегль */
@media (min-width: 1400px) {
  .projects-board.is-stage .project-stage-hero {
    grid-template-columns: minmax(240px, 1fr) minmax(260px, 0.95fr) minmax(340px, 1.35fr);
  }
  .projects-board.is-stage .project-stage-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
  }
  .projects-board.is-stage .project-goal-title {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
  }
  .projects-board.is-stage .project-stage-pct {
    font-size: clamp(2.8rem, 4.2vw, 4rem);
  }
  .projects-board.is-stage .project-story-delta {
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  }
  .projects-board.is-stage .project-story-text {
    font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  }
  .projects-board.is-stage .project-story-card {
    min-height: 88px;
    padding: 16px 18px;
  }
}
@media (max-width: 1100px) {
  .project-stage-hero {
    grid-template-columns: 1fr 1fr;
  }
  .project-strategy { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .project-stage-hero,
  .project-stage-mid {
    grid-template-columns: 1fr;
  }
  .project-strategy { grid-column: auto; }
}

.focus-jar-col { text-align: center; }
.focus-title { margin: 6px 0 4px; font-size: 1.15rem; }
.focus-legend-list { display: flex; flex-direction: column; gap: 8px; }
.focus-legend-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.person-coins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.person-coins-card { text-align: center; }
.coins-jar {
  width: 88px; height: 110px;
  margin: 0 auto 8px;
  position: relative;
  border-radius: 10px 10px 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(246,241,234,0.9));
  border: 2px solid rgba(196, 165, 116, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
  overflow: visible;
  cursor: help;
}
.coins-jar .coins-jar-body { overflow: hidden; border-radius: 0 0 14px 14px; }
.coins-jar-tip {
  bottom: calc(100% + 6px);
  z-index: 30;
}
.coins-jar:hover .coins-jar-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.person-coins-card:hover .coins-jar {
  border-color: rgba(196, 165, 116, 0.85);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.coins-jar-rim {
  position: absolute; left: 12%; right: 12%; top: 6px; height: 8px;
  border-radius: 6px;
  background: linear-gradient(180deg, #E0C49A, #C4A574);
  pointer-events: none;
}
.coins-jar-body {
  position: absolute; left: 10%; right: 10%; top: 20px; bottom: 8px;
  display: flex; flex-wrap: wrap-reverse; align-content: flex-start;
  justify-content: center; gap: 3px; padding: 4px 2px;
  pointer-events: none;
}
.benefit-coin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #b8956a;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.7), 0 1px 2px rgba(0,0,0,0.12);
  display: inline-block;
  animation: coin-pop 0.45s ease both;
  animation-delay: calc(var(--i, 0) * 0.04s);
}
@keyframes coin-pop {
  from { transform: translateY(8px) scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.coins-empty { font-size: 0.72rem; width: 100%; padding-top: 28px; }
.coins-name { font-size: 0.86rem; font-weight: 650; line-height: 1.2; }
.coins-dept {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--muted); margin-top: 2px;
}
.coins-amount { font-size: 0.75rem; color: #5A9A6A; margin-top: 2px; }

@media (max-width: 900px) {
  .project-stage-hero,
  .project-stage-mid {
    grid-template-columns: 1fr;
  }
}
.project-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; text-align: left; }
.project-status {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
}
.status-idea { background: #F6F1EA; color: var(--muted); }
.status-pilot { background: #E8F0F8; color: #3D6FA3; }
.status-scale { background: #FBF3DD; color: #8A6A20; }
.status-ops { background: #E8F3E6; color: #3F7A4A; }
.project-metrics { font-size: 0.82rem; margin-bottom: 8px; text-align: left; }
.project-people { margin: 4px 0 10px; padding-left: 18px; font-size: 0.88rem; color: var(--muted); }
.project-edges { font-size: 0.88rem; margin-bottom: 8px; color: #3D6FA3; }
.project-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.btn.project-status-btn,
.project-status-btn.btn {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border: 1px solid var(--border) !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn.project-status-btn:hover,
.project-status-btn.btn:hover {
  transform: translateY(-1px);
  border-color: #D9CDBE !important;
  box-shadow: 0 4px 12px rgba(120, 95, 70, 0.08);
  text-decoration: none !important;
}
.btn.project-status-btn.status-idea,
.project-status-btn.status-idea {
  background: #F6F1EA !important;
  color: #7A6A5A !important;
}
.btn.project-status-btn.status-pilot,
.project-status-btn.status-pilot {
  background: #E8F0F8 !important;
  color: #3D6FA3 !important;
}
.btn.project-status-btn.status-scale,
.project-status-btn.status-scale {
  background: #FBF3DD !important;
  color: #8A6A20 !important;
}
.btn.project-status-btn.status-ops,
.project-status-btn.status-ops {
  background: #E8F3E6 !important;
  color: #3F7A4A !important;
}

@media (max-width: 720px) {
  .project-card { grid-template-columns: 1fr; }
}

.cascade-stat.is-warn { border-color: #E6C07B; color: #8A6A20; }
.cascade-stat.is-danger { border-color: #E8A87C; color: #A85A3A; background: #FFF5F0; }

.zone-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.zone-red { background: #FCE8E0; color: #A85A3A; }
.zone-yellow { background: #FBF3DD; color: #8A6A20; }
.zone-green { background: #E8F3E6; color: #3F7A4A; }

.attention-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.attention-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
}
.zone-row-red { border-color: #E8A87C; }
.zone-row-yellow { border-color: #E6C07B; }

.culture-principles {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem;
  line-height: 1.45;
}
.culture-principles li { margin-bottom: 6px; }

.sla-badge {
  margin-left: auto;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 3px 8px;
}
.cross-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  padding: 2px 7px;
  background: #E8F0F7;
  color: #1B4F8A;
  vertical-align: middle;
}
.archive-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  padding: 2px 7px;
  background: #F0EEE8;
  color: #6B6560;
  vertical-align: middle;
}
.metric-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.hist-text-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}
.verify-okr {
  font-size: 0.82rem;
  margin: -4px 0 8px;
}
.sla-ok { background: #E8F3E6; color: #3F7A4A; }
.sla-overdue { background: #FBF3DD; color: #8A6A20; }
.sla-escalate { background: #FCE8E0; color: #A85A3A; }
.verify-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sla-row-escalate { border-color: #E8A87C; }
.sla-row-overdue { border-color: #E6C07B; }

.inc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.inc-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
}
.inc-card.is-overdue { border-color: #E8A87C; }
.inc-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.inc-status { font-size: 0.78rem; color: var(--muted); }
.inc-notes { margin-top: 6px; font-size: 0.88rem; }

.soft-hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

.north-star-banner {
  background: linear-gradient(135deg, #FFF8EE 0%, #F3F7F4 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 10px 0 16px;
}
.north-star-label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.north-star-title {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}
.north-star-note {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
.metric-note {
  margin: 4px 0 10px;
  font-size: 0.85rem;
  line-height: 1.35;
}
.metric-feed-box {
  margin: 8px 0 10px;
  padding: 10px 12px;
  background: rgba(125, 145, 120, 0.06);
  border: 1px solid rgba(125, 145, 120, 0.18);
  border-radius: 12px;
  max-width: 520px;
}
.metric-feed-chip {
  font-size: 0.8rem;
  margin: 2px 0 6px;
}

.photo-upload {
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .15s, background .15s;
}
.photo-upload:hover {
  border-color: var(--accent);
  background: #FFF9F0;
}
.photo-preview-img {
  display: block;
  max-width: 220px;
  max-height: 160px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 6px;
  object-fit: cover;
}
.evidence-block { margin: 8px 0 12px; }
.evidence-thumb {
  display: block;
  max-width: 180px;
  max-height: 120px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}
.evidence-thumb-sm {
  display: block;
  max-width: 72px;
  max-height: 54px;
  border-radius: 8px;
  margin-top: 6px;
  object-fit: cover;
}
.evidence-note { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

@media (max-width: 640px) {
  .prio-cards { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .dashboard-grid,
  .dashboard-grid.is-company,
  .dashboard-grid:has(.col-depts-wide),
  .dashboard-grid:has(.col-depts-with-game),
  .company-split-grid,
  .company-top-split,
  .company-jars-row {
    grid-template-columns: 1fr;
  }
  .depts-game-row {
    grid-template-columns: minmax(96px, 118px) minmax(0, 1fr);
  }
  .col-depts { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .col-depts.col-depts-with-game {
    flex-direction: column;
    align-items: stretch;
  }
  .col-person { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .col-dynamics { max-height: none; }
  .person-block, .hist-block, .badge-wrap { min-width: 220px; flex: 1; }
}

@media (max-width: 720px) {
  .depts-game-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .col-game { width: 100%; max-width: 420px; }
}

@media (max-width: 640px) {
  .app-header, .app-main, .dept-nav { padding-left: 14px; padding-right: 14px; }
  .app-header-sub-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .header-filter-project {
    margin-left: 0;
    flex: 1 1 160px;
  }
  .app-header-sub-row > .period-filter-meta + .header-filter-user {
    margin-left: 0;
  }
}

/* —— Слой динамики периода —— */
.progress-layer-section { margin-top: 4px; }
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 12px 0 8px;
}
.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
}
.progress-card-head { margin-bottom: 6px; }
.progress-sub { font-size: 0.85rem; margin-top: 2px; }
.progress-chart .js-plotly-plot { width: 100% !important; }
.progress-graph.is-spark .js-plotly-plot,
.progress-graph.is-spark .plotly { max-height: 96px; }
.pace-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.pace-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #F3EDE4;
  color: var(--ink);
}
.pace-ahead { background: #E5F2E6; border-color: #B7D9B9; color: #2F6B38; }
.pace-on_track { background: #EEF4FA; border-color: #B7CBE0; color: #2F5F8A; }
.pace-behind { background: #F8E8E4; border-color: #E0B6AE; color: #8A3F35; }
.pace-meta { font-size: 0.8rem; color: var(--muted); }
.pace-nums {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.pace-num.is-fact { color: #3D6FA3; font-weight: 700; }
.pace-num.is-plan { color: #B8956A; font-weight: 600; }
.pace-num.is-goal { color: #5A9A6A; font-weight: 700; }
.pace-sep { opacity: 0.45; }
.pace-delta {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F3F0E9;
}
.pace-delta.pace-ahead { background: #EEF6EE; color: #3F7A4A; }
.pace-delta.pace-behind { background: #F8EEEE; color: #9B3B2F; }
.pace-delta.pace-on_track { background: #F3F0E9; color: #6A5F52; }
.progress-tip { margin-top: 6px; }
.dept-sparks-wrap { margin-top: 18px; }
.dept-sparks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.dept-spark-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px 6px;
}
.spark-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.metric-progress-wrap {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* —— Термины: подсказки при наведении —— */
.term-wrap { display: inline; }
.term-hot {
  border-bottom: 1px dotted rgba(61, 111, 163, 0.55);
  cursor: help;
  color: inherit;
}
.term-hot:hover { border-bottom-color: #3D6FA3; color: #2A5280; }
.tooltip.term-tooltip .tooltip-inner,
.term-tooltip .tooltip-inner {
  max-width: 280px;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.35;
  background: #4A3F35;
  padding: 8px 11px;
  border-radius: 10px;
}

/* —— Модель Польза → … → Компания —— */
.model-chain-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3D6FA3;
}
.model-chain-arrow { color: var(--muted); font-weight: 600; }

/* —— Онбординг 20 сек —— */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(74, 63, 53, 0.42);
  backdrop-filter: blur(2px);
}
.onboarding-overlay.is-hidden { display: none !important; }
.onboard-card {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px 20px;
  box-shadow: 0 18px 48px rgba(74, 63, 53, 0.18);
}
.onboard-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.onboard-title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  color: #3D6FA3;
}
.onboard-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #F6F1EA;
  border-radius: 12px;
}
.onboard-chain-node {
  font-weight: 700;
  font-size: 0.88rem;
  color: #3D6FA3;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
.onboard-chain-node.is-end {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
}
.onboard-chain-arrow { color: var(--muted); font-weight: 600; }
.onboard-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.onboard-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.onboard-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: var(--accent-gradient);
}
.onboard-step p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
.onboard-footnote { font-size: 0.82rem; margin: 0 0 14px; }
.onboard-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.onboard-video-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFF9F0;
  border: 1px solid #D4A86A;
  color: #8C5E1A;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.onboard-video-btn:hover {
  background: #F4E8D4;
  border-color: #B88944;
  color: #6B440C;
  transform: translateY(-1px);
}
.onboard-card .onboard-cta {
  flex: 1;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.92rem;
}
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 24, 18, 0.78);
  backdrop-filter: blur(6px);
}
.video-modal-overlay.is-hidden {
  display: none !important;
}
.video-modal-card {
  width: min(960px, 96vw);
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(74, 63, 53, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.video-modal-header {
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  background: #FAF6EE;
}
.video-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #3D6FA3;
}
.btn-close-custom {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  line-height: 1;
}
.btn-close-custom:hover {
  background: rgba(0,0,0,0.06);
  color: #2D3748;
}
.video-player-container {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-modal-footer {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  background: #FAF6EE;
}

/* —— Первый визит: приглушить вторичное —— */
.app-root.is-onboarding .app-header,
.app-root.is-onboarding .app-main {
  filter: saturate(0.92);
}
.overview-pane.is-first-visit .dept-dynamics-wide,
.overview-pane.is-first-visit #overview-raci,
.main-tabs.is-first-visit .nav-link:not(.active) {
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.overview-pane.is-first-visit .dept-dynamics-wide:hover,
.overview-pane.is-first-visit #overview-raci:hover {
  opacity: 1;
}
.overview-pane.is-first-visit .first-day-banner,
.overview-pane.is-first-visit .dashboard-grid {
  opacity: 1;
}
.first-day-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(120, 95, 70, 0.06);
}

.glossary-bar {
  max-width: 1180px;
  width: calc(100% - 48px);
  margin: 0 auto 12px;
  padding: 10px 14px 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(120, 95, 70, 0.05);
  box-sizing: border-box;
}
.glossary-bar-label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.glossary-bar-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.glossary-bar .term-wrap {
  display: inline-flex;
}
.glossary-bar .term-hot {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  background: #F6F1EA;
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: help;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.glossary-bar .term-hot:hover,
.glossary-bar .term-hot:focus {
  color: #3D6FA3;
  background: #fff;
  border-color: #B7CDE4;
  box-shadow: 0 4px 12px rgba(61, 111, 163, 0.1);
  transform: translateY(-1px);
  outline: none;
}

@media (max-width: 720px) {
  .glossary-bar {
    width: calc(100% - 28px);
    padding: 10px 12px;
  }
}
/* —— Живая цепочка / сценарий успеха / превью банки —— */
.live-meaning-anchor {
  max-width: 1180px;
  margin: 0 auto 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(120, 95, 70, 0.05);
}
.live-anchor-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.live-anchor-lead { margin: 0; }
.live-chain-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px 6px;
}
.live-node {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(61, 111, 163, 0.06);
  border: 1px dashed rgba(61, 111, 163, 0.35);
  cursor: default;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.live-node:hover {
  transform: translateY(-2px);
  border-style: solid;
  border-color: rgba(61, 111, 163, 0.55);
  background: #fff;
  box-shadow: 0 8px 20px rgba(80, 60, 40, 0.1);
}
.live-node:hover .live-node-body {
  color: #2A5280;
}
.live-node:hover .term-hot {
  border-bottom-color: #3D6FA3;
  color: #2A5280;
}
.live-node-kicker { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 2px; }
.live-node-body { font-size: 0.92rem; line-height: 1.25; }
.live-arrow { align-self: center; color: #3D6FA3; font-weight: 700; padding: 0 2px; }
.live-anchor-foot { margin: 10px 0 0; font-size: 0.82rem; }

.success-scenario {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.success-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(196, 165, 116, 0.12);
}
.success-step-num {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #C4A574;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.benefit-dest-preview {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(61, 111, 163, 0.4);
  background: linear-gradient(180deg, rgba(61,111,163,0.06), transparent);
}
.benefit-dest-line { font-weight: 600; margin-bottom: 8px; }
.benefit-dest-visual { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.benefit-dest-arrow { font-size: 1.4rem; color: #3D6FA3; line-height: 1; }
.benefit-dest-jar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
}
.benefit-dest-ico { font-size: 1.5rem; }
.benefit-dest-sub { font-size: 0.8rem; }

.soften-reveal-host {
  position: sticky;
  bottom: 12px;
  z-index: 40;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  pointer-events: none;
}
.soften-reveal-host.is-visible { pointer-events: auto; }
.soften-reveal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.95);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(80, 60, 40, 0.12);
}
.soften-reveal-hint { font-size: 0.85rem; }
.soften-reveal-btn { pointer-events: auto; }

.app-root.is-softening .dept-dynamics-wide,
.app-root.is-softening #overview-raci,
.app-root.is-softening .main-tabs .nav-link:not(.active),
.overview-pane.is-softening .dept-dynamics-wide,
.overview-pane.is-softening #overview-raci {
  opacity: 0.45;
  transition: opacity 0.25s ease;
}
.app-root.is-revealed .dept-dynamics-wide,
.app-root.is-revealed #overview-raci,
.app-root.is-revealed .main-tabs .nav-link:not(.active),
.overview-pane.is-first-visit.is-revealed .dept-dynamics-wide,
.overview-pane.is-first-visit.is-revealed #overview-raci {
  opacity: 1 !important;
}
.app-root.is-softening .dept-dynamics-wide:hover,
.app-root.is-softening #overview-raci:hover {
  opacity: 0.85;
}
.raci-abbr { font-weight: 500; font-size: 0.85em; }
.benefit-form-first-day .success-scenario { margin-top: 4px; }

/* —— Слой метрик на обзоре —— */
.metrics-overview-layer {
  max-width: 1180px;
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(61, 111, 163, 0.04);
}
.metric-layer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.metric-layer-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.metric-layer-chip {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 148px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px dashed rgba(61, 111, 163, 0.3);
  box-sizing: border-box;
  cursor: default;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.metric-layer-chip:hover {
  transform: translateY(-2px);
  border-style: solid;
  border-color: rgba(61, 111, 163, 0.55);
  background: #fff;
  box-shadow: 0 8px 20px rgba(80, 60, 40, 0.1);
}
.metric-layer-chip:hover .metric-layer-pct {
  color: #2A5280;
}
.metric-layer-chip:hover .metric-layer-bar {
  background: #E5DCCF;
}
.metric-layer-chip:hover .metric-layer-fill {
  filter: saturate(1.08);
}
.metric-layer-chip.is-done:hover {
  border-color: rgba(90, 140, 90, 0.65);
}
.metric-layer-chip.is-done { border-style: solid; border-color: rgba(90, 140, 90, 0.45); }
.metric-layer-kicker {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.2;
  min-height: 1.2em;
}
.metric-layer-title {
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.25;
  margin: 4px 0 8px;
  min-height: calc(1.25em * 4);
  max-height: calc(1.25em * 4);
}
.metric-layer-stats {
  flex: 0 0 auto;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-layer-val {
  font-size: 0.82rem;
  line-height: 1.2;
  min-height: 1.2em;
}
.metric-layer-pct {
  font-weight: 700;
  color: #3D6FA3;
  font-size: 0.9rem;
  line-height: 1.2;
  min-height: 1.2em;
}
.metric-layer-bar {
  height: 10px;
  margin-top: 2px;
  background: #EEE6DB;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(120, 95, 70, 0.12);
}
.metric-layer-fill {
  background: linear-gradient(90deg, #A8C686, #E6C07B 55%, #F0C94A);
}
.metric-layer-fill.is-done-fill {
  background: linear-gradient(90deg, #7BA86A, #A8C686);
}
.metric-layer-foot { margin: 10px 0 0; font-size: 0.8rem; }
.metric-layer-cta { white-space: nowrap; }

/* —— Submit: запись в месяц —— */
.benefit-submit-block { margin-top: 4px; }
.benefit-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 10px;
}
.benefit-submit-write-chip {
  order: 0;
}
.benefit-submit-row .warm-btn { order: 1; }

/* —— Слепок / Сумма / Весь год —— */
.period-filter-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.period-view-mode { margin: 0; }
.period-view-mode .form-check { margin-right: 8px; }
.period-year-all-btn { white-space: nowrap; }

.my-okr-picker {
  margin-bottom: 4px;
}
.my-okr-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(420px, 55vh);
  overflow: auto;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(120, 95, 70, 0.04);
}
.my-okr-check-label {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.my-okr-checklist .form-check {
  padding: 6px 8px;
  margin: 0;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.my-okr-checklist .form-check:hover {
  background: #F6F1EA;
}
.my-okrs-tab .okrs-form,
.my-okrs-tab .friendly-form .form-title {
  margin-top: 0;
}

/* —— Сигналы спирали —— */
.spiral-signals-panel { margin-top: 12px; }
.spiral-sig-lead { font-size: 0.82rem; margin: 0 0 8px; }
.spiral-sig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.spiral-sig-row { padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,0.03); }
.spiral-sig-head { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 4px; font-size: 0.78rem; }
.spiral-sig-head .term-hot {
  color: var(--ink);
  font-weight: 600;
}
.spiral-sig-head .term-hot:hover {
  color: #3D6FA3;
}
.spiral-sig-pct { font-variant-numeric: tabular-nums; color: var(--ink); }
.spiral-sig-bar { height: 6px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden; }
.spiral-sig-fill { height: 100%; border-radius: 999px; background: #3D6FA3; }
.spiral-sig-row.is-low .spiral-sig-fill { background: #B85C5C; }
.spiral-sig-row.is-mid .spiral-sig-fill { background: #C4A574; }
.spiral-sig-row.is-high .spiral-sig-fill { background: #5A8C5A; }
.cascade-level-label .term-hot {
  color: inherit;
  font-weight: inherit;
  border-bottom-color: rgba(61, 111, 163, 0.4);
}

.verify-self-hint { font-size: 0.82rem; margin: 0 0 8px; }
.self-verify-badge {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(184, 92, 92, 0.12);
  color: #8a4040;
}

/* —— Индикатор загрузки: вращающаяся кубышка —— */
.page-loading-host {
  position: relative;
  min-height: 120px;
}
.page-loading-host > .page-loading,
.page-loading-host .dash-spinner,
.page-loading-host .dash-loading {
  z-index: 40;
}
.loading-jar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  pointer-events: none;
}
.loading-jar-icon {
  width: 44px;
  height: 52px;
  position: relative;
  transform-origin: 50% 58%;
  animation: loading-jar-spin 1.35s linear infinite;
  filter: drop-shadow(0 2px 6px rgba(61, 111, 163, 0.18));
}
.loading-jar-lid {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 2px;
  height: 8px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #7A9EBF 0%, #3D6FA3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.loading-jar-body {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 10px;
  bottom: 4px;
  border-radius: 6px 6px 14px 14px;
  border: 2px solid rgba(61, 111, 163, 0.55);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(232, 240, 247, 0.35) 40%,
    rgba(250, 246, 238, 0.2) 100%
  );
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset -6px 0 10px rgba(61, 111, 163, 0.06);
}
.loading-jar-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  background: linear-gradient(180deg, #7EB6E0 0%, #3D6FA3 70%, #2F5A86 100%);
  border-radius: 0 0 12px 12px;
  animation: loading-jar-wave 1.4s ease-in-out infinite;
}
.loading-jar-shine {
  position: absolute;
  left: 18%;
  top: 14%;
  width: 22%;
  height: 55%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  opacity: 0.85;
}
.loading-jar-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #3D6FA3;
  letter-spacing: 0.01em;
}
@keyframes loading-jar-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes loading-jar-wave {
  0%, 100% { height: 44%; transform: scaleX(1); }
  50% { height: 54%; transform: scaleX(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .loading-jar-icon,
  .loading-jar-liquid {
    animation: none;
  }
  .loading-jar-icon {
    opacity: 0.9;
  }
}
