/* ══════════════════════════════════════════
   NUMORA ADMIN — admin.css
   Extends brand tokens from ../styles.css
══════════════════════════════════════════ */

/* ── Body / Layout ───────────────────── */
.admin-body {
  display: flex;
  min-height: 100vh;
  background: var(--cream);
  overflow-x: hidden;
}

/* ── Sidebar ─────────────────────────── */
.sidebar {
  width: 230px;
  min-height: 100vh;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.4rem 1.4rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: rgba(255,255,255,.88);
  letter-spacing: -.01em;
}

.sidebar__nav {
  flex: 1;
  padding: .8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__nav-label {
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  padding: 1rem .6rem .3rem;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  color: rgba(255,255,255,.52);
  transition: all .18s;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.sidebar__nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.88);
}
.sidebar__nav-item--active {
  background: rgba(29,140,114,.22) !important;
  color: #4fd8c4 !important;
  border-color: rgba(29,140,114,.3) !important;
}
.sidebar__nav-item--soon {
  opacity: .45;
  pointer-events: none;
}

.sidebar__nav-icon {
  width: 18px;
  text-align: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.sidebar__soon-tag {
  margin-left: auto;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255,255,255,.1);
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar__footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar__footer-text {
  font-size: .73rem;
  color: rgba(255,255,255,.22);
}

/* ── Main content ────────────────────── */
.admin-main {
  margin-left: 230px;
  flex: 1;
  padding: 2.5rem 2.5rem 5rem;
  min-height: 100vh;
  max-width: calc(100vw - 230px);
}

/* ── Top bar ─────────────────────────── */
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.admin-topbar__title {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: .2rem;
}
.admin-topbar__sub {
  font-size: .88rem;
  color: var(--ink-light);
}

.admin-topbar__stats {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
}
.admin-stat {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: .7rem 1.1rem;
  text-align: center;
  min-width: 78px;
}
.admin-stat--amber { border-color: rgba(217,119,6,.3); background: var(--amber-light); }
.admin-stat--teal  { border-color: rgba(29,140,114,.3); background: var(--teal-light); }

.admin-stat__num {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: .18rem;
}
.admin-stat--amber .admin-stat__num { color: var(--amber); }
.admin-stat--teal  .admin-stat__num { color: var(--teal); }

.admin-stat__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── Filters ─────────────────────────── */
.admin-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: .9rem 1.2rem;
  margin-bottom: 1.5rem;
}

.filter-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  border-radius: 99px;
  font-family: 'Nunito', sans-serif;
  font-size: .83rem;
  font-weight: 700;
  color: var(--ink-mid);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  cursor: pointer;
  transition: all .18s;
}
.filter-tab:hover { border-color: var(--teal); color: var(--teal); }
.filter-tab--active {
  background: var(--teal);
  color: #fff !important;
  border-color: var(--teal);
  box-shadow: 0 3px 12px rgba(29,140,114,.25);
}

.filter-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.filter-dot--pending  { background: var(--amber); }
.filter-dot--approved { background: var(--teal); }
.filter-dot--inactive { background: var(--ink-light); }

.filter-controls {
  display: flex;
  gap: .55rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.filter-select {
  font-family: 'Nunito', sans-serif;
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink-mid);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color .18s;
}
.filter-select:focus { outline: none; border-color: var(--teal); }

.filter-search {
  font-family: 'Nunito', sans-serif;
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  width: 210px;
  transition: border-color .18s, box-shadow .18s;
}
.filter-search::placeholder { color: var(--ink-light); }
.filter-search:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,140,114,.1);
}

/* ── Questions container ─────────────── */
.questions-container {
  display: flex;
  flex-direction: column;
}

/* ── Bulk action bar ─────────────────── */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: .65rem 1.2rem;
  margin-bottom: .75rem;
}

.bulk-count {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-mid);
  flex: 1;
}

.bulk-approve-btn {
  font-size: .85rem;
  padding: 8px 22px;
  border-radius: 99px;
  white-space: nowrap;
}
.bulk-approve-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── Questions table — 2-row layout ─────── */
.q-table-wrap {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.q-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.q-row__main,
.q-row__sub { transition: background .1s; }

/* Divider between questions */
.q-row__sub         { border-bottom: 2px solid var(--cream-dark); }
.q-row__sub:last-child { border-bottom: none; }

/* Status tints */
.q-table__row--pending  { background: rgba(217,119,6,.04); }
.q-table__row--approved { background: rgba(29,140,114,.04); }
.q-table__row--inactive { opacity: .6; }

/* Hover highlights both rows of the same question */
.q-row__main:hover,
.q-row__main:hover + .q-row__sub {
  background: var(--cream) !important;
}

/* Checkbox cell — spans 2 rows */
.q-td--check {
  width: 48px;
  padding: .9rem 0 .9rem 1rem;
  vertical-align: top;
}

/* Full question text */
.q-td--tekst {
  padding: .85rem 1rem .3rem 1rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

/* Edit / Delete buttons — spans 2 rows */
.q-td--actions {
  padding: .7rem 1rem .7rem .5rem;
  vertical-align: middle;
  text-align: right;
  white-space: nowrap;
  width: 165px;
}

/* Metadata row */
.q-td--meta {
  padding: .25rem 1rem .8rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .65rem;
}

.q-meta-id {
  font-family: 'Courier New', monospace;
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-light);
}

.q-meta-type {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-light);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  padding: 1px 8px;
  border-radius: 6px;
}

.q-meta-diff  { font-size: .68rem; letter-spacing: 1px; line-height: 1; }

.q-meta-sort {
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-light);
}

.q-meta-hint,
.q-meta-facit {
  font-size: .81rem;
  font-weight: 600;
  color: var(--ink-mid);
  line-height: 1.45;
  flex-basis: 100%;
}

.q-meta-hint strong,
.q-meta-facit strong {
  font-weight: 800;
  color: var(--ink);
}

/* Bulk bar: select-all label */
.bulk-select-all {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink-mid);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* ── Admin card wrapper ──────────────── */
.q-admin-wrap {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
  border: 1.5px solid var(--cream-dark);
}
.q-admin-wrap:hover { box-shadow: var(--shadow-md); }
.q-admin-wrap--approved { border-color: rgba(29,140,114,.38); }
.q-admin-wrap--pending  { border-color: rgba(217,119,6,.32); }
.q-admin-wrap--inactive { opacity: .68; }

/* Override oq-card inside admin wrapper */
.q-admin-wrap .oq-card {
  max-width: 100%;
  border-radius: 20px 20px 0 0;
  border: none;
  box-shadow: none;
}
.q-admin-wrap .oq-card__right {
  pointer-events: none;
  user-select: none;
}

/* ── Admin action bar ────────────────── */
.q-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .7rem 1.25rem;
  background: var(--cream);
  border-top: 1px solid var(--cream-dark);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.q-admin-bar__meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
  font-size: .82rem;
  flex: 1;
  min-width: 0;
}
.q-admin-bar__emne {
  font-weight: 700;
  color: var(--ink-mid);
  white-space: nowrap;
}
.q-admin-bar__hint,
.q-admin-bar__facit {
  color: var(--ink-mid);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.q-admin-bar__hint strong,
.q-admin-bar__facit strong { font-weight: 800; color: var(--ink); }

.q-admin-bar__difficulty { font-size: .85rem; letter-spacing: -.04em; }

.q-admin-bar__xp {
  font-size: .75rem;
  font-weight: 800;
  color: var(--purple);
  background: var(--purple-light);
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.q-admin-bar__sort {
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-light);
  white-space: nowrap;
}

.q-admin-bar__actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

/* Status badges */
.status-badge {
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}
.badge--pending  { background: var(--amber-light); color: var(--amber); }
.badge--approved { background: var(--teal-light);  color: var(--teal);  }
.badge--inactive { background: var(--cream-dark);  color: var(--ink-light); }

/* ── Action buttons ──────────────────── */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Nunito', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .18s;
  line-height: 1;
}
.btn-action--edit {
  background: var(--cream);
  border-color: var(--cream-dark);
  color: var(--ink-mid);
}
.btn-action--edit:hover { border-color: var(--ink-mid); color: var(--ink); }

.btn-action--delete {
  background: var(--coral-light);
  border-color: rgba(224,90,58,.2);
  color: var(--coral);
}
.btn-action--delete:hover { background: #fcd4ca; border-color: var(--coral); }

.btn-action--approve {
  background: var(--teal-light);
  border-color: rgba(29,140,114,.2);
  color: var(--teal);
}
.btn-action--approve:hover {
  background: #c5eae3;
  border-color: var(--teal);
  box-shadow: 0 2px 10px rgba(29,140,114,.18);
}
.btn-action--approved {
  background: var(--cream);
  border-color: var(--cream-dark);
  color: var(--ink-light);
  cursor: default;
}

/* ── Loading / empty ─────────────────── */
.admin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem;
  color: var(--ink-mid);
  font-weight: 600;
  font-size: .95rem;
}
.admin-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--cream-dark);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.admin-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-light);
  font-weight: 600;
  font-size: .95rem;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--cream-dark);
}

/* ── Pagination ──────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0 0;
}
.page-btn {
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 99px;
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  color: var(--ink-mid);
  cursor: pointer;
  transition: all .18s;
}
.page-btn:hover { border-color: var(--teal); color: var(--teal); }
.page-info {
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink-light);
}

/* ── Modal ───────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal--open { display: flex; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28,26,24,.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__box {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  animation: fadeInUp .22s ease both;
}
.modal__box--wide { max-width: 700px; }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--cream-dark);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.modal__header h2 {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.modal__sub-id {
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  color: var(--ink-light);
  font-style: normal;
}
.modal__close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cream);
  border: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
  flex-shrink: 0;
}
.modal__close:hover { background: var(--cream-dark); }

.modal__body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.modal__footer {
  padding: 1.1rem 1.6rem;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  gap: .55rem;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--white);
}

.modal__confirm-text {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .8rem;
  line-height: 1.5;
}
.modal__confirm-note {
  font-size: .85rem;
  color: #7a2918;
  background: var(--coral-light);
  border-radius: 8px;
  padding: .7rem 1rem;
  line-height: 1.5;
}

/* ── Form ────────────────────────────── */
.form-row {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}
.form-row--tight .form-group { flex: 1; min-width: 0; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
  min-width: 0;
}

.form-label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--ink-mid);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
  font-family: 'Nunito', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,140,114,.1);
}
.form-textarea { resize: vertical; line-height: 1.55; }
.form-textarea--mono { font-family: 'Courier New', monospace; font-size: .82rem; }

.form-hint {
  font-size: .75rem;
  color: var(--ink-light);
  font-weight: 600;
}

/* Parts editor */
.edit-parts-wrap {
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.edit-parts { display: flex; flex-direction: column; gap: .45rem; }

.edit-part {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.edit-part-label {
  font-size: .7rem;
  font-weight: 800;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: .06em;
  min-width: 58px;
  flex-shrink: 0;
}
.edit-part-input {
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  padding: 7px 11px;
  flex: 1;
  min-width: 0;
  transition: border-color .18s;
}
.edit-part-input:focus { outline: none; border-color: var(--teal); }
.edit-part--correct .edit-part-input {
  background: var(--teal-light);
  border-color: rgba(29,140,114,.28);
}
.edit-part-tick {
  font-size: .9rem;
  color: var(--teal);
  font-weight: 900;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.edit-advanced {
  border-top: 1px solid var(--cream-dark);
  padding-top: .9rem;
}
.edit-advanced summary {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-light);
  cursor: pointer;
  user-select: none;
}
.edit-advanced summary:hover { color: var(--ink-mid); }

/* ── Danger button ───────────────────── */
.btn--danger {
  background: var(--coral);
  color: #fff;
  padding: 10px 22px;
  border-radius: 99px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  border: none;
  cursor: pointer;
  transition: all .2s;
}
.btn--danger:hover {
  background: #c4492b;
  box-shadow: 0 4px 16px rgba(224,90,58,.3);
}

/* ── Toast ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 99px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s, transform .22s;
  pointer-events: none;
  z-index: 999;
  max-width: 320px;
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { background: var(--teal); }
.toast--error   { background: var(--coral); }
body.admin-auth-pending {
  visibility: hidden;
}

/* ══════════════════════════════════════════
   PREVIEW VIEW
══════════════════════════════════════════ */

/* ── Setup panel ─────────────────────────── */
.preview-setup {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.8rem;
  max-width: 860px;
  box-shadow: var(--shadow-sm);
}

.preview-setup__title {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.preview-setup__row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.preview-setup__group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
  min-width: 180px;
}

.preview-select {
  font-size: .88rem;
  padding: 10px 12px;
  height: auto;
  border-radius: var(--radius-sm);
}
.preview-select:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Progression info strip */
.preview-progression-info {
  background: linear-gradient(135deg, var(--teal-light), rgba(29,140,114,.06));
  border: 1.5px solid rgba(29,140,114,.22);
  border-radius: var(--radius-sm);
  padding: .8rem 1.1rem;
  margin-bottom: 1.2rem;
}
.preview-progression-info__label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .3rem;
}
.preview-progression-info__maal {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.preview-progression-info__elev {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-mid);
  margin-top: .2rem;
}

/* ── Admin test mode banner ──────────────── */
.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, var(--ink) 0%, #2d2b28 100%);
  color: rgba(255,255,255,.88);
  border-radius: var(--radius-sm);
  padding: .6rem 1.2rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  max-width: 900px;
  margin-bottom: 1.2rem;
}
.preview-banner span:last-child {
  font-size: .73rem;
  font-weight: 600;
  opacity: .6;
  background: rgba(255,255,255,.1);
  padding: 2px 10px;
  border-radius: 99px;
}

/* ── Progress bar ────────────────────────── */
.preview-progress-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 900px;
  margin-bottom: 1.2rem;
}
.preview-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}
.preview-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-mid));
  border-radius: 99px;
  transition: width .5s ease;
}
.preview-counter {
  font-size: .82rem;
  font-weight: 800;
  color: var(--ink-mid);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

/* ── Question card in preview ────────────── */
#pv-card {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Navigation bar ─────────────────────── */
.preview-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 1.4rem auto 0;
  padding: 1.2rem 0 .5rem;
  border-top: 1px solid var(--cream-dark);
  gap: 1rem;
}
.preview-nav__controls {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.preview-nav__btn {
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 99px;
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  color: var(--ink-mid);
  cursor: pointer;
  transition: all .18s;
}
.preview-nav__btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}
.preview-nav__btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.preview-nav__counter {
  font-size: .9rem;
  font-weight: 800;
  color: var(--ink);
  padding: 0 .5rem;
  white-space: nowrap;
}
.preview-nav__reset {
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 99px;
  background: transparent;
  border: 1.5px solid var(--cream-dark);
  color: var(--ink-light);
  cursor: pointer;
  transition: all .18s;
}
.preview-nav__reset:hover {
  border-color: var(--ink-mid);
  color: var(--ink-mid);
}

/* ── Setup actions row ──────────────────── */
.preview-nav__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.preview-nav__delete {
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--coral-light);
  border: 1.5px solid rgba(224,90,58,.35);
  color: var(--coral);
  cursor: pointer;
  transition: all .18s;
}

.preview-nav__delete:hover:not(:disabled) {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.preview-nav__delete:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.preview-setup__actions {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ── Banner back button ─────────────────── */
.preview-banner__back {
  font-family: 'Nunito', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.75);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.preview-banner__back:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* ── Nav center group ───────────────────── */
.preview-nav__center {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ══════════════════════════════════════════
   GENERATE VIEW — "Opret spørgsmål"
══════════════════════════════════════════ */

/* ── Setup card ──────────────────────────── */
.gen-setup {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 860px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

/* ── Mode tabs ───────────────────────────── */
.gen-mode-tabs {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}

.gen-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 99px;
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-mid);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  cursor: pointer;
  transition: all .18s;
}
.gen-mode-tab:hover { border-color: var(--teal); color: var(--teal); }
.gen-mode-tab--active {
  background: var(--teal);
  color: #fff !important;
  border-color: var(--teal);
  box-shadow: 0 3px 12px rgba(29,140,114,.25);
}
.gen-mode-tab__icon { font-size: .85rem; }

/* ── Select ──────────────────────────────── */
.gen-select {
  width: 100%;
  font-size: .9rem;
  padding: 10px 12px;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ── Trin info strip ─────────────────────── */
.gen-trin-info {
  background: linear-gradient(135deg, var(--teal-light), rgba(29,140,114,.05));
  border: 1.5px solid rgba(29,140,114,.22);
  border-radius: var(--radius-sm);
  padding: .9rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .6rem;
}

.gen-trin-info__row {
  display: flex;
  gap: .8rem;
  font-size: .88rem;
  line-height: 1.45;
}
.gen-trin-info__label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--teal);
  min-width: 120px;
  flex-shrink: 0;
  padding-top: .15rem;
}

.gen-count--zero {
  font-weight: 800;
  color: var(--amber);
  background: var(--amber-light);
  padding: 1px 8px;
  border-radius: 99px;
}
.gen-count--some {
  font-weight: 700;
  color: var(--teal);
}

/* ── Auto info box ───────────────────────── */
.gen-auto-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--amber-light);
  border: 1.5px solid rgba(217,119,6,.22);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-mid);
  line-height: 1.55;
}
.gen-auto-info__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.3;
}

/* ── Action row ──────────────────────────── */
.gen-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.gen-start-btn {
  font-size: .95rem;
  padding: 12px 28px;
  border-radius: 99px;
}
.gen-start-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.gen-actions__note {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-light);
}

/* ── Status / result box ─────────────────── */
.gen-status {
  max-width: 860px;
  margin-top: 1.6rem;
}

.gen-log-loading {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.8rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-mid);
}

/* ── Result card ─────────────────────────── */
.gen-result {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gen-result--success { border-color: rgba(29,140,114,.35); }
.gen-result--error   { border-color: rgba(224,90,58,.35); }

.gen-result__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.5rem;
  background: var(--teal-light);
  border-bottom: 1px solid rgba(29,140,114,.18);
}
.gen-result__header--error {
  background: var(--coral-light);
  border-bottom-color: rgba(224,90,58,.18);
  color: var(--coral);
  font-weight: 800;
  font-size: 1rem;
  padding: 1.1rem 1.5rem;
}

.gen-result__badge {
  font-size: .88rem;
  font-weight: 800;
  color: var(--teal);
  background: rgba(29,140,114,.12);
  border: 1px solid rgba(29,140,114,.22);
  padding: 4px 14px;
  border-radius: 99px;
}

.gen-result__meta {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-mid);
}

.gen-result__goal {
  padding: .8rem 1.5rem;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink-mid);
  background: rgba(29,140,114,.04);
  border-bottom: 1px solid var(--cream-dark);
  line-height: 1.5;
}

.gen-result__msg {
  padding: 1.2rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--coral);
  line-height: 1.55;
}

/* ── Result rows ─────────────────────────── */
.gen-result__list {
  display: flex;
  flex-direction: column;
}

.gen-result-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .65rem 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
  font-size: .85rem;
  transition: background .12s;
}
.gen-result-row:last-child { border-bottom: none; }
.gen-result-row:hover { background: var(--cream); }

.gen-result-row__id {
  font-family: 'Courier New', monospace;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-light);
  min-width: 44px;
  flex-shrink: 0;
}

.gen-result-row__lvl {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 99px;
  flex-shrink: 0;
}
.gen-result-row__lvl--teal   { background: var(--teal-light);   color: var(--teal); }
.gen-result-row__lvl--amber  { background: var(--amber-light);  color: var(--amber); }
.gen-result-row__lvl--coral  { background: var(--coral-light);  color: var(--coral); }

.gen-result-row__type {
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-light);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gen-result-row__tekst {
  flex: 1;
  color: var(--ink);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gen-result-row__parts {
  font-size: .72rem;
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-light);
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Errors / warnings ───────────────────── */
.gen-result__errors {
  margin: 0;
  padding: .8rem 1.5rem 1rem;
  background: var(--amber-light);
  border-top: 1px solid rgba(217,119,6,.2);
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink-mid);
}
.gen-result__errors ul {
  margin: .4rem 0 0 1.2rem;
  line-height: 1.7;
}

/* ── Result action buttons ───────────────── */
.gen-result__actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--cream-dark);
  background: var(--cream);
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   GENERATE — topic selectors & trin accordions
══════════════════════════════════════════ */

.gen-topic-row {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.gen-topic-row .form-group {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

/* ── Trin accordion list ─────────────────── */
#gen-trin-table-wrap,
#codex-gen-trin-table-wrap {
  margin-top: .8rem;
}

.trin-acc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trin-acc-empty {
  text-align: center;
  padding: 2rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-light);
}

/* ── Single accordion item ───────────────── */
.trin-acc {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}

.trin-acc:hover {
  border-color: rgba(29,140,114,.28);
}

/* Codex auto */
.codex-auto-panel {
  display: grid;
  gap: 1.25rem;
}

.codex-auto-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(180px, .8fr);
  gap: 1rem;
  align-items: end;
}

.codex-auto-calc {
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  padding: .85rem 1rem;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}

.codex-auto-calc__label {
  color: var(--ink-light);
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: .25rem;
}

.codex-auto-calc strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.codex-auto-interval--bad {
  color: var(--coral) !important;
}

.codex-auto-note {
  margin: 0;
}

.codex-auto-actions {
  margin-top: 0;
}

.codex-auto-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--cream-dark);
  margin: 1rem 0;
}

.codex-auto-progress__fill {
  height: 100%;
  width: 0;
  background: var(--teal);
  transition: width .25s ease;
}

@media (max-width: 900px) {
  .codex-auto-grid {
    grid-template-columns: 1fr;
  }
}

.trin-acc--open {
  border-color: rgba(29,140,114,.4);
  box-shadow: 0 2px 16px rgba(29,140,114,.09);
}

/* ── Header row ──────────────────────────── */
.trin-acc__hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
  flex-wrap: wrap;
}

.trin-acc__hdr:hover { background: var(--cream); }

.trin-acc--open .trin-acc__hdr {
  background: var(--teal-light);
  border-bottom: 1.5px solid rgba(29,140,114,.18);
}

.trin-acc__chevron {
  font-size: .62rem;
  color: var(--ink-light);
  transition: transform .2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.trin-acc--open .trin-acc__chevron {
  transform: rotate(90deg);
  color: var(--teal);
}

.trin-acc__nr {
  font-size: .74rem;
  font-weight: 800;
  color: var(--teal);
  background: rgba(29,140,114,.1);
  border: 1px solid rgba(29,140,114,.22);
  padding: 2px 10px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.trin-acc__desc {
  flex: 1;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  min-width: 120px;
}

.trin-acc__count { flex-shrink: 0; }

/* ── Accordion body ──────────────────────── */
.trin-acc__body {
  display: none;
}

.trin-acc--open .trin-acc__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--cream);
}

/* ── Læringsmål strip ────────────────────── */
.trin-acc__maal {
  display: flex;
  gap: .7rem;
  align-items: baseline;
  background: rgba(29,140,114,.06);
  border: 1px solid rgba(29,140,114,.16);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink-mid);
  line-height: 1.5;
}

.trin-acc__maal-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Questions section ───────────────────── */
.trin-acc__qs-wrap {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.trin-acc__qs-header {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: .55rem 1rem;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
}

.trin-acc__qs-loading {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-light);
}

.trin-acc__qs-empty,
.trin-acc__qs-error,
.trin-acc__qs-more {
  padding: .9rem 1rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-light);
  margin: 0;
}

.trin-acc__qs-error { color: var(--coral); }

.trin-acc__qs-more {
  text-align: center;
  border-top: 1px solid var(--cream-dark);
  color: var(--ink-light);
  font-size: .78rem;
  padding: .6rem 1rem;
}

/* ── Question row in accordion ───────────── */
.trin-q-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  font-size: .83rem;
  transition: background .12s;
  flex-wrap: wrap;
}

.trin-q-row:last-of-type { border-bottom: none; }
.trin-q-row:hover { background: var(--cream); }

.trin-q-row__id {
  font-family: 'Courier New', monospace;
  font-size: .74rem;
  font-weight: 700;
  color: var(--ink-light);
  min-width: 38px;
  flex-shrink: 0;
}

.trin-q-row__text {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trin-q-row__type {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-light);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.trin-q-row__diff {
  font-size: .65rem;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* ── Generate button ─────────────────────── */
.gen-trin-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 99px;
  background: var(--teal);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.gen-trin-add-btn:hover:not(:disabled) {
  background: var(--teal-mid);
  box-shadow: 0 3px 10px rgba(29,140,114,.28);
}
.gen-trin-add-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ── Pill count badge in topbar ─────────── */
.preview-topbar-count {
  font-size: .75rem;
  font-weight: 800;
  background: var(--teal-light);
  color: var(--teal);
  border: 1px solid rgba(29,140,114,.2);
  padding: 3px 10px;
  border-radius: 99px;
  margin-left: .6rem;
  vertical-align: middle;
}

/* ══════════════════════════════════════════
   QUESTIONS — card list layout
══════════════════════════════════════════ */

.questions-container { gap: 1.25rem; }

/* ── Card wrapper ────────────────────────── */
.aq-card-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--cream-dark);
  transition: box-shadow .2s;
}
.aq-card-wrap:hover { box-shadow: var(--shadow-md); }

/* ── Admin strip (top of each card) ─────── */
.aq-admin-strip {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  background: var(--cream-mid);
  border-bottom: 1px solid var(--cream-dark);
  flex-wrap: wrap;
}

.aq-id {
  font-family: 'Courier New', monospace;
  font-size: .7rem;
  font-weight: 700;
  color: var(--ink-light);
  flex-shrink: 0;
}

.aq-status {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 99px;
  flex-shrink: 0;
}
.aq-status--pending  { background: var(--amber-light); color: var(--amber);      border: 1px solid rgba(217,119,6,.3); }
.aq-status--approved { background: var(--teal-light);  color: var(--teal);       border: 1px solid rgba(29,140,114,.3); }
.aq-status--inactive { background: var(--cream-dark);  color: var(--ink-light);  border: 1px solid transparent; }

.aq-type-chip {
  font-size: .65rem;
  font-weight: 700;
  color: var(--ink-mid);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}

.aq-diff-dots { display: flex; gap: 3px; align-items: center; }
.aq-diff-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cream-dark);
  flex-shrink: 0;
}
.aq-diff-dot--on { background: var(--amber); }

.aq-strip-actions {
  display: flex;
  gap: .35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.aq-btn {
  font-family: 'Nunito', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1.2;
}
.aq-btn--approve {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.aq-btn--approve:hover { background: #16705b; }
.aq-btn--edit {
  background: transparent;
  color: var(--ink-mid);
  border-color: var(--cream-dark);
}
.aq-btn--edit:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.aq-btn--delete {
  background: transparent;
  color: var(--coral);
  border-color: rgba(224,90,58,.3);
}
.aq-btn--delete:hover { background: var(--coral-light); border-color: var(--coral); }

/* ── oq-card overrides inside admin list ─── */
.aq-preview-card {
  max-width: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
}
.aq-preview-card .oq-card__left { min-height: 0; }

/* ── Meta rows (hint / facit) ────────────── */
.aq-meta-row {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-mid);
  padding-top: 8px;
  border-top: 1px solid var(--cream-dark);
  line-height: 1.5;
}
.aq-meta-row strong { font-weight: 800; color: var(--ink); }
.aq-meta-row--facit { color: var(--teal); }
.aq-meta-row--facit strong { color: var(--teal); }

/* ══════════════════════════════════════════
   ANSWER PREVIEW WIDGETS (static, read-only)
══════════════════════════════════════════ */

/* options (radio / checkbox) */
.aqp-opts { display: flex; flex-direction: column; gap: 5px; }
.aqp-opts--grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }

.aqp-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 600;
  background: #fff;
}
.aqp-opt--correct { border-color: var(--teal); background: var(--teal-light); }

.aqp-opt-key {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 900;
  flex-shrink: 0;
}
.aqp-opt--correct .aqp-opt-key { background: var(--teal); color: #fff; }
.aqp-opt-text { flex: 1; min-width: 0; }
.aqp-opt-tick { font-size: .8rem; color: var(--teal); font-weight: 900; flex-shrink: 0; }

/* true/false */
.aqp-tf { display: flex; gap: 10px; }
.aqp-tf-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--cream-dark);
  font-size: .88rem; font-weight: 700;
  text-align: center;
  background: #fff;
}
.aqp-tf-btn--correct { border-color: var(--teal); background: var(--teal-light); color: var(--teal); }

/* text inputs */
.aqp-input-row { display: flex; gap: 8px; align-items: center; }
.aqp-input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  padding: 0 12px;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem; font-weight: 700;
  color: var(--ink);
  background: var(--cream);
  box-sizing: border-box;
}
.aqp-input--sm { width: 72px; text-align: center; height: 34px; }
.aqp-input:disabled { opacity: .8; cursor: default; }

.aqp-textarea {
  width: 100%;
  min-height: 68px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'Nunito', sans-serif;
  font-size: .88rem; font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  resize: vertical;
  box-sizing: border-box;
}
.aqp-textarea:disabled { opacity: .8; cursor: default; }

/* steps */
.aqp-steps { display: flex; flex-direction: column; gap: 4px; }
.aqp-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 7px;
  font-size: .82rem; font-weight: 600;
  background: #fff;
}
.aqp-step--editable { border-color: var(--teal);  background: var(--teal-light); }
.aqp-step--error    { border-color: var(--coral); background: var(--coral-light); }
.aqp-step-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 900;
  flex-shrink: 0;
}
.aqp-err-badge {
  margin-left: auto;
  font-size: .68rem; font-weight: 800;
  color: var(--coral);
  flex-shrink: 0;
}

/* sort / rank */
.aqp-sort { display: flex; flex-direction: column; gap: 4px; }
.aqp-sort-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 7px;
  font-size: .82rem; font-weight: 600;
  background: #fff;
}
.aqp-sort-handle { color: var(--cream-dark); font-size: .95rem; cursor: default; }

/* match */
.aqp-match { display: flex; flex-direction: column; gap: 4px; }
.aqp-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  font-size: .8rem;
}
.aqp-match-left {
  padding: 6px 9px;
  border: 1.5px solid var(--teal);
  background: var(--teal-light);
  border-radius: 7px;
  font-weight: 700;
  color: var(--teal);
  text-align: center;
}
.aqp-match-arr { color: var(--ink-light); font-size: .9rem; text-align: center; }
.aqp-match-right {
  padding: 6px 9px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 7px;
  font-weight: 600;
  text-align: center;
  background: #fff;
}

/* multi / table fields */
.aqp-fields { display: flex; flex-direction: column; gap: 5px; }
.aqp-field-row { display: flex; align-items: center; gap: 8px; }
.aqp-field-label {
  font-size: .8rem; font-weight: 700;
  color: var(--ink-mid);
  min-width: 80px;
  flex-shrink: 0;
}

/* visual / canvas placeholders */
.aqp-visual-placeholder {
  border: 2px dashed var(--cream-dark);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: var(--ink-light);
  font-size: .82rem;
}
.aqp-visual-placeholder span { font-size: 1.6rem; display: block; margin-bottom: 4px; }
.aqp-facit-note { margin-top: 5px; font-size: .76rem; font-weight: 700; color: var(--teal); }

/* highlight text */
.aqp-highlight-text {
  font-size: .85rem; font-weight: 600;
  color: var(--ink-mid);
  line-height: 1.8;
  max-height: 76px;
  overflow: hidden;
}

/* empty / fallback */
.aqp-empty {
  color: var(--ink-light);
  font-size: .8rem; font-weight: 600;
  font-style: italic;
}

/* ══════════════════════════════════════════
   APPROVE MODULE — "Godkend spørgsmål"
══════════════════════════════════════════ */

/* Action banner (approve all) */
.approve-action-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ink);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.approve-pending-msg {
  font-size: .92rem;
  font-weight: 700;
}

.approve-pending-msg--has-pending { color: #fbbf24; }
.approve-pending-msg--all-done    { color: #4fd8c4; }

.approve-all-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Status badge on question left panel */
.ap-status-badge {
  display: inline-block;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  margin: .3rem 0 .5rem;
}

.ap-status-badge--pending {
  background: rgba(251,191,36,.18);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,.35);
}

.ap-status-badge--approved {
  background: rgba(29,140,114,.18);
  color: #4fd8c4;
  border: 1px solid rgba(29,140,114,.3);
}
