.report-modal {
  width: min(440px, calc(100vw - 32px));
  overflow: visible;
}

.report-modal .modal-body {
  gap: 10px;
  overflow: visible;
}

.report-modal__filters {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.report-modal__field {
  min-width: 0;
}

.report-modal__period-btn {
  width: 100%;
}

.report-modal__manager-drop,
.report-modal__manager-drop .menudrop-btn {
  width: 100%;
}

.report-modal__manager-drop {
  position: relative;
}

.report-modal__manager-drop.menudrop--open {
  z-index: 40;
}

.report-modal__manager-drop .menudrop-popover {
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
}

.report-modal__manager-drop .menudrop-item {
  min-height: 30px;
  padding: 6px 10px 6px 34px;
  font-size: 12px;
  line-height: 1.15;
}

.report-modal__summary {
  display: grid;
  gap: 10px;
}

.report-modal__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.report-modal__stats .ui-kpi {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 48px;
}

.report-modal__progress-list {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.report-plan-progress {
  --report-plan-fill-pct: 0%;
  --report-plan-mark-pct: 66.67%;
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 0;
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-plan-progress__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.report-plan-progress__title {
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(229, 231, 235, 0.85);
  white-space: nowrap;
}

.report-plan-progress__fact {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: rgba(161, 161, 170, 0.88);
  white-space: nowrap;
}

.report-plan-progress__bar-wrap {
  position: relative;
  padding-top: 2px;
}

.report-plan-progress__bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.report-plan-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--report-plan-fill-pct);
  border-radius: inherit;
  background: var(--success);
  box-shadow: 0 0 12px color-mix(in srgb, var(--success) 28%, transparent);
}

.report-plan-progress__fill--danger {
  background: var(--danger);
  box-shadow: 0 0 12px color-mix(in srgb, var(--danger) 28%, transparent);
}

.report-plan-progress__fill--success {
  background: var(--success);
  box-shadow: 0 0 12px color-mix(in srgb, var(--success) 28%, transparent);
}

.report-plan-progress__fill--over {
  background: linear-gradient(
    90deg,
    var(--success) 0%,
    var(--success) var(--report-plan-over-split),
    var(--warning) var(--report-plan-over-split),
    var(--warning) 100%
  );
  box-shadow: 0 0 12px color-mix(in srgb, var(--warning) 24%, transparent);
}

.report-plan-progress__mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--report-plan-mark-pct);
  width: 2px;
  border-radius: 999px;
  background: rgba(245, 245, 247, 0.82);
  transform: translateX(-50%);
}

.report-plan-progress__mark-label {
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  font-size: 9px;
  line-height: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 247, 0.66);
  white-space: nowrap;
  pointer-events: none;
}

.report-plan-progress__mark-mid {
  position: absolute;
  top: 0;
  left: var(--report-plan-mark-pct);
  transform: translateX(-50%);
  color: rgba(245, 245, 247, 0.64);
}

.report-plan-progress__meta {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-top: 2px;
  min-height: 12px;
}

.report-plan-progress__plan {
  position: absolute;
  left: var(--report-plan-mark-pct);
  transform: translateX(-50%);
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 247, 0.68);
  white-space: nowrap;
}

.report-plan-progress__ratio {
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 247, 0.68);
  white-space: nowrap;
}

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

.report-modal__group {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.report-modal__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-modal__group-title {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.92);
}

.report-modal__group-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
}

.report-modal__item,
.report-modal__empty,
.report-modal__state {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}

.report-modal__item {
  display: grid;
  gap: 5px;
}

.report-modal__item-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(245, 245, 247, 0.96);
}

.report-modal__item-meta {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(161, 161, 170, 0.9);
  overflow-wrap: anywhere;
}

.report-modal__empty,
.report-modal__state {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(161, 161, 170, 0.92);
}

.report-modal__state--error {
  border-color: rgba(246, 41, 43, 0.22);
  background: rgba(246, 41, 43, 0.1);
  color: rgba(255, 210, 210, 0.96);
}

@media (max-width: 520px) {
  .report-modal {
    width: min(399px, calc(100vw - 20px));
  }

  .report-modal__filters,
  .report-modal__stats,
  .report-modal__groups {
    grid-template-columns: 1fr;
  }
}
