/* ============================================================
   YehPay — auth.css  (login · register · forgot)
   Light/airy canvas, mobile-app form fields, big tap targets
   ============================================================ */

/* =====================================================
   CANVAS
   ===================================================== */
body.is-auth { background: #FFFFFF; }
body.is-auth .app {
  background:
    radial-gradient(120% 60% at 50% 0%, var(--brand-50) 0%, transparent 60%),
    #FFFFFF;
  min-height: 100vh;
}

/* =====================================================
   TOP BAR  (back + centered logo + spacer)
   ===================================================== */
.auth-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0 12px;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.auth-bar__back {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-800);
  background: transparent;
  transition: background var(--t-fast) var(--ease);
}
.auth-bar__back:hover { background: var(--surface-2); }
.auth-bar__brand {
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-lockup__text {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}

/* =====================================================
   PAGE LAYOUT
   ===================================================== */
.auth-page {
  padding: 12px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =====================================================
   HERO  (welcome block)
   ===================================================== */
.auth-hero {
  text-align: center;
  padding: 16px 4px 4px;
}
.auth-hero__icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 14px 28px -10px rgba(2, 132, 199, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.auth-hero__icon svg { width: 30px; height: 30px; }
.auth-hero h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--ink-800);
  margin-bottom: 6px;
  line-height: 1.15;
}
.auth-hero p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 320px;
  margin: 0 auto;
}

/* =====================================================
   FORM CARD
   ===================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  padding-left: 4px;
}
.field__hint {
  font-size: 11px;
  color: var(--text-3);
  padding-left: 4px;
  margin-top: 2px;
}
.field__error {
  font-size: 11.5px;
  color: var(--danger-600);
  padding-left: 4px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Input wrap (for prefix + suffix icon) */
.input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  overflow: hidden;
}
.input-wrap:focus-within {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .12);
}
.input-wrap.has-error {
  border-color: var(--danger-600);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .1);
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border-right: 1px solid var(--ink-200);
  flex-shrink: 0;
  white-space: nowrap;
}

.input-field {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink-800);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}
.input-field::placeholder { color: var(--text-3); }

.input-suffix {
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: var(--text-3);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}
.input-suffix:hover { color: var(--ink-800); }

/* Inline row (forgot link beside label, etc.) */
.field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.field__row .field__label { padding-left: 0; }
.field__row a {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-700);
}
.field__row a:hover { color: var(--brand-800); }

/* .field-check styles live in base.css (universal) */

/* =====================================================
   PASSWORD STRENGTH METER
   ===================================================== */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-top: -2px;
  min-height: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  transition: opacity var(--t-fast) var(--ease);
}
.pw-strength[data-level="0"] { opacity: 0; pointer-events: none; }
.pw-strength__bars { display: flex; gap: 4px; flex: 1; }
.pw-strength__seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-100);
  transition: background var(--t-fast) var(--ease);
}
.pw-strength[data-level="1"] .pw-strength__seg:nth-child(1) { background: #EF4444; }
.pw-strength[data-level="2"] .pw-strength__seg:nth-child(-n+2) { background: #F59E0B; }
.pw-strength[data-level="3"] .pw-strength__seg { background: var(--success-600); }
.pw-strength[data-level="1"] .pw-strength__lbl { color: #DC2626; }
.pw-strength[data-level="2"] .pw-strength__lbl { color: #B45309; }
.pw-strength[data-level="3"] .pw-strength__lbl { color: var(--success-700); }
.pw-strength__lbl { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* =====================================================
   SOCIAL PROOF LINE
   ===================================================== */
.auth-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.auth-proof__num {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}
.auth-proof__stars { display: inline-flex; gap: 1px; color: #F59E0B; }
.auth-proof__stars svg { width: 11px; height: 11px; fill: currentColor; stroke: none; }

/* =====================================================
   BIG PRIMARY BUTTON  (with loading state)
   ===================================================== */
.btn-auth {
  position: relative;
  height: 56px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 14px 28px -10px rgba(2, 132, 199, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
  margin-top: 4px;
}
.btn-auth:active { transform: scale(.98); }
.btn-auth:hover { box-shadow: 0 16px 32px -10px rgba(2, 132, 199, .65); }
.btn-auth:disabled, .btn-auth.is-loading {
  cursor: not-allowed;
  pointer-events: none;
}
.btn-auth.is-loading .btn-auth__label,
.btn-auth.is-loading .btn-auth__arrow {
  visibility: hidden;
}
.btn-auth.is-loading::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   DIVIDER  ("hoặc")
   ===================================================== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-200);
}

/* =====================================================
   BOTTOM SWITCH LINK  (Đăng ký / Đăng nhập)
   ===================================================== */
.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-2);
}
.auth-switch a {
  color: var(--brand-700);
  font-weight: 700;
}
.auth-switch a:hover { color: var(--brand-800); }

/* =====================================================
   TRUST CHIPS  (under register form, optional)
   ===================================================== */
.auth-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.auth-trust__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-700);
}
.auth-trust__chip svg { color: var(--brand-600); }

/* =====================================================
   FLASH MESSAGE (error / info banner above form)
   ===================================================== */
.auth-flash {
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.auth-flash--danger {
  background: var(--danger-50);
  color: var(--danger-700);
  border: 1px solid #FECACA;
}
.auth-flash--info {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}
.auth-flash svg { flex-shrink: 0; margin-top: 1px; }

/* =====================================================
   FOOTER (legal links, very small)
   ===================================================== */
.auth-foot {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding: 16px 20px 24px;
  line-height: 1.6;
}
.auth-foot a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--ink-200); }
.auth-foot a:hover { color: var(--brand-700); }
