.plus-quiz{
  max-width:56rem;
  margin:1.25rem auto;
  padding:1rem 1.25rem;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#f9fafb;
}
html.dark .plus-quiz{background:#0f172a;border-color:#273247}

.plus-quiz h3{margin:.25rem 0 1rem;font-size:1.2rem}
.plus-quiz__opt{display:flex;gap:.5rem;align-items:flex-start;margin:.5rem 0}
.plus-quiz__opt input{margin-top:.25rem}

.plus-quiz__actions{display:flex;gap:.5rem;align-items:center;margin-top:1rem;flex-wrap:wrap}

.plus-quiz__btn{border:1px solid #cbd5e1;border-radius:.6rem;padding:.45rem .9rem;cursor:pointer}
.plus-quiz__btn--primary{background:#1e3a8a;color:#fff}

.plus-quiz__msg{margin-top:.75rem;padding:.65rem .75rem;border:1px solid #cbd5e1;border-radius:.6rem;background:#fff}
html.dark .plus-quiz__msg{background:#0b1222;border-color:#273247}
.plus-quiz__msg--static{display:block}

.plus-quiz__badge{display:inline-block;border:1px solid #cbd5e1;border-radius:9999px;padding:.15rem .5rem;font-size:.9rem;opacity:.9}

/* My Account list */
.plus-quiz-answers{margin-top:1rem}
.plus-quiz-card{
  padding:1rem;
  border:1px solid #cbd5e1;
  border-radius:12px;
  margin:0 0 1rem;
  background:#fff;
}
html.dark .plus-quiz-card{background:#0b1222;border-color:#273247}
.plus-quiz-card__title{margin:0 0 .25rem}
.plus-quiz-card__date{margin:0 0 .75rem;opacity:.85}
.plus-quiz-card__q{margin:.25rem 0}
.plus-quiz-card__opts{margin:.5rem 0 0 1.2rem}


.plus-quiz__stats{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin:.5rem 0 .25rem;
}

.plus-quiz__admin{
  width:100%;
  margin-top:.25rem;
}

.plus-quiz__admin-sum{
  cursor:pointer;
  opacity:.85;
}

.plus-quiz__admin-body{
  margin-top:.35rem;
  padding:.6rem .75rem;
  border:1px solid #cbd5e1;
  border-radius:.6rem;
  background:#fff;
}
html.dark .plus-quiz__admin-body{background:#0b1222;border-color:#273247}


.plus-quiz-card__badge{
  display:inline-block;
  padding:.15rem .55rem;
  border:1px solid #cbd5e1;
  border-radius:9999px;
  font-size:.9rem;
  line-height:1.2;
  margin-left:.35rem;
  vertical-align:middle;
}

.plus-quiz-card__badge--ok{
  background:#f0fdf4;
  border-color:#bbf7d0;
  color:#166534;
}

.plus-quiz-card__badge--bad{
  background:#fef2f2;
  border-color:#fecaca;
  color:#991b1b;
}

html.dark .plus-quiz-card__badge{border-color:#273247}
html.dark .plus-quiz-card__badge--ok{background:#052e16;border-color:#14532d;color:#86efac}
html.dark .plus-quiz-card__badge--bad{background:#450a0a;border-color:#7f1d1d;color:#fca5a5}


/* My Account (Admin) — overview + detail tables */
.plus-quiz-myacc__search{
  display:flex;
  gap:.5rem;
  align-items:center;
  flex-wrap:wrap;
  margin:.75rem 0 1rem;
}

.plus-quiz-myacc__search input[type="search"]{
  min-width:260px;
  max-width:520px;
  width:100%;
  padding:.45rem .6rem;
  border:1px solid #cbd5e1;
  border-radius:.55rem;
  background:#fff;
}

html.dark .plus-quiz-myacc__search input[type="search"]{
  background:#0b1222;
  border-color:#273247;
  color:#e5e7eb;
}

.plus-quiz-myacc__search button{
  border:1px solid #cbd5e1;
  border-radius:.55rem;
  padding:.45rem .9rem;
  cursor:pointer;
  background:#1e3a8a;
  color:#fff;
}

.plus-quiz-myacc__detail-head{
  padding:.75rem 1rem;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  margin:.25rem 0 1rem;
}

html.dark .plus-quiz-myacc__detail-head{
  background:#0b1222;
  border-color:#273247;
}

.plus-quiz-myacc__table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1rem;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:12px;
  overflow:hidden;
}

html.dark .plus-quiz-myacc__table{
  background:#0b1222;
  border-color:#273247;
}

.plus-quiz-myacc__table th,
.plus-quiz-myacc__table td{
  border-bottom:1px solid #cbd5e1;
  padding:.6rem .7rem;
  text-align:left;
  vertical-align:middle;
}

html.dark .plus-quiz-myacc__table th,
html.dark .plus-quiz-myacc__table td{
  border-bottom-color:#273247;
}

.plus-quiz-myacc__table thead th{
  background:#f8fafc;
  font-weight:700;
}

html.dark .plus-quiz-myacc__table thead th{
  background:#0f1a2c;
}

.plus-quiz-myacc__table tbody tr:last-child td{
  border-bottom:none;
}

.plus-quiz-myacc__table a{
  text-decoration:none;
}

.plus-quiz-myacc__table a:hover{
  text-decoration:underline;
}

/* Mobile scroll */
@media (max-width: 720px){
  .plus-quiz-myacc__table{
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .plus-quiz-myacc__table th,
  .plus-quiz-myacc__table td{
    white-space:nowrap;
  }
}


/* Admin tables: widths via column classes (overrides inline widths by removing them in PHP) */
.plus-quiz-myacc__table{ table-layout: fixed; width:100%; }

.plus-quiz-myacc__table .pq-col--id{ width:72px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--ans{ width:92px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--cor{ width:92px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--rate{ width:84px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--upd{ width:120px; white-space:nowrap; }

/* Title consumes remaining width */
.plus-quiz-myacc__table .pq-col--title{ width:auto; }
.plus-quiz-myacc__table td:nth-child(2){ white-space:normal; word-break:break-word; }
.plus-quiz-myacc__table td:nth-child(2) a{ display:block; }

/* Detail table widths */
.plus-quiz-myacc__table .pq-col--uid{ width:90px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--res{ width:110px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--date{ width:140px; white-space:nowrap; }

/* Detail table (Admin) — final column widths */
.plus-quiz-myacc__table .pq-col--name{ width:220px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--res{ width:110px; white-space:nowrap; }
.plus-quiz-myacc__table .pq-col--date{ width:120px; white-space:nowrap; }
