/* =====================================================
   MoneyMatters — My Dashboard (my-dashboard.html)
   Financial Snapshot + every tool's saved data in one place, genuinely
   two-way editable (Phase 2). Extends site-base.css tokens and reuses
   individual-tools/indiv-tools-scss/native-tool.css's .tool-panel,
   .tool-stat-*, .tool-breakdown, .tool-note, .tool-field*, .tool-email-
   results-toggle, and .tool-submit-dashboard-btn for each tool's rendered
   result and its edit-mode form/buttons rather than inventing new classes
   for the same visual things — see that file for those definitions/dark
   overrides.
   ===================================================== */

/* This page isn't a plain-content utility page like Privacy/Terms (which
   share .utility-page's restrained, flattened .page-hero treatment) — it's
   a real product destination and should read like one. #my-dashboard-page
   (this page's own body id) has higher specificity than the shared
   .utility-page class, so this wins without changing that shared rule or
   affecting any other utility page. */
#my-dashboard-page .page-hero {
    background:
        radial-gradient(ellipse 700px 500px at 25% 30%, rgba(98, 169, 116, 0.12), transparent 55%),
        radial-gradient(ellipse 600px 400px at 80% 60%, rgba(196, 154, 71, 0.08), transparent 55%) !important;
    /* .page-hero's own padding-bottom (site-base.css) doesn't create any
       visible gap here: .hero-media (the photo) is position:absolute;
       inset:0, so it fills this element's full padding box, right through
       that padding, and the photo ends exactly where .page-hero's own box
       does. A real margin here is the only thing that actually pushes the
       next section (the "At a Glance" summary) away from the photo's
       bottom edge -- confirmed live, the gap was measured at 0px before
       this. 40px matches this page's own established section-to-section
       spacing (.my-dashboard-score-panel, .my-dashboard-summary below). */
    margin-bottom: 40px;
}
#my-dashboard-page .page-hero h1 {
    font-size: clamp(40px, 5.5vw, 68px) !important;
    letter-spacing: -0.025em !important;
}

/* Shown only if the session fetch is still pending past
   MY_DASHBOARD_SLOW_LOAD_MS (see scripts/my-dashboard.js) -- an escape
   hatch for the worst case (a cold Netlify function instance plus
   session-client.js's own retry) taking up to ~10s to settle, instead of
   an indefinite static "Loading..." with nothing else to do. */
.my-dashboard-slow-load { margin-top: 16px; }

.my-dashboard-signedout {
    max-width: 480px;
    margin: 0 auto 90px;
    padding: 0 6%;
    text-align: center;
}
.my-dashboard-signedout p {
    font-family: var(--mm-sans);
    font-size: 16px;
    color: var(--mm-text-muted);
    margin: 0 0 20px;
    line-height: 1.6;
}

.my-dashboard-body {
    max-width: 1100px;
    margin: 0 auto 90px;
    padding: 0 6%;
}

.my-dashboard-score-panel { max-width: 360px; margin: 0 auto 40px; }
.my-dashboard-score-panel .tool-panel { text-align: center; }

/* "At a glance" summary band -- reuses .tool-panel/.tool-stat-label/
   -value/-sub/.tool-note as-is (see each tile's markup in
   scripts/my-dashboard.js); only the tile grid layout and the smaller,
   scoped .tool-stat-value size below are new, since that class's default
   size (native-tool.css) is tuned for a single hero number, not 2-4
   side-by-side tiles. */
.my-dashboard-summary { margin: 0 0 40px; }
.my-dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}
@media (max-width: 700px) {
    .my-dashboard-summary-grid { grid-template-columns: 1fr; }
}
.my-dashboard-summary-tile .tool-stat-value { font-size: clamp(24px, 3vw, 32px); }

/* Phase 3: "Download as PDF" (window.print(), see the @media print block
   in dark-system.css) + "Email this to me" (netlify/functions/
   email-dashboard.mjs). Reuses .tool-submit-dashboard-btn/
   .tool-email-results-toggle/.tool-email-results-status as-is -- only
   this row's own layout is new. */
.my-dashboard-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 0 0 32px;
}
.my-dashboard-actions .tool-email-results-status { margin: 0; flex-basis: 100%; }

/* "Email this to me" paired with Download as PDF (native-tool.css's
   .tool-submit-dashboard-btn) -- same real-button shape/size instead of
   the plain underlined .tool-email-results-toggle text link it used to be
   (visually inconsistent next to a solid button), but ghosted/outlined so
   two identical solid-green buttons don't sit side by side. Scoped to
   this page only since no other page pairs two of these buttons. */
.tool-submit-dashboard-btn--ghost {
    background: transparent;
    color: var(--mm-green-deep);
    border: 2px solid var(--mm-green);
}
.tool-submit-dashboard-btn--ghost:hover { background: var(--mm-green); color: white; }

.my-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 700px) {
    .my-dashboard-grid { grid-template-columns: 1fr; }
}

.my-dashboard-tool-panel h2 {
    font-family: var(--mm-serif);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 18px;
    color: var(--mm-charcoal);
    letter-spacing: -0.01em;
}
.my-dashboard-tool-panel--empty { display: flex; flex-direction: column; align-items: flex-start; }
.my-dashboard-tool-panel--empty .tool-note { border-top: none; padding-top: 0; margin-bottom: 20px; }

/* Each grid slot is a stable DOM anchor (my-dashboard.js re-renders one
   slot at a time so a mid-edit panel is never clobbered by a background
   refetch) -- display: contents lets its single child (the actual
   .tool-panel) act as the real grid item, so the extra wrapper has no
   effect on sizing/gap. */
.my-dashboard-panel-slot { display: contents; }

.my-dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.my-dashboard-panel-head h2 { margin: 0; }
.my-dashboard-panel-head .tool-email-results-toggle { flex-shrink: 0; }

.my-dashboard-edit-preview {
    border-bottom: 1px solid var(--mm-border);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.my-dashboard-edit-status {
    font-family: var(--mm-sans);
    font-size: 13px;
    line-height: 1.5;
    margin: 4px 0 16px;
}
.my-dashboard-edit-status.is-conflict { color: var(--mm-gold); }
.my-dashboard-edit-status.is-error { color: #B3432B; }

/* Each saved result is one name/value line (tool-models.js's summary
   entries are already a single {label, value} pair, unlike the native
   tool pages' own two-line "actual vs. recommended" breakdown rows) —
   .tool-breakdown/li/-name/-figures are native-tool.css globals reused
   as-is for color/type; only this page's simpler left/right split per
   row is new, scoped here so it doesn't affect any other page reusing
   those same shared classes. */
.my-dashboard-tool-panel .tool-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.my-dashboard-advisor {
    font-family: var(--mm-sans);
    font-size: 16px;
    color: var(--mm-text-muted);
    margin: 8px 0 0;
}
.my-dashboard-plus-note {
    font-family: var(--mm-sans);
    font-size: 14px;
    color: var(--mm-text-soft);
    margin: 8px 0 0;
}
