/* Dashboard Pre/Post-Test Pembekalan */

.qz-kpi {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.qz-feed {
  display: grid;
  gap: 10px;
}

.qz-card-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  padding: 14px 16px;
}

.qz-card-row__title {
  font-weight: 800;
  color: #0b1330;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.qz-card-row__meta {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 3px;
}

.qz-card-row__score {
  text-align: right;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.qz-card-row__score strong {
  font-size: 1.25rem;
  color: #122B5C;
  font-variant-numeric: tabular-nums;
}

.qz-card-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 4px;
}

.qz-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 650;
  word-break: break-all;
}

.qz-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.qz-pill--pretest { background: #eef2ff; color: #3730a3; }
.qz-pill--posttest { background: #fff7ed; color: #c2410c; }

/* Detail dialog — quiz-specific (tq-detail__* from dashboard-pertanyaan.css) */
.qz-detail-stack,
.qz-detail-essays {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qz-detail-q {
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  background: #fff;
}

.qz-detail-q.is-ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.qz-detail-q.is-bad {
  border-color: #fecaca;
  background: #fef2f2;
}

.qz-detail-q__prompt {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #0f172a;
  font-weight: 550;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.qz-detail-q__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: #0b1330;
  color: #ead29c;
  flex-shrink: 0;
  line-height: 1;
}

.qz-detail-q.is-ok .qz-detail-q__num {
  background: #047857;
  color: #ecfdf5;
}

.qz-detail-q.is-bad .qz-detail-q__num {
  background: #b91c1c;
  color: #fef2f2;
}

.qz-detail-q__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12.5px;
  color: #475569;
}

.qz-detail-q__meta strong {
  color: #0f172a;
  font-weight: 700;
}

.qz-detail-q__verdict {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.qz-detail-q.is-ok .qz-detail-q__verdict {
  background: #d1fae5;
  color: #065f46;
}

.qz-detail-q.is-bad .qz-detail-q__verdict {
  background: #fee2e2;
  color: #991b1b;
}

.qz-detail-essay {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.qz-detail-essay__title {
  font-size: 14px;
  font-weight: 750;
  color: #0b1330;
  line-height: 1.35;
}

.qz-detail-essay__prompt {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.qz-detail-ans {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 13.5px;
  color: #0f172a;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Mobile dialog polish + safe area */
@media (max-width: 640px) {
  .qz-card-row { flex-direction: column; align-items: stretch; }
  .qz-card-row__score { justify-items: start; text-align: left; }
  .qz-card-row__actions { justify-content: flex-start; }

  .tq-detail-dialog.lari-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: max(8px, env(safe-area-inset-top, 0px)) auto max(8px, env(safe-area-inset-bottom, 0px));
  }

  .tq-detail-dialog .lari-dialog__form {
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .tq-detail-dialog .tq-detail__actions {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 960px) {
  .qz-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
