:root {
  --primary: #0f172a;
  --primary-soft: #1e293b;
  --secondary: #047857;
  --secondary-soft: #d1fae5;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #047857;
  --warning: #b45309;

  --bg: #f8fafc;
  --bg-muted: #eef2f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --border: #dbe3ef;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}

.brand-logo span {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.8px;
}

.brand-text h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: var(--primary);
}

.brand-text p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  text-decoration: none;
  color: var(--primary-soft);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 13px;
  border-radius: 999px;
}

.top-nav a:hover {
  background: var(--bg-muted);
}

/* =========================
   HERO
========================= */

.hero-section {
  padding: 72px 0 54px;
  background:
    radial-gradient(circle at top left, rgba(4, 120, 87, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 36%),
    linear-gradient(180deg, #ffffff, var(--bg));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-weight: 800;
  font-size: 13px;
}

.hero-content h2 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -1.4px;
}

.hero-content h2 span {
  display: block;
  color: var(--secondary);
}

.hero-description {
  max-width: 760px;
  margin: 20px 0 0;
  color: #475569;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.hero-card h3 {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 22px;
}

.hero-card ul {
  padding-left: 20px;
  margin: 0;
  color: #475569;
}

.hero-card li {
  margin-bottom: 10px;
}

/* =========================
   BUTTON
========================= */

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.btn-primary:hover {
  background: #020617;
}

.btn-secondary {
  color: var(--primary);
  background: #ffffff;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

/* =========================
   SECTION
========================= */

.section {
  padding: 72px 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section-title {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-title p {
  margin: 0 0 8px;
  color: var(--secondary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.16;
  color: var(--primary);
}

.section-title span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

/* =========================
   FORM
========================= */

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.compact-form {
  max-width: 860px;
}

.form-section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px dashed #cbd5e1;
}

.form-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}

.form-section h3 {
  margin: 0 0 18px;
  font-size: 20px;
  color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group-full {
  grid-column: 1 / -1;
}

label {
  color: #334155;
  font-weight: 800;
  font-size: 14px;
}

label strong {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 15px;
  outline: none;
  transition:
    border 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.12);
}

textarea {
  resize: vertical;
}

input[type="file"] {
  padding: 10px;
  background: #f8fafc;
}

small {
  color: var(--muted);
  font-size: 12px;
}

.upload-note {
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.upload-note p {
  margin: 0;
}

.agreement-box {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  color: #334155;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-message {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-weight: 700;
}

.form-message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-message.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #bbf7d0;
}

.form-message.info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* =========================
   SUCCESS BOX
========================= */

.success-box,
.check-result {
  margin-top: 28px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.success-box h3,
.check-result h3 {
  margin: 0 0 10px;
  color: var(--success);
  font-size: 24px;
}

.success-box p {
  margin: 0 0 14px;
  color: #475569;
}

.success-number {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.success-detail {
  color: #475569;
  margin-bottom: 18px;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================
   CHECK RESULT
========================= */

.check-result table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  margin: 16px 0 20px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.check-result td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.check-result tr:last-child td {
  border-bottom: 0;
}

.check-result td:first-child {
  width: 220px;
  font-weight: 800;
  color: var(--primary);
  background: #f8fafc;
}

/* =========================
   GUIDE
========================= */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.guide-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.guide-card span {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-weight: 900;
  margin-bottom: 14px;
}

.guide-card h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 18px;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  background: var(--primary);
  color: #e5e7eb;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  font-size: 14px;
}

/* =========================
   LOADING
========================= */

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(8px);
  padding: 20px;
}

.loading-card {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.loading-card h3 {
  margin: 16px 0 8px;
  color: var(--primary);
}

.loading-card p {
  margin: 0;
  color: var(--muted);
}

.spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 999px;
  border: 5px solid #e5e7eb;
  border-top-color: var(--secondary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .hero-section {
    padding: 46px 0 38px;
  }

  .section {
    padding: 48px 0;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .brand-text h1 {
    font-size: 16px;
  }

  .brand-text p {
    font-size: 12px;
  }

  .hero-content h2 {
    letter-spacing: -0.8px;
  }

  .form-card {
    padding: 18px;
    border-radius: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .btn,
  .success-actions .btn {
    width: 100%;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .check-result td {
    display: block;
    width: 100%;
  }

  .check-result td:first-child {
    width: 100%;
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .check-result td:last-child {
    padding-top: 4px;
  }
}

@media (max-width: 420px) {
  .top-nav a {
    font-size: 13px;
    padding: 8px 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .success-number {
    width: 100%;
    justify-content: center;
    text-align: center;
    border-radius: var(--radius-md);
  }
}
/* =========================
   LANDING PAGE
========================= */

.brand-link {
  text-decoration: none;
}

.landing-hero {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-meta div {
  min-width: 150px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-meta strong {
  display: block;
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 3px;
}

.hero-meta span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.landing-card {
  position: relative;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  background: var(--secondary-soft);
  color: var(--secondary);
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 12px;
}

.mini-steps {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.mini-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.mini-step span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.mini-step p {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.landing-note {
  margin-top: 18px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.landing-info-section {
  padding: 36px 0 72px;
  background: var(--bg);
}

.landing-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.info-box h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 20px;
}

.info-box p {
  margin: 0 0 14px;
  color: var(--muted);
}

.info-box a {
  color: var(--secondary);
  font-weight: 900;
  text-decoration: none;
}

.info-box a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .landing-hero {
    min-height: auto;
  }

  .landing-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-meta div {
    min-width: 0;
  }
}
/* =========================
   PANDUAN PAGE
========================= */

.panduan-card {
  margin-top: 28px;
}

.panduan-content {
  color: #475569;
  font-size: 15px;
}

.panduan-content p {
  margin: 0 0 14px;
}

.panduan-content p:last-child {
  margin-bottom: 0;
}

.panduan-content ul,
.panduan-content ol {
  margin: 0;
  padding-left: 22px;
}

.panduan-content li {
  margin-bottom: 9px;
}

.panduan-content li:last-child {
  margin-bottom: 0;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.simple-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
}

.simple-table th,
.simple-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 14px;
}

.simple-table th {
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.simple-table tr:last-child td {
  border-bottom: 0;
}

.simple-table td:first-child,
.simple-table th:first-child {
  width: 70px;
  text-align: center;
}

.simple-table td:last-child {
  font-weight: 800;
  color: var(--secondary);
}
/* =========================
   CEK PENDAFTARAN PAGE
========================= */

.cek-info-box {
  max-width: 860px;
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.cek-info-box h3 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 20px;
}

.cek-info-box ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: #475569;
}

.cek-info-box li {
  margin-bottom: 8px;
}

.cek-info-box p {
  margin: 0;
  color: var(--muted);
}
.top-nav a.is-active {
  background: var(--primary);
  color: #ffffff;
}
/* =========================
   FINAL PATCH / PERBAIKAN
========================= */

/* Struktur halaman agar footer lebih rapi di halaman pendek */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Menu aktif lebih stabil */
.top-nav a.is-active,
.top-nav a.is-active:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Fokus keyboard agar lebih ramah aksesibilitas */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(4, 120, 87, 0.28);
  outline-offset: 3px;
}

/* Header dan menu lebih rapi */
.brand-link {
  color: inherit;
}

.top-nav {
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

/* Tombol form agar tidak pecah di layar sedang */
.form-actions {
  flex-wrap: wrap;
}

/* Landing page lebih seimbang */
.landing-hero .hero-content {
  padding: 18px 0;
}

.landing-hero .hero-card {
  align-self: stretch;
}

/* Info box landing lebih konsisten */
.info-box {
  display: flex;
  flex-direction: column;
}

.info-box a {
  margin-top: auto;
}

/* Kartu panduan agar tidak terlalu rapat */
.guide-card {
  min-height: 100%;
}

/* Tabel lebih nyaman dibaca */
.simple-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Link kartu hasil pendaftaran */
.success-actions a[hidden],
.form-actions a[hidden] {
  display: none !important;
}

/* Responsif tambahan */
@media (max-width: 900px) {
  .site-header {
    position: static;
  }

  .header-inner {
    gap: 12px;
  }

  .top-nav {
    gap: 6px;
  }

  .landing-hero .hero-card {
    align-self: auto;
  }
}

@media (max-width: 680px) {
  .top-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
  }

  .landing-hero {
    padding-top: 38px;
  }

  .hero-card,
  .form-card,
  .success-box,
  .check-result,
  .cek-info-box,
  .info-box {
    border-radius: 16px;
  }

  .form-actions {
    gap: 10px;
  }

  .form-actions .btn,
  .success-actions .btn,
  .hero-actions .btn {
    width: 100%;
  }

  .simple-table {
    min-width: 640px;
  }
}

@media (max-width: 420px) {
  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-text h1 {
    font-size: 15px;
  }

  .brand-text p {
    font-size: 11px;
  }

  .hero-content h2 {
    font-size: 30px;
  }

  .section-title h2 {
    font-size: 26px;
  }
}