/* Homepage 8 sign-in, sign-up and code pages (H8_PLAN.md lane B; prototype_v2_page.html tokens).
   Loaded only by resources/views/auth/h8/*. Payism blue is the brand; no saffron here (buy actions only).
   Text 14px minimum, 48px tap targets, visible focus rings. */
.h8a-body {
  --h8-navy: #0A2E6E; --h8-blue: #1366D6; --h8-blue-d: #0F56B8; --h8-sky: #E7F0FD; --h8-page: #F3F6FB;
  --h8-ink: #0E1726; --h8-ink-2: #44546C; --h8-line: #DCE4F0; --h8-field: #B9C6D9; --h8-red: #B42318; --h8-green: #0B7A3B;
  --h8-font: "Plus Jakarta Sans", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  background: var(--h8-page) !important; color: var(--h8-ink); font-family: var(--h8-font) !important;
  font-size: 16px; line-height: 1.45; margin: 0;
}
.h8a-body *, .h8a-body *::before, .h8a-body *::after { box-sizing: border-box; }
.h8a { min-height: 100vh; display: flex; flex-direction: column; }
.h8a h1, .h8a h2, .h8a p { margin: 0; }
.h8a [hidden] { display: none !important; }
body.v3 .h8a :focus-visible { outline: 3px solid var(--h8-blue); outline-offset: 2px; border-radius: 8px; }
body.v3 .h8a-band :focus-visible, body.v3 .h8a-hero :focus-visible { outline-color: #fff; }

/* ---------- blue patterned band (the H8 header look) ---------- */
.h8a-band, .h8a-hero {
  position: relative; color: #fff;
  background: radial-gradient(120% 90% at 85% 0%, #1E78E8 0%, transparent 55%), linear-gradient(160deg, #0A2E6E 0%, #0F4FB0 60%, #1366D6 100%);
}
.h8a-band::before, .h8a-hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .09; pointer-events: none;
  background-image: radial-gradient(circle at 20px 20px, transparent 17px, #fff 18px, transparent 19px); background-size: 40px 40px;
}
.h8a-band { border-radius: 0 0 44px 44px; padding: 16px 28px 128px; }
.h8a-bar { position: relative; max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; min-height: 56px; }
.h8a-bar__back, .h8a-bar__help {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; height: 48px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
}
.h8a-bar__help { padding: 0 18px; margin-inline-start: auto; }
.h8a-bar__back:hover, .h8a-bar__help:hover { background: rgba(255,255,255,.22); color: #fff; text-decoration: none; }
.h8a-bar__logo { display: inline-flex; align-items: center; background: #fff; border-radius: 14px; padding: 8px 14px; min-height: 48px; box-shadow: 0 6px 18px rgba(4,20,60,.18); }
.h8a-bar__logo img { height: 30px; width: auto; max-width: 170px; object-fit: contain; display: block; }

/* ---------- the card ---------- */
.h8a-main { position: relative; z-index: 1; margin-top: -104px; padding: 0 16px 48px; flex: 1; }
.h8a-card {
  max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px rgba(14,23,38,.16);
}

/* left: hero panel */
.h8a-hero { padding: 40px 40px 36px; display: flex; flex-direction: column; gap: 24px; }
.h8a-hero__top { position: relative; display: flex; flex-direction: column; gap: 22px; }
.h8a-hero__title { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; max-width: 440px; }
.h8a-hero__art { width: 100%; height: auto; aspect-ratio: 860 / 560; object-fit: cover; border-radius: 22px; display: block; }
.h8a-benefits { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.h8a-benefits li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 10px 14px; }
.h8a-benefits__ico { flex: none; width: 38px; height: 38px; border-radius: 12px; background: #fff; color: var(--h8-blue); display: inline-flex; align-items: center; justify-content: center; }

/* right: form */
.h8a-form { padding: 44px 52px 36px; display: flex; flex-direction: column; justify-content: center; gap: 24px; min-width: 0; }
.h8a-step { display: flex; flex-direction: column; gap: 14px; }
.h8a-title { font-size: 30px; line-height: 1.2; font-weight: 800; color: var(--h8-ink); letter-spacing: -.01em; }
.h8a-title:focus { outline: none; }
.h8a-sub { font-size: 16px; color: var(--h8-ink-2); }
.h8a-sub b { color: var(--h8-ink); white-space: nowrap; }
.h8a-fields { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.h8a-field { display: grid; gap: 6px; }
.h8a-label { font-weight: 700; font-size: 15px; color: var(--h8-ink); margin: 0; }
.h8a-optional { font-weight: 500; color: var(--h8-ink-2); font-size: 14px; }
.h8a-input {
  width: 100%; min-height: 52px; border: 1.5px solid var(--h8-field); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 17px;
  font-weight: 500; color: var(--h8-ink); background: #fff;
}
.h8a-input:focus { outline: none; border-color: var(--h8-blue); box-shadow: 0 0 0 3px rgba(19,102,214,.22); }
.h8a-input.is-invalid, .h8a-phone.is-invalid { border-color: var(--h8-red); }
.h8a-input--code { text-transform: uppercase; letter-spacing: .06em; }
.h8a-phone { display: flex; align-items: stretch; border: 1.5px solid var(--h8-field); border-radius: 12px; background: #fff; overflow: hidden; }
.h8a-phone:focus-within { border-color: var(--h8-blue); box-shadow: 0 0 0 3px rgba(19,102,214,.22); }
.h8a-phone__cc { display: inline-flex; align-items: center; padding: 0 12px 0 14px; font-weight: 700; color: var(--h8-ink); background: var(--h8-sky); border-inline-end: 1.5px solid var(--h8-line); font-size: 17px; }
.h8a-phone .h8a-input { border: 0; border-radius: 0; letter-spacing: .04em; }
.h8a-phone .h8a-input:focus { box-shadow: none; }
.h8a-pass { position: relative; }
.h8a-pass .h8a-input { padding-inline-end: 56px; }
.h8a-pass__eye { position: absolute; inset-inline-end: 2px; top: 2px; bottom: 2px; width: 48px; border: 0; background: transparent; color: var(--h8-ink-2); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.h8a-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.h8a-row a, .h8a-terms a, .h8a-links a, .h8a-check a, .h8a-link { color: var(--h8-blue); font-weight: 700; }
.h8a-check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--h8-ink); min-height: 32px; margin: 0; cursor: pointer; }
.h8a-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--h8-blue); flex: none; }
.h8a-error { color: var(--h8-red); font-size: 15px; font-weight: 600; }
.h8a-help, .h8a-note { font-size: 14px; color: var(--h8-ink-2); }
.h8a-channel { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--h8-ink-2); }
.h8a-chan { display: inline-flex; color: var(--h8-blue); }
.h8a-chan--wa { color: var(--h8-green); }
.h8a-notice { display: flex; gap: 10px; align-items: flex-start; background: #FFF8E6; border: 1px solid #F3D48B; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.h8a-notice--info { background: #EEF4FF; border-color: #C9DAFB; color: var(--h8-ink); margin: 0 0 12px; }

/* buttons: blue primary, outlined secondary */
.h8a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border-radius: 12px; padding: 0 18px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 0; transition: background .15s ease;
}
.h8a-btn--primary { background: var(--h8-blue); color: #fff; }
.h8a-btn--primary:hover { background: var(--h8-blue-d); color: #fff; }
.h8a-btn--primary[disabled] { opacity: .65; cursor: progress; }
.h8a-btn--line { background: #fff; color: var(--h8-blue); border: 1.5px solid var(--h8-blue); }
.h8a-btn--line:hover { background: var(--h8-sky); color: var(--h8-blue); text-decoration: none; }
.h8a-link { background: none; border: 0; padding: 0 4px; min-height: 48px; font: inherit; font-size: 15px; cursor: pointer; }
.h8a-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px 0 4px; margin-inline-start: -4px; border: 0; background: none; color: var(--h8-blue); font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 10px; cursor: pointer; }
.h8a-back:hover { background: var(--h8-sky); text-decoration: none; }
.h8a-terms { font-size: 14px; color: var(--h8-ink-2); }
.h8a-or { display: flex; align-items: center; gap: 12px; color: var(--h8-ink-2); font-size: 14px; }
.h8a-or::before, .h8a-or::after { content: ""; flex: 1; height: 1px; background: var(--h8-line); }
.h8a-social { display: grid; gap: 10px; }
.h8a-social__btn i { font-size: 20px; }

/* I run a shop */
.h8a-shop { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--h8-line); border-radius: 14px; padding: 12px 14px; cursor: pointer; margin: 0; background: #fff; min-height: 64px; }
.h8a-shop:hover { border-color: var(--h8-field); }
.h8a-shop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h8a-shop:focus-within { outline: 3px solid var(--h8-blue); outline-offset: 2px; }
.h8a-shop__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--h8-sky); color: var(--h8-blue); display: inline-flex; align-items: center; justify-content: center; }
.h8a-shop__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.h8a-shop__text strong { font-size: 16px; color: var(--h8-ink); }
.h8a-shop__text small { font-size: 14px; color: var(--h8-ink-2); }
.h8a-switch { flex: none; width: 48px; height: 28px; border-radius: 999px; background: #C3CEDD; position: relative; transition: background .15s ease; }
.h8a-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease; }
.h8a-shop input:checked ~ .h8a-switch { background: var(--h8-blue); }
.h8a-shop input:checked ~ .h8a-switch::after { transform: translateX(20px); }
.h8a-shop:has(input:checked) { border-color: var(--h8-blue); background: #F7FAFF; }
.h8a-shopfields { display: grid; gap: 14px; padding: 2px 0 0; }

/* 6-box code */
.h8a-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 56px)); gap: 10px; }
.h8a-otp__box {
  width: 100%; height: 60px; border: 1.5px solid var(--h8-field); border-radius: 12px; text-align: center; font: inherit;
  font-size: 26px; font-weight: 800; color: var(--h8-ink); background: #fff; padding: 0;
}
.h8a-otp__box:focus { outline: none; border-color: var(--h8-blue); box-shadow: 0 0 0 3px rgba(19,102,214,.22); }
.h8a-otp.is-invalid .h8a-otp__box { border-color: var(--h8-red); }
.h8a-resend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; color: var(--h8-ink-2); min-height: 48px; }
.h8a-resend .d-inline { display: inline; }

/* footer links */
.h8a-links { display: flex; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid var(--h8-line); padding-top: 18px; font-size: 15px; }
.h8a-links a { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; min-height: 32px; }
.h8a-links a:hover { text-decoration: underline; }
.h8a-links__q { color: var(--h8-ink-2); }

/* ---------- tablet ---------- */
@media (max-width: 991px) {
  .h8a-card { grid-template-columns: 1fr; max-width: 620px; }
  .h8a-hero { padding: 28px; }
  .h8a-hero__top { flex-direction: row; align-items: center; gap: 18px; }
  .h8a-hero__title { font-size: 24px; flex: 1; }
  .h8a-hero__art { width: 46%; max-width: 260px; border-radius: 16px; }
  .h8a-benefits { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .h8a-form { padding: 32px 28px 28px; }
}

/* ---------- phone ---------- */
@media (max-width: 575px) {
  .h8a-band { border-radius: 0 0 28px 28px; padding: 10px 16px 84px; }
  .h8a-bar { gap: 10px; }
  .h8a-bar__logo { padding: 6px 12px; }
  .h8a-bar__logo img { height: 26px; max-width: 130px; }
  .h8a-bar__help span { display: none; }
  .h8a-bar__help { padding: 0; width: 48px; }
  .h8a-main { margin-top: -72px; padding: 0 12px 32px; }
  .h8a-card { border-radius: 22px; display: flex; flex-direction: column; }
  /* the panel: a compact headline + picture strip on top, the benefit lines under the form */
  .h8a-hero { display: contents; }
  .h8a-hero::before { display: none; }
  .h8a-hero__top {
    order: 0; flex-direction: row; align-items: center; gap: 14px; padding: 18px 16px; color: #fff;
    background: radial-gradient(120% 90% at 85% 0%, #1E78E8 0%, transparent 55%), linear-gradient(160deg, #0A2E6E 0%, #0F4FB0 60%, #1366D6 100%);
  }
  .h8a-hero__title { font-size: 20px; }
  .h8a-hero__art { width: 42%; max-width: 160px; border-radius: 14px; box-shadow: 0 10px 24px rgba(4,20,60,.35); }
  .h8a-form { order: 1; padding: 22px 16px 20px; gap: 20px; }
  .h8a-title { font-size: 24px; }
  .h8a-benefits { order: 2; margin: 0 16px 18px; grid-template-columns: 1fr; }
  .h8a-benefits li { background: var(--h8-sky); border-color: var(--h8-line); color: var(--h8-ink); font-size: 15px; }
  .h8a-benefits__ico { background: #fff; }
  .h8a-otp { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .h8a-otp__box { height: 56px; font-size: 24px; }
  .h8a-links { flex-direction: column; gap: 4px; }
  /* round 5: 48px taps on the phone (footer links, Change number, the terms and Remember me boxes) */
  .h8a-links a, .h8a-back, .h8a-check { min-height: 48px; }
  .h8a-check { align-items: center; }
  .h8a-check input { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .h8a-btn, .h8a-switch, .h8a-switch::after { transition: none; }
}

/* ---------- right to left (Arabic; H8 round 9): direction icons point the reading way, asymmetric paddings mirror ---------- */
[dir="rtl"] :is(.v3x-ico--dir, .v3-ico--dir),
[dir="rtl"] svg:has(> use:is([href="#v3i-chevron-right"], [href="#v3i-chevron-left"], [href="#v3i-back"], [href="#v3i-logout"])) { scale: -1 1; }
[dir="rtl"] .h8a-phone__cc { padding: 0 14px 0 12px; }
[dir="rtl"] .h8a-back { padding: 0 4px 0 10px; }
