/* =========================
   YekanBakh Font (Local)
   ========================= */
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh/YekanBakh-Bold.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

.stkex-app,
.stkex-exam-cards {
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial !important;
}

.stkex-app{
  direction: rtl;
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial !important;
}
.stkex-box{ padding:14px 16px;
   border:1px solid #eee;
  border-radius:14px;
  background:#fff;
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial !important;
  }

.stkex-hero{
  display:flex; justify-content:space-between; gap:16px; align-items:center;
  padding:16px; border-radius:18px;
  background: linear-gradient(135deg, #111827, #1f2937);
  color:#fff;
  max-width: 920px;
  margin: 30px auto;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
}
.stkex-hero h2{ margin:0 0 6px; font-size:20px; }
.stkex-sub{ margin:0; opacity:.85; font-size:13px; }

.stkex-timer{
  text-align:center; padding:10px 14px; border-radius:16px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  min-width: 120px;
}
.stkex-timer-label{ display:block; font-size:12px; opacity:.85; }
.stkex-timer-val{ display:block; font-size:22px; font-weight:800; letter-spacing:1px; }

.stkex-card{
  background:#fff; border:1px solid #edf2f7; border-radius:18px;
  padding:16px; box-shadow: 0 10px 26px rgba(17,24,39,0.06);
  margin-bottom:14px;
}

.stkex-rules{ margin:10px 0 16px; padding:0 18px 0 0; color:#374151; }
.stkex-rules li{ margin:6px 0; }

.stkex-btn{
  border:1px solid #e5e7eb; background:#fff; color:#111827;
  border-radius:14px; padding:10px 14px; cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
}
.stkex-btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 22px rgba(17,24,39,0.10); }
.stkex-btn:active{ transform: translateY(0px) scale(0.99); }

.stkex-btn-primary{
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: transparent; color:#fff; font-weight:700;
}
.stkex-btn-danger{
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-color: transparent; color:#fff; font-weight:700;
}
.stkex-btn-soft{
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  border-color: transparent;
  color:#fff;
  font-weight:800;
}
#stkexMark.is-active{
  filter: saturate(1.2);
  box-shadow: 0 16px 34px rgba(14,165,233,0.22);
}

.hide{ display:none !important; }

/* =========================
   Header nav
   ========================= */
.stkex-nav{
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding-bottom:12px; margin-bottom:12px; border-bottom:1px dashed #e5e7eb;
}
.stkex-progress{ font-weight:800; color:#ffffff; }
.stkex-actions{ display:flex; gap:8px; flex-wrap:wrap; }

/* =========================
   Layout
   ========================= */
.stkex-layout{
  display:grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap:12px;
  align-items:start;
}
@media (max-width: 980px){
  .stkex-layout{ grid-template-columns: 1fr; }
  .stkex-side{ order: -1; }
}

/* =========================
   Sidebar
   ========================= */
.stkex-side-card{
  background:#fff;
  border:1px solid #edf2f7;
  border-radius:18px;
  padding:12px;
  box-shadow: 0 10px 26px rgba(17,24,39,0.06);
  position: sticky;
  top: 14px;
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial !important;
}
.stkex-side-title{
  font-weight:900;
  margin-bottom:10px;
  color:#111827;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.stkex-legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
  color:#6b7280;
  font-size:12px;
}
.stkex-leg{ display:flex; align-items:center; gap:6px; }
.dot{ width:10px; height:10px; border-radius:999px; display:inline-block; }
.dot-cur{ background:#6366f1; }
.dot-ans{ background:#22c55e; }
.dot-blank{ background:#e5e7eb; }
.dot-mark{ background:#f59e0b; }

.stkex-stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:8px;
  margin: 10px 0 10px;
}
.stkex-stat{
  border:1px solid #eef2ff;
  background: #f8fafc;
  border-radius:16px;
  padding:10px 10px;
  text-align:center;
}
.stkex-stat span{ display:block; font-size:12px; color:#6b7280; margin-bottom:4px; }
.stkex-stat b{ font-size:18px; color:#111827; }

.stkex-jumps{
  display:flex;
  gap:8px;
  margin-bottom:10px;
}
.stkex-btn-mini{
  padding:8px 10px;
  border-radius:14px;
  font-weight:800;
  font-size:12px;
}

/* =========================
   Palette
   ========================= */
.stkex-palette{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:8px;
}
@media (max-width: 980px){
  .stkex-palette{ grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .stkex-pbtn{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    line-height: 1 !important;
    text-align: center !important;

    min-height: 44px;
    aspect-ratio: 1 / 1;
    padding: 0 !important;
  }
  .stkex-palette{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.stkex-pbtn{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  padding:10px 0;
  font-weight:900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
}
.stkex-pbtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17,24,39,0.10);
  border-color:#c7d2fe;
}

/* statuses */
.stkex-pbtn.is-blank{ background:#fff; }
.stkex-pbtn.is-ans{
  border-color:#22c55e;
  box-shadow: 0 14px 28px rgba(34,197,94,0.16);
}
.stkex-pbtn.is-mark{
  border-color:#f59e0b;
  box-shadow: 0 14px 28px rgba(245,158,11,0.16);
}
.stkex-pbtn.is-cur{
  border-color:#6366f1;
  box-shadow: 0 16px 34px rgba(99,102,241,0.20);
  transform: translateY(-1px);
}

.stkex-btn.is-disabled{
  opacity: .55;
  pointer-events: none;
}

/* =========================
   Booklet Tabs (اگر HTML داری)
   ========================= */
.stkex-booklets{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.stkex-btab{
  border:1px solid #e5e7eb;
  background:#fff;
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:12px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.stkex-btab:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17,24,39,0.10);
}
.stkex-btab.is-active{
  background:#111827;
  color:#fff;
  border-color:#111827;
}
.stkex-btab.is-disabled{
  opacity:.45;
  pointer-events:none;
}

/* =========================
   PDF + AnswerSheet layout
   ========================= */
.stkex-qarea-wrap{
  display:grid;
  grid-template-columns: 1fr 0.95fr;
  gap:12px;
  align-items:start;
}
@media (max-width: 980px){
  .stkex-qarea-wrap{
    grid-template-columns: 1fr;
  }
}

/* PDF column */
#stkexPdfCol{
  background:#fff;
  border:1px solid #edf2f7;
  border-radius:18px;
  padding:12px;
  box-shadow: 0 10px 26px rgba(17,24,39,0.06);
}

/* ✅ هماهنگ با کلاس‌های خروجی PHP */
.stkex-pdfhead,
.stkex-pdf-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.stkex-pdftitle,
.stkex-pdf-title{
  font-weight:900;
  color:#111827;
}

#stkexPdfSelect{
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
  font-weight:800;
  font-size:12px;
  outline:none;
}

#stkexPdfFrame{
  width:100%;
  height: 92vh;
  border:1px solid #eef2ff;
  border-radius:16px;
  overflow:hidden;
  background:#f8fafc;
}
@media (max-width: 980px){
  #stkexPdfFrame{ height: 60vh; }
}

/* ✅ PDF موبایل (Canvas) */
#stkexPdfMobile{
  width:100%;
  height:60vh;
  overflow:auto;
  border:1px solid #eef2ff;
  border-radius:16px;
  background:#f8fafc;
  -webkit-overflow-scrolling: touch;
}
#stkexPdfMobile canvas{
  display:block !important;
  max-width:100% !important;
  height:auto !important;
  margin:10px auto !important;
  border-radius:12px;
  background:#fff;
}

/* =========================
   AnswerSheet (لیستی)
   ========================= */
.stkex-as{
  background:#fff;
  border:1px solid #edf2f7;
  border-radius:18px;
  padding:12px;
  box-shadow: 0 10px 26px rgba(17,24,39,0.06);
}
.stkex-as-head{
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px dashed #e5e7eb;
}
.stkex-as-title{
  font-weight:900;
  color:#111827;
  margin-bottom:4px;
}
.stkex-as-sub{
  font-size:12px;
  color:#6b7280;
}

.stkex-as-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:8px;
  max-height: 72vh;
  overflow:auto;
  padding-right:4px;
}
@media (max-width: 980px){
  .stkex-as-grid{ max-height: 60vh; }
}

/* one row */
.stkex-as-row{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:16px;
  padding:10px 10px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.stkex-as-row:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(17,24,39,0.08);
  border-color:#c7d2fe;
}
.stkex-as-row.is-cur{
  border-color:#6366f1;
  box-shadow: 0 16px 34px rgba(99,102,241,0.16);
}
.stkex-as-row.is-disabled{
  opacity:.55;
  pointer-events:none;
}

/* number + mark */
.stkex-as-no{
  display:flex;
  align-items:center;
  gap:8px;
  min-width: 68px;
}
.stkex-as-no .n{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#111827;
  background:#f3f4f6;
}
.stkex-as-mark{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:12px;
  width:34px;
  height:34px;
  cursor:pointer;
  font-weight:900;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
}
.stkex-as-mark:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17,24,39,0.10);
  border-color:#fde68a;
}
.stkex-as-mark.is-active{
  background:#f59e0b;
  border-color:#f59e0b;
  color:#111827;
  box-shadow: 0 14px 28px rgba(245,158,11,0.20);
}

/* choices */
.stkex-as-choices{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-start;
}
.stkex-as-choice{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  padding:9px 12px;
  min-width:44px;
  font-weight:900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
}
.stkex-as-choice:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17,24,39,0.10);
  border-color:#c7d2fe;
}
.stkex-as-choice.is-selected{
  border-color:#22c55e;
  box-shadow: 0 14px 28px rgba(34,197,94,0.18);
}
.stkex-as-choice:disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
}

.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-confirm,
.swal2-cancel {
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, Arial !important;
}

/* =========================
   (Optional) old question styles fallback
   ========================= */
.stkex-qhead{ margin-bottom:12px; }
.stkex-qnum{ font-weight:800; color:#4f46e5; margin-bottom:6px; }
.stkex-qtitle{ font-size:16px; line-height:1.9; color:#111827; }

.stkex-choices{ display:grid; grid-template-columns: 1fr; gap:10px; }
.stkex-choice{
  text-align:right;
  display:flex; gap:10px; align-items:center;
  width:100%;
  border-radius:16px; border:1px solid #e5e7eb;
  padding:12px 12px;
  background: #fff;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.stkex-choice:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(17,24,39,0.10); border-color:#c7d2fe; }
.stkex-choice.is-selected{
  border-color:#6366f1;
  box-shadow: 0 16px 34px rgba(99,102,241,0.18);
}
.stkex-choice.is-saving{ opacity:.75; pointer-events:none; }

.stkex-badge{
  width:34px; height:34px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-weight:900; color:#111827;
  background: #f3f4f6;
}
.stkex-ctext{ color:#111827; line-height:1.8; }
.stkex-hint{ margin-top:10px; font-size:12px; color:#6b7280; }
.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-confirm,
.swal2-cancel {
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, Arial !important;
}

/* ===============================
   STKEX – Answer Sheet List UI
================================ */

.stkex-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  margin: 30px auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  max-width: 920px;
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, Arial !important;
}

.stkex-card h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
  color: #111827;
}

.stkex-card .stkex-desc {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

/* ===== Table ===== */

.stkex-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, Arial !important;
}

.stkex-card thead th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 800;
  padding: 12px;
  text-align: center;
  border-bottom: 2px solid #e5e7eb;
}

.stkex-card tbody td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.stkex-card tbody tr:hover {
  background: #f9fafb;
}

/* ===== Button ===== */

.stkex-card a.button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff !important;
  transition: all 0.25s ease;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.stkex-card a.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

/* ===== Disabled / Not Uploaded ===== */

.stkex-card .stkex-disabled {
  color: #9ca3af;
  font-size: 13px;
}

/* ===== Responsive ===== */

@media (max-width: 640px) {
  .stkex-card {
    padding: 16px;
  }

  .stkex-card h3 {
    font-size: 18px;
  }

  .stkex-card table {
    font-size: 13px;
  }

  .stkex-card a.button {
    padding: 7px 12px;
    font-size: 12px;
  }
}

.stkex-report-cards,
.stkex-report-cards * {
  font-family: "YekanBakh", ui-sans-serif, system-ui, -apple-system, Arial !important;
}

/* =========================
   Exam Cards Typography Fix
   (override inline styles)
   ========================= */

.stkex-exam-cards{
  font-size: 16px;
  line-height: 1.9;
}

/* عنوان کارت (inline: font-size:16px) */
.stkex-exam-cards [style*="font-weight:900"][style*="font-size:16px"]{
  font-size: 18px !important;
  line-height: 1.6 !important;
}

/* متن جزئیات کارت (inline: font-size:13px) */
.stkex-exam-cards [style*="font-size:13px"]{
  font-size: 15px !important;
  line-height: 2 !important;
}

/* badge وضعیت (inline: font-size:12px) */
.stkex-exam-cards [style*="font-size:12px"][style*="border-radius:999px"]{
  font-size: 13px !important;
}

/* ID پایین کارت (inline: font-size:12px) */
.stkex-exam-cards [style*="font-size:12px"][style*="background:#f3f4f6"]{
  font-size: 13px !important;
}

/* دکمه شروع آزمون (inline: font-size:13px) */
.stkex-exam-cards a[style*="background:#111827"][style*="font-size:13px"]{
  font-size: 14px !important;
  padding: 11px 16px !important;
}

/* =========================================================
   REPORT / OMR (Answer Sheet) Final Fixes
   - A/B/C/D -> 1/2/3/4
   - Mobile: icon center + overflow-safe
   - Desktop: ONLY when >25 rows => 2 columns, 25 each column
   ========================================================= */

/* 1) A/B/C/D -> 1/2/3/4 (CSS-only) */
.omr-opt .t{
  font-size: 0 !important;
}
.omr-opt[title="A"] .t::before{ content:"1"; }
.omr-opt[title="B"] .t::before{ content:"2"; }
.omr-opt[title="C"] .t::before{ content:"3"; }
.omr-opt[title="D"] .t::before{ content:"4"; }

.omr-opt .t::before{
  font-size: 13px !important;
  font-weight: 900;
  line-height: 1;
  display: inline-block;
}

/* 2) Mobile: prevent last option overflow + center the red X/check icon */
/* فقط موبایل/تبلت */
@media (max-width: 991px){
  .omr-opts{
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .omr-opt{
    min-width: 0 !important;
    justify-content: center !important;
  }
}

.omr-row{ min-width: 0; }

/* آیکن ضربدر/تیک (همون span.i که تو HTML داری) دقیقاً وسط بیفته */
.omr-opt .i{
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  pointer-events: none;
}

/* فاصله‌ی کافی برای تداخل نداشتن متن عدد و آیکن */
.omr-opt .t::before{
  padding-left: 0 !important;
}

/* 3) Desktop: conditional 2-column layout ONLY when JS adds .omr-two-col */
@media (min-width: 992px){
  .omr-wrap.omr-two-col{
    display: grid !important;
    grid-auto-flow: column !important;               /* پر کردن ستونی */
    grid-template-rows: repeat(25, auto) !important; /* 25 تا هر ستون */
    column-gap: 18px !important;
    row-gap: 10px !important;
    align-items: start;
  }
  .omr-wrap.omr-two-col .omr-row{
    break-inside: avoid;
  }
}

/* Mobile/Tablet: keep normal single column */
@media (max-width: 991px){
  .omr-wrap{
    display: block !important;
  }
}

/* =========================
   OMR icons (✓ / ×) FIX
   works on desktop + mobile
   ========================= */

.omr-opt{
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-inline-start: 22px !important; /* جا برای آیکن */
  min-height: 34px; /* اگر لازم بود */
}

/* عدد (1..4) */
.omr-opt .t{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

/* آیکن ضربدر/تیک */
.omr-opt .i{
  position: absolute !important;
  inset-inline-start: 7px !important;  /* سمت راست در RTL */
  top: 44% !important;
  left: 70% !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-size: 12px !important;
}

/* اگر b هم باعث بهم‌ریختگی میشه، ثابتش کن */
.omr-opt .b{
  position: absolute !important;
  inset-inline-start: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* =========================================================
   STKEX – FIX PATCH (keep status colors + keep numbers)
   Put at END of frontend.css
   ========================================================= */

/* --- 0) هر override قبلی که رنگ/متن رو شفاف می‌کرد خنثی --- */
.stkex-app .stkex-as-choice,
.stkex-app .stkex-choice,
.stkex-app .stkex-pbtn{
  color: inherit !important;
}

/* =========================================================
   1) پالت سوال‌ها (پایین/ساید): وضعیت‌ها با رنگ‌های خودت
   classes: .stkex-pbtn + .is-cur/.is-ans/.is-blank/.is-mark
   ========================================================= */
.stkex-app .stkex-pbtn{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  font-weight:900;
  color:#111827 !important;          /* شماره همیشه معلوم */
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
}

.stkex-app .stkex-pbtn:hover{
  border-color:#c7d2fe;
}

/* statuses – همون منطق قبلی خودت */
.stkex-app .stkex-pbtn.is-blank{ background:#fff; }
.stkex-app .stkex-pbtn.is-ans{
  border-color:#22c55e !important;
  box-shadow: 0 14px 28px rgba(34,197,94,0.16) !important;
}
.stkex-app .stkex-pbtn.is-mark{
  border-color:#f59e0b !important;
  box-shadow: 0 14px 28px rgba(245,158,11,0.16) !important;
}
.stkex-app .stkex-pbtn.is-cur{
  border-color:#6366f1 !important;
  box-shadow: 0 16px 34px rgba(99,102,241,0.20) !important;
}

.stkex-as-no{
  display: flex;
  flex-direction: column;   /* زیر هم */
  align-items: center;
  gap: 8px;
  min-width: 68px;
}

/* شماره سوال */
.stkex-as-no .n{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  background:#f3f4f6;
  color:#111827;
}

/* دکمه علامت‌دار */
.stkex-as-mark{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* دکمه پاک کردن پاسخ */
.stkex-as-clear{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* =====================================================
   STKEX – AnswerSheet Choices Color Fix
   فقط برای .stkex-as-choice
   ===================================================== */

/* حالت عادی */
.stkex-as-choice{
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;   /* خنثی */
  color: #111827 !important;
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
}

/* hover (دیگه قرمز نشه) */
.stkex-as-choice:hover{
  background: #f9fafb !important;
  border-color: #c7d2fe !important;       /* هم‌خانواده آبی */
  box-shadow: 0 12px 22px rgba(17,24,39,0.10);
}

/* focus / active (قرمز reset.css رو خنثی کن) */
.stkex-as-choice:focus,
.stkex-as-choice:active{
  outline: none !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18) !important;
}

/* انتخاب‌شده (همون سبزی که خودت داشتی، دست نخورده فقط نرم‌تر) */
.stkex-as-choice.is-selected{
  background: #ffffff !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.22) !important;
}

/* وقتی هم hover هم selected */
.stkex-as-choice.is-selected:hover{
  border-color: #16a34a !important;
}

/* =========================================
   STKEX – A/B/C/D -> 1/2/3/4 (CSS only)
   فقط برای گزینه‌های AnswerSheet
   ========================================= */

/* متن اصلی A/B/C/D مخفی */
.stkex-as-choice{
  font-size: 0 !important;
}

/* جایگزینی عدد */
.stkex-as-choice[data-ch="A"]::before{ content:"1"; }
.stkex-as-choice[data-ch="B"]::before{ content:"2"; }
.stkex-as-choice[data-ch="C"]::before{ content:"3"; }
.stkex-as-choice[data-ch="D"]::before{ content:"4"; }

/* استایل عدد */
.stkex-as-choice::before{
  font-size: 14px !important;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
}
/* =========================================
   STKEX – Mark & Clear Buttons Fix
   ========================================= */

.stkex-as-mark,
.stkex-as-clear{
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  color: #374151 !important;
  box-shadow: 0 8px 18px rgba(17,24,39,0.06);
  transition: all .15s ease;
}

/* hover */
.stkex-as-mark:hover{
  background: #fff7ed !important;
  border-color: #f59e0b !important;
}

.stkex-as-clear:hover{
  background: #f8fafc !important;
  border-color: #64748b !important;
}

/* active mark */
.stkex-as-mark.is-active{
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #111827 !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.25) !important;
}
/* =========================================
   STKEX – Answer Options UI Upgrade
   ========================================= */

.stkex-as-choice{
  min-width: 64px !important;
  min-height: 48px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
}
/* گزینه‌ها 2×2 */
.stkex-as-choices{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  justify-items: center;
}
.stkex-as-choice.is-selected{
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.25) !important;
}
/* =====================================================
   FIX: جلوگیری از برگشت A/B/C/D + نمایش فقط 1/2/3/4
   (override نهایی)
   ===================================================== */

/* متن اصلی رو همیشه مخفی کن */
.stkex-as-choice{
  font-size: 0 !important; /* A/B/C/D مخفی */
}

/* عددها رو با ::before نمایش بده */
.stkex-as-choice[data-ch="A"]::before{ content:"1"; }
.stkex-as-choice[data-ch="B"]::before{ content:"2"; }
.stkex-as-choice[data-ch="C"]::before{ content:"3"; }
.stkex-as-choice[data-ch="D"]::before{ content:"4"; }

/* استایل عدد (اینجا سایز واقعی رو میدیم، نه روی خود دکمه) */
.stkex-as-choice::before{
  font-size: 16px !important;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
}
/* =========================
   Manual Questions in PDF Box
   ========================= */

#stkexPdfCol .stkex-qpanel{
  height: 92vh;            /* دقیقاً مثل PDF */
  overflow: auto;          /* اسکرول داخلی */
  border: 1px solid #eef2ff;
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px;
}

@media (max-width: 980px){
  #stkexPdfCol .stkex-qpanel{
    height: 60vh;          /* مثل PDF موبایل */
  }
}

#stkexPdfCol .stkex-qitem{
  background: #ffffff;
  border: 1px dashed #e5e7eb;    /* خط چین کمرنگ */
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}

#stkexPdfCol .stkex-qitem-head{
  font-weight: 900;
  color: #111827;
  margin-bottom: 8px;
}

#stkexPdfCol .stkex-qtext{
  line-height: 1.9;
  color: #111827;
  margin-bottom: 10px;
}

#stkexPdfCol .stkex-qtext-empty{
  opacity: .7;
}

#stkexPdfCol .stkex-qopts{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#stkexPdfCol .stkex-qopt{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #eef2ff;
  border-radius: 12px;
  background: #f8fafc;
}

#stkexPdfCol .stkex-qopt .n{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: #f3f4f6;
  flex: 0 0 auto;
}

#stkexPdfCol .stkex-qopt .t{
  line-height: 1.8;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

/* =========================
   STKEX – Manual mode: hide PDF UI completely
   ========================= */
#stkexPdfCol.is-manual-mode .stkex-pdfhead,
#stkexPdfCol.is-manual-mode .stkex-pdf-head,
#stkexPdfCol.is-manual-mode #stkexPdfSelect,
#stkexPdfCol.is-manual-mode #stkexPdfFrame{
  display: none !important;
}

/* اگر یه wrapper برای PDF داشتی که خالی می‌مونه (اختیاری ولی مفید) */
#stkexPdfCol.is-manual-mode .stkex-pdf-wrap,
#stkexPdfCol.is-manual-mode .stkexPdfBox,
#stkexPdfCol.is-manual-mode .stkex-pdf-box{
  display: none !important;
}
/* =========================
   STKEX – Mobile PDF empty space fix
   put at END of CSS
   ========================= */

/* وقتی دستی هستیم، PDF موبایل هم مثل iframe کامل مخفی شود */
#stkexPdfCol.is-manual-mode #stkexPdfMobile{
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}

/* اگر PDF موبایل خالی بود (هیچ canvasی نداشت) فضا نده */
#stkexPdfMobile:empty{
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}
/* =========================================
   STKEX – Exams cards grid (FIX)
   ========================================= */
.stkex-exam-cards{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;

  max-width: 1100px;
  margin: 0 auto;

  align-items: stretch;
}

.stkex-exam-cards > div{
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stkex-exam-cards > div > div:last-child{
  margin-top: auto;
}

@media (max-width: 1024px){
  .stkex-exam-cards{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 860px;
  }
}

@media (max-width: 640px){
  .stkex-exam-cards{
    grid-template-columns: 1fr !important;
    max-width: 520px;
  }
}
.info-row{
  display:flex;
  align-items:center;
  gap:6px;
}
.info-row svg{
  width:16px;
  height:16px;
}
.info-item{
  display: flex;
  align-items: center;
  gap: 5px;
}
.info-item svg{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}