/* ─── Dashboard Page Styles ───────────────────────────────────
   Owner: pages/dashboard/dashboard.css
   Wave 7 (PR-307) — Compact Redesign
   Rule: Only layout/spacing for dashboard shell sections.
   Rule: Component styles live in component CSS — NOT here.
   Rule: Zero hardcoded colors. All values via --mr-* tokens.
   ─────────────────────────────────────────────────────────── */

/* ── Cloud Status Banner → slim 1-line strip ── */
#cloudStatus.alert {
  display: flex !important;
  align-items: center;
  gap: var(--mr-space-sm);
  padding: 5px var(--mr-space-md);
  border-radius: var(--mr-radius-sm);
  font-size: 12px;
  margin-bottom: var(--mr-space-md);
  line-height: 1.4;
}
/* Hide verbose sub-text inside the cloud banner */
#cloudStatus.alert small {
  display: none;
}

/* ── KPI grid ── */
.dash-kpi-grid {
  margin-bottom: var(--mr-space-lg);
  align-items: stretch;   /* equal height across all 4 cards */
}

/* ── KPI card inner layout ── */
.dash-kpi-grid .mr-card,
.dash-kpi-grid [class*="mr-card"] {
  padding: var(--mr-space-md) var(--mr-space-lg) !important;
  height: 100%;                           /* stretch to grid row height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ── KPI icon — compact 32px ── */
.dash-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--mr-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.dash-kpi-icon--primary { background: var(--mr-primary-subtle); }
.dash-kpi-icon--success  { background: var(--mr-success-subtle); }
.dash-kpi-icon--warning  { background: var(--mr-warning-subtle); }
.dash-kpi-icon--danger   { background: var(--mr-danger-subtle); }

/* ── KPI value — larger, tighter vertical ── */
.dash-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mr-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dash-kpi-value--sm {
  font-size: 1.05rem;
}

/* ── Alerts bar — compact inline chip ── */
.dash-alerts-bar {
  margin-bottom: var(--mr-space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--mr-space-xs);
}

.dash-alert-banner {
  display: inline-flex;
  align-items: center;
  gap: var(--mr-space-xs);
  padding: 4px var(--mr-space-sm);
  background: var(--mr-warning-subtle);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 9999px;          /* pill shape */
  font-size: 12px;
  color: var(--mr-warning);
  font-weight: 500;
  width: fit-content;             /* don't stretch full width */
}

/* ── Quick actions — buttons only, no extra label/box ── */
.dash-quick-actions {
  margin-bottom: var(--mr-space-lg);
}

/* Hide the "QUICK ACTIONS" section label — redundant */
.dash-quick-actions > .mr-section-label {
  display: none;
}

.dash-quick-actions-row {
  display: flex;
  gap: var(--mr-space-sm);
  flex-wrap: wrap;
  margin-top: 0;
}

/* ── Activity ── */
.dash-activity {
  margin-bottom: var(--mr-space-lg);
}

/* Tighter section label spacing */
.dash-activity > .mr-section-label,
.dash-insights > .mr-section-label {
  margin-bottom: var(--mr-space-sm) !important;
}

/* ── Insights ── */
.dash-insights {
  margin-bottom: var(--mr-space-lg);
}

/* ── Insights cards — compact ── */
.dash-insights .grid {
  align-items: stretch;
}

.dash-insights .mr-card,
.dash-insights [class*="mr-card"] {
  padding: var(--mr-space-sm) var(--mr-space-md) !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ── Mobile: KPI grid 2-col ── */
@media (max-width: 767px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--mr-space-sm);
  }
  .dash-kpi-value {
    font-size: 1.1rem;
  }

  .dash-kpi-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .dash-quick-actions-row {
    flex-direction: column;
  }

  .dash-quick-actions-row .mr-btn {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── Very small phones: single column ── */
@media (max-width: 414px) {
  .dash-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Ask MR Brain entry point (Founder decision 2026-07-31) ── */
/* Prominent conversation entry on dashboard — not just a topbar button */
.dash-brain-entry {
  display: flex;
  align-items: center;
  gap: var(--mr-space-md);
  padding: var(--mr-space-md) var(--mr-space-xl);
  background: var(--mr-primary-subtle);
  border: 1.5px solid var(--mr-primary);
  border-radius: var(--mr-radius);
  cursor: pointer;
  margin-bottom: var(--mr-space-lg);
  transition: var(--mr-transition);
  text-decoration: none;
}

.dash-brain-entry:hover {
  background: var(--mr-primary);
  border-color: var(--mr-primary-hover);
}

.dash-brain-entry:hover .dash-brain-entry__text,
.dash-brain-entry:hover .dash-brain-entry__hint {
  color: #fff;
}

.dash-brain-entry:focus-visible {
  outline: 2px solid var(--mr-primary);
  outline-offset: 2px;
}

.dash-brain-entry__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dash-brain-entry__text {
  font-size: var(--mr-font-body);
  font-weight: var(--mr-weight-semibold);
  color: var(--mr-primary);
}

.dash-brain-entry__hint {
  font-size: var(--mr-font-caption);
  color: var(--mr-text-muted);
  font-style: italic;
  margin-left: auto;
}

@media (max-width: 480px) {
  .dash-brain-entry__hint { display: none; }
}
