/* Login and register - one layout for both (docs/DESIGN.md), in the spirit of
   WorldFirst's sign-in: on computers a full-height photo on the left with the
   logo on it, and a plain white side with the language switch top-right and
   the form centred. Only arrangement and look live here - every field, id and
   script on the pages is unchanged. Loaded after each page's own styles. */
:root {
  --au-ink: #202124;
  --au-muted: #5f6368;
  --au-line: #dadce0;
  --au-hover: #f1f3f4;
  --au-green: #15803d;
  --au-green-hover: #166534;
  --au-ring: rgba(21, 128, 61, .16);
}

/* ---------- the form (every width) ---------- */
html body .login-card { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--au-ink); }
html body .login-card .auth-card-header-brand { text-align: left; margin: 0 0 22px; }
html body .login-card .auth-card-header-brand h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--au-ink); }
html body .login-card .auth-card-header-brand p { margin: 4px 0 0; font-size: 14px; color: var(--au-muted); }

/* Phone / Email: a two-part switch with icons (not radio dots) */
html body .login-card .lp-toggle, html body .login-card .method-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 20px; padding: 0;
  border: 1px solid var(--au-line); border-radius: 10px; overflow: hidden; background: #fff;
}
html body .login-card .lp-tab, html body .login-card .method-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; margin: 0; padding: 0 12px; border: 0; border-radius: 0; background: #fff;
  font-size: 15px; font-weight: 500; color: var(--au-ink); cursor: pointer; box-shadow: none;
  transition: background .15s, color .15s;
}
html body .login-card .lp-tab + .lp-tab, html body .login-card .method-btn + .method-btn { border-left: 1px solid var(--au-line); }
html body .login-card .lp-tab::before, html body .login-card .method-btn::before { display: none !important; content: none !important; }
html body .login-card .lp-tab svg, html body .login-card .method-btn i { display: inline-block !important; width: 16px; height: 16px; font-size: 15px !important; }
html body .login-card .lp-tab:hover:not(.lp-tab-active), html body .login-card .method-btn:hover:not(.active) { background: var(--au-hover); color: var(--au-ink); }
html body .login-card .lp-tab.lp-tab-active, html body .login-card .method-btn.active {
  color: var(--au-green); font-weight: 600; background: #fff; box-shadow: inset 0 0 0 1.5px var(--au-green);
}

/* labels above every field */
html body .login-card .tc-auth-label,
html body .login-card .form-group > label,
html body .login-card .form-label {
  display: block; margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--au-ink);
}
html body .login-card .tc-auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
html body .login-card .tc-auth-label-row .tc-auth-label { margin-bottom: 6px; }
html body .login-card #forgotPasswordLink {
  font-size: 14px; font-weight: 500; color: var(--au-green); text-decoration: none; background: none; padding: 0; border: 0;
}
html body .login-card #forgotPasswordLink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* fields */
html body .login-card .form-control,
html body .login-card .form-group input:not([type=hidden]):not([type=checkbox]):not([type=radio]) {
  height: 48px; padding: 0 14px; border: 1px solid var(--au-line); border-radius: 8px; background: #fff;
  font-size: 15px; color: var(--au-ink); box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
html body .login-card .lp-phone-wrap, html body .login-card .reg-phone-wrap {
  height: 48px; border: 1px solid var(--au-line) !important; border-radius: 8px !important; background: #fff; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
html body .login-card .lp-phone-wrap input, html body .login-card .reg-phone-wrap input {
  height: 46px !important; border: 0 !important; box-shadow: none !important; font-size: 15px !important; background: transparent;
}
html body .login-card .lp-dial-btn, html body .login-card .reg-dial-btn { border-right: 1px solid var(--au-line) !important; padding: 0 12px !important; }
html body .login-card .form-control:focus,
html body .login-card .form-group input:focus,
html body .login-card .lp-phone-wrap:focus-within, html body .login-card .reg-phone-wrap:focus-within {
  outline: none; border-color: var(--au-green) !important; box-shadow: 0 0 0 3px var(--au-ring) !important;
}
html body .login-card .form-control::placeholder, html body .login-card input::placeholder { color: #9aa0a6; }

/* password: the eye sits inside the field */
html body .login-card .tc-auth-pw { position: relative; }
html body .login-card .tc-auth-pw input { padding-right: 48px !important; width: 100%; }
html body .login-card .tc-auth-eye {
  position: absolute; z-index: 2; top: 50%; right: 6px; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--au-muted); font-size: 15px;
}
html body .login-card .tc-auth-eye:hover { background: var(--au-hover); color: var(--au-ink); }

/* main button and Google: full-width pills */
html body .login-card #loginBtn, html body .login-card #verify-btn, html body .login-card form .btn-primary {
  display: flex; align-items: center; justify-content: center; width: 100%;
  height: 50px !important; min-height: 50px; padding: 0 20px !important; margin-top: 10px; border: 0 !important; border-radius: 999px !important;
  background: var(--au-green) !important; color: #fff !important; font-size: 16px !important; font-weight: 600 !important; box-shadow: none !important;
}
html body .login-card #loginBtn:hover, html body .login-card #verify-btn:hover, html body .login-card form .btn-primary:hover { background: var(--au-green-hover) !important; }
html body .login-card .social-login-row { margin-top: 12px; }
html body .login-card .social-btn {
  height: 50px !important; border: 1px solid var(--au-line) !important; border-radius: 999px !important; background: #fff !important;
  font-size: 15px; font-weight: 500; color: var(--au-ink) !important; box-shadow: none !important;
}
html body .login-card .social-btn:hover { background: var(--au-hover) !important; }

/* "Don't have an account? Register now" */
html body .login-card .tc-auth-switch { margin-top: 24px !important; font-size: 14px; color: var(--au-muted); }
html body .login-card .tc-auth-switch strong, html body .login-card .tc-auth-switch span { font-weight: 400; color: var(--au-muted); }
html body .login-card .tc-auth-switch a { color: var(--au-green) !important; font-weight: 600; text-decoration: none; }
html body .login-card .tc-auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* language switch: plain text, no box */
html body .auth-lang-btn { border: 0 !important; background: none !important; box-shadow: none !important; font-size: 15px !important; font-weight: 500; color: var(--au-ink) !important; gap: 8px !important; }
html body .auth-lang-btn:hover { background: var(--au-hover) !important; }

/* phones and tablets: just the form on white */
@media (max-width: 991.98px) {
  html body .login-container > .login-card { border: 0 !important; box-shadow: none !important; background: #fff !important; }
}

/* ---------- computers: photo left, form right ---------- */
@media (min-width: 992px) {
  html body { background: #fff; }
  html body .login-container {
    max-width: none; width: 100%; margin: 0; padding: 0; min-height: 100vh;
    align-items: stretch; justify-content: flex-start;
  }
  html body .auth-hero { flex: 0 0 48%; max-width: none; padding: 0; position: relative; }
  /* the photos carry their headline on the left: keep that part in view */
  html body .auth-promo-image .auth-slide { background-position: 4% center !important; }
  html body .auth-promo-card {
    position: sticky; top: 0; height: 100vh; aspect-ratio: auto; border-radius: 0; box-shadow: none;
  }
  html body .auth-promo-card::after {             /* soft shade at the top so the white logo reads */
    content: ""; position: absolute; inset: 0 0 auto 0; height: 180px; z-index: 2;
    background: linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, 0)); pointer-events: none;
  }
  html body .auth-page-logo { top: 36px; left: 48px; z-index: 6; }
  html body .auth-page-logo-text { color: #fff !important; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
  html body .auth-lang { top: 28px; right: 40px; }

  html body .login-container > .login-card {
    flex: 1 1 auto; width: auto; max-width: none; margin: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: 110px 48px 72px; border: 0; border-radius: 0; box-shadow: none; background: #fff;
  }
  html body .login-container > .login-card > * { width: 100%; max-width: 420px; margin-left: auto; margin-right: auto; }
}

/* closed side drawers (reset password, codes) park off screen: no shadow
   bleeding in as a grey band on the right */
html body #prDrawer:not(.pr-open), html body #otpDrawer:not(.otp-open), html body #regOtpDrawer:not(.rgo-open) { box-shadow: none !important; }
html body .login-card #forgotPasswordLink { color: var(--au-green) !important; }
/* messages: centred under the form, not on the photo seam */
@media (min-width: 992px) {
  html body .tc-notices { left: 74%; width: min(420px, 44vw); }
}

/* ---------- fields: no outer glow (it got clipped); a firm border instead ---------- */
html body .login-card .form-control:focus,
html body .login-card .form-group input:focus,
html body .login-card .lp-phone-wrap:focus-within, html body .login-card .reg-phone-wrap:focus-within,
html body #prDrawer .pr-input:focus, html body #prDrawer .lp-phone-wrap:focus-within {
  border-color: var(--au-green) !important; box-shadow: inset 0 0 0 1px var(--au-green) !important; outline: none !important;
}
html body .login-card .lp-dial-btn, html body .login-card .reg-dial-btn { background: transparent !important; }

/* register: first and last name side by side */
html body .login-card .tc-auth-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
html body .login-card .tc-auth-name-row .form-group { margin-bottom: 14px !important; }

/* ---------- language menu: a clean card with a tick on the current one ---------- */
html body .auth-lang-menu {
  min-width: 200px; padding: 8px !important; border: 1px solid var(--au-line) !important; border-radius: 12px !important;
  background: #fff !important; box-shadow: 0 12px 32px -8px rgba(15, 17, 17, .22) !important; gap: 2px; z-index: 50;
}
html body .auth-lang-item {
  display: flex !important; align-items: center; justify-content: space-between; width: 100%;
  padding: 10px 12px !important; border: 1px solid transparent !important; border-radius: 8px !important;
  background: none; font-size: 15px !important; font-weight: 400 !important; color: var(--au-ink) !important; text-align: left;
}
html body .auth-lang-item:hover { background: var(--au-hover) !important; }
html body .auth-lang-item.active { border-color: var(--au-line) !important; font-weight: 500 !important; }
html body .auth-lang-item.active::after {
  content: ""; width: 14px; height: 8px; margin-left: 12px; border-left: 2px solid var(--au-green); border-bottom: 2px solid var(--au-green);
  transform: rotate(-45deg) translateY(-2px);
}

/* ---------- reset password, sign-in code, register code: same calm look ---------- */
html body #prDrawer, html body #otpDrawer, html body #regOtpDrawer { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--au-ink); }
html body #prDrawer .pr-topbar { display: none !important; }                 /* "Back to login" below instead */
html body #prDrawer .pr-steps, html body #regOtpDrawer .rgo-stepbar { display: none !important; }
html body #otpDrawer .otp-topbar, html body #regOtpDrawer .rgo-topbar { background: #fff !important; border-bottom: 0 !important; }
html body #otpDrawer .otp-topbar-sub, html body #regOtpDrawer .rgo-sub { display: none !important; }
html body #prDrawer .pr-heading, html body #otpDrawer .otp-body h5, html body #regOtpDrawer .rgo-heading {
  margin: 0 0 8px !important; font-size: 26px !important; font-weight: 700 !important; letter-spacing: -.02em; color: var(--au-ink) !important; text-align: left !important;
}
html body #prDrawer .pr-subtext, html body #otpDrawer .otp-desc, html body #regOtpDrawer .rgo-subtext {
  margin: 0 0 22px !important; font-size: 15px !important; line-height: 1.5; color: var(--au-muted) !important; text-align: left !important;
}
/* Phone / Email choice: the same two-part switch as the login form */
html body #prDrawer div:has(> #prMethodPhone) {
  display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 !important; margin: 0 0 20px !important;
  border: 1px solid var(--au-line); border-radius: 10px; overflow: hidden;
}
html body #prDrawer .pr-method-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; margin: 0; padding: 0 12px;
  border: 0 !important; border-radius: 0 !important; background: #fff !important; font-size: 15px; font-weight: 500; color: var(--au-ink) !important;
}
html body #prDrawer .pr-method-btn + .pr-method-btn { border-left: 1px solid var(--au-line) !important; }
html body #prDrawer .pr-method-btn::before { display: none !important; content: none !important; }
html body #prDrawer .pr-method-btn.active { color: var(--au-green) !important; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--au-green); }
html body #prDrawer .pr-label { margin: 0 0 6px !important; font-size: 14px !important; font-weight: 500 !important; color: var(--au-ink) !important; text-transform: none !important; letter-spacing: 0 !important; }
html body #prDrawer .pr-input, html body #prDrawer .lp-phone-wrap {
  height: 48px !important; border: 1px solid var(--au-line) !important; border-radius: 8px !important; font-size: 15px !important; background: #fff !important;
}
html body #prDrawer .lp-phone-wrap input { height: 46px !important; border: 0 !important; font-size: 15px !important; }
html body #prDrawer .pr-btn-primary, html body #otpDrawer #otpVerifyBtn, html body #regOtpDrawer #verify-otp-btn {
  width: 100%; height: 50px !important; margin-top: 8px; border: 0 !important; border-radius: 999px !important;
  background: var(--au-green) !important; color: #fff !important; font-size: 16px !important; font-weight: 600 !important; box-shadow: none !important;
}
html body #prDrawer .pr-btn-primary:hover, html body #otpDrawer #otpVerifyBtn:hover, html body #regOtpDrawer #verify-otp-btn:hover:not([disabled]) { background: var(--au-green-hover) !important; }
html body #regOtpDrawer #verify-otp-btn[disabled] { opacity: .5; }
html body #prDrawer .pr-back-link {
  display: block; margin: 18px auto 0; padding: 6px 10px; border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--au-green);
}
html body #prDrawer .pr-back-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* computers: these flows take over the form side, the photo stays */
@media (min-width: 992px) {
  html body #prOverlay, html body #otpDrawerOverlay, html body #regOtpOverlay { background: transparent !important; }
  html body #prDrawer, html body #otpDrawer, html body #regOtpDrawer {
    left: 48% !important; right: 0 !important; width: auto !important; max-width: none !important;
    border-left: 0 !important; box-shadow: none !important;
  }
  html body #prDrawer .pr-body, html body #otpDrawer .otp-body, html body #regOtpDrawer .rgo-body {
    flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 0 !important;
    display: flex; flex-direction: column; justify-content: center; overflow-y: auto;
  }
}

/* ---------- calm selected / focus states (owner: no thick green frames) ----------
   Selected Phone/Email: soft grey fill, dark text, no coloured frame.
   Focused field: one thin dark-grey border. Green stays only on the main button. */
html body .login-card .lp-tab.lp-tab-active, html body .login-card .method-btn.active,
html body #prDrawer .pr-method-btn.active {
  box-shadow: none !important; background: #f1f3f4 !important; color: var(--au-ink) !important; font-weight: 600 !important;
}
html body .login-card .lp-tab, html body .login-card .method-btn, html body #prDrawer .pr-method-btn { color: var(--au-muted) !important; }
html body .login-card .lp-tab svg, html body .login-card .method-btn i { color: inherit !important; }
html body .login-card .form-control:focus,
html body .login-card .form-group input:focus,
html body .login-card .lp-phone-wrap:focus-within, html body .login-card .reg-phone-wrap:focus-within,
html body #prDrawer .pr-input:focus, html body #prDrawer .lp-phone-wrap:focus-within {
  border-color: #5f6368 !important; box-shadow: none !important; outline: none !important;
}

/* title centred over the form; no time-of-day greeting */
html body .login-card .auth-card-header-brand { text-align: center !important; }
html body .login-card .auth-greeting-text { display: none !important; }
