/* FILE: styles/dashboard.css */

/* Adaptive dashboard wrapper */
.adaptive-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Emotional header */
.dashboard-header {
  padding: var(--space-3) 0 0;
}

.emotional-header {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
}

/* Primary focus card */
.dashboard-primary-card {
  position: relative;
  overflow: hidden;
}

.dashboard-primary-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.06;
  pointer-events: none;
}

.mode-tag {
  display: inline-block;
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.mode-tag--debt_relief    { background: var(--color-danger-bg);   color: var(--color-danger); }
.mode-tag--home_focus     { background: var(--color-accent-soft); color: var(--color-accent); }
.mode-tag--growth_focus   { background: var(--color-positive-bg); color: var(--color-positive); }
.mode-tag--retirement_focus { background: var(--color-warning-bg); color: var(--color-warning); }

.primary-card__title {
  font-size: var(--font-xl);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.primary-card__sub {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

/* Action path */
.dashboard-actions {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.action-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.action-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.action-step__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.action-step--done .action-step__icon {
  color: var(--color-positive);
}

.action-step__label {
  font-size: var(--font-base);
  color: var(--color-text-primary);
  line-height: 1.5;
}

.action-step--done .action-step__label {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

/* Optional context metrics */
.dashboard-context {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.context-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.context-metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.context-metric__label {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.context-metric__value {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Stress modifiers */
.adaptive-dashboard.stress-high .dashboard-context {
  display: none;
}

/* Plan screen */
.plan-screen,
.progress-screen,
.profile-screen {
  padding-bottom: var(--space-6);
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.plan-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

.plan-metric__label {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.plan-metric__value {
  font-size: var(--font-lg);
  font-weight: 700;
}

.plan-card {
  margin-bottom: var(--space-4);
}

.plan-card__title {
  font-size: var(--font-md);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.plan-card__detail {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.plan-card--positive {
  border-color: var(--color-positive);
  background: var(--color-positive-bg);
}

/* Progress screen */
.progress-section {
  margin-bottom: var(--space-4);
}

.progress-section-title {
  font-size: var(--font-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.progress-bar-item {
  margin-bottom: var(--space-4);
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.progress-bar-label {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
}

.progress-bar-value {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.progress-bar-track {
  height: 6px;
  background: var(--color-bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-bar-fill--blue  { background: var(--color-accent); }
.progress-bar-fill--green { background: var(--color-positive); }

.progress-debt-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
}

.progress-debt-label {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
}

.progress-debt-value {
  font-size: var(--font-base);
  font-weight: 700;
}

.progress-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.progress-metric-row:last-child {
  border-bottom: none;
}

.progress-metric-row--total {
  margin-top: var(--space-1);
}

.progress-metric-label {
  font-size: var(--font-base);
  color: var(--color-text-secondary);
}

.progress-metric-value {
  font-size: var(--font-base);
  font-weight: 700;
}
