/* Login, sign up, forgot password and reset password.
   Built on the tokens in landing.css, so light and dark follow the landing page. */

.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-nav { position: sticky; }
.auth-nav .nav-inner { height: 72px; }
.auth-home { min-height: 44px; padding: 0 18px; }
/* The landing page moves the language list into its mobile menu; here the dropdown stays in the header */
.auth-nav .nav-actions .lang { display: block; }

/* Page */
.auth-main { flex: 1 0 auto; position: relative; display: grid; place-items: center; padding: 40px 24px 72px; }
.auth-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 80%);
}
.auth-card {
  width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.auth-card.single { max-width: 520px; grid-template-columns: minmax(0, 1fr); }

/* Brand panel */
.auth-panel { position: relative; overflow: hidden; background: #1b1f45; color: #fff; display: flex; }
:root[data-theme="dark"] .auth-panel { background: #1a1f48; border-right: 1px solid #2c3370; }
.auth-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.auth-panel .orbit { border-color: rgba(255,255,255,.14); }
.auth-panel .o1 { width: 420px; height: 420px; right: -170px; top: -150px; }
.auth-panel .o2 { width: 300px; height: 300px; left: -120px; bottom: -110px; }
.auth-panel-in { position: relative; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 20px; width: 100%; }
.auth-eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: #e4e7ff; font-size: 13px; font-weight: 600; }
.auth-eyebrow svg.i { width: 16px; height: 16px; }
.auth-panel h2 { color: #fff; font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -0.03em; }
.auth-panel-text { color: #c9cdf0; font-size: 16px; }
.auth-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; align-items: flex-start; gap: 12px; color: #e4e7ff; font-size: 15px; }
.auth-points .tk { flex: none; width: 24px; height: 24px; border-radius: 8px; background: rgba(79,209,197,.18); color: #4fd1c5; display: grid; place-items: center; margin-top: 1px; }
.auth-points .tk svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.auth-chat { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.auth-chat .cb { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.4; max-width: 88%; }
.auth-chat .cb-in { background: rgba(255,255,255,.12); color: #fff; border-bottom-left-radius: 4px; }
.auth-chat .cb-out { align-self: flex-end; background: #5867dd; color: #fff; border-bottom-right-radius: 4px; }
.auth-chat .cb svg.i { width: 16px; height: 16px; }

/* Form side */
.auth-form { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.auth-head { margin-bottom: 28px; }
.auth-head h1 { font-size: clamp(28px, 3vw, 36px); font-weight: 800; letter-spacing: -0.03em; }
.auth-head p { color: var(--muted); font-size: 16px; margin-top: 8px; }

.field { margin-bottom: 18px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-row .field { margin-bottom: 18px; }
.field label, .field .lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.field .req { color: var(--danger); margin-left: 2px; }
.field .lbl-link { font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap > svg.i.lead { position: absolute; left: 14px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--subtle); pointer-events: none; }
.input-wrap > svg.i.chev { position: absolute; right: 14px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--subtle); pointer-events: none; }
.auth-form .input {
  display: block; width: 100%; height: 48px; padding: 0 14px 0 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.2; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-form .input.no-icon { padding-left: 14px; }
.auth-form .input.has-toggle { padding-right: 48px; }
.auth-form .input::placeholder { color: var(--subtle); opacity: .8; }
.auth-form .input:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.auth-form .input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }
.auth-form select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.auth-form select.input option { background: var(--surface); color: var(--text); }
.auth-form .input.is-invalid { border-color: var(--danger) !important; }
.auth-form .input.is-valid { border-color: var(--success) !important; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; margin-top: -18px; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--subtle); display: grid; place-items: center; cursor: pointer; transition: color .15s, background .15s;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle svg.i { width: 18px; height: 18px; }
.hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--subtle); line-height: 1.45; }
.hint svg.i { width: 14px; height: 14px; margin-top: 2px; }

.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); cursor: pointer; }
.check label { margin: 0; display: inline; font-weight: 500; color: var(--muted); cursor: pointer; }
.check a { font-weight: 600; }

.auth-form .btn-block { width: 100%; min-height: 50px; font-size: 16px; font-weight: 700; }
.auth-form .btn[disabled], .auth-form .btn.disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.show-message { min-height: 0; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.show-message:empty { display: none; }
.auth-form .text-danger { color: var(--danger); }
.auth-form .text-success { color: var(--success); }
.auth-form .email-verification-feedback { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--subtle); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.social-row { display: grid; gap: 10px; margin-bottom: 4px; }
.social-row .btn { width: 100%; }
.social-row img { width: 20px; height: 20px; }

.auth-switch { margin-top: 24px; text-align: center; color: var(--muted); font-size: 15px; }
.auth-switch a { font-weight: 700; margin-left: 4px; }

/* Verify button next to the WhatsApp field */
.wa-row { display: flex; align-items: stretch; gap: 10px; }
.wa-row .wa-field { flex: 1 1 auto; min-width: 0; }
.wa-row .btn { flex: none; min-height: 48px; padding: 0 20px; }
.wa-row .btn-verified { background: var(--success); }
.otp-section { display: none; }

/* Phone picker (intl-tel-input) in the same style as the other inputs */
.iti { width: 100%; display: block; }
.iti__flag-container { z-index: 5; }
.auth-form .iti .input { padding-left: 14px; }
.auth-form .iti--separate-dial-code .iti__selected-flag { background: transparent; border-right: 1px solid var(--border); border-radius: 12px 0 0 12px; padding: 0 10px 0 14px; }
.auth-form .iti--separate-dial-code .iti__selected-flag:hover,
.auth-form .iti--separate-dial-code .iti__selected-flag:focus { background: var(--surface-2); }
.auth-form .iti__selected-dial-code { color: var(--text); font-size: 15px; font-weight: 600; margin-left: 6px; }
.auth-form .iti__arrow { border-top-color: var(--subtle); margin-left: 6px; }
.auth-form .iti__arrow--up { border-top-color: transparent; border-bottom-color: var(--subtle); }
body.auth-body .iti__country-list { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
body.auth-body .iti__country.iti__highlight { background: var(--surface-2); }
body.auth-body .iti__country-name { color: var(--text); }
body.auth-body .iti__dial-code { color: var(--subtle); }
body.auth-body .iti__divider { border-bottom-color: var(--border); }

/* Footer */
.auth-foot { flex: none; border-top: 1px solid var(--border); padding: 20px 0; color: var(--subtle); font-size: 13px; }
.auth-foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.auth-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 960px) {
  .auth-nav .nav-actions .btn { display: inline-flex; }
  .auth-card { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .auth-panel { display: none; }
  .auth-form { padding: 36px 28px; }
}
@media (max-width: 560px) {
  .auth-main { padding: 20px 16px 48px; }
  .auth-form { padding: 28px 20px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .auth-home { display: none !important; }
  .auth-foot-in { justify-content: center; text-align: center; }
  .wa-row { flex-wrap: wrap; }
  .wa-row .btn { width: 100%; }
}
