.period-analytics-phase9 {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(45, 86, 105, 0.2);
  border-radius: 18px;
  background: #f4f7f8;
  color: #1f2a37;
}

.period-phase9-heading,
.period-phase9-toolbar,
.period-phase9-card > header,
.period-phase9-insight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.period-phase9-heading,
.period-phase9-card > header {
  align-items: flex-start;
}

.period-phase9-heading h3,
.period-phase9-card h4 {
  margin: 4px 0 5px;
  color: #1d3040;
}

.period-phase9-heading p,
.period-phase9-card header span,
.period-phase9-toolbar > span,
.period-phase9-contract,
.period-phase9-chart-note {
  margin: 0;
  color: #687985;
  font-size: 12px;
  line-height: 1.65;
}

.period-phase9-eyebrow {
  color: #2f6876;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.period-phase9-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 18px 0 12px;
  padding: 12px;
  border: 1px solid rgba(45, 86, 105, 0.15);
  border-radius: 12px;
  background: #fff;
}

.period-phase9-toolbar > span {
  margin-left: auto;
  text-align: right;
}

.period-phase9-state {
  padding: 30px 18px;
  border: 1px dashed #b7c7cc;
  border-radius: 12px;
  background: #fff;
  color: #687985;
  text-align: center;
}

.period-phase9-state.compact {
  padding: 20px 16px;
  border-radius: 10px;
}

.period-phase9-state strong {
  display: block;
  margin-bottom: 5px;
  color: #243b49;
}

.period-phase9-state p {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

.period-phase9-state.error {
  border-color: #d7a2a2;
  background: #fff7f7;
}

.period-phase9-insight {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 4px;
  padding: 15px 17px;
  border-left: 4px solid #2f6876;
  border-radius: 10px;
  background: #eaf2f3;
}

.period-phase9-insight span {
  color: #2f6876;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.period-phase9-insight strong {
  color: #213d49;
  font-size: 14px;
  line-height: 1.55;
}

.period-phase9-insight p {
  margin: 0;
  color: #657a82;
  font-size: 10px;
  line-height: 1.5;
}

.period-phase9-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.period-phase9-kpis > article {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(45, 86, 105, 0.14);
  border-top: 3px solid #8b9ba1;
  border-radius: 11px;
  background: #fff;
}

.period-phase9-kpis > article.positive,
.period-phase9-kpis > article.stable {
  border-top-color: #2f756d;
}

.period-phase9-kpis > article.moderate {
  border-top-color: #a37a2c;
}

.period-phase9-kpis > article.attention,
.period-phase9-kpis > article.high {
  border-top-color: #ac6044;
}

.period-phase9-kpis span,
.period-phase9-kpis small {
  display: block;
  color: #6d7c84;
  font-size: 10px;
}

.period-phase9-kpis strong {
  display: block;
  margin: 5px 0 3px;
  color: #203744;
  font-size: 19px;
  line-height: 1.2;
}

.period-phase9-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 12px;
  margin-top: 12px;
}

.period-phase9-main-grid > *,
.period-phase9-card {
  min-width: 0;
}

.period-phase9-card {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid rgba(45, 86, 105, 0.15);
  border-radius: 13px;
  background: #fff;
}

.period-phase9-main-grid > .period-phase9-card {
  margin-top: 0;
}

.period-phase9-card > header {
  margin-bottom: 14px;
}

.period-phase9-card > header h4 {
  margin-top: 0;
}

.period-phase9-card > header b {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f0f2;
  color: #2f6471;
  font-size: 11px;
  white-space: nowrap;
}

.period-phase9-rhythm-chart {
  display: block;
  width: 100%;
  height: auto;
}

.period-phase9-rhythm-chart .axis {
  stroke: #9baab0;
  stroke-width: 1;
}

.period-phase9-rhythm-chart .iqr-band {
  fill: #dfe9ec;
  opacity: 0.9;
}

.period-phase9-rhythm-chart .median-line {
  stroke: #7b8e95;
  stroke-width: 1.1;
  stroke-dasharray: 5 4;
}

.period-phase9-rhythm-chart .rhythm-line {
  fill: none;
  stroke: #2f6876;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.period-phase9-rhythm-chart .rhythm-point {
  fill: #fff;
  stroke: #2f6876;
  stroke-width: 2;
}

.period-phase9-rhythm-chart .shock-point {
  fill: #fff2e8;
  stroke: #b35f3d;
  stroke-width: 3;
}

.period-phase9-rhythm-chart text {
  fill: #687985;
  font-size: 10px;
}

.period-phase9-rhythm-chart .band-label {
  fill: #61757d;
  font-weight: 700;
}

.period-phase9-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  color: #64757d;
  font-size: 10px;
}

.period-phase9-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.period-phase9-chart-legend i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
}

.period-phase9-chart-legend i.line {
  background: #2f6876;
}

.period-phase9-chart-legend i.band {
  background: #dfe9ec;
}

.period-phase9-chart-legend i.shock {
  width: 8px;
  height: 8px;
  border: 2px solid #b35f3d;
  background: #fff2e8;
}

.period-phase9-mini-grid {
  display: grid;
  gap: 9px;
}

.period-phase9-mini-grid article {
  display: grid;
  grid-template-columns: minmax(95px, 0.55fr) minmax(140px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #f5f8f9;
}

.period-phase9-mini-grid article > div {
  min-width: 0;
}

.period-phase9-mini-grid span,
.period-phase9-mini-grid strong {
  display: block;
}

.period-phase9-mini-grid span {
  color: #6d7c84;
  font-size: 9px;
}

.period-phase9-mini-grid strong {
  margin-top: 3px;
  color: #243b49;
  font-size: 14px;
}

.period-phase9-mini-grid svg {
  display: block;
  width: 100%;
  height: 58px;
}

.period-phase9-mini-grid polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.period-phase9-mini-grid .gmv-line {
  stroke: #2f6876;
}

.period-phase9-mini-grid .orders-line {
  stroke: #5f78a4;
}

.period-phase9-mini-grid .aov-line {
  stroke: #9a7250;
}

.period-phase9-cadence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.period-phase9-cadence > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid #e5ebed;
  border-radius: 8px;
}

.period-phase9-cadence span,
.period-phase9-cadence strong {
  display: block;
}

.period-phase9-cadence span {
  color: #718087;
  font-size: 9px;
}

.period-phase9-cadence strong {
  margin-top: 3px;
  color: #2b414d;
  font-size: 11px;
}

.period-phase9-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.period-phase9-table-wrap table {
  min-width: 1020px;
}

.period-phase9-table-wrap td {
  vertical-align: top;
}

.period-phase9-table-wrap td strong,
.period-phase9-table-wrap td small {
  display: block;
}

.period-phase9-table-wrap td small {
  margin-top: 3px;
  color: #7a878d;
}

.period-phase9-table-wrap .positive-text {
  color: #287068;
}

.period-phase9-table-wrap .negative-text {
  color: #a5573d;
}

.period-phase9-contribution-track {
  position: relative;
  width: 150px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #eef1f2 0 49.5%, #b8c3c7 49.5% 50.5%, #eef1f2 50.5% 100%);
}

.period-phase9-contribution-track > span {
  position: absolute;
  top: 1px;
  height: 6px;
  border-radius: 999px;
}

.period-phase9-contribution-track .orders {
  background: #5f78a4;
}

.period-phase9-contribution-track .aov {
  background: #9a7250;
}

.period-phase9-contribution-track .negative {
  opacity: 0.7;
}

.period-phase9-shock-tag,
.period-phase9-normal-tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.period-phase9-shock-tag {
  background: #fff0e8;
  color: #9b4e34;
}

.period-phase9-shock-tag.positive {
  background: #edf7f4;
  color: #2c7167;
}

.period-phase9-normal-tag {
  background: #eff3f4;
  color: #687980;
}

.period-phase9-quality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.period-phase9-quality-grid article {
  min-width: 0;
  padding: 13px;
  border-radius: 10px;
  background: #f5f8f9;
}

.period-phase9-quality-grid article > span {
  color: #6c7b83;
  font-size: 9px;
  font-weight: 700;
}

.period-phase9-quality-grid article > strong {
  display: block;
  margin: 4px 0 8px;
  color: #263d49;
  font-size: 14px;
}

.period-phase9-quality-grid ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.period-phase9-quality-grid li {
  padding: 8px 9px;
  border: 1px solid #e2e9eb;
  border-radius: 8px;
  background: #fff;
}

.period-phase9-quality-grid li b,
.period-phase9-quality-grid li small {
  display: block;
}

.period-phase9-quality-grid li b {
  color: #344a55;
  font-size: 10px;
}

.period-phase9-quality-grid li small {
  margin-top: 2px;
  color: #75848a;
  font-size: 9px;
  line-height: 1.5;
}

.period-phase9-chart-note {
  margin-top: 9px;
  font-size: 10px;
}

.period-phase9-contract {
  margin: 11px 2px 0;
}

@media (max-width: 1240px) {
  .period-phase9-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .period-phase9-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .period-analytics-phase9 {
    padding: 16px;
  }

  .period-phase9-heading,
  .period-phase9-card > header {
    flex-direction: column;
  }

  .period-phase9-toolbar > span {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

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

  .period-phase9-quality-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .period-phase9-toolbar .secondary-button {
    flex: 1 1 auto;
  }

  .period-phase9-kpis {
    grid-template-columns: 1fr;
  }

  .period-phase9-mini-grid article {
    grid-template-columns: minmax(82px, 0.48fr) minmax(130px, 1fr);
  }

  .period-phase9-cadence {
    grid-template-columns: 1fr;
  }
}
