:root {
  --paper: #FFF6E9;
  --ink: #2B1B10;
  --ink-soft: #6B5541;
  --orange: #E85C0D;
  --orange-deep: #C24A08;
  --orange-soft: #FDE3CE;
  --line: #E8D5B8;
  --green: #2F7A4F;
  --red: #C13B3B;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  position: relative;
}

.blob {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}
.blob-top {
  top: -110px;
  left: -130px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, #F5883A, var(--orange));
  opacity: 0.9;
}
.blob-bottom {
  bottom: -140px;
  right: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 70% 70%, var(--orange), var(--orange-deep));
  opacity: 0.95;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vh, 14px);
  overflow: hidden;
}

.brand { text-align: center; flex-shrink: 0; }
.brand-logo {
  width: clamp(64px, 16vh, 96px);
  height: clamp(64px, 16vh, 96px);
  object-fit: contain;
  margin-bottom: -24px;
}
.brand-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(19px, 5.5vh, 26px);
  margin: 0;
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.brand-suruh { color: var(--orange); }
.brand-beli { color: var(--ink); }
.brand-tagline {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.brand-tagline span { color: var(--orange); font-weight: 700; }

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: clamp(14px, 3vh, 20px) 16px clamp(12px, 2.5vh, 18px);
  box-shadow: 0 1px 2px rgba(43,27,16,0.06), 0 16px 32px -18px rgba(43,27,16,0.35);
  border: 1px solid var(--line);
  flex-shrink: 1;
  overflow-y: auto;
}

.card-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 4vh, 19px);
  margin: 0 0 2px;
}
.card-subtitle {
  margin: 0 0 clamp(10px, 2vh, 16px);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  margin-bottom: clamp(8px, 1.6vh, 12px);
  transition: border-color 0.15s ease;
}
.field:focus-within { border-color: var(--orange); }
.field-icon {
  width: 40px;
  height: clamp(42px, 6.2vh, 46px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.field-icon svg { width: 17px; height: 17px; }
.field input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 12px 0 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  /* 16px minimum prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  color: var(--ink);
  outline: none;
  min-width: 0;
  height: clamp(42px, 6.2vh, 46px);
}
.field input::placeholder { color: #B8A88E; }
.field-toggle {
  width: 42px;
  height: clamp(42px, 6.2vh, 46px);
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.field-toggle svg { width: 17px; height: 17px; }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 clamp(8px, 1.6vh, 14px);
  gap: 8px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  min-height: 36px;
}
.checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--orange);
  cursor: pointer;
  flex-shrink: 0;
}
.link {
  background: none;
  border: none;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
}

.form-error {
  background: #F8E2E2;
  color: var(--red);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 14px;
  font-weight: 500;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 13px;
  padding: 0;
  height: clamp(44px, 6.4vh, 48px);
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 10px 20px -8px rgba(232,92,13,0.55);
  transition: transform 0.1s ease, opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-google {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  height: clamp(44px, 6.4vh, 48px);
  background: #fff;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: clamp(8px, 1.6vh, 12px);
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.btn-google:active { transform: scale(0.98); border-color: var(--orange); }

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: clamp(10px, 2.2vh, 18px) 0 clamp(8px, 1.8vh, 14px);
  color: var(--ink-soft);
  font-size: 11.5px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider span { padding: 0 12px; }

.social-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: clamp(10px, 2vh, 16px);
}
.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
  flex-shrink: 0;
}
.social-btn:active { border-color: var(--orange); }

.trust-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  flex-shrink: 0;
}
.trust-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: rgba(255,255,255,0.55);
  border-radius: 14px;
  padding: 8px;
  min-width: 0;
}
.trust-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  color: var(--orange);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--orange-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.trust-item strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.trust-item p {
  margin: 1px 0 0;
  font-size: 9px;
  color: var(--ink-soft);
  line-height: 1.2;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43,27,16,0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.4);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
}
.modal-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 4px;
  padding-right: 24px;
}
.modal-subtitle {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.modal-back {
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

/* Layar pendek: sembunyikan trust-row supaya login tetap satu layar penuh tanpa scroll */
@media (max-height: 700px) {
  .trust-row { display: none; }
}
@media (max-height: 620px) {
  .brand-tagline { display: none; }
  .divider { display: none; }
}

.toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  z-index: 50;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.4);
  max-width: 88%;
  text-align: center;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Layar sangat kecil (contoh: iPhone SE, 320px) */
@media (max-width: 340px) {
  .brand-name { font-size: 24px; }
  .card { padding: 18px 14px 16px; }
  .trust-item p { display: none; }
}

/* Teks buat SEO — kebaca Google, ga keliatan di layar/desain */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


