/* ══════════════════════════════════════
   Login / Daftar / Lupa Sandi
   ══════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  background: linear-gradient(180deg, #87ceeb 0%, #b5e8f7 35%, #ddf2fc 60%, #eef9ff 100%);
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── Background hero ── */
.hero-bg {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 2.6;
  background: url('../assets/bg.webp') center / cover no-repeat;
  position: relative;
}
.hero-bg .close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Card ── */
.card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px 22px 0 0;
  margin-top: -26px;
  position: relative;
  z-index: 2;
  min-height: 50vh;
  padding-bottom: 40px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
}
.tab-btn {
  flex: 1;
  padding: 20px 0 14px;
  border: none;
  background: transparent;
  font-size: 17px;
  font-weight: 400;
  color: #94a3b8;
  cursor: pointer;
  position: relative;
  transition: color 0.25s, font-weight 0.25s;
}
.tab-btn.active {
  font-weight: 700;
  color: #1a1a2e;
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

/* ── Page title (lupa sandi) ── */
.page-title {
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  color: #1a1a2e;
  padding: 22px 0 6px;
}

/* ── Form body ── */
.form-body {
  padding: 18px 22px 0;
}

/* ── Input fields ── */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f7ff;
  border-radius: 12px;
  padding: 13px 14px;
  margin-bottom: 12px;
}
.field input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #1e293b;
  outline: none;
  font-family: inherit;
}
.field input::placeholder {
  color: #94a3b8;
}

/* ── Icons ── */
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.icon-user { color: #60a5fa; }
.icon-lock { color: #60a5fa; }

.eye-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  color: #94a3b8;
}

/* ── Country code ── */
.country-code {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  border-right: 1px solid #e2e8f0;
  margin-right: 4px;
  flex-shrink: 0;
}
.flag-id {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.flag-id span:first-child { flex: 1; background: #FF0000; }
.flag-id span:last-child  { flex: 1; background: #FFFFFF; border: 1px solid #eee; border-top: none; }
.country-code .code {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}

/* ── Phone + Send (lupa sandi) ── */
.field-with-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f7ff;
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  margin-bottom: 12px;
}
.field-with-btn input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #1e293b;
  outline: none;
  font-family: inherit;
}
.field-with-btn input::placeholder { color: #94a3b8; }
.send-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.send-btn:hover { background: #2563eb; }
.send-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

/* ── OTP boxes ── */
.otp-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.otp-box {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: #f0f7ff;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
  font-family: inherit;
}
.otp-box:focus {
  box-shadow: 0 0 0 2px #60a5fa;
}

/* ── Checkbox rows ── */
.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 22px;
  font-size: 13px;
  color: #475569;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.check-label input[type="checkbox"] { display: none; }
.custom-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.check-label input:checked + .custom-check {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.custom-check svg { display: none; }
.check-label input:checked + .custom-check svg { display: block; }

.forgot-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}
.forgot-link:hover { text-decoration: underline; }

.contract-link {
  color: #3b82f6;
  font-weight: 500;
  cursor: pointer;
}

.age-row {
  margin: 14px 0 22px;
}
.age-row .check-label {
  align-items: flex-start;
  line-height: 1.5;
}

/* ── Security question label ── */
.security-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
  padding-left: 2px;
}

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  padding: 15px 0;
  border: none;
  border-radius: 50px;
  background: linear-gradient(90deg, #60a5fa, #2563eb, #3b82f6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(59,130,246,0.35);
  transition: box-shadow 0.2s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.btn-submit:hover {
  box-shadow: 0 6px 24px rgba(59,130,246,0.45);
}
.btn-submit:active {
  transform: scale(0.985);
}
/* dotted pattern overlay on button */
.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
}

/* ── Alert messages ── */
.alert {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ── Responsive ── */
@media (min-width: 500px) {
  .hero-bg { border-radius: 0 0 20px 20px; }
  .card { border-radius: 22px; margin-top: -26px; margin-bottom: 40px; }
  body { justify-content: center; padding: 20px; }
}
