/* ─── CSS Variables ─── */
:root {
  --pink-100: #fff0f3;
  --pink-200: #ffd6e0;
  --pink-300: #ffb3c6;
  --pink-400: #f4829a;
  --pink-500: #e8607d;

  --matcha-100: #f0f5ee;
  --matcha-200: #d4e5cc;
  --matcha-300: #aecfa0;
  --matcha-400: #7bae6a;
  --matcha-500: #5a8f4a;

  --cream: #fdfaf7;
  --text-dark: #2d2d2d;
  --text-mid: #6b7280;
  --text-light: #9ca3af;

  --shadow-soft: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.12);
  --radius-card: 24px;
  --radius-input: 12px;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--cream);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow-x: hidden;
}

/* ─── Decorative Background Blobs ─── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--pink-300), transparent 70%);
  top: -150px; right: -100px;
}
body::after {
  width: 450px; height: 450px;
  background: radial-gradient(circle, var(--matcha-300), transparent 70%);
  bottom: -120px; left: -80px;
}

/* ─── Card ─── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 48px 44px;
  transition: box-shadow 0.3s ease;
}
.auth-card:hover {
  box-shadow: var(--shadow-hover);
}

/* ─── Brand Header ─── */
.brand-header {
  text-align: center;
  margin-bottom: 32px;
}
.brand-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--pink-300), var(--matcha-300));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.brand-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 300;
}

.brand-logo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
}
/* ─── Tab Pills ─── */
.tab-pills {
  display: flex;
  background: var(--pink-100);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 32px;
  gap: 4px;
}
.tab-pill {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  border: none;
  background: transparent;
}
.tab-pill.active {
  background: #fff;
  color: var(--pink-500);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tab-pill:hover:not(.active) {
  color: var(--text-dark);
  background: rgba(255,255,255,0.6);
}

/* ─── Form Panels ─── */
.form-panel {
  display: none;
  animation: fadeSlideUp 0.3s ease forwards;
}
.form-panel.active { display: block; }

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

/* ─── Labels ─── */
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 6px;
}

/* ─── Inputs ─── */
.input-wrap {
  position: relative;
  margin-bottom: 18px;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s;
}
.form-control {
  border: 1.5px solid #ebebeb;
  border-radius: var(--radius-input);
  padding: 11px 42px 11px 40px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--pink-400);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(244, 130, 154, 0.14);
}
.form-control:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--pink-400);
}
.form-control::placeholder { color: var(--text-light); }

/* ─── Password Toggle ─── */
.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--pink-400); }

/* ─── Validation ─── */
.form-control.is-invalid {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 3px rgba(232, 96, 125, 0.12);
}
.invalid-feedback {
  font-size: 0.78rem;
  color: var(--pink-500);
  margin-top: -12px;
  margin-bottom: 14px;
  display: none;
}
.form-control.is-invalid ~ .invalid-feedback { display: block; }
.form-control.is-valid {
  border-color: var(--matcha-400);
  box-shadow: 0 0 0 3px rgba(123, 174, 106, 0.12);
}

/* ─── Buttons ─── */
.btn-primary-custom {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  font-size: 0.925rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.2px;
  border: none;
  background: linear-gradient(135deg, var(--pink-400) 0%, var(--pink-500) 100%);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.btn-primary-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,96,125,0.35);
}
.btn-primary-custom:hover::after { opacity: 1; }
.btn-primary-custom:active { transform: translateY(0); }

.btn-matcha {
  background: linear-gradient(135deg, var(--matcha-400) 0%, var(--matcha-500) 100%);
}
.btn-matcha:hover { box-shadow: 0 6px 20px rgba(90,143,74,0.32); }

/* ─── Footer note ─── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-light);
}
.auth-footer a {
  color: var(--matcha-500);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-footer a:hover { color: var(--matcha-400); text-decoration: underline; }

/* ─── Password Strength Bar ─── */
.pw-strength { margin-top: -12px; margin-bottom: 16px; }
.pw-strength-bar {
  height: 4px;
  border-radius: 8px;
  background: #ebebeb;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease, background 0.3s;
  width: 0%;
}
.pw-strength-label {
  font-size: 0.72rem;
  margin-top: 4px;
  color: var(--text-light);
}

/* ─── Toast ─── */
.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}
.toast-custom {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: var(--text-dark);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  border-left: 4px solid var(--matcha-400);
  min-width: 240px;
}
.toast-custom.show { transform: translateX(0); }
.toast-icon { font-size: 1.1rem; }

/* ─── Responsive ─── */
@media (max-width: 520px) {
  .auth-card { padding: 36px 24px; }
}