/* ═══════════════════════════════════════════════════════════════
   Picture Hunt — Parent Progress Dashboard Styles
   Light "paper" theme — re-themed from the old dark navy gradient onto the
   app's var(--*) design tokens (style.css) + the toy-button shadow recipe,
   so the dashboard reads as the same product as the rest of the app.
   ═══════════════════════════════════════════════════════════════ */

/* ── Stats button on splash screen ── */
.dashboard-open-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 52px;
  height: 52px;
  font-size: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-open-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}

/* ── Dashboard Screen ── */
.dashboard-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%,   rgba(111,75,255,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 25%, rgba(76,201,255,0.12) 0%, transparent 55%),
    var(--paper-warm);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  gap: 12px;
  flex-shrink: 0;
}

.dashboard-back-btn {
  width: 48px;
  height: 48px;
  font-size: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-back-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

.dashboard-title {
  color: var(--ink);
  font-size: 24px;
  margin: 0;
  font-weight: 700;
}

.dashboard-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 24px;
}

/* ── Sections ── */
.dashboard-section {
  margin-bottom: 24px;
}

.dashboard-section-title {
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 12px 0;
  font-weight: 700;
}

/* ── Overall Progress ── */
.dashboard-overall {
  text-align: center;
  padding: 24px 16px;
  background: #fff;
  border: 2px solid var(--shade);
  border-radius: 20px;
  box-shadow: var(--lift-1);
}

.dashboard-big-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--grape);
  line-height: 1;
}
.dashboard-big-number .dashboard-total {
  font-size: 28px;
  color: var(--ink-soft);
  font-weight: 400;
}

.dashboard-big-label {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 4px 0 16px;
}

.dashboard-progress-bar {
  height: 12px;
  background: var(--shade);
  border-radius: 6px;
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto;
}
.dashboard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  border-radius: 6px;
  transition: width 0.6s ease;
}

.dashboard-pct {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 8px;
}

/* ── Category Cards ── */
.dashboard-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-cat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid var(--shade);
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--lift-1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-cat-card:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--shade);
}
.dashboard-cat-card.complete {
  background: rgba(45,212,164,0.14);
  border: 2px solid var(--mint);
}

.dashboard-cat-emoji {
  font-size: 32px;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.dashboard-cat-info {
  flex: 1;
  min-width: 0;
}

.dashboard-cat-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dashboard-cat-bar {
  height: 8px;
  background: var(--shade);
  border-radius: 4px;
  overflow: hidden;
}
.dashboard-cat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dashboard-cat-count {
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 4px;
}

/* ── Category Item Detail (tap to expand) ── */
.dashboard-cat-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px 12px;
}

.dashboard-item {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.dashboard-item.found {
  background: rgba(45,212,164,0.20);
  color: var(--mint-deep);
  font-weight: 600;
}
.dashboard-item.missing {
  background: var(--shade);
  color: var(--ink-soft);
}

/* ── Achievements ── */
.dashboard-achievements {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-achievement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  transition: background 0.2s;
}
.dashboard-achievement.unlocked {
  background: rgba(255,201,60,0.18);
  border: 2px solid var(--sun-deep);
}
.dashboard-achievement.locked {
  background: var(--shade);
  opacity: 0.7;
}

.dashboard-ach-emoji {
  font-size: 28px;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.dashboard-ach-info {
  flex: 1;
}
.dashboard-ach-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.dashboard-ach-desc {
  color: var(--ink-soft);
  font-size: 13px;
}

.dashboard-ach-summary {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 8px;
}

/* ── Weekly Activity ── */
.dashboard-week {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 16px;
}

.dashboard-day {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dashboard-day-label {
  color: var(--ink-soft);
  font-size: 11px;
}

.dashboard-day-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--shade);
}
.dashboard-day.level-1 .dashboard-day-dot { background: rgba(45,212,164,0.30); }
.dashboard-day.level-2 .dashboard-day-dot { background: rgba(45,212,164,0.50); }
.dashboard-day.level-3 .dashboard-day-dot { background: rgba(45,212,164,0.70); }
.dashboard-day.level-4 .dashboard-day-dot { background: rgba(45,212,164,0.85); }
.dashboard-day.level-5 .dashboard-day-dot { background: var(--mint); }

.dashboard-day-count {
  color: var(--ink-soft);
  font-size: 11px;
}

/* ── Recent Sessions ── */
.dashboard-recent {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-session-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--shade);
  border-radius: 12px;
}

.dashboard-session-cat {
  font-size: 20px;
  flex-shrink: 0;
}

.dashboard-session-info {
  flex: 1;
  color: var(--ink);
  font-size: 14px;
}

.dashboard-session-date {
  color: var(--ink-soft);
  font-size: 12px;
  flex-shrink: 0;
}

.dashboard-playtime {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 12px;
  padding: 10px;
  background: var(--shade);
  border-radius: 10px;
}

/* ── Empty state + reset toast ── */
.dashboard-empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
  padding: 24px 12px;
}
.dashboard-toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  z-index: 2100;
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(27,17,64,0.35);
  animation: dashToastIn 0.25s ease;
}
@keyframes dashToastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Reset Button ── */
.dashboard-reset-section {
  text-align: center;
  padding-top: 8px;
  padding-bottom: 32px;
}

.dashboard-reset-btn {
  font-size: 14px;
  padding: 10px 24px;
  border: 2px solid var(--coral);
  border-radius: 12px;
  background: rgba(255,107,107,0.12);
  color: var(--coral-deep);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s;
}
.dashboard-reset-btn:active {
  background: rgba(255,107,107,0.25);
}

/* ── Confirm Reset Overlay ── */
.dashboard-confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(27,17,64,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-confirm-box {
  background: var(--paper-warm);
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 6px 0 var(--ink), 0 28px 60px rgba(27,17,64,0.30);
}

.dashboard-confirm-text {
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.dashboard-confirm-yes {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--coral) 0%, var(--coral-deep) 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 #B83636;
  margin-bottom: 10px;
  transition: transform 0.1s, box-shadow 0.15s;
}
.dashboard-confirm-yes:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #B83636;
}

.dashboard-confirm-no {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.1s, box-shadow 0.15s;
}
.dashboard-confirm-no:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}
