/* Monezzi — Auth pages (signin, signup, forgot) */

/* Self-contained design tokens — auth layout does NOT load landing.css. */
:root {
  --bg:           #FFFFFF;
  --bg-elev:      #FFFFFF;
  --bg-soft:      #F8FAFC;
  --ink:          #0F172A;
  --ink-2:        #475569;
  --muted:        #94A3B8;
  --line:         #CBD5E1;          /* visible default border */
  --line-soft:    #E4E9F0;
  --line-strong:  #94A3B8;
  --primary:      #2563EB;
  --primary-soft: #EFF6FF;
  --primary-ink:  #1D4ED8;
}

/* Buttons — auth layout does NOT load landing styles.css, so define locally. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 14px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover { background: var(--primary-ink); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-soft); }
.btn-lg { padding: 14px 24px; font-size: 16px; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } }

/* Brand panel */
.auth-brand {
  position: relative;
  padding: 56px;
  background:
    radial-gradient(60% 80% at 20% 0%, rgba(37,99,235,0.18), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(252,165,165,0.20), transparent 70%),
    linear-gradient(160deg, #0B1220, #1E293B 70%);
  color: #E2E8F0;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
@media (max-width: 900px) { .auth-brand { display: none; } }
.auth-brand .logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: 28px; letter-spacing: -0.025em; color: #fff;
  display: inline-flex; align-items: center; gap: 10px;
  position: relative; z-index: 1;
}
.auth-brand .logo .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(140deg, #60A5FA, #2563EB);
  box-shadow: 0 0 16px rgba(96,165,250,0.6);
}
.auth-brand-inner {
  position: relative; z-index: 1;
  max-width: 440px;
}
.auth-brand h2 {
  font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: #fff;
}
.auth-brand p { color: #94A3B8; font-size: 15px; margin-top: 14px; line-height: 1.6; }
.auth-brand ul {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-brand li {
  display: flex; align-items: start; gap: 12px;
  font-size: 14.5px; color: #CBD5E1; line-height: 1.5;
}
.auth-brand li svg { flex: 0 0 auto; color: #60A5FA; margin-top: 2px; }

.auth-brand-foot {
  position: relative; z-index: 1;
  font-size: 13px; color: #64748B;
  display: flex; gap: 18px; flex-wrap: wrap;
}
.auth-brand-foot a { color: #94A3B8; text-decoration: none; }
.auth-brand-foot a:hover { color: #fff; }

/* Decorative orbit on brand side */
.auth-brand::before {
  content: ""; position: absolute;
  width: 520px; height: 520px; right: -180px; bottom: -180px;
  border-radius: 50%;
  border: 1px dashed rgba(148,163,184,0.25);
  pointer-events: none;
}
.auth-brand::after {
  content: ""; position: absolute;
  width: 320px; height: 320px; right: -80px; bottom: -80px;
  border-radius: 50%;
  border: 1px dashed rgba(148,163,184,0.18);
  pointer-events: none;
}

/* Form panel */
.auth-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px clamp(24px, 4vw, 56px);
  position: relative;
}
.auth-form {
  width: 100%; max-width: 440px;
}
.auth-mobile-logo {
  display: none; margin-bottom: 28px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 24px; letter-spacing: -0.025em; color: var(--ink);
}
@media (max-width: 900px) { .auth-mobile-logo { display: block; } }

.auth-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 10px;
}
.auth-form h1 {
  font-family: var(--font-display); font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.2;
  color: var(--ink);
}
.auth-form > p.lede {
  font-size: 15px; color: var(--ink-2); margin-top: 10px; line-height: 1.55;
}

/* Form fields */
.field {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 18px;
}
.field label {
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.field label .req { color: #DC2626; margin-inline-start: 2px; }
.field input,
.field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-elev); color: var(--ink);
  font-size: 14.5px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.field input::placeholder { color: var(--muted); }
.field .err {
  font-size: 12.5px; color: #DC2626; margin-top: 2px; display: none;
}
.field.invalid input,
.field.invalid select { border-color: #DC2626; }
.field.invalid .err { display: block; }

.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* Phone with country code — wide enough for "🇹🇷 Türkiye +90". */
.phone-wrap {
  display: grid; grid-template-columns: 230px 1fr; gap: 8px;
}
.phone-wrap select {
  padding-inline: 12px; font-size: 14px;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .phone-wrap { grid-template-columns: 1fr; }
}

/* Country combobox: searchable */
.combo {
  position: relative;
}
.combo input { padding-inline-end: 38px; cursor: text; }
.combo .caret {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--muted);
}
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 28px -10px rgba(11,18,32,0.18);
  max-height: 240px; overflow-y: auto; z-index: 50;
  display: none;
}
.combo.open .combo-list { display: block; }
.combo-list button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 2px 12px; line-height: 1.4;
  border: 0; background: transparent;
  text-align: start; font-size: 13.5px; cursor: pointer; color: var(--ink);
  font-family: inherit;
}
.combo-list .flag { font-size: 15px; }
.combo-list button:hover,
.combo-list button.active { background: var(--bg-soft); }
.combo-list .empty { padding: 14px; font-size: 13px; color: var(--muted); }

/* Submit + secondary action */
.auth-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-actions .btn { width: 100%; }
.auth-terms-notice {
  margin-top: 20px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: center;
}
.auth-terms-notice a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-terms-notice a:hover { text-decoration: underline; }

/* Bot honeypot — visually hidden but NOT display:none (smart bots skip those).
   Real users never see / never tab into; bots filling all visible inputs will fill it. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* SweetAlert-style modal — used to surface form errors as a friendly popup. */
.mz-alert-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
  animation: mzAlertFadeIn .18s ease-out;
}
.mz-alert {
  width: 100%; max-width: 440px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.20), 0 2px 6px rgba(15,23,42,0.08);
  padding: 28px 28px 22px;
  text-align: center;
  font-family: inherit;
  animation: mzAlertPop .22s cubic-bezier(.18,1.2,.4,1);
}
.mz-alert-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #FEF2F2;
  display: grid; place-items: center;
  color: #DC2626;
}
.mz-alert-icon.warn { background: #FFFBEB; color: #D97706; }
.mz-alert-icon.info { background: var(--primary-soft); color: var(--primary); }
.mz-alert-title {
  font-size: 19px; font-weight: 700;
  color: var(--ink); margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.mz-alert-body {
  font-size: 14px; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-height: 220px; overflow-y: auto;
  text-align: start;
}
.mz-alert-body ul {
  margin: 6px 0 0; padding-inline-start: 18px;
}
.mz-alert-body li { margin-bottom: 4px; }
.mz-alert-actions { display: flex; gap: 10px; justify-content: center; }
.mz-alert-actions .btn { min-width: 110px; }

@keyframes mzAlertFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mzAlertPop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
.auth-foot {
  margin-top: 22px; padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center; font-size: 14px; color: var(--ink-2);
}
.auth-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* Alternative-language text links — same look as .auth-foot links, separated by · */
.auth-lang-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.8;
}
.auth-lang-row .auth-lang-link {
  color: var(--primary);
  font-weight: 400;
  text-decoration: none;
}
.auth-lang-row .auth-lang-link:hover { text-decoration: underline; }
.auth-lang-row .auth-lang-link.active {
  color: var(--ink);
  font-weight: 500;
  pointer-events: none;
  cursor: default;
}
.auth-lang-sep { color: var(--muted); margin: 0 8px; }

.auth-aside-link {
  display: block; text-align: end;
  font-size: 13px; color: var(--primary);
  text-decoration: none; margin-top: 6px;
}
.auth-aside-link:hover { text-decoration: underline; }

/* PIN entry */
.pin-screen {
  text-align: center; max-width: 440px;
}
.pin-icon {
  width: 72px; height: 72px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--primary-soft);
  display: grid; place-items: center; color: var(--primary-ink);
}
.pin-mailto {
  display: inline-block; margin-top: 8px; padding: 6px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13.5px; color: var(--ink); font-weight: 500;
}
.pin-inputs {
  display: flex; gap: 10px; justify-content: center; margin: 28px 0 8px;
  direction: ltr;
}
.pin-inputs input {
  width: 52px; height: 60px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-elev);
  text-align: center;
  font-size: 26px; font-weight: 700; font-family: var(--font-display);
  color: var(--ink); font-feature-settings: "tnum";
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.pin-inputs input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.14);
  transform: translateY(-1px);
}
.pin-inputs.invalid input {
  border-color: #DC2626;
  animation: pinShake .35s ease;
}
@keyframes pinShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.pin-status {
  font-size: 13.5px; color: var(--ink-2); min-height: 22px;
}
.pin-status.err { color: #DC2626; }
.pin-status.ok { color: #15803D; }
.pin-resend {
  margin-top: 22px; font-size: 13.5px; color: var(--muted);
}
.pin-resend button {
  background: transparent; border: 0; color: var(--primary);
  font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 0;
  font-family: inherit;
}
.pin-resend button:hover { text-decoration: underline; }
.pin-resend button:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

.pin-spam-notice {
  margin-top: 24px;
  padding: 10px 14px;
  background: var(--primary-soft);
  border: 1px solid #DBEAFE;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: center;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  text-wrap: pretty;
}
.pin-spam-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}

/* Loading button state */
.btn[data-loading="true"] {
  pointer-events: none; opacity: 0.85;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn[data-loading="true"]::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success card */
.auth-success {
  text-align: center; padding: 8px 0;
}
.auth-success .check-circle {
  width: 76px; height: 76px; margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(34,197,94,0.14);
  display: grid; place-items: center;
  color: #15803D;
  animation: popIn .35s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Step transitions */
.step { display: none; animation: stepIn .35s cubic-bezier(.2,.8,.2,1); }
.step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
