/* ==========================================================================
   CredFlow — Auth pages (login / register)
   Self-contained palette, independent of the in-app theme tokens.
   Breakpoints: mobile < 768 · tablet 768-1023 · desktop >= 1024
   ========================================================================== */

.au {
  --pri: #0f7040;
  --pri-d: #0b5931;
  --pri-l: #158a4f;
  --mint: #4ade80;
  --mint-soft: rgba(74, 222, 128, .16);
  --dark-1: #0d4a2c;
  --dark-2: #0a3822;
  --ink: #101b29;
  --ink-2: #27364a;
  --muted: #6b7787;
  --muted-2: #98a3b1;
  --line: #e2e8e5;
  --field: #f7faf8;
  --bg: #f1f5f2;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(11, 45, 28, .10);
  --shadow-sm: 0 2px 10px rgba(11, 45, 28, .06);

  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.au *,
.au *::before,
.au *::after { box-sizing: border-box; }

.au img { max-width: 100%; display: block; }

.au-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.au-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.au-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.au-header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.au-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}
.au-brand img { height: 30px; width: auto; }
.au-brand img.is-wordmark { height: 34px; }
.au-brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.au-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.au-header-note {
  font-size: 13.5px;
  color: var(--muted);
}
.au-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 2px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
}
.au-back:hover { background: #eef3f0; color: var(--pri); }

/* ---------- Buttons ---------- */
.au-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.au-btn--primary {
  background: var(--pri);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 112, 64, .20);
}
.au-btn--primary:hover { background: var(--pri-d); color: #fff; }
.au-btn--block { width: 100%; }
.au-btn--lg { padding: 14px 20px; font-size: 15px; border-radius: 9px; }
.au-btn--ghost {
  background: #fff;
  color: var(--ink-2);
  border-color: #d8e0da;
}
.au-btn--ghost:hover { border-color: var(--pri); color: var(--pri); }

/* ---------- Main / card ---------- */
.au-main {
  flex: 1;
  padding: 26px 0 30px;
}

.au-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

/* ---------- Left dark panel ---------- */
.au-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(74, 222, 128, .16) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(74, 222, 128, .10) 0%, transparent 60%),
    linear-gradient(160deg, var(--dark-1) 0%, var(--dark-2) 100%);
}
.au-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
}
.au-aside-body {
  position: relative;
  padding: 34px 34px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.au-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: #86efac;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.au-aside h1 {
  margin: 16px 0 0;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.02em;
}
.au-aside h1 span { color: var(--mint); display: block; }

.au-aside-lead {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(230, 244, 236, .74);
  max-width: 34ch;
}

/* Feature list */
.au-feats {
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.au-feat {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.au-feat-ic {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .90);
  color: var(--dark-1);
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}
.au-feat-t {
  margin: 1px 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.au-feat-s {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(226, 242, 233, .62);
}

/* Illustration */
.au-art {
  margin-top: auto;
  padding-top: 18px;
  position: relative;
}
.au-art svg { width: 100%; height: auto; display: block; }

/* Trust strip */
.au-trust {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .14);
}
.au-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.au-trust-ic {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .90);
  color: var(--dark-1);
  font-size: 12px;
}
.au-trust-t {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.au-trust-s {
  font-size: 10px;
  color: rgba(226, 242, 233, .60);
  white-space: nowrap;
}

/* Tablet variant: same strip, light, below the panels */
.au-trust--out { display: none; }
.au-trust--out {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  grid-column: 1 / -1;
}
.au-trust--out .au-trust-ic { background: #e9f6ee; color: var(--pri); }
.au-trust--out .au-trust-t { color: var(--ink); }
.au-trust--out .au-trust-s { color: var(--muted); }

/* ---------- Right form panel ---------- */
.au-pane {
  padding: 40px 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.au-form-wrap {
  width: 100%;
  max-width: 372px;
  margin: 0 auto;
}

.au-mobile-top { display: none; }

.au-title {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-align: center;
}
.au-sub {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Tabs */
.au-tabs {
  margin: 22px 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.au-tab {
  appearance: none;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0 11px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .16s ease, border-color .16s ease;
}
.au-tab:hover { color: var(--ink-2); }
.au-tab.is-active {
  color: var(--pri);
  border-bottom-color: var(--pri);
}

.au-panel[hidden] { display: none; }

/* Fields */
.au-field { margin-bottom: 15px; }
.au-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.au-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.au-label-row .au-label { margin-bottom: 0; }
.au-link {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pri);
  text-decoration: none;
}
.au-link:hover { text-decoration: underline; }

.au-input-wrap { position: relative; }
.au-input-ic {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted-2);
  pointer-events: none;
}
.au-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  padding: 0 14px 0 38px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.au-input::placeholder { color: #a9b3bd; }
.au-input:focus {
  background: #fff;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(15, 112, 64, .12);
}
textarea.au-input {
  height: auto;
  min-height: 120px;
  padding: 12px 14px 12px 38px;
  resize: vertical;
  line-height: 1.5;
}
.au-input--pad-r { padding-right: 42px; }
.au-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--muted-2);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.au-eye:hover { color: var(--ink-2); background: #eef3f0; }

/* Mobile number input with +91 prefix */
.au-phone {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
}
.au-phone-cc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.au-phone .au-input { padding-left: 38px; }

/* Checkbox */
.au-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.au-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border: 1.5px solid #c8d2cc;
  border-radius: 5px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.au-check input::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}
.au-check input:checked {
  background: var(--pri);
  border-color: var(--pri);
}
.au-check input:checked::after { opacity: 1; }

/* Divider */
.au-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}
.au-or::before,
.au-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Google */
.au-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  border: 1px solid #d8e0da;
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.au-google:hover { border-color: #b9c6be; box-shadow: var(--shadow-sm); }
.au-google svg { width: 18px; height: 18px; }

.au-alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.au-alt a {
  color: var(--pri);
  font-weight: 700;
  text-decoration: none;
}
.au-alt a:hover { text-decoration: underline; }

.au-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.au-hint--center { text-align: center; }

/* ---------- OTP screen ---------- */
.au-otp-badge {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9f8ef;
  color: var(--pri);
  font-size: 26px;
  box-shadow: 0 0 0 8px rgba(22, 163, 74, .07);
}
.au-otp-to {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.au-otp-to strong { color: var(--ink); font-weight: 700; }
.au-otp-edit {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pri);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.au-otp-edit:hover { text-decoration: underline; }

.au-otp {
  margin: 22px 0 14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
}
.au-otp input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  text-align: center;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.au-otp input:focus {
  background: #fff;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(15, 112, 64, .12);
}
.au-otp input.is-filled { background: #fff; border-color: #bcd8c8; }

.au-resend {
  margin: 0 0 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.au-resend button {
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pri);
  cursor: pointer;
}
.au-resend button[disabled] {
  color: var(--muted-2);
  cursor: default;
  font-weight: 600;
}

.au-secure {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.au-secure i { color: var(--pri); }

/* ---------- Alerts ---------- */
.au-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.au-alert i { font-size: 14px; line-height: 1.3; }
.au-alert--error {
  background: #fdecec;
  border-color: #f7d2d2;
  color: #a72222;
}
.au-alert--success {
  background: #e9f8ef;
  border-color: #c9ecd8;
  color: #12673c;
}

/* ---------- Stats strip ---------- */
.au-stats {
  margin: 18px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.au-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  border-left: 1px solid var(--line);
}
.au-stat:first-child { border-left: 0; }
.au-stat-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #e9f6ee;
  color: var(--pri);
  font-size: 14px;
}
.au-stat-v {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.au-stat-l {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.au-footer {
  padding: 20px 0 26px;
  text-align: center;
}
.au-footer-copy {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.au-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.au-footer-links a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}
.au-footer-links a:hover { color: var(--pri); }

/* ==========================================================================
   Tablet — 768px to 1023px
   ========================================================================== */
@media (max-width: 1023px) {
  .au-container { padding: 0 18px; }
  .au-main { padding: 20px 0 24px; }

  .au-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .au-aside-body { padding: 26px 24px 6px; }
  .au-aside h1 { font-size: 23px; }
  .au-aside-lead { font-size: 12.5px; }
  .au-feats { gap: 11px; margin-top: 16px; }
  .au-feat-ic { width: 29px; height: 29px; font-size: 13px; }
  .au-feat-t { font-size: 12px; }
  .au-feat-s { font-size: 10.5px; }

  .au-trust--in { display: none; }
  .au-trust--out { display: grid; }

  .au-pane { padding: 28px 26px 26px; }
  .au-form-wrap { max-width: 340px; }
  .au-title { font-size: 20px; }
  .au-sub { font-size: 12px; }

  .au-stats { display: none; }
}

/* ==========================================================================
   Mobile — below 768px
   ========================================================================== */
@media (max-width: 767px) {
  .au { background: #fff; }
  .au-container { padding: 0 18px; }

  .au-header { position: sticky; top: 0; z-index: 20; }
  .au-header-inner {
    min-height: 56px;
    justify-content: center;
    position: relative;
  }
  .au-header-actions { display: none; }
  .au-back {
    display: inline-flex;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .au-brand img { height: 26px; }
  .au-brand img.is-wordmark { height: 30px; }
  .au-brand-name { font-size: 18px; }

  .au-main { padding: 8px 0 14px; }

  .au-card {
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .au-aside { display: none; }
  .au-trust--out { display: none; }

  .au-pane {
    padding: 8px 0 0;
    background: transparent;
  }
  .au-form-wrap { max-width: 420px; }

  .au-mobile-top {
    display: block;
    margin: 0 auto 14px;
    max-width: 190px;
  }
  .au-mobile-top svg { width: 100%; height: auto; }
  /* OTP screen leads with the shield badge instead */
  .au-form-wrap.is-otp .au-mobile-top { display: none; }
  .au-form-wrap.is-otp { padding-top: 18px; }

  .au-title { font-size: 21px; }
  .au-tabs { margin: 18px 0 18px; }
  .au-input, .au-google, .au-phone-cc { height: 48px; }
  .au-otp { gap: 7px; }
  .au-otp input { height: 48px; font-size: 18px; border-radius: 9px; }

  .au-stats { display: none; }
  .au-footer { padding: 16px 0 22px; }
  .au-footer-links { gap: 14px; }
  .au-footer-links a { font-size: 12px; }
}

@media (max-width: 359px) {
  .au-otp { gap: 5px; }
  .au-otp input { height: 44px; font-size: 16px; }
  .au-phone { grid-template-columns: 70px minmax(0, 1fr); }
}

/* ==========================================================================
   Large desktop
   ========================================================================== */
@media (min-width: 1280px) {
  .au-container { max-width: 1180px; }
  .au-aside-body { padding: 40px 40px 10px; }
  .au-aside h1 { font-size: 32px; }
  .au-pane { padding: 48px 56px 44px; }
}

/* Short viewports: keep the form reachable without a squeezed illustration */
@media (min-width: 768px) and (max-height: 720px) {
  .au-art { max-width: 78%; margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .au * { transition: none !important; }
}
