/* ==========================================
   dashboard.css — User dashboard styles
   ========================================== */

.dash-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.dash-greeting h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 6px;
  color: var(--ink);
}

.dash-greeting p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}

.dash-actions {
  display: flex;
  gap: 10px;
}

.dash-actions button, .dash-actions .btn-link {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-actions button:hover, .dash-actions .btn-link:hover {
  background: var(--bg-3);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.metric-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
}

.metric-label {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
}

.metric-sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 6px;
}

.dash-section {
  margin-bottom: 40px;
}

.dash-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.continue-card {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.continue-card .ttl {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 4px;
}

.continue-card .meta {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0;
}

.continue-card .btn-resume {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.progress-list li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.progress-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  font-size: 15px;
}

.progress-list a:hover {
  color: var(--accent);
}

.progress-list .badge {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.quiz-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.quiz-card .qtitle {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.4;
}

.quiz-card .qscore {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent);
  font-weight: 700;
}

.quiz-card .qdetail {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 6px;
}

.bookmark-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bookmark-list li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bookmark-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
}

.bookmark-list a:hover {
  color: var(--accent);
}

.bookmark-list .rm-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-2);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.bookmark-list .rm-btn:hover {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.empty-state p {
  margin: 0 0 8px;
}

.empty-state a {
  color: var(--accent);
  font-weight: 600;
}

.profile-prompt {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2)));
  color: #fff;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  margin-bottom: 32px;
}

.profile-prompt h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 10px;
}

.profile-prompt p {
  margin: 0 0 20px;
  opacity: 0.9;
}

.profile-prompt input {
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  font-family: var(--font-body);
  width: 100%;
  max-width: 320px;
  margin-right: 0;
  margin-bottom: 12px;
}

.profile-prompt button {
  background: #fff;
  color: var(--accent);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}

@media (max-width: 880px) {
  .dash-header { flex-direction: row; align-items: flex-end; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-list { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .dash-header { flex-direction: column; align-items: flex-start; }
  .dash-actions { width: 100%; flex-wrap: wrap; }
  .dash-actions button, .dash-actions .btn-link { flex: 1; min-width: 120px; justify-content: center; }
  .metrics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .profile-prompt { padding: 32px 20px; }
  .profile-prompt h2 { font-size: 24px; }
}
