/* ================================================================
   Dripping Secrets — Phase 5 CSS
   Premium Lesson Cards · Dashboard Widgets · Cert Unlock
   Level-Up · Luxury Drawer · Micro-interactions
   v18.0
   ================================================================ */

/* ── Premium Lesson Cards ─────────────────────────────────────── */
.p5-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding-bottom: 24px;
}
.p5-lesson-grid .p5-exam-card {
  grid-column: 1 / -1;
}

.p5-lc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.p5-lc:hover:not(.p5-lc-locked) {
  background: var(--bg-card-hover);
  border-color: rgba(147,51,234,0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.p5-lc.p5-lc-done {
  border-color: rgba(201,168,76,0.25);
}
.p5-lc.p5-lc-locked {
  opacity: 0.45;
  cursor: default;
}
/* Accent line on hover */
.p5-lc:not(.p5-lc-locked)::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--purple-vivid), var(--gold));
  opacity: 0;
  transition: opacity 0.22s;
  border-radius: 14px 14px 0 0;
}
.p5-lc:hover:not(.p5-lc-locked)::after { opacity: 1; }

/* Cover strip */
.p5-lc-cover {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.p5-lc-cover-emoji {
  font-size: 1.8rem;
  z-index: 1;
  position: relative;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.p5-lc-num-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.58rem;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.p5-lc-status-badge {
  position: absolute;
  top: 8px; right: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  z-index: 2;
}
.p5-lc-status-badge.done {
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
}
.p5-lc-status-badge.next {
  background: rgba(147,51,234,0.25);
  border: 1px solid rgba(147,51,234,0.45);
  color: #b988f8;
}
.p5-lc-status-badge.locked {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
}

/* Ring (top-left corner of cover) */
.p5-lc-ring {
  position: absolute;
  bottom: 8px; left: 10px;
  z-index: 2;
}
.p5-lc-ring svg {
  width: 28px; height: 28px;
  transform: rotate(-90deg);
}
.p5-ring-bg { fill:none; stroke:rgba(255,255,255,0.1); stroke-width:3; }
.p5-ring-fill { fill:none; stroke-width:3; stroke-linecap:round; transition:stroke-dashoffset .7s ease; }
.p5-ring-fill.done { stroke:var(--gold); }
.p5-ring-fill.active { stroke:var(--purple-vivid); }
.p5-ring-fill.empty { stroke:rgba(255,255,255,0.15); }

/* Card body */
.p5-lc-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.p5-lc-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.p5-lc-pill {
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.p5-pill-xp { background:rgba(201,168,76,0.12); color:var(--gold); border:1px solid rgba(201,168,76,0.2); }
.p5-pill-time { background:rgba(255,255,255,0.04); color:rgba(255,255,255,0.4); border:1px solid rgba(255,255,255,0.07); }
.p5-lc-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.p5-lc-snippet {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.p5-lc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.p5-lc-cta {
  padding: 5px 13px;
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  pointer-events: none; /* card handles click */
}
.p5-lc-cta.start { background:linear-gradient(135deg,var(--purple-vivid),var(--purple-bright)); color:#fff; }
.p5-lc-cta.continue { background:linear-gradient(135deg,var(--gold),#e8c84a); color:#1a0635; }
.p5-lc-cta.review { background:rgba(201,168,76,0.12); color:var(--gold); border:1px solid rgba(201,168,76,0.25); }
.p5-lc-cta.locked { background:rgba(255,255,255,0.05); color:rgba(255,255,255,0.25); }
.p5-lc-done-icon { font-size: 0.8rem; color: var(--gold); }

/* Exam card — full-width */
.p5-exam-card {
  background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(15,10,30,0.5));
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.22s;
  margin-top: 4px;
}
.p5-exam-card:hover { border-color:rgba(201,168,76,0.5); transform:translateY(-1px); }
.p5-exam-card.locked { opacity:0.45; cursor:default; }
.p5-exam-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(201,168,76,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.p5-exam-info { flex: 1; }
.p5-exam-title { font-size: 0.9rem; font-weight: 700; color: var(--gold); margin-bottom: 3px; }
.p5-exam-sub { font-size: 0.73rem; color: rgba(255,255,255,0.45); }
.p5-exam-arrow { font-size: 1.2rem; color: var(--gold); opacity: 0.7; }

/* ── Dashboard Widgets Row ─────────────────────────────────────── */
#dash-widgets-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.p5-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.22s;
  position: relative;
  overflow: hidden;
}
.p5-widget:hover {
  border-color: rgba(147,51,234,0.3);
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}
.p5-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.p5-widget-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.p5-widget-icon { font-size: 0.9rem; }

/* Progress ring widget */
.p5-prog-widget { display: flex; align-items: center; gap: 14px; }
.p5-prog-ring-wrap {
  position: relative;
  width: 62px; height: 62px;
  flex-shrink: 0;
}
.p5-prog-ring-wrap svg {
  width: 62px; height: 62px;
  transform: rotate(-90deg);
  position: absolute; top: 0; left: 0;
}
.p5-prog-ring-bg { fill:none; stroke:rgba(255,255,255,0.07); stroke-width:5.5; }
.p5-prog-ring-fill {
  fill:none; stroke-width:5.5; stroke-linecap:round;
  transition: stroke-dashoffset 1.2s ease;
}
.p5-prog-ring-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.1;
  pointer-events: none;
}
.p5-prog-stats { flex: 1; }
.p5-prog-val { font-size: 1.4rem; font-weight: 900; color: var(--text-primary); }
.p5-prog-sub { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.p5-prog-detail { font-size: 0.7rem; color: var(--text-secondary); margin-top: 4px; }

/* Weekly goal widget */
.p5-goal-number { font-size: 1.6rem; font-weight: 900; color: var(--text-primary); margin-bottom: 8px; }
.p5-goal-number span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.p5-goal-bar-wrap { height: 6px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.p5-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-vivid), var(--gold));
  border-radius: 4px;
  transition: width 0.8s ease;
}
.p5-goal-row { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--text-muted); }

/* Dimi tip widget */
.p5-dimi-widget { border-color: rgba(147,51,234,0.22); }
.p5-dimi-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.p5-dimi-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(201,168,76,0.3); flex-shrink: 0; }
.p5-dimi-name { font-size: 0.72rem; font-weight: 700; color: var(--text-primary); }
.p5-dimi-role { font-size: 0.58rem; color: var(--gold); }
.p5-dimi-bubble {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 9px 11px;
  background: rgba(61,26,94,0.3);
  border-radius: 8px;
  border-left: 2px solid var(--purple-vivid);
  font-style: italic;
}

/* Streak widget */
.p5-streak-big { font-size: 2rem; font-weight: 900; color: var(--text-primary); }
.p5-streak-fire { font-size: 1.1rem; }
.p5-streak-label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.p5-streak-flame-row { display: flex; gap: 4px; margin-top: 8px; }
.p5-flame { font-size: 0.9rem; opacity: 0.3; transition: opacity 0.3s; }
.p5-flame.lit { opacity: 1; }

/* ── Enhanced Continue Learning Card ──────────────────────────── */
.p5-continue-card {
  background: linear-gradient(135deg, rgba(61,26,94,0.55), rgba(12,12,22,0.75));
  border: 1px solid rgba(147,51,234,0.35);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.p5-continue-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-vivid), var(--gold), transparent);
  opacity: 0.6;
}
.p5-continue-card:hover {
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}
.p5-cc-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  position: relative;
}
.p5-cc-info { flex: 1; min-width: 0; }
.p5-cc-overtag { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.p5-cc-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p5-cc-next { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p5-cc-bar { height: 3px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.p5-cc-bar-fill { height: 100%; background: linear-gradient(90deg, var(--purple-vivid), var(--gold)); border-radius: 3px; transition: width 0.7s ease; }
.p5-cc-cta {
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--purple-vivid), var(--purple-bright));
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.p5-continue-card:hover .p5-cc-cta { opacity: 0.85; }

/* ── Cert Unlock Overlay ──────────────────────────────────────── */
#cert-unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#cert-unlock-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.p5-cu-box {
  width: min(420px, 92vw);
  background: linear-gradient(145deg, rgba(18,5,38,0.98), rgba(8,4,18,0.98));
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 22px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 0 80px rgba(201,168,76,0.15), 0 40px 80px rgba(0,0,0,0.7);
  transform: scale(0.82);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}
#cert-unlock-overlay.show .p5-cu-box { transform: scale(1); }
.p5-cu-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.p5-cu-star { font-size: 3.2rem; display: block; margin-bottom: 10px; animation: p5-star-pop 0.6s ease-out; }
@keyframes p5-star-pop {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.p5-cu-badge {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e8c84a);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(201,168,76,0.4);
}
.p5-cu-badge svg { fill: #1a0635; }
.p5-cu-headline { font-size: 1.45rem; font-weight: 900; color: var(--text-primary); margin-bottom: 5px; }
.p5-cu-cert-name { font-size: 1rem; font-weight: 700; color: var(--gold); margin-bottom: 14px; }
.p5-cu-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 28px; }
.p5-cu-actions { display: flex; gap: 10px; justify-content: center; }
.p5-cu-btn {
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.p5-cu-btn.primary { background: linear-gradient(135deg, var(--gold), #e8c84a); color: #1a0635; }
.p5-cu-btn.primary:hover { box-shadow: 0 4px 14px rgba(201,168,76,0.4); }
.p5-cu-btn.secondary { background: transparent; border: 1px solid rgba(255,255,255,0.12); color: var(--text-muted); }

/* Confetti particles */
.p5-confetti-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.p5-confetti-dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 2px;
  animation: p5-confetti-fall linear forwards;
}
@keyframes p5-confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(500px) rotate(720deg); opacity: 0; }
}

/* ── Level-Up Overlay ─────────────────────────────────────────── */
#level-up-overlay {
  position: fixed;
  bottom: 90px; right: 24px;
  z-index: 9400;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#level-up-overlay.show { opacity: 1; }
.p5-lu-box {
  background: linear-gradient(135deg, rgba(61,26,94,0.97), rgba(15,10,30,0.97));
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 18px 24px;
  text-align: center;
  box-shadow: 0 0 40px rgba(201,168,76,0.25);
  min-width: 180px;
  animation: p5-lu-bounce 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes p5-lu-bounce {
  from { transform: scale(0.5) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.p5-lu-tag { font-size: 0.55rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.p5-lu-number { font-size: 2.4rem; font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(201,168,76,0.6); line-height: 1; }
.p5-lu-title { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); margin-top: 4px; }

/* ── Luxury Product Drawer ────────────────────────────────────── */
#product-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: #0d0b12;
  border-left: 1px solid rgba(147,51,234,0.22);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 48px rgba(0,0,0,0.65);
}
#product-drawer.open { transform: translateX(0); }
#product-drawer::-webkit-scrollbar { width: 4px; }
#product-drawer::-webkit-scrollbar-thumb { background: var(--purple-mid, #3d1a5e); border-radius: 4px; }

.pd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: #0d0b12;
  z-index: 2;
}
.pd-header-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold, #c9a84c); }
.pd-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.pd-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.pd-gallery { padding: 18px 22px 0; flex-shrink: 0; }
.pd-main-wrap { width: 100%; aspect-ratio: 1/1; max-height: 260px; overflow: hidden; border-radius: 12px; background: rgba(0,0,0,0.35); }
.pd-main-img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.2s; }
.pd-thumbs { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 7px; cursor: pointer; border: 2px solid transparent; opacity: 0.55; transition: all 0.2s; }
.pd-thumb:hover, .pd-thumb.active { border-color: var(--purple, #7c3aed); opacity: 1; }

.pd-info { padding: 18px 22px 28px; flex: 1; }
.pd-badge-label {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(201,168,76,0.12); color: var(--gold, #c9a84c);
  border: 1px solid rgba(201,168,76,0.25); margin-bottom: 7px;
}
.pd-name { font-size: 1.15rem; font-weight: 800; color: #f5f0ff; line-height: 1.3; margin-bottom: 8px; }
.pd-pricing { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pd-price { font-size: 1.35rem; font-weight: 900; color: #f5f0ff; }
.pd-compare { font-size: 0.84rem; color: rgba(255,255,255,0.3); text-decoration: line-through; }
.pd-savings { font-size: 0.72rem; font-weight: 700; color: #7dd87d; padding: 2px 7px; background: rgba(74,170,74,0.1); border-radius: 5px; }
.pd-desc { font-size: 0.83rem; color: rgba(255,255,255,0.6); line-height: 1.65; margin-bottom: 12px; }
.pd-details-list { list-style: none; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.pd-details-list li { font-size: 0.78rem; color: rgba(255,255,255,0.5); display: flex; gap: 6px; align-items: flex-start; line-height: 1.4; }
.pd-details-list li::before { content: '✦'; color: var(--gold, #c9a84c); flex-shrink: 0; }
.pd-availability { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; margin-bottom: 12px; }
.pd-avail-dot { width: 6px; height: 6px; border-radius: 50%; background: #4aaa4a; flex-shrink: 0; }
.pd-avail-text { color: rgba(255,255,255,0.5); }
.pd-low-stock { font-size: 0.75rem; color: #f0c05a; padding: 5px 9px; background: rgba(240,192,90,0.08); border: 1px solid rgba(240,192,90,0.2); border-radius: 6px; margin-bottom: 12px; }
.pd-out-stock { font-size: 0.8rem; font-weight: 700; color: rgba(255,107,107,0.8); padding: 9px 12px; background: rgba(255,107,107,0.06); border: 1px solid rgba(255,107,107,0.18); border-radius: 7px; text-align: center; margin-bottom: 12px; }
.pd-size-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 7px; }
.pd-size-btns { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-size-btn { padding: 6px 13px; border-radius: 7px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.65); font-size: 0.78rem; cursor: pointer; transition: all 0.2s; }
.pd-size-btn:hover { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.4); }
.pd-size-btn.selected { background: rgba(124,58,237,0.2); border-color: var(--purple, #7c3aed); color: #fff; }
.pd-size-hint { display:none; color:#f87171; font-size:.72rem; margin-bottom:10px; }
.pd-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pd-qty-wrap { display: flex; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.pd-qty-btn { width: 34px; height: 38px; background: transparent; border: none; color: rgba(255,255,255,0.65); font-size: 1.05rem; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.pd-qty-btn:hover { background: rgba(255,255,255,0.09); }
.pd-qty-val { width: 32px; text-align: center; font-size: 0.88rem; font-weight: 700; color: #fff; border-left: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); }
.pd-atc-btn { flex: 1; padding: 10px 18px; background: linear-gradient(135deg, #7c3aed, #9333ea); color: #fff; border: none; border-radius: 8px; font-size: 0.83rem; font-weight: 700; cursor: pointer; transition: all 0.2s; letter-spacing: 0.03em; }
.pd-atc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(124,58,237,0.4); }
.pd-wishlist-btn { width: 40px; height: 40px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: rgba(255,255,255,0.45); cursor: pointer; font-size: 1rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pd-wishlist-btn:hover, .pd-wishlist-btn.wishlisted { background: rgba(183,110,121,0.14); border-color: rgba(183,110,121,0.35); color: #e8a0b0; }
.pd-shipping-note { margin-top: 10px; padding: 9px 11px; background: rgba(201,168,76,0.05); border: 1px solid rgba(201,168,76,0.12); border-radius: 7px; font-size: 0.72rem; color: rgba(255,255,255,0.45); display: flex; align-items: center; gap: 7px; }

/* Related products */
.pd-related { padding: 14px 22px 28px; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.pd-related-title { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 10px; }
.pd-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.pd-rel-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 9px; padding: 9px; cursor: pointer; transition: all 0.2s; }
.pd-rel-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(124,58,237,0.3); }
.pd-rel-img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 5px; background: rgba(0,0,0,0.2); margin-bottom: 5px; }
.pd-rel-name { font-size: 0.68rem; color: rgba(255,255,255,0.65); font-weight: 600; line-height: 1.3; }
.pd-rel-price { font-size: 0.65rem; color: var(--gold, #c9a84c); font-weight: 700; margin-top: 2px; }

/* ── Admin Dashboard Insights Strip ──────────────────────────── */
.p5-insights-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.p5-insight-pill {
  background: linear-gradient(135deg, rgba(61,26,94,0.35), rgba(15,10,30,0.5));
  border: 1px solid rgba(147,51,234,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}
.p5-insight-pill:hover { border-color: rgba(147,51,234,0.4); }
.p5-ip-icon { font-size: 1.1rem; flex-shrink: 0; }
.p5-ip-val { font-size: 1.1rem; font-weight: 800; color: var(--text-primary, #f5f0ff); line-height: 1; }
.p5-ip-label { font-size: 0.6rem; font-weight: 600; color: var(--text-muted, #7a6a90); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.p5-ip-trend { font-size: 0.62rem; margin-top: 2px; }
.p5-ip-trend.up { color: #66bb6a; }
.p5-ip-trend.down { color: #f06060; }

/* ── Micro-interactions ───────────────────────────────────────── */
.acad-lesson-view { transition: opacity 0.22s ease; }
.acad-lesson-view.fade-in { animation: p5-fade-in 0.28s ease forwards; }
@keyframes p5-fade-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.p5-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: p5-shimmer 1.6s infinite;
  border-radius: 6px;
}
@keyframes p5-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Course header upgrade */
.p5-course-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.p5-course-path-tag { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 5px; }
.p5-course-title { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.p5-course-meta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.p5-course-meta-item { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.p5-course-progress-bar { height: 4px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.p5-course-prog-fill { height: 100%; background: linear-gradient(90deg, var(--purple-vivid), var(--gold)); border-radius: 4px; transition: width 0.6s ease; }

/* Mobile responsive */
@media (max-width: 600px) {
  #product-drawer { width: 100vw; border-left: none; }
  .p5-lesson-grid { grid-template-columns: 1fr; }
  #dash-widgets-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .p5-continue-card { flex-wrap: wrap; }
  .p5-cc-cta { width: 100%; text-align: center; }
  #level-up-overlay { bottom: 70px; right: 12px; }
  .p5-cu-box { padding: 32px 22px; }
}
@media (max-width: 400px) {
  #dash-widgets-row { grid-template-columns: 1fr; }
}
