/* ============================================
   NOCAP ACADEMY — dashboard.css
   Styles specific to the student dashboard.
   Inherits base styles from style.css
============================================ */

/* ---- PAGE ---- */
.dashboard-body {
  min-height: 100vh;
  background: #F1F5F9;
}

/* ---- TOP BAR ---- */
.topbar {
  background: #0F172A;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: navSlideDown 0.5s ease forwards;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.topbar-student {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-info {
  text-align: right;
}

.student-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.student-meta {
  font-size: 11px;
  color: #64748B;
}

.btn-signout {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-signout:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
}

/* ---- MAIN LAYOUT ---- */
.dash-main {
  padding: 32px 0 60px;
}

.dash-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---- WELCOME ROW ---- */
.welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-title {
  font-size: 22px;
  font-weight: 500;
  color: #0F172A;
  margin-bottom: 4px;
}

.welcome-sub {
  font-size: 14px;
  color: #64748B;
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-size: 11px;
  font-weight: 500;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 0.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 20px;
  width: 44px;
  height: 44px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-value {
  font-size: 18px;
  font-weight: 500;
  color: #0F172A;
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

/* ---- CONTINUE CARD ---- */
.continue-card {
  background: #0F172A;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.continue-card:hover {
  background: #1E293B;
}

.continue-topic-num {
  font-size: 11px;
  color: #6366F1;
  font-weight: 500;
  margin-bottom: 4px;
}

.continue-topic-name {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
}

.continue-subtopic {
  font-size: 12px;
  color: #64748B;
}

.continue-right {
  flex-shrink: 0;
  text-align: right;
  min-width: 100px;
}

.continue-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: flex-end;
}

.continue-progress-bar {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.continue-progress-fill {
  height: 100%;
  background: #6366F1;
  border-radius: 2px;
  transition: width 0.8s ease;
}

.continue-pct {
  font-size: 12px;
  color: #94A3B8;
  font-family: 'DM Mono', monospace;
}

.continue-cta {
  font-size: 13px;
  color: #F59E0B;
  font-weight: 500;
}

/* ---- TOPICS GRID ---- */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ---- TOPIC CARD ---- */
.topic-card {
  background: #fff;
  border: 0.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-card:hover {
  border-color: #6366F1;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.topic-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.topic-num {
  font-size: 11px;
  font-weight: 500;
  color: #6366F1;
  margin-bottom: 3px;
}

.topic-name {
  font-size: 15px;
  font-weight: 500;
  color: #0F172A;
  line-height: 1.3;
}

.topic-subtopics {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 2px;
}

/* Phase badge */
.topic-phase {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.phase-not-started {
  background: #F1F5F9;
  color: #94A3B8;
}

.phase-learning {
  background: #EEF2FF;
  color: #4338CA;
}

.phase-testing {
  background: #FEF3C7;
  color: #92400E;
}

.phase-complete {
  background: #DCFCE7;
  color: #166534;
}

/* Progress bar on topic card */
.topic-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-progress-bar {
  flex: 1;
  height: 4px;
  background: #F1F5F9;
  border-radius: 2px;
  overflow: hidden;
}

.topic-progress-fill {
  height: 100%;
  background: #6366F1;
  border-radius: 2px;
  transition: width 0.8s ease;
}

.topic-progress-pct {
  font-size: 11px;
  color: #94A3B8;
  font-family: 'DM Mono', monospace;
  width: 28px;
  text-align: right;
}

.topic-card-arrow {
  font-size: 14px;
  color: #CBD5E1;
  align-self: center;
  flex-shrink: 0;
}

/* ---- ANIMATIONS ---- */
.animate-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-up:nth-child(2) { transition-delay: 0.08s; }
.animate-up:nth-child(3) { transition-delay: 0.16s; }
.animate-up:nth-child(4) { transition-delay: 0.24s; }

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- DESKTOP ---- */
@media (min-width: 768px) {

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome-title {
    font-size: 26px;
  }

}

@media (min-width: 1024px) {
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-icon img{ width: 44px; height: 44px; display: block; object-fit: contain; }

/* ---- Lumira brand emblem ---- */
.brandmark{width:30px;height:32px;display:block;flex-shrink:0;}
.brandmark.small{width:24px;height:26px;}

.phase-free{background:#FEF3C7;color:#92400E}

/* practice readiness widget */
.pw-card{background:#fff;border:0.5px solid #E2E8F0;border-radius:16px;padding:20px 22px;margin-top:6px}
.pw-head{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.pw-big{font-size:34px;font-weight:600;color:#0f172a;line-height:1}
.pw-num{font-size:26px;font-weight:600;color:#0f172a;line-height:1}
.pw-lbl{font-size:12px;color:#64748B;margin-top:3px}
.pw-mid{border-left:1px solid #E2E8F0;padding-left:26px}
.pw-cta{margin-left:auto;background:#6366F1;color:#fff;font-weight:500;font-size:14px;padding:11px 18px;border-radius:9px;text-decoration:none;white-space:nowrap}
.pw-cta:hover{background:#4F46E5}
.pw-bars{margin-top:16px;display:flex;flex-direction:column;gap:9px}
.pw-empty{font-size:13px;color:#64748B}
.pw-row{display:flex;align-items:center;gap:12px}
.pw-rn{font-size:13px;color:#334155;flex:0 0 190px}
.pw-track{flex:1;height:8px;border-radius:99px;background:#EEF2F7;overflow:hidden;min-width:0}
.pw-track>i{display:block;height:100%;border-radius:99px}
.pw-pct{font-family:'DM Mono',monospace;font-size:12.5px;color:#475569;flex:0 0 40px;text-align:right}
@media(max-width:560px){.pw-rn{flex-basis:120px}.pw-cta{margin-left:0}}

/* first-run dashboard tour */
.lt-overlay{position:fixed;inset:0;background:rgba(2,6,23,.72);z-index:9997}
.lt-ring{position:fixed;z-index:9998;border-radius:12px;box-shadow:0 0 0 9999px rgba(2,6,23,.72);transition:top .25s,left .25s,width .25s,height .25s;pointer-events:none}
.lt-tip{position:fixed;z-index:9999;width:300px;max-width:calc(100vw - 24px);background:#fff;border-radius:14px;box-shadow:0 20px 50px rgba(2,6,23,.4);padding:18px}
.lt-step{font-family:'DM Mono',monospace;font-size:11px;letter-spacing:1px;color:#6366F1;text-transform:uppercase}
.lt-title{font-size:17px;font-weight:600;color:#0f172a;margin:6px 0 6px}
.lt-body{font-size:14px;color:#475569;line-height:1.55}
.lt-actions{display:flex;align-items:center;justify-content:space-between;margin-top:14px}
.lt-skip{background:none;border:none;color:#94A3B8;font-size:13px;cursor:pointer;font-family:'DM Sans',sans-serif}
.lt-skip:hover{color:#64748B}
.lt-next{background:#6366F1;color:#fff;border:none;border-radius:9px;padding:9px 18px;font-size:14px;font-weight:500;cursor:pointer;font-family:'DM Sans',sans-serif}
.lt-next:hover{background:#4F46E5}
.lt-arrow{position:fixed;z-index:9999;width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent}
.lt-arrow.up{border-bottom:10px solid #fff}
.lt-arrow.down{border-top:10px solid #fff}
@media (prefers-reduced-motion:reduce){.lt-ring{transition:none}}

/* parent share link */
.pw-share{margin-top:16px;padding-top:14px;border-top:1px solid #EEF2F7}
.pw-sharebtn{background:#fff;color:#6366F1;border:1.5px solid #C7CDF6;border-radius:9px;padding:9px 16px;font-size:13.5px;font-weight:500;cursor:pointer;font-family:'DM Sans',sans-serif}
.pw-sharebtn:hover{background:#F5F6FF}
.pw-sharebox{display:flex;gap:8px;margin-top:10px}
.pw-sharelink{flex:1;min-width:0;border:1.5px solid #E2E8F0;border-radius:8px;padding:9px 11px;font-size:12.5px;font-family:'DM Mono',monospace;color:#334155;background:#F8FAFC;outline:none}
.pw-copy{background:#6366F1;color:#fff;border:none;border-radius:8px;padding:0 15px;font-size:13px;font-weight:500;cursor:pointer;font-family:'DM Sans',sans-serif}
