* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #35A29F;
  /* teal */
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px;
  color: #111827;
}

/* SPLASH SCREEN */
.splash-screen {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 100;
}

.splash-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 40px;
}

.splash-logo {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  font-size: 0.9rem;
  color: #6b7280;
}

.splash-title {
  font-size: 1rem;
  color: #374151;
  font-weight: 500;
}

.splash-footer {
  font-size: 0.85rem;
  color: #6b7280;
  padding-bottom: 32px;
}

.splash-version {
  color: #06b6d4;
}

/* wrapper utama konten app */
.container {
  max-width: 800px;
  width: 100%;
  opacity: 0;
  /* disembunyikan dulu sampai splash hilang */
  transition: opacity 0.3s ease;
}

.container.ready {
  opacity: 1;
}

/* setiap kartu putih (menu & form) */
.card-box {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  padding: 18px 18px 24px;
}

.card-box+.card-box {
  margin-top: 18px;
  /* jarak antar kartu */
}

/* GRID MENU ATAS */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.menu-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 14px 10px 16px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  border: 1px solid #f1f5f9;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.menu-card:hover {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.menu-card:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
}

.menu-icon.orange {
  background: #f59e0b;
}

.menu-icon.green {
  background: #22c55e;
}

.menu-icon.purple {
  background: #8b5cf6;
}

.menu-icon.red {
  background: #ef4444;
}

.menu-icon.blue {
  background: #2563eb;
}

.menu-icon.teal {
  background: #0d9488;
}

.menu-title {
  font-size: 0.9rem;
  color: #111827;
  margin-top: 4px;
}

h1 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1.6rem;
  text-align: center;
  color: #0f172a;
}

.subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 16px;
}

/* PROGRESS BAR */
.progress-wrapper {
  margin-bottom: 12px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0f9f93, #35A29F);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #4b5563;
}

.step-dots {
  display: flex;
  gap: 4px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: all 0.2s ease;
}

.step-dot.active {
  width: 22px;
  background: #35A29F;
}

form {
  margin-top: 8px;
}

.form-step {
  display: none;
  animation: fadeIn 0.25s ease;
}

.form-step.active {
  display: block;
}

.form-step small {
  display: block;
  margin-bottom: 16px;
  color: #6b7280;
  font-size: 0.8rem;
}

.field-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
  font-weight: 500;
  color: #35A29F;
}

label span.req {
  color: #dc2626;
  margin-left: 2px;
}

/* Input dengan icon */
.input-with-icon {
  position: relative;
}

.input-with-icon .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.75;
}

.input-with-icon.textarea-icon .icon {
  top: 14px;
  transform: none;
}

.input-with-icon input,
.input-with-icon select,
.input-with-icon textarea {
  padding-left: 34px;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #35A29F;
  box-shadow: 0 0 0 1px #35A29F33;
}

textarea {
  min-height: 70px;
  resize: vertical;
}

.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px #dc262633 !important;
  background: #fef2f2 !important;
}

.inline-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.inline-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.buttons.single-right {
  justify-content: flex-end;
}

button {
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

button:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* TOMBOL WARNA-WARNI MENYALA */
.btn-primary {
  position: relative;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  background: linear-gradient(90deg,
      #0ea5e9,
      #22c55e,
      #eab308,
      #f97316,
      #ec4899,
      #6366f1,
      #0ea5e9);
  background-size: 300% 300%;
  animation: glowGradient 5s ease infinite;
  box-shadow: 0 0 12px rgba(15, 118, 110, 0.6);
}

.btn-primary:disabled {
  background: #9ca3af;
  background-size: auto;
  animation: none;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.2);
}

.btn-secondary {
  background: #e5f3f2;
  color: #0f172a;
}

.btn-share {
  background: #f3f4f6;
  color: #111827;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 999px;
}

.btn-share:hover {
  background: #e5e7eb;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.share-icon.facebook {
  background: #1877f2;
}

.share-icon.whatsapp {
  background: #25d366;
}

.share-icon.telegram {
  background: #229ed9;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.share-info {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 4px;
}

.share-info strong {
  color: #111827;
}

.summary-box {
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  padding: 10px 12px;
  background: #f9fafb;
  max-height: 260px;
  overflow: auto;
  font-size: 0.85rem;
}

.summary-box h3 {
  margin: 8px 0 4px;
  font-size: 0.9rem;
  color: #111827;
}

.summary-box ul {
  padding-left: 18px;
  margin: 4px 0 0;
}

.summary-box li {
  margin-bottom: 2px;
}

.hidden {
  display: none !important;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.popup-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 18px 16px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
  animation: scaleIn 0.2s ease;
}

.popup-title {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #111827;
}

.popup-text {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(249, 250, 251, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  backdrop-filter: blur(2px);
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid #e5e7eb;
  border-top-color: #35A29F;
  animation: spin 0.7s linear infinite;
}

.hint {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 2px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* animasi gradasi tombol */
@keyframes glowGradient {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
  }

  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.7);
  }

  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
  }
}

@media (max-width: 600px) {
  body {
    padding: 16px 10px;
  }

  .card-box {
    padding: 16px 14px 22px;
  }

  .buttons {
    flex-direction: column-reverse;
  }

  .buttons button {
    width: 100%;
  }
}