/* HxH Store: split sign-in / sign-up layout (green brand panel on the left, form on the right).
   Loaded LAST (see shell.php) so it wins over the older auth-panel rules.
   Covers: /login, /register (4-step wizard) and /setup.
   Also fixes the wizard footer: "Back" no longer stretches full width and "Continue" is never squashed. */

html[data-theme] { --as-a: #1a9a72; --as-b: #0c5f47; --as-glow: rgba(255,255,255,.20); --as-mint: #8af0c9; --as-cta1: #19a678; --as-cta2: #0d7a58; }
html[data-theme="violet"]   { --as-a: #8456ff; --as-b: #4b24b9; --as-mint: #d3c2ff; --as-cta1: #8456ff; --as-cta2: #5a2fd0; }
html[data-theme="sand"]     { --as-a: #c2703f; --as-b: #7c3f1e; --as-mint: #ffd9b8; --as-cta1: #c2703f; --as-cta2: #8f4a24; }
html[data-theme="ocean"]    { --as-a: #139db8; --as-b: #0a5b70; --as-mint: #a6ecf8; --as-cta1: #139db8; --as-cta2: #0b6f87; }
html[data-theme="rose"]     { --as-a: #e35a80; --as-b: #a3274b; --as-mint: #ffd0dd; --as-cta1: #e35a80; --as-cta2: #b72f57; }
html[data-theme="midnight"] { --as-a: #15876a; --as-b: #0a4a3a; --as-mint: #7ff0c6; --as-cta1: #1fb98c; --as-cta2: #0f8a68; }

/* ---------- the card ---------- */
html body #app .auth-panel.auth-split {
  display: grid !important;
  grid-template-columns: minmax(290px, .85fr) minmax(0, 1.15fr);
  align-items: stretch;
  gap: 0 !important;
  width: 100% !important;
  max-width: 1020px !important;
  margin: 8px auto 28px !important;
  padding: 0 !important;
  overflow: visible !important;
  border-radius: 32px !important;
  border: 1px solid var(--line, rgba(0,0,0,.08)) !important;
  background: var(--panel, #fff) !important;
  box-shadow: 0 30px 70px -38px rgba(8, 60, 44, .45), 0 2px 0 rgba(255,255,255,.6) inset !important;
  text-align: left;
}
html body #app .auth-panel.auth-split::before,
html body #app .auth-panel.auth-split::after { display: none !important; content: none !important; }

/* ---------- left brand panel ---------- */
html body #app .auth-split .auth-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  padding: 40px 34px 34px;
  color: #fff;
  overflow: hidden;
  border-radius: 31px 0 0 31px;
  background:
    radial-gradient(120% 70% at 85% 12%, var(--as-glow), transparent 58%),
    radial-gradient(90% 60% at 10% 100%, rgba(0,0,0,.22), transparent 62%),
    linear-gradient(158deg, var(--as-a) 0%, var(--as-b) 100%);
}
html body #app .auth-split .auth-side::after {
  content: ""; position: absolute; right: -90px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); pointer-events: none;
}
html body #app .auth-split .auth-brand-emblem {
  align-self: center;
  width: 68px; height: 68px; margin: 0 !important; padding: 0 !important;
  display: grid !important; place-items: center;
  border-radius: 20px; background: #fff !important; box-shadow: 0 14px 30px -14px rgba(0,0,0,.5);
}
html body #app .auth-split .auth-brand-emblem img { width: 44px !important; height: 44px !important; border-radius: 12px; object-fit: contain; }
html body #app .auth-split .auth-side-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
html body #app .auth-split .auth-pill-badge {
  align-self: center;
  margin: 0 0 14px !important; padding: 8px 16px !important;
  border-radius: 999px !important;
  font-size: 11px !important; font-weight: 800 !important; letter-spacing: .14em !important; text-transform: uppercase;
  color: #fff !important; background: rgba(255,255,255,.16) !important; border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow: none !important;
}
html body #app .auth-split .auth-side h2 {
  margin: 0 !important; color: #fff !important; text-align: left !important;
  -webkit-text-fill-color: #fff !important; background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  font-size: clamp(30px, 3.1vw, 40px) !important; line-height: 1.08 !important; letter-spacing: -.02em;
}
html body #app .auth-split .auth-side h2 span { color: var(--as-mint) !important; background: none !important; -webkit-text-fill-color: var(--as-mint) !important; }
html body #app .auth-split .auth-side p {
  margin: 4px 0 0 !important; max-width: 34ch; color: rgba(255,255,255,.88) !important;
  font-size: 15px !important; line-height: 1.6 !important; text-align: left !important;
}
html body #app .auth-split .auth-perks {
  list-style: none; margin: auto 0 0 !important; padding: 20px 0 0 !important;
  border-top: 1px solid rgba(255,255,255,.28);
  display: grid; gap: 10px;
}
html body #app .auth-split .auth-perks li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 700; color: #fff; margin: 0; }
html body #app .auth-split .auth-perks li span { color: var(--as-mint); font-weight: 900; }

/* ---------- right form side ---------- */
html body #app .auth-split .auth-main {
  min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 38px 38px 34px;
}
html body #app .auth-split .auth-main > form,
html body #app .auth-split .auth-main > .auth-method-tabs { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
html body #app .auth-split .auth-footer-card,
html body #app .auth-split .auth-recovery-link { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
html body #app .auth-split .auth-main .btn.auth-submit-btn:not(.secondary):not(.danger):not(.ghost),
html body #app .auth-split .auth-main .btn.reg-next:not(.secondary):not(.danger):not(.ghost) {
  background: linear-gradient(135deg, var(--as-cta1), var(--as-cta2)) !important; background-image: linear-gradient(135deg, var(--as-cta1), var(--as-cta2)) !important;
  color: #fff !important; border-color: transparent !important;
  box-shadow: 0 14px 28px -16px var(--as-cta2) !important;
}
html body #app .auth-split .auth-main .btn.auth-submit-btn:not(.secondary):not(.danger):not(.ghost):hover,
html body #app .auth-split .auth-main .btn.reg-next:not(.secondary):not(.danger):not(.ghost):hover { filter: brightness(1.06); }

/* ---------- wizard footer (the reported bug) ---------- */
html body #app .auth-panel .reg-nav { display: flex !important; flex-direction: row; align-items: stretch; gap: 10px; margin-top: 20px; width: 100%; }
html body #app .auth-panel .reg-nav .btn { width: auto !important; max-width: none; min-width: 0; margin: 0; flex: 1 1 0; justify-content: center; white-space: nowrap; }
html body #app .auth-panel .reg-nav .reg-back { flex: 0 0 auto !important; min-width: 104px; padding-left: 18px; padding-right: 18px; }
html body #app .auth-panel .reg-nav .reg-back svg,
html body #app .auth-panel .reg-nav .reg-back .reg-back-ico { transform: none !important; width: 16px; height: 16px; flex: 0 0 16px; }
html body #app .auth-panel .reg-nav .reg-next,
html body #app .auth-panel .reg-nav .reg-submit { flex: 1 1 0 !important; min-width: 150px; border-radius: 999px; }
html body #app .auth-panel .reg-nav [hidden] { display: none !important; }
html body #app .auth-panel .reg-nav .btn svg { flex: 0 0 auto; }
html body #app .auth-panel .reg-step[data-reg-step] { min-width: 0; }

/* ---------- tablet / phone ---------- */
@media (max-width: 900px) {
  html body #app .auth-panel.auth-split { grid-template-columns: 1fr; max-width: 640px !important; border-radius: 26px !important; margin: 4px auto 24px !important; }
  html body #app .auth-split .auth-side {
    border-radius: 25px 25px 0 0; padding: 22px 22px 20px; gap: 14px;
    display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px;
  }
  html body #app .auth-split .auth-brand-emblem { width: 56px; height: 56px; border-radius: 17px; align-self: start; grid-row: 1; }
  html body #app .auth-split .auth-brand-emblem img { width: 38px !important; height: 38px !important; }
  html body #app .auth-split .auth-side-copy { grid-column: 2; gap: 6px; }
  html body #app .auth-split .auth-pill-badge { align-self: flex-start; margin: 0 !important; padding: 6px 12px !important; font-size: 10px !important; }
  html body #app .auth-split .auth-side h2 { font-size: clamp(24px, 6vw, 30px) !important; }
  html body #app .auth-split .auth-side p { font-size: 13.5px !important; margin: 0 !important; max-width: none; }
  html body #app .auth-split .auth-perks {
    grid-column: 1 / -1; margin: 2px 0 0 !important; padding: 14px 0 0 !important;
    display: flex; flex-wrap: wrap; gap: 8px 16px;
  }
  html body #app .auth-split .auth-perks li { font-size: 12.5px; }
  html body #app .auth-split .auth-main { padding: 24px 22px 26px; }
}
@media (max-width: 560px) {
  html body #app .auth-panel.auth-split { border-radius: 22px !important; }
  html body #app .auth-split .auth-side { border-radius: 21px 21px 0 0; padding: 18px 16px 16px; grid-template-columns: 1fr; }
  html body #app .auth-split .auth-brand-emblem { display: none !important; }
  html body #app .auth-split .auth-side-copy { grid-column: 1; }
  html body #app .auth-split .auth-side p { display: none; }
  html body #app .auth-split .auth-perks { display: none; }
  html body #app .auth-split .auth-main { padding: 20px 16px 22px; }
  html body #app .auth-panel .reg-nav { gap: 8px; }
  html body #app .auth-panel .reg-nav .reg-back { min-width: 88px; padding-left: 14px; padding-right: 14px; }
  html body #app .auth-panel .reg-nav .reg-next,
  html body #app .auth-panel .reg-nav .reg-submit { min-width: 0; }
}
