/* Dashboard */
.dash {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--lm-content-max);
}

.dash-lumi {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem;
  border-radius: var(--lm-radius);
  background: linear-gradient(135deg, var(--lm-primary-soft), var(--lm-secondary-soft));
  border: 1px solid var(--lm-border);
  animation: lm-fade-up 0.45s var(--lm-ease) both;
}

.dash-lumi img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  animation: lm-float 4.5s ease-in-out infinite;
}

.dash-lumi strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.dash-lumi p {
  margin: 0;
  color: var(--lm-text-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.dash-trend-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-trend-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--lm-radius);
  border: 1px solid color-mix(in srgb, #b45309 35%, var(--lm-border));
  background: color-mix(in srgb, #f59e0b 12%, var(--lm-surface));
  color: var(--lm-text);
}

.dash-trend-alert i {
  color: #b45309;
  margin-top: 0.15rem;
}

.dash-trend-alert p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .dash-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .dash-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dash-metric {
  padding: 1.1rem 1.15rem;
  border-radius: var(--lm-radius);
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  box-shadow: var(--lm-shadow);
  transition: transform 0.25s var(--lm-ease);
  animation: lm-fade-up 0.5s var(--lm-ease) both;
}

.dash-metric:hover {
  transform: translateY(-2px);
}

.dash-metric .label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--lm-text-muted);
  font-weight: 500;
  margin-bottom: 0.45rem;
}

.dash-metric .label i {
  color: var(--lm-primary);
  font-size: 0.95rem;
}

.dash-metric .value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.dash-metric .hint {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--lm-text-muted);
}

.dash-metric.is-accent .value {
  background: linear-gradient(135deg, var(--lm-primary), var(--lm-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-row {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .dash-row {
    grid-template-columns: 1fr 1fr;
  }

  .dash-row-reminders {
    grid-template-columns: 1fr;
  }
}

.dash-panel-hint {
  margin: -0.45rem 0 0.85rem;
  font-size: 0.85rem;
  color: var(--lm-text-muted);
  flex-shrink: 0;
}

.dash-panel-chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.dash-panel-chart > h3 {
  flex-shrink: 0;
}

.dash-panel-chart .dash-chart-wrap {
  flex: 0 0 auto;
  height: 220px;
  min-height: 220px;
}

.dash-weight-recent,
.bmi-scale {
  flex: 1 1 auto;
  margin-top: 0.95rem;
}

.dash-weight-recent h4 {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lm-text-muted);
}

.dash-list-compact {
  gap: 0.4rem;
}

.dash-list-compact li {
  padding: 0.55rem 0.7rem;
}

.dash-empty-sm {
  padding: 0.65rem 0.25rem;
  font-size: 0.82rem;
}

.bmi-scale {
  display: grid;
  gap: 0.35rem;
}

.bmi-scale-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.9fr) 1.2fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0.55rem;
  border-radius: var(--lm-radius-sm);
  font-size: 0.78rem;
  border: 1px solid transparent;
  color: var(--lm-text-muted);
  background: var(--lm-bg);
}

.bmi-scale-row.is-current {
  border-color: color-mix(in srgb, var(--lm-primary) 35%, var(--lm-border));
  background: var(--lm-primary-soft);
  color: var(--lm-text);
  font-weight: 600;
}

.bmi-scale-row span:first-child {
  font-variant-numeric: tabular-nums;
}

.dash-panel {
  padding: 1.25rem;
  border-radius: var(--lm-radius);
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  box-shadow: var(--lm-shadow);
  animation: lm-fade-up 0.55s var(--lm-ease) both;
}

.dash-panel h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-panel h3 i {
  color: var(--lm-secondary);
}

.dash-chart-wrap {
  position: relative;
  height: 220px;
}

.dash-empty {
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: var(--lm-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--lm-radius-sm);
  background: var(--lm-gray);
  border: 1px solid transparent;
}

[data-theme="dark"] .dash-list li {
  background: rgba(148, 163, 184, 0.08);
}

.dash-list .item-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-list .item-meta {
  font-size: 0.78rem;
  color: var(--lm-text-muted);
  margin-top: 0.15rem;
}

.dash-list .item-side {
  font-size: 0.8rem;
  color: var(--lm-text-muted);
  white-space: nowrap;
}

.dash-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.dash-photos a,
.dash-photos .ph {
  aspect-ratio: 1;
  border-radius: var(--lm-radius-sm);
  overflow: hidden;
  background: var(--lm-primary-soft);
  display: grid;
  place-items: center;
  color: var(--lm-text-muted);
  font-size: 0.75rem;
}

.dash-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin-top: 0.65rem;
}

.dash-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lm-primary), var(--lm-secondary));
  transition: width 0.6s var(--lm-ease);
}

.dash-loading {
  padding: 3rem;
  text-align: center;
  color: var(--lm-text-muted);
}

.dash-sections {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .dash-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
