:root {
  --red: #dc2626;
  --red-dark: #b91c1c;

  --green: #16a34a;
  --green-dark: #15803d;

  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.10);

  --ring-red: rgba(220, 38, 38, 0.22);
  --ring-green: rgba(22, 163, 74, 0.18);

  --radius: 22px;
  --shadow: 0 20px 48px rgba(2, 6, 23, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 18% 10%, rgba(220, 38, 38, 0.10), transparent 60%),
    radial-gradient(760px 380px at 92% 18%, rgba(22, 163, 74, 0.08), transparent 62%),
    #fff;
}

.auth {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.card {
  width: min(420px, calc(100% - 32px));
  margin: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__header {
  position: relative;
  padding: 36px 22px 28px;
  /* background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.16), transparent 55%),
    linear-gradient(225deg, rgba(22, 163, 74, 0.12), transparent 55%),
    #fff; */
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.card__header::after {
  content: "";
  position: absolute;
  inset: -50px;
  /* background:
    radial-gradient(circle at 18% 30%, rgba(220, 38, 38, 0.25), transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(22, 163, 74, 0.20), transparent 55%); */
  filter: blur(34px);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(220, 38, 38, 0.20);
  background: rgba(220, 38, 38, 0.06);
  color: var(--red-dark);
  position: relative;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

.title {
  margin: 14px 0 6px;
  font-size: clamp(24px, 3.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

.subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  position: relative;
}

.form {
  padding: 18px 22px 14px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  font-size: 16px;
  margin-bottom: 6px;
  color: rgba(15, 23, 42, 0.8);
  display: block;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--border);
  font-size: 16px;
  outline: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.field input::placeholder {
  color: rgba(100, 116, 139, 0.7);
}

.field input:focus {
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow:
    0 0 0 4px var(--ring-red),
    0 0 0 7px var(--ring-green);
}

.input-with-btn {
  position: relative;
}

.input-with-btn input {
  padding-right: 48px;
}

.icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.8;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.05);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: rgba(15, 23, 42, 0.7);
}

.icon-btn.is-on svg {
  fill: var(--green);
}

.form p {
  margin: 0;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  margin: 14px 0 18px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.link {
  color: var(--red-dark);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.link.strong {
  color: var(--green-dark);
  font-weight: 600;
}

.btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 45%),
    var(--red);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  margin-bottom: 6px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px rgba(220, 38, 38, 0.32),
    0 10px 26px rgba(22, 163, 74, 0.12);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22);
}

.foot {
  margin-top: 10px;
  margin-bottom: 0;
  padding-bottom: 0;
  font-size: 16px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 420px) {
  .card__header {
    padding: 32px 18px 24px;
  }

  .form {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ===== TOASTIFY SMOOTH ANIMATION ===== */

/* animasi masuk */
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* animasi keluar */
@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
}

/* saat toast muncul */
.toastify.toastify-top.toastify-center {
  animation: toastIn 0.32s cubic-bezier(.16,1,.3,1);
}

/* saat toast akan dihapus */
.toastify.toastify-top.toastify-center.toastify--animate {
  animation: toastOut 0.22s ease-in forwards;
}
