/* Cards, stat tiles and avatars ------------------------------------------ */

.pw-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.pw-card--flush { padding: 0; gap: 0; overflow: hidden; }
.pw-card--compact { padding: var(--space-4); gap: var(--space-3); border-radius: 14px; }
.pw-card--dashed { border-style: dashed; border-color: var(--line-2); box-shadow: none; }
.pw-card--plain { box-shadow: none; background: transparent; }

.pw-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.pw-card--flush > .pw-card__header { padding: var(--space-5) var(--space-6) var(--space-4); }
.pw-card__title { display: flex; align-items: center; gap: 10px; }
.pw-card__title--sm { font-size: var(--text-xl); }
.pw-card__title--xs { font-size: 18px; }
.pw-card__link { font-weight: 600; }
.pw-card__footer {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: 14px var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm); color: var(--ink-3);
}

/* Count badge next to a heading */
.pw-count {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 9px;
  border-radius: var(--radius-pill);
  font: 700 var(--text-sm)/1 var(--font-body);
  background: var(--surface-2); color: var(--ink-2);
}
.pw-count--crit { background: var(--crit-soft); color: var(--crit); }

/* ---- Stat tile ---------------------------------------------------- */
.pw-stat { gap: var(--space-3); padding: var(--space-5); }
.pw-stat__label { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--ink-2); }
.pw-stat__value { font-family: var(--font-display); font-size: var(--text-stat); font-weight: 600; line-height: 1; }
.pw-stat__meta { font-size: var(--text-sm); color: var(--ink-3); }
.pw-stat__link { font-weight: 600; }

.pw-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--ink-3); flex-shrink: 0; display: inline-block; }
.pw-dot--warn { background: var(--warn); }
.pw-dot--crit { background: var(--crit); }
.pw-dot--info { background: var(--info); }
.pw-dot--ok { background: var(--ok); }
.pw-dot--brand { background: var(--brand); }

/* ---- Avatar ------------------------------------------------------- */
.pw-avatar {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--text-md);
}
.pw-avatar--sm { width: 36px; height: 36px; font-size: var(--text-sm); }
.pw-avatar--brand { background: var(--brand-soft); color: var(--brand-text); }
.pw-avatar--lg {
  width: 64px; height: 64px;
  border-radius: 18px;
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-text);
}
