/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pink: #ec4899;
  --pink-light: #f472b6;
  --red: #ef4444;
  --red-dark: #dc2626;
  --gradient-main: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #db2777 100%);
  --gradient-soft: linear-gradient(135deg, #fff0f3 0%, #ffe4ec 100%);
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-light: #fbcfe8;
  --white: #ffffff;
  --shadow-pink: 0 20px 50px rgba(236, 72, 153, 0.18);
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(160deg, #fff5f7 0%, #ffffff 45%, #fff0f5 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Background Decoration ===== */
.bg-decor {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: #fbcfe8;
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: #fecdd3;
  bottom: -100px;
  right: -80px;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: #fda4af;
  top: 40%;
  right: 10%;
  opacity: 0.2;
}

/* ===== Page Layout ===== */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
}

/* ===== Trust Ribbon ===== */
.trust-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border-light);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.12);
  animation: fadeDown 0.6s ease;
  text-align: center;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--pink);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(236,72,153,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(236,72,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(236,72,153,0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Auth Card ===== */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-pink);
  overflow: hidden;
  animation: fadeUp 0.7s ease;
  border: 1px solid #ffe4ec;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.accent-bar {
  height: 6px;
  width: 100%;
  background: var(--gradient-main);
}

.card-inner {
  padding: 40px 36px 32px;
}

/* ===== Brand Logo ===== */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.logo-icon {
  width: 46px;
  height: 46px;
  background: var(--gradient-main);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.35);
  flex-shrink: 0;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
}

.brand-logo h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Safety Badge ===== */
.safety-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gradient-soft);
  color: var(--red-dark);
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 30px;
  margin: 0 auto 24px;
  width: fit-content;
  border: 1px solid #fbcfe8;
  text-align: center;
}

.safety-badge svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ===== Heading ===== */
.heading-block {
  text-align: center;
  margin-bottom: 28px;
}

.heading-block h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.heading-block p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0 6px;
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #d1a3b5;
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrapper input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid #f3d4e0;
  border-radius: 12px;
  background: #fffafb;
  color: var(--text-dark);
  transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
  color: #b8a0aa;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--pink);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

/* Extra right padding on password field so text never hides behind the eye icon */
#password {
  padding-right: 46px;
}

/* ===== Password Toggle Button (FIXED) ===== */
.toggle-password {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #b8a0aa;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  pointer-events: none; /* Critical fix: forces clicks to hit the button, not the hollow SVG */
}

.toggle-password:hover {
  color: var(--pink);
  background: rgba(236, 72, 153, 0.08);
}

.toggle-password:active {
  transform: scale(0.92);
}

.toggle-password.active {
  color: var(--pink);
}

/* ===== Error Messages ===== */
.error-msg {
  display: block;
  color: var(--red);
  font-size: 12px;
  margin-top: 6px;
  min-height: 14px;
  font-weight: 500;
}

/* ===== Form Options ===== */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input {
  display: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #f3b8cc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox-wrapper input:checked + .custom-checkbox {
  background: var(--gradient-main);
  border-color: transparent;
}

.checkbox-wrapper input:checked + .custom-checkbox::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.forgot-link {
  font-size: 13px;
  color: var(--pink);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

/* ===== Primary Button ===== */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--gradient-main);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.35);
  transition: all 0.25s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
  pointer-events: none;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Spinner state */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Divider ===== */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 18px;
  color: #c9a8b6;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #f3d4e0;
}

.divider span {
  padding: 0 12px;
}

/* ===== Footer ===== */
.footer-text {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.create-link {
  color: var(--pink);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.create-link:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

/* ===== Feature Strip ===== */
.feature-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 440px;
  width: 100%;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.08);
}

.feature-icon {
  font-size: 14px;
}

/* ===== Mission Note ===== */
.mission-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 400px;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .card-inner {
    padding: 32px 24px 26px;
  }

  .brand-logo h1 {
    font-size: 20px;
  }

  .heading-block h2 {
    font-size: 22px;
  }

  .trust-ribbon {
    font-size: 11.5px;
    padding: 8px 14px;
  }

  .feature-strip {
    gap: 8px;
  }

  .feature-item {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 360px) {
  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .page-wrapper {
    padding: 60px 20px;
  }
}