/* ============================================
   KHN Training - stylesheet bersama
   Palet: navy seragam sebagai warna utama,
   kuning benang bordir sebagai aksen.
   ============================================ */

:root {
  --navy-900: #16273f;
  --navy-700: #22405f;
  --navy-500: #2f5a82;
  --thread-500: #c8912c;
  --thread-600: #a9761b;
  --paper: #f6f4ef;
  --paper-card: #ffffff;
  --ink: #1c2530;
  --ink-soft: #56606e;
  --line: #dfd9cb;
  --green: #2f7a4f;
  --red: #b23a3a;
  --radius: 10px;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--navy-500); }

.topbar {
  background: var(--navy-900);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.topbar .brand .thread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--thread-500);
  display: inline-block;
}

.topbar .who {
  font-size: 0.9rem;
  color: #c7d2de;
}

.topbar .who button {
  margin-left: 12px;
  background: transparent;
  border: 1px solid #3d5674;
  color: #c7d2de;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.82rem;
}
.topbar .who button:hover { border-color: var(--thread-500); color: #fff; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.wrap.wide { max-width: 1040px; }

h1 {
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: var(--navy-900);
}

h2 {
  font-size: 1.15rem;
  margin: 0 0 4px;
  color: var(--navy-900);
}

.subtitle {
  color: var(--ink-soft);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}

.module-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.module-card .info h2 { margin-bottom: 4px; }
.module-card .info p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.status-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.status-belum_mulai { background: #ece7db; color: var(--ink-soft); }
.status-proses { background: #fde9c8; color: var(--thread-600); }
.status-siap_kuis { background: #dce8f2; color: var(--navy-700); }
.status-lulus { background: #dcefe1; color: var(--green); }

.btn {
  display: inline-block;
  background: var(--navy-900);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 7px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--navy-700); }
.btn.secondary {
  background: transparent;
  color: var(--navy-900);
  border: 1px solid var(--navy-900);
}
.btn.secondary:hover { background: #eef1f4; }
.btn.accent { background: var(--thread-500); }
.btn.accent:hover { background: var(--thread-600); }
.btn[disabled] { background: #c9c3b4; cursor: not-allowed; }
.btn.block { display: block; width: 100%; }

video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  display: block;
}

.progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 14px;
}
.progress-fill {
  height: 100%;
  background: var(--thread-500);
  width: 0%;
  transition: width 0.3s;
}

.hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

.quiz-question {
  margin-bottom: 26px;
}
.quiz-question .q-text {
  font-weight: 600;
  margin-bottom: 10px;
}
.option-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.option-row:hover { border-color: var(--navy-500); }
.option-row input { margin-top: 3px; }
.option-row.selected { border-color: var(--navy-700); background: #eef2f6; }

.result-box {
  text-align: center;
  padding: 36px 20px;
}
.result-score {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 10px 0;
}
.result-box.pass .result-score { color: var(--green); }
.result-box.fail .result-score { color: var(--red); }

.login-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 1rem;
  margin-bottom: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: none;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 4px;
  margin-right: 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  color: var(--navy-900);
  border-bottom-color: var(--thread-500);
}

.form-grid { display: grid; gap: 12px; }
.form-grid label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.92rem;
  font-family: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.soal-block {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .module-card { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
}
