/* Public-facing retailer auth screens (login / register).
   Shares the palette with styles.css but stands alone so the marketing
   bundle isn't required for a form page. */

:root {
  --ink: #0b1c33;
  --ink-soft: #243447;
  --ink-muted: #5a6b82;
  --paper-2: #e8eef6;
  --white: #fff;
  --brand: #1a4fb8;
  --brand-deep: #123a8a;
  --brand-soft: #dce8ff;
  --signal: #f58220;
  --alert: #e86a17;
  --line: rgba(11, 28, 51, 0.14);
}

* { box-sizing: border-box; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  font-family: "DM Sans", "Noto Sans Bengali", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 15% -10%, rgba(26, 79, 184, 0.4), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(245, 130, 32, 0.22), transparent 60%),
    #0b1c33;
}

.auth-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.4);
}

.auth-shell.is-narrow { max-width: 480px; grid-template-columns: 1fr; }

/* ---------------------------------------------------------------- aside */

.auth-aside {
  padding: 2.5rem 2rem;
  color: var(--white);
  background: linear-gradient(160deg, var(--brand-deep), #0b1c33);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-aside .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  text-decoration: none;
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 700;
}

.auth-aside .brand img { height: 32px; }

.auth-aside h2 {
  font-family: "Unbounded", system-ui, sans-serif;
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 0;
}

.auth-aside p { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); line-height: 1.7; }

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }

.auth-points li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.86);
}

.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.34rem;
  width: 0.85rem;
  height: 0.5rem;
  border-left: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}

.auth-aside-foot { margin-top: auto; font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.auth-aside-foot a { color: var(--white); }

/* ----------------------------------------------------------------- form */

.auth-main { padding: 2.5rem 2rem; }

.auth-main h1 {
  font-family: "Unbounded", system-ui, sans-serif;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.auth-lead { margin: 0 0 1.5rem; font-size: 0.9rem; color: var(--ink-muted); }

.auth-field { margin-bottom: 1rem; }

.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.auth-field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  background: var(--white);
  color: var(--ink);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.auth-field .hint { font-size: 0.75rem; color: var(--ink-muted); margin: 0.3rem 0 0; }
.auth-field .field-error { font-size: 0.78rem; color: var(--alert); margin: 0.3rem 0 0; font-weight: 600; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.auth-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 9px;
  background: var(--brand);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-btn:hover { background: var(--brand-deep); }

.auth-alt { margin: 1.25rem 0 0; font-size: 0.88rem; text-align: center; color: var(--ink-muted); }
.auth-alt a { color: var(--brand); font-weight: 600; }

.auth-alert {
  background: #fdecec;
  border: 1px solid rgba(214, 44, 44, 0.3);
  color: #8a1f1f;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}

.auth-alert ul { margin: 0; padding-left: 1.1rem; }

.auth-status {
  background: #e4f5ea;
  border: 1px solid rgba(20, 102, 58, 0.25);
  color: #14663a;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 480px; }
  .auth-aside { display: none; }
  .auth-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- header + locale switch */

.auth-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-head h1 { margin-bottom: 0.35rem; }
.auth-head .auth-lead { margin-bottom: 0; }

.locale-switch {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--white);
}

.locale-switch a {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-muted);
  border-right: 1px solid var(--line);
}

.locale-switch a:last-child { border-right: 0; }
.locale-switch a:hover { background: var(--paper-2); color: var(--ink); }
.locale-switch a.is-active { background: var(--brand); color: var(--white); }

body.auth-page.is-bangla {
  font-family: "Noto Sans Bengali", "DM Sans", system-ui, sans-serif;
}

body.auth-page.is-bangla .auth-field label,
body.auth-page.is-bangla .auth-points li { line-height: 1.8; }

/* ------------------------------------------------------------------- OTP */

.otp-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  text-align: center;
  padding-left: 0.5em;
}

.otp-resend-form { margin-top: 0.9rem; text-align: center; }

.otp-resend {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.otp-resend:disabled { color: var(--ink-muted); cursor: default; }
.otp-resend:not(:disabled):hover { text-decoration: underline; }

.auth-forgot { margin: -0.4rem 0 1rem; font-size: 0.85rem; text-align: right; }
.auth-forgot a { color: var(--brand); font-weight: 600; }

/* ---------- terms acknowledgement ---------- */

.auth-consent {
  margin: 0.25rem 0 1.25rem;
  padding: 0.85rem 0.95rem;
  background: rgba(26, 79, 184, 0.05);
  border: 1px solid rgba(26, 79, 184, 0.16);
  border-radius: 10px;
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 400;
}

.consent-line input[type="checkbox"] {
  /* A comfortable tap target, and pinned to the first line of text. */
  width: 18px;
  height: 18px;
  margin: 0.18rem 0 0;
  flex: 0 0 auto;
  accent-color: #1a4fb8;
  cursor: pointer;
}

.consent-links {
  display: block;
  margin-top: 0.3rem;
}

.consent-links a {
  color: #1a4fb8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-consent .field-error { margin: 0.5rem 0 0; }
