/* ==========================================================================
   Utsho — dashboard.css
   Page-scoped styles for pages/dashboard.html only.

   Redesign pass 4 (Sep 2026):
   - Real photographic background (dashboard-hero-blobs.webp) replaces the
     hand-drawn leaf motif, covering the full hero box.
   - The hero and the personalized welcome content are now ONE box
     (dashboard.js fills the same static hero by element id, rather than
     building a second box below it).
   - A vivid green (not the muted teal --accent) is introduced for
     Progress/completion, matching the reference the client provided.
   - Bug fix: all My Concept Bank tab styling was moved OUT of this file
     entirely and into my-concept-bank.js's own injected stylesheet — it
     was split across two files before, which is exactly what let the
     active tab's background rule silently fail to apply in some load
     orders (white text on a white/cream tab = invisible). Now it lives
     in exactly one place.
   ========================================================================== */

:root {
  /* Page-scoped extra accent, not added to the site-wide colors.css since
     it's used only on this one page. */
  --vivid-green: #16A34A;
  --vivid-green-light: #22C55E;
  --vivid-green-tint: #DCFCE7;
  --vivid-green-text: #14532D;
}

/* ---- Overall layout: named areas, one occupant per area — this is what
   keeps the sidebar's three widgets from ever sharing a row-track with
   the (taller) main column and stranding a gap between them. ---- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "main" "sidebar";
  gap: var(--space-6);
}
@media (min-width: 960px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    grid-template-areas: "main sidebar";
    align-items: start;
    gap: var(--space-8);
  }
}
#dash-signed-in:not([hidden]) { display: contents; }
.dash-grid { grid-area: main; grid-template-columns: 1fr; gap: var(--space-4); }
.dashboard-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ==========================================================================
   Hero — one unified box (static "Your Dashboard" default content for
   signed-out visitors; dashboard.js fills in the personalized version by
   element id when signed in, rather than building a second box below it).
   ========================================================================== */
.page-header--dash {
  position: relative;
  overflow: hidden;
  background-color: var(--card);
  background-image: url('../assets/dashboard-hero-blobs.webp');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  padding: var(--space-6) var(--space-8) !important;
}

.dash-hero-milestone {
  position: absolute;
  top: var(--space-6);
  right: var(--space-8);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(255, 253, 249, 0.85);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}
.dash-hero-milestone strong { color: var(--primary); font-weight: 700; margin: 0 2px; }
@media (max-width: 640px) { .dash-hero-milestone { position: static; display: inline-flex; margin-bottom: var(--space-3); } }

.dash-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}
.dash-hero-identity { max-width: 46ch; }
/* "dashboard" eyebrow — enlarged from the site's usual tiny meta-label
   size specifically on this page, since it's effectively this box's
   only section marker now that the Workspace pill is gone. Still
   Inter/uppercase/tracked to match the sitewide meta-label convention,
   just given real presence instead of disappearing above the h1. */
#dash-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-2);
}
#dash-hero-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.dash-hero-identity h1 { font-size: 1.9rem; margin: 0; }
.dash-hero-sub { color: var(--muted); margin: var(--space-2) 0 0; font-size: 0.95rem; }

.dash-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.dash-hero-meta__email {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: rgba(255, 253, 249, 0.7);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.dash-hero-meta__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vivid-green-text);
  background: var(--vivid-green-tint);
  padding: 4px 12px 4px 8px;
  border-radius: var(--radius-pill);
}
.dash-hero-meta__badge svg { width: 13px; height: 13px; color: var(--vivid-green); }

/* ---- Streak widget — neon-orange + porcelain, with a soft inner glow
   on the flame icon (a small, tasteful nod to "make it feel lit up",
   not a literal render — see functionality/dashboard.js comments). ---- */
.dash-streak {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--porcelain);
  border: 1px solid rgba(255, 97, 21, 0.22);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  flex-shrink: 0;
  min-height: 66px;
  box-shadow: 0 10px 28px rgba(30, 22, 15, 0.08);
}
.dash-streak__icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--neon-orange);
  color: var(--porcelain);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: dash-streak-glow 2.6s ease-in-out infinite;
}
@keyframes dash-streak-glow {
  0%, 100% { box-shadow: 0 6px 16px rgba(255, 97, 21, 0.32), 0 0 0 0 rgba(255, 97, 21, 0.35); }
  50%      { box-shadow: 0 6px 20px rgba(255, 97, 21, 0.46), 0 0 16px 5px rgba(255, 97, 21, 0.28); }
}
@media (prefers-reduced-motion: reduce) { .dash-streak__icon { animation: none; box-shadow: 0 6px 16px rgba(255, 97, 21, 0.32); } }
.dash-streak__icon svg { width: 21px; height: 21px; }
.dash-streak__eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--neon-orange);
  margin: 0 0 2px;
}
.dash-streak__count { margin: 0; font-size: 0.92rem; color: var(--text); display: flex; align-items: center; flex-wrap: wrap; }
.dash-streak__count strong { font-family: var(--font-display); font-size: 1.25rem; margin-right: 4px; }
.dash-streak__today-pill {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--vivid-green-text);
  background: var(--vivid-green-tint);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.dash-streak__week { display: flex; gap: 4px; margin-top: var(--space-2); }
.dash-streak__day {
  width: 21px; height: 21px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700;
  color: var(--muted);
  background: var(--bg-deep);
}
.dash-streak__day svg { width: 11px; height: 11px; }
.dash-streak__day--active { background: var(--vivid-green-light); color: #FFFFFF; }
.dash-streak__day--today { box-shadow: 0 0 0 2px var(--porcelain), 0 0 0 3.5px var(--neon-orange); }
.dash-streak__day--today.dash-streak__day--active { background: var(--neon-orange); }
@media (max-width: 640px) { .dash-streak { width: 100%; } }

/* ==========================================================================
   Cards — one shape for every widget; identity color lives on the top
   edge and the icon chip, never the whole surface.
   ========================================================================== */
.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(30, 22, 15, 0.04);
  padding: var(--space-6);
}
.dashboard-layout .card--violet,
.dashboard-layout .card--gold,
.dashboard-layout .card--mint,
.dashboard-layout .card--accent {
  background: var(--card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(30, 22, 15, 0.04);
}
.dashboard-layout .gradient-border::before { display: none; }

.dash-card--progress   { border-top: 3px solid var(--vivid-green-light); }
.dash-card--notes      { border-top: 3px solid var(--clay-brown); }
.dash-card--concept    { border-top: 3px solid var(--signal-violet); }
.dash-card--invite     { border-top: 3px solid var(--forest-graphite); }
.dash-card--countdown  { border-top: 3px solid var(--sky); }

.dash-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.dash-card-head__icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-card-head__icon svg { width: 16px; height: 16px; }
.dash-card-head__text { flex: 1; min-width: 0; }
.dash-card-head h3 { font-size: 1rem; margin: 0; }
.dash-card-head__meta { font-size: 0.78rem; color: var(--muted); margin: 2px 0 0; }
.dash-card-head__meta:empty { display: none; }

.dash-card-head__icon--progress  { background: var(--vivid-green-light); color: #FFFFFF; }
.dash-card-head__icon--notes     { background: var(--clay-brown); color: var(--soft-butter); }
.dash-card-head__icon--concept   { background: var(--signal-violet); color: #FFFFFF; }
.dash-card-head__icon--invite    { background: var(--forest-graphite); color: var(--acid-mint); }
.dash-card-head__icon--countdown { background: var(--sky); color: var(--porcelain); }

.dash-progress-item,
.dash-note-item {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-3) 0;
  margin-bottom: 0;
}
.dash-progress-item:last-child,
.dash-note-item:last-child { border-bottom: none; padding-bottom: 0; }
.dash-note-item:hover { border-color: var(--border); }
.dash-note-item:hover strong { color: var(--clay-brown); }
.dash-note-item strong { font-weight: 500; color: var(--text); }

.dash-empty-state { padding: var(--space-1) 0; }

/* ---- Referrals (mr-* classes come from my-referrals.js) ---- */
.mr-count strong { color: var(--forest-graphite); }
.mr-copy-btn { border-color: var(--forest-graphite); color: var(--forest-graphite); }
.mr-copy-btn:hover { background: var(--forest-graphite); color: var(--acid-mint); }

/* ---- Exam countdown (ec-* classes come from my-exam-countdown.js) ---- */
#my-exam-countdown-mount .card { padding: var(--space-6); }
.ec-days { font-size: 2.7rem !important; }
.ec-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: var(--space-2); }
.ec-eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ec-card--calm .ec-eyebrow   { color: var(--sky); }
.ec-card--calm .ec-eyebrow__dot   { background: var(--sky); }
.ec-card--soon .ec-eyebrow   { color: var(--clay-brown); }
.ec-card--soon .ec-eyebrow__dot   { background: var(--clay-brown); }
.ec-card--urgent .ec-eyebrow { color: var(--neon-orange); }
.ec-card--urgent .ec-eyebrow__dot { background: var(--neon-orange); }
.ec-days-row { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.ec-hours-chip {
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--porcelain); color: var(--neon-orange);
  border: 1px solid var(--neon-orange);
  white-space: nowrap;
}
.ec-date-row { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; margin: var(--space-2) 0 var(--space-3); }
.ec-date-row svg { width: 14px; height: 14px; flex-shrink: 0; }
.ec-elapsed-track { height: 6px; border-radius: 999px; background: rgba(30, 22, 15, 0.08); overflow: hidden; margin-bottom: var(--space-3); }
.ec-elapsed-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
