:root {
  --color-positive: #17643b;
  --color-positive-bg: #eef7f1;
  --color-negative: #a12f2f;
  --color-negative-bg: #fff1f1;
  --color-warning: #7a5611;
  --color-warning-bg: #fff7df;
  --color-actual: #146c63;
  --color-plan: #667282;
  --color-muted: #76818e;
  --color-focus: #0b6f65;
  color: #17212b;
  background: #f4f6f8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Единый семантический слой UX-прохода. */
.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  box-shadow: 0 2px 12px rgb(31 41 55 / 5%);
}

.app-logo,
.brand-logo {
  display: block;
  width: 208px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.app-logo {
  width: 156px;
  height: 36px;
}

.manager-logo {
  width: 182px;
  height: 42px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(11 111 101 / 28%);
  outline-offset: 2px;
}

.dashboard-heading {
  margin-bottom: 14px;
}

.dashboard-heading p {
  margin: 0;
  color: var(--color-muted);
}

.dashboard-periods {
  margin-bottom: 12px;
}

.period-navigation {
  display: grid;
  grid-template-columns: 42px minmax(230px, 360px) 42px;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 22px;
}

.period-arrow,
.period-picker-trigger {
  border: 1px solid #c8d0d8;
  color: #273340;
  background: #fff;
}

.period-arrow {
  min-height: 48px;
  font-size: 25px;
}

.period-picker {
  position: relative;
}

.period-picker-trigger {
  display: grid;
  width: 100%;
  min-height: 48px;
  place-content: center;
  padding: 5px 40px 5px 12px;
}

.period-picker-trigger::after {
  position: absolute;
  top: 50%;
  right: 14px;
  content: "▾";
  transform: translateY(-50%);
}

.dashboard-period-title {
  font-size: 16px;
}

.dashboard-period-boundaries {
  display: block;
  min-height: 0;
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
}

.period-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  bottom: 0;
  left: 50%;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.metric-deviation {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.is-positive,
.metric-deviation.is-positive {
  color: var(--color-positive);
}

.is-negative,
.metric-deviation.is-negative {
  color: var(--color-negative);
}

.is-warning {
  color: var(--color-warning);
}

.is-muted,
.metric-deviation.is-muted {
  color: var(--color-muted);
}

.chart-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-chart-controls {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 16px;
}

.dashboard-chart-controls .compact-select {
  min-width: 0;
}

.compact-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.compact-select select {
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  border: 1px solid #c8d0d8;
  color: #273340;
  background: #fff;
}

.manager-name-link {
  padding: 0;
  border: 0;
  color: #0b655d;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgb(11 101 93 / 35%);
  text-underline-offset: 3px;
}

.completion-value {
  font-weight: 800;
}

.week-list-item > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.week-list-item .week-status {
  max-width: 128px;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}

.date-control-input {
  display: block;
  padding: 2px;
  border-radius: 10px;
  background: #fff;
}

.manager-period-summary,
.manager-period-detail,
.manager-performance-card {
  box-shadow: 0 5px 18px rgb(31 41 55 / 4%);
}

@media (max-width: 760px) {
  .app-logo {
    width: 142px;
    height: 33px;
  }

  .app-header {
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .period-navigation {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .dashboard-periods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-periods .filter-button:last-child {
    grid-column: auto;
  }

  .dashboard-section-heading,
  .compact-select {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-work-page {
    padding: 16px 12px 36px;
  }

}

.manager-body {
  background: #eef2f4;
}

.manager-work-page {
  min-height: 100vh;
  padding: 28px 20px 48px;
}

.manager-work-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.manager-access-card {
  width: min(100%, 520px);
  margin: 48px auto 0;
  padding: 32px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 30px rgb(31 41 55 / 8%);
}

.manager-access-card h1 {
  margin: 0 0 10px;
  font-size: 26px;
}

.manager-access-card p {
  margin-bottom: 0;
  color: #5e6a78;
}

.manager-work-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 20px;
}

.manager-work-header h1 {
  margin-bottom: 6px;
}

.manager-work-header p {
  margin: 0;
  color: #667282;
  font-size: 17px;
}

.manager-result-context {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.manager-result-context h2,
.manager-result-context p {
  margin: 0;
}

.manager-result-context p {
  margin-top: 4px;
  color: #667282;
}

.manager-global-date {
  display: grid;
  flex: 0 0 190px;
  gap: 6px;
  color: #4b5868;
  font-size: 13px;
  font-weight: 700;
}

.manager-global-date input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #bfc8d2;
  border-radius: 8px;
  color: #17212b;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
}

.manager-global-date input:focus-visible {
  border-color: var(--color-focus);
}

.manager-work-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid #d5dce2;
  border-radius: 10px;
  background: #e8edef;
}

.manager-work-tab {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  color: #5b6876;
  background: transparent;
  font-weight: 700;
}

.manager-work-tab.is-active {
  color: #0d6058;
  background: #fff;
  box-shadow: 0 2px 7px rgb(31 41 55 / 8%);
}

.manager-metric-note {
  color: #596776;
  font-size: 12px;
}

.manager-dashboard-empty {
  margin: 0;
  color: #667282;
  font-size: 14px;
}

.manager-history-table-wrap {
  overflow-x: auto;
}

.manager-history-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}

.manager-history-table th,
.manager-history-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e4e9ed;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

.manager-history-table th:first-child,
.manager-history-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.manager-history-table thead th {
  color: #667282;
  font-size: 12px;
  font-weight: 600;
}

.manager-history-table tbody th {
  color: #354252;
}

.manager-history-table tfoot th,
.manager-history-table tfoot td {
  border-top: 2px solid #bfc8d2;
  border-bottom: 0;
  font-weight: 700;
}

.manager-history-table td span {
  display: block;
  margin-top: 2px;
  color: #667282;
  font-size: 11px;
}

.manager-history-table td .is-missing {
  margin-top: 0;
  color: #8a5a28;
  font-weight: 600;
}

.manager-stats-error {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e4bebe;
  border-radius: 10px;
  background: #fff4f4;
}

.manager-stats-error p {
  margin: 0 0 10px;
}

.manager-stats-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
}

.manager-stats-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manager-stats-periods button,
.manager-stats-navigation > button {
  min-height: 38px;
  border: 1px solid #d4dce2;
  border-radius: 8px;
  color: #566474;
  background: #f8fafb;
}

.manager-stats-periods button.is-active {
  border-color: #146c63;
  color: #0d6058;
  background: #edf7f5;
  font-weight: 700;
}

.manager-stats-navigation {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.manager-stats-navigation h2,
.manager-stats-navigation p {
  margin: 0;
}

.manager-stats-navigation h2 {
  font-size: 17px;
}

.manager-stats-navigation p {
  margin-top: 3px;
  color: #687585;
  font-size: 12px;
}

.manager-stats-navigation > button {
  width: 38px;
  padding: 0;
  font-size: 18px;
}

.manager-personal-channel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 18px;
}

.manager-personal-channel label {
  color: #566474;
  font-size: 13px;
  font-weight: 700;
}

.manager-personal-channel select {
  width: min(100%, 280px);
}

.manager-native-select {
  color: #566474;
  font-size: 13px;
  font-weight: 700;
}

.manager-native-select select {
  min-height: 42px;
  padding: 8px 34px 8px 11px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  color: #273340;
  background-color: #fff;
  font: inherit;
}

.manager-native-select select:hover {
  border-color: #8c9aa8;
}

.manager-native-select select:focus-visible {
  border-color: var(--color-focus);
}

.manager-type-section-heading {
  font-size: 20px;
  font-weight: 700;
}

.manager-type-card-heading {
  font-size: 15px;
  font-weight: 700;
}

.manager-type-value,
.manager-team-current-metrics dd,
.manager-team-personal-total-metrics dd,
.manager-team-comparison-grid strong,
.manager-team-ranking-table tbody th,
.manager-team-ranking-table tbody td {
  font-size: 16px;
  font-weight: 700;
}

.manager-type-secondary,
.manager-team-current-metrics dt,
.manager-team-personal-total-metrics dt,
.manager-team-comparison-grid span,
.manager-team-ranking-table thead th {
  color: #687585;
  font-size: 13px;
  font-weight: 400;
}

.manager-delta.is-positive {
  color: var(--color-positive);
}

.manager-delta.is-negative {
  color: var(--color-negative);
}

.manager-delta.is-neutral {
  color: var(--color-muted);
}

.manager-period-summaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.manager-period-summary,
.manager-period-detail,
.manager-activity-stats,
.manager-sales-structure,
.manager-sales-legacy,
.manager-performance-chart,
.manager-performance-history,
.manager-team-personal-total,
.manager-team-current,
.manager-team-comparison,
.manager-team-ranking {
  padding: 20px 22px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.manager-period-kpi {
  margin-bottom: 18px;
}

.manager-period-detail,
.manager-activity-stats,
.manager-sales-structure,
.manager-sales-legacy,
.manager-performance-chart,
.manager-performance-history,
.manager-team-personal-total,
.manager-team-current,
.manager-team-comparison,
.manager-team-ranking {
  margin-bottom: 18px;
}

.manager-sales-legacy {
  padding: 18px 20px;
  background: #fbfcfc;
  box-shadow: 0 4px 14px rgb(31 41 55 / 4%);
}

.manager-sales-structure {
  padding: 18px 20px;
}

.manager-sales-structure-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.manager-sales-structure-metrics > article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1e6ea;
  border-radius: 8px;
  background: #f5f7f8;
}

.manager-sales-structure-metrics h3 {
  margin: 0 0 10px;
}

.manager-sales-structure-metrics dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.manager-sales-structure-metrics dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.manager-sales-structure-metrics dt {
  color: #687585;
  font-size: 12px;
}

.manager-sales-structure-metrics dd {
  margin: 0;
  color: #354252;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.manager-sales-legacy-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.manager-sales-legacy-metrics > div {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f1f4f5;
}

.manager-sales-legacy-metrics dt,
.manager-history-coverage {
  color: #687585;
  font-size: 12px;
}

.manager-sales-legacy-metrics dd {
  margin: 5px 0 0;
  color: #354252;
  font-weight: 700;
}

.manager-history-coverage {
  display: block;
  margin-top: 3px;
  font-weight: 400;
}

.manager-activity-stats {
  padding: 18px 20px;
  border-color: #dfe5e9;
  background: #fbfcfc;
  box-shadow: 0 4px 14px rgb(31 41 55 / 4%);
}

.manager-activity-note {
  margin: 10px 0 0;
  color: #687585;
  font-size: 13px;
}

.manager-activity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 14px 0 0;
  border-top: 1px solid #e5eaed;
  border-left: 1px solid #e5eaed;
}

.manager-activity-metrics > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid #e5eaed;
  border-bottom: 1px solid #e5eaed;
}

.manager-activity-metrics dt {
  color: #687585;
  font-size: 12px;
  line-height: 1.35;
}

.manager-activity-metrics dd {
  margin: 5px 0 0;
  color: #354252;
  font-size: 16px;
  font-weight: 700;
}

.manager-period-summary > div:first-child,
.manager-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.manager-period-summary h2,
.manager-section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.manager-period-summary > div:first-child p,
.manager-section-heading p {
  margin: 4px 0 0;
  color: #687585;
  font-size: 13px;
}

.manager-period-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.manager-period-summary dl > div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f5f7f8;
}

.manager-period-summary dt {
  color: #687585;
  font-size: 12px;
}

.manager-period-summary dd {
  margin: 6px 0 3px;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.manager-period-kpi dd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 0 0;
  font-weight: 400;
}

.manager-period-kpi dd span {
  color: #687585;
  font-size: 12px;
}

.manager-period-kpi dd strong {
  color: #354252;
  font-size: 15px;
  text-align: right;
}

.manager-performance-value.is-green {
  color: var(--color-positive);
}

.manager-performance-value.is-red {
  color: var(--color-negative);
}

.manager-performance-value.is-neutral,
.manager-performance-plan {
  color: var(--color-muted);
}

.manager-period-kpi > .manager-metric-note {
  display: block;
  margin-top: 12px;
}

.manager-period-summary small {
  display: block;
  color: #5c6977;
  line-height: 1.4;
}

.manager-compact-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: #edf1f3;
}

.manager-compact-switch button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  color: #667282;
  background: transparent;
}

.manager-compact-switch button.is-active {
  color: #0d6058;
  background: #fff;
  font-weight: 700;
}

.manager-period-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.manager-comparison-table-wrap {
  max-width: 100%;
  margin-top: 16px;
}

.manager-comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.manager-comparison-table th,
.manager-comparison-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #e1e6ea;
  text-align: right;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.manager-comparison-table th:first-child {
  text-align: left;
}

.manager-comparison-table thead th {
  color: #687585;
  font-size: 12px;
  font-weight: 600;
}

.manager-comparison-table thead span {
  display: block;
  margin-top: 3px;
  color: #354252;
  font-weight: 400;
}

.manager-comparison-table tbody th,
.manager-comparison-table tbody td {
  color: #354252;
  font-size: 14px;
}

.manager-comparison-table tbody strong {
  font-size: 16px;
}

.manager-comparison-subrow th {
  padding-left: 26px;
  color: #687585;
  font-weight: 500;
}

.manager-comparison-subrow th::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 1px;
  margin-left: -18px;
  margin-right: 6px;
  vertical-align: middle;
  background: #c8d1d8;
}

.manager-period-insights article {
  padding: 14px;
  border: 1px solid #e1e6ea;
  border-radius: 9px;
  background: #fafbfb;
}

.manager-period-insights h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.manager-period-insights p {
  margin: 4px 0;
  color: #566474;
}

.manager-period-insights strong {
  display: block;
  margin-top: 7px;
}

.manager-comparison-metrics {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.manager-team-personal-total-metrics,
.manager-team-current-metrics,
.manager-team-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.manager-team-personal-total-metrics > div,
.manager-team-current-metrics > div,
.manager-team-comparison-grid article {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f5f7f8;
}

.manager-team-personal-total-metrics > div,
.manager-team-current-metrics > div,
.manager-team-comparison-grid article,
.manager-team-ranking-table th,
.manager-team-ranking-table td {
  line-height: 1.4;
}

.manager-team-personal-total-metrics dt,
.manager-team-current-metrics dt,
.manager-team-comparison-grid span {
  color: #687585;
  font-size: 13px;
  font-weight: 400;
}

.manager-team-personal-total-metrics dd,
.manager-team-current-metrics dd {
  margin: 6px 0 0;
  color: #354252;
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.manager-team-comparison-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manager-team-comparison-grid h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.manager-team-comparison-grid p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0 0;
}

.manager-team-comparison-grid strong {
  color: #354252;
  text-align: right;
  overflow-wrap: anywhere;
}

.manager-team-ranking-table-wrap {
  max-width: 100%;
  margin-top: 16px;
}

.manager-team-ranking-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin-top: 14px;
}

.manager-team-ranking-switch button {
  min-width: 0;
  white-space: normal;
}

.manager-team-ranking-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.manager-team-ranking-table th,
.manager-team-ranking-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #e2e7ea;
  text-align: left;
  overflow-wrap: anywhere;
}

.manager-team-ranking-table thead th {
  color: #687585;
  font-size: 13px;
  font-weight: 400;
}

.manager-team-ranking-table thead th:first-child {
  width: 72px;
}

.manager-team-ranking-table tbody tr.is-current-manager {
  background: #edf7f5;
}

.manager-team-current-label {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #0d6058;
  background: #dcefeb;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.manager-team-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.manager-team-name-text {
  min-width: 0;
}

.manager-team-place-marker {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  vertical-align: -1px;
  box-shadow: inset 0 0 0 2px #fff;
}

.manager-team-place-marker::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: -6px;
  width: 5px;
  height: 5px;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: rotate(45deg);
}

.manager-team-place-marker.is-first-place {
  color: #b98918;
  background: #efd47b;
}

.manager-team-place-marker.is-second-place {
  color: #7d8994;
  background: #ced5db;
}

.manager-team-place-marker.is-third-place {
  color: #9a653f;
  background: #d9a47a;
}

.manager-chart-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.manager-chart-controls label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #687585;
  font-size: 12px;
}

.manager-chart-controls select {
  width: 100%;
  max-width: 100%;
}

.manager-performance-chart-canvas {
  position: relative;
  height: 280px;
  margin-top: 18px;
}

.manager-performance-history-table {
  margin-top: 16px;
}

.manager-fact-card {
  padding: 26px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 41 55 / 7%);
}

.manager-date-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manager-date-picker label {
  color: #4b5868;
  font-weight: 700;
}

.manager-date-picker input {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #bfc8d2;
  background: #fff;
}

.manager-day-context {
  margin: 18px 0 22px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #354252;
  background: #eef4f3;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-line;
}

.manager-todos {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #f8fafb;
}

.manager-todos h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.manager-todo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e4e9ed;
}

.manager-todo:last-child {
  border-bottom: 0;
}

.manager-todo input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.manager-todo.is-completed .manager-todo-text {
  color: #64717e;
  text-decoration: line-through;
}

.manager-todo-status {
  color: #17643b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fact-sales-contours {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
}

.fact-sales-contour {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #f5f7f8;
}

.fact-sales-contour > h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.fact-repeat-sales-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fact-channel {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
}

.fact-channel legend {
  padding: 0 6px;
  font-weight: 700;
}

.fact-activity {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #f5f7f8;
}

.fact-activity legend {
  padding: 0;
  color: #26333f;
  font-size: 17px;
  font-weight: 700;
}

.fact-activity-fields {
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fff;
}

.fact-sales-channel legend {
  color: #0d7469;
}

.fact-sales-channel.is-legacy input {
  color: #6b6655;
  background: #f5f1e5;
}

.fact-sales-channel.is-legacy {
  border-color: #e4d6a7;
  background: #fffdf7;
}

.manager-fact-classification-note {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #4b5868;
  background: #eef4f3;
  font-size: 13px;
  line-height: 1.5;
}

.manager-fact-classification-note.is-legacy {
  color: #66582f;
  background: #fff8df;
}

.legacy-fact-history {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #e4d6a7;
  border-radius: 10px;
  color: #4e4325;
  background: #fffaf0;
}

.legacy-fact-history h3 {
  margin: 0;
  font-size: 17px;
}

.legacy-fact-history p {
  margin: 6px 0 0;
  color: #6b5e3f;
  font-size: 13px;
}

.legacy-fact-history dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.legacy-fact-history dl > div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgb(255 255 255 / 72%);
}

.legacy-fact-history dt {
  color: #796d50;
  font-size: 11px;
}

.legacy-fact-history dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.fact-activity {
  width: 100%;
  margin-top: 16px;
  box-sizing: border-box;
  background: #f5f7f8;
}

.fact-activity .fact-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact-field-grid {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(150px, 1.2fr);
  gap: 12px;
}

.fact-field-grid .form-field {
  max-width: none;
  margin-bottom: 0;
}

.field-label-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  max-width: 100%;
  min-height: 22px;
  margin-bottom: 8px;
  vertical-align: middle;
}

.form-field .field-label-row > label {
  min-width: 0;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
}

.field-help-button {
  display: inline-grid;
  flex: 0 0 20px;
  align-self: center;
  place-items: center;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid #aeb9c5;
  border-radius: 50%;
  color: #526171;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-2px);
  cursor: pointer;
}

.field-help-button:hover,
.field-help-button[aria-expanded="true"] {
  border-color: #6f8f89;
  color: #0d7469;
  background: #eef6f4;
}

.field-help-button:focus-visible,
.field-help-close:focus-visible {
  outline: 2px solid #2b8077;
  outline-offset: 2px;
}

.field-help-window {
  position: fixed;
  z-index: 1300;
  width: min(360px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow: auto;
  padding: 0 16px 16px;
  border: 1px solid #cfd8df;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 48px rgb(31 41 55 / 22%);
}

.field-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px 12px;
  padding: 12px 12px 10px 16px;
  border-bottom: 1px solid #e3e8ec;
  cursor: grab;
  touch-action: none;
}

.field-help-header h2 {
  margin: 0;
  font-size: 17px;
}

.field-help-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #526171;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.field-help-close:hover {
  color: #17212b;
  background: #eef1f3;
}

.field-help-description,
.field-help-example {
  margin: 0;
  color: #3f4d5c;
  line-height: 1.55;
}

.field-help-example {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f7f6;
  font-size: 13px;
  white-space: pre-line;
}

.field-help-backdrop {
  display: none;
}

.is-dragging-field-help,
.is-dragging-field-help * {
  cursor: grabbing !important;
  user-select: none !important;
}

.fact-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.fact-summary > div {
  padding: 14px;
  border-radius: 9px;
  background: #f5f7f8;
}

.fact-summary dt {
  margin-bottom: 7px;
  color: #667282;
  font-size: 13px;
}

.fact-summary dd {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.daily-result-state {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.daily-result-state h2 {
  margin: 0 0 7px;
  font-size: 19px;
}

.daily-result-state p {
  margin: 0;
  color: #44515f;
}

.daily-result-state .daily-result-advice {
  margin-top: 8px;
  font-weight: 600;
}

.daily-result-state.is-success {
  border-color: #c8dfd2;
  background: #eff8f2;
}

.daily-result-state.is-positive {
  border-color: #d3e2d9;
  background: #f2f7f3;
}

.daily-result-state.is-neutral {
  border-color: #eadba5;
  background: #fff9e8;
}

.daily-result-state.is-miss {
  border-color: #ebcccc;
  background: #fff2f2;
}

.manager-text-field {
  max-width: none;
}

.manager-text-field textarea {
  min-height: 88px;
}

.manager-actions {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
}

.manager-actions legend {
  padding: 0 6px;
  font-weight: 700;
}

.manager-actions > p {
  margin: 0 0 16px;
  color: #667282;
  font-size: 14px;
}

.manager-actions .form-field {
  max-width: none;
  margin-bottom: 14px;
}

.manager-reward {
  position: fixed;
  z-index: 1200;
  top: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  width: min(420px, calc(100vw - 36px));
  padding: 16px 18px;
  border: 1px solid #dcad49;
  border-radius: 12px;
  overflow-wrap: anywhere;
  color: #3d321d;
  background: #fff7df;
  box-shadow: 0 14px 34px rgb(66 48 14 / 18%);
  pointer-events: none;
  animation: manager-reward-in 420ms ease-out both;
}

.manager-reward.is-level-6 {
  border-color: #7899d4;
  color: #1f3154;
  background: linear-gradient(135deg, #eef4ff, #f6efff);
  box-shadow: 0 18px 42px rgb(45 72 128 / 25%);
  animation-name: manager-reward-level-6;
  animation-duration: 600ms;
}

.manager-reward-emoji {
  font-size: 30px;
  line-height: 1;
}

.manager-reward.is-level-6 .manager-reward-emoji {
  font-size: 36px;
}

.manager-reward strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.manager-reward p {
  margin: 0;
  line-height: 1.45;
}

@keyframes manager-reward-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes manager-reward-level-6 {
  0% { opacity: 0; transform: translateY(-16px) scale(0.96); }
  65% { opacity: 1; transform: translateY(2px) scale(1.015); }
  100% { transform: translateY(0) scale(1); }
}

@media (max-width: 1060px) {
  .fact-sales-contours,
  .fact-repeat-sales-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .manager-access-card {
    margin-top: 30px;
    padding: 24px 20px;
  }

  .manager-work-page {
    padding: 20px 14px 36px;
  }

  .manager-stats-context {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .manager-stats-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-stats-navigation {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .manager-personal-channel {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-personal-channel select {
    width: 100%;
  }

  .manager-fact-card,
  .manager-period-summary,
  .manager-period-detail,
  .manager-activity-stats,
  .manager-sales-structure,
  .manager-sales-legacy,
  .manager-performance-chart,
  .manager-performance-history,
  .manager-team-personal-total,
  .manager-team-current,
  .manager-team-comparison,
  .manager-team-ranking {
    padding: 20px 14px;
  }

  .manager-work-header,
  .manager-result-context {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-global-date {
    flex-basis: auto;
  }

  .manager-work-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .manager-period-summaries,
  .manager-period-summary dl,
  .manager-period-insights,
  .fact-sales-contours,
  .fact-repeat-sales-grid,
  .fact-field-grid,
  .fact-summary {
    grid-template-columns: 1fr;
  }

  .legacy-fact-history dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-activity-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-sales-legacy-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-sales-structure-metrics {
    grid-template-columns: 1fr;
  }

  .manager-comparison-table-wrap {
    overflow-x: visible;
  }

  .manager-comparison-table,
  .manager-comparison-table tbody,
  .manager-comparison-table tr,
  .manager-comparison-table th,
  .manager-comparison-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .manager-comparison-table thead {
    display: block;
  }

  .manager-comparison-table thead tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .manager-comparison-table thead th:first-child,
  .manager-comparison-table thead th:nth-child(n + 4) {
    display: none;
  }

  .manager-comparison-table thead th {
    padding: 8px;
    border: 1px solid #e1e6ea;
    border-radius: 8px;
  }

  .manager-comparison-table tbody tr {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dce1e7;
    border-radius: 9px;
  }

  .manager-comparison-table tbody th,
  .manager-comparison-table tbody td {
    display: grid;
    grid-template-columns: minmax(116px, 0.9fr) minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .manager-comparison-table tbody th::before,
  .manager-comparison-table tbody td::before {
    content: attr(data-label);
    color: #687585;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
  }

  .manager-comparison-subrow th {
    padding-left: 0;
  }

  .manager-comparison-subrow th::after {
    display: none;
  }

  .manager-history-table-wrap {
    overflow-x: visible;
  }

  .manager-performance-history-table,
  .manager-performance-history-table tbody,
  .manager-performance-history-table tfoot,
  .manager-performance-history-table tr,
  .manager-performance-history-table th,
  .manager-performance-history-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .manager-performance-history-table thead {
    display: none;
  }

  .manager-performance-history-table tr {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dce1e7;
    border-radius: 9px;
  }

  .manager-performance-history-table th,
  .manager-performance-history-table td {
    display: grid;
    grid-template-columns: minmax(112px, 0.9fr) minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
    text-align: right;
    white-space: normal;
  }

  .manager-performance-history-table tfoot tr {
    border-color: #bfc8d2;
  }

  .manager-performance-history-table th::before,
  .manager-performance-history-table td::before {
    content: attr(data-label);
    color: #687585;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
  }

  .manager-team-personal-total-metrics,
  .manager-team-current-metrics,
  .manager-team-comparison-grid {
    grid-template-columns: 1fr;
  }

  .manager-team-ranking-table thead {
    display: none;
  }

  .manager-team-ranking-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-team-ranking-table,
  .manager-team-ranking-table tbody,
  .manager-team-ranking-table tr,
  .manager-team-ranking-table th,
  .manager-team-ranking-table td {
    display: block;
    width: 100%;
  }

  .manager-team-ranking-table tr {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dce1e7;
    border-radius: 9px;
  }

  .manager-team-ranking-table th,
  .manager-team-ranking-table td {
    display: grid;
    grid-template-columns: minmax(108px, 0.8fr) minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .manager-team-ranking-table th::before,
  .manager-team-ranking-table td::before {
    content: attr(data-label);
    color: #687585;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
  }

  .manager-team-name {
    justify-self: end;
    justify-content: flex-end;
    text-align: right;
  }

  .fact-activity .fact-field-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .field-help-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1290;
    background: rgb(23 33 43 / 32%);
  }

  .field-help-window {
    top: auto !important;
    right: 12px;
    bottom: 12px;
    left: 12px !important;
    width: auto;
    max-height: min(72vh, 520px);
    border-radius: 14px;
  }

  .field-help-header {
    cursor: default;
    touch-action: auto;
  }

  .manager-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-chart-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #manager-grouping-switch {
    grid-column: 1 / -1;
  }

  .manager-performance-chart-canvas {
    height: 230px;
  }

  .manager-date-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-date-picker input {
    width: 100%;
  }

  .manager-todo {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .manager-todo-status {
    grid-column: 2;
  }

  .manager-reward {
    top: 12px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manager-reward,
  .manager-reward.is-level-6 {
    animation: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
}

button,
input,
textarea {
  border-radius: 8px;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.access-card {
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.brand,
.app-brand {
  color: #0d7469;
  font-weight: 700;
}

.brand {
  margin: 0 0 24px;
}

h1 {
  margin: 0 0 24px;
  font-size: 30px;
}

.access-card h1 {
  margin-bottom: 16px;
  font-size: 24px;
}

.access-card form {
  display: grid;
  gap: 10px;
}

.login-provider-option {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  text-align: center;
}

.login-provider-option > span {
  color: #667383;
  font-size: 14px;
}

.login-provider-option .secondary-button {
  display: block;
  text-decoration: none;
}

.directory-popover {
  position: absolute;
  z-index: 12;
  top: 68px;
  right: 0;
  display: grid;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 96px);
  gap: 14px;
  padding: 20px;
  overflow: auto;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(31 41 55 / 14%);
}

.directory-popover h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.directory-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: move;
  touch-action: none;
}

.directory-popover__header h2 {
  margin: 0;
}

.project-form-grid,
.work-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-form-grid__wide,
.work-form-grid__wide {
  grid-column: 1 / -1;
}

.icon-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #516170;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: #172b3f;
  background: #eef4f5;
}

.cancel-button {
  border-color: #dfa5a5;
  color: #9f3434;
  background: #fffafa;
}

.cancel-button:hover,
.cancel-button:focus-visible {
  border-color: #bd6262;
  color: #7b2525;
  background: #fff1f1;
}

.work-form-popover {
  position: fixed;
  z-index: 30;
  top: 92px;
  right: 32px;
}

.form-project-picker { position: relative; }
.form-project-picker__trigger {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #b9c8d6;
  border-radius: 8px;
  background: #fff;
  color: #172b3f;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.form-project-picker__trigger::after { content: "⌄"; margin-left: auto; color: #52687b; font-weight: 700; }
.form-project-picker__trigger.is-empty { color: #677789; }
.form-project-picker__trigger:hover,
.form-project-picker__trigger:focus-visible { border-color: #087c75; box-shadow: 0 0 0 3px rgb(8 124 117 / 14%); outline: 0; }
.form-project-picker__trigger .project-status-badge { margin-left: auto; }
.form-project-picker__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-project-picker__menu {
  position: absolute;
  z-index: 36;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  padding: 10px;
  border: 1px solid #cbd8df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgb(24 42 60 / 16%);
}
.form-project-picker__menu > input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #b9c8d6; border-radius: 8px; font: inherit; }
.form-project-picker__options { display: grid; gap: 6px; max-height: 220px; margin-top: 8px; overflow-y: auto; }
.form-project-picker__option { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px; border: 1px solid #dbe4eb; border-radius: 8px; background: #fff; color: #172b3f; font: inherit; text-align: left; cursor: pointer; }
.form-project-picker__option:hover,
.form-project-picker__option:focus-visible { border-color: #75b6b1; background: #f1faf8; outline: 0; }
.form-project-picker__option .project-status-badge { margin-left: auto; flex: 0 0 auto; }
.form-project-picker__empty { margin: 10px 0 0; color: #687789; font-size: 13px; }

.entity-page {
  display: grid;
  gap: 24px;
}

.back-link {
  justify-self: start;
  padding: 0;
  border: 0;
  color: #08756d;
  background: transparent;
  font-weight: 700;
}

.back-link:hover,
.back-link:focus-visible {
  color: #075d57;
}

.entity-page-heading h1 {
  margin-bottom: 4px;
}

.entity-kicker {
  margin: 0 0 6px;
  color: #6a7785;
  font-size: 13px;
  font-weight: 700;
}

.entity-summary-card,
.entity-section {
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
}

.entity-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}

.entity-avatar {
  display: inline-flex;
  flex: 0 0 72px;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 50%;
  color: #08756d;
  background: #e4f4f1;
  font-size: 25px;
  font-weight: 700;
}

.entity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-summary-card > div:last-child {
  min-width: 0;
  flex: 1 1 auto;
}

.entity-summary-card p {
  margin: 0 0 18px;
  line-height: 1.5;
}

.entity-section {
  padding: 22px 24px;
}

.entity-section h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.entity-section > h2:not(:first-child) {
  margin-top: 22px;
}

.entity-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.entity-facts div {
  min-width: 0;
}

.entity-facts dt {
  margin-bottom: 4px;
  color: #6a7785;
  font-size: 13px;
}

.entity-facts dd {
  margin: 0;
  color: #24384a;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.entity-page-link {
  border: 0;
  padding: 0;
  color: #08756d;
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.entity-page-link:hover,
.entity-page-link:focus-visible {
  color: #075d57;
}

.content-view:has(.directory-popover:not([hidden])) {
  position: relative;
}

.access-card label,
.form-field label {
  color: #4b5868;
  font-size: 14px;
  font-weight: 700;
}

.form-field:has([required]) > label::after {
  content: " *";
  color: #c53b3b;
}

.access-card input,
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #bfc8d2;
  border-radius: 8px;
  color: #17212b;
  background: #fff;
  font: inherit;
}

.access-card input,
.form-field input,
.form-field select {
  min-height: 44px;
}

.form-field textarea {
  min-height: 88px;
  overflow: hidden;
  resize: none;
}

.directory-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.directory-form-actions .primary-button,
.directory-form-actions .secondary-button {
  flex: 1 1 180px;
}

.primary-button,
.secondary-button,
.danger-button,
.header-button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #0d7469;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: #0d7469;
}

.secondary-button,
.header-button {
  color: #334150;
  background: #fff;
}

.danger-button {
  border-color: #a73636;
  color: #fff;
  background: #a73636;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 12px 24px;
  border-bottom: 1px solid #dce1e7;
  background: #fff;
}

.app-brand {
  flex: 0 0 auto;
}

.app-navigation {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  overflow-x: auto;
}

.nav-item {
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  color: #5c6876;
  background: transparent;
  white-space: nowrap;
}

.nav-item.is-active {
  color: #0d6058;
  background: #e4f4f1;
  font-weight: 700;
}

.nav-item:disabled {
  cursor: default;
  opacity: 0.55;
}

.header-button {
  flex: 0 0 auto;
}

.app-content {
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 20px 0 60px;
}

.global-page-controls {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 8px 0;
  background: #f4f6f8;
}

.app-command-bar {
  border-bottom: 1px solid #dce4ea;
  background: rgb(244 246 248 / 96%);
  backdrop-filter: blur(8px);
}

.global-page-controls__navigation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 360px) {
  .global-page-controls { flex-wrap: wrap; gap: 8px; }
}

.page-record-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.page-record-actions[hidden] { display: none; }

.header-action-menu {
  position: relative;
}

.header-action-menu__content {
  position: absolute;
  z-index: 45;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 190px;
  padding: 6px;
  border: 1px solid #d5e0e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(31 41 55 / 15%);
}

.header-action-menu__content.relations-menu {
  width: min(460px, calc(100vw - 32px));
  max-height: min(72vh, 680px);
  overflow: auto;
  padding: 14px;
}

.relations-menu .work-relations {
  position: static;
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.relations-menu .relation-list,
.relations-menu .relation-group { margin: 8px 0 0; }
.relations-menu .relation-form { margin: 8px 0 12px; }
.relations-menu .relation-form label { display: grid; gap: 5px; margin: 8px 0; color: #52657a; font-size: 13px; }
.relations-menu .relation-form input,
.relations-menu .relation-form select { width: 100%; min-height: 38px; border: 1px solid #cbd6df; border-radius: 8px; padding: 7px 10px; background: #fff; color: #172b3f; font: inherit; }
.relations-menu__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e1e8ee; }
.relations-menu__actions button { border: 0; background: transparent; color: #087c75; font: inherit; cursor: pointer; text-align: left; }
.relations-menu__actions button:hover { text-decoration: underline; }

.header-action-menu__content button {
  border: 0;
  border-radius: 7px;
  padding: 9px 10px;
  color: #203448;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.header-action-menu__content button:hover,
.header-action-menu__content button:focus-visible {
  background: #e6f5f2;
  outline: 0;
}

.global-page-controls .sidebar-toggle {
  width: 36px;
  padding: 0;
  border: 1px solid #d5e0e7;
}

.page-breadcrumbs {
  min-height: 22px;
  margin: 0 0 14px;
  color: #687789;
  font-size: 13px;
}

.page-breadcrumbs button {
  border: 0;
  padding: 0;
  color: #087c75;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.page-breadcrumbs button:hover,
.page-breadcrumbs button:focus-visible {
  color: #075d57;
}

.app-shell {
  --sidebar-width: 264px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f6f8;
}

.app-shell.sidebar-collapsed {
  --sidebar-width: 76px;
}

.app-sidebar {
  position: sticky;
  top: 0;
  /* Above the sticky command bar (40) so collapsed flyouts cover page content; below modals (1000+). */
  z-index: 50;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 14px 12px;
  overflow: visible;
  border-right: 1px solid #dce1e7;
  background: #fff;
  transition: width 160ms ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 8px;
  padding: 0 4px 16px;
  border-bottom: 1px solid #e7ebef;
}

.app-logo {
  width: 170px;
  height: auto;
  min-width: 0;
}

.app-logo-mark {
  display: none;
  width: 36px;
  height: auto;
}

.app-shell.sidebar-collapsed .app-logo-mark {
  display: block;
}

.sidebar-toggle,
.sidebar-user,
.sidebar-logout,
.nav-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #334150;
  background: transparent;
}

.sidebar-toggle {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 20px;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.sidebar-user:hover,
.sidebar-user:focus-visible,
.sidebar-logout:hover,
.sidebar-logout:focus-visible,
.nav-group-toggle:hover,
.nav-group-toggle:focus-visible {
  background: #e4f4f1;
}

.app-navigation {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 4px;
  min-height: 0;
  margin-right: -8px;
  padding-top: 16px;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #c9d2db transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.app-navigation::-webkit-scrollbar {
  width: 4px;
}

.app-navigation::-webkit-scrollbar-track {
  background: transparent;
}

.app-navigation::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #c9d2db;
}

.app-navigation::-webkit-scrollbar-thumb:hover {
  background: #9aa8b6;
}

.sidebar-brand,
.sidebar-footer {
  flex: 0 0 auto;
}

/* Flyout submenus and tooltips of the collapsed sidebar must not be clipped. */
.app-shell.sidebar-collapsed .app-navigation {
  margin-right: 0;
  padding-right: 0;
  overflow: visible;
  scrollbar-gutter: auto;
}

.nav-group {
  position: relative;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  color: #334150;
  background: transparent;
  text-align: left;
}

.nav-group-chevron {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.nav-group-toggle[aria-expanded="false"] .nav-group-chevron {
  transform: rotate(-90deg);
}

.nav-group-menu {
  display: grid;
  gap: 2px;
  padding: 2px 0 6px 12px;
}

.nav-group[data-expanded="false"] .nav-group-menu {
  display: none;
}

.nav-item,
.sidebar-logout {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  gap: 12px;
  border-radius: 8px;
  text-align: left;
}

.nav-item {
  display: flex;
  align-items: center;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nav-icon,
.user-menu-action-svg {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin: 0 1px;
}

.user-menu-action-svg {
  width: 18px;
  height: 18px;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid #e7ebef;
}

.sidebar-user-menu {
  position: relative;
}

.sidebar-user {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 7px 8px;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #24384a;
  background: transparent;
  text-align: left;
}

.sidebar-avatar {
  position: relative;
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: #e4f4f1;
  color: #08756d;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-details {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-user-details strong,
.sidebar-user-details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-details span {
  color: #6a7785;
  font-size: 12px;
}

.sidebar-logout {
  display: flex;
  font-weight: 700;
}

.sidebar-user-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  display: grid;
  min-width: 240px;
  padding: 6px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgb(31 41 55 / 16%);
}

.sidebar-user-popover[hidden] {
  display: none;
}

.sidebar-user-popover button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  color: #24384a;
  background: transparent;
  text-align: left;
}

.user-menu-action-icon {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #08756d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-user-popover button:hover,
.sidebar-user-popover button:focus-visible {
  background: #e4f4f1;
}

.app-shell.sidebar-collapsed .app-logo,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-group-chevron,
.app-shell.sidebar-collapsed .sidebar-user-details {
  display: none;
}

.app-shell.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .nav-group-toggle {
  gap: 0;
  font-size: 0;
}

.app-shell.sidebar-collapsed .sidebar-brand,
.app-shell.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .nav-group-toggle,
.app-shell.sidebar-collapsed .sidebar-user,
.app-shell.sidebar-collapsed .sidebar-logout {
  justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  padding-left: 0;
  padding-right: 0;
}

.app-shell.sidebar-collapsed .nav-group-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  z-index: 35;
  display: none !important;
  width: 220px;
  padding: 8px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgb(31 41 55 / 16%);
}

.app-shell.sidebar-collapsed .nav-group:hover .nav-group-menu,
.app-shell.sidebar-collapsed .nav-group:focus-within .nav-group-menu {
  display: grid !important;
}

.app-shell.sidebar-collapsed .nav-group-menu .nav-item {
  justify-content: flex-start;
  gap: 12px;
  font-size: inherit;
}

.app-shell.sidebar-collapsed .nav-item::after,
.app-shell.sidebar-collapsed .nav-group-toggle::after,
.app-shell.sidebar-collapsed .sidebar-user::after,
.app-shell.sidebar-collapsed .sidebar-logout::after {
  position: absolute;
  left: calc(100% + 12px);
  z-index: 40;
  display: none;
  padding: 7px 9px;
  border-radius: 7px;
  color: #fff;
  background: #334150;
  box-shadow: 0 5px 14px rgb(31 41 55 / 18%);
  content: attr(title);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.app-shell.sidebar-collapsed .nav-item:hover::after,
.app-shell.sidebar-collapsed .nav-item:focus-visible::after,
.app-shell.sidebar-collapsed .nav-group-toggle:hover::after,
.app-shell.sidebar-collapsed .nav-group-toggle:focus-visible::after,
.app-shell.sidebar-collapsed .sidebar-user:hover::after,
.app-shell.sidebar-collapsed .sidebar-user:focus-visible::after,
.app-shell.sidebar-collapsed .sidebar-logout:hover::after,
.app-shell.sidebar-collapsed .sidebar-logout:focus-visible::after {
  display: block;
}

.app-shell.sidebar-collapsed .nav-group:hover .nav-group-toggle::after,
.app-shell.sidebar-collapsed .nav-group:focus-within .nav-group-toggle::after {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-user-popover {
  right: auto;
  bottom: 0;
  left: calc(100% + 12px);
}

.directory-unsaved-popover {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: min(380px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(31 41 55 / 18%);
}

.directory-unsaved-popover h2,
.directory-unsaved-popover p {
  margin: 0;
}

.directory-unsaved-popover p {
  margin-top: 6px;
  color: #5c6876;
}

.directory-unsaved-popover .directory-form-actions {
  margin-top: 16px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin-bottom: 0;
}

.manager-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid #cbd2da;
  border-radius: 999px;
  color: #526071;
  background: #fff;
}

.filter-button.is-active {
  border-color: #0d7469;
  color: #0d6058;
  background: #e4f4f1;
  font-weight: 700;
}

.loading-state {
  color: #667282;
}

.empty-state {
  padding: 36px 24px;
  border: 1px dashed #cbd2da;
  border-radius: 10px;
  color: #697585;
  text-align: center;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fff;
}

.managers-table {
  width: 100%;
  border-collapse: collapse;
}

.managers-table th,
.managers-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e9ee;
  text-align: left;
  vertical-align: middle;
}

.managers-table th {
  color: #566373;
  background: #f8f9fa;
  font-size: 13px;
}

.managers-table tr:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-active {
  color: #17643b;
  background: #e6f5ec;
}

.status-inactive {
  color: #755b12;
  background: #fff6d8;
}

.status-dismissed {
  color: #6d737c;
  background: #eceff2;
}

.link-button {
  padding: 0;
  border: 0;
  color: #0d6d64;
  background: transparent;
  text-decoration: none;
}

.muted-text {
  color: #7e8895;
}

.actions-trigger {
  width: 36px;
  height: 36px;
  border: 0;
  color: #273340;
  background: transparent;
  font-size: 23px;
  line-height: 30px;
  text-align: center;
}

.actions-trigger:hover,
.actions-trigger[aria-expanded="true"] {
  background: #edf1f3;
}

.manager-actions-popover {
  position: fixed;
  z-index: 15;
  width: min(230px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d3d9df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(31 41 55 / 14%);
}

.manager-actions-popover button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  color: #273340;
  background: transparent;
  text-align: left;
}

.manager-actions-popover button:hover {
  background: #f1f4f5;
}

.manager-actions-popover button.danger-text {
  color: #9f2d2d;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(21 29 38 / 48%);
}

.modal {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 60px rgb(18 27 36 / 22%);
}

.modal h2 {
  margin: 0 40px 22px 0;
  font-size: 22px;
}

.redistribution-confirm-modal {
  width: min(100%, 440px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  color: #5e6a78;
  background: transparent;
  font-size: 24px;
}

.modal-close:hover {
  background: #eef1f3;
}

.form-field {
  max-width: none;
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.modal-manager-name {
  margin: -10px 0 24px;
  font-size: 18px;
  font-weight: 700;
}

.manager-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 20px;
  margin: 0;
}

.manager-details dt {
  color: #667282;
}

.manager-details dd {
  margin: 0;
  font-weight: 700;
}

.form-message {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 14px;
}

.form-message.is-success {
  color: #17643b;
}

.form-message.is-error {
  color: #9f2d2d;
}

.release-update-banner {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(calc(100vw - 40px), 560px);
  padding: 12px 14px;
  border: 1px solid #b7c5d5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(31 41 55 / 16%);
}

.release-update-banner p {
  flex: 1 1 auto;
  margin: 0;
  color: #25364a;
  font-size: 14px;
}

@media (max-width: 600px) {
  .release-update-banner {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    align-items: stretch;
    flex-direction: column;
  }

  .release-update-banner .secondary-button {
    width: 100%;
  }
}

.month-navigation {
  display: grid;
  grid-template-columns: 42px minmax(180px, auto) 42px;
  align-items: center;
  justify-content: start;
  gap: 10px;
  margin-bottom: 22px;
}

.month-button {
  width: 42px;
  height: 42px;
  border: 1px solid #cbd2da;
  color: #263442;
  background: #fff;
  font-size: 25px;
  line-height: 1;
}

.month-button:hover:not(:disabled) {
  border-color: #678077;
  background: #f9fbfa;
}

.month-label {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.loading-state.is-error {
  color: #9f2d2d;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.dashboard-heading h1 {
  margin: 0 0 6px;
}

.dashboard-period-title {
  margin: 0;
  color: #344252;
  font-size: 20px;
  font-weight: 700;
}

.dashboard-period-boundaries {
  min-height: 20px;
  margin: 3px 0 0;
  color: #697585;
  font-size: 14px;
}

.dashboard-date-field {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  color: #526071;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-date-field input {
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #c5cdd5;
  color: #273340;
  background: #fff;
}

.dashboard-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.dashboard-loading {
  padding: 24px 0;
}

.dashboard-error {
  padding: 20px;
  border: 1px solid #ebcccc;
  border-radius: 10px;
  color: #7e2828;
  background: #fff2f2;
}

.dashboard-error p {
  margin: 0 0 14px;
}

.dashboard-scope {
  margin: 0 0 14px;
  color: #4c5b69;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-period-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.work-period-controls .form-field {
  min-width: 190px;
  margin: 0;
}

.work-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.work-kpi-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.work-kpi-card span,
.work-kpi-card small { color: #667585; font-size: 13px; }
.work-kpi-card strong { color: #172b3f; font-size: 30px; font-variant-numeric: tabular-nums; }
.work-kpi-card--positive strong { color: #006d69; }
.work-kpi-card--danger strong { color: #b42318; }

.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 24px; align-items: start; }
.record-layout > main { display: grid; gap: 18px; }
#work-entity-content { container: work-record / inline-size; }
.project-record-layout > main { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.project-record-layout > main > * { min-width: 0; }
.project-record-layout .work-record-links { grid-template-columns: minmax(0, 1fr); }
.project-record-layout .project-task-link { min-width: 0; flex-wrap: wrap; }
.project-record-layout .task-close-expected { min-width: 0; overflow-wrap: anywhere; }
.project-record-layout .work-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
@container work-record (max-width: 1063px) {
  .project-record-layout { grid-template-columns: minmax(0, 1fr); }
  .project-record-layout > .project-context-column { position: static; }
}
@container work-record (max-width: 500px) {
  .project-record-layout .project-role-grid { grid-template-columns: 1fr; }
}
.entity-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.entity-page-heading > div { min-width: 0; }
.entity-actions, .entity-section__header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.entity-section__header { justify-content: space-between; margin-bottom: 16px; }
.entity-section__header h2 { margin: 0; }
.entity-actions .secondary-button, .entity-section__header .secondary-button { min-height: 36px; padding: 7px 10px; }
.work-relations { position: sticky; top: 20px; border: 1px solid #d9e1e8; border-radius: 12px; padding: 18px; background: #fff; box-shadow: 0 12px 28px rgb(24 42 60 / 8%); }
.work-relations h2 { margin: 0 0 6px; font-size: 20px; }
.relation-list { margin: 14px 0; padding: 0; list-style: none; }
.relation-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f4; font-size: 14px; }
.relation-group { padding: 10px 0; border-top: 1px solid #edf1f4; }
.relation-group h3 { display: inline; margin: 0 8px 0 0; font-size: 14px; }
.relation-group .relation-form { margin-top: 10px; }
.relation-form { display: grid; gap: 10px; }
.relation-form label, #task-close-form label, #sprint-close-form label { display: grid; gap: 5px; color: #43566b; font-size: 13px; font-weight: 700; }
.relation-form select, #task-close-form select, #task-close-form textarea, #task-close-form input, #sprint-close-form textarea { width: 100%; }
.entity-breadcrumbs { margin: 16px 0 8px; color: #667585; font-size: 14px; }
.entity-breadcrumbs button { border: 0; padding: 0; background: transparent; color: #087c75; font: inherit; text-decoration: none; cursor: pointer; }
.component-form { display: grid; gap: 12px; margin-top: 14px; max-width: 620px; }
.component-form label { display: grid; gap: 6px; color: #43566b; font-size: 14px; font-weight: 700; }
.component-form input, .component-form textarea, .component-form select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #b9c8d6; border-radius: 8px; background: #fff; color: #172b3f; font: inherit; }
.component-form textarea { min-height: 90px; resize: vertical; }
.project-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.project-role-grid article, .project-team-card, .project-material-card { border: 1px solid #dbe4eb; border-radius: 10px; background: #fff; padding: 12px; }
.project-role-grid span, .project-team-card span, .project-material-card p, .project-material-card small { display: block; color: #66788b; font-size: 13px; }
.project-role-grid strong { display: block; margin-top: 5px; }
.project-role-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-role-card label { display: grid; min-width: 0; flex: 1; gap: 5px; color: #66788b; font-size: 13px; }
.project-role-card select { width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid #b9c8d6; border-radius: 8px; background: #fff; color: #172b3f; font: inherit; }
.project-role-card__actions { display: flex; gap: 5px; }
.project-team-list, .project-material-grid { display: grid; gap: 8px; }
.project-team-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-team-inline-form, .task-team-inline-form, .task-step-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid #9ed9d4; border-radius: 10px; background: #f6fcfb; }
.project-team-inline-form label, .task-team-inline-form label, .task-step-inline-form label { display: grid; min-width: 0; gap: 5px; color: #66788b; font-size: 13px; }
.project-team-inline-form select, .project-team-inline-form input, .task-team-inline-form select, .task-team-inline-form input, .task-step-inline-form input { width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid #b9c8d6; border-radius: 8px; background: #fff; color: #172b3f; font: inherit; }
.task-step-inline-form { grid-template-columns: minmax(0, 1fr) auto; }
.project-team-inline-form__actions { display: flex; gap: 5px; padding-bottom: 0; }
.project-material-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.project-context-column { position: sticky; top: 70px; display: grid; gap: 16px; align-self: start; }
.task-context-column { max-height: calc(100vh - 88px); overflow: auto; padding: 2px 4px 4px 0; }
.task-checklist { display: grid; gap: 2px; }
.task-project-context { margin: 6px 0 0; color: #61758a; font-size: 14px; }
.task-project-context .entity-title-link { display: inline; padding: 0; }
.task-note-form, .task-link-form { margin-top: 10px; }
.task-note-form { display: grid; gap: 8px; }
.breadcrumb-warning { color: #a44324; font-weight: 700; }
.work-form-origin { margin: 4px 0 0; color: #65788c; font-size: 12px; font-weight: 400; }
.directory-popover__header-actions { display: flex; align-items: center; gap: 8px; }
.work-form-return { white-space: nowrap; }
.project-side-section { display: grid; gap: 12px; padding: 18px; border: 1px solid #d9e1e8; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgb(24 42 60 / 8%); }
.project-side-section h2 { margin: 0; font-size: 20px; }
.project-side-section .project-material-grid { grid-template-columns: 1fr; }
.project-notes-list { display: grid; gap: 9px; }
.project-note-card { padding: 10px; border-radius: 9px; background: #f5f8fa; }
.project-note-card__content > :first-child { margin-top: 0; }
.project-note-card__content > :last-child { margin-bottom: 7px; }
.project-note-card__content p { white-space: pre-wrap; }
.project-note-card small { color: #687789; }
.project-note-form { display: grid; gap: 8px; }
.rich-text-editor { min-height: 128px; }
.rich-text-editor--note, .rich-text-editor--note .rich-text-editor__content, .rich-text-editor--note .rich-text-editor__content .ProseMirror { min-height: 96px; }
.rich-text-editor--inline-task, .rich-text-editor--inline-task .rich-text-editor__content, .rich-text-editor--inline-task .rich-text-editor__content .ProseMirror { min-height: 144px; }
.rich-text-editor--task-outcome, .rich-text-editor--task-outcome .rich-text-editor__content, .rich-text-editor--task-outcome .rich-text-editor__content .ProseMirror { min-height: 128px; }
.rich-text-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px; border: 1px solid #d7e0e7; border-bottom: 0; border-radius: 8px 8px 0 0; background: #f7fafb; }
.rich-text-toolbar__button { display: inline-grid; place-items: center; width: 34px; min-width: 34px; min-height: 30px; padding: 3px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #365064; cursor: pointer; }
.rich-text-toolbar__button svg { width: 19px; height: 19px; fill: currentColor; }
.rich-text-toolbar__button:hover, .rich-text-toolbar__button:focus-visible, .rich-text-toolbar__button.is-active { border-color: #76b8b2; background: #e7f5f2; color: #076f68; outline: 0; }
.rich-text-editor__content { min-height: 112px; border: 1px solid #bfc8d2; border-radius: 0 0 8px 8px; background: #fff; color: #17212b; line-height: 1.48; overflow-wrap: anywhere; }
.rich-text-editor__content:focus-within { border-color: #087c75; box-shadow: 0 0 0 3px rgb(8 124 117 / 14%); }
.rich-text-editor__content .ProseMirror { min-height: 112px; padding: 10px 12px; outline: none; }
.rich-text-editor__content p { margin: 0 0 10px; }
.rich-text-editor__content p:last-child { margin-bottom: 0; }
.rich-text-editor__content ul, .rich-text-editor__content ol, .rich-text-content ul, .rich-text-content ol { margin: 8px 0; padding-left: 24px; }
.rich-text-editor__content a, .rich-text-content a { color: #087c75; text-decoration: underline; }
.rich-text-editor__content img, .rich-text-content img { display: block; max-width: 100%; height: auto; margin: 10px 0; border-radius: 8px; }
.rich-text-content { overflow-wrap: anywhere; line-height: 1.5; }
.rich-text-content > :first-child { margin-top: 0; }
.rich-text-content > :last-child { margin-bottom: 0; }
.rich-text-content--plain { white-space: normal; }
.project-inline-add { display: block; width: 100%; margin: 10px 0; padding: 11px; border: 1px dashed #72b6b0; border-radius: 9px; color: #087c75; background: #f5fbfa; font: inherit; font-weight: 700; cursor: pointer; }
.project-inline-add:hover, .project-inline-add:focus-visible { border-color: #087c75; background: #e6f5f2; outline: 0; }
.project-inline-form { display: grid; gap: 12px; padding: 14px; margin: 10px 0; border: 1px solid #b9dcd7; border-radius: 10px; background: #f8fcfb; }
.project-inline-form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-inline-form__pair--schedule { grid-template-columns: minmax(0, 2fr) minmax(132px, 1fr) minmax(120px, 1fr); }
.project-task-close-form .form-field { width: 100%; }
.project-task-close-form .form-field { margin: 0; }
.task-close-expected > strong { display: block; margin-bottom: 8px; color: #61758a; font-size: 12px; text-transform: uppercase; }
.task-close-expected p { margin: 0; }
.task-outcome-choices { min-width: 0; padding: 0; margin: 0; border: 0; }
.task-outcome-choices legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.task-outcome-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.task-outcome-option { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid #b9cfc9; border-radius: 10px; background: white; cursor: pointer; }
.task-outcome-option input, #task-close-form .task-outcome-option input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.task-outcome-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; color: #536c6a; background: #e8f0ed; font-weight: 700; }
.task-outcome-option strong, .task-outcome-option small { display: block; }
.task-outcome-option small { margin-top: 3px; color: #66788b; font-size: 12px; }
.task-outcome-option:has(input:focus-visible) { outline: 3px solid #7bbcb4; outline-offset: 2px; }
.task-outcome-option--win:has(input:checked) { border-color: #087c75; background: #e2f3ed; }
.task-outcome-option--win:has(input:checked) .task-outcome-icon { background: #087c75; color: white; }
.task-outcome-option--loss:has(input:checked) { border-color: #c4534d; background: #faecea; }
.task-outcome-option--loss:has(input:checked) .task-outcome-icon { background: #b94e49; color: white; }
.task-close-actions .primary-button, .task-close-actions .secondary-button { flex: 0 1 auto; }
@media (max-width: 600px) { .task-outcome-options { grid-template-columns: 1fr; } .task-close-actions > button { flex: 1 1 100% !important; } }
.required-mark { color: #b42318; }
.project-inline-form textarea { min-height: 82px; overflow: hidden; resize: none; }
.task-title-type-row { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr); gap: 12px; }
.task-title-type-row .form-field { min-width: 0; }
.task-meeting-participants { display: grid; grid-column: 1 / -1; gap: 8px; padding: 12px; border: 1px solid #b9dcd7; border-radius: 10px; background: #f6fcfb; }
.task-meeting-participants > label { color: #43566b; font-size: 13px; font-weight: 700; }
.task-meeting-participants__list { display: flex; flex-wrap: wrap; gap: 7px; }
.task-meeting-person { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: #075f5a; background: #e2f3f0; font-size: 14px; }
.task-meeting-person button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; color: #075f5a; background: transparent; font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.task-meeting-person button:hover, .task-meeting-person button:focus-visible { color: #fff; background: #087c75; outline: 0; }
.task-meeting-participants__add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.task-meeting-participants__add select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #b9c8d6; border-radius: 8px; color: #172b3f; background: #fff; font: inherit; }
.record-picker { position: fixed; z-index: 34; width: min(360px, calc(100% - 32px)); padding: 12px; }
.record-picker__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.record-picker__choice { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 4px; border: 0; border-top: 1px solid #e4eaef; background: transparent; color: #0b756e; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.record-picker__choice:first-of-type { margin-top: 8px; }
.record-picker__choice:hover, .record-picker__choice:focus-visible { color: #075d57; background: #f1faf8; outline: 0; }
.record-picker__search { display: grid; gap: 6px; margin: 16px 0 8px; font-weight: 700; }
.record-picker__type { display: grid; gap: 5px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.record-picker__relation-stage { margin-top: 8px; padding-top: 10px; border-top: 1px solid #e4eaef; }
.record-picker__selected { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 8px; }
.record-picker__selected span { color: #66788b; font-size: 12px; }
.record-picker__selected strong { min-width: 0; overflow-wrap: anywhere; }
.record-picker__selected .link-button { grid-column: 2; grid-row: 1 / span 2; }
.record-picker__item--select { width: 100%; cursor: pointer; text-align: left; }
.record-picker__item--select:hover, .record-picker__item--select:focus-visible { border-color: #75b6b1; background: #f1faf8; outline: 0; }
.record-picker__results { display: grid; gap: 8px; max-height: min(42vh, 360px); overflow-y: auto; margin: 14px 0; }
.record-picker__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #dbe4eb; border-radius: 9px; background: #fff; }
.record-picker__item > div { min-width: 0; }
.record-picker__item strong, .record-picker__item small { display: block; }
.record-picker__item strong { overflow-wrap: anywhere; }
.record-picker__item small { margin-top: 3px; color: #687789; }
.record-picker__item .secondary-button { flex: 0 0 auto; }
.record-picker__create { margin-top: 2px; }
.record-picker__confirmation { min-height: 0; margin-top: 14px; }
.record-picker__confirmation:not(:empty) { padding: 12px; border-radius: 9px; background: #fff3d8; color: #654400; }
.record-picker__confirmation p { margin: 0 0 10px; }
.project-list-title, .project-record-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.project-record-title h1 { margin: 0; }
.project-type-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; }
.project-type-icon--process { color: #7155a5; background: #eee9fa; }
.project-type-icon--internal { color: #087c75; background: #e6f5f2; }
.project-type-icon--external { color: #2370a6; background: #e8f2fb; }
.project-priority-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.project-priority-badge--low { color: #596b7a; background: #edf1f4; }
.project-priority-badge--standard { color: #9b6710; background: #fff3d8; }
.project-priority-badge--high { color: #a22f3b; background: #fee7e8; }
.project-status-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.project-status-badge--planned { color: #9b6710; background: #fff3d8; }
.project-status-badge--active { color: #087c75; background: #e6f5f2; }
.project-status-badge--paused { color: #7b5b08; background: #fff0c6; }
.project-status-badge--completed { color: #24663d; background: #e7f5eb; }
.project-status-badge--cancelled { color: #a22f3b; background: #fee7e8; }
.project-material-card { display: grid; gap: 8px; }
.project-material-card a { color: #00796f; font-weight: 700; text-decoration: none; }
.project-material-card a:hover { color: #005f58; }
.file-drop-zone { min-height: 132px; align-content: center; border: 1px dashed #79b7b0; border-radius: 10px; background: #f5fbfa; padding: 18px; text-align: center; cursor: pointer; }
.file-drop-zone.is-dragover { background: #e4f4f1; border-color: #087b71; }
.file-drop-zone input { margin-top: 10px; }
.materials-component { gap: 10px; }
.materials-component > .entity-section__header { margin-bottom: 0; }
.materials-component > .entity-section__header .muted { margin: 2px 0 0; line-height: 1.25; }
.materials-component h3 { margin: 0 0 7px; font-size: 14px; color: #52677b; }
.materials-section { display: grid; gap: 9px; }
.materials-section__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.materials-section__header h3 { margin: 0; }
.materials-file-area { display: grid; gap: 9px; padding: 12px; border: 1px dashed #79b7b0; border-radius: 10px; background: #f5fbfa; transition: border-color .15s ease, background .15s ease; }
.materials-file-area.is-dragover { border-color: #087b71; background: #e4f4f1; }
.materials-drop-zone { display: grid; justify-items: center; gap: 5px; min-height: 112px; padding: 10px; text-align: center; cursor: pointer; }
.materials-drop-zone > span { color: #087b71; font-size: 26px; line-height: 1; }
.materials-drop-zone small { color: #66788b; }
.materials-drop-zone small + small { font-size: 12px; }
.materials-drop-zone input { display: none; }
.materials-component .form-message.is-warning { margin-top: 8px; color: #865800; font-weight: 600; }
.material-link-button, .material-file-button { width: auto; white-space: nowrap; }
.materials-file-area .project-material-grid { gap: 8px; }
.materials-file-area .project-material-card, .materials-file-area .empty-state { background: #fff; }
.project-material-card { grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 10px; }
.material-file-badge { display: grid; place-items: center; min-width: 38px; min-height: 38px; border-radius: 8px; background: #e8f5f3; color: #087b71; font-size: 11px; font-weight: 700; }
.material-file-badge--pdf { background: #ffebeb; color: #bc3028; }
.material-file-badge--png, .material-file-badge--jpg, .material-file-badge--jpeg { background: #e5f6f2; color: #087b71; }
.material-file-badge--doc, .material-file-badge--docx { background: #e9f0ff; color: #2658aa; }
.material-file-badge--xls, .material-file-badge--xlsx { background: #e8f5e9; color: #26783a; }
.material-file-badge--txt, .material-file-badge--md { background: #f0f2f5; color: #52677b; }
.material-file-badge--link { background: #edf2ff; color: #405ad2; }
.material-card__body { min-width: 0; }
.material-card__body a, .material-title { display: block; max-width: 100%; overflow: hidden; color: #00796f; font: inherit; font-weight: 700; text-align: left; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.material-title { padding: 0; border: 0; background: transparent; cursor: pointer; }
.material-title:disabled { color: #172b3f; cursor: default; }
.material-card__body p { margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-menu { position: relative; }
.material-menu__trigger { padding: 0; border: 0; background: transparent; color: #52677b; font: inherit; font-size: 20px; line-height: 20px; cursor: pointer; }
.material-menu__panel { position: absolute; z-index: 20; top: 26px; right: 0; display: grid; min-width: 152px; padding: 6px; border: 1px solid #d9e1e8; border-radius: 8px; background: #fff; box-shadow: 0 10px 22px rgb(24 42 60 / 16%); }
.material-menu__panel[hidden] { display: none; }
.material-menu button, .material-menu a, .material-action { padding: 7px 8px; border: 0; background: transparent; color: #172b3f; font: inherit; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.material-menu .material-delete { color: #c7352b; }
.material-action { font-size: 13px; }
.material-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 18px; background: rgb(15 32 48 / 45%); }
.material-modal__dialog { display: grid; gap: 14px; width: min(760px, 100%); max-height: calc(100vh - 36px); padding: 18px; overflow: auto; border-radius: 12px; background: #fff; box-shadow: 0 18px 44px rgb(15 32 48 / 25%); }
.material-modal__dialog iframe { width: 100%; min-height: min(65vh, 560px); border: 1px solid #d9e1e8; border-radius: 8px; }
.material-delete-dialog { width: min(430px, 100%); }
.material-delete-dialog p { margin: 0; color: #52677b; }
.material-image-viewport { position: relative; display: grid; min-width: 0; place-items: center; height: min(65vh, 560px); min-height: 260px; overflow: auto; border: 1px solid #d9e1e8; border-radius: 8px; background: #f5f8fa; touch-action: none; }
.material-image-viewport img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; transform-origin: center center; user-select: none; }
.material-image-viewport.is-fit-height { overflow: hidden; }
.material-image-viewport img.is-fit-height { width: auto; height: 100%; max-width: none; max-height: none; }
.material-image-viewport.is-panning { cursor: grabbing; }
.material-image-viewport:not(.is-panning) img { cursor: grab; }
.material-preview-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.material-preview-controls button { min-height: 36px; padding: 6px 11px; border: 1px solid #b8c7d6; border-radius: 7px; background: #fff; color: #173a55; font: inherit; cursor: pointer; }
.material-preview-controls button:hover { border-color: #087c77; color: #087c77; }
.material-copy-toast { position: fixed; z-index: 1100; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 11px 16px; border-radius: 9px; background: #173a55; color: #fff; box-shadow: 0 10px 22px rgb(15 32 48 / 25%); }
.project-expense-table { margin-top: 16px; }
.work-record-links { display: grid; gap: 10px; }
.work-record-link { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #e0e7ec; border-radius: 10px; background: #fbfcfd; }
.work-record-link .entity-title-link { min-width: 0; }
.project-task-link { align-items: center; }
.task-type-icon { display: inline-grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; font-weight: 800; }
.task-type-icon--task { color: #006d69; background: #e6f5f2; }
.task-type-icon--meeting { color: #285ea8; background: #e9f1ff; }
.task-type-icon--call { color: #9a5710; background: #fff0d8; }
.project-task-link__main { display: flex; min-width: 0; flex: 1 1 260px; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-task-link__main .entity-title-link { text-align: left; }
.project-task-link__deadline, .project-task-link__executor { color: #61758a; font-size: 14px; white-space: nowrap; }
.project-task-link__deadline.is-overdue { color: #b42318; font-weight: 700; }
.task-status-badge, .status-pill--overdue { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.task-status-badge--ready { color: #285ea8; background: #e9f1ff; }
.task-status-badge--in_progress { color: #9a5710; background: #fff0d8; }
.task-status-badge--completed { color: #24663d; background: #e7f5eb; }
.task-status-badge--blocked { color: #a22f3b; background: #fee7e8; }
.task-status-badge--cancelled { color: #596b7a; background: #edf1f4; }
.status-pill--overdue { color: #b42318; background: #fee4e2; }
.project-task-link.is-completed .entity-title-link { color: #718193; text-decoration: line-through; }
.project-task-actions { position: relative; flex: 0 0 auto; }
.project-task-actions summary { list-style: none; min-height: 36px; padding: 7px 10px; line-height: 20px; border: 1px solid #087c75; border-radius: 8px; color: #006d69; background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.project-task-actions summary::-webkit-details-marker { display: none; }
.project-task-actions[open] summary { background: #e6f5f2; }
.project-task-actions__menu { position: absolute; z-index: 2; top: calc(100% + 5px); right: 0; display: grid; min-width: 184px; overflow: hidden; border: 1px solid #c9d7e1; border-radius: 8px; background: #fff; box-shadow: 0 6px 16px rgba(23, 43, 63, .14); }
.project-task-actions button { width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid #e4eaef; color: #172b3f; background: #fff; font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.project-task-actions button:last-child { border-bottom: 0; }
.project-task-actions button:hover, .project-task-actions button:focus-visible { color: #006d69; background: #f1faf8; outline: 0; }
.task-checklist { display: grid; gap: 8px; }
.task-step-card { align-items: center; }
.task-step-card label { display: flex; min-width: 0; align-items: center; gap: 10px; }
.task-step-card label span { overflow-wrap: anywhere; }
.task-step-card input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; }
.task-related-list { margin: 12px 0; }
.task-relation-card { align-items: center; }
.task-relation-card__path { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-relation-card__path > span { color: #66788b; font-size: 13px; }
.task-relation-card__path .entity-title-link { text-align: left; }
.task-relation-form { margin-top: 12px; padding: 14px; border: 1px solid #dbe4eb; border-radius: 10px; background: #f8fafb; }
.task-relation-form .entity-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-team-popover { width: min(420px, calc(100% - 32px)); }
.task-team-popover .component-form { max-width: none; }
.checklist-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid #edf1f4; }
.task-note { margin: 8px 0; padding: 11px 13px; border-left: 3px solid #0d8278; background: #f5fbfa; white-space: pre-wrap; }
@media (max-width: 900px) { .record-layout { grid-template-columns: 1fr; } .work-relations, .project-context-column { position: static; } .work-form-popover { right: 16px; left: 16px; width: auto; } .project-form-grid, .work-form-grid, .project-team-inline-form, .task-team-inline-form, .task-step-inline-form { grid-template-columns: 1fr; } .project-form-grid__wide, .work-form-grid__wide { grid-column: auto; } .project-inline-form__pair, .task-title-type-row, .task-meeting-participants__add { grid-template-columns: 1fr; } .project-task-link { align-items: flex-start; flex-wrap: wrap; } .project-task-link__main { flex-basis: calc(100% - 40px); } .project-task-link__deadline, .project-task-link__executor { margin-left: 40px; } .project-task-actions { margin-left: auto; } }


.project-task-links { container: project-tasks / inline-size; }
.project-record-layout .project-task-link { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; }
@container project-tasks (max-width: 760px) {
  .project-record-layout .project-task-link {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 12px;
  }
  .project-task-link .task-type-icon { grid-column: 1; grid-row: 1; }
  .project-task-link .project-task-link__main { grid-column: 2; grid-row: 1; }
  .project-task-link .project-task-actions { grid-column: 3; grid-row: 1; margin: 0; }
  .project-task-link .project-task-link__deadline { grid-column: 2; grid-row: 2; margin: 0; }
  .project-task-link .project-task-link__executor { grid-column: 3; grid-row: 2; margin: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .project-task-link__deadline-label { display: none; }
}
@container project-tasks (max-width: 400px) {
  .project-task-link .project-task-link__executor { grid-column: 2 / -1; grid-row: 3; text-align: left; }
}

.task-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
  border-bottom: 1px solid #dce1e7;
  padding-bottom: 12px;
}

.task-view {
  border: 1px solid #cdd7e2;
  border-radius: 999px;
  background: #fff;
  color: #52657a;
  padding: 8px 13px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.task-view.is-active { border-color: #087f78; background: #e3f3f0; color: #006d69; font-weight: 700; }

.task-filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
}

.task-filter-panel .form-field { margin: 0; }
.task-filter-panel .secondary-button { white-space: nowrap; }
.task-queue .entity-row.is-overdue { border-left: 4px solid #c53b3b; padding-left: 16px; }
.deadline-alert { color: #b42318; font-weight: 700; }

.work-list-wrap {
  overflow-x: auto;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
}

.work-list-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: #334150;
  font-size: 14px;
}

.work-list-table th,
.work-list-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf1;
  vertical-align: top;
  text-align: left;
}

.work-list-table th {
  color: #667585;
  background: #f8fafb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.work-list-table tbody tr:last-child td { border-bottom: 0; }
.work-list-table tbody tr:hover { background: #f7fbfa; }
.work-list-table tr.is-overdue td:first-child { border-left: 4px solid #c53b3b; padding-left: 12px; }
.work-list-table .entity-title-link { font-size: 15px; }
.work-list-secondary { margin: 5px 0 0; color: #667585; line-height: 1.4; }
.idea-sprint-action { display: grid; gap: 7px; min-width: 156px; }
.idea-sprint-action select { min-width: 0; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0;
  color: #52657a;
  font-size: 14px;
}

@media (max-width: 850px) { .task-filter-panel { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .task-filter-panel { grid-template-columns: 1fr; } .task-filter-panel .secondary-button { width: 100%; } }

@media (max-width: 620px) {
  .work-list-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .work-list-table, .work-list-table tbody, .work-list-table tr, .work-list-table td { display: block; min-width: 0; }
  .work-list-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .work-list-table tr { margin: 0; padding: 12px 0; border-top: 1px solid #dce1e7; background: transparent; }
  .work-list-table tbody tr:last-child { border-bottom: 1px solid #dce1e7; }
  .work-list-table tbody tr:hover { background: transparent; }
  .work-list-table td { display: grid; grid-template-columns: minmax(116px, 42%) minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; }
  .work-list-table td::before { content: attr(data-label); color: #667585; font-size: 12px; font-weight: 700; }
  .work-list-table tr.is-overdue { padding-left: 12px; border-left: 4px solid #c53b3b; }
  .work-list-table tr.is-overdue td:first-child { padding-left: 0; border-left: 0; }
  .idea-sprint-action { min-width: 0; }
}

.entity-title-link {
  padding: 0;
  border: 0;
  color: #006d69;
  background: transparent;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.entity-title-link:hover,
.entity-title-link:focus-visible,
.entity-breadcrumbs button:hover,
.entity-breadcrumbs button:focus-visible,
.link-button:hover,
.link-button:focus-visible {
  color: #075d57;
}

@media (max-width: 1000px) { .work-kpi-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 620px) { .work-kpi-grid { grid-template-columns: 1fr; } .work-period-controls .form-field { width: 100%; } }

.dashboard-kpi-card,
.dashboard-channel-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.dashboard-kpi-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.dashboard-kpi-card h2,
.dashboard-channel-card h4 {
  margin: 0;
  font-size: 18px;
}

.dashboard-kpi-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 18px 0;
  flex: 1;
}

.dashboard-kpi-values > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f5f7f8;
}

.dashboard-kpi-values dt,
.dashboard-channel-values dt {
  color: #687585;
  font-size: 12px;
}

.dashboard-kpi-values dd {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-progress-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #5b6877;
  font-size: 13px;
}

.dashboard-full-progress {
  margin-top: 14px;
}

.dashboard-progress-track-neutral span {
  background: #7d8996;
}

.dashboard-period-context {
  margin: 8px 0 0;
  color: #5b6877;
  font-size: 13px;
  text-align: center;
}

.dashboard-progress-line strong,
.dashboard-channel-values strong,
.dashboard-channel-matrix strong {
  color: #8a5a28;
  white-space: nowrap;
}

.dashboard-progress-line strong.is-green,
.dashboard-channel-values strong.is-green,
.dashboard-channel-matrix strong.is-green { color: var(--color-positive); }

.dashboard-progress-line strong.is-yellow,
.dashboard-channel-values strong.is-yellow,
.dashboard-channel-matrix strong.is-yellow { color: var(--color-warning); }

.dashboard-progress-line strong.is-red,
.dashboard-channel-values strong.is-red,
.dashboard-channel-matrix strong.is-red { color: var(--color-negative); }

.dashboard-progress-line strong.is-neutral,
.dashboard-channel-values strong.is-neutral,
.dashboard-channel-matrix strong.is-neutral { color: var(--color-muted); }

.dashboard-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ed;
}

.dashboard-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #c68a36;
  transition: width 180ms ease;
}

.dashboard-progress-track span.is-green { background: var(--color-positive); }
.dashboard-progress-track span.is-yellow { background: var(--color-warning); }
.dashboard-progress-track span.is-red { background: var(--color-negative); }
.dashboard-progress-track span.is-neutral { background: var(--color-muted); }

.dashboard-neutral-note {
  margin: 14px 0 0;
  color: #76818e;
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-channels {
  margin-top: 28px;
}

.dashboard-channels > h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.dashboard-sales-contours {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.dashboard-sales-contour {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #f5f7f8;
}

.dashboard-sales-contour > h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.dashboard-repeat-sales-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.dashboard-sales-contours.has-single-contour,
.dashboard-repeat-sales-grid.has-single-channel {
  grid-template-columns: 1fr;
}

.dashboard-new-customers {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
}

.dashboard-new-customers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-new-customers-grid article {
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: #f5f7f8;
}

.dashboard-new-customers-grid h3,
.dashboard-new-customers-grid dl {
  margin: 0;
}

.dashboard-new-customers-grid dl { margin-top: 12px; }
.dashboard-new-customers-grid dt { color: #687585; font-size: 12px; }
.dashboard-new-customers-grid dd { margin: 4px 0 12px; overflow-wrap: anywhere; font-weight: 700; }

.dashboard-channel-matrix {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-channel-matrix th,
.dashboard-channel-matrix td {
  padding: 11px 10px;
  border-bottom: 1px solid #e6eaee;
  text-align: right;
  vertical-align: middle;
}

.dashboard-channel-matrix thead th {
  color: #687585;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.dashboard-channel-matrix th:first-child {
  width: 16%;
  text-align: left;
}

.dashboard-channel-matrix tbody th {
  color: #44515f;
  font-size: 13px;
}

.dashboard-channel-matrix td,
.dashboard-channel-matrix td strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-channel-matrix td {
  font-size: 14px;
  font-weight: 700;
}

.dashboard-matrix-not-applicable {
  background: #fafbfc;
}

.dashboard-activity {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid #dfe5e9;
  border-radius: 12px;
  background: #fbfcfc;
}

.dashboard-activity-heading h2 {
  margin: 0;
  font-size: 20px;
}

.dashboard-activity-heading p {
  margin: 6px 0 0;
  color: #697585;
  font-size: 13px;
}

.dashboard-activity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  border-top: 1px solid #e4e9ed;
  border-left: 1px solid #e4e9ed;
}

.dashboard-activity-metrics > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e4e9ed;
  border-bottom: 1px solid #e4e9ed;
  background: #fff;
}

.dashboard-activity-metrics dt {
  color: #687585;
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-activity-metrics dd {
  margin: 6px 0 0;
  color: #354252;
  font-size: 17px;
  font-weight: 700;
}

.dashboard-activity-empty {
  margin: 14px 0 0;
  padding: 13px 14px;
  border-radius: 8px;
  color: #697585;
  background: #f0f3f5;
}

.dashboard-activity-dynamics {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4e9ed;
}

.dashboard-activity-dynamics h3 {
  margin: 0;
  color: #354252;
  font-size: 16px;
}

.dashboard-activity-chart {
  position: relative;
  width: 100%;
  height: 220px;
  margin-top: 12px;
  overflow: hidden;
}

.dashboard-analytics-card,
.dashboard-analytics-section {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.dashboard-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-section-heading h2,
.dashboard-analytics-section > h2 {
  margin: 0;
  font-size: 20px;
}

.dashboard-section-heading p {
  max-width: 680px;
  margin: 6px 0 0;
  color: #697585;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-chart-canvas {
  position: relative;
  height: 320px;
  margin-top: 18px;
}

.dashboard-analytics-empty {
  margin: 14px 0 0;
  padding: 18px;
  border-radius: 8px;
  color: #697585;
  background: #f5f7f8;
  text-align: center;
}

.dashboard-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dashboard-comparison-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #e0e5e9;
  border-radius: 10px;
  background: #fbfcfc;
}

.dashboard-comparison-card h3 {
  margin: 0;
  font-size: 17px;
}

.dashboard-card-caption {
  margin: 5px 0 0;
  color: #75808d;
  font-size: 12px;
}

.dashboard-comparison-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.dashboard-comparison-values > div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f4f5;
}

.dashboard-comparison-values dt {
  color: #687585;
  font-size: 11px;
}

.dashboard-comparison-values dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.dashboard-gap-state {
  margin: 14px 0 0;
  padding: 11px 12px;
  border-radius: 8px;
  color: #5a6571;
  background: #eef1f3;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-gap-state.is-remaining {
  color: #76571c;
  background: #fff6dd;
}

.dashboard-gap-state.is-exceeded,
.dashboard-gap-state.is-reached {
  color: #17643b;
  background: #eaf5ee;
}

.dashboard-period-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid #e0e5e9;
  border-radius: 10px;
}

.dashboard-period-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-period-table th,
.dashboard-period-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6eaee;
  text-align: right;
}

.dashboard-period-table th:first-child,
.dashboard-period-table td:first-child {
  text-align: left;
}

.dashboard-period-table thead th {
  color: #687585;
  background: #f7f9fa;
  font-size: 12px;
}

.dashboard-period-table tbody th {
  color: #354252;
}

.dashboard-period-table tbody tr:last-child th,
.dashboard-period-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-trend-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e6eaee;
}

.dashboard-trend-block h3 {
  margin: 0;
  font-size: 17px;
}

.dashboard-trend-canvas {
  position: relative;
  height: 190px;
  margin-top: 14px;
}

.dashboard-managers-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-managers-heading h2 {
  margin: 0;
  font-size: 20px;
}

.dashboard-managers-heading > div > p {
  margin: 6px 0 0;
  color: #697585;
  font-size: 13px;
}

.dashboard-managers-summary {
  flex: 0 0 auto;
  margin: 3px 0 0;
  color: #4e5c69;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-manager-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(190px, 0.9fr) minmax(220px, 1.4fr);
  gap: 12px;
  margin-top: 18px;
}

.dashboard-manager-filters label {
  display: grid;
  gap: 7px;
  color: #526071;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-manager-filters select,
.dashboard-manager-filters input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c5cdd5;
  color: #273340;
  background: #fff;
}

.dashboard-managers-empty {
  margin-top: 16px;
  padding: 24px;
  border: 1px dashed #cbd2da;
  border-radius: 10px;
  color: #697585;
  background: #fff;
  text-align: center;
}

.dashboard-managers-empty p {
  margin: 0;
}

.dashboard-managers-empty .secondary-button {
  margin-top: 14px;
}

.dashboard-manager-table-wrap {
  margin-top: 16px;
  overflow: visible;
  border: 1px solid #e0e5e9;
  border-radius: 10px;
}

.dashboard-manager-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.dashboard-manager-table th,
.dashboard-manager-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e6eaee;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.dashboard-manager-table th:first-child,
.dashboard-manager-table td:first-child {
  text-align: left;
}

.dashboard-manager-table thead th {
  color: #687585;
  background: #f7f9fa;
  font-size: 11px;
}

.dashboard-manager-table tbody th {
  color: #354252;
  white-space: normal;
}

.dashboard-manager-table th:first-child,
.dashboard-manager-table td:first-child {
  width: 26%;
}

.dashboard-manager-table td {
  overflow-wrap: anywhere;
}

.dashboard-manager-table tbody tr:last-child th,
.dashboard-manager-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-manager-total-row th,
.dashboard-manager-total-row td {
  border-top: 2px solid #b8ccc7;
  border-bottom: 0;
  color: #203b36;
  background: #eef5f3;
  font-weight: 700;
}

.dashboard-manager-table thead button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: inherit;
}

.dashboard-manager-table thead th:first-child button {
  justify-content: flex-start;
}

.dashboard-manager-table thead button:hover,
.dashboard-manager-table thead button:focus-visible {
  color: #0d6058;
}

.dashboard-manager-table [data-sort-indicator] {
  min-width: 12px;
  font-size: 12px;
}

.dashboard-manager-primary {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.dashboard-manager-details-toggle {
  padding: 0;
  border: 0;
  color: #607080;
  background: transparent;
  font-size: 11px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.dashboard-manager-details-toggle:hover,
.dashboard-manager-details-toggle:focus-visible,
.dashboard-manager-details-toggle[aria-expanded="true"] {
  color: #0d6058;
}

.dashboard-manager-details-row td {
  padding: 0;
  background: #f7f9fa;
  white-space: normal;
}

.dashboard-manager-details {
  padding: 14px 16px 16px;
}

.dashboard-manager-details dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.dashboard-manager-details dl > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e0e5e9;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.dashboard-manager-details dt {
  color: #687585;
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-manager-details dd {
  margin: 5px 0 0;
  color: #354252;
  font-size: 15px;
  font-weight: 700;
}

.history-heading,
.settings-heading {
  max-width: 680px;
}

.history-heading p,
.settings-heading p {
  margin: 6px 0 0;
  color: #687585;
}

.history-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fff;
}

.history-filters .form-field {
  margin: 0;
}

.history-filters input,
.history-filters select {
  width: 100%;
}

.history-filter-actions {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  gap: 10px;
}

.history-filters .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.history-summary {
  margin: 0 0 10px;
  color: #667282;
}

.history-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fff;
}

.history-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e5e9ee;
  text-align: left;
  vertical-align: top;
}

.history-table th {
  color: #566373;
  background: #f8f9fa;
  font-size: 13px;
}

.history-table tr:last-child td {
  border-bottom: 0;
}

.history-table summary {
  color: #0d6d64;
  cursor: pointer;
  font-weight: 700;
}

.history-changes {
  display: grid;
  gap: 10px;
  min-width: 310px;
  margin: 12px 0 0;
}

.history-change {
  padding-top: 9px;
  border-top: 1px solid #e6eaee;
}

.history-change dt {
  margin-bottom: 5px;
  color: #526171;
  font-size: 12px;
  font-weight: 700;
}

.history-change-context {
  display: block;
  margin-bottom: 3px;
  color: #26333f;
  font-size: 13px;
}

.history-change dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.history-before {
  color: #7a4650;
}

.history-after {
  color: #17643b;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
}

.settings-error,
.settings-card {
  max-width: 680px;
}

.settings-card {
  padding: 22px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.settings-card h2 {
  margin: 0;
  font-size: 20px;
}

.settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.settings-input {
  max-width: 220px;
}

.settings-input input,
input.settings-input {
  min-height: 42px;
}

.field-help {
  margin: 7px 0 0;
  color: #697585;
  font-size: 12px;
  line-height: 1.45;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.settings-dirty-state {
  margin: 0;
  color: #687585;
  font-size: 13px;
}

.settings-dirty-state.is-dirty {
  color: #7a4d00;
  font-weight: 700;
}

.settings-card .form-message {
  margin-top: 12px;
}

.plan-card {
  padding: 20px 22px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.month-plan-form {
  margin-top: 18px;
}

.month-plan-heading h2,
.month-sales-group h3,
.month-channel-card h4,
.month-total-card h3 {
  margin: 0;
}

.month-plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.month-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
}

.month-channel-card,
.month-sales-group,
.month-total-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #fbfcfc;
}

.month-sales-group > h3,
.month-channel-card h4,
.month-total-card h3 {
  font-size: 18px;
}

.month-sales-group {
  border: 1px solid #dce1e7;
  border-radius: 10px;
  background: #f7faf9;
}

.month-first-grid,
.month-repeat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.month-repeat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.month-first-grid .month-channel-card,
.month-repeat-grid .month-channel-card {
  padding: 14px;
  background: #fbfcfc;
}

.month-channel-card .form-field {
  max-width: none;
  margin: 16px 0 0;
}

.month-calculated-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e3e7eb;
  color: #53606f;
}

.month-calculated-value output {
  color: #26333f;
  font-weight: 700;
  text-align: right;
}

.month-total-card {
  grid-column: 1 / -1;
  background: #f1f6f3;
  border-color: #cddbd3;
}

.month-total-list {
  margin: 10px 0 0;
}

.month-total-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #d8e2dc;
}

.month-total-list dt {
  color: #53606f;
}

.month-total-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.month-total-card > p {
  margin: 14px 0 0;
  color: #667282;
  font-size: 13px;
  line-height: 1.45;
}

.month-plan-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.month-plan-form .primary-button {
  white-space: nowrap;
}

.month-plan-form .form-message {
  flex: 1;
  margin: 0;
}

.month-plan-contexts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.planning-legacy-context,
.planning-correction-context,
.previous-approved-plan {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #d7dee5;
  border-radius: 10px;
  background: #f8fafb;
}

.planning-legacy-context {
  border-color: #e2c889;
  background: #fffaf0;
}

.planning-correction-context {
  border-color: #b9d2c4;
  background: #f3f8f5;
}

.planning-legacy-context h3,
.planning-correction-context h3,
.previous-approved-plan h3 {
  margin: 0;
  font-size: 17px;
}

.planning-legacy-context p,
.planning-correction-context > p {
  margin: 8px 0 0;
  color: #53606f;
}

.month-context-list {
  margin: 10px 0 0;
}

.month-context-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgb(83 96 111 / 16%);
}

.month-context-list dt {
  color: #53606f;
}

.month-context-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  text-align: right;
}

.planning-correction-context .month-context-list > div:first-child {
  grid-template-columns: 1fr;
}

.planning-correction-context .month-context-list > div:first-child dd {
  text-align: left;
}

.month-plan-reopen-modal textarea {
  width: 100%;
  resize: vertical;
}

.month-plan-reopen-modal > p {
  color: #53606f;
  line-height: 1.5;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  color: #4d4222;
  font-size: 14px;
  line-height: 1.45;
}

.checkbox-field input {
  flex: 0 0 auto;
  margin-top: 3px;
}

@media (max-width: 900px) {
  .dashboard-kpi-grid,
  .dashboard-new-customers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-sales-contours {
    grid-template-columns: 1fr;
  }

  .month-plan-grid {
    grid-template-columns: 1fr;
  }

  .month-total-card {
    grid-column: auto;
  }
}

@media (max-width: 1100px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpi-values {
    grid-template-columns: 1fr;
  }

  .dashboard-sales-contours {
    grid-template-columns: 1fr;
  }

  .dashboard-section-heading {
    flex-wrap: wrap;
  }

}

@media (max-width: 800px) {
  .dashboard-channel-matrix,
  .dashboard-channel-matrix tbody,
  .dashboard-channel-matrix tr,
  .dashboard-channel-matrix th,
  .dashboard-channel-matrix td {
    display: block;
    width: 100%;
  }

  .dashboard-channel-matrix thead {
    display: none;
  }

  .dashboard-channel-matrix tr {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e1e6ea;
    border-radius: 9px;
    background: #fff;
  }

  .dashboard-channel-matrix tbody th {
    padding: 0 0 7px;
    border: 0;
    font-size: 14px;
    text-align: left;
  }

  .dashboard-channel-matrix td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }

  .dashboard-channel-matrix td::before {
    content: attr(data-label);
    min-width: 0;
    color: #687585;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    white-space: normal;
  }

  .dashboard-channel-matrix [hidden],
  .dashboard-matrix-not-applicable {
    display: none !important;
  }

  .dashboard-kpi-values {
    grid-template-columns: 1fr;
  }
}

.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.input-with-suffix span {
  color: #4b5868;
  font-weight: 700;
}

.weeks-planning {
  margin-top: 34px;
}

.planning-section-heading h2,
.week-editor-heading h3 {
  margin: 0;
}

.planning-section-heading h2 {
  font-size: 24px;
}

.planning-caption {
  margin: 8px 0 0;
  color: #667282;
}

.weeks-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.week-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #d1d8df;
  border-radius: 9px;
  color: #273340;
  background: #fff;
  text-align: left;
}

.week-list-item.is-selected {
  border-color: #0d7469;
  box-shadow: 0 0 0 2px rgb(13 116 105 / 12%);
}

.week-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-week-draft {
  color: #755b12;
  background: #fff6d8;
}

.status-week-approved {
  color: #17643b;
  background: #e6f5ec;
}

.status-week-empty {
  color: #626d79;
  background: #edf0f2;
}

.week-editor {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce1e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(31 41 55 / 5%);
}

.week-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.week-editor-heading h3 {
  margin: 0;
  font-size: 21px;
}

.week-editor-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.week-plan-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.week-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.week-plan-form .compact-field {
  display: grid;
  grid-template-columns: auto 96px;
  align-items: center;
  width: auto;
  margin-bottom: 0;
  gap: 10px;
}

.week-plan-form .compact-field label {
  white-space: nowrap;
}

.week-plan-form .compact-field input {
  width: 96px;
  min-height: 36px;
  padding: 6px 10px;
}

.week-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 12px;
  margin-top: 14px;
}

.week-summary > div {
  display: grid;
  grid-template-rows: minmax(32px, auto) auto auto;
  align-content: start;
  padding: 12px 14px;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  background: #f8fafb;
}

.week-summary span,
.week-summary strong,
.week-summary small {
  display: block;
}

.week-summary span {
  margin-bottom: 7px;
  color: #667282;
  font-size: 13px;
}

.week-summary strong {
  font-size: 24px;
}

.week-summary small {
  margin-top: 5px;
  color: #526171;
  font-size: 14px;
  font-weight: 700;
}

.week-summary strong.is-overallocated {
  color: #9f2d2d;
}

.week-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-left: auto;
  margin-top: 0;
}

.week-actions .primary-button,
.week-actions .secondary-button {
  min-height: 36px;
  padding: 7px 10px;
}

.week-actions .quiet-button {
  border-color: #d1d8df;
  color: #485666;
  background: transparent;
}

.week-dirty-state {
  margin: 10px 0 0;
  color: #667282;
  font-size: 13px;
}

.week-dirty-state.is-dirty {
  color: #8a6110;
  font-weight: 700;
}

.planning-table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid #dce1e7;
  border-radius: 10px;
}

.planning-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
}

.planning-table th,
.planning-table td {
  min-width: 100px;
  padding: 10px;
  border-right: 1px solid #edf0f2;
  border-bottom: 1px solid #e5e9ee;
  text-align: center;
  vertical-align: middle;
}

.planning-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 180px;
  text-align: left;
  background: #f8f9fa;
}

.planning-table thead th {
  color: #566373;
  background: #f8f9fa;
  font-size: 13px;
}

.planning-table tr:last-child th,
.planning-table tr:last-child td {
  border-bottom: 0;
}

.planning-table .planning-table-total th,
.planning-table .planning-table-total td {
  border-top: 2px solid #cbd8d2;
  background: #f1f6f3;
  font-weight: 700;
}

.planning-day-total,
.planning-week-total {
  display: grid;
  gap: 3px;
}

.planning-day-total span,
.planning-week-total span {
  color: #526171;
  font-size: 12px;
  font-weight: 700;
}

.day-off-button {
  width: 42px;
  min-height: 38px;
  border: 1px dashed #b8c2cc;
  color: #6f7b88;
  background: #fff;
  font-size: 20px;
}

.day-off-button.is-vacation {
  width: auto;
  min-width: 68px;
  padding: 0 7px;
  border-style: solid;
  border-color: #c9b55b;
  color: #755b12;
  background: #fff8dc;
  font-size: 12px;
  font-weight: 700;
}

.day-off-label {
  color: #8b95a1;
  font-size: 20px;
}

.daily-plan-cell {
  display: grid;
  grid-template-rows: 18px 36px 14px;
  justify-items: center;
  gap: 4px;
}

.daily-plan-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 18px;
}

.daily-fact-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: help;
}

.daily-fact-indicator > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8b95a1;
}

.daily-fact-indicator.status-completed > span {
  background: #2f8060;
}

.daily-fact-indicator.status-overdue > span {
  background: #b84a4a;
}

.daily-fact-indicator.status-pending_today > span {
  background: #c48a1e;
}

.daily-fact-indicator:focus-visible {
  outline: 2px solid #2b8077;
  outline-offset: 2px;
}

.planning-fact-popover {
  position: fixed;
  z-index: 40;
  width: min(250px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid #d8dee5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(32 47 61 / 16%);
  color: #344250;
  background: #fff;
  font-size: 12px;
  text-align: left;
}

.planning-fact-popover-title {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.planning-fact-popover dl,
.planning-fact-popover dl > div {
  margin: 0;
}

.planning-fact-popover dl {
  display: grid;
  gap: 5px;
}

.planning-fact-popover dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.planning-fact-popover dt {
  color: #687483;
}

.planning-fact-popover dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.day-state-control {
  display: grid;
  grid-template-columns: 16px 64px;
  align-items: center;
  gap: 6px;
  width: 86px;
  min-height: 18px;
  cursor: pointer;
}

.day-state-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #18766b;
  cursor: pointer;
}

.day-state-checkbox:focus-visible {
  outline: 2px solid #2b8077;
  outline-offset: 2px;
}

.day-state-checkbox:disabled {
  cursor: default;
  opacity: 0.65;
}

.day-state-caption {
  color: #687483;
  font-size: 11px;
  font-weight: 400;
  text-align: left;
}

.day-state-caption.is-working {
  color: #334150;
}

.working-day-cell {
  display: grid;
  gap: 5px;
}

.daily-quota-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.daily-quota-control > span,
.daily-plan-amount,
.manager-week-total span {
  color: #526171;
  font-size: 11px;
}

.daily-quota-control.is-muted,
.daily-plan-amount.is-muted {
  opacity: 0.58;
}

.daily-quota-control.is-muted .daily-quota-input {
  color: #6f7b88;
  background: #f1f3f5;
}

.daily-plan-amount,
.manager-week-total span {
  white-space: nowrap;
}

.vacation-exception {
  color: #755b12;
  font-size: 11px;
  font-weight: 700;
}

.daily-quota-input {
  width: 72px;
  height: 36px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid #bfc8d2;
  border-radius: 7px;
  text-align: center;
}

.make-day-off {
  padding: 2px;
  border: 0;
  color: #687483;
  background: transparent;
  font-size: 11px;
  text-decoration: underline;
}

.manager-week-total,
.manager-week-total strong,
.manager-week-total span {
  font-weight: 700;
}

.manager-week-total strong,
.manager-week-total span {
  display: block;
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    --sidebar-width: 64px;
  }

  .app-shell:not(.sidebar-collapsed) .app-sidebar {
    position: fixed;
    z-index: 50;
    width: min(280px, calc(100vw - 24px));
    box-shadow: 10px 0 30px rgb(31 41 55 / 16%);
  }

  .app-sidebar {
    padding: 12px 8px;
  }

  .app-shell.sidebar-collapsed .app-sidebar {
    width: 64px;
  }

  .app-navigation {
    order: initial;
    width: auto;
  }

  .app-shell.sidebar-collapsed .sidebar-brand,
  .app-shell.sidebar-collapsed .nav-item,
  .app-shell.sidebar-collapsed .sidebar-logout {
    padding-left: 6px;
    padding-right: 6px;
  }

  .app-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px;
  }

  .header-button {
    margin-left: auto;
  }

  .entity-summary-card {
    padding: 18px;
  }

  .entity-section {
    padding: 18px;
  }
}

@media (max-width: 600px) {
  .login-shell {
    padding: 16px;
  }

  .app-content {
    width: calc(100% - 32px);
    padding: 30px 0 44px;
  }

  h1 {
    font-size: 26px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-date-field input {
    width: 100%;
  }

  .dashboard-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-periods .filter-button:last-child {
    grid-column: 1 / -1;
  }

  .dashboard-kpi-grid,
  .dashboard-new-customers-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sales-contours,
  .dashboard-repeat-sales-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-activity {
    padding: 18px 14px;
  }

  .dashboard-activity-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-activity-chart {
    height: 190px;
  }

  .dashboard-analytics-card,
  .dashboard-analytics-section {
    padding: 18px 14px;
  }

  .dashboard-section-heading {
    flex-direction: column;
  }

  .dashboard-chart-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-chart-controls .compact-select {
    flex: 1 1 180px;
  }

  .dashboard-chart-controls .compact-select select {
    min-width: 0;
    width: 100%;
  }

  .dashboard-chart-canvas {
    height: 260px;
  }

  .dashboard-comparison-grid,
  .dashboard-comparison-values {
    grid-template-columns: 1fr;
  }

  .dashboard-period-table-wrap {
    overflow: visible;
    border: 0;
  }

  .dashboard-period-table,
  .dashboard-period-table tbody,
  .dashboard-period-table tr,
  .dashboard-period-table th,
  .dashboard-period-table td {
    display: block;
    width: 100%;
  }

  .dashboard-period-table thead {
    display: none;
  }

  .dashboard-period-table tr {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid #e0e5e9;
    border-radius: 9px;
    background: #fbfcfc;
  }

  .dashboard-period-table th,
  .dashboard-period-table td,
  .dashboard-period-table th:first-child {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .dashboard-period-table th::before,
  .dashboard-period-table td::before {
    content: attr(data-label);
    color: #687585;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }

  .dashboard-trend-canvas {
    height: 170px;
  }

  .dashboard-managers-heading {
    flex-direction: column;
    gap: 8px;
  }

  .dashboard-manager-filters {
    grid-template-columns: 1fr;
  }

  .dashboard-manager-table-wrap {
    overflow: visible;
    border: 0;
  }

  .dashboard-manager-table,
  .dashboard-manager-table tbody,
  .dashboard-manager-table tfoot {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .dashboard-manager-table tfoot[hidden] {
    display: none;
  }

  .dashboard-manager-table thead {
    display: none;
  }

  .dashboard-manager-table tbody {
    display: grid;
    gap: 12px;
  }

  .dashboard-manager-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    padding: 10px 14px;
    border: 1px solid #e0e5e9;
    border-radius: 10px;
    background: #fff;
  }

  .dashboard-manager-total-row {
    margin-top: 12px;
    background: #eef5f3;
  }

  .dashboard-manager-total-row th,
  .dashboard-manager-total-row td {
    border-top: 0;
    background: transparent;
  }

  .dashboard-manager-row.has-open-details {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  .dashboard-manager-table .dashboard-manager-row th,
  .dashboard-manager-table .dashboard-manager-row td {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 14px;
    padding: 8px 0;
    border: 0;
    white-space: normal;
  }

  .dashboard-manager-table .dashboard-manager-row td {
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .dashboard-manager-table .dashboard-manager-row th {
    grid-column: 1 / -1;
    justify-content: space-between;
    text-align: right;
  }

  .dashboard-manager-table .dashboard-manager-row th::before,
  .dashboard-manager-table .dashboard-manager-row td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #687585;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
  }

  .dashboard-manager-primary {
    justify-items: end;
    text-align: right;
  }

  .dashboard-manager-details-row {
    display: block;
    margin-top: -12px;
    border: 1px solid #e0e5e9;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: #f7f9fa;
  }

  .dashboard-manager-table .dashboard-manager-details-row td {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
  }

  .dashboard-manager-details dl {
    grid-template-columns: 1fr;
  }

  .history-filters {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .history-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .history-filter-actions button {
    width: 100%;
  }

  .history-table-wrap {
    overflow: visible;
    border: 0;
  }

  .history-table,
  .history-table tbody,
  .history-table tr,
  .history-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .history-table thead {
    display: none;
  }

  .history-table tr {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #dce1e7;
    border-radius: 10px;
    background: #fff;
  }

  .history-table td {
    display: grid;
    grid-template-columns: minmax(100px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border: 0;
  }

  .history-table td::before {
    content: attr(data-label);
    color: #687585;
    font-size: 12px;
    font-weight: 600;
  }

  .history-changes {
    min-width: 0;
  }

  .history-change dd {
    grid-template-columns: 1fr;
  }

  .history-pagination {
    justify-content: space-between;
  }

  .settings-card {
    padding: 18px;
  }

  .settings-fields {
    grid-template-columns: 1fr;
  }

  .settings-input {
    max-width: none;
  }

  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-actions .primary-button {
    width: 100%;
  }

  .page-heading .primary-button,
  .modal-actions > button {
    width: 100%;
  }

  .month-navigation {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    width: 100%;
  }

  .month-button {
    width: 40px;
    height: 40px;
  }

  .month-label {
    font-size: 17px;
  }

  .plan-card {
    padding: 22px 18px;
  }

  .month-plan-form {
    margin-top: 16px;
  }

  .month-plan-grid {
    grid-template-columns: 1fr;
  }

  .month-total-card {
    grid-column: auto;
  }

  .month-repeat-grid {
    grid-template-columns: 1fr;
  }

  .month-plan-contexts {
    grid-template-columns: 1fr;
  }

  .month-plan-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .month-plan-actions > button,
  .week-actions > button {
    width: 100%;
  }

  .weeks-list,
  .week-summary {
    grid-template-columns: 1fr;
  }

  .week-editor {
    padding: 20px 14px;
  }

  .week-editor-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .week-plan-toolbar {
    align-items: stretch;
  }

  .week-plan-form,
  .week-plan-form .compact-field {
    width: 100%;
  }

  .week-plan-form .compact-field {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .week-plan-form .compact-field input {
    width: 100%;
  }

  .week-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .managers-table,
  .managers-table tbody,
  .managers-table tr,
  .managers-table td {
    display: block;
    width: 100%;
  }

  .managers-table thead {
    display: none;
  }

  .managers-table tr {
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid #dce1e7;
    border-radius: 10px;
    background: #fff;
  }

  .managers-table td,
  .managers-table tr:last-child td {
    display: grid;
    grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #edf0f2;
  }

  .managers-table td:last-child {
    border-bottom: 0;
  }

  .managers-table td::before {
    content: attr(data-label);
    color: #687483;
    font-size: 13px;
    font-weight: 700;
  }

  .modal {
    padding: 24px 18px;
  }

  .manager-details {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .manager-details dd {
    margin-bottom: 12px;
  }
}

/* Финальные overrides размещены после базовых правил, чтобы сохранять плотность. */
#dashboard-view .dashboard-heading {
  margin-bottom: 14px;
}

#dashboard-view .dashboard-periods {
  margin-bottom: 12px;
}

.period-picker-trigger .dashboard-period-boundaries {
  min-height: 0;
  margin: 2px 0 0;
  font-size: 11px;
}

.signals-view {
  max-width: 920px;
}

.signals-heading {
  align-items: flex-start;
}

.signals-heading h1 {
  margin-bottom: 6px;
}

.signals-period-context {
  margin: 0;
  color: var(--color-muted);
}

.signals-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.signals-filters [data-signals-count] {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.signals-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signal-card {
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid #d8dee5;
  border-radius: 12px;
  background: #fff;
  overflow-wrap: anywhere;
}

.signal-card-negative {
  border-color: #ebcccc;
  background: var(--color-negative-bg);
}

.signal-card-positive {
  border-color: #c7dfcf;
  background: var(--color-positive-bg);
}

.signal-type {
  display: inline-flex;
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 3px solid currentColor;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-transform: uppercase;
}

.signal-type-negative {
  color: var(--color-negative);
}

.signal-type-positive {
  color: var(--color-positive);
}

.signal-card h2 {
  margin: 0 0 9px;
  font-size: 19px;
  line-height: 1.3;
}

.signal-context {
  margin: 0 0 5px;
  color: #596777;
  font-size: 13px;
}

.signal-context span {
  font-weight: 700;
}

.signal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.signal-metrics div {
  min-width: 0;
  padding: 1px 8px 1px 9px;
  border-left: 2px solid rgb(83 98 114 / 20%);
  background: transparent;
}

.signal-metrics dt {
  margin-bottom: 3px;
  color: #667282;
  font-size: 12px;
}

.signal-metrics dd {
  margin: 0;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.signal-advice {
  margin: 0 0 10px;
  padding: 8px 0 0;
  border-top: 1px solid rgb(83 98 114 / 16%);
  background: transparent;
}

.signal-advice strong {
  color: #52606f;
  font-size: 13px;
  font-weight: 750;
}

.signal-advice p {
  margin: 3px 0 0;
  line-height: 1.42;
}

.signal-action {
  max-width: 100%;
  white-space: normal;
}

.signals-error {
  margin-bottom: 16px;
}

.weeks-list .week-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 600px) {
  #dashboard-view .dashboard-periods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #dashboard-view .dashboard-periods .filter-button:last-child {
    grid-column: auto;
  }

  .signals-heading {
    align-items: stretch;
  }

  .signals-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .signals-filters .filter-button {
    width: 100%;
  }

  .signal-card {
    padding: 14px;
  }

  .signal-metrics {
    grid-template-columns: 1fr;
  }

}
/* CRM использует общие карточки и элементы управления приложения. */
.crm-sync-controls { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; margin-left: auto; text-align: right; }
.crm-sync-controls .crm-hint { margin: 0; }
.crm-heading-title { display: flex; align-items: center; gap: 8px; }
.crm-feed-info { position: relative; display: inline-flex; }
.crm-info-button { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid #aeb9c5; border-radius: 50%; background: #fff; color: #526171; font-size: 13px; font-weight: 700; font-style: italic; line-height: 1; cursor: pointer; }
.crm-info-button:hover, .crm-info-button[aria-expanded="true"] { border-color: #6f8f89; color: #0d7469; background: #eef6f4; }
.crm-info-button:focus-visible { outline: 2px solid #2b8077; outline-offset: 2px; }
.crm-feed-info-popover { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: min(460px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid #c9d5e0; border-radius: 8px; background: #fff; color: #435366; box-shadow: 0 8px 24px rgb(31 47 66 / 16%); font-size: 0.875rem; font-weight: 400; line-height: 1.45; }
.crm-section { margin: 28px 0; }
.crm-value { font-size: 1.6rem; font-weight: 650; margin: 12px 0; overflow-wrap: anywhere; }
.crm-hint { color: var(--text-muted, #617185); line-height: 1.5; margin: 16px 0; }
.crm-comparison { color: var(--text-muted, #617185); font-size: 0.875rem; margin: 8px 0 0; }
.crm-comparison-stack { display: grid; gap: 2px; }
.crm-cell-comparison { color: var(--text-muted, #617185); font-size: 0.8rem; margin-top: 4px; }
.crm-cell-comparison-stack { display: grid; gap: 2px; }
.crm-trend.is-up { color: #087348; }
.crm-trend.is-down { color: #ba2828; }
.crm-warning { border-left: 4px solid #b42318; background: #fff1f0; color: #86241d; padding: 12px 16px; border-radius: 6px; }
.crm-table-scroll { overflow-x: auto; max-height: 480px; border: 1px solid #d6deea; border-radius: 10px; }
.crm-table { width: 100%; border-collapse: collapse; background: white; }
.crm-table th, .crm-table td { padding: 10px 14px; border-bottom: 1px solid #e4e9ef; text-align: left; vertical-align: top; }
.crm-table th { position: sticky; top: 0; background: #f0f5f8; }
.crm-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.crm-table .crm-sort { display: inline-flex; gap: 6px; align-items: baseline; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.crm-sort span { white-space: nowrap; }
.crm-table-totals { display: grid; grid-template-columns: repeat(var(--crm-total-columns), minmax(0, 1fr)); gap: 0; overflow: hidden; padding: 12px 14px; margin-top: 8px; box-sizing: border-box; border: 1px solid #d6deea; border-radius: 10px; background: #f0f5f8; font-variant-numeric: tabular-nums; }
.crm-table-total-cell { min-width: 0; }
.crm-table-total-cell:not(.is-label) { text-align: left; }
.crm-table-total-cell .crm-cell-comparison { margin-top: 4px; }

@media (pointer: coarse) {
  .primary-button, .secondary-button, .danger-button, .header-button,
  .entity-actions .secondary-button, .entity-section__header .secondary-button,
  .week-actions .primary-button, .week-actions .secondary-button,
  .project-task-actions summary {
    min-height: 44px;
  }
}

/* Project card: icon command bar and two-column workspace (mockup B). */
.global-page-controls { flex-wrap: wrap; column-gap: 8px; }
.header-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.global-page-controls .quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; }
#page-record-create-task { border-color: #0d7469; color: #fff; background: #0d7469; }
#page-record-create-task:hover { background: #0a5f56; }
.header-button__label { font-size: 14px; }
.page-record-sections {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 6px;
  padding: 3px;
  border-radius: 10px;
  background: #e8edf1;
}
.page-record-sections[hidden] { display: none; }
.page-record-sections .quiet-button { min-height: 32px; min-width: 32px; padding: 6px; border-color: transparent; background: transparent; }
.page-record-sections .quiet-button:hover { color: #0d6058; background: #fff; }
.project-record-header { display: grid; gap: 14px; }
.project-record-header .work-kpi-grid { margin: 0; }
.project-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.entity-section__header .project-section-title { margin: 0; }
.project-section-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: #0d7469; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project-section-count { color: #5c6876; font-size: 14px; font-weight: 400; }
.project-record-layout [id^="project-section-"] { scroll-margin-top: 120px; }
.project-record-history .entity-facts { margin: 0; }
.project-summary h3 { margin: 0 0 8px; color: #4d5967; font-size: 13px; font-weight: 600; }
.project-summary .project-role-grid { grid-template-columns: 1fr; margin-bottom: 0; }
.project-timeline { display: grid; gap: 6px; font-size: 14px; }
.project-timeline__hint { color: #4d5967; font-size: 13px; }
.project-timeline__hint.is-overdue { color: #a12f2f; }
.project-timeline__bar { display: block; height: 6px; border-radius: 3px; background: #e7ebef; overflow: hidden; }
.project-timeline__bar > span { display: block; height: 100%; border-radius: 3px; background: #0d7469; }
.project-timeline__bar.is-overdue > span { background: #a12f2f; }
@media (max-width: 760px) {
  .header-button__label { display: none; }
  .page-record-sections { display: none; }
}
.project-finance { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 14px; }
.project-finance th, .project-finance td { padding: 10px 8px; border-top: 1px solid #eef1f4; text-align: right; }
.project-finance thead th { border-top: 0; color: #5c6876; font-size: 12px; font-weight: 500; }
.project-finance th[scope="row"] { padding-left: 0; text-align: left; font-weight: 600; }
.project-finance td:last-child { width: 34%; }
.project-finance__label--revenue { color: #17643b; }
.project-finance__label--expense { color: #7a5611; }
.project-finance__total th, .project-finance__total td { border-top-color: #d3dae1; }
.project-finance__progress { display: flex; align-items: center; gap: 8px; }
.project-finance__progress .project-timeline__bar { flex: 1 1 auto; height: 8px; }
.project-finance__progress > span:last-child { min-width: 40px; color: #4d5967; font-size: 13px; }
.project-finance__bar--revenue > span { background: #17643b; }
.project-finance__bar--expense > span { background: #7a5611; }
.project-finance__details { margin-top: 10px; }
.project-finance__details summary { color: #0d6058; font-size: 14px; cursor: pointer; }
.project-finance__details[open] summary { margin-bottom: 8px; }
.project-section-edit { display: inline-flex; align-items: center; justify-content: center; }
.project-idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.project-action-link { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; color: #0d6058; background: transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.project-action-link:hover { background: #e4f4f1; }
.project-action-link .header-icon { width: 16px; height: 16px; }
.project-finance__state { margin: 4px 0 0; font-size: 13px; }
.project-record-history.entity-section { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 14px 24px; color: #4d5967; font-size: 13px; }
.project-record-history p { margin: 0; }
.project-record-history strong { color: #17212b; }

/* Project card, mockup B: header, typed work list, summary rail. */
.global-page-controls .page-breadcrumbs { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; align-self: center; gap: 4px; min-width: 0; min-height: 36px; margin: 0; line-height: 20px; }
.page-record-actions { display: flex; align-items: center; gap: 2px; }
.page-record-actions .header-action-menu { position: relative; }
.create-menu { min-width: 180px; }
.create-menu button { display: flex; align-items: center; gap: 8px; }
.create-menu .header-icon { width: 16px; height: 16px; color: #4d5967; }
.project-record-layout .entity-section,
.project-record-layout .project-side-section { border: 1px solid #dce1e7; border-radius: 16px; background: #fff; box-shadow: none; }
.project-record-layout .entity-section { padding: 18px 20px; }
.project-record-layout .entity-section__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.project-record-layout .entity-section__header > .project-inline-form,
.project-record-layout .entity-section__header > .record-choice { flex-basis: 100%; }
.project-section-title { font-size: 17px; }
.project-record-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.project-record-title h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; }
.project-record-title .project-status-badge,
.project-record-title .project-priority-badge { min-height: 26px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.project-type-tile { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; color: #0b6f65; background: #e6f3f1; }
.project-type-tile .header-icon { width: 20px; height: 20px; }
.project-record-description { color: #334150; font-size: 15px; line-height: 23px; }
.project-record-description > :first-child { margin-top: 0; }
.project-record-description > :last-child { margin-bottom: 0; }
.project-record-description:not(.is-expanded) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.project-description-toggle { justify-self: start; margin-top: -8px; font-size: 14px; }
.project-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.project-kpi { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #f4f6f8; color: #17212b; }
.project-kpi span { color: #4d5967; font-size: 13px; }
.project-kpi strong { font-size: 24px; line-height: 30px; }
.project-kpi--danger { background: #fff1f1; }
.project-kpi--danger span { color: #8a2727; }
.project-kpi--danger strong { color: #a12f2f; }
.project-kpi--positive { background: #eef7f1; }
.project-kpi--positive span, .project-kpi--positive strong { color: #17643b; }
.project-kpi--warning { background: #fff7df; }
.project-kpi--warning span, .project-kpi--warning strong { color: #7a5611; }
.project-section-edit { width: 40px; height: 40px; border: 0; border-radius: 10px; color: #334150; background: transparent; }
.project-section-edit:hover { background: #e7ebef; }

.project-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; color: #17212b; background: #dfe7ee; font-size: 13px; font-weight: 600; }
.project-record-layout .project-avatar { display: inline-flex; color: #17212b; font-size: 13px; line-height: 1; }
.project-record-layout .project-avatar > span[aria-hidden] { display: inline; color: inherit; font-size: inherit; }
.project-record-layout .project-avatar--small { width: 26px; height: 26px; border: 2px solid #fff; font-size: 10px; }
.project-event-row--meeting .project-avatar--small { border-color: #f1f7fe; }
.project-avatar-stack .project-avatar:nth-child(2) { background: #efe7dc; }
.project-avatar-stack .project-avatar:nth-child(3) { background: #e6e2ef; }
.project-avatar--more { background: #e7ebef; color: #4d5967; }
.project-avatar-stack { display: inline-flex; }
.project-avatar-stack .project-avatar + .project-avatar { margin-left: -8px; }

.project-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.project-filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid #d3dae1; border-radius: 999px; color: #17212b; background: #fff; font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.project-filter-chip .header-icon { width: 15px; height: 15px; }
.project-filter-chip:hover { border-color: #0b6f65; color: #0b6f65; }
.project-filter-chip.is-active { border-color: #17212b; color: #fff; background: #17212b; }
.project-work-section [data-work-type].is-filtered-out { display: none; }
.project-work-group + .project-work-group { margin-top: 18px; }
.project-work-group__title { margin: 0 0 8px; color: #4d5967; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.project-event-list { display: grid; gap: 8px; }

.project-record-layout .project-task-link.project-event-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid #e3e8ed; border-radius: 12px; background: #fff; box-shadow: none; }
.project-record-layout .project-task-link.project-event-row--meeting { border-color: #c6dcf5; background: #f1f7fe; }
.project-record-layout .project-task-link.project-event-row--call { border-color: #f0dfb8; background: #fffbf0; }
.project-record-layout .project-task-link.project-event-row--overdue { border-color: #f1c9c9; background: #fff6f6; }
.project-event-row__when { width: 64px; flex: 0 0 auto; padding-right: 10px; border-right: 1px solid currentColor; text-align: center; }
.project-event-row__when span { display: block; font-size: 12px; }
.project-event-row__when strong { font-size: 17px; }
.project-event-row__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; color: #4d5967; background: #e7ebef; }
.project-event-row__main { display: grid; flex: 1 1 auto; min-width: 0; }
.project-event-row__main .entity-title-link { justify-self: start; color: #17212b; font-size: 14px; line-height: 20px; font-weight: 600; text-align: left; }
.project-event-row__main small { color: #5f6b78; font-size: 12px; overflow-wrap: anywhere; }
.project-event-row__action { padding: 4px 6px; border: 0; border-radius: 6px; color: inherit; background: transparent; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.project-event-row__action:hover { background: rgb(255 255 255 / 70%); text-decoration: underline; }
.project-event-row--meeting { color: #1f5a99; }
.project-event-row--meeting .project-event-row__when { border-color: #c6dcf5; }
.project-event-row--meeting .project-event-row__icon { color: #fff; background: #3b82c4; }
.project-event-row--call { color: #7a5611; }
.project-event-row--call .project-event-row__when { border-color: #f0dfb8; }
.project-event-row--call .project-event-row__icon { color: #fff; background: #7a5611; }
.project-event-row--call .project-avatar--small { border-color: #fffbf0; }
.project-event-row--overdue { color: #a12f2f; }
.project-event-row--overdue .project-event-row__when { border-color: #f1c9c9; }
.project-event-row--overdue .project-event-row__icon { color: #fff; background: #a12f2f; }
.project-event-row--done { color: #5f6b78; }
.project-event-row--done .project-event-row__when { border-color: #e3e8ed; }
.project-event-row--done .project-event-row__main .entity-title-link { color: #4d5967; font-weight: 500; }

.project-record-layout .project-task-link.project-work-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 9px 4px; border: 0; border-bottom: 1px solid #eef1f4; border-radius: 0; background: transparent; box-shadow: none; font-size: 14px; }
.project-work-list .project-work-row:last-child { border-bottom: 0; }
.project-work-row__icon { width: 18px; height: 18px; color: #8a96a3; }
.project-work-row--danger .project-work-row__icon { color: #a12f2f; }
.project-work-row--accent .project-work-row__icon { color: #0b6f65; }
.project-work-row--warning .project-work-row__icon { color: #7a5611; }
.project-work-row--positive .project-work-row__icon { color: #17643b; }
.project-work-row .entity-title-link { flex: 1 1 auto; min-width: 0; color: #17212b; font-size: 14px; font-weight: 500; text-align: left; overflow-wrap: anywhere; }
.project-work-row.is-completed .entity-title-link { color: #5f6b78; text-decoration: line-through; }
.project-work-row__steps { color: #5f6b78; font-size: 12px; white-space: nowrap; }
.project-work-row__person { width: 96px; flex: 0 0 auto; color: #4d5967; font-size: 13px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-work-pill { padding: 3px 8px; border-radius: 999px; color: #4d5967; background: #eef1f4; font-size: 12px; white-space: nowrap; }
.project-work-pill--danger { color: #8a2727; background: #fff1f1; }
.project-work-pill--accent { color: #0b5e56; background: #e6f3f1; }
.project-work-pill--warning { color: #7a5611; background: #fff7df; }
.project-work-pill--positive { color: #17643b; background: #eef7f1; }
.project-work-section .project-task-actions summary { display: inline-flex; align-items: center; justify-content: center; width: 32px; min-height: 32px; padding: 0; border: 0; color: #4d5967; background: transparent; }
.project-work-section .project-task-actions summary:hover,
.project-work-section .project-task-actions[open] summary { background: #e7ebef; }
.project-work-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.project-work-footer > .project-inline-form, .project-work-footer > .record-choice { flex-basis: 100%; }
.project-add-link.project-inline-add,
.project-add-link { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 36px; margin: 0; padding: 6px 8px; border: 0; border-radius: 10px; color: #0b6f65; background: transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.project-add-link:hover, .project-add-link:focus-visible { background: #e6f3f1; }
.project-add-link .header-icon { width: 16px; height: 16px; }

.project-idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.project-idea-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 30px; padding: 4px 12px; border: 1px solid #d3dae1; border-radius: 999px; color: #17212b; background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.project-idea-chip:hover { border-color: #0b6f65; color: #0b6f65; }
.project-finance__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; flex: 1 1 auto; }
.project-finance__state { margin: 0; color: #7a5611; font-size: 13px; }
.project-finance__state.is-approved { color: #17643b; }
.project-finance__actions { display: flex; flex-wrap: wrap; gap: 2px; }
.project-finance .is-positive { color: #17643b; }
.project-finance .is-negative { color: #a12f2f; }
.project-finance__lists { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.project-finance__lists .project-finance__details[open] { flex-basis: 100%; }

.project-record-layout .project-context-column { top: 76px; gap: 16px; }
.project-summary { gap: 14px; }
.project-record-layout .project-context-column h2 { margin: 0; font-size: 15px; }
.project-record-layout .project-context-column h2 + * { margin-top: 0; }
.project-role-list { display: grid; gap: 12px; }
.project-summary .project-role-card { justify-content: flex-start; padding: 0; border: 0; background: transparent; box-shadow: none; }
.project-summary .project-role-card > div { display: grid; flex: 1 1 auto; min-width: 0; }
.project-summary .project-role-card span:not(.project-avatar):not(.visually-hidden) { color: #5f6b78; font-size: 12px; }
.project-summary .project-role-card strong { font-size: 14px; }
.project-summary .project-role-card .icon-button { width: 36px; height: 36px; border: 0; color: #334150; background: transparent; }
.project-summary .project-role-card .icon-button:hover { background: #e7ebef; }
.project-role-card .project-avatar:nth-of-type(1) { background: #dfe7ee; }
[data-project-role-card="customer_id"] .project-avatar { background: #efe7dc; }
.project-summary__label { display: block; margin-bottom: 6px; color: #5f6b78; font-size: 12px; }
.project-summary__team .project-team-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.project-summary .project-team-card { position: relative; display: inline-flex; padding: 0; border: 0; background: transparent; box-shadow: none; }
.project-record-layout .project-summary .project-team-card .project-avatar { width: 30px; height: 30px; font-size: 12px; }
.project-team-card:nth-child(3n+1) .project-avatar { background: #e2ecdf; }
.project-team-card:nth-child(3n+2) .project-avatar { background: #e6e2ef; }
.project-team-card__remove { position: absolute; top: -6px; right: -6px; display: none; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 1px solid #d3dae1; border-radius: 50%; color: #a12f2f; background: #fff; cursor: pointer; }
.project-team-card__remove .header-icon { width: 11px; height: 11px; }
.project-team-card:hover .project-team-card__remove, .project-team-card:focus-within .project-team-card__remove { display: inline-flex; }
@media (pointer: coarse) { .project-team-card__remove { display: inline-flex; } }
.project-summary .project-team-add { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; padding: 0; border: 1px dashed #b9c2cc; border-radius: 50%; color: #4d5967; background: transparent; }
.project-summary .project-team-add .header-icon { width: 15px; height: 15px; }
.project-summary .project-team-inline-form { flex-basis: 100%; }
.project-summary__dates { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid #eef1f4; }
.project-summary__row { display: flex; justify-content: space-between; gap: 12px; color: #4d5967; font-size: 13px; }
.project-summary__row strong { color: #17212b; }
.project-summary .project-timeline { gap: 6px; }
.project-summary .project-timeline > strong { font-size: 14px; }
.project-summary .project-timeline__hint { font-size: 13px; }

.materials-component--compact { gap: 8px; }
.materials-compact__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.materials-compact__tools { display: flex; gap: 2px; }
.materials-compact__tools .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; color: #334150; background: transparent; }
.materials-compact__tools .icon-button:hover { background: #e7ebef; }
.materials-component--compact .materials-file-area { display: grid; gap: 6px; padding: 0; border: 0; background: transparent; }
.materials-component--compact .materials-file-area.is-dragover { outline: 2px dashed #0b6f65; outline-offset: 4px; border-radius: 10px; }
.materials-component--compact .project-material-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.materials-component--compact .project-material-card { padding: 9px 0; border: 0; border-bottom: 1px solid #eef1f4; border-radius: 0; background: transparent; box-shadow: none; }
.materials-component--compact .project-material-card:last-child { border-bottom: 0; }
.materials-compact__hint { margin: 4px 0 0; color: #5f6b78; font-size: 12px; }

@media (max-width: 760px) {
  .project-record-layout .project-task-link.project-event-row { flex-wrap: wrap; gap: 10px; }
  .project-event-row .project-avatar-stack, .project-work-row__steps, .project-work-row__person { display: none; }
  .project-event-row__main { flex: 1 1 calc(100% - 140px); min-width: 0; }
  .project-record-layout .project-task-link.project-work-row { flex-wrap: wrap; gap: 6px 10px; }
  .project-work-row .entity-title-link { flex: 1 1 calc(100% - 70px); }
  .project-work-row .project-work-pill { margin-left: 28px; }
  .project-work-row .project-task-actions { margin-left: auto; }
  .project-record-layout .project-task-link.project-work-row .project-task-actions { order: 0; }
  .project-record-title h1 { font-size: 22px; line-height: 28px; }
}
#project-section-ideas .empty-state { margin: 0; padding: 12px; border: 0; background: #f7f9fa; color: #5f6b78; font-size: 14px; text-align: left; }
.project-finance th:first-child, .project-finance td:first-child { padding-left: 16px; }
.project-finance th:last-child, .project-finance td:last-child { padding-right: 16px; }
.project-finance__details .project-expense-table { width: 100%; min-width: 520px; margin-top: 0; table-layout: fixed; }
.project-finance__details .work-list-wrap { overflow-x: auto; }
.project-finance__details .project-expense-table th:nth-child(1), .project-finance__details .project-expense-table td:nth-child(1) { width: 18%; }
.project-finance__details .project-expense-table th:nth-child(3), .project-finance__details .project-expense-table td:nth-child(3) { width: 18%; text-align: right; font-variant-numeric: tabular-nums; }
.project-finance__details .project-expense-table th:nth-child(4), .project-finance__details .project-expense-table td:nth-child(4) { width: 26%; padding-left: 32px; }
.project-finance__details .project-expense-table td:nth-child(2) { overflow-wrap: anywhere; }

/* Цели, мини-карточка, типизированные формы и контакты. */
.goal-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; color: #2f4a8a; background: #eef2fb; font-size: 12px; font-weight: 700; white-space: nowrap; }
.goal-tag--2 { color: #5b3c8f; background: #f3eefb; }
.goal-tag--3 { color: #8a4a12; background: #fdf0e3; }
.goal-tag--4 { color: #17643b; background: #eaf6ee; }
.goal-tag--large { justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; font-size: 14px; }
.project-event-row__main small .goal-tag { margin-right: 6px; vertical-align: middle; }
.project-goal-list { display: grid; gap: 10px; }
.project-goal { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border: 1px solid #e3e8ed; border-radius: 12px; }
.project-goal.is-achieved { border-color: #d7e9dc; background: #f6fbf7; }
.project-goal.is-dropped { opacity: .7; }
.project-goal__main { display: grid; flex: 1 1 auto; min-width: 0; gap: 6px; }
.project-goal__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-goal__head strong { font-size: 15px; }
.project-goal__result { margin: 0; color: #334150; font-size: 14px; line-height: 20px; }
.project-goal__progress { display: flex; align-items: center; gap: 10px; color: #5f6b78; font-size: 12px; }
.project-goal__progress .project-timeline__bar { flex: 1 1 auto; }
.project-goal__empty { margin: 0; font-size: 13px; }
.project-goal-menu summary { display: inline-flex; align-items: center; justify-content: center; width: 32px; min-height: 32px; padding: 0; border: 0; color: #4d5967; background: transparent; }
.project-goal-menu summary:hover, .project-goal-menu[open] summary { background: #e7ebef; }
.project-goal-form { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border: 1px dashed #9cc9c2; border-radius: 12px; background: #f7fbfa; }
.project-goal-form[hidden] { display: none; }
.project-goal-form__grid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px; }
.project-goal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.project-goal-filters .project-filter-chip .goal-tag { height: 18px; padding: 0 6px; }
.project-work-row .goal-tag { flex: 0 0 auto; }

.project-peek { margin: 6px 0 10px; padding: 14px 16px; border: 1px solid #cfd8e0; border-radius: 12px; background: #fbfcfd; box-shadow: 0 8px 20px rgb(23 33 43 / 6%); display: grid; gap: 14px; }
.project-peek--meeting { border-color: #c6dcf5; background: #f8fbff; }
.project-peek--call { border-color: #f0dfb8; background: #fffdf8; }
.project-record-layout .is-peek-open.project-work-row { background: #fbfcfd; }
.project-record-layout .is-peek-open.project-event-row { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: -6px; }
.peek-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.peek-fact { display: grid; gap: 2px; min-width: 0; }
.peek-fact span, .peek-label { color: #5f6b78; font-size: 12px; }
.peek-fact strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.peek-people { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.peek-block { display: grid; gap: 4px; }
.peek-block p { margin: 0; color: #334150; font-size: 14px; line-height: 20px; white-space: pre-line; }
.peek-step { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.peek-step input { width: 18px; height: 18px; accent-color: #0b6f65; }
.peek-step.is-done span { color: #5f6b78; text-decoration: line-through; }
.peek-step-form { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.peek-step-form input { flex: 1 1 auto; min-height: 34px; padding: 4px 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; font-size: 14px; }
.peek-materials { display: flex; flex-wrap: wrap; gap: 6px; }
.peek-material { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; padding: 3px 10px; border: 1px solid #d3dae1; border-radius: 999px; color: #17212b; background: #fff; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.peek-material:hover { border-color: #0b6f65; color: #0b6f65; }
.peek-material .header-icon { width: 15px; height: 15px; }
.peek-material span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.peek-actions .primary-button, .peek-actions .secondary-button { display: inline-flex; align-items: center; gap: 6px; }
.peek-actions .header-icon { width: 16px; height: 16px; }
.peek-spacer { flex: 1 1 auto; }
.peek-form { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid #e3e8ed; }
.peek-form[hidden] { display: none; }
.peek-followup { display: grid; grid-template-columns: minmax(0, 1fr) 170px 140px; gap: 6px; margin-bottom: 6px; }
.peek-followup input, .peek-followup select { min-height: 36px; padding: 4px 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; font-size: 14px; background: #fff; }
.peek-followups { display: grid; gap: 4px; }

.project-typed-form { display: grid; gap: 12px; margin-top: 12px; padding: 18px 20px; border: 1px solid #dce1e7; border-top: 4px solid #0b6f65; border-radius: 16px; background: #fff; }
.project-typed-form--meeting { border-top-color: #3b82c4; background: #fafcff; }
.project-typed-form--call { border-top-color: #7a5611; background: #fffdf8; }
.project-typed-form [hidden] { display: none !important; }
.typed-head { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.typed-head__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; color: #0b6f65; background: #e6f3f1; }
.project-typed-form--meeting .typed-head__icon { color: #fff; background: #3b82c4; }
.project-typed-form--call .typed-head__icon { color: #fff; background: #7a5611; }
.typed-seg { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: #e9edf1; }
.typed-seg__item { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 8px; color: #4d5967; font-size: 14px; cursor: pointer; }
.typed-seg__item input { position: absolute; opacity: 0; pointer-events: none; }
.typed-seg__item .header-icon { width: 16px; height: 16px; }
.typed-seg__item.is-active { background: #fff; color: #17212b; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
.typed-seg__item--task.is-active .header-icon { color: #0b6f65; }
.typed-seg__item--meeting.is-active .header-icon { color: #3b82c4; }
.typed-seg__item--call.is-active .header-icon { color: #7a5611; }
.typed-seg__item:focus-within { outline: 2px solid #0b6f65; outline-offset: 1px; }
.typed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.project-typed-form .form-field { display: grid; gap: 4px; color: #4d5967; font-size: 13px; }
.project-typed-form .form-field input:not([type="radio"]):not([type="checkbox"]), .project-typed-form .form-field select, .project-typed-form .form-field textarea { box-sizing: border-box; width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid #c9d3dc; border-radius: 9px; color: #17212b; background: #fff; font: inherit; font-size: 14px; }
.typed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.typed-chip { min-height: 30px; padding: 0 12px; border: 1px solid #c9d3dc; border-radius: 9px; color: #17212b; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.typed-chip:hover { border-color: #0b6f65; color: #0b6f65; }
.typed-step, .typed-link { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.typed-step__box { width: 16px; height: 16px; flex: 0 0 auto; border: 1.5px solid #9aa6b2; border-radius: 4px; }
.typed-link input { flex: 1 1 0; min-width: 0; }
.typed-row-remove { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 auto; border: 0; border-radius: 8px; color: #5f6b78; background: transparent; cursor: pointer; }
.typed-row-remove:hover { background: #e7ebef; }
.typed-row-remove .header-icon { width: 15px; height: 15px; }
.typed-materials__tools { display: flex; flex-wrap: wrap; gap: 4px; }
.typed-files { display: flex; flex-wrap: wrap; gap: 6px; }
.typed-file { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: #eef1f4; font-size: 13px; color: #334150; }
.typed-file .header-icon { width: 14px; height: 14px; }
.typed-contact { gap: 8px; }
.typed-contact__search { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid #c9d3dc; border-radius: 9px; background: #fff; color: #5f6b78; }
.typed-contact__search input { flex: 1; min-height: 34px; border: 0 !important; outline: 0; padding: 0 !important; }
.typed-contact__results { display: grid; gap: 4px; }
.typed-contact__item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.typed-contact__item:hover { background: #f1f4f7; }
.typed-contact__item span:last-child { display: grid; }
.typed-contact__item strong { font-size: 14px; color: #17212b; }
.typed-contact__item small { color: #5f6b78; font-size: 12px; }
.typed-contact__selected { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #f0dfb8; border-radius: 10px; background: #fff; }
.typed-contact__info { display: grid; flex: 1; min-width: 0; }
.typed-contact__info small { color: #5f6b78; font-size: 12px; }
.typed-contact__new { display: grid; gap: 8px; padding: 10px; border: 1px dashed #d9c48c; border-radius: 10px; background: #fff; }
.typed-contact__new input { min-height: 36px; padding: 4px 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; font-size: 14px; }
.typed-contact__row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
@media (max-width: 760px) { .typed-contact__row { grid-template-columns: 1fr; } }
.project-typed-form--meeting .primary-button { background: #2f6fb0; border-color: #2f6fb0; }
.project-typed-form--call .primary-button { background: #7a5611; border-color: #7a5611; }

.contacts-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.contacts-main { display: grid; gap: 12px; min-width: 0; }
.contacts-search { display: flex; align-items: center; gap: 8px; max-width: 420px; min-height: 40px; padding: 0 12px; border: 1px solid #c9d3dc; border-radius: 10px; background: #fff; color: #5f6b78; }
.contacts-search input { flex: 1; min-height: 38px; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; }
.contacts-list { display: grid; overflow: hidden; border: 1px solid #dce1e7; border-radius: 16px; background: #fff; }
.contact-row { display: grid; grid-template-columns: 32px minmax(0, 2fr) minmax(0, 1fr) 150px; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-top: 1px solid #eef1f4; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.contact-row:first-child { border-top: 0; }
.contact-row:hover, .contact-row.is-active { background: #f1f8f7; }
.contact-row__name { display: grid; min-width: 0; }
.contact-row__name small { color: #5f6b78; font-size: 12px; }
.contact-row__phone { font-size: 14px; }
.contact-row__last { color: #4d5967; font-size: 13px; text-align: right; }
.contacts-detail { display: grid; gap: 14px; padding: 18px 20px; border: 1px solid #dce1e7; border-radius: 16px; background: #fff; }
.contacts-detail__hint { margin: 0; }
.contact-card__head { display: flex; align-items: center; gap: 12px; }
.contact-card__head > div { display: grid; flex: 1; min-width: 0; }
.contact-card__head strong { font-size: 17px; }
.contact-card__head small { color: #5f6b78; }
.project-avatar--large { width: 44px; height: 44px; font-size: 15px; }
.contact-facts { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.contact-facts div { display: flex; justify-content: space-between; gap: 12px; }
.contact-facts dt { color: #5f6b78; font-size: 12px; }
.contact-facts dd { margin: 0; }
.contact-note { margin: 0; font-size: 14px; color: #334150; }
.contact-note .peek-label { display: block; }
.contact-call-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #7a5611; border-color: #7a5611; }
.contact-call-open .header-icon { width: 16px; height: 16px; }
.contact-call-form, .contact-form { display: grid; gap: 10px; }
.contact-call-form[hidden] { display: none; }
.contact-form .form-field, .contact-call-form .form-field { display: grid; gap: 4px; font-size: 13px; color: #4d5967; }
.contact-form input, .contact-form textarea, .contact-call-form input, .contact-call-form select { box-sizing: border-box; width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; font-size: 14px; background: #fff; }
.contact-calls { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid #eef1f4; }
.contact-call { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; }
.contact-call__date { width: 44px; flex: 0 0 auto; color: #7a5611; font-weight: 600; }
.contact-call.is-done .contact-call__date { color: #5f6b78; font-weight: 400; }
.contact-call small { display: block; color: #5f6b78; font-size: 12px; }
.contact-call .entity-title-link { font-size: 14px; font-weight: 500; color: #17212b; }

@media (max-width: 900px) {
  .contacts-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-row { grid-template-columns: 32px minmax(0, 1fr); }
  .contact-row__phone, .contact-row__last { grid-column: 2; text-align: left; }
  .peek-followup, .project-goal-form__grid { grid-template-columns: minmax(0, 1fr); }
}
.peek-facts > div { min-width: 0; }
.peek-fact .goal-tag { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-goal-form label, .project-peek label, .project-typed-form label { display: grid; gap: 6px; }
.project-goal-form input:focus-visible, .project-goal-form select:focus-visible, .project-goal-form textarea:focus-visible,
.project-peek input:focus-visible, .project-peek select:focus-visible, .project-peek textarea:focus-visible,
.project-typed-form input:focus-visible, .project-typed-form select:focus-visible, .project-typed-form textarea:focus-visible {
  outline: 0; border-color: #087c75; box-shadow: 0 0 0 2px rgb(8 124 117 / 14%);
}
.project-inline-form input:focus-visible, .project-inline-form select:focus-visible, .project-inline-form textarea:focus-visible,
.component-form input:focus-visible, .component-form select:focus-visible, .component-form textarea:focus-visible,
.task-meeting-participants select:focus-visible {
  outline: 0; border-color: #087c75; box-shadow: 0 0 0 2px rgb(8 124 117 / 14%);
}
.task-meeting-participants select, .task-meeting-participants button { font-size: 14px; }
.project-inline-form label, .component-form label { display: grid; gap: 6px; }

/* ——— Списки задач, проектов, контактов и группы доступа (work-lists.js) ——— */
.legacy-list, .legacy-button { display: none !important; }
.list-actions { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.list-actions[hidden], .view-switch[hidden] { display: none; }
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #e6ebef; }
.view-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; color: #4d5967; background: transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.view-switch button:hover { color: #17212b; }
.view-switch button.is-active { color: #17212b; background: #fff; box-shadow: 0 1px 3px rgb(23 33 43 / 12%); }
.view-switch .header-icon { width: 16px; height: 16px; }
.view-switch--small button { min-height: 28px; padding: 0 10px; font-size: 13px; }
.list-create-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; color: #fff; background: #0b6f65; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.list-create-button:hover { background: #095c54; }
.list-create-button .header-icon { width: 16px; height: 16px; color: #fff; }
.list-actions .create-menu button[hidden] { display: none; }

.wl-page { display: grid; gap: 14px; min-width: 0; }
.wl-heading h1 { margin: 0; font-size: 24px; }
.wl-heading p { margin: 4px 0 0; color: #5d6875; }
.wl-heading--row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wl-spacer { flex: 1 1 auto; }
.wl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid #d3dce3; border-radius: 999px; color: #334150; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wl-chip b { color: #76818e; font-weight: 600; }
.wl-chip:hover { border-color: #9fb0bd; }
.wl-chip.is-active { border-color: #0b6f65; color: #0b6f65; background: #e8f4f2; }
.wl-chip.is-active b { color: #0b6f65; }
.wl-chip .header-icon, .wl-chip svg { width: 15px; height: 15px; }
.wl-chip--task.is-active { border-color: #2e9e6f; color: #1d7350; background: #eaf6f0; }
.wl-chip--meet.is-active { border-color: #3b82c4; color: #235f96; background: #ebf3fb; }
.wl-chip--call.is-active { border-color: #c8922a; color: #7a5611; background: #fdf5e4; }
.wl-chip--check { cursor: pointer; }
.wl-chip--check input { margin: 0; accent-color: #0b6f65; }
.wl-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wl-search { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid #c9d3dc; border-radius: 9px; background: #fff; }
.wl-search svg { width: 16px; height: 16px; color: #76818e; }
.wl-search input { width: 200px; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; }
.wl-search:focus-within { border-color: #0b6f65; box-shadow: 0 0 0 3px rgb(11 111 101 / 15%); }
.wl-select { display: inline-flex; align-items: center; gap: 6px; color: #5d6875; font-size: 13px; }
.wl-select select { min-height: 36px; max-width: 220px; padding: 0 8px; border: 1px solid #c9d3dc; border-radius: 9px; color: #17212b; background: #fff; font: inherit; font-size: 14px; }
.wl-range { display: inline-flex; align-items: center; gap: 4px; }
.wl-range input { min-height: 32px; padding: 0 6px; border: 1px solid #c9d3dc; border-radius: 8px; font: inherit; font-size: 13px; }
.wl-hint { margin: 0; font-size: 13px; }
.wl-small { font-size: 12px; }
.wl-late { color: #a12f2f; }
.wl-req { color: #a12f2f; }
.wl-empty { margin: 0; }
.wl-card { overflow: hidden; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.wl-group { margin-top: 4px; color: #4d5967; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.wl-group--late { color: #a12f2f; }
.wl-group--today { color: #0b6f65; }

.wl-tag { display: inline-flex; align-items: center; height: 22px; max-width: 100%; overflow: hidden; padding: 0 8px; border-radius: 6px; color: #4d5967; background: #eef1f4; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.wl-tag--late { color: #a12f2f; background: #fff1f1; }
.wl-tag--done { color: #17643b; background: #eef7f1; }
.wl-tag--blocked { color: #7a5611; background: #fff7df; }
.wl-tag--review { color: #235f96; background: #ebf3fb; }
.wl-tag--work { color: #0b6f65; background: #e8f4f2; }
.wl-tag--task { color: #1d7350; background: #eaf6f0; }
.wl-tag--meet { color: #235f96; background: #ebf3fb; }
.wl-tag--call { color: #7a5611; background: #fdf5e4; }
.wl-tag--new { color: #0b6f65; background: #e8f4f2; }
.wl-tag--shared { color: #5b3c8f; background: #f3eefb; }
.wl-status--active { color: #0b6f65; background: #e8f4f2; }
.wl-status--paused { color: #7a5611; background: #fff7df; }
.wl-status--completed { color: #17643b; background: #eef7f1; }
.wl-status--cancelled { color: #76818e; }
.wl-type { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px; }
.wl-type svg { width: 15px; height: 15px; }
.wl-type--task { color: #1d7350; background: #eaf6f0; }
.wl-type--meet { color: #235f96; background: #ebf3fb; }
.wl-type--call { color: #7a5611; background: #fdf5e4; }
.wl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.wl-bar { height: 5px; overflow: hidden; border-radius: 3px; background: #e6ebef; }
.wl-bar i { display: block; height: 100%; border-radius: 3px; background: #2e9e6f; }
.project-avatar--small { width: 26px; height: 26px; font-size: 10px; }
.wl-person { display: inline-flex; align-items: center; gap: 6px; color: #4d5967; font-size: 13px; white-space: nowrap; }
.wl-people { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-person-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 8px 2px 2px; border: 1px solid #dce4ea; border-radius: 999px; background: #fff; font-size: 13px; }
.wl-person-chip--contact { border-style: dashed; border-color: #c8922a; }
.wl-person-chip .typed-row-remove { width: 22px; height: 22px; }

/* Список */
.wl-row { display: grid; grid-template-columns: 30px 26px minmax(0, 1fr) minmax(0, 220px) auto auto 32px; align-items: center; gap: 10px; min-height: 54px; padding: 6px 12px; border-top: 1px solid #eef1f4; }
.wl-row:first-child { border-top: 0; }
.wl-row:hover { background: #fafbfc; }
.wl-row.is-peek-open { background: #f4f8f8; }
.wl-row.is-done .wl-row__title strong { color: #76818e; text-decoration: line-through; }
.wl-row__title { display: grid; gap: 2px; min-width: 0; padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; }
.wl-row__title strong { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.wl-row__title small { overflow: hidden; color: #76818e; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.wl-row__title:hover strong { color: #0b6f65; }
.wl-row__project { display: flex; align-items: center; gap: 4px; min-width: 0; }
.wl-row__open svg { width: 16px; height: 16px; }
.wl-row-action { white-space: nowrap; }
.wl-rel { font-size: 12px; white-space: nowrap; }
.wl-time { color: #4d5967; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-box { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 2px solid #9fb0bd; border-radius: 6px; color: #fff; background: #fff; cursor: pointer; }
.wl-box:hover:not(:disabled) { border-color: #2e9e6f; }
.wl-box.is-done { border-color: #2e9e6f; background: #2e9e6f; }
.wl-box svg { width: 14px; height: 14px; }
.wl-page .project-peek { margin: 0; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
.wl-row--meet .wl-time { color: #235f96; }
.wl-row--call .wl-time { color: #7a5611; }

/* Канбан */
.wl-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.wl-col { display: flex; flex-direction: column; gap: 8px; min-height: 160px; padding: 10px; border-radius: 12px; background: #eef1f4; }
.wl-col.is-drop { outline: 2px dashed #0b6f65; outline-offset: -2px; background: #e8f4f2; }
.wl-col__head { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.wl-col__note { margin-left: auto; font-size: 12px; font-weight: 500; }
.wl-col__hint { margin: auto 0 0; color: #76818e; font-size: 12px; line-height: 1.4; }
.wl-kcard { display: grid; gap: 8px; padding: 10px; border: 1px solid #dce4ea; border-left: 3px solid #2e9e6f; border-radius: 10px; background: #fff; cursor: grab; }
.wl-kcard--meet { border-left-color: #3b82c4; }
.wl-kcard--call { border-left-color: #c8922a; }
.wl-kcard.is-done { opacity: .75; }
.wl-kcard.is-dragging { opacity: .4; }
.wl-kcard:focus-visible { outline: 2px solid #0b6f65; outline-offset: 2px; }
.wl-kcard__title { padding: 0; border: 0; color: #17212b; background: none; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; text-align: left; cursor: pointer; }
.wl-kcard__title:hover { color: #0b6f65; }
.wl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wl-mini { min-height: 28px; padding: 0 10px; font-size: 12px; }
.wl-add { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px; border: 1px dashed #b7c4ce; border-radius: 9px; color: #4d5967; background: transparent; font: inherit; font-size: 13px; cursor: pointer; }
.wl-add svg { width: 15px; height: 15px; }
.wl-lane { display: grid; gap: 8px; }
.wl-lane__title { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 15px; }

/* Календарь */
.wl-cal-nav { display: inline-flex; align-items: center; gap: 4px; }
.wl-cal-nav svg { width: 18px; height: 18px; }
.wl-cal { display: grid; grid-template-columns: 56px repeat(var(--wl-cal-cols), minmax(110px, 1fr)); overflow-x: auto; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.wl-cal__corner, .wl-cal__label { border-bottom: 1px solid #e6ebef; }
.wl-cal__day { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 8px 4px; border-bottom: 1px solid #e6ebef; border-left: 1px solid #eef1f4; color: #5d6875; font-size: 13px; }
.wl-cal__day b { color: #17212b; font-size: 18px; }
.wl-cal__day.is-today b { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: #0b6f65; }
.wl-cal__label { padding: 6px 4px; color: #76818e; font-size: 11px; line-height: 1.2; text-align: right; }
.wl-cal__deadlines { display: grid; align-content: start; gap: 3px; min-height: 34px; padding: 4px; border-bottom: 1px solid #e6ebef; border-left: 1px solid #eef1f4; background: #fafbfc; }
.wl-cal__chip { display: block; width: 100%; overflow: hidden; padding: 3px 6px; border: 0; border-left: 3px solid #2e9e6f; border-radius: 5px; color: #17212b; background: #eaf6f0; font: inherit; font-size: 12px; text-align: left; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.wl-cal__chip--meet { border-left-color: #3b82c4; background: #ebf3fb; }
.wl-cal__chip--call { border-left-color: #c8922a; background: #fdf5e4; }
.wl-cal__chip.is-done { color: #76818e; text-decoration: line-through; }
.wl-cal__chip.is-late { color: #a12f2f; }
.wl-cal__hours { position: relative; }
.wl-cal__hour { position: absolute; right: 6px; transform: translateY(-50%); color: #76818e; font-size: 11px; font-variant-numeric: tabular-nums; }
.wl-cal__hour:first-child { transform: none; }
.wl-cal__col { position: relative; border-left: 1px solid #eef1f4; background-image: repeating-linear-gradient(to bottom, #eef1f4 0 1px, transparent 1px 52px); }
.wl-cal__col.is-today { background-color: #f6fbfa; }
.wl-cal__col.is-drop, .wl-cal__deadlines.is-drop, .wl-month__cell.is-drop { background-color: #e8f4f2; }
.wl-cal__block { position: absolute; right: 3px; left: 3px; display: grid; align-content: start; gap: 1px; overflow: hidden; padding: 3px 6px; border: 0; border-left: 3px solid #3b82c4; border-radius: 6px; color: #17212b; background: #ebf3fb; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.wl-cal__block strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wl-cal__block small { overflow: hidden; color: #5d6875; white-space: nowrap; text-overflow: ellipsis; }
.wl-cal__block--call { border-left-color: #c8922a; background: #fdf5e4; }
.wl-cal__block.is-done { opacity: .6; }
.wl-cal__now { position: absolute; right: 0; left: 0; height: 2px; background: #d14343; pointer-events: none; }
.wl-cal__now::before { content: ""; position: absolute; top: -4px; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: #d14343; }
.wl-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.wl-month__head { padding: 6px; border-bottom: 1px solid #e6ebef; color: #5d6875; font-size: 12px; font-weight: 700; text-align: center; }
.wl-month__cell { display: grid; align-content: start; gap: 3px; min-height: 104px; padding: 4px; border-top: 1px solid #eef1f4; border-left: 1px solid #eef1f4; }
.wl-month__cell.is-other { background: #fafbfc; }
.wl-month__cell.is-other .wl-month__num { color: #a3adb7; }
.wl-month__num { font-size: 13px; font-weight: 700; }
.wl-month__cell.is-today .wl-month__num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #0b6f65; }

/* Таймлайн */
.wl-legend { display: flex; flex-wrap: wrap; gap: 14px; color: #5d6875; font-size: 12px; }
.wl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wl-legend i { display: inline-block; width: 22px; height: 8px; border-radius: 4px; }
.wl-legend__plan { border: 1px dashed #8a97a5; background: #eef1f4; }
.wl-legend__diamond { width: 10px !important; height: 10px !important; border-radius: 2px !important; background: #3b82c4; transform: rotate(45deg); }
.wl-tl { overflow-x: auto; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.wl-tl__row { display: flex; min-height: 44px; border-top: 1px solid #eef1f4; }
.wl-tl__row--head { position: sticky; top: 0; z-index: 2; min-height: 34px; border-top: 0; background: #fff; }
.wl-tl__row--project { background: #fafbfc; }
.wl-tl__label { position: sticky; left: 0; z-index: 1; display: grid; align-content: center; gap: 1px; flex: 0 0 240px; width: 240px; padding: 4px 10px; border-right: 1px solid #e6ebef; background: inherit; background-color: #fff; font-size: 13px; }
.wl-tl__row--project .wl-tl__label { background-color: #fafbfc; font-weight: 700; }
.wl-tl__label--task { box-shadow: inset 3px 0 #2e9e6f; }
.wl-tl__label--meet { box-shadow: inset 3px 0 #3b82c4; }
.wl-tl__label--call { box-shadow: inset 3px 0 #c8922a; }
.wl-tl__label small { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.wl-tl__name { overflow: hidden; padding: 0; border: 0; color: #17212b; background: none; font: inherit; text-align: left; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.wl-tl__name:hover { color: #0b6f65; }
.wl-tl__lane { position: relative; flex: 0 0 auto; }
.wl-tl__cell { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-left: 1px solid #eef1f4; color: #5d6875; font-size: 11px; white-space: nowrap; }
.wl-tl__cell.is-today { color: #d14343; font-weight: 700; }
.wl-tl__gridline { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f1f4f6; }
.wl-tl__gridline.is-weekend { background: #fafbfc; }
.wl-tl__today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #d14343; opacity: .7; pointer-events: none; }
.wl-tl__plan { position: absolute; top: 8px; height: 10px; border: 1px dashed #8a97a5; border-radius: 5px; background: #eef1f4; cursor: ew-resize; }
.wl-tl__plan.is-dragging { border-color: #0b6f65; background: #e8f4f2; }
.wl-tl__fact { position: absolute; top: 22px; height: 12px; border-radius: 6px; }
.wl-tl__fact--ok { background: #2e9e6f; }
.wl-tl__fact--late { background: #d14343; }
.wl-tl__fact--run { background: #3b82c4; }
.wl-tl__fact--blk { background: #c8922a; }
.wl-legend .wl-tl__fact--ok, .wl-legend .wl-tl__fact--late, .wl-legend .wl-tl__fact--run, .wl-legend .wl-tl__fact--blk { position: static; }
.wl-tl__diamond { position: absolute; top: 14px; width: 16px; height: 16px; padding: 0; border: 2px solid #fff; border-radius: 3px; background: #3b82c4; transform: rotate(45deg); cursor: pointer; }
.wl-tl__diamond--call { background: #c8922a; }
.wl-tl__diamond--task { background: #2e9e6f; }

/* Мини-карточка */
.wl-float-peek { position: fixed; z-index: 60; top: 96px; right: 24px; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow: auto; margin: 0; }
.wl-float-peek__head { display: flex; align-items: center; gap: 8px; }
.wl-float-peek__head strong { flex: 1 1 auto; font-size: 15px; }
.project-peek .peek-followup { grid-template-columns: auto minmax(0, 1fr) 150px 140px 30px; align-items: center; }
.wl-follow-type { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: #eef1f4; }
.wl-follow-type__item { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; color: #76818e; background: transparent; cursor: pointer; }
.wl-follow-type__item svg { width: 15px; height: 15px; }
.wl-follow-type__item.is-active { background: #fff; box-shadow: 0 1px 2px rgb(23 33 43 / 15%); }
.wl-follow-type__item--task.is-active { color: #1d7350; }
.wl-follow-type__item--meet.is-active { color: #235f96; }
.wl-follow-type__item--call.is-active { color: #7a5611; }
.wl-dialog-backdrop { position: fixed; z-index: 80; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgb(23 33 43 / 35%); }
.wl-dialog { display: grid; gap: 12px; width: min(480px, 100%); padding: 20px; border-radius: 14px; background: #fff; box-shadow: 0 20px 50px rgb(23 33 43 / 25%); }
.wl-dialog h2 { margin: 0; font-size: 18px; }
.wl-dialog p { margin: 0; }

/* Боковая панель создания */
.wl-panel { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(560px, 100vw); border-left: 1px solid #dce4ea; background: #fff; box-shadow: -16px 0 40px rgb(23 33 43 / 14%); }
.wl-panel__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e6ebef; }
.wl-panel__head > div { display: grid; flex: 1 1 auto; }
.wl-panel__head strong { font-size: 17px; }
.wl-panel__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: #0b6f65; background: #e8f4f2; }
.wl-panel__icon svg { width: 18px; height: 18px; }
.wl-panel__icon--task { color: #1d7350; background: #eaf6f0; }
.wl-panel__icon--meet { color: #235f96; background: #ebf3fb; }
.wl-panel__icon--call { color: #7a5611; background: #fdf5e4; }
.wl-panel__body { flex: 1 1 auto; overflow: auto; padding: 16px 20px 24px; }
.wl-panel__body .project-typed-form { margin: 0; padding: 0; border: 0; box-shadow: none; }
.wl-panel__note { margin: 12px 0 0; font-size: 12px; }
.wl-panel__footer { position: sticky; bottom: -24px; display: flex; align-items: center; gap: 10px; margin: 8px -20px -24px; padding: 12px 20px; border-top: 1px solid #e6ebef; background: #fff; }
.wl-panel__footer small { flex: 1 1 auto; }
.wl-project-form { display: grid; gap: 14px; }
.wl-goal-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px 30px; align-items: start; gap: 8px; margin-bottom: 8px; }
.wl-goal-row input[type="date"] { min-height: 38px; padding: 0 8px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; }
.wl-goal-row > .goal-tag { margin-top: 8px; }
.wl-combo { position: relative; }
.wl-combo__search { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border: 1px solid #c9d3dc; border-radius: 9px; background: #fff; }
.wl-combo__search:focus-within { border-color: #0b6f65; box-shadow: 0 0 0 3px rgb(11 111 101 / 15%); }
.wl-combo__search svg { width: 16px; height: 16px; flex: 0 0 auto; color: #76818e; }
.wl-combo__search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; }
.wl-combo__options { position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; left: 0; display: grid; max-height: 280px; overflow: auto; padding: 4px; border: 1px solid #d5e0e7; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgb(31 41 55 / 15%); }
.wl-combo__options[hidden] { display: none; }
[data-project-options].wl-combo__options, [data-project-options] { position: static; box-shadow: none; border: 0; padding: 4px 0 0; max-height: 220px; }
.wl-combo__section { padding: 6px 8px 2px; color: #76818e; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.wl-combo__option { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 4px 8px; border: 0; border-radius: 7px; color: #17212b; background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.wl-combo__option:hover, .wl-combo__option:focus-visible { background: #f1f5f7; }
.wl-combo__option small { margin-left: auto; white-space: nowrap; }
.wl-combo__option mark { color: inherit; background: #fff1b8; }
.wl-combo__create { color: #0b6f65; font-weight: 600; }
.wl-combo__create svg { width: 15px; height: 15px; }
.wl-combo__selected { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 6px 4px 10px; border: 1px solid #0b6f65; border-radius: 9px; background: #f4faf9; }
.wl-combo__selected[hidden] { display: none; }
.wl-goal-combo { display: grid; gap: 6px; min-width: 0; }
.wl-goal-combo__picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.wl-goal-combo__picked[hidden], .wl-goal-combo__result[hidden] { display: none; }
.wl-goal-form { display: grid; gap: 10px; }
.wl-goal-form__deadline { max-width: 220px; }
.wl-participant { display: grid; grid-template-columns: auto auto minmax(0, 1fr) 30px; align-items: center; gap: 8px; margin-bottom: 6px; }
.wl-participant input { min-height: 34px; padding: 0 8px; border: 1px solid #c9d3dc; border-radius: 8px; font: inherit; font-size: 13px; }
.wl-participants select, .wl-attendees select { min-height: 36px; padding: 0 8px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; background: #fff; }
.typed-step [data-step-assignee] { min-height: 32px; max-width: 160px; padding: 0 6px; border: 1px solid #c9d3dc; border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }
.wl-project-materials { display: grid; gap: 2px; padding: 6px; border: 1px solid #dce4ea; border-radius: 9px; background: #fafbfc; }
.wl-project-materials[hidden] { display: none; }
.wl-material-check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; cursor: pointer; }
.wl-material-check svg { width: 15px; height: 15px; color: #76818e; }
.wl-material-check small { margin-left: auto; }
.typed-chips input[type="date"] { min-height: 32px; padding: 0 8px; border: 1px solid #c9d3dc; border-radius: 8px; font: inherit; font-size: 13px; }
.typed-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Список проектов */
.wl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wl-kpi { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid #dce4ea; border-radius: 12px; color: #17212b; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.wl-kpi:disabled { cursor: default; }
.wl-kpi span { color: #5d6875; font-size: 13px; }
.wl-kpi strong { font-size: 24px; }
.wl-kpi.is-active { border-color: #0b6f65; box-shadow: inset 0 0 0 1px #0b6f65; }
.wl-projects__head, .wl-project { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(120px, 1fr) minmax(140px, 1.2fr) 110px 130px 36px; align-items: center; gap: 12px; padding: 10px 14px; }
.wl-projects__head { color: #76818e; font-size: 12px; font-weight: 700; border-bottom: 1px solid #e6ebef; }
.wl-project { border-top: 1px solid #eef1f4; }
.wl-project:first-of-type { border-top: 0; }
.wl-project.is-open { background: #fafbfc; }
.wl-project__main { display: grid; gap: 4px; min-width: 0; padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; }
.wl-project__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wl-project__title strong { font-size: 15px; }
.wl-project__main:hover .wl-project__title strong { color: #0b6f65; }
.wl-project__goal { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; color: #4d5967; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.wl-project__progress, .wl-project__event, .wl-project__deadline { display: grid; gap: 3px; min-width: 0; font-size: 13px; }
.wl-project__event small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wl-project__team { display: flex; align-items: center; }
.wl-project__team .project-avatar + .project-avatar { margin-left: -6px; border: 2px solid #fff; }
.wl-project-details { grid-column: 1 / -1; display: grid; gap: 12px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid #e6ebef; }
.wl-project-details__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.wl-project-details__facts div { display: grid; gap: 2px; font-size: 13px; }
.wl-project-details__goals { display: grid; gap: 4px; }
.wl-goal-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.wl-project-details .primary-button { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.wl-project-details .primary-button svg { width: 15px; height: 15px; }

/* Контакты */
.contacts-layout--rows { display: block; }
.wl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wl-table th { padding: 10px 12px; border-bottom: 1px solid #e6ebef; color: #76818e; font-size: 12px; text-align: left; }
.wl-table td { padding: 8px 12px; border-top: 1px solid #eef1f4; vertical-align: middle; }
.wl-table td small { display: block; }
.wl-contact-row.is-open td { background: #f4f8f8; }
.wl-contact-name { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
.wl-contact-name:hover strong { color: #0b6f65; }
.wl-contact-expand > td { padding: 0 12px 14px; background: #f4f8f8; border-top: 0; }
.wl-contact-detail { display: grid; gap: 12px; padding: 12px; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.wl-contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wl-channel { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.wl-channel svg { width: 16px; height: 16px; color: #76818e; }
.wl-contact-block { display: grid; gap: 8px; }
.wl-contact-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wl-contact-block__head .secondary-button { display: inline-flex; align-items: center; gap: 6px; }
.wl-contact-block__head svg { width: 15px; height: 15px; }
.wl-comm { display: grid; grid-template-columns: 26px 110px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #eef1f4; font-size: 13px; }
.wl-comm.is-done { color: #5d6875; }
.wl-comm__title { display: grid; min-width: 0; }
.wl-done-toggle { display: inline-flex; align-items: center; gap: 4px; justify-self: start; }
.wl-done-toggle svg { width: 15px; height: 15px; }
.wl-note { padding: 8px 10px; border-radius: 8px; background: #fafbfc; }
.wl-note p { margin: 0 0 2px; white-space: pre-wrap; }
.wl-note-form { display: flex; gap: 8px; }
.wl-note-form input { flex: 1 1 auto; min-height: 36px; padding: 0 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; }
.wl-contact-form { display: grid; gap: 10px; margin-top: 8px; }
.wl-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Группы доступа */
.ag-page { min-width: 0; }
.ag-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.ag-list { display: grid; gap: 4px; padding: 8px; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.ag-list__item { display: grid; gap: 2px; padding: 8px 10px; border: 0; border-radius: 8px; color: #17212b; background: none; font: inherit; text-align: left; cursor: pointer; }
.ag-list__item small { color: #76818e; font-size: 12px; }
.ag-list__item:hover { background: #f4f6f8; }
.ag-list__item.is-active { background: #e8f4f2; box-shadow: inset 3px 0 #0b6f65; }
.ag-create { display: grid; gap: 6px; padding: 6px; }
.ag-create input { min-height: 36px; padding: 0 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; }
.ag-main { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid #dce4ea; border-radius: 12px; background: #fff; }
.ag-main__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ag-main__head h2 { margin: 0; font-size: 20px; }
.ag-name { min-height: 38px; padding: 0 10px; border: 1px solid #c9d3dc; border-radius: 9px; font: inherit; font-size: 18px; font-weight: 700; }
.ag-delete { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: #a12f2f; }
.ag-delete svg { width: 15px; height: 15px; }
.ag-table { display: grid; overflow-x: auto; border: 1px solid #e6ebef; border-radius: 10px; }
.ag-row { display: grid; grid-template-columns: minmax(200px, 1fr) auto 64px auto; align-items: center; gap: 14px; padding: 8px 12px; border-top: 1px solid #eef1f4; }
.ag-row--head { border-top: 0; color: #76818e; font-size: 12px; font-weight: 700; background: #fafbfc; }
.ag-row--dash { grid-template-columns: minmax(200px, 1fr) auto; }
.ag-row.is-locked { color: #76818e; }
.ag-row__name { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.ag-row__name small { color: #76818e; font-size: 12px; font-weight: 400; }
.ag-row__toggle { display: flex; align-items: flex-start; gap: 6px; padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; }
.ag-row__toggle > span { display: grid; gap: 2px; }
.ag-row__toggle svg { width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }
.ag-row__locked { display: inline-flex; align-items: center; gap: 6px; grid-column: 2 / -1; font-size: 13px; }
.ag-row__locked svg { width: 14px; height: 14px; }
.ag-section { padding: 10px 12px 4px; border-top: 1px solid #e6ebef; color: #4d5967; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; background: #fafbfc; }
.wl-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: #eef1f4; }
.wl-seg button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 6px; color: #4d5967; background: transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wl-seg button.is-active { color: #0b6f65; background: #fff; box-shadow: 0 1px 2px rgb(23 33 43 / 15%); }
.wl-seg button:disabled { color: #b3bcc5; cursor: not-allowed; }
.ag-toggle { position: relative; width: 40px; height: 22px; padding: 0; border: 0; border-radius: 11px; background: #c9d3dc; cursor: pointer; }
.ag-toggle span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.ag-toggle.is-on { background: #0b6f65; }
.ag-toggle.is-on span { left: 21px; }
.ag-fields { display: grid; gap: 0; margin: 0 12px 10px 34px; border: 1px solid #eef1f4; border-radius: 8px; }
.ag-fields__head, .ag-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; }
.ag-fields__head { color: #76818e; font-size: 12px; font-weight: 700; }
.ag-field { border-top: 1px solid #f1f4f6; }
.ag-fields__note { margin: 0; padding: 6px 10px 8px; font-size: 12px; }
.ag-note { margin: 0; font-size: 12px; }
.ag-footer { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 0 0; border-top: 1px solid #e6ebef; background: #fff; color: #76818e; font-size: 13px; }
.ag-footer span { flex: 1 1 auto; }
.ag-footer.is-dirty span { color: #7a5611; font-weight: 600; }
.ag-members { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-member { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid #dce4ea; border-radius: 999px; font-size: 14px; }
.ag-member-add { justify-self: start; }
/* Прокрутка внутри блока группы: заголовок с вкладками и строка «Сохранить права» всегда на экране. */
.ag-create > * { box-sizing: border-box; width: 100%; min-width: 0; }
.ag-create input { font-size: 14px; }
.ag-list { position: sticky; top: 16px; }
@media (min-width: 1101px) {
  .ag-main { display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 420px; }
  .ag-main__body { display: grid; gap: 12px; flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
  .ag-main__head, .ag-footer { flex: 0 0 auto; }
  .ag-footer { position: static; }
}

@media (max-width: 1100px) {
  .wl-row { grid-template-columns: 30px 26px minmax(0, 1fr) auto 32px; }
  .wl-row__project, .wl-row .wl-person { display: none; }
  .wl-projects__head { display: none; }
  .wl-project { grid-template-columns: minmax(0, 1fr) 130px 36px; }
  .wl-project__event, .wl-project__team { display: none; }
  .wl-project__progress { grid-column: 1 / -1; grid-row: 2; }
  .ag-layout { grid-template-columns: 1fr; }
  .ag-list { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
}
@media (max-width: 760px) {
  .list-actions { gap: 6px; }
  .view-switch button span, .list-create-button span { display: none; }
  .view-switch button { padding: 0 9px; }
  .wl-heading h1 { font-size: 20px; }
  .wl-filters { align-items: stretch; }
  .wl-filters .wl-spacer { display: none; }
  .wl-search, .wl-select { width: 100%; }
  .wl-search input { width: 100%; }
  .wl-select select { flex: 1 1 auto; max-width: none; }
  .wl-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .wl-chip { flex: 0 0 auto; }
  .wl-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
  .wl-row .wl-type, .wl-row__open, .wl-row-action { display: none; }
  .wl-row .wl-tag, .wl-row .wl-rel { grid-column: 2 / -1; justify-self: start; }
  .wl-board { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; }
  .wl-col { scroll-snap-align: start; }
  .wl-cal { grid-template-columns: 44px repeat(var(--wl-cal-cols), minmax(96px, 1fr)); }
  .wl-month__cell { min-height: 72px; }
  .wl-month .wl-cal__chip { font-size: 10px; padding: 2px 3px; }
  .wl-tl__label { flex-basis: 150px; width: 150px; }
  .wl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl-project { grid-template-columns: minmax(0, 1fr) 36px; }
  .wl-project__deadline { grid-column: 1 / -1; grid-row: 3; }
  .wl-panel { width: 100vw; border-left: 0; }
  .wl-goal-row { grid-template-columns: auto minmax(0, 1fr) 30px; }
  .wl-goal-row input[type="date"] { grid-column: 2; }
  .typed-grid--two, .wl-grid-4 { grid-template-columns: 1fr; }
  .project-peek .peek-followup { grid-template-columns: auto minmax(0, 1fr) 30px; }
  .project-peek .peek-followup select, .project-peek .peek-followup input[type="date"] { grid-column: 1 / -1; }
  .wl-float-peek { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; max-height: 75vh; }
  .wl-table thead { display: none; }
  .wl-table tr.wl-contact-row { display: grid; grid-template-columns: 1fr 1fr; padding: 6px 0; border-top: 1px solid #eef1f4; }
  .wl-table tr.wl-contact-row td { border: 0; padding: 4px 12px; }
  .wl-table tr.wl-contact-row td:first-child { grid-column: 1 / -1; }
  .wl-table tr.wl-contact-expand, .wl-table tr.wl-contact-expand td { display: block; }
  .wl-comm { grid-template-columns: 26px minmax(0, 1fr); }
  .wl-comm > .wl-tag, .wl-comm > small { grid-column: 2; }
  .ag-row { grid-template-columns: 1fr; gap: 6px; }
  .ag-row--head { display: none; }
  .ag-row__locked { grid-column: 1; }
  .ag-fields { margin-left: 12px; }
  .ag-main { padding: 12px; }
}
.project-peek label.peek-step, .project-peek .wl-material-check, .project-peek .wl-chip--check { display: flex; }
.peek-step small { margin-left: auto; }
.peek-fact .entity-title-link { padding: 0; font-size: 14px; font-weight: 600; text-align: left; }
.wl-panel label.wl-material-check, .wl-panel label.typed-seg__item, .wl-dialog label.typed-seg__item { display: flex; }
.project-typed-form label.wl-combo__search, .wl-panel label.wl-combo__search, .project-goal-form label.wl-combo__search, .project-typed-form label.typed-contact__search { display: flex; gap: 6px; }
.wl-combo__search input, .wl-combo__search input:focus, .wl-combo__search input:focus-visible { min-height: 34px; padding: 0; border: 0 !important; box-shadow: none !important; outline: 0; background: transparent; font-weight: 400; }
.wl-panel .form-field { gap: 6px; color: #334150; font-size: 13px; }
.wl-panel div.form-field { display: grid; }
.wl-panel .form-field > small { font-size: 12px; }
.wl-panel .form-field input:not([type="checkbox"]):not([type="radio"]), .wl-panel .form-field select, .wl-panel .form-field textarea { font-size: 14px; }
.wl-panel__footer .primary-button, .wl-panel__footer .link-button { white-space: nowrap; }
.wl-comm .entity-title-link, .wl-tl__label .entity-title-link { padding: 0; font-size: 14px; font-weight: 600; text-align: left; }
.wl-contacts a, .wl-contact-detail a { color: #0b6f65; text-decoration: none; }
.wl-contacts a:hover, .wl-contact-detail a:hover { text-decoration: underline; }
.wl-goal-form .form-field, .wl-goal-form > p { font-size: 13px; }
.wl-goal-form input[type="date"] { min-height: 36px; font-size: 14px; }
.wl-page > *, .wl-filters > *, .ag-layout > * { min-width: 0; max-width: 100%; }
#tasks-view, #projects-view, #groups-view, #contacts-view { min-width: 0; max-width: 100%; }
@media (max-width: 760px) { .wl-filters > .wl-chips { width: 100%; } }
.wl-select { min-width: 0; }
@media (max-width: 760px) { .wl-select select { width: 100%; min-width: 0; } }
@media (max-width: 760px) {
  .wl-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .wl-row .wl-box { justify-self: start; }
  .wl-contacts { overflow: hidden; }
  .wl-table tr.wl-contact-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wl-table tr.wl-contact-row td { min-width: 0; overflow-wrap: anywhere; }
  .wl-contact-expand > td { padding: 0 8px 12px; }
  .wl-contact-detail { padding: 10px; }
  .wl-comm { display: flex; flex-wrap: wrap; gap: 6px 10px; }
  .wl-comm__title { flex: 1 1 100%; order: 3; }
  .wl-comm > .wl-tag, .wl-comm > small { order: 4; }
  .wl-contact-block__head .secondary-button { flex: 1 1 100%; justify-content: center; }
  .wl-note-form { flex-wrap: wrap; }
  .wl-note-form input { flex-basis: 100%; }
  .ag-field, .ag-fields__head { grid-template-columns: 1fr; gap: 4px; }
  .ag-fields__head span:last-child { display: none; }
  .ag-footer { flex-wrap: wrap; }
  .ag-main__head .view-switch { width: 100%; }
  .ag-main__head .view-switch button { flex: 1 1 0; justify-content: center; }
}
@media (max-width: 760px) {
  .ag-row:not(.ag-row--dash) > .wl-seg { align-items: center; }
  .ag-row:not(.ag-row--dash) > .wl-seg::before { content: "Видит"; padding: 0 8px 0 6px; color: #76818e; font-size: 12px; }
  .ag-row:not(.ag-row--dash) > .ag-toggle ~ .wl-seg::before { content: "Меняет"; }
  .ag-row > .ag-toggle::after { content: "Создаёт"; position: absolute; top: 3px; left: 48px; color: #76818e; font-size: 12px; white-space: nowrap; }
}
/* Календарь: иконка типа и планирование задач по времени. */
.wl-col.is-drop-target { outline: 2px dashed #0b6f65; outline-offset: -2px; background: #e8f4f2; }
.wl-cal__deadlines.is-drop-target, .wl-month__cell.is-drop-target { background-color: #e8f4f2; }
.wl-cal__chip { display: flex; align-items: center; gap: 4px; }
.wl-cal__chip svg, .wl-cal__block strong svg { width: 13px; height: 13px; flex: 0 0 auto; }
.wl-cal__chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wl-cal__chip--task svg, .wl-cal__block--task svg { color: #1d7350; }
.wl-cal__chip--meet svg, .wl-cal__block--meet svg { color: #235f96; }
.wl-cal__chip--call svg, .wl-cal__block--call svg { color: #7a5611; }
.wl-cal__block strong { display: flex; align-items: center; gap: 4px; }
.wl-cal__block strong span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wl-cal__block--task { border-left-color: #2e9e6f; background: #eaf6f0; }
.wl-cal__block.is-late { box-shadow: inset 0 0 0 1px #d14343; }
.wl-cal__block { cursor: grab; }
.wl-cal__block.is-dragging, .wl-cal__chip.is-dragging { opacity: .4; }
.wl-cal__ghost { position: absolute; right: 3px; left: 3px; z-index: 3; display: flex; align-items: flex-start; padding: 2px 6px; border: 2px dashed #0b6f65; border-radius: 6px; color: #0b6f65; background: rgb(232 244 242 / 80%); font-size: 12px; font-weight: 700; pointer-events: none; }
/* Отрезки времени задачи: растягивание за нижний край, многодневная задача в строке сроков. */
.wl-cal__block.is-short { padding-top: 1px; padding-bottom: 1px; font-size: 11px; }
.wl-cal__resize { position: absolute; right: 0; bottom: 0; left: 0; height: 7px; cursor: ns-resize; touch-action: none; }
.wl-cal__resize::after { position: absolute; bottom: 2px; left: 50%; width: 18px; height: 2px; margin-left: -9px; border-radius: 1px; background: rgb(23 33 43 / 28%); content: ""; opacity: 0; transition: opacity .12s; }
.wl-cal__block:hover .wl-cal__resize::after, .wl-cal__block.is-resizing .wl-cal__resize::after { opacity: 1; }
.wl-cal__block.is-resizing { z-index: 4; box-shadow: 0 0 0 1px #0b6f65, 0 4px 12px rgb(23 33 43 / 16%); cursor: ns-resize; }
.wl-cal__chip.is-span { border-left-style: dashed; background: transparent; box-shadow: inset 0 0 0 1px #cfe5da; }
.wl-cal__chip.is-span.wl-cal__chip--meet { box-shadow: inset 0 0 0 1px #c9dcef; }
.wl-cal__chip small { flex: 0 0 auto; margin-left: auto; color: #6b7682; font-size: 10px; }
.wl-peek-slots { display: grid; gap: 2px; font-size: 13px; }

/* Фокус полей во всём приложении: тонкая рамка без широкой каймы поверх подписи. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus-visible,
select:focus, select:focus-visible, textarea:focus, textarea:focus-visible,
[contenteditable="true"]:focus, [contenteditable="true"]:focus-visible {
  outline: 0 !important;
  outline-offset: 0 !important;
  border-color: #0b6f65 !important;
  box-shadow: 0 0 0 0.5px #0b6f65 !important;
}
.wl-search:focus-within, .wl-combo__search:focus-within, .rich-text-editor__content:focus-within, .form-project-picker__trigger:focus-visible {
  border-color: #0b6f65 !important;
  box-shadow: 0 0 0 0.5px #0b6f65 !important;
}
.wl-combo__search input:focus, .wl-combo__search input:focus-visible, .wl-search input:focus, .wl-search input:focus-visible, .rich-text-editor__content [contenteditable="true"]:focus { box-shadow: none !important; border-color: transparent !important; }
button:focus-visible, a:focus-visible, .typed-seg__item:focus-within, .wl-kcard:focus-visible, .task-outcome-option:has(input:focus-visible) { outline-width: 1px !important; outline-offset: 1px !important; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 1px solid #0b6f65; outline-offset: 1px; }

/* Форма задачи, встречи и звонка по макетам «Новая задача v2» и «Новая встреча и звонок v2».
   Блоки в разметке одни и те же; порядок и пары колонок зависят от типа записи. */
.wl-typed { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 12px; align-items: start; }
.wl-typed > * { grid-column: 1 / -1; min-width: 0; }
.wl-typed .form-field { margin: 0; }
.wl-typed .form-field > span:first-child, .wl-typed .form-field > label > span:first-child { color: #4d5967; font-size: 13px; font-weight: 400; }
.wl-typed .form-field input:not([type="radio"]):not([type="checkbox"]), .wl-typed .form-field select, .wl-typed .form-field textarea { min-height: 40px; border-radius: 10px; }
.wl-typed .form-field input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; }
.wl-typed .form-message { min-height: 0; margin: 0; }
.wl-typed .form-message:empty { display: none; }
.wl-typed label.typed-seg__item, .wl-typed label.wl-material-check { display: flex; }
.wl-typed .typed-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #eef1f4; }
.wl-typed .typed-seg__item { color: #334150; }
.wl-typed .typed-seg__item.is-active { color: #1d6f4c; box-shadow: 0 1px 2px rgb(23 33 43 / 12%); }
.wl-typed .typed-seg__item--meeting.is-active { color: #2f6fb0; }
.wl-typed .typed-seg__item--call.is-active { color: #7a5611; }
.wl-typed .typed-seg__item:focus-within { outline: 0 !important; }
.wl-typed .typed-seg__item:has(input:focus-visible) { outline: 1px solid #0b6f65 !important; outline-offset: 1px; }
.typed-box { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid #dce1e7; border-radius: 12px; background: #fbfcfd; }
.typed-box .typed-step, .typed-box .typed-link, .typed-box .wl-participant { margin: 0; }
.typed-box [data-steps], .typed-box [data-participant-rows] { display: grid; gap: 8px; }
.typed-box [data-participant-rows]:empty { display: none; }
.typed-step.is-done .typed-step__box { border-color: #2e9e6f; background: #2e9e6f; }
.typed-step.is-done [data-step-input] { color: #76818e; text-decoration: line-through; }
.wl-typed .typed-step [data-step-assignee] { width: 170px; max-width: 170px; min-height: 40px; border-radius: 10px; }
.wl-typed .wl-participant { grid-template-columns: 28px 180px minmax(0, 1fr) 28px; gap: 10px; }
.wl-typed .typed-chips { align-items: center; margin: 0; }
.wl-typed .typed-chip { min-height: 34px; border-radius: 999px; color: #334150; }
.wl-typed .typed-chip.is-active { border-color: #2e9e6f; color: #1d6f4c; background: #e7f4ee; font-weight: 600; }
.wl-typed .typed-chips input[type="date"] { width: 170px; min-height: 34px; margin-left: 6px; border-radius: 10px; }
.typed-schedule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-typed-form--meeting .typed-schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wl-typed .typed-materials__tools { gap: 18px; }
.wl-typed .wl-project-materials { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #eef1f4; }
.wl-typed .wl-project-materials .wl-combo__section { padding: 0 0 4px; background: none; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #5f6b78; }
.wl-typed .wl-material-check { align-items: center; gap: 10px; min-height: 30px; padding: 2px 0; color: #17212b; font-size: 14px; }
.wl-typed .wl-material-check small { margin-left: 0; }
.wl-typed .typed-contact .wl-combo__option small { margin-left: auto; }
.wl-typed .tb--actions .primary-button { flex: 1 1 auto; }
.wl-typed .typed-head .icon-button { margin-left: auto; }
.wl-typed--edit { margin: 10px 0; }

/* Порядок: задача */
.project-typed-form--task .tb--head { order: 0; } .project-typed-form--task .tb--seg { order: 1; } .project-typed-form--task .tb--project { order: 2; }
.project-typed-form--task .tb--title { order: 3; }
.project-typed-form--task .tb--executor { order: 4; grid-column: 1; } .project-typed-form--task .tb--goal { order: 5; grid-column: 2; }
.project-typed-form--task .tb--deadline { order: 6; } .project-typed-form--task .tb--participants { order: 7; } .project-typed-form--task .tb--steps { order: 8; }
.project-typed-form--task .tb--description { order: 9; } .project-typed-form--task .tb--materials { order: 10; }
/* Порядок: встреча — тема, дата/время/длительность, участники, повестка, материалы, место и цель */
.project-typed-form--meeting .tb--head { order: 0; } .project-typed-form--meeting .tb--seg { order: 1; } .project-typed-form--meeting .tb--project { order: 2; }
.project-typed-form--meeting .tb--title { order: 3; } .project-typed-form--meeting .tb--schedule { order: 4; } .project-typed-form--meeting .tb--attendees { order: 5; }
.project-typed-form--meeting .tb--steps { order: 6; } .project-typed-form--meeting .tb--materials { order: 7; } .project-typed-form--meeting .tb--description { order: 8; }
.project-typed-form--meeting .tb--location { order: 9; grid-column: 1; } .project-typed-form--meeting .tb--goal { order: 10; grid-column: 2; }
/* Порядок: звонок — тема, кому звоним, дата и время, кто звонит, что выяснить, цель */
.project-typed-form--call .tb--head { order: 0; } .project-typed-form--call .tb--seg { order: 1; } .project-typed-form--call .tb--project { order: 2; }
.project-typed-form--call .tb--title { order: 3; } .project-typed-form--call .tb--contact { order: 4; } .project-typed-form--call .tb--schedule { order: 5; }
.project-typed-form--call .tb--executor { order: 6; } .project-typed-form--call .tb--description { order: 7; } .project-typed-form--call .tb--goal { order: 8; }
.wl-typed .tb--message { order: 20; } .wl-typed .tb--actions { order: 21; } .wl-typed .wl-panel__note { order: 22; }
@media (max-width: 760px) {
  .wl-typed > * { grid-column: 1 / -1 !important; }
  .typed-schedule, .project-typed-form--meeting .typed-schedule { grid-template-columns: 1fr 1fr; }
  .wl-typed .wl-participant { grid-template-columns: 28px minmax(0, 1fr) 28px; }
  .wl-typed .wl-participant input { grid-column: 2 / 3; }
  .wl-typed .typed-step { flex-wrap: wrap; }
  .wl-typed .typed-step [data-step-assignee] { width: auto; max-width: none; flex: 1 1 100%; margin-left: 24px; }
}
.wl-typed .typed-chips input[type="date"]:not([type="radio"]):not([type="checkbox"]) { width: 170px; flex: 0 0 170px; }
.wl-typed .wl-combo__search input:not([type="radio"]):not([type="checkbox"]) { min-height: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent; box-shadow: none !important; }
.wl-typed .wl-combo__search { min-height: 40px; border-radius: 10px; }
.wl-typed .wl-project-materials { margin: 0; padding: 0 0 8px; border: 0; border-bottom: 1px solid #eef1f4; border-radius: 0; background: none; }
.wl-typed .wl-project-materials > p { margin: 0; }
.wl-typed .wl-material-check, .wl-typed .wl-material-check span { font-weight: 400; } .wl-typed .wl-material-check small { color: #5f6b78; font-weight: 400; }
@media (min-width: 1101px) {
  .ag-main__body { grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
  .ag-main__body > .ag-table { min-height: 0; overflow: auto; align-content: start; }
  .ag-main__body .ag-row--head { position: sticky; top: 0; z-index: 2; }
}

/* Представления внутри страницы проекта */
.project-work-section .entity-section__header { flex-wrap: wrap; gap: 8px 12px; }
.project-view-switch { margin-left: auto; }
.project-work-section.is-views .project-filter-chips { display: none; }
.wl-project-views { margin-top: 10px; }
.wl-project-views[hidden] { display: none; }
.wl-project-views .wl-heading--row:has(> .visually-hidden:only-child) { display: none; }
.wl-project-views .wl-heading--row { padding: 0; }

/* Каталог данных (Компания / Данные) */
.dc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dc-toolbar .is-active { background: #17212b; border-color: #17212b; color: #fff; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 8px; }
.dc-table { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--border, #dce1e7); border-radius: 12px; background: #fff; }
.dc-table__head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dc-table__head h3 { margin: 0; font-size: 16px; }
.dc-table__head p { margin: 4px 0; font-size: 13px; color: #5f6b78; }
.dc-table__head code { font-size: 12px; color: #5f6b78; }
.dc-owners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dc-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: 13px; }
.dc-fields li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #eef1f4; }
.dc-type { color: #5f6b78; text-align: right; }
@media (max-width: 760px) { .dc-owners { grid-template-columns: 1fr; } }
.dc-owners .form-field span { font-size: 12px; color: #5f6b78; }
.dc-owners select { height: 36px; font-size: 14px; }
.dc-table > .link-button { align-self: flex-start; font-size: 13px; }
