/**
 * Firm.CompanyName 3.0 — dashboard (V1 classic layout)
 * Uses tokens from tokens-base.css + shell chrome from 3.0-shell.css.
 */

.fe30-dash {
  max-width: 1200px;
  margin: 0 auto;
}

.fe30-dash-loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 15px;
}

.fe30-dash-error {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--error-bg);
  color: var(--gray-900);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 14px;
}

.fe30-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.fe30-dash-greeting h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
}

.fe30-dash-meta {
  margin-top: 6px;
  font-size: 14px;
  color: var(--gray-500);
}

.fe30-dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fe30-dash-header-actions .fe30-dash-pm-full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  color: var(--dark-navy);
  background: var(--bg-white);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.fe30-dash-header-actions .fe30-dash-pm-full-link:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

/* --- AI placeholder (no fabricated client data) --- */
.fe30-dash-ai {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--brand-orange-light) 100%);
  box-shadow: var(--shadow-sm);
}

.fe30-dash-ai-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.fe30-dash-ai-body {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-700);
}

/* --- Stat band --- */
.fe30-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  /* Grid items default to min-width:auto, which uses the long number’s min-content
     width and fights minmax(0,1fr); allow columns to actually shrink. */
  min-width: 0;
}

@media (max-width: 900px) {
  .fe30-dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .fe30-dash-stats {
    grid-template-columns: 1fr;
  }
}

.fe30-dash-stat {
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  /* Let this grid item shrink; enables fluid type + wrapping for large USD strings. */
  min-width: 0;
  container-type: inline-size;
  container-name: fe30-dash-stat;
  transition:
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
}

.fe30-dash-stat:hover {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-sm);
  background: var(--bg-white);
}

.fe30-dash-stat--accent {
  border-color: transparent;
  background: var(--brand-orange-light);
}

.fe30-dash-stat-eyebrow {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--gray-600);
}

.fe30-dash-stat-eyebrow--accent {
  color: var(--brand-orange-dark);
}

.fe30-dash-stat-value {
  margin-top: 8px;
  min-width: 0;
  /* Scale headline metrics: vw fallback, then cqi when container queries apply. */
  font-size: clamp(0.95rem, 0.65rem + 2.4vw, 1.75rem);
  font-size: clamp(0.95rem, 0.65rem + 4.8cqi, 1.75rem);
  font-weight: 800;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  /* Intl currency strings often have no spaces; break within the line if still too long. */
  overflow-wrap: anywhere;
}

.fe30-dash-stat-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--gray-500);
}

.fe30-dash-stat-sub--muted {
  color: var(--gray-400);
  font-style: italic;
}

/* --- PM reporting widgets (parity with 2.0 Accounts Overview iframes) --- */
.fe30-dash-pm-kpis {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.fe30-dash-pm-kpis-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.fe30-dash-pm-kpis-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

@media (max-width: 720px) {
  .fe30-dash-pm-kpis-row {
    grid-template-columns: 1fr;
  }
}

.fe30-dash-pm-kpi-cell {
  min-width: 0;
  min-height: 120px;
}

.fe30-dash-pm-kpi-iframe {
  display: block;
  width: 100%;
  min-height: 120px;
  border: 0;
}

/* --- Needs attention --- */
.fe30-dash-attention {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-white);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.fe30-dash-attention-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.fe30-dash-attention-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warning);
}

.fe30-dash-attention-hint {
  font-size: 12px;
  color: var(--gray-500);
}

.fe30-dash-attention-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--gray-300);
}

.fe30-dash-attention-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fe30-dash-attention-row-body {
  flex: 1;
  min-width: 200px;
}

.fe30-dash-attention-row-title {
  font-weight: 600;
  color: var(--dark-navy);
  font-size: 15px;
}

.fe30-dash-attention-row-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--gray-500);
}

.fe30-dash-coming {
  margin: 0;
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* --- IAMS V1 support panels: AUM, activity, quick actions --- */
.fe30-dash-aum-grid,
.fe30-dash-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.fe30-dash-lower-grid {
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}

@media (max-width: 900px) {
  .fe30-dash-aum-grid,
  .fe30-dash-lower-grid {
    grid-template-columns: 1fr;
  }
}

.fe30-dash-panel {
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-white);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.fe30-dash-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fe30-dash-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-navy);
  letter-spacing: -0.01em;
}

.fe30-dash-panel-head span {
  font-size: 12px;
  color: var(--gray-500);
  text-align: right;
}

.fe30-dash-bar-list,
.fe30-dash-activity-list,
.fe30-dash-action-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.fe30-dash-bar-row {
  display: grid;
  gap: 6px;
}

.fe30-dash-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-600);
}

.fe30-dash-bar-meta strong {
  color: var(--dark-navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fe30-dash-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-gray-100);
}

.fe30-dash-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-orange-90);
}

.fe30-dash-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-500);
}

.fe30-dash-activity-row {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
}

.fe30-dash-activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--brand-orange);
}

.fe30-dash-activity-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-navy);
}

.fe30-dash-activity-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--gray-500);
}

.fe30-dash-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  color: var(--dark-navy);
  background: var(--bg-white);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}

.fe30-dash-action::after {
  content: "→";
  color: var(--brand-orange);
}

.fe30-dash-action:hover {
  background: var(--brand-orange-light);
  border-color: rgba(251, 106, 24, 0.35);
}

/* `.fe30-btn` / `.fe30-btn-primary` / `.fe30-btn-sm` live in 3.0-shell.css */

.fe30-dash[hidden] {
  display: none !important;
}
