/*
 * voimar-auth.css — THE one stylesheet for every Voimar registration /
 * sign-in / password-reset screen across the digital estate (SMS, APN,
 * Vault, and any app added later). Values are lifted 1:1 from
 * vault.voimar.co.za's own auth card (heita.pro/frontend/vault-app,
 * app/page.tsx + tailwind.config.ts), so every portal matches Vault.
 *
 * Plain CSS on purpose, not Tailwind classes: it works unchanged in a
 * Tailwind v3 app, a Tailwind v4 app, or a Jinja/FastAPI page. Edit it
 * HERE (voimar-shared/auth-kit/) and run sync.sh - never per app.
 */

.va-page {
  --va-red: #d82827;
  --va-red-dark: #b31f1f;
  --va-ink: #1f2937;
  --va-grey-50: #f9fafb;
  --va-grey-100: #f3f4f6;
  --va-grey-200: #e5e7eb;
  --va-grey-300: #d1d5db;
  --va-grey-500: #6b7280;
  --va-grey-600: #4b5563;
  --va-green: #15803d;

  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
  background: var(--va-red);
  color: var(--va-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.va-page--black {
  background: #0b0b0b;
}

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

.va-wrap {
  width: 100%;
  max-width: 28rem;
}

/* Logo tile overlaps the top of the card - negative margin equals its own height. */
.va-logo {
  position: relative;
  z-index: 10;
  margin: 0 auto -7rem;
  height: 7rem;
  width: 7rem;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
}

.va-logo img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.va-card {
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
}

.va-card-body {
  padding: 8rem 2rem 2rem;
}

.va-title-row {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.va-title-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgb(216 40 39 / 0.1);
  color: var(--va-red);
}

.va-title-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.va-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: var(--va-ink);
}

.va-eyebrow {
  margin: 0 0 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--va-red);
}

.va-badge-row {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.va-badge {
  border-radius: 9999px;
  background: var(--va-grey-100);
  padding: 0.125rem 0.625rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: var(--va-grey-600);
}

.va-intro {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--va-grey-600);
}

/* Create Account / Sign In segmented tabs */
.va-tabs {
  margin-bottom: 1rem;
  display: flex;
  border-radius: 0.5rem;
  background: var(--va-grey-100);
  padding: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.va-tab {
  flex: 1;
  border-radius: 0.375rem;
  padding: 0.375rem 0;
  text-align: center;
  color: var(--va-grey-600);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.va-tab--active {
  background: #ffffff;
  color: var(--va-ink);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.va-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.va-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.va-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--va-grey-600);
}

.va-input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--va-grey-200);
  background: #ffffff;
  padding: 0.625rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--va-ink);
  outline: none;
  transition: border-color 0.15s;
}

.va-input:focus {
  border-color: var(--va-red);
}

.va-input:disabled {
  background: var(--va-grey-50);
  color: var(--va-grey-500);
}

.va-input--verified {
  border-color: var(--va-green);
}

.va-input-group {
  position: relative;
}

.va-input-group .va-input {
  padding-right: 2.75rem;
}

/* Eye on / eye off toggle inside a password field */
.va-eye {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--va-grey-500);
  cursor: pointer;
}

.va-eye svg {
  height: 1rem;
  width: 1rem;
}

/* Field + inline action button ("Send code" / "Verify") */
.va-with-action {
  display: flex;
  gap: 0.5rem;
}

.va-with-action .va-input {
  flex: 1;
  min-width: 0;
}

.va-inline-btn {
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--va-red);
  background: #ffffff;
  padding: 0 0.875rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--va-red);
  cursor: pointer;
  white-space: nowrap;
}

.va-inline-btn:hover:not(:disabled) {
  background: rgb(216 40 39 / 0.06);
}

.va-inline-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.va-verified-tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--va-green);
}

.va-verified-tag svg {
  height: 1rem;
  width: 1rem;
}

.va-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--va-grey-500);
}

.va-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--va-grey-600);
}

.va-check input {
  margin-top: 0.15rem;
  height: 1rem;
  width: 1rem;
  flex-shrink: 0;
  accent-color: var(--va-red);
}

.va-link {
  color: var(--va-red);
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.va-link--muted {
  color: var(--va-grey-600);
  font-weight: 400;
}

.va-error {
  margin: 0;
  font-size: 0.875rem;
  color: #dc2626;
}

.va-notice {
  margin: 0;
  font-size: 0.875rem;
  color: var(--va-green);
}

.va-submit {
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
  background: var(--va-red);
  padding: 0.625rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s;
}

.va-submit:hover:not(:disabled) {
  background: var(--va-red-dark);
}

/* Sign in with Voimar ID - ALWAYS option 1 on every sign-in screen, above the email/password form, text centred
 * (Leonard, 28 Oct 2026: "voimar ID must always be option 1 - and centre text"). Use on the link/button:
 *   <a className="va-submit va-sso" href=".../voimar-id/start">Sign in with Voimar ID</a>  then  <div className="va-or">or</div>
 * .va-submit on an <a> left its text left-aligned; .va-sso centres it whatever the element. */
.va-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.va-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.25rem 0;
  font-size: 0.75rem;
  color: var(--va-grey-600);
}

.va-or::before,
.va-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--va-grey-200);
}

.va-submit:disabled {
  cursor: default;
  opacity: 0.55;
}

/* "Secured by Paystack - we never store your card" panel */
.va-secure {
  display: flex;
  gap: 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid var(--va-grey-200);
  background: var(--va-grey-50);
  padding: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--va-grey-600);
}

.va-secure svg {
  height: 1rem;
  width: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--va-green);
}

.va-footnote {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--va-grey-600);
}

/* Get help under the card: the one VOIMAR ID help page (id.voimar.co.za/help) */
.va-help {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.9);
}

.va-help a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
}

/* Legal line under the card - wording from VOIMAR_BRANDING.md */
.va-legal {
  max-width: 28rem;
  text-align: center;
  font-size: 0.6875rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.85);
}

.va-legal a {
  color: #ffffff;
}

@media (max-width: 420px) {
  .va-card-body {
    padding: 8rem 1.25rem 1.5rem;
  }
  .va-row-2 {
    grid-template-columns: 1fr;
  }
}

/* Password rules checklist (PasswordField `rules`) */
.va-input-group--error .va-input {
  border-color: var(--va-red);
  box-shadow: 0 0 0 1px var(--va-red);
}
.va-rules {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
}
.va-rules ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.125rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--va-grey-500, #6b7280);
}
.va-rules li {
  overflow-wrap: anywhere;
}
.va-rule--met {
  color: #15803d;
  font-weight: 600;
}
.va-rule--unmet {
  color: var(--va-red);
}
.va-rule--bad {
  margin: 0.375rem 0 0;
  color: var(--va-red);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.va-bad-char {
  display: inline-block;
  margin: 0 0.125rem;
  padding: 0 0.375rem;
  border-radius: 0.25rem;
  background: rgb(216 40 39 / 0.12);
  color: var(--va-red);
  font-family: ui-monospace, monospace;
}
@media (max-width: 380px) {
  .va-rules ul {
    grid-template-columns: 1fr;
  }
}

/* WhatsApp or SMS choice for mobile codes */
.va-via {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  color: var(--va-grey-500);
}
.va-via-option {
  border: 1px solid var(--va-grey-200, #e5e7eb);
  border-radius: 999px;
  background: #ffffff;
  padding: 0.125rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--va-ink, #111827);
  cursor: pointer;
}
.va-via-option--on {
  border-color: #15803d;
  background: #f0fdf4;
  color: #15803d;
}

/* NumericGuard: flash a field red when a character that isn't allowed was dropped */
.va-rejected {
  outline: 2px solid #d82827 !important;
  outline-offset: 1px;
  transition: outline-color 0.2s;
}

/* ---- The one VOIMAR sign-in screen (auth-kit 2.28.0, 6 Nov 2026; Leonard: "voimar login screens are very confusing - this works better
   for me", MAD Central Command's sign-in as the model). A light page, the product's logo and line on top, one white card with a top edge
   in the product colour, a pill switch, one big button, "A product of" VOIMAR, footer links. Phone first, centred on every size. ---- */
.vid-page { --va-red: var(--vid-color); --va-red-dark: var(--vid-color); --va-ink: #1f2937; --va-grey-50: #f9fafb; --va-grey-100: #f3f4f6;
  --va-grey-200: #e5e7eb; --va-grey-300: #d1d5db; --va-grey-500: #6b7280; --va-grey-600: #4b5563; --va-green: #15803d;   /* the form styles' colours */
  min-height: 100dvh; background: #f4f5f7; color: #14151a; font-family: Inter, Arial, Helvetica, sans-serif;
  display: flex; justify-content: center; padding: 32px 16px 24px; box-sizing: border-box; }
.vid-page *, .vid-page *::before, .vid-page *::after { box-sizing: border-box; }
.vid-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.vid-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.vid-brand-icon { width: 48px; height: 48px; border-radius: 13px; background: var(--vid-color); color: #fff; display: grid; place-items: center; flex: none; }
.vid-brand-icon svg { width: 26px; height: 26px; }
.vid-brand-text b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.vid-brand-text small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #6b7280; text-transform: uppercase; }
.vid-card { background: #fff; border-radius: 16px; border-top: 5px solid var(--vid-color); box-shadow: 0 10px 30px rgb(20 21 26 / .08), 0 1px 3px rgb(20 21 26 / .06);
  padding: 22px 22px 18px; }
.vid-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #f1f2f4; border-radius: 999px; margin-bottom: 20px; }
.vid-pill { text-align: center; padding: 9px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #4b5563; text-decoration: none; }
.vid-pill--on { background: var(--vid-color); color: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .15); }
.vid-h { font-size: 21px; font-weight: 800; margin: 0 0 6px; text-align: center; }
.vid-line { font-size: 14.5px; line-height: 1.5; color: #4b5563; margin: 0 0 18px; text-align: center; }
.vid-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 12px; background: var(--vid-color); color: #fff;
  font-size: 16.5px; font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgb(0 0 0 / .14); }
.vid-btn:hover { filter: brightness(1.06); }
.vid-btn:focus-visible, .vid-pill:focus-visible { outline: 3px solid #5b7390; outline-offset: 2px; }
.vid-safe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 4px; font-size: 12.5px; color: #6b7280; }
.vid-safe svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.vid-error { margin: 0 0 12px; }
.vid-other { margin-top: 16px; border-top: 1px solid #e5e7eb; padding-top: 10px; }
.vid-other summary { cursor: pointer; list-style: none; text-align: center; font-size: 13.5px; font-weight: 600; color: #4b5563; padding: 6px 0; }
.vid-other summary::-webkit-details-marker { display: none; }
.vid-other summary::after { content: " \25BE"; }
.vid-other[open] summary::after { content: " \25B4"; }
.vid-other-body { padding-top: 10px; }
.vid-note { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: #6b7280; text-align: center; }
.vid-maker { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; color: #6b7280; }
.vid-maker img { height: 40px; width: auto; }   /* voimar-logo-red.png: the transparent corporate logo */
.vid-brand--logo { flex-direction: column; gap: 6px; }
.vid-brand-logo { height: 48px; width: auto; max-width: 260px; object-fit: contain; mix-blend-mode: multiply; }   /* a white-backed logo blends into the page */
.vid-brand-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #6b7280; text-transform: uppercase; text-align: center; }
.vid-foot { text-align: center; font-size: 12px; color: #6b7280; line-height: 1.6; }
.vid-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 6px; }
.vid-foot a { color: #374151; font-weight: 600; text-decoration: none; }
.vid-foot a:hover { color: var(--vid-color); text-decoration: underline; }
.vid-foot p { margin: 2px 0; }
