/* ================================================================
   DASHBOARD PREMIUM REDESIGN
   Stripe/Linear/Notion-style: generous whitespace, flat bordered
   cards (no heavy shadows), confident typographic hierarchy, one
   restrained accent color, far less decorative noise.
   ================================================================ */

:root {
  --dp-ink: #0f1115;
  --dp-muted: #6b7280;
  --dp-faint: #9aa1ad;
  --dp-line: #e7e9ee;
  --dp-surface: #f7f8fa;
}

html.dark {
  --dp-ink: #f1f5f9;
  --dp-muted: #94a3b8;
  --dp-faint: #64748b;
  --dp-line: rgba(148, 163, 184, 0.16);
  --dp-surface: #1a2332;
}

html.dark .dash-card,
html.dark .dash-stat-card,
html.dark .dash-overview-card,
html.dark .dash-action-link,
html.dark .dash-ai-icon,
html.dark .dash-brief-readout,
html.dark .dash-brief-decision,
html.dark .dash-meal-item {
  background: #131b2e;
}

.dash-content { padding: 32px 40px 56px; max-width: 1320px; }

/* ----------------------------------------------------------------
   Cards — flat, bordered, no heavy shadow
   ---------------------------------------------------------------- */
.dash-card,
.dash-stat-card {
  background: #ffffff;
  border: 1px solid var(--dp-line);
  box-shadow: none;
  border-radius: 14px;
}

.dash-stat-card-enterprise,
.dash-card-enterprise {
  border: 1px solid var(--dp-line);
  box-shadow: none;
}

.dash-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dp-ink);
}

.dash-card-header h3 i {
  color: var(--dp-faint);
  font-size: 0.95rem;
}

.dash-section-kicker {
  color: var(--primary);
  letter-spacing: 0.07em;
  font-size: 0.7rem;
}

.dash-link { color: var(--primary); }

/* ----------------------------------------------------------------
   Topbar greeting — bigger, more confident
   ---------------------------------------------------------------- */
.dash-greeting h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dp-ink);
  letter-spacing: -0.01em;
}

.dash-greeting p { color: var(--dp-muted); }

/* ----------------------------------------------------------------
   Overview banner — trimmed to a clean header + inline stat row
   ---------------------------------------------------------------- */
.dash-overview-card {
  border: 1px solid var(--dp-line);
  background: #ffffff;
  padding: 28px 32px;
  height: auto;
  align-self: flex-start;
}

.dash-overview-copy h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dp-ink);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.dash-overview-copy p {
  color: var(--dp-muted);
  font-size: 0.92rem;
  max-width: 520px;
}

.dash-overview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 4px;
  background: none;
  min-width: 0;
  grid-template-columns: none;
}

.dash-overview-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 20px;
  border-radius: 0;
  background: none;
  border: none;
  border-left: 1px solid var(--dp-line);
}

.dash-overview-metric:first-child {
  border-left: none;
  padding-left: 0;
}

.dash-overview-metric span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dp-faint);
  font-weight: 600;
  margin-bottom: 0;
}

.dash-overview-metric strong {
  font-size: 1.05rem;
  color: var(--dp-ink);
  font-weight: 700;
}

/* ----------------------------------------------------------------
   KPI stat row — big bold numbers, minimal decoration
   ---------------------------------------------------------------- */
.dash-stat-card {
  padding: 20px 22px;
  gap: 16px;
}

.dash-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1rem;
  background: var(--dp-surface) !important;
  color: var(--primary) !important;
}

.dash-stat-info small {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dp-faint);
  font-weight: 600;
}

.dash-stat-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dp-ink);
  margin: 2px 0 8px;
}

.dash-stat-info h3 span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dp-muted);
}

.dash-stat-bar {
  background: var(--dp-surface);
  height: 4px;
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   Quote — quieter, smaller
   ---------------------------------------------------------------- */
.dash-quote-enterprise {
  background: var(--dp-surface) !important;
  border: 1px solid var(--dp-line) !important;
  box-shadow: none !important;
  padding: 16px 20px !important;
}

.dash-quote-enterprise p {
  color: var(--dp-muted) !important;
  font-size: 0.88rem !important;
  font-style: normal !important;
}

/* ----------------------------------------------------------------
   Command Queue / right-column cards — tighter, calmer
   ---------------------------------------------------------------- */
.dash-action-grid { gap: 10px; }

.dash-action-link {
  border: 1px solid var(--dp-line);
  background: #fff;
  border-radius: 10px;
  padding: 14px 10px;
  color: var(--dp-ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-action-link:hover {
  border-color: var(--primary);
  background: var(--dp-surface);
}

.dash-action-link i { color: var(--primary); }

.dash-action-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-action-complete-btn {
  border: none;
  background: none;
  color: var(--dp-faint);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.dash-action-complete-btn:hover { color: var(--primary); }

.dash-action-complete-btn.is-done { color: #0d9488; }

/* KPI stat cards — drop the decorative progress bars (arbitrary
   percentages with no clear meaning add noise, not information) */
.dash-stat-bar { display: none; }

.dash-stat-info h3 { margin-bottom: 0; }

.dash-reminder-summary-card,
.dash-card.dash-card-enterprise {
  padding: 22px 24px;
}

/* ----------------------------------------------------------------
   AI insight / guidance callouts — sections separated by a hairline
   divider instead of stacked boxes-within-a-box. Several of these
   already sit inside one dash-card, so giving each its own filled
   background + border reads as nested cards; a shared flat surface
   with a top divider reads as one organized card with sections.
   ---------------------------------------------------------------- */
.dash-ai-insight,
.dash-guidance-card {
  background: none;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--dp-line);
  padding: 14px 0 0;
}

.dash-ai-insight:first-child,
.dash-guidance-card:first-child {
  border-top: none;
  padding-top: 0;
}

.dash-ai-icon {
  background: var(--dp-surface);
  border: 1px solid var(--dp-line);
  color: var(--primary);
}

.dash-ai-insight strong,
.dash-guidance-card .feature-section-label {
  font-size: 0.8rem;
}

.dash-ai-insight p,
.dash-guidance-card p.text-muted {
  font-size: 0.85rem;
}

/* ----------------------------------------------------------------
   Weekly Transformation Brief — calmer, more structured
   ---------------------------------------------------------------- */
.dash-brief-band { gap: 12px; }

.dash-brief-signal {
  background: var(--dp-surface);
  border: 1px solid var(--dp-line);
}

.dash-brief-readout,
.dash-brief-decision {
  background: #ffffff;
  border: 1px solid var(--dp-line);
}

.dash-brief-decision-card { background: var(--dp-surface); }

.dash-brief-toggle {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-brief-toggle:hover { color: var(--dp-ink); }

/* ----------------------------------------------------------------
   Meals / macros / photo timeline — quieter icon treatment
   ---------------------------------------------------------------- */
.dash-meal-item {
  border: 1px solid var(--dp-line);
  background: #fff;
  box-shadow: none;
}

.dash-photo-placeholder {
  box-shadow: none !important;
}

/* ----------------------------------------------------------------
   Buttons inside the dashboard — match the rest of the site
   ---------------------------------------------------------------- */
.dash-content .btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.dash-content .btn-outline-secondary {
  border-color: var(--dp-line) !important;
  color: var(--dp-muted) !important;
}

.dash-content .btn-outline-secondary:hover {
  background: var(--dp-surface) !important;
  color: var(--dp-ink) !important;
}

/* ----------------------------------------------------------------
   Redundant explanatory copy — the heading/label next to these
   already says the same thing in fewer words. Kept in the DOM
   (JS still targets these ids) but hidden from the compact view.
   ---------------------------------------------------------------- */
.dash-status-hidden-copy { display: none; }

/* ----------------------------------------------------------------
   Status panel — merges what used to be three separate stacked
   cards (Reminders / Health Sync / Profile) into one bordered
   card with dividers, so the right rail reads as one grouped
   unit instead of three repeating boxes.
   ---------------------------------------------------------------- */
.dash-status-row {
  padding: 16px 0;
  border-top: 1px solid var(--dp-line);
}

.dash-status-row:first-of-type { padding-top: 14px; }

.dash-status-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dash-status-row-head h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dp-ink);
}

.dash-status-row-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dp-faint);
  font-weight: 700;
  white-space: nowrap;
}

.dash-status-row-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-status-identity-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-status-identity-copy h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .dash-content { padding: 20px; }
}
