/* ==========================================================================
   Meewnu Auth Styles (Daftar & Masuk)
   Konsisten dengan palet hangat Meewnu: Terracotta, Krem, Hijau Tua
   ========================================================================== */

/* Auth Layout Wrapper */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-cream-light);
  background-image: radial-gradient(rgba(184, 75, 42, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Auth Navigation Header */
.auth-header {
  height: 76px;
  border-bottom: 1px solid var(--color-cream-warm-border);
  background-color: rgba(247, 239, 223, 0.95);
  backdrop-filter: blur(8px);
}

.auth-header-container,
.auth-header .auth-header-container {
  width: 100%;
  max-width: 1020px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--space-20) !important;
  padding-right: var(--space-20) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.auth-header-logo img {
  height: 38px;
  width: auto;
}

.auth-header-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.auth-header-link a {
  color: var(--color-terracotta);
  font-weight: 700;
  margin-left: 4px;
}

.auth-header-link a:hover {
  text-decoration: underline;
}

/* Auth Main Content */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-48) var(--space-20);
  width: 100%;
  box-sizing: border-box;
}

.auth-container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  box-sizing: border-box;
}

.auth-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: var(--space-48);
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Auth Side Promo / Companion */
.auth-companion-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-companion-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  background-color: var(--color-cream-warm);
  border: 1px solid var(--color-cream-warm-border);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-terracotta);
  margin-bottom: var(--space-20);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-companion-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.22;
  color: var(--color-text-charcoal);
  margin-bottom: var(--space-16);
}

.auth-companion-title em {
  font-style: italic;
  color: var(--color-terracotta);
}

.auth-companion-desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-24);
}

.auth-benefits-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-bottom: var(--space-32);
}

.auth-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  font-size: var(--text-sm);
  color: var(--color-text-charcoal);
}

.auth-benefit-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-green-light);
  color: var(--color-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Mascot Display in Auth */
.auth-mascot-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 260px;
  position: relative;
  margin-top: var(--space-12);
}

.auth-mascot-img {
  width: 165px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(42, 36, 32, 0.12));
}

.auth-tagline-bubble {
  position: absolute;
  top: -18px;
  right: -20px;
  background-color: var(--color-cream-warm);
  border: 1px solid var(--color-cream-warm-border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Pinned Photo Frame Component
   Efek frame foto berbingkai polaroid dengan pin peniti realistis,
   bayangan bertingkat (layered shadow) dan kemiringan organik
   ========================================================================== */
.auth-photo-pin-container {
  width: 100%;
  max-width: 450px;
  margin-top: var(--space-20);
  position: relative;
  perspective: 1000px;
}

.pinned-photo-frame {
  position: relative;
  background-color: #FFFFFF;
  padding: 12px 12px 14px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(232, 211, 181, 0.85);
  box-shadow: 
    0 2px 4px rgba(42, 36, 32, 0.04),
    0 8px 18px -2px rgba(42, 36, 32, 0.1),
    0 22px 38px -8px rgba(42, 36, 32, 0.13);
  transform: rotate(-1.75deg);
  transform-origin: 50% 12px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
  cursor: default;
}

.pinned-photo-frame:hover {
  transform: rotate(0.35deg) translateY(-5px) scale(1.018);
  box-shadow: 
    0 4px 8px rgba(42, 36, 32, 0.05),
    0 16px 32px -4px rgba(42, 36, 32, 0.14),
    0 30px 54px -10px rgba(42, 36, 32, 0.16);
}

/* Realistic 3D Pushpin */
.photo-pushpin {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  line-height: 0;
}

.pinned-pushpin-svg {
  display: block;
  width: 38px;
  height: 44px;
}

/* Photo Inner & Gloss Effect */
.photo-inner {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--color-cream-warm);
  aspect-ratio: 3 / 2;
  box-shadow: inset 0 0 0 1px rgba(42, 36, 32, 0.08);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pinned-photo-frame:hover .photo-img {
  transform: scale(1.02);
}

.photo-gloss-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 38%, transparent 55%);
  pointer-events: none;
}

.photo-corner-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(232, 211, 181, 0.95);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-terracotta);
  box-shadow: 0 2px 6px rgba(42, 36, 32, 0.1);
  letter-spacing: 0.02em;
}

/* Caption on bottom margin */
.photo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: 8px 4px 2px 6px;
}

.photo-caption-handwriting {
  font-family: var(--font-hand);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--color-text-charcoal);
  line-height: 1.2;
}

.photo-caption-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-green-dark);
  background-color: var(--color-green-light);
  border: 1px solid rgba(47, 71, 51, 0.18);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Auth Card Form */
.auth-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-cream-warm-border);
  border-radius: var(--radius-xl);
  padding: var(--space-40) var(--space-32);
  box-shadow: 0 12px 36px rgba(42, 36, 32, 0.08);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
}

.auth-card-header {
  margin-bottom: var(--space-24);
}

.auth-card-header h1 {
  font-size: var(--text-3xl);
  color: var(--color-text-charcoal);
  font-weight: 400;
  margin-bottom: var(--space-8);
}

.auth-card-header p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Google Auth Button */
.btn-google {
  width: 100%;
  min-height: 48px;
  background-color: #FFFFFF;
  color: var(--color-text-charcoal);
  border: 1.5px solid var(--color-cream-warm-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
}

.btn-google:hover {
  background-color: var(--color-cream-light);
  border-color: #CBD5E1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-google:active {
  transform: translateY(0);
}

.btn-google svg {
  flex-shrink: 0;
}

/* Auth Divider ("atau") */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--space-20) 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-cream-warm-border);
}

.auth-divider span {
  padding: 0 var(--space-16);
}

/* Auth Tabs (for Login: WhatsApp OTP vs Kata Sandi) */
.auth-tabs {
  display: flex;
  background-color: var(--color-cream-warm);
  border: 1px solid var(--color-cream-warm-border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: var(--space-20);
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  text-align: center;
}

.auth-tab-btn.is-active {
  background-color: #FFFFFF;
  color: var(--color-terracotta);
  box-shadow: 0 2px 6px rgba(42, 36, 32, 0.08);
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: var(--space-20);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-charcoal);
  margin-bottom: var(--space-8);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 5px;
  line-height: 1.4;
}

.form-input-pill {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  background-color: var(--color-cream-light);
  border: 1.5px solid var(--color-cream-warm-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text-charcoal);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input-pill:focus {
  background-color: #FFFFFF;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px var(--color-terracotta-glow);
}

/* Prefix Input for Claimed Link */
.form-input-prefix-box {
  display: flex;
  align-items: center;
  background-color: var(--color-cream-light);
  border: 1.5px solid var(--color-cream-warm-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input-prefix-box:focus-within {
  background-color: #FFFFFF;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px var(--color-terracotta-glow);
}

.form-input-prefix {
  padding: 0.75rem 0.5rem 0.75rem 1rem;
  font-weight: 700;
  color: var(--color-terracotta);
  font-size: var(--text-base);
  user-select: none;
  white-space: nowrap;
}

.form-input-prefix-field {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem 0.75rem 0.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text-charcoal);
  outline: none;
}

.form-input-pill::placeholder,
.form-input-prefix-field::placeholder,
.auth-form input::placeholder,
.auth-form textarea::placeholder {
  color: #786f68;
  opacity: 0.52;
  font-weight: 400;
  font-style: normal;
  transition: opacity 0.15s ease;
}

.form-input-pill:focus::placeholder,
.form-input-prefix-field:focus::placeholder,
.auth-form input:focus::placeholder,
.auth-form textarea:focus::placeholder {
  opacity: 0.34;
}

/* Password with Toggle */
.form-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px;
}

.form-password-toggle:hover {
  color: var(--color-terracotta);
}

/* Checkbox Row */
.form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  margin-bottom: var(--space-24);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.form-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--color-terracotta);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-checkbox-row a {
  color: var(--color-terracotta);
  text-decoration: underline;
}

/* Auth Actions */
.auth-submit-btn {
  width: 100%;
  margin-bottom: var(--space-16);
}

/* Microcopy & Alternatives */
.auth-bottom-switch {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding-top: var(--space-16);
  border-top: 1px solid var(--color-cream-warm-border);
}

.auth-bottom-switch a {
  color: var(--color-terracotta);
  font-weight: 700;
  margin-left: 4px;
}

.auth-bottom-switch a:hover {
  text-decoration: underline;
}

/* Helper classes for compact Auth UI */
.form-error-msg {
  color: #c62828;
  font-size: 12px;
  font-weight: 500;
  margin: 4px 0 0;
}

.form-label-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-forgot-link {
  font-size: 12px;
  color: var(--color-terracotta);
  font-weight: 600;
}

.auth-notice-success {
  background-color: #E8F5E9;
  border: 1px solid #A5D6A7;
  color: #2E7D32;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-notice-success button {
  background: none;
  border: none;
  color: #2E7D32;
  font-weight: 700;
  cursor: pointer;
}

.auth-notice-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.auth-notice-registered {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  color: #166534;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.08);
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.auth-notice-registered-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.auth-notice-registered-content {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.auth-notice-registered-content strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
  color: #14532d;
  font-weight: 700;
}

.auth-notice-registered-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #166534;
  font-weight: 700;
  font-size: 16px;
  padding: 2px 4px;
  line-height: 1;
  flex-shrink: 0;
}

.auth-otp-box {
  background-color: var(--color-cream-warm);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--color-cream-warm-border);
  box-sizing: border-box;
  width: 100%;
}

.auth-otp-resend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: #6F645C;
  line-height: 1.4;
}

.auth-otp-resend button {
  color: var(--color-terracotta);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Password wrapper absolute toggle positioning */
.form-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.form-password-wrapper input {
  padding-right: 76px !important;
  width: 100%;
  box-sizing: border-box;
}

.form-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  z-index: 2;
  user-select: none;
}

.form-label-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

/* Responsive — Unified & Optimized Mobile View for Login & Register */
@media (max-width: 900px) {
  .auth-page {
    min-height: 100dvh;
  }

  .auth-header {
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .auth-header-container,
  .auth-header .auth-header-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 12px;
  }

  .auth-header-logo img {
    height: 28px;
    width: auto;
  }

  .auth-header-link {
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .auth-main {
    padding: 16px 14px max(24px, calc(16px + env(safe-area-inset-bottom, 0px)));
    align-items: flex-start;
  }

  .auth-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  .auth-grid {
    display: block;
    width: 100%;
  }

  /* Hide verbose left marketing column on mobile so form fits above the fold without scrolling */
  .auth-companion-side {
    display: none !important;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 20px;
    border-radius: 22px;
    box-sizing: border-box;
  }

  .auth-card-header {
    margin-bottom: 14px;
  }

  .auth-card-header h2 {
    font-size: 1.55rem;
    margin-bottom: 3px;
    line-height: 1.25;
  }

  .auth-card-header p {
    font-size: 13px;
    margin: 0;
    line-height: 1.45;
  }

  .btn-google {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .auth-divider {
    margin: 12px 0;
    font-size: 12px;
  }

  .auth-tabs {
    margin-bottom: 14px;
    padding: 3px;
    display: flex;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  .auth-tab-btn {
    flex: 1;
    min-width: 0;
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 700;
    min-height: 38px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }

  .form-group {
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .form-label {
    font-size: 12.5px;
    margin-bottom: 5px;
    line-height: 1.35;
  }

  .form-input-pill,
  .form-input-prefix-field {
    font-size: 16px !important; /* Prevents iOS / Instagram WebView auto-zoom */
    min-height: 46px;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .form-input-prefix-box {
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    min-height: 46px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .form-input-prefix {
    padding: 0 4px 0 14px !important;
    font-size: 13.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .form-input-prefix-field {
    padding: 10px 12px 10px 2px !important;
    min-width: 0;
    flex: 1;
    border: none;
    background: transparent;
  }

  .form-hint {
    font-size: 11.5px;
    margin-top: 4px;
    line-height: 1.4;
    word-break: break-word;
  }

  .form-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.45;
    width: 100%;
    box-sizing: border-box;
  }

  .form-checkbox-row input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }

  .form-checkbox-row label {
    margin: 0;
    word-break: break-word;
  }

  .auth-submit-btn {
    min-height: 48px;
    padding: 11px 16px;
    font-size: 15px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .auth-bottom-switch {
    padding-top: 12px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .auth-header {
    height: 52px;
  }

  .auth-header-container,
  .auth-header .auth-header-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .auth-header-link-prefix {
    display: none;
  }

  .auth-main {
    padding: 12px 10px max(20px, calc(12px + env(safe-area-inset-bottom, 0px)));
  }

  .auth-container {
    max-width: 100%;
  }

  .auth-card {
    padding: 20px 14px;
    border-radius: 18px;
  }
}

/* Scoped Overrides to guarantee 100% pixel-perfect match with original design */
.auth-page h1,
.auth-page h2,
.auth-page .auth-companion-title,
.auth-page .auth-card-header h2 {
  font-family: var(--font-serif) !important;
}

.auth-page .btn.btn-secondary {
  background-color: transparent !important;
  color: var(--color-green-dark) !important;
  border: 1.5px solid var(--color-green-dark) !important;
}

.auth-page .btn.btn-secondary:hover {
  background-color: var(--color-green-light) !important;
  color: var(--color-green-dark) !important;
}

.auth-page .btn.btn-terracotta {
  background-color: var(--color-terracotta) !important;
  color: #FFFFFF !important;
}

.auth-page .btn.btn-terracotta:hover {
  background-color: var(--color-terracotta-hover) !important;
}

