/* ==========================================================
   MATHMIND PROGRESS DASHBOARD
========================================================== */

.mm-dashboard-top {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.mm-dashboard-title {
  text-align: center;
}

.mm-dashboard-title h1 {
  margin: 4px 0 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  letter-spacing: -0.7px;
}

.mm-clear {
  padding: 7px 0;
  color: #a06472;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.mm-welcome {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 31px 0 22px;
}

.mm-welcome h2 {
  margin: 7px 0 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 26px;
  letter-spacing: -1px;
}

.mm-welcome p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.mm-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 7px 20px rgba(39, 41, 78, 0.04);
}

.mm-stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 800;
}

.mm-purple {
  color: #705cf5;
  background: #eeebff;
}

.mm-blue {
  color: #397fec;
  background: #e9f2ff;
}

.mm-yellow {
  color: #cf9218;
  background: #fff3d9;
}

.mm-mint {
  color: #159e8b;
  background: #def9f2;
}

.mm-stat p,
.mm-stat strong,
.mm-stat small {
  display: block;
  margin: 0;
}

.mm-stat p,
.mm-stat small {
  color: var(--muted);
  font-size: 10px;
}

.mm-stat strong {
  margin: 2px 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
}

.mm-main-grid {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 20px;
}

.mm-ai-card {
  position: relative;
  min-height: 310px;
  padding: 24px;
  overflow: hidden;
  color: white;
  border-radius: 22px;
  background: linear-gradient(145deg, #5e4adc, #384978);
  box-shadow: 0 18px 32px rgba(57, 53, 128, 0.22);
}

.mm-ai-card .eyebrow {
  position: relative;
  z-index: 1;
  color: #d5d0ff;
}

.mm-ai-card h2 {
  position: relative;
  z-index: 1;
  margin: 10px 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.7px;
}

.mm-ai-card > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 245px;
  margin: 0;
  color: #e3e7ff;
  font-size: 12px;
  line-height: 1.65;
}

.mm-ai-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 37px;
  height: 37px;
  margin-bottom: 23px;
  place-items: center;
  color: #5540d3;
  border-radius: 12px;
  background: #ebe7ff;
  font-size: 19px;
}

.mm-ai-button {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding: 9px 11px;
  color: #5641d1;
  border: 0;
  border-radius: 9px;
  background: white;
  font-size: 10px;
  font-weight: 800;
}

.mm-ai-orb {
  position: absolute;
  right: -75px;
  bottom: -80px;
  width: 210px;
  height: 210px;
  border: 32px solid rgba(174, 187, 255, 0.24);
  border-radius: 50%;
}

.mm-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow);
}

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

.mm-panel-head h2 {
  margin: 5px 0 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  letter-spacing: -0.6px;
}

.mm-badge {
  padding: 5px 8px;
  color: #16907d;
  border-radius: 7px;
  background: #e1f8f3;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.mm-purple-badge {
  color: #6651dd;
  background: #efedff;
}

.mm-heatmap-scroll {
  margin-top: 20px;
  overflow-x: auto;
}

.mm-heatmap {
  display: grid;
  grid-template-columns: 74px repeat(10, minmax(38px, 1fr));
  gap: 5px;
  min-width: 580px;
  align-items: center;
}

.mm-heat-topic {
  min-height: 23px;
  color: #748096;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.mm-heat-label {
  color: #747d91;
  font-size: 9px;
  font-weight: 700;
}

.mm-heat-cell {
  display: block;
  height: 31px;
  border-radius: 5px;
  background: #f1f2f7;
}

.mm-empty {
  border: 1px solid #edf0f5;
  background: #fafbfe;
}

.mm-level-1 {
  background: #9a6ee9 !important;
}

.mm-level-2 {
  background: #bdaff2 !important;
}

.mm-level-3 {
  background: #a9c9f8 !important;
}

.mm-level-4 {
  background: #6ba9ee !important;
}

.mm-level-5 {
  background: #31bcae !important;
}

.mm-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 9px;
}

.mm-legend i {
  display: block;
  width: 17px;
  height: 5px;
  border-radius: 2px;
}

.mm-chart-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 20px;
  margin-top: 20px;
}

.mm-performance,
.mm-trajectory {
  min-height: 322px;
}

.mm-bars {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 7px;
  height: 236px;
  margin-top: 18px;
  padding: 0 3px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 57px,
    #eef0f5 58px
  );
}

.mm-bar-group {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 5px;
  min-width: 0;
}

.mm-bar-group strong {
  color: #5d6578;
  font-size: 9px;
}

.mm-bar-track {
  display: flex;
  align-items: end;
  width: min(30px, 100%);
  height: 180px;
}

.mm-bar-track span {
  display: block;
  width: 100%;
  min-height: 6px;
  border-radius: 7px 7px 0 0;
  transition: height 0.4s ease;
}

.mm-bar-1 {
  background: linear-gradient(#806df6, #5b47dd);
}

.mm-bar-2 {
  background: linear-gradient(#4d91f5, #2a74e8);
}

.mm-bar-3 {
  background: linear-gradient(#44c7b8, #1fac9d);
}

.mm-bar-4 {
  background: linear-gradient(#efb55f, #e99b39);
}

.mm-bar-5 {
  background: linear-gradient(#dc82d5, #ac55bb);
}

.mm-bar-group small {
  height: 18px;
  overflow: hidden;
  color: #7b8395;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
}

.mm-growth {
  display: flex;
  height: 232px;
  margin-top: 20px;
}

.mm-axis {
  display: flex;
  height: 200px;
  flex: 0 0 23px;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 4px;
  color: #9da4b3;
  font-size: 8px;
}

.mm-graph {
  position: relative;
  height: 232px;
  flex: 1;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 49px,
    #edf0f5 50px
  );
}

.mm-graph svg {
  width: 100%;
  height: 200px;
  overflow: visible;
}

.mm-growth-area {
  fill: url(#mmGrowthFill);
}

.mm-growth-line {
  fill: none;
  stroke: #22af9f;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mm-growth-points circle {
  fill: white;
  stroke: #1fac9e;
  stroke-width: 3;
}

.mm-growth-labels {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  color: #9da4b3;
  font-size: 8px;
}

.mm-empty-chart {
  display: grid;
  width: 100%;
  place-content: center;
  color: var(--muted);
  text-align: center;
}

.mm-empty-chart span {
  color: var(--purple);
  font-size: 30px;
}

.mm-empty-chart p {
  max-width: 220px;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .mm-main-grid,
  .mm-chart-grid {
    grid-template-columns: 1fr;
  }

  .mm-ai-card {
    min-height: 230px;
  }
}

@media (max-width: 650px) {
  .mm-dashboard-title {
    display: none;
  }

  .mm-dashboard-top {
    min-height: 76px;
  }

  .mm-welcome {
    align-items: stretch;
    flex-direction: column;
  }

  .mm-welcome h2 {
    font-size: 22px;
  }

  .mm-welcome .primary-button {
    width: 100%;
  }

  .mm-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mm-stat {
    align-items: start;
    gap: 8px;
    padding: 12px;
  }

  .mm-stat-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 9px;
    font-size: 14px;
  }

  .mm-stat strong {
    font-size: 15px;
  }

  .mm-panel {
    padding: 16px;
  }

  .mm-ai-card {
    padding: 20px;
  }

  .mm-legend {
    font-size: 8px;
  }

  .mm-legend i {
    width: 10px;
  }

  .mm-bars {
    gap: 4px;
  }

  .mm-bar-group small {
    font-size: 7px;
  }
}
