/* ========================================
   Sign-in pages, new design
   pages/auth/login, forgot-password, request-account, reset-password
   A quiet split screen: brand panel + one focused form, no site menus.
======================================== */

.au-page {
  --au-navy: #00344b;
  --au-navy-2: #002b3d;
  --au-mint: #00ceb7;
  --au-teal: #0f8f80;
  --au-ink: #17323f;
  --au-muted: #5f7480;
  --au-line: #d5e0e4;
  --au-error: #b42318;
  margin: 0;
  background: #ffffff;
  color: var(--au-ink);
}

/* ---------- Page: navy gradient with soft light ---------- */
.au-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(0, 206, 183, .22), transparent 60%),
    radial-gradient(900px 600px at 5% 110%, rgba(22, 156, 140, .28), transparent 60%),
    linear-gradient(160deg, #004663 0%, #00344b 45%, #00212f 100%);
}

/* A faint grid, like a slide canvas */
.au-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.au-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 40px;
}

.au-top-logo img { display: block; height: 46px; width: auto; }
.au-top-link { color: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 600; text-decoration: none; }
.au-top-link:hover { color: #ffffff; }

.au-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 10px 16px 48px;
  min-height: calc(100vh - 100px);
  align-content: center;
}

.au-card {
  width: min(460px, 100%);
  padding: 40px 40px 34px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 20, 30, .45), 0 2px 6px rgba(0, 20, 30, .12);
}

.au-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ecfaf8;
  color: #0b6e62;
  font-size: 12.5px;
  font-weight: 700;
}

.au-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--au-mint); box-shadow: 0 0 0 3px rgba(0, 206, 183, .2); }

.au-foot { margin: 0; color: rgba(255, 255, 255, .6); font-size: 12.5px; text-align: center; }

.au-card h1 { margin: 0 0 8px; color: var(--au-navy); font-size: 30px; line-height: 1.35; }
.au-lead { margin: 0 0 28px; color: var(--au-muted); font-size: 15.5px; line-height: 1.8; }

.au-back { display: block; width: fit-content; margin: 0 0 14px; color: var(--au-teal); font-size: 14px; font-weight: 600; text-decoration: none; }
.au-back:hover { text-decoration: underline; }

.au-form { display: grid; gap: 18px; }
.au-field { display: grid; gap: 8px; }
.au-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.au-label-row label { color: var(--au-ink); font-size: 14px; font-weight: 700; }
.au-label-row small { color: var(--au-muted); font-weight: 500; }
.au-small-link { color: var(--au-teal); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.au-small-link:hover { text-decoration: underline; }

.au-input {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  border: 1.5px solid var(--au-line);
  border-radius: 12px;
  background: #ffffff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.au-input:focus-within { border-color: var(--au-navy); box-shadow: 0 0 0 4px rgba(0, 206, 183, .18); }
.au-input.is-invalid { border-color: var(--au-error); box-shadow: 0 0 0 4px rgba(180, 35, 24, .1); }

.au-input-icon { display: grid; place-items: center; width: 46px; color: #8aa0a9; }
.au-input-icon svg { width: 20px; height: 20px; }

.au-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 14px;
  border: 0;
  background: transparent;
  color: var(--au-ink);
  font-family: inherit;
  font-size: 15.5px;
}

.au-input input:focus { outline: 0; }
.au-input input:-webkit-autofill,
.au-input input:-webkit-autofill:hover,
.au-input input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px #ffffff inset;
  -webkit-text-fill-color: var(--au-ink);
  caret-color: var(--au-ink);
}
.au-input input[dir="ltr"] { text-align: right; }
.au-input input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }

.au-eye {
  display: grid;
  place-items: center;
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #8aa0a9;
  cursor: pointer;
}

.au-eye svg { width: 20px; height: 20px; }
.au-eye:hover, .au-eye.is-on { color: var(--au-navy); }

.au-field textarea {
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid var(--au-line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}

.au-field textarea:focus { outline: 0; border-color: var(--au-navy); box-shadow: 0 0 0 4px rgba(0, 206, 183, .18); }

.au-error-text { margin: 0; color: var(--au-error); font-size: 13px; }
.au-caps { margin: -8px 0 0; color: #9a6700; font-size: 13px; }

.au-check { display: inline-flex; align-items: center; gap: 10px; color: var(--au-ink); font-size: 14px; cursor: pointer; }
.au-check input { width: 18px; height: 18px; accent-color: var(--au-navy); }

.au-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--au-navy);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.au-submit:hover { background: #004a68; }
.au-submit:active { transform: translateY(1px); }
.au-submit:disabled { opacity: .7; cursor: progress; }

.au-submit.is-busy::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: au-spin .8s linear infinite;
}

@keyframes au-spin { to { transform: rotate(360deg); } }

.au-switch { margin: 26px 0 0; color: var(--au-muted); font-size: 14.5px; text-align: center; }
.au-switch a { color: var(--au-teal); font-weight: 700; text-decoration: none; }
.au-switch a:hover { text-decoration: underline; }

/* Error / status banners */
.au-alert,
.auth-status.is-visible {
  display: block;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.au-alert, .auth-status.is-error { border: 1px solid #f5c2bc; background: #fef3f2; color: var(--au-error); }
.au-alert[hidden] { display: none; }
.au-alert.is-success { border-color: #a7e3d9; background: #ecfbf8; color: #0b6e62; }
.auth-status { display: none; }
.auth-status.is-success { border: 1px solid #a7e3d9; background: #ecfbf8; color: #0b6e62; }

.au-account { margin: 0; padding: 10px 14px; border-radius: 10px; background: #f3f7f8; color: var(--au-muted); font-size: 14px; }
.au-account strong { color: var(--au-navy); }

.au-rules { display: grid; gap: 6px; margin: -4px 0 0; padding: 0; list-style: none; color: var(--au-muted); font-size: 13.5px; }
.au-rules li::before { content: "○"; margin-inline-end: 8px; }
.au-rules li.is-met { color: #0b6e62; }
.au-rules li.is-met::before { content: "✓"; }


/* ---------- Small screens ---------- */
/* Step 2: sign-in code */
.au-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.au-back-btn { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.au-code-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 0 18px; border-radius: 16px; background: #e6f7f4; color: var(--au-teal); }
.au-code-icon svg { width: 28px; height: 28px; }
.au-code-mail { color: var(--au-navy); unicode-bidi: isolate; white-space: nowrap; }

.au-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.au-otp input {
  width: 100%;
  min-width: 0;
  height: 60px;
  border: 1.5px solid #d5e0e4;
  border-radius: 14px;
  background: #ffffff;
  color: var(--au-navy);
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.au-otp input:focus { outline: 0; border-color: var(--au-navy); box-shadow: 0 0 0 4px rgba(0, 206, 183, .18); }
.au-otp input.is-filled { border-color: var(--au-teal); background: #f6fdfb; }
.au-otp.is-invalid input { border-color: var(--au-error); }
.au-otp.is-shake { animation: au-shake .35s ease; }
@keyframes au-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.au-code-timer { margin: -6px 0 0; color: var(--au-muted); font-size: 13.5px; text-align: center; }
.au-code-timer strong { color: var(--au-navy); font-variant-numeric: tabular-nums; }
.au-code-timer.is-over { color: var(--au-error); }

.au-code-help { margin-top: 22px; color: var(--au-muted); font-size: 14px; text-align: center; }
.au-code-help p { margin: 0 0 6px; }
.au-code-tip { font-size: 12.5px; line-height: 1.8; }
.au-link-btn { padding: 0; border: 0; background: none; color: var(--au-teal); font-family: inherit; font-size: inherit; font-weight: 700; cursor: pointer; }
.au-link-btn:disabled { color: #9fb1b8; cursor: default; }
.au-link-btn:not(:disabled):hover { text-decoration: underline; }
#au-code-wait { font-variant-numeric: tabular-nums; }

/* Authenticator app: linking steps and QR code */
.au-code-icon[hidden] { display: none; }
.au-setup-steps { display: grid; gap: 12px; margin: -10px 0 18px; padding: 0; list-style: none; }
.au-setup-steps li { display: flex; align-items: flex-start; gap: 12px; }
.au-setup-steps li > span { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #e6f7f4; color: var(--au-teal); font-size: 14px; font-weight: 700; }
.au-setup-steps strong { display: block; color: var(--au-navy); font-size: 14.5px; }
.au-setup-steps small { display: block; margin-top: 2px; color: var(--au-muted); font-size: 13px; line-height: 1.7; }
.au-qr-wrap { display: grid; justify-items: center; gap: 12px; margin: 0 0 20px; padding: 18px; border: 1px solid #e3eaec; border-radius: 16px; background: #f7f9fa; }
.au-qr { width: 196px; height: 196px; padding: 6px; border-radius: 12px; background: #ffffff; box-shadow: 0 2px 10px rgba(0, 52, 75, .08); }
.au-qr svg { display: block; width: 100%; height: 100%; }
.au-open-app { display: none; color: var(--au-teal); font-size: 14px; font-weight: 700; text-align: center; }
.au-key { width: 100%; color: var(--au-muted); font-size: 13.5px; }
.au-key summary { color: var(--au-teal); font-weight: 600; text-align: center; cursor: pointer; }
.au-key p { margin: 10px 0 8px; line-height: 1.8; }
.au-key-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px dashed #b9cfd4; border-radius: 10px; background: #ffffff; }
.au-key-row code { color: var(--au-navy); font-size: 14px; font-weight: 700; letter-spacing: .5px; overflow-wrap: anywhere; }
@media (hover: none) and (pointer: coarse) { .au-open-app { display: block; } }

@media (max-width: 640px) {
  .au-otp { gap: 7px; }
  .au-otp input { height: 52px; font-size: 22px; border-radius: 12px; }
  .au-top { padding: 18px 16px; }
  .au-top-logo img { height: 38px; }
  .au-card { padding: 30px 22px 26px; border-radius: 18px; }
  .au-card h1 { font-size: 25px; }
}
