/* ═══════════════════════════════════════
   PHASE 1 — #15 PARENT DASHBOARD
═══════════════════════════════════════ */
.parent-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(8, 8, 28, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.parent-overlay.open { display: flex; }

/* PIN screen */
.parent-pin-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 36px 28px 28px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: rsCardIn 0.4s var(--spring) both;
}
.pp-lock { font-size: 48px; margin-bottom: 12px; }
.pp-title {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}
.pp-hint {
  font-size: 13px;
  color: var(--text-soft);
  direction: rtl;
  margin-bottom: 20px;
}
.pp-input {
  width: 100%;
  padding: 14px;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 8px;
  border: 2px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: var(--surface2);
  color: var(--text);
  margin-bottom: 14px;
  font-family: inherit;
}
.pp-input:focus { border-color: var(--primary); }
.pp-actions { display: flex; gap: 10px; }
.pp-btn-confirm {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.pp-btn-cancel {
  background: var(--surface2);
  color: var(--text-mid);
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.pp-error {
  font-size: 13px;
  color: #e11d48;
  font-weight: 700;
  min-height: 20px;
  margin-bottom: 8px;
}

/* Dashboard */
.parent-dash-card {
  background: var(--surface);
  border-radius: 28px;
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: rsCardIn 0.4s var(--spring) both;
}
.pd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 0;
  margin-bottom: 16px;
}
.pd-title {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.pd-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  color: var(--text-soft);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 22px;
  margin: 14px 0 8px;
}
.pd-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.pd-stat {
  background: var(--surface2);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}
.pd-stat-num {
  font-family: "Baloo 2", "Noto Sans Hebrew", "Sora", sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.pd-stat-label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
  margin-top: 3px;
  direction: rtl;
}
.pd-weak-list {
  padding: 0 16px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pd-weak-chip {
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.pd-footer {
  padding: 16px 22px 22px;
}
.pd-logout-btn {
  width: 100%;
  background: var(--surface2);
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  color: #e11d48;
  cursor: pointer;
  font-family: inherit;
}

/* ════════════════════════════════
   PARENT DASHBOARD — INTERESTS + DRILL
════════════════════════════════ */
.pd-interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.pd-tag-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--glass);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.pd-tag-btn.active {
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(124,91,248,.35);
}

.pd-drill-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 4px;
  transition: transform .15s;
}
.pd-drill-btn:active { transform: scale(.97); }

/* ── AI Tier card ── */
.pd-tier-card {
  background: rgba(124,91,248,.08);
  border: 1px solid rgba(124,91,248,.2);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 4px;
}
.pd-tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pd-tier-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pd-tier-free    { background: #e5e7eb; color: #374151; }
.pd-tier-basic   { background: linear-gradient(135deg,#3b82f6,#2563eb); color: #fff; }
.pd-tier-premium { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; }
.pd-tier-desc { font-size: 13px; opacity: .7; }
.pd-tier-plans { display: flex; flex-direction: column; gap: 5px; }
.pd-tier-plan {
  font-size: 12px;
  opacity: .6;
  padding: 5px 8px;
  background: rgba(0,0,0,.04);
  border-radius: 8px;
}

/* Age and level selection in parent dashboard */
.pd-age-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.pd-age-btn {
  padding: 8px 4px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.pd-age-btn.active {
  border-color: var(--primary);
  background: rgba(124,91,248,.18);
  color: #a78bfa;
}
.pd-age-btn:active { transform: scale(.95); }

.pd-level-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pd-level-btn {
  padding: 10px 8px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  direction: rtl;
  text-align: center;
  transition: border-color .15s, background .15s;
  line-height: 1.4;
}
.pd-level-btn.active {
  border-color: var(--primary);
  background: rgba(124,91,248,.18);
  color: #a78bfa;
}
.pd-level-btn:active { transform: scale(.97); }

/* ── Curriculum section in Parent Dashboard ── */
.pd-curriculum-section {
  width: 100%;
}

.pd-curr-streak {
  font-size: 14px;
  font-weight: 700;
  color: #93c5fd;
  direction: rtl;
  margin-bottom: 10px;
}

.pd-curr-units {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-curr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 7px 12px;
}

.pd-curr-unit {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  flex: 1;
  direction: ltr;
  text-align: left;
}

.pd-curr-dots {
  display: flex;
  gap: 4px;
}

.pd-curr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.3);
}

.pd-curr-dot.done {
  background: #4ade80;
  border-color: #22c55e;
}

.pd-curr-tag {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  min-width: 28px;
  text-align: right;
}

/* ── Curriculum summary stats row ── */
.pd-curr-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  direction: rtl;
  margin-bottom: 8px;
}

.pd-curr-stat { font-weight: 600; }
.pd-curr-sep  { opacity: 0.4; }

/* ── Adaptive queue words ── */
.pd-curr-adapt {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  direction: rtl;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-bottom: 8px;
}

.pd-curr-adapt-word {
  background: rgba(251,191,36,0.18);
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
}

/* ── Track toggle chips ── */
.pd-section-sublabel {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  direction: rtl;
  margin-bottom: 6px;
}

.pd-curr-track-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pd-track-chip {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  direction: rtl;
}

.pd-track-chip.active {
  background: rgba(124,91,248,0.22);
  border-color: rgba(124,91,248,0.55);
  color: #c4b5fd;
}

.pd-track-chip:active { transform: scale(0.95); }

/* ═══════════════════════════════════════
   WEEKLY REPORT BUTTON
═══════════════════════════════════════ */
.pd-weekly-btn {
  flex-shrink: 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(124,91,248,.35);
  transition: transform .15s;
}
.pd-weekly-btn:active { transform: scale(.96); }

/* ═══════════════════════════════════════
   WEEKLY REPORT MODAL
═══════════════════════════════════════ */
.wr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(8,8,28,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: flex-end;
  justify-content: center;
}
.wr-overlay.open { display: flex; }

.wr-modal {
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.wr-title { font-size: 1.1rem; font-weight: 800; }
.wr-close-btn {
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.wr-close-btn:hover { background: rgba(255,255,255,.15); }

.wr-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 10px;
  direction: rtl;
  text-align: right;
}

.wr-child-name {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.wr-week-label {
  font-size: 13px;
  opacity: .6;
  margin-bottom: 12px;
}
.wr-streak-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.wr-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wr-stat {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
}
.wr-stat-num {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wr-stat-label {
  font-size: 11px;
  opacity: .7;
  margin-top: 4px;
  line-height: 1.3;
}

.wr-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
}
.wr-share-btn {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s;
}
.wr-share-btn:active { transform: scale(.97); }
.wr-copy-btn {
  padding: 14px 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s;
}
.wr-copy-btn:active { transform: scale(.97); }

/* ═══════════════════════════════════════
   NOTIFICATION SETTINGS CARD
═══════════════════════════════════════ */
.pd-notif-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd-notif-row,
.pd-notif-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  direction: rtl;
}
.pd-notif-label {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}
.pd-notif-toggle {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.pd-notif-toggle.active {
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  border-color: transparent;
  color: white;
}
.pd-notif-select {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  direction: ltr;
}
.pd-notif-hint {
  font-size: 11px;
  opacity: .45;
  text-align: right;
  direction: rtl;
}

/* ── AGE AI badge in parent dashboard footer ── */
.pd-ageai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  margin-top: 12px;
  padding: 6px 12px 6px 8px;
  border-radius: 20px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: background 0.18s;
  width: fit-content;
}
.pd-ageai-badge:hover { background: #e5e7eb; }
.pd-ageai-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}
.pd-ageai-badge span {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.pd-ageai-badge strong {
  font-weight: 800;
  color: #111827;
}
