/* ── Dashboard Layout ── */

.dashboard-page {
  padding: 32px;
  min-height: 100vh;
}

.dash-grid {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}

/* ── Shared section styles ── */
.dash-section {
  margin-bottom: 40px;
}

.dash-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 14px;
}

/* ── Left panel ── */
.dash-left {
  display: flex;
  flex-direction: column;
}

.dash-datetime {
  margin-top: 40px;
  margin-bottom: 0;
}

.dash-username {
  font-size: 13px;
  color: #bbb;
  margin-top: 4px;
}

.dash-day {
  font-size: 18px;
  font-weight: 400;
  color: #111;
  letter-spacing: -0.01em;
}

.dash-date-str {
  font-size: 13px;
  color: #bbb;
  margin-top: 2px;
}

/* Agenda */
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agenda-time {
  font-size: 11px;
  color: #bbb;
}

.agenda-desc {
  font-size: 13px;
  color: #333;
}

/* Biomarkers */
.biomarker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biomarker-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.biomarker-name {
  color: #555;
}

.biomarker-val {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.biomarker-val.good {
  color: #111;
}

.biomarker-val.warn {
  color: #888;
}

/* ── Center: Body figure + Primary Markers ── */
.dash-center {
  display: flex;
  justify-content: flex-start;
  padding-left: 20px;
}

.body-and-markers {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.body-wrap {
  position: relative;
  width: 340px;
  flex-shrink: 0;
}

.body-figure-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}

/* ── Primary Live Markers ── */
.primary-markers {
  width: 220px;
  flex-shrink: 0;
  padding-top: 40px;
}

.primary-marker {
  margin-bottom: 24px;
}

.pm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pm-name {
  font-size: 13px;
  color: #555;
}

.pm-val {
  font-size: 12px;
  color: #111;
  font-variant-numeric: tabular-nums;
}

.pm-bar-wrap {
  width: 100%;
  height: 3px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.pm-bar {
  height: 100%;
  background: #111;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.pm-status {
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
  display: block;
}

/* Current Directive */
.directive-marker {
  border-top: 1px solid #f0f0f0;
  padding-top: 20px;
  margin-top: 4px;
}

.pm-directive-status {
  font-size: 10px;
  color: #111;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

.pm-directive-text {
  font-size: 14px;
  color: #111;
  margin-top: 6px;
  display: block;
}

/* ── Right panel ── */
.dash-right {
  display: flex;
  flex-direction: column;
}

/* Metric bars */
.metric-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.metric-name {
  color: #555;
  width: 68px;
  flex-shrink: 0;
}

.metric-bar-wrap {
  flex: 1;
  height: 3px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.metric-bar {
  height: 100%;
  background: #111;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.metric-num {
  color: #888;
  font-size: 11px;
  width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Training stages */
.stage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stage-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}

.stage-marker {
  font-size: 11px;
  color: #bbb;
  width: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.stage-row.done .stage-marker {
  color: #111;
}

.current-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #111;
  border-radius: 50%;
  margin-top: 4px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.stage-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.stage-name {
  font-size: 13px;
  color: #111;
}

.stage-row.done .stage-name {
  color: #999;
}

.stage-row.upcoming .stage-name {
  color: #ccc;
}

.stage-weeks {
  font-size: 11px;
  color: #ccc;
}

.stage-row.current .stage-weeks {
  color: #888;
}

.stage-progress-wrap {
  width: 100%;
  height: 2px;
  background: #f0f0f0;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
  grid-column: 1 / -1;
  position: absolute;
  bottom: -6px;
  left: 24px;
  right: 0;
  width: calc(100% - 24px);
}

.stage-progress-bar {
  height: 100%;
  background: #111;
  border-radius: 2px;
}

/* Quick links */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-link {
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: color 0.15s;
}

.quick-link:hover {
  color: #111;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .dashboard-page {
    padding: 24px 20px;
  }

  .dash-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 32px;
  }

  .dash-datetime {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .dash-username {
    margin-top: 0;
  }

  .dash-center {
    order: 1;
    margin-bottom: 40px;
    padding-left: 0;
    justify-content: center;
  }

  .body-and-markers {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .body-wrap {
    width: 220px;
  }

  .primary-markers {
    width: 100%;
    padding-top: 0;
  }

  .dash-left {
    order: 2;
    margin-bottom: 40px;
  }

  .dash-right {
    order: 3;
  }
}
