/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a6b;
  --primary-dark: #0f2347;
  --primary-light: #2554a0;
  --gold: #FFD700;
  --gold-dark: #c9a800;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --gray: #f8fafc;
  --gray-border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.16);
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: #eef2f7;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== PARTICLES ===== */
.particles {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}

/* ===== HEADER ===== */
.site-header {
  position: relative;
  background: linear-gradient(135deg, #0f2347 0%, #1a3a6b 40%, #2554a0 70%, #1a3a6b 100%);
  overflow: hidden;
  padding: 48px 20px 56px;
  text-align: center;
}

.site-header::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: #eef2f7;
  clip-path: ellipse(55% 100% at 50% 100%);
}

.header-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,215,0,0.08) 0%, transparent 70%);
}

.header-content {
  position: relative; z-index: 2;
  max-width: 800px; margin: 0 auto;
}

.logo-row {
  display: flex; align-items: center;
  justify-content: center; gap: 18px;
  margin-bottom: 20px;
}

.logo-emblem svg { width: 72px; height: 72px; filter: drop-shadow(0 0 12px rgba(255,215,0,0.5)); }

.logo-text { text-align: left; }

.school-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem; font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.school-sub {
  display: block;
  font-size: 0.85rem; color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

.header-divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 18px auto;
  border-radius: 2px;
}

.header-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: 2px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.header-subtitle {
  font-size: 1.05rem;
  color: var(--gold);
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: 1px;
}

.header-badges {
  display: flex; gap: 12px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.badge {
  padding: 6px 18px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-year { background: rgba(255,215,0,0.2); color: var(--gold); border: 1px solid rgba(255,215,0,0.4); }
.badge-official { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.2); }

/* ===== MAIN ===== */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px 60px;
  position: relative; z-index: 1;
}

/* ===== INFO BANNER ===== */
.info-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 28px;
  color: #1e40af;
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-icon { flex-shrink: 0; margin-top: 1px; }

/* ===== SEARCH CARD ===== */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  border: 1px solid var(--gray-border);
}

.search-card-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-border);
}

.card-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(26,58,107,0.3);
}

.search-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--primary);
}

.search-desc { font-size: 0.875rem; color: var(--text-muted); margin-top: 2px; }

/* FORM */
.search-form { display: flex; flex-direction: column; gap: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 0.875rem; font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
}

.input-wrapper { position: relative; }

.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(37,84,160,0.1);
}

.form-input::placeholder { color: #b0bec5; }

.input-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* CAPTCHA */
.captcha-box {
  background: #f8fafc;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.captcha-check {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
}

.captcha-check input[type="checkbox"] { display: none; }

.checkmark {
  width: 22px; height: 22px;
  border: 2px solid var(--gray-border);
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--white);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}

.captcha-check input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.captcha-check input:checked + .checkmark::after {
  content: '';
  width: 6px; height: 10px;
  border: 2px solid white;
  border-top: none; border-left: none;
  transform: rotate(45deg);
  display: block;
  margin-top: -2px;
}

/* BUTTON */
.btn-search {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(26,58,107,0.35);
  letter-spacing: 0.3px;
}

.btn-search:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,58,107,0.45);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-search:active { transform: translateY(0); }
.btn-search:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-text, .btn-loader {
  display: flex; align-items: center;
  justify-content: center; gap: 10px;
}

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESULT SECTION ===== */
.result-section { animation: fadeInUp 0.5s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--gray-border);
}

/* STATUS AREA */
.result-status {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.status-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-status.lulus { background: linear-gradient(135deg, #052e16 0%, #166534 50%, #15803d 100%); }
.result-status.tidak-lulus { background: linear-gradient(135deg, #450a0a 0%, #991b1b 50%, #b91c1c 100%); }
.result-status.not-found { background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #4338ca 100%); }

.status-animation { position: relative; display: inline-block; margin-bottom: 16px; }

.status-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.status-icon-wrap.lulus { background: rgba(255,255,255,0.15); color: #86efac; border: 3px solid rgba(134,239,172,0.5); }
.status-icon-wrap.tidak-lulus { background: rgba(255,255,255,0.15); color: #fca5a5; border: 3px solid rgba(252,165,165,0.5); }
.status-icon-wrap.not-found { background: rgba(255,255,255,0.15); color: #c4b5fd; border: 3px solid rgba(196,181,253,0.5); }

.status-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 99px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 700;
  margin: 12px 0 10px;
  letter-spacing: 1px;
}

.status-badge.lulus { background: rgba(134,239,172,0.2); color: #86efac; border: 1px solid rgba(134,239,172,0.4); }
.status-badge.tidak-lulus { background: rgba(252,165,165,0.2); color: #fca5a5; border: 1px solid rgba(252,165,165,0.4); }
.status-badge.not-found { background: rgba(196,181,253,0.2); color: #c4b5fd; border: 1px solid rgba(196,181,253,0.4); }

.status-message { color: rgba(255,255,255,0.85); font-size: 0.9rem; line-height: 1.5; }

/* DETAIL GRID */
.result-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.result-detail-grid.single { grid-template-columns: 1fr; }

.detail-section {
  padding: 28px 32px;
  border-top: 1px solid var(--gray-border);
}

.detail-section:not(:last-child) { border-right: 1px solid var(--gray-border); }

.detail-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-border);
}

.detail-table { display: flex; flex-direction: column; gap: 10px; }

.detail-row {
  display: grid;
  grid-template-columns: 130px 10px 1fr;
  gap: 4px;
  font-size: 0.9rem;
  align-items: start;
}

.detail-key { color: var(--text-muted); font-weight: 500; }
.detail-sep { color: var(--text-muted); }
.detail-val { font-weight: 600; color: var(--text); word-break: break-word; }

.status-lulus-inline {
  color: var(--green) !important;
  background: var(--green-light);
  padding: 2px 12px;
  border-radius: 99px;
  font-size: 0.82rem;
  display: inline-block;
}

.status-tidaklulus-inline {
  color: var(--red) !important;
  background: var(--red-light);
  padding: 2px 12px;
  border-radius: 99px;
  font-size: 0.82rem;
  display: inline-block;
}

/* SKL SECTION */
.skl-section { background: #f8fafc; }

.skl-info-box {
  text-align: center;
  padding: 8px 0;
}

.skl-icon-big {
  color: var(--primary-light);
  opacity: 0.5;
  margin-bottom: 10px;
}

.skl-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.btn-download {
  display: inline-flex;
  align-items: center; gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(22,163,74,0.35);
  letter-spacing: 0.3px;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22,163,74,0.45);
  background: linear-gradient(135deg, #15803d, #166534);
}

.skl-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex; align-items: center;
  justify-content: center; gap: 5px;
}

/* SKL PENDING */
.skl-pending-box {
  margin-top: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fffbeb, #fef9c3);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #92400e;
  text-align: left;
}

.skl-pending-box svg { flex-shrink: 0; margin-top: 2px; color: #d97706; }

.skl-pending-box p { font-size: 0.88rem; line-height: 1.6; margin: 0; }

.skl-pending-box strong { font-weight: 700; color: #78350f; }

/* RESULT FOOTER */
.result-footer {
  padding: 16px 32px;
  font-size: 0.82rem;
  line-height: 1.6;
  border-top: 1px solid var(--gray-border);
}

.result-footer.lulus { background: #f0fdf4; color: #166534; }
.result-footer.tidak-lulus { background: #fff1f2; color: #9f1239; }

.result-footer strong { font-weight: 700; }

/* NOT FOUND */
.not-found-tips {
  padding: 24px 32px;
  border-top: 1px solid var(--gray-border);
}

.not-found-tips h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.not-found-tips ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}

.not-found-tips ul li::before {
  content: '•';
  color: var(--primary);
  font-weight: 700;
  margin-right: 8px;
}

.not-found-tips ul li { font-size: 0.875rem; color: var(--text-muted); }

.not-found-tips p { font-size: 0.875rem; color: var(--text-muted); }

/* BTN BACK */
.btn-back {
  display: flex; align-items: center; gap: 8px;
  margin: 20px 32px;
  padding: 10px 20px;
  background: none;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef2f7;
}

/* ===== STATS ===== */
.stats-section { margin-top: 36px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-icon { color: var(--primary-light); margin-bottom: 10px; }
.stat-icon.lulus-icon { color: var(--green); }
.stat-icon.persen-icon { color: #7c3aed; }
.stat-icon.tahun-icon { color: var(--gold-dark); }

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem; font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-value.lulus-val { color: var(--green); }
.stat-value.persen-val { color: #7c3aed; }

.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 40px 20px;
  position: relative; z-index: 1;
}

.footer-content { max-width: 700px; margin: 0 auto; }

.footer-logo {
  display: flex; align-items: center;
  justify-content: center; gap: 10px;
  margin-bottom: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}

.footer-address, .footer-contact { font-size: 0.83rem; margin-bottom: 4px; }

.footer-divider {
  width: 40px; height: 2px;
  background: var(--gold);
  margin: 16px auto;
  border-radius: 2px;
  opacity: 0.6;
}

.footer-copy { font-size: 0.8rem; margin-bottom: 4px; }
.footer-note { font-size: 0.76rem; opacity: 0.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .search-card { padding: 24px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .result-detail-grid { grid-template-columns: 1fr; }
  .detail-section:not(:last-child) { border-right: none; border-bottom: 1px solid var(--gray-border); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-row { flex-direction: column; text-align: center; }
  .logo-text { text-align: center; }
  .detail-row { grid-template-columns: 110px 10px 1fr; }
  .result-status { padding: 28px 16px 24px; }
  .detail-section { padding: 20px 16px; }
  .result-footer { padding: 14px 16px; }
  .btn-back { margin: 16px; }
  .not-found-tips { padding: 20px 16px; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .header-title { font-size: 1.6rem; }
}
