.dashboard-case {
  margin-top: 26px;
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-card);
}

.dashboard-case h2 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.dashboard-case .case-demo-kicker {
  margin-bottom: 8px;
  color: var(--green);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dashboard-case .case-demo-subtitle {
  max-width: 820px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.dashboard-raw {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid #e5ddd4;
  border-radius: 18px;
  background: #fcfbf9;
  transition:
    opacity .3s ease,
    transform .3s ease,
    max-height .45s ease,
    margin .45s ease;
}

.dashboard-raw.hidden {
  max-height: 0;
  margin-top: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
}

.dashboard-raw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid #e7e0d8;
  background: #f7f4ef;
}

.dashboard-raw-head strong {
  color: #3f3b37;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-raw-head span {
  color: var(--green);
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
}

.dashboard-table-wrap {
  max-height: 420px;
  overflow: auto;
  background: #fff;
}

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

.dashboard-table th,
.dashboard-table td {
  padding: 9px 10px;
  border-right: 1px solid #eee8e0;
  border-bottom: 1px solid #eee8e0;
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
  font-size: 10px;
  line-height: 1.4;
}

.dashboard-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f4ef;
  color: #5f5953;
  font-weight: 700;
}

.dashboard-table td {
  color: #514c47;
}

.dashboard-table tbody tr:nth-child(even) {
  background: #fbfaf8;
}

.dashboard-table tbody tr:hover {
  background: #f4f8f5;
}

.dashboard-action {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.dashboard-build-button {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(47, 111, 159, .18);
  transition:
    background .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.dashboard-build-button:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(47, 111, 159, .22);
}

.dashboard-build-button:disabled {
  opacity: .62;
  cursor: wait;
  transform: none;
}

.dashboard-loader {
  display: none;
  min-height: 92px;
  margin-top: 18px;
  padding: 18px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #dbe6dd;
  border-radius: 16px;
  background: #f4f8f5;
  color: #4d6354;
  font-family: var(--font-tech);
  font-size: 10px;
}

.dashboard-loader.active {
  display: flex;
}

.dashboard-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid rgba(53, 89, 75, .18);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: dashboard-spin .8s linear infinite;
}

@keyframes dashboard-spin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-output {
  display: none;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(12px);
}

.dashboard-output.visible {
  display: block;
  animation: dashboard-output-show .45s ease forwards;
}

@keyframes dashboard-output-show {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 10px;
}

.dashboard-filter {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e5ddd4;
  border-radius: 12px;
  background: #fbfaf8;
}

.dashboard-filter small {
  display: block;
  margin-bottom: 5px;
  color: #989088;
  font-family: var(--font-tech);
  font-size: 8px;
  text-transform: uppercase;
}

.dashboard-filter strong {
  display: block;
  overflow: hidden;
  color: #45413d;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.dashboard-kpi {
  padding: 18px 16px;
  border: 1px solid #dce6df;
  border-radius: 15px;
  background:
    linear-gradient(
      145deg,
      rgba(244, 249, 245, .98),
      rgba(252, 253, 252, .98)
    );
}

.dashboard-kpi span {
  display: block;
  color: #748078;
  font-size: 10px;
}

.dashboard-kpi strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-family: var(--font-tech);
  font-size: 20px;
  line-height: 1.1;
}

.dashboard-kpi em {
  display: inline-flex;
  margin-top: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e5f2e8;
  color: #3f744f;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

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

.dashboard-chart {
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #e5ddd4;
  border-radius: 16px;
  background: #fcfbf9;
}

.dashboard-chart h3 {
  margin: 0 0 18px;
  color: #48433f;
  font-size: 13px;
  font-weight: 700;
}

.monthly-chart {
  min-height: 200px;
}

.monthly-chart svg {
  display: block;
  width: 100%;
  height: 160px;
}

.months-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  margin-top: 8px;
}

.months-row span {
  color: #8d867f;
  font-family: var(--font-tech);
  font-size: 8px;
  text-align: center;
}

.years-chart {
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 56px;
  padding: 12px 24px 0;
}

.year-column {
  min-width: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.year-column b {
  margin-bottom: 8px;
  color: #4f5c54;
  font-family: var(--font-tech);
  font-size: 10px;
}

.year-column i {
  display: block;
  width: 54px;
  border-radius: 8px 8px 3px 3px;
  background:
    linear-gradient(
      180deg,
      #4f7867,
      #35594b
    );
}

.year-column span {
  margin-top: 8px;
  color: #827b74;
  font-family: var(--font-tech);
  font-size: 9px;
}

.category-wrap {
  min-height: 200px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
}

.category-donut {
  width: 156px;
  height: 156px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    conic-gradient(
      #3478e5 0 42%,
      #0f9d58 42% 69%,
      #f5aa20 69% 89%,
      #8854d0 89% 100%
    );
  position: relative;
}

.category-donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fcfbf9;
}

.category-legend {
  display: grid;
  gap: 10px;
}

.category-legend > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.category-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #65605a;
  font-size: 10px;
}

.category-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.category-legend strong {
  color: #48433f;
  font-family: var(--font-tech);
  font-size: 10px;
}

.products-bars {
  min-height: 200px;
  display: grid;
  gap: 13px;
}

.product-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 62px;
  gap: 10px;
  align-items: center;
}

.product-bar-row > span:first-child {
  color: #5d5751;
  font-size: 9px;
}

.product-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece8e3;
}

.product-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #4d7565,
      #35594b
    );
}

.product-value {
  color: #4c5851;
  font-family: var(--font-tech);
  font-size: 9px;
  text-align: right;
}

.case-demo-controls {
  margin-top: 18px;
}

.demo-progress-wrap {
  padding: 14px 16px;
  border: 1px solid #dce6df;
  border-radius: 14px;
  background: #f5f9f6;
}

.demo-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #506158;
  font-family: var(--font-tech);
  font-size: 9px;
}

.demo-progress-track {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7e1;
}

.demo-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: #4f7867;
}

.demo-cta {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.demo-cta a {
  display: inline-flex;
  min-height: 48px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(47, 111, 159, .18);
  transition:
    background .2s ease,
    transform .2s ease;
}

.demo-cta a:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .dashboard-filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .dashboard-case {
    margin-top: 18px;
    padding: 26px 16px;
    border-radius: 18px;
  }

  .dashboard-case .case-demo-subtitle {
    font-size: 13px;
    line-height: 1.7;
  }

  .dashboard-raw-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .dashboard-table-wrap {
    max-height: 360px;
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: 8px;
    font-size: 9px;
  }

  .dashboard-action {
    margin-top: 16px;
  }

  .dashboard-build-button {
    width: 100%;
  }

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

  .dashboard-filter:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-kpi {
    padding: 15px 13px;
  }

  .dashboard-kpi strong {
    font-size: 17px;
  }

  .dashboard-chart {
    padding: 16px 14px;
  }

  .months-row span {
    font-size: 7px;
  }

  .years-chart {
    gap: 30px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .category-wrap {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product-bar-row {
    grid-template-columns: 90px 1fr 52px;
    gap: 7px;
  }

  .product-bar-row > span:first-child,
  .product-value {
    font-size: 8px;
  }

  .demo-progress-label {
    font-size: 8px;
  }
}

.case3-problem-solution {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.case3-info-card {
  min-width: 0;
  padding: 24px 24px 26px;
  border-radius: 18px;
}

.case3-info-label {
  display: inline-flex;
  min-height: 24px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.case3-info-card h3 {
  margin: 14px 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.case3-info-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}

.case3-info-card p + p {
  margin-top: 12px;
}

.case3-problem {
  border: 1px solid #ead3cf;
  background:
    linear-gradient(
      145deg,
      rgba(255, 248, 247, .98),
      rgba(255, 252, 251, .98)
    );
}

.case3-problem .case3-info-label {
  background: #f4dedd;
  color: #9e4a45;
}

.case3-problem h3 {
  color: #93453f;
}

.case3-problem p {
  color: #715652;
}

.case3-solution {
  border: 1px solid #c9ded0;
  background:
    linear-gradient(
      145deg,
      rgba(243, 250, 245, .98),
      rgba(250, 252, 250, .98)
    );
}

.case3-solution .case3-info-label {
  background: #dcecdf;
  color: #356347;
}

.case3-solution h3 {
  color: #315c42;
}

.case3-solution p {
  color: #4d6556;
}

.dashboard-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #dbe5dd;
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      #f5faf6,
      #fbfcfb
    );
}

.dashboard-workspace-head > div:first-child {
  min-width: 0;
}

.dashboard-workspace-label {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-family: var(--font-tech);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.dashboard-workspace-head strong {
  display: block;
  color: #37483f;
  font-size: 17px;
}

.dashboard-workspace-head small {
  display: block;
  margin-top: 5px;
  color: #869088;
  font-size: 9px;
}

.dashboard-refresh-state {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.dashboard-refresh-state > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ca167;
  box-shadow: 0 0 0 5px rgba(76, 161, 103, .11);
}

.dashboard-refresh-state small {
  display: block;
  color: #929b94;
  font-size: 8px;
}

.dashboard-refresh-state strong {
  margin-top: 2px;
  color: #3c654b;
  font-family: var(--font-tech);
  font-size: 9px;
}

.dashboard-slicer-toolbar {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #ded8d0;
  border-radius: 16px;
  background: #f8f6f3;
}

.dashboard-slicer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.dashboard-slicer-heading span {
  display: block;
  color: #49443f;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-slicer-heading small {
  display: block;
  margin-top: 3px;
  color: #918981;
  font-size: 8px;
}

.dashboard-reset-filters {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d9d2ca;
  border-radius: 8px;
  background: #fff;
  color: #6d655e;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-reset-filters:hover {
  border-color: #9bb7a3;
  color: var(--green);
}

.dashboard-slicers {
  display: grid;
  grid-template-columns: .7fr 1.3fr 1.25fr 1.45fr;
  gap: 10px;
}

.dashboard-slicer {
  min-width: 0;
  padding: 10px;
  border: 1px solid #ded8d0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(50, 43, 37, .035);
}

.dashboard-slicer-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee9e3;
}

.dashboard-slicer-head strong {
  color: #555049;
  font-size: 9px;
}

.dashboard-slicer-head span {
  color: #9b938a;
  font-family: var(--font-tech);
  font-size: 7px;
}

.dashboard-slicer-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 8px;
}

.dashboard-slicer-options-months {
  grid-template-columns: repeat(3, 1fr);
}

.dashboard-slicer-options-scroll {
  max-height: 128px;
  overflow-y: auto;
  padding-right: 3px;
}

.dashboard-slicer-option {
  min-width: 0;
  min-height: 27px;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid #e2ddd6;
  border-radius: 6px;
  background: #faf9f7;
  color: #69625b;
  font-family: var(--font-main);
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color .16s ease,
    background .16s ease,
    color .16s ease,
    transform .16s ease;
}

.dashboard-slicer-option:hover {
  border-color: #9db6a4;
  background: #f1f7f2;
  color: #3d644b;
}

.dashboard-slicer-option.active {
  border-color: #4d7960;
  background: #4d7960;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

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

.dashboard-kpi {
  min-width: 0;
}

.dashboard-kpi strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-kpi-accent {
  border-color: #cadbcf;
  background:
    linear-gradient(
      145deg,
      #eaf4ed,
      #f8fbf9
    );
}

.dashboard-kpi-accent strong {
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.dashboard-chart-head h3 {
  margin: 0;
}

.dashboard-chart-head small {
  display: block;
  margin-top: 4px;
  color: #938b83;
  font-size: 8px;
}

.dashboard-chart-head > strong {
  color: var(--green);
  font-family: var(--font-tech);
  font-size: 9px;
  white-space: nowrap;
}

.dashboard-chart-wide {
  min-height: 270px;
}

.dashboard-detail-table {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #e4ddd5;
  border-radius: 16px;
  background: #fff;
}

.dashboard-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8e2dc;
  background: #f8f6f3;
}

.dashboard-detail-head strong {
  display: block;
  color: #4c4641;
  font-size: 11px;
}

.dashboard-detail-head span {
  display: block;
  margin-top: 3px;
  color: #958d85;
  font-size: 8px;
}

.dashboard-detail-head > span {
  margin: 0;
  color: var(--green);
  font-family: var(--font-tech);
}

.dashboard-detail-table-wrap {
  overflow-x: auto;
}

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

.dashboard-detail-table th,
.dashboard-detail-table td {
  padding: 10px 13px;
  border-bottom: 1px solid #eee9e3;
  text-align: left;
  font-size: 9px;
}

.dashboard-detail-table th {
  background: #fbfaf8;
  color: #7b746d;
  font-weight: 700;
}

.dashboard-detail-table td {
  color: #57514b;
}

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

.dashboard-empty-state {
  margin-top: 14px;
  padding: 24px;
  border: 1px dashed #d7d0c8;
  border-radius: 14px;
  background: #faf9f7;
  color: #8c837b;
  font-size: 11px;
  text-align: center;
}

#dashboard-progress-bar {
  width: 100%;
  transition: width .3s ease;
}

@media (max-width: 1180px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-slicers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .case3-problem-solution {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
  }

  .case3-info-card {
    padding: 20px 18px 22px;
  }

  .case3-info-card h3 {
    font-size: 15px;
  }

  .case3-info-card p {
    font-size: 12px;
    line-height: 1.7;
  }

  .dashboard-workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-slicer-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-reset-filters {
    width: 100%;
  }

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

  .dashboard-slicer-options-months {
    grid-template-columns: repeat(4, 1fr);
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-chart-head {
    flex-direction: column;
  }

  .dashboard-detail-head {
    flex-direction: column;
  }
}
