/* ==========================================================================
   Open Minds Academy — Pro Upgrade Stylesheet (v58)
   Covers:
     1. Pro Player (.pl-*)
     2. Wishlist & Real Reviews (.wl-*, .rev-*)
     3. Certificate QR & Social Share (.cert-qr-*, .cert-share-*, .btn-wa, .btn-li)
     4. Modernized Instructor & Admin Dashboards (.stf-*)
   Performance & Quality:
     - Solid crisp surfaces, zero heavy compositing filters, zero continuous loops
     - Responsive desktop, tablet (<=1024px), mobile (<=640px)
     - RTL-safe logical properties & @media print rules
   ========================================================================== */

:root {
  --pro-accent: var(--u-purple, #6d28d9);
  --pro-accent-h: var(--u-purple-h, #5b21b6);
  --pro-accent-soft: var(--u-purple-soft, rgba(109, 40, 217, 0.08));
  --pro-accent-ring: rgba(109, 40, 217, 0.24);
  --pro-surface: var(--surface, #ffffff);
  --pro-paper: var(--paper, #f8fafc);
  --pro-border: var(--line, #e2e8f0);
  --pro-ink: var(--ink, #0f172a);
  --pro-text: var(--text, #1e293b);
  --pro-muted: var(--muted, #475569);
  --pro-muted-2: var(--muted-2, #94a3b8);
  --pro-green: var(--green, #15803d);
  --pro-gold: #f59e0b;
  --pro-red: var(--red, #dc2626);
  --pro-pink: #e11d48;
  --pro-wa: #16a34a;
  --pro-wa-h: #15803d;
  --pro-li: #0a66c2;
  --pro-li-h: #004182;
}

/* ==========================================================================
   1. Pro Player (.pl-*)
   ========================================================================== */

.pl-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-block-start: 10px;
  padding: 10px 14px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #1e293b;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  text-align: start;
}

.pl-bar *,
.pl-bar *::before,
.pl-bar *::after {
  box-sizing: border-box;
}

.pl-bar-group,
.pl-group,
.pl-left,
.pl-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.pl-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.pl-btn:hover {
  background: #334155;
  border-color: #475569;
  color: #ffffff;
}

.pl-btn:active {
  transform: translateY(1px);
}

.pl-btn:focus-visible,
.pl-speed:focus-visible,
.pl-note-ts:focus-visible {
  outline: 2px solid var(--pro-accent);
  outline-offset: 2px;
}

.pl-btn.on,
.pl-btn.is-on,
.pl-btn[aria-pressed="true"],
.pl-btn-primary,
.pl-btn-accent {
  background: var(--pro-accent);
  border-color: #7c3aed;
  color: #ffffff;
}

.pl-btn.on:hover,
.pl-btn.is-on:hover,
.pl-btn[aria-pressed="true"]:hover,
.pl-btn-primary:hover,
.pl-btn-accent:hover {
  background: var(--pro-accent-h);
  border-color: var(--pro-accent);
}

.pl-btn-ghost {
  background: transparent;
  border-color: #475569;
  color: #cbd5e1;
}

.pl-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pl-btn-note {
  background: rgba(109, 40, 217, 0.22);
  border-color: rgba(167, 139, 250, 0.4);
  color: #ede9fe;
}

.pl-btn-note:hover {
  background: var(--pro-accent);
  border-color: #7c3aed;
  color: #ffffff;
}

.pl-speed-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.pl-speed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.pl-speed:hover {
  background: #334155;
  border-color: #64748b;
}

.pl-speed option {
  background: #0f172a;
  color: #f8fafc;
}

.pl-time,
.pl-kbd-hint {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 5-second Autoplay Next Lesson Countdown Overlay */
.pl-autoplay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: rgba(9, 17, 36, 0.9);
  color: #f8fafc;
  text-align: center;
  border-radius: inherit;
}

.pl-ap-card,
.pl-autoplay-card {
  width: 100%;
  max-width: 390px;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pl-ap-kicker,
.pl-autoplay-kicker,
.pl-autoplay-cd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.24);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #ddd6fe;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pl-ap-sec {
  color: #ffffff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pl-autoplay h3,
.pl-autoplay h4,
.pl-ap-title,
.pl-autoplay-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.pl-autoplay p,
.pl-autoplay-sub {
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.45;
  margin: 0;
}

.pl-autoplay-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
}

.pl-autoplay-bar > i,
.pl-autoplay-bar > span {
  display: block;
  height: 100%;
  background: var(--pro-accent);
  border-radius: inherit;
  transition: width 0.25s linear;
}

.pl-ap-actions,
.pl-autoplay-acts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-block-start: 4px;
  width: 100%;
}

.pl-ap-actions .btn,
.pl-ap-actions .pl-btn,
.pl-autoplay-acts .btn,
.pl-autoplay-acts .pl-btn {
  min-height: 40px;
  padding-inline: 16px;
}

/* Clickable Timestamped Notes */
.pl-notes-ts,
.pl-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-note-line,
.pl-note-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  background: var(--pro-paper);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  text-align: start;
}

.pl-note-txt,
.pl-note-body {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--pro-text);
  line-height: 1.5;
  word-break: break-word;
}

.pl-note-ts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pro-accent-soft);
  border: 1px solid rgba(109, 40, 217, 0.25);
  color: var(--pro-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}

.pl-note-ts:hover {
  background: var(--pro-accent);
  border-color: var(--pro-accent-h);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Theater / Focus Expanded Layout */
.pl-theater,
.as-layout.pl-theater,
.pl-theater .as-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 100%;
}

.pl-theater .as-stage,
.pl-theater .as-main,
.pl-theater .as-video {
  max-width: 100%;
  width: 100%;
}

.pl-theater video,
.pl-theater .as-video video {
  max-height: 76vh;
  width: 100%;
  background: #020617;
}

.pl-theater .as-side,
.pl-theater .as-curriculum {
  max-width: 100%;
}

/* ==========================================================================
   2. Wishlist (.wl-*) & Real Course Reviews (.rev-*)
   ========================================================================== */

.wl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--pro-border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--pro-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.wl-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.14s ease, fill 0.14s ease;
}

.wl-btn:hover {
  transform: scale(1.06);
  background: #fff1f2;
  border-color: #fda4af;
  color: var(--pro-pink);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.16);
}

.wl-btn:active {
  transform: scale(0.95);
}

.wl-btn:focus-visible {
  outline: 2px solid var(--pro-pink);
  outline-offset: 2px;
}

.wl-btn.on,
.wl-btn.is-on,
.wl-btn[aria-pressed="true"] {
  background: #fff1f2;
  border-color: #fb7185;
  color: var(--pro-pink);
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.2);
}

.wl-btn.on svg,
.wl-btn.is-on svg,
.wl-btn[aria-pressed="true"] svg {
  fill: currentColor;
  stroke: currentColor;
}

/* Floating wishlist heart inside course cards */
.u-card .wl-btn,
.c-card .wl-btn,
.course-card .wl-btn,
.wl-btn.wl-float {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  z-index: 4;
  width: 36px;
  padding: 0;
}

/* Inline wishlist button on course detail page */
.detail-hero .wl-btn,
.detail-body .wl-btn,
.wl-btn.wl-inline,
.wl-btn.wl-pill {
  position: static;
  width: auto;
  height: 42px;
  padding-inline: 16px;
  border-radius: 12px;
}

/* Real Reviews Section */
.rev-wrap {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--sh-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: start;
}

.rev-wrap *,
.rev-wrap *::before,
.rev-wrap *::after {
  box-sizing: border-box;
}

.rev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rev-head h2,
.rev-head h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--pro-ink);
  margin: 0;
}

.rev-summary {
  display: flex;
  align-items: center;
  gap: 20px 28px;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: var(--pro-paper);
  border: 1px solid var(--pro-border);
  border-radius: 14px;
}

.rev-score-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 110px;
}

.rev-score,
.rev-avg {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: var(--pro-ink);
  font-variant-numeric: tabular-nums;
}

.rev-count,
.rev-total {
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-muted);
}

.rev-summary-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--pro-gold);
  font-size: 18px;
  line-height: 1;
}

.rev-bars {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rev-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pro-muted);
}

.rev-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.rev-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--pro-gold);
}

/* Interactive Star Picker */
.rev-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rev-stars button,
.rev-star-btn,
.rev-star {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease, transform 0.12s ease, background-color 0.12s ease;
}

.rev-stars button:hover,
.rev-star-btn:hover,
.rev-star:hover {
  color: var(--pro-gold);
  background: rgba(245, 158, 11, 0.1);
  transform: scale(1.1);
}

.rev-stars button.on,
.rev-stars button.is-on,
.rev-stars button.active,
.rev-stars button[aria-checked="true"],
.rev-star-btn.on,
.rev-star-btn.is-on,
.rev-star-btn.active,
.rev-star.on,
.rev-star.is-on,
.rev-star.active {
  color: var(--pro-gold);
}

.rev-stars button:focus-visible,
.rev-star-btn:focus-visible,
.rev-star:focus-visible {
  outline: 2px solid var(--pro-accent);
  outline-offset: 2px;
}

.rev-nota-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--pro-muted);
  margin-inline-start: 6px;
}

/* Review Form */
.rev-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: #f5f3ff;
  border: 1px solid rgba(109, 40, 217, 0.2);
  border-radius: 14px;
}

.rev-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rev-field-lbl,
.rev-form-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pro-ink);
}

.rev-form textarea,
.rev-coment {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: var(--pro-surface);
  color: var(--pro-text);
  font-size: 14.5px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.rev-form textarea:focus,
.rev-coment:focus {
  outline: none;
  border-color: var(--pro-accent);
  box-shadow: 0 0 0 3px var(--pro-accent-ring);
}

.rev-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rev-form .btn-p {
  background: var(--pro-accent);
  border-color: var(--pro-accent-h);
  box-shadow: 0 2px 0 var(--pro-accent-h);
}

.rev-form .btn-p:hover {
  background: var(--pro-accent-h);
}

.rev-form-locked {
  padding: 14px 16px;
  background: var(--pro-paper);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--pro-muted);
}

/* Review List & Cards */
.rev-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rev-item {
  padding: 16px 18px;
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rev-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rev-item-author,
.rev-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--pro-ink);
}

.rev-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--pro-accent-soft);
  color: var(--pro-accent);
  font-size: 14px;
  font-weight: 800;
}

.rev-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--pro-ink);
}

.rev-date {
  font-size: 12px;
  color: var(--pro-muted-2);
  display: block;
}

.rev-item-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--pro-gold);
  font-size: 15px;
  font-weight: 800;
}

.rev-item-text,
.rev-text,
.rev-item p {
  font-size: 14.5px;
  color: var(--pro-text);
  line-height: 1.55;
  margin: 0;
  word-break: break-word;
}

.rev-empty {
  padding: 20px;
  text-align: center;
  color: var(--pro-muted);
  font-size: 14px;
  background: var(--pro-paper);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

/* ==========================================================================
   3. Certificate QR & Social Share (.cert-qr-*, .cert-share-*, .btn-wa, .btn-li)
   ========================================================================== */

.cert-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  margin-block-start: 18px;
  padding: 16px 20px;
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  text-align: start;
}

.cert-share-bar *,
.cert-share-bar *::before,
.cert-share-bar *::after {
  box-sizing: border-box;
}

.cert-qr-box {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--pro-paper);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  min-width: 0;
}

.cert-qr-frame {
  display: inline-flex;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--pro-border);
  border-radius: 10px;
  flex: none;
}

.cert-qr-box svg,
.cert-qr-svg {
  display: block;
  flex: none;
  background: #ffffff;
  border-radius: 6px;
}

.cert-qr-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cert-qr-tag,
.cert-qr-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pro-accent);
}

.cert-qr-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--pro-ink);
  word-break: break-all;
}

.cert-qr-hint {
  font-size: 12px;
  color: var(--pro-muted);
  line-height: 1.4;
}

.cert-share-actions,
.cert-share-acts,
.cert-share-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--pro-wa);
  color: #ffffff;
  border: 2px solid var(--pro-wa-h);
  box-shadow: 0 2px 0 var(--pro-wa-h);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-wa:hover {
  background: var(--pro-wa-h);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #166534;
}

.btn-wa:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--pro-li);
  color: #ffffff;
  border: 2px solid var(--pro-li-h);
  box-shadow: 0 2px 0 var(--pro-li-h);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-li:hover {
  background: var(--pro-li-h);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #002d5a;
}

.btn-li:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-wa svg,
.btn-li svg,
.cert-btn-png svg,
.cert-btn-print svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ==========================================================================
   4. Modernized Instructor & Admin Dashboards (.stf-*)
      Harmonizes with .stu-* and white/violet (#6d28d9) palette
   ========================================================================== */

.stf-wrap {
  --stf-accent: var(--u-purple, #6d28d9);
  --stf-accent-h: var(--u-purple-h, #5b21b6);
  --stf-accent-soft: var(--u-purple-soft, rgba(109, 40, 217, 0.08));
  --stf-border: var(--line, #e2e8f0);
  --stf-surface: var(--surface, #ffffff);
  --stf-paper: var(--paper, #f8fafc);
  --stf-ink: var(--ink, #0f172a);
  --stf-text: var(--text, #1e293b);
  --stf-muted: var(--muted, #475569);
  --stf-muted-2: var(--muted-2, #94a3b8);

  max-width: 1320px;
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: var(--stf-text);
  text-align: start;
}

.stf-wrap *,
.stf-wrap *::before,
.stf-wrap *::after {
  box-sizing: border-box;
}

/* Structural overflow guards */
.stf-kpis > *,
.stf-grid > *,
.stf-main-grid > *,
.stf-duo-grid > *,
.stf-courses-grid > *,
.stf-grid-2 > *,
.stf-grid-3 > *,
.stf-row > * {
  min-width: 0;
}

/* Brand violet button harmony inside .stf-wrap */
.stf-wrap .btn-p {
  background: var(--stf-accent);
  color: #ffffff;
  border-color: var(--stf-accent-h);
  box-shadow: 0 2px 0 var(--stf-accent-h);
}

.stf-wrap .btn-p:hover {
  background: var(--stf-accent-h);
  border-color: #4c1d95;
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #4c1d95;
}

.stf-wrap .btn-o {
  background: var(--stf-surface);
  color: var(--stf-ink);
  border-color: var(--stf-border);
  box-shadow: 0 1px 0 var(--stf-border);
}

.stf-wrap .btn-o:hover {
  border-color: var(--stf-accent);
  color: var(--stf-accent);
  background: var(--stf-accent-soft);
  box-shadow: 0 2px 0 rgba(109, 40, 217, 0.22);
}

.stf-wrap .chip-v {
  background: var(--stf-accent-soft);
  color: var(--stf-accent);
}

/* Header */
.stf-head {
  background: var(--stf-surface);
  border: 1px solid var(--stf-border);
  border-radius: var(--r-lg, 18px);
  padding: 22px 26px;
  box-shadow: var(--sh-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.stf-head-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.stf-eyebrow,
.stf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--stf-accent-soft);
  color: var(--stf-accent);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.stf-badge.is-ok,
.stf-pill.is-ok {
  background: rgba(21, 128, 61, 0.12);
  color: var(--pro-green);
}

.stf-badge.is-warn,
.stf-pill.is-warn {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.stf-badge.is-err,
.stf-pill.is-err {
  background: rgba(220, 38, 38, 0.12);
  color: var(--pro-red);
}

.stf-head h1 {
  font-family: var(--font-d, 'Inter', system-ui, sans-serif);
  font-size: 24px;
  font-weight: 800;
  color: var(--stf-ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

.stf-head p {
  font-size: 14px;
  color: var(--stf-muted);
  margin: 0;
  line-height: 1.5;
}

.stf-head-acts,
.stf-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* KPI Strip */
.stf-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stf-kpi {
  background: var(--stf-surface);
  border: 1px solid var(--stf-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--sh-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.stf-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 40, 217, 0.28);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.stf-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stf-kpi-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--stf-muted);
}

.stf-kpi-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--stf-accent-soft);
  color: var(--stf-accent);
}

.stf-kpi-ic svg {
  width: 18px;
  height: 18px;
}

.stf-kpi-ic.is-green {
  background: rgba(21, 128, 61, 0.1);
  color: var(--pro-green);
}

.stf-kpi-ic.is-amber {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.stf-kpi-ic.is-blue {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.stf-kpi-ic.is-red {
  background: rgba(220, 38, 38, 0.1);
  color: var(--pro-red);
}

.stf-kpi-val {
  font-family: var(--font-d, 'Inter', system-ui, sans-serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--stf-ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stf-kpi-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--stf-muted);
  line-height: 1.4;
}

.stf-kpi-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--stf-accent);
  margin-block-start: auto;
}

.stf-kpi-link:hover {
  color: var(--stf-accent-h);
  text-decoration: underline;
}

/* Main Dashboard Grid & Cards */
.stf-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stf-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stf-sec-h h2,
.stf-sec-h h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--stf-ink);
  margin: 0;
}

.stf-grid,
.stf-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.stf-duo-grid,
.stf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.stf-courses-grid,
.stf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stf-card {
  background: var(--stf-surface);
  border: 1px solid var(--stf-border);
  border-radius: var(--r-lg, 18px);
  padding: 20px 22px;
  box-shadow: var(--sh-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.stf-card-h,
.stf-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stf-card-h h2,
.stf-card-h h3,
.stf-card-head h2,
.stf-card-head h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--stf-ink);
  margin: 0;
}

.stf-card-sub {
  font-size: 13px;
  color: var(--stf-muted);
  margin: 0;
}

.stf-chart-box {
  position: relative;
  width: 100%;
  min-height: 220px;
}

.stf-chart-box canvas {
  width: 100% !important;
  height: auto;
}

.stf-legend {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--stf-muted);
}

/* Queues, Approval Lists, Live Rooms & Audit Rows */
.stf-queue {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  background: var(--stf-paper);
  border: 1px solid var(--stf-border);
  border-radius: 13px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.stf-row:hover {
  border-color: rgba(109, 40, 217, 0.28);
  background: #ffffff;
}

.stf-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.stf-thumb,
.stf-thumb-sm,
.stf-row-thumb {
  width: 56px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: #1e1b4b;
  border: 1px solid var(--stf-border);
}

.stf-thumb-sm {
  width: 44px;
  height: 32px;
}

.stf-row-text,
.stf-row-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stf-row-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--stf-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stf-meta,
.stf-row-meta {
  font-size: 12.5px;
  color: var(--stf-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stf-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--stf-muted-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stf-amount,
.stf-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--stf-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stf-row-act,
.stf-row-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}

/* Status Pills & Instructor Course Cards */
.stf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  background: var(--stf-accent-soft);
  color: var(--stf-accent);
}

.stf-course {
  background: var(--stf-paper);
  border: 1px solid var(--stf-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.stf-course:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 40, 217, 0.3);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.stf-course-top {
  position: relative;
  overflow: hidden;
}

.stf-course-img,
.stf-course-top img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: #1e1b4b;
}

.stf-course-info,
.stf-course-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.stf-course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.stf-course-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--stf-ink);
  line-height: 1.3;
  margin: 0;
}

.stf-course-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--stf-muted);
  margin-block-start: auto;
}

.stf-course-act {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-block-start: 4px;
}

.stf-prog {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stf-prog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--stf-muted);
}

.stf-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--stf-muted);
  font-size: 13.5px;
  background: var(--stf-paper);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

/* ==========================================================================
   5. Responsive Breakpoints (<= 1024px & <= 640px)
   ========================================================================== */

@media (max-width: 1024px) {
  .stf-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stf-grid,
  .stf-main-grid,
  .stf-duo-grid,
  .stf-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .stf-courses-grid,
  .stf-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pl-bar {
    padding: 10px;
    gap: 8px;
  }

  .pl-btn,
  .pl-speed {
    min-height: 44px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .pl-ap-card,
  .pl-autoplay-card {
    padding: 18px 16px;
  }

  .rev-wrap {
    padding: 16px;
    gap: 16px;
  }

  .rev-summary {
    padding: 14px;
    gap: 14px;
  }

  .rev-score,
  .rev-avg {
    font-size: 32px;
  }

  .rev-stars button,
  .rev-star-btn,
  .rev-star {
    min-width: 44px;
    min-height: 44px;
  }

  .cert-share-bar {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .cert-qr-box {
    width: 100%;
  }

  .cert-share-actions,
  .cert-share-acts,
  .cert-share-btns {
    width: 100%;
  }

  .cert-share-actions > *,
  .cert-share-acts > *,
  .cert-share-btns > * {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }

  .stf-head {
    padding: 16px;
  }

  .stf-head h1 {
    font-size: 20px;
  }

  .stf-head-acts,
  .stf-actions {
    width: 100%;
  }

  .stf-head-acts .btn,
  .stf-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }

  .stf-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stf-kpi {
    padding: 14px;
  }

  .stf-kpi-val {
    font-size: 21px;
  }

  .stf-courses-grid,
  .stf-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .stf-card {
    padding: 16px;
  }

  .stf-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .stf-row-act,
  .stf-row-acts {
    width: 100%;
    justify-content: flex-end;
  }

  .stf-row-act .btn,
  .stf-row-acts .btn {
    min-height: 40px;
  }
}

/* ==========================================================================
   6. Reduced Motion & Print Media Rules (Certificates)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .pl-btn,
  .pl-note-ts,
  .wl-btn,
  .wl-btn svg,
  .rev-star,
  .rev-star-btn,
  .rev-stars button,
  .btn-wa,
  .btn-li,
  .stf-kpi,
  .stf-row,
  .stf-course {
    transition: none !important;
    transform: none !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .page-h,
  .cert-acts,
  .cert-share-actions,
  .cert-share-acts,
  .cert-share-btns,
  .btn-wa,
  .btn-li,
  .no-print {
    display: none !important;
  }

  body,
  .shell,
  .main,
  .content {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .cert-slot,
  .cert {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cert-share-bar {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    margin-block-start: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .cert-qr-box {
    background: #ffffff !important;
    border-color: #94a3b8 !important;
  }
}
