/* -------------------------------------------------
   FONT IMPORTS
   ------------------------------------------------- */
@font-face {
  font-family: 'Aktiv Grotesk';
  src: url('./fonts/Aktiv Grotesk/AktivGrotesk-Regular.otf') format('opentype');
  font-weight: 400;
}

@font-face {
  font-family: 'Aktiv Grotesk';
  src: url('./fonts/Aktiv Grotesk/AktivGrotesk-Bold.otf') format('opentype');
  font-weight: 700;
}

@font-face {
  font-family: 'RBNo3.1';
  src: url('./fonts/RBNo3.1/RBNo3.1-Regular.otf') format('opentype');
  font-weight: 400;
}

@font-face {
  font-family: 'RBNo3.1';
  src: url('./fonts/RBNo3.1/RBNo3.1-Bold.otf') format('opentype');
  font-weight: 700;
}

/* -------------------------------------------------
   THEME ROOT (LIGHT ONLY)
   ------------------------------------------------- */
:root {
  --bg: #f7f7f7;
  --ink: #222;
  --card: #ffffff;
  --muted: #666;
  --line: #e7e7e7;
  --shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
  --accent: #43464b;
  /* main accent — gunmetal */
  --accent-light: #5a5e63;
  /* lighter hover tone */
  --accent-ink: #ffffff;
  /* text on accent backgrounds */

  /* Admin vars */
  --admin-gap: 12px;
  --admin-radius: 14px;
  --admin-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  --admin-muted: #6b7280;
  --admin-border: #e5e7eb;
  --admin-bg: #ffffff;
  --admin-pill-bg: #f3f4f6;
  --admin-pill-ok: #10b981;
  --admin-danger: #ef4444;

  /* Accents (gunmetal/gray based) */
  --pop: #9da1a7;
  /* subtle pop/secondary gray */
  --dark-grey: #2b2e32;
  /* deeper contrast option */

  /* Status / signal colors (keep green/red but desaturate) */
  --ok: #10b981;
  --bad: #ef4444;

  /* Global corner radii (used to de-pill shapes) */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 'Aktiv Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'RBNo3.1', 'Aktiv Grotesk', sans-serif;
  letter-spacing: 0.02em;
}

/* -------------------------------------------------
   HEADER
   ------------------------------------------------- */
header {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(0deg, #fafafa, #ffffff);
  border-bottom: 1px solid #e7e7e7;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* header inner wrapper, if used */
header>.wrap {
  max-width: none;
  width: 100%;
  padding: 0;
}

.wrap,
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 12px 18px;
}

main {
  margin-top: 16px;
}

h1 {
  font-size: 1.35rem;
  margin: 0;
}

/* muted text helper */
.muted {
  color: #6b7280;
  font-size: 0.9rem;
}

/* -------------------------------------------------
   FLEX UTILS
   ------------------------------------------------- */
.row,
.toolbar,
.inline-list,
.trainees-table-toolbar,
.quizzes-table-toolbar,
.admin-toolbar,
.modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.row {
  gap: 10px;
}

.grow {
  flex: 1 1 auto;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* -------------------------------------------------
   TABS
   ------------------------------------------------- */
.tab {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease, border 0.16s ease;
}

.tab:hover {
  background: #f3f4f6;
  color: var(--ink);
}

.tab.active {
  border-color: var(--accent);
  background: rgba(99, 95, 54, 0.07);
  color: var(--ink);
  font-weight: 600;
}

/* -------------------------------------------------
   CARDS
   ------------------------------------------------- */
.card,
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* admin card variant */
.admin-card {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 14px 14px 16px;
}

/* -------------------------------------------------
   TOOLBARS
   ------------------------------------------------- */
.toolbar {
  margin-bottom: 10px;
}

/* right-aligned toolbar variants */
.toolbar.right,
.quiz-question .toolbar.right,
.quiz-editor .toolbar.right,
.admin-toolbar.right {
  justify-content: flex-end;
}

/* -------------------------------------------------
   BUTTONS (GLOBAL)
   ------------------------------------------------- */
button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 7px 11px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
  transition: background 0.14s ease, transform 0.14s ease, border 0.14s ease;
}

button:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

button.ghost {
  background: transparent;
  border: 1px solid #ddd;
}

button.ok {
  background: #22c55e;
  color: #fff;
  border: 1px solid #16a34a;
}

/* bring back delete/red buttons clearly */
button.bad,
.inline-list>button.bad,
.admin-toolbar .button-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

button.bad:hover,
.inline-list>button.bad:hover {
  background: #dc2626;
  filter: brightness(0.95);
}

button.sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* -------------------------------------------------
   INPUTS
   ------------------------------------------------- */
input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border 0.14s ease, box-shadow 0.14s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25);
}

textarea {
  min-height: 90px;
}

label {
  font-weight: 600;
  font-size: 12px;
  color: #333;
  margin-bottom: 4px;
  display: inline-block;
}

/* -------------------------------------------------
   GRID
   ------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.col-6 {
  grid-column: span 6;
}

.col-12 {
  grid-column: span 12;
}

/* -------------------------------------------------
   TABLES
   ------------------------------------------------- */
table,
.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-table-wrap {
  margin-top: 8px;
  overflow: auto;
}

.admin-table-wrap table {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
}

th,
td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  color: var(--muted);
  background: #f7f7f7;
}

.admin-table-wrap thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  background: #fafafa;
  border-bottom: 1px solid var(--admin-border);
  padding: 10px 12px;
  white-space: nowrap;
}

.admin-table-wrap tbody td {
  border-top: 1px solid var(--admin-border);
  padding: 10px 12px;
  vertical-align: top;
}

tr:hover td,
.admin-table-wrap tbody tr:hover {
  background: #fcfcfc;
}

/* -------------------------------------------------
   INLINE LIST
   ------------------------------------------------- */
.inline-list {
  align-items: center;
  flex-wrap: wrap;
}

.inline-list>button {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
  background: #fff;
  cursor: pointer;
}

.inline-list>button:hover {
  background: #f9fafb;
}

/* -------------------------------------------------
   PILLS / CHIPS
   ------------------------------------------------- */
/* De-pill: rounded rectangles instead of full pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-md);
  background: #e5e7eb;
  font-size: 11px;
  color: #374151;
  line-height: 1;
  border: 1px solid rgba(15, 23, 42, 0.02);
}

.pill.ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.pill.bad {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* -------------------------------------------------
   EMPTY STATE
   ------------------------------------------------- */
.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* -------------------------------------------------
   SPLIT LAYOUT
   ------------------------------------------------- */
.split {
  display: flex;
  gap: 12px;
}

.split>.left {
  flex: 2;
}

.split>.right {
  flex: 1;
}

/* -------------------------------------------------
   FOOTER
   ------------------------------------------------- */
footer {
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}

/* -------------------------------------------------
   TRAINEE / MEDIA BASICS
   ------------------------------------------------- */
.trainee-step-row {
  /* card-style step row (latest style) */
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #edf0f4;
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.trainee-step-row.quiz-row {
  background: #fff;
}

/* simple media placeholder */
.fake-video {
  background: #0f172a10;
  border: 1px dashed #94a3b8;
  border-radius: var(--radius-md);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  color: #475569;
}

/* -------------------------------------------------
   PROGRESS (BASE)
   ------------------------------------------------- */
.progress {
  position: relative;
  height: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 160px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e1ff7d, #a0ff4b);
  transition: width 0.25s ease;
}

.progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #222;
  mix-blend-mode: normal;
}

/* -------------------------------------------------
   MODAL (ADMIN)
   ------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.modal {
  width: min(520px, 92vw);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
}

.modal-header {
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 14px 16px;
}

.modal-actions {
  justify-content: flex-end;
  padding: 12px 16px 16px;
  border-top: 1px solid #eee;
}

/* -------------------------------------------------
   ADMIN TOOLBAR & SEARCH
   ------------------------------------------------- */
.admin-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
}

.admin-toolbar .toolbar-left,
.admin-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-toolbar .toolbar-left {
  flex: 1 1 auto;
}

.admin-toolbar .toolbar-left .admin-search,
.admin-toolbar .toolbar-left .screen-search-bar {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

/* full-width searches */
.admin-search,
.trainees-table-search,
.quizzes-table-search,
.screen-search-bar {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  font-size: 0.85rem;
}

.admin-search:focus,
.trainees-table-search:focus,
.quizzes-table-search:focus,
.screen-search-bar:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.trainees-table-toolbar .grow,
.quizzes-table-toolbar .grow {
  flex: 1 1 auto;
}

.trainees-table-subtitle,
.quizzes-table-subtitle,
.admin-subtitle,
.courses-table-subtitle {
  font-size: 13px;
  margin: 4px 4px 20px;
  color: var(--admin-muted);
}

/* -------------------------------------------------
   QUIZ EDITOR (ADMIN)
   ------------------------------------------------- */
.quiz-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-question {
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  background: #fafafa;
}

.quiz-editor textarea {
  min-height: 80px;
  resize: vertical;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 10px;
}

/* -------------------------------------------------
   MEDIA QUERIES (ADMIN TABLES)
   ------------------------------------------------- */
@media (max-width: 900px) {
  .trainees-table-grid td:nth-child(4) {
    min-width: 260px;
  }

  .quizzes-table-grid td:nth-child(2) {
    min-width: 220px;
  }
}

@media (max-width: 640px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar .toolbar-right {
    justify-content: flex-end;
  }

  .admin-toolbar .screen-add-button {
    width: 100%;
    text-align: center;
  }
}

/* -------------------------------------------------
   MEDIA / VIDEO THUMBS
   ------------------------------------------------- */
.video-thumb {
  max-width: 120px;
  height: auto;
  border-radius: 4px;
  display: block;
}

/* step thumbnail (latest consistent version) */
.step-thumb {
  width: 70px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
  margin-right: 12px;
}

.step-thumb.placeholder {
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.7rem;
}

.step-meta {
  flex: 1;
}

/* disable buttons in step view toolbar */
.step-view-card .toolbar.right button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* -------------------------------------------------
   VIDEO SHELL (TRAINEE)
   ------------------------------------------------- */
.video-shell {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.video-embed {
  position: relative;
  width: 100%;
  max-height: 500px;
  /* never taller than 500px */
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}


.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  max-height: 500px;
  max-width: calc(500px * (16 / 9));
  /* limit width based on max height */
}



/* Trainee variant of fake-video (on dark shell) */
.trainee-video-shell {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
}

.trainee-video-shell .fake-video {
  padding: 30px 16px;
  color: #e5e7eb;
}

/* -------------------------------------------------
   PROGRESS (FRAMED VARIANT)
   ------------------------------------------------- */
.progress.progress-framed {
  position: relative;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 6px;
  height: 20px;
  overflow: hidden;
}

.progress.progress-framed .progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e5e7eb, #d1d5db);
  transition: width 0.25s ease;
}

/* explicitly partial */
.progress.progress-framed .progress-bar.is-partial {
  background: linear-gradient(90deg, #e5e7eb, #d1d5db);
}

/* fully complete = green */
.progress.progress-framed .progress-bar.is-complete {
  background: linear-gradient(90deg, #e1ff7d, #a0ff4b);
}

/* label inside framed progress */
.progress.progress-framed .progress-label {
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  color: #1f2937;
}

/* -------------------------------------------------
   COURSE PROGRESS CARDS (INSIDE TABLE CELL)
   ------------------------------------------------- */
.course-progress-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px 10px;
  background: #fff;
  margin-bottom: 8px;
}

.course-progress-card:last-child {
  margin-bottom: 0;
}

.course-progress-title {
  font-weight: 600;
}

.course-progress-meta {
  font-size: 12px;
  margin: 4px 0 8px;
}

/* ensure course cards don't get crushed */
.trainees-table-grid td:nth-child(4) {
  min-width: 240px;
}

/* -------------------------------------------------
   TRAINEE APP LAYOUT SHELL
   ------------------------------------------------- */

/* header area */
.trainee-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.trainee-greeting {
  font-size: 20px;
  font-weight: 600;
}

.trainee-subtext {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

/* -------------------------------------------------
   TRAINEE COURSE LIST (BASE)
   ------------------------------------------------- */
.trainee-course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* legacy basic course card */
.trainee-course-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.course-card-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-name {
  font-weight: 600;
}

.course-meta {
  font-size: 12px;
}

.course-card-actions {
  flex: 0 0 auto;
}

/* shell showing progress block */
.course-progress-shell {
  background: #f9fafb;
  border: 1px solid #eef0f2;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

/* modules container */
.trainee-modules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trainee-module-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: 14px 14px 10px;
}

.trainee-module-header {
  gap: 10px;
  align-items: center;
}

.module-title {
  font-weight: 600;
}

.module-meta {
  font-size: 12px;
}

.trainee-module-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* -------------------------------------------------
   STEPS / ITEMS (TRAINEE VIEW)
   ------------------------------------------------- */
.trainee-steps-block,
.trainee-quizzes-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}

.step-meta {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-title {
  font-weight: 500;
}

.step-sub {
  font-size: 12px;
}

.step-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* -------------------------------------------------
   GENERIC BUTTON CLASS (.btn)
   ------------------------------------------------- */
/* De-pill: shared button class used across trainee views */
.btn {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.btn.sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.btn.ok {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

.btn.ghost {
  background: transparent;
}

/* small button variant used in several places */
.btn.sm,
button.btn.sm {
  padding: 4px 9px;
  font-size: 0.7rem;
}

/* accent variant (uses theme accent) */
.btn.accent,
button.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink, #fff);
}

.btn.accent:hover,
button.btn.accent:hover {
  background: var(--accent);
  border-color: var(--accent);
  filter: brightness(0.96);
}

.btn.accent.sm,
button.btn.accent.sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

/* -------------------------------------------------
   EXTRA HELPERS
   ------------------------------------------------- */
.row {
  display: flex;
}

.mt-2 {
  margin-top: 10px;
}

/* -------------------------------------------------
   TRAINEE QUIZ VIEW
   ------------------------------------------------- */
.trainee-quiz-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-question-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quiz-question-title {
  font-weight: 500;
}

.quiz-option {
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
}

.quiz-option input {
  cursor: pointer;
}

.quiz-actions {
  margin-top: 6px;
}

/* -------------------------------------------------
   TRAINEE MODAL
   ------------------------------------------------- */
.trainee-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.trainee-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  min-width: 320px;
  max-width: 430px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.trainee-modal-header {
  font-weight: 600;
}

.trainee-modal-body {
  font-size: 13px;
  color: #4b5563;
}

.trainee-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* picker (when no trainee selected) */
.trainee-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* -------------------------------------------------
   RESPONSIVE TWEAKS (TRAINEE)
   ------------------------------------------------- */
@media (max-width: 700px) {
  .trainee-header.row {
    flex-wrap: wrap;
  }

  .trainee-course-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .trainee-module-header.row {
    flex-wrap: wrap;
  }

  .trainee-step-row {
    flex-wrap: wrap;
  }

  .course-card-actions {
    width: 100%;
  }
}

/* -------------------------------------------------
   COURSES ADMIN: CARD LIST
   ------------------------------------------------- */
.admin-courses-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-course-card {
  border-radius: 6px;
  border: 1px solid var(--border-subtle, #e3e3e3);
  background: #fff;
  padding: 0.75rem 1rem;
}

.admin-course-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-course-card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-course-card-status .pill {
  white-space: nowrap;
}

.admin-course-card-modules-section {
  margin-bottom: 0.5rem;
}

.admin-course-card-modules-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.admin-course-card-modules {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.admin-course-card-modules li {
  margin: 0.1rem 0;
}

.admin-course-card-modules-empty {
  font-size: 0.85rem;
}

.admin-course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.admin-course-card-updated {
  white-space: nowrap;
}

/* -------------------------------------------------
   "SHOW IN APP?" CHECKBOX LAYOUT
   ------------------------------------------------- */
.show-in-app-wrap {
  margin-bottom: 1rem;
  width: 300px;
}

.show-in-app-chk {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 20px;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.show-in-app-chk input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: 20px;
}

.show-in-app-label-text {
  font-size: 0.9rem;
  line-height: 1.3;
  width: 300px;
}

/* -------------------------------------------------
   TRAINEE AUTH (LOGIN / SIGNUP)
   ------------------------------------------------- */
.trainee-shell.trainee-auth-shell {
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 60px;
}

.trainee-auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trainee-auth-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trainee-auth-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.trainee-auth-title {
  margin: 0;
  font-size: 1.35rem;
}

.trainee-auth-subtitle {
  font-size: 0.9rem;
  margin-top: 2px;
}

.trainee-auth-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .trainee-auth-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.trainee-auth-panel {
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trainee-auth-panel.secondary {
  background: #fdfdfd;
}

.trainee-auth-panel-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.trainee-auth-panel-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.trainee-auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.trainee-auth-panel label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.trainee-auth-panel input {
  font-size: 0.85rem;
}

.trainee-auth-actions {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trainee-auth-actions .btn {
  width: 100%;
  justify-content: center;
}

.trainee-auth-error {
  font-size: 0.8rem;
  color: var(--bad);
}

.trainee-auth-hint {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* -------------------------------------------------
   TRAINEE COURSE CARDS (ADMIN-STYLE + PROGRESS)
   ------------------------------------------------- */
.trainee-course-card.admin-course-card {
  border-radius: 10px;
  padding: 10px 12px 12px;
}

.trainee-course-card-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.trainee-course-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.trainee-course-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trainee-course-card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.trainee-course-card-desc {
  font-size: 0.8rem;
  line-height: 1.35;
}

.trainee-course-card-percent {
  font-size: 0.75rem;
}

.trainee-course-card-meta {
  margin-top: 4px;
  font-size: 0.8rem;
}

.trainee-course-card-progress {
  margin-top: 6px;
}

.trainee-course-card-progress .progress.progress-framed {
  width: 100%;
}

.trainee-course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.8rem;
}

.trainee-course-card-footer .btn {
  white-space: nowrap;
}

/* -------------------------------------------------
   LAB AUTH SHELL
   ------------------------------------------------- */
.lab-auth-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 16px;
}

.lab-auth-card {
  width: 100%;
  max-width: 540px;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lab-auth-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lab-auth-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.lab-auth-title {
  margin: 0;
  font-size: 1.4rem;
}

.lab-auth-subtitle {
  font-size: 0.9rem;
}

/* Panels */
.lab-auth-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lab-auth-panel {
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
}

.lab-auth-panel-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.lab-auth-panel-sub {
  font-size: 0.8rem;
  width: 100%;
  color: var(--muted);
}

.lab-auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.lab-auth-field label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.lab-auth-actions {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lab-auth-error {
  font-size: 0.8rem;
  color: var(--bad);
}

.lab-auth-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.lab-auth-link {
  margin-top: 4px;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
}

/* Buttons (use --accent, de-pilled) */
.lab-btn {
  appearance: none;
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.14s ease, transform 0.14s ease, border 0.14s ease;
}

.lab-btn:hover {
  background-color: #000;
  transform: translateY(-1px);
}

.lab-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.lab-btn-ghost {
  background: transparent;
}

/* Quick picker */
.lab-auth-picker {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #eceff1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lab-auth-picker-title {
  font-size: 0.8rem;
  color: var(--muted);
}

.lab-auth-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lab-auth-picker-row .lab-btn {
  font-size: 0.8rem;
}

/* -------------------------------------------------
   TRAINEE COURSE DETAIL (MODULES)
   ------------------------------------------------- */
.course-progress-shell.course-progress-shell--full {
  margin-top: 6px;
  margin-bottom: 12px;
}

.trainee-module-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius-lg);
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow, 0 4px 10px rgba(15, 23, 42, 0.03));
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.trainee-module-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.trainee-module-card.is-locked {
  background: rgba(248, 250, 252, 0.4);
  border-color: rgba(148, 163, 184, 0.35);
  filter: grayscale(0.15);
  opacity: 0.8;
}

.trainee-module-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.module-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  margin-top: 2px;
  flex: 0 0 auto;
}

.module-expand-btn:hover {
  background: #e5e7eb;
}

.module-expand-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #e5e7eb;
}

.module-header-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-title-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.module-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.module-description {
  font-size: 0.8rem;
  line-height: 1.35;
}

.module-progress-line .progress.progress-framed {
  margin-top: 2px;
}

/* status pill on modules, de-pilled */
.module-status-pill {
  font-size: 0.65rem;
  background: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 2px 8px 2px;
  text-transform: none;
  color: #0f172a;
}

.module-status-pill.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.module-footer-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

/* expanded content */
.trainee-module-body {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* step cards inside modules */
.trainee-steps-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trainee-step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 6px 8px;
}

.trainee-step-card.is-done {
  background: #ecfdf3;
  border-color: rgba(22, 101, 52, 0.28);
}

.trainee-step-card.is-locked {
  background: rgba(248, 250, 252, 0.5);
  opacity: 0.9;
}

.step-card-left {
  flex: 0 0 70px;
}

.step-card-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 1500px;
}

.step-card-title-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.step-title {
  font-weight: 600;
  font-size: 0.8rem;
}

.step-sub {
  font-size: 0.7rem;
}

.step-actions-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.takequiz-actions-row {
  width: 120px;
}

/* step status chips, de-pilled */
.step-status {
  font-size: 0.6rem;
  background: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1px 6px 2px;
}

.step-status.done {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.step-status.locked {
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

/* quizzes in expanded state */
.trainee-quizzes-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trainee-quizzes-block .block-title {
  font-weight: 600;
  font-size: 0.78rem;
  color: #0f172a;
}

.quiz-card {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.25);
}

/* -------------------------------------------------
   TRAINEE COURSE LIST (PRETTY CARDS)
   ------------------------------------------------- */
.trainee-course-list.trainee-course-list--cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trainee-course-card.trainee-course-card--big {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow, 0 4px 10px rgba(15, 23, 42, 0.03));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.course-title-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.course-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.course-sub {
  font-size: 0.78rem;
  line-height: 1.3;
}

/* de-pilled progress chip */
.course-progress-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}

.course-progress-line .progress.progress-framed {
  margin-top: 2px;
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.course-card-footer .course-meta {
  font-size: 0.73rem;
}

@media (max-width: 540px) {
  .course-card-head {
    flex-direction: column;
  }

  .course-progress-pill {
    align-self: flex-start;
  }

  .course-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* -------------------------------------------------
   TRAINEE COURSE CARD – FINAL TRAINEE VERSION
   ------------------------------------------------- */
.trainee-course-card.trainee-course-card--trainee {
  background: var(--card, #fff);
  border-radius: 18px;
  border: 1px solid var(--line, #e5e7eb);
  box-shadow: var(--shadow, 0 4px 10px rgba(15, 23, 42, 0.03));
  padding: 14px 16px 12px;
  width: 100%;
}

.trainee-course-card--trainee .trainee-course-card-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trainee-course-card--trainee .trainee-course-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trainee-course-card--trainee .trainee-course-card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.trainee-course-card--trainee .trainee-course-card-percent {
  font-size: 0.75rem;
  color: #6b7280;
}

.trainee-course-card--trainee .trainee-course-card-meta {
  font-size: 0.8rem;
}

.trainee-course-card--trainee .trainee-course-card-progress {
  margin-top: 4px;
}

.trainee-course-card--trainee .trainee-course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.8rem;
}

.trainee-course-card--trainee .trainee-course-card-footer .btn {
  white-space: nowrap;
}



/* --------------------------- CSS (paste below your file) ---------------------------
   Modern quiz styles (qv-*) — custom radios, elegant cards, sticky footer
----------------------------------------------------------------------------------- */

/* layout */
.qv-shell { gap: 14px; }
.qv-header { align-items: flex-start; }
.qv-title-wrap { display: flex; flex-direction: column; gap: 6px; }
.qv-title { margin: 0; font-size: 24px; line-height: 1.2; }
.qv-sub { font-size: 13px; }
.qv-empty { padding: 18px; }

.qv-form { display: grid; gap: 16px; }

.qv-question-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--admin-shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.qv-question-head { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.qv-qindex {
  font-family: 'RBNo3.1', 'Aktiv Grotesk', sans-serif;
  background: var(--admin-pill-bg);
  color: var(--muted);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
}
.qv-question-text { margin: 0; font-size: 16px; line-height: 1.35; }

.qv-options {
  display: grid;
  gap: 10px;
}

/* option (custom radio): structure = label.qv-option > input.qv-input + span.qv-bullet + span.qv-option-text */
.qv-option {
  --ring: 0 0 0 0 rgba(0,0,0,0);
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid var(--admin-border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.qv-option:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.qv-option:active { transform: translateY(0); box-shadow: var(--shadow); }
.qv-option:focus-within { box-shadow: 0 0 0 4px rgba(67, 70, 75, 0.12); border-color: var(--accent); }

/* hide the native control but keep it accessible */
.qv-input {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}

/* decorative bullet */
.qv-bullet {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--pop);
  display: inline-block;
  position: relative;
}
.qv-bullet::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 140ms ease;
}

/* text */
.qv-option-text { font-size: 14px; color: var(--ink); }

/* checked state via descendant selector */
.qv-option .qv-input:checked + .qv-bullet { border-color: var(--accent); }
.qv-option .qv-input:checked + .qv-bullet::after { transform: scale(1); }
.qv-option .qv-input:checked ~ .qv-option-text { font-weight: 700; }

/* keyboard focus ring on the pseudo control */
.qv-option .qv-input:focus-visible + .qv-bullet { outline: 2px solid rgba(67, 70, 75, 0.28); outline-offset: 2px; }

/* sticky actions */
.qv-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px; margin-top: 8px;
  background: linear-gradient(180deg, rgba(247,247,247,0), rgba(247,247,247,1) 60%);
  border-top: 1px solid var(--line);
}
.qv-submit { min-width: 120px; }

/* responsive */
@media (min-width: 860px) {
  .qv-question-card { padding: 18px; }
  .qv-title { font-size: 28px; }
  .qv-question-text { font-size: 18px; }
}
