/* ───── LOGGED-IN UI — driven by body.is-authed (set by js/session.js) ───── */

/* Default = logged out: dashboard hidden, marketing hero shown, nav shows Log in / Sign up. */
.hero__dashboard { display: none; }
.nav__logout { display: none; }

/* Logged in: dashboard floats in the hero (over the lattice); marketing hero swapped out; nav -> Log out. */
body.is-authed .hero__dashboard { display: block; }
body.is-authed #hero .hero__content,
body.is-authed #hero .hero__stats,
body.is-authed #hero .scroll-cue,
body.is-authed #hero .award-badge { display: none; }
/* glow orbs render in-flow here; pull them out so the dashboard centres over the lattice */
body.is-authed #hero .hero__orb { position: absolute; }
body.is-authed [data-auth="out"] { display: none !important; }
body.is-authed .nav__logout { display: inline-flex; }

/* ── Dashboard panel — glass over the hero's neural-lattice graphics ── */
.hero__dashboard {
  position: relative;
  z-index: var(--z-above, 2);
  width: 100%;
  padding-block: var(--space-8, 2rem);
}
.dash__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.dash__title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.3rem); line-height: 1.05; }
.dash__title span {
  background: var(--gradient-brand, linear-gradient(135deg, #2563EB, #7C3AED));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dash__sub { color: var(--color-text-muted, #94a3b8); font-size: 0.9rem; margin-top: 0.35rem; }
.dash__note {
  font-size: 0.72rem; color: #fcd34d; background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 999px; padding: 0.35rem 0.85rem; white-space: nowrap;
}

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* Glassmorphism so the live neural-lattice shows through (reads as part of the site, not a paste-over) */
.dash-card {
  background: rgba(13, 18, 32, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--color-bg-border, rgba(255, 255, 255, 0.10));
  border-radius: 16px; padding: 1.15rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.dash-card h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted, #94a3b8); margin-bottom: 0.55rem; font-weight: 600; }
.dash-card .metric { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.dash-card .sub { font-size: 0.75rem; color: var(--color-text-muted, #94a3b8); margin-top: 0.45rem; }

.dash-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #10b981; margin-right: 0.45rem; vertical-align: middle; animation: dashpulse 2s infinite; }
@keyframes dashpulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dash-strip { display: flex; gap: 2px; margin-top: 0.6rem; }
.dash-strip span { flex: 1; height: 22px; border-radius: 2px; background: #10b981; opacity: 0.85; }

.dash-chart { display: flex; align-items: flex-end; gap: 5px; height: 64px; margin-top: 0.4rem; }
.dash-chart i { flex: 1; border-radius: 3px 3px 0 0; display: block; background: var(--gradient-brand, linear-gradient(180deg, #2563EB, #7C3AED)); opacity: 0.85; }
.dash-card--wide { grid-column: 1 / -1; }

/* nav Log out control */
.nav__logout {
  padding: 0.5rem 0.9rem; border-radius: 8px;
  border: 1px solid var(--color-bg-border, rgba(255, 255, 255, 0.16));
  background: transparent; color: var(--color-text-primary, #f1f5f9);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.nav__logout:hover { border-color: rgba(37, 99, 235, 0.5); }
.nav__logout:focus-visible { outline: 2px solid var(--color-accent-1, #2563EB); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .dash-dot { animation: none; } }

/* Logged-in welcome panel (replaces the old sample-metrics dashboard) */
.dash-welcome { display: flex; flex-direction: column; gap: var(--space-4); }
.dash-welcome p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 52ch;
}
.dash-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
