:root{ --primary:#0b2543; --accent:#FFD400; --muted:#64748b; --bg:#f6f8fc; }
*{ box-sizing:border-box; font-family:Poppins,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif }
body{ margin:0; background:var(--bg); color:#0f172a }

header{ background:var(--primary); color:#fff; padding:22px 16px }
header .wrap{ max-width:1100px; margin:auto }
header h1{ font-size:20px; margin:0; font-weight:700 }
header p{ margin:2px 0 0; font-size:13px; color:#e2e8f0 }

main{ max-width:1100px; margin:20px auto; padding:0 16px }

.card{ background:#fff; border:1px solid #e5e7eb; border-radius:16px;
       box-shadow:0 8px 20px rgba(2,6,23,.04); padding:18px; margin-bottom:20px }

/* === SEARCH BAR === */
.searchbar-wrap {
  text-align: center;
  margin-bottom: 10px;
}

.searchbar {
  display: inline-flex;
  gap: 12px;
  max-width: 600px;
  width: 100%;
}

.searchbar input {
  flex: 1;
  min-width: 220px;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
}

.searchbar button {
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight:600;
  cursor:pointer;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}

/* === RESULT SECTION === */
.result{ margin-top:16px; display:none }
.result h2{ margin:0 0 6px; font-size:18px }

.meta{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px; margin:10px 0 }
.meta div{ background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:10px; font-size:14px }

table{ width:100%; border-collapse:collapse; margin-top:8px }
th,td{ border:1px solid #e5e7eb; padding:10px 8px; font-size:14px; text-align:center }
th{ background:#f8fafc }
.agg{ font-weight:700 }

.actions{ margin-top:16px; display:flex; justify-content:center; gap:12px; flex-wrap:wrap }
.btn{ padding:12px 20px; border-radius:12px; border:1px solid #dbe3ea; background:#fff; color:#0f172a; text-decoration:none; font-weight:600; display:inline-block }
.btn.primary{ background:var(--accent); border-color:#eab308 }

#statusText{ margin-top:10px; color:#475569; font-size:13px; text-align:center }

#bandChartWrap{ margin-top:20px; display:none; text-align:center }
canvas{ max-width:560px; margin:auto }

footer{ margin:28px 0; color:var(--muted); font-size:13px; text-align:center }

.band-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.band-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 kotak per baris */
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.band-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.band-card span {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
  color: #0b2543;
}

/* Responsif: bila skrin kecil, auto 2 kolum */
@media (max-width: 768px) {
  .band-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.header-flex {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  height: 48px;   /* boleh ubah ikut sesuai */
  width: auto;
}

.exam-title {
  text-align: center;
  margin: 20px 0;
}

.exam-title h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0b2543;
}
