:root {
  --biru: #1F4E78;
  --biru-muda: #E6F1FB;
  --biru-hover: #163A59;
  --abu: #F4F5F7;
  --abu-border: #D8DCE1;
  --teks: #222630;
  --teks-muted: #6B7280;
  --merah: #C0392B;
  --hijau: #1E7E34;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--abu);
  color: var(--teks);
  font-size: 14px;
}

a { color: var(--biru); }

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--biru);
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.18s ease, padding 0.18s ease, opacity 0.15s ease;
}
.sidebar.collapsed {
  width: 0;
  padding: 20px 0;
  opacity: 0;
  pointer-events: none;
}
.sidebar > * { white-space: nowrap; }

.sidebar h1 {
  font-size: 15px;
  padding: 0 20px 16px;
  margin: 0 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 10px 20px;
  font-size: 13px;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.12); color: white; }

.main { flex: 1; padding: 28px 32px; max-width: 1100px; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.topbar h2 { margin: 0; font-size: 19px; font-weight: bold; }
.topbar-left { display: flex; align-items: center; gap: 12px; }

.btn-toggle-sidebar {
  background: white;
  color: var(--biru);
  border: 1px solid var(--abu-border);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-toggle-sidebar:hover { background: var(--abu); }

.card {
  background: white;
  border: 1px solid var(--abu-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-5 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }

.metric { text-align: left; border-left: 5px solid var(--biru); }
.metric .num { font-size: 26px; font-weight: bold; color: var(--biru); }
.metric .label { font-size: 12px; color: var(--teks-muted); margin-top: 2px; }
.metric.warna-hijau { border-left-color: var(--hijau); }
.metric.warna-hijau .num { color: var(--hijau); }
.metric.warna-oranye { border-left-color: #C87F0A; }
.metric.warna-oranye .num { color: #C87F0A; }
.metric.warna-ungu { border-left-color: #6B3FA0; }
.metric.warna-ungu .num { color: #6B3FA0; }
.metric.warna-biru-tua { border-left-color: #0E7C86; }
.metric.warna-biru-tua .num { color: #0E7C86; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--abu-border); vertical-align: top; }
th { background: var(--abu); font-weight: bold; }

button, .btn {
  background: var(--biru);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
button:hover, .btn:hover { background: var(--biru-hover); }
button.secondary { background: white; color: var(--biru); border: 1px solid var(--biru); }
button.secondary:hover { background: var(--biru-muda); }
button.danger { background: white; color: var(--merah); border: 1px solid var(--merah); }
button.danger:hover { background: #FBEAEA; }
button.small { padding: 4px 10px; font-size: 12px; }

input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--abu-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 10px;
}
label { font-size: 12px; font-weight: bold; color: var(--teks-muted); display: block; margin-bottom: 4px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  background: var(--biru-muda);
  color: var(--biru);
}
.badge.off { background: #F0F0F0; color: #888; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--abu-border); }
.tabs button { background: none; color: var(--teks-muted); border-radius: 0; border-bottom: 2px solid transparent; padding: 8px 14px; }
.tabs button.active { color: var(--biru); border-bottom: 2px solid var(--biru); font-weight: bold; }
.tabs button:hover { background: var(--abu); }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--abu);
}
.login-box {
  background: white;
  border: 1px solid var(--abu-border);
  border-radius: var(--radius);
  padding: 32px;
  width: 340px;
}
.login-box h1 { font-size: 17px; text-align: center; color: var(--biru); margin: 0 0 4px; }
.login-box p.sub { text-align: center; font-size: 12px; color: var(--teks-muted); margin: 0 0 20px; }
.error-msg { background: #FBEAEA; color: var(--merah); padding: 8px 12px; border-radius: var(--radius); font-size: 12px; margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--teks-muted); margin-top: 8px; }

.item-row {
  border: 1px solid var(--abu-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: white;
}
.item-row .info { flex: 1; }
.item-row .kode { font-size: 11px; color: var(--teks-muted); font-weight: bold; }
.item-row .urutan-badge {
  display: inline-block; font-size: 11px; font-weight: bold; color: #fff;
  background: var(--biru); border-radius: 10px; padding: 1px 8px;
  margin-right: 6px; vertical-align: middle;
}
.item-row .teks { font-size: 13px; margin: 3px 0; }
.item-row .meta { font-size: 11px; color: var(--teks-muted); }
.item-row .actions { display: flex; gap: 6px; flex-shrink: 0; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box {
  background: white; border-radius: var(--radius); padding: 22px 26px;
  width: 520px; max-height: 85vh; overflow-y: auto;
}
.modal-box h3 { margin: 0 0 16px; font-size: 15px; color: var(--biru); }
.opsi-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.opsi-row input { margin-bottom: 0; }

.section-title { font-size: 13px; font-weight: bold; color: var(--biru); margin: 18px 0 10px; text-transform: uppercase; letter-spacing: 0.4px; }

.empty-state { text-align: center; padding: 30px; color: var(--teks-muted); font-size: 13px; }

/* ==== Halaman survei responden ==== */
.survey-wrap { max-width: 720px; margin: 0 auto; padding: 30px 20px 90px; position: relative; }
.survey-header { text-align: center; margin-bottom: 24px; position: relative; }
.survey-header h1 { color: var(--biru); font-size: 20px; margin-bottom: 4px; }
.survey-header p { color: var(--teks-muted); font-size: 13px; }
.brand-logo { position: absolute; top: 0; left: 0; max-height: 52px; width: auto; }
@media (max-width: 560px) {
  .brand-logo { position: static; display: block; margin: 0 auto 10px; max-height: 44px; }
}

.app-check-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.app-check-list label {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--abu-border); border-radius: 20px;
  padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: normal;
  background: white;
}
.app-check-list input { width: auto; margin: 0; }
.app-check-list label:has(input:checked) { border-color: var(--biru); background: var(--biru-muda); color: var(--biru); }

.pertanyaan-block {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--abu-border);
}
.pertanyaan-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pertanyaan-block .p-teks { font-size: 14px; margin-bottom: 8px; font-weight: normal; }
.pertanyaan-block .p-wajib { color: var(--merah); }

.step-battery-title { color: var(--biru); font-size: 17px; font-weight: bold; margin: 0 0 6px; }
.step-battery-desc { font-size: 13px; color: var(--teks-muted); margin: 0 0 18px; line-height: 1.5; }

.likert-row { display: flex; align-items: center; gap: 14px; }
.likert-row label { display: flex; flex-direction: column; align-items: center; font-size: 11px; gap: 4px; font-weight: normal; color: var(--teks-muted); }
.likert-row input,
.radio-list input[type="radio"],
.checkbox-list input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--biru);
  cursor: pointer;
}
.likert-endlabels { display: flex; justify-content: space-between; font-size: 11px; color: var(--teks-muted); margin-top: 6px; }

.semdiff-row { display: flex; align-items: center; gap: 12px; }
.semdiff-row .pole { font-size: 12px; color: var(--teks-muted); min-width: 100px; }
.semdiff-row .pole.kanan { text-align: right; }
.semdiff-row input[type=range] { flex: 1; margin: 0; }
.semdiff-value { font-size: 12px; font-weight: bold; min-width: 16px; text-align: center; }
.semdiff-arrow { color: var(--biru); font-size: 10px; }

/* ==== Layout baris untuk pertanyaan LIKERT (SUS & Kontekstual): kiri teks, kanan jawaban ==== */
.likert-row-block { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.likert-row-block .p-teks { flex: 1; }
.likert-answer-area { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.likert-selected-label { font-size: 11px; color: var(--biru); font-weight: bold; min-width: 118px; }
@media (max-width: 640px) {
  .likert-row-block { flex-direction: column; align-items: stretch; gap: 8px; }
  .likert-answer-area { justify-content: space-between; }
  .likert-selected-label { min-width: 0; text-align: right; }
}

.lainnya-input { margin-top: 8px; }

/* ==== Wizard form survei (6 langkah) ==== */
.progress-wrap { margin-bottom: 20px; }
.progress-bar-track { background: var(--abu-border); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar-fill { background: var(--biru); height: 100%; border-radius: 20px; transition: width 0.25s ease; }
.progress-label { font-size: 12px; color: var(--teks-muted); margin-top: 6px; text-align: center; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.wizard-nav button { min-width: 120px; }

.radio-list label, .checkbox-list label { display: flex; align-items: center; gap: 8px; font-weight: normal; font-size: 13px; margin-bottom: 6px; }
/* Ukuran input radio/checkbox di-set di aturan .radio-list input[type="radio"] (atas) - jangan
   override di sini supaya perbesaran ukuran tombol tetap berlaku (revisi 17 Jul 2026). */

.section-divider { border: none; border-top: 1px solid var(--abu-border); margin: 24px 0; }
.app-battery-title { color: var(--biru); font-size: 15px; margin: 0 0 4px; }
.app-battery-sub { font-size: 12px; color: var(--teks-muted); margin: 0 0 14px; }

.success-box { text-align: center; padding: 60px 20px; }
.success-box h2 { color: var(--hijau); }

/* ==== Halaman landing / selamat datang ==== */
.landing-body { margin: 0; }
.landing-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 90px;
  background: linear-gradient(180deg, #F4F8FC 0%, #E6F1FB 100%);
}
.landing-content {
  max-width: 640px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.landing-illustration { width: 100%; max-width: 420px; height: auto; margin-bottom: 18px; }
.landing-title {
  color: var(--biru);
  font-size: 24px;
  line-height: 1.4;
  margin: 0 0 10px;
  font-weight: bold;
}
.landing-subtitle {
  color: var(--teks-muted);
  font-size: 13px;
  margin: 0 0 28px;
}
.landing-btn {
  display: inline-block;
  background: var(--biru);
  color: #fff;
  text-decoration: none;
  padding: 13px 34px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 6px 16px rgba(31,78,120,0.28);
  transition: background 0.15s, transform 0.15s;
}
.landing-btn:hover { background: var(--biru-hover); transform: translateY(-1px); }
.landing-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--teks-muted);
  background: #FFFFFF;
  border-top: 1px solid var(--abu-border);
}
@media (max-width: 560px) {
  .landing-title { font-size: 19px; }
}

