/* ==========================================================================
   Wongate sign-in / sign-up (split screen). Scoped to body.wg-auth.
   Brand: magenta #D80C5B → coral #E53950 → orange #F77814.
   ========================================================================== */
html:has(body.wg-auth) { background: #fff !important; color-scheme: light !important; }
body.wg-auth {
    --wg-pink: #D80C5B;
    --wg-coral: #E53950;
    --wg-orange: #F77814;
    --wg-ink: #1F1430;
    --wg-text: #4B4458;
    --wg-muted: #8A8396;
    --wg-line: #ECE6EF;
    --wg-field: #F8F6FA;
    --wg-grad: linear-gradient(120deg, #C2185B 0%, #E53950 55%, #F77814 100%);
    --wg-radius: 14px;
    margin: 0;
    min-height: 100vh;
    background: #fff !important;
    color: var(--wg-text) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
html body.wg-auth .auth-content { background: transparent !important; padding: 0 !important; min-height: 0 !important; display: block !important; width: 100%; }
html body.wg-auth .wg-auth-split { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }

/* ---------- Brand panel ---------- */
html body.wg-auth .wg-brand {
    position: sticky; top: 0; height: 100vh; overflow: hidden;
    color: #fff !important;
    padding: 44px 48px 36px; display: flex; flex-direction: column; gap: 26px;
}
html body.wg-auth .wg-brand::after { /* soft dot texture */
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .14;
    background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.4px); background-size: 22px 22px;
    mask-image: linear-gradient(160deg, transparent 20%, #000 75%); -webkit-mask-image: linear-gradient(160deg, transparent 20%, #000 75%);
}
html body.wg-auth .wg-orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
html body.wg-auth .wg-orb-1 { width: 420px; height: 420px; right: -160px; top: -140px; background: radial-gradient(circle, rgba(255,214,102,.45), transparent 65%); }
html body.wg-auth .wg-orb-2 { width: 520px; height: 520px; left: -220px; bottom: -240px; background: radial-gradient(circle, rgba(120,0,60,.28), transparent 65%); }
html body.wg-auth .wg-brand > *:not(.wg-orb) { position: relative; z-index: 1; }
html body.wg-auth .wg-brand > .wg-orb { position: absolute !important; z-index: 0; }
html body.wg-auth .wg-brand-logo img { height: 46px; width: auto; border-radius: 10px; box-shadow: 0 8px 24px rgba(80,0,30,.25); }
html body.wg-auth .wg-brand-copy { display: none; }
html body.wg-auth[data-role="user"] .wg-brand-copy[data-for="user"], html body.wg-auth[data-role="merchant"] .wg-brand-copy[data-for="merchant"], html body.wg-auth[data-role="agent"] .wg-brand-copy[data-for="agent"] { display: block; animation: wgFade .35s ease; }
@keyframes wgFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html body.wg-auth .wg-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #FFE08A; margin-bottom: 10px; }
html body.wg-auth .wg-brand h2 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 800; line-height: 1.12; letter-spacing: -0.8px; margin: 0 0 12px; color: #fff !important; }
html body.wg-auth .wg-brand p { font-size: 15.5px; line-height: 1.6; margin: 0 0 22px; color: rgba(255,255,255,.9) !important; max-width: 470px; }
html body.wg-auth .wg-brand ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 460px; }
html body.wg-auth .wg-brand li { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 11px 14px; backdrop-filter: blur(6px); }
html body.wg-auth .wg-brand li b { display: block; font-size: 14.5px; color: #fff !important; }
html body.wg-auth .wg-brand li small { font-size: 12.5px; color: rgba(255,255,255,.82); }
html body.wg-auth .wg-ic { flex: 0 0 38px; height: 38px; border-radius: 11px; background: #fff !important; color: var(--wg-pink) !important; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 6px 14px rgba(80,0,30,.18); }

html body.wg-auth .wg-visual { margin-top: auto; position: relative; height: 170px; }
html body.wg-auth .wg-vcard {
    position: absolute; left: 0; bottom: 6px; width: 290px; height: 170px; border-radius: 18px; padding: 18px 20px;
    background: linear-gradient(135deg, #2A0F2C 0%, #5B0E3B 55%, #9E1B4A 100%); color: #fff !important;
    box-shadow: 0 22px 50px rgba(40,0,20,.45); transform: rotate(-6deg); transform-origin: left bottom;
}
html body.wg-auth .wg-vcard-top { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
html body.wg-auth .wg-vcard-top img { width: 26px; height: 26px; border-radius: 7px; }
html body.wg-auth .wg-chip { width: 40px; height: 30px; border-radius: 6px; margin: 18px 0 14px; background: linear-gradient(135deg, #F6D37A, #C99A3B); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
html body.wg-auth .wg-vcard-num { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 2px; font-size: 15px; }
html body.wg-auth .wg-vcard-foot { display: flex; justify-content: space-between; font-size: 11px; opacity: .8; margin-top: 10px; letter-spacing: 1px; }
html body.wg-auth .wg-toast {
    position: absolute; left: 230px; bottom: 96px; display: flex; gap: 10px; align-items: center;
    background: #fff !important; color: var(--wg-ink) !important; border-radius: 14px; padding: 10px 14px; box-shadow: 0 16px 40px rgba(40,0,20,.3);
    animation: wgFloat 5s ease-in-out infinite;
}
html body.wg-auth .wg-toast i { color: #16A34A; font-size: 22px; }
html body.wg-auth .wg-toast b { display: block; font-size: 13px; }
html body.wg-auth .wg-toast small { color: #16A34A; font-weight: 700; }
@keyframes wgFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
html body.wg-auth .wg-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: rgba(255,255,255,.88); }
html body.wg-auth .wg-trust i { margin-right: 4px; }

/* ---------- Form side ---------- */
html body.wg-auth .wg-auth-main { display: flex; flex-direction: column; align-items: center; padding: 40px 24px 20px; min-height: 100vh;
    background: radial-gradient(1200px 500px at 100% 0%, #FFF3F7 0%, transparent 60%), #fff; }
html body.wg-auth .wg-auth-main > .auth-content { flex: 1; display: flex !important; align-items: center; justify-content: center; }
html body.wg-auth .wg-auth-mobile-logo { display: none; }
html body.wg-auth .wg-auth-footer { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; color: var(--wg-muted) !important; padding-top: 24px; }
html body.wg-auth .wg-auth-footer a { color: var(--wg-muted) !important; text-decoration: none; } .wg-auth-footer a:hover { color: var(--wg-pink) !important; }

html body.wg-auth .wg-card { width: 100%; max-width: 440px; }
html body.wg-auth .wg-card-head { margin-bottom: 22px; }
html body.wg-auth .wg-title { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; color: var(--wg-ink) !important; margin: 0 0 6px; }
html body.wg-auth .wg-sub { margin: 0; color: var(--wg-muted) !important; font-size: 15px; }

/* Role dropdown */
html body.wg-auth .wg-role { margin-bottom: 20px; }
html body.wg-auth .wg-role-label, html body.wg-auth .wg-field label { display: block; font-size: 13px; font-weight: 700; color: var(--wg-ink) !important; margin-bottom: 7px; }
html body.wg-auth .wg-role-box { position: relative; display: flex; align-items: center; background: #fff !important; border: 1.5px solid var(--wg-line); border-radius: var(--wg-radius); transition: border-color .2s, box-shadow .2s; box-shadow: 0 6px 18px rgba(31,20,48,.05); }
html body.wg-auth .wg-role-box:hover { border-color: #E7C4D3; }
html body.wg-auth .wg-role-box:focus-within { border-color: var(--wg-pink) !important; box-shadow: 0 0 0 4px rgba(216,12,91,.12); }
html body.wg-auth .wg-role-icon { flex: 0 0 38px; height: 38px; margin: 6px 0 6px 7px; border-radius: 11px; background: var(--wg-grad); color: #fff !important; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
html body.wg-auth .wg-role-input { appearance: none; -webkit-appearance: none; flex: 1; border: 0; background: transparent !important; padding: 14px 40px 14px 12px; font-size: 15px; font-weight: 700; color: var(--wg-ink) !important; cursor: pointer; outline: none; font-family: inherit; }
html body.wg-auth .wg-role-caret { position: absolute; right: 16px; color: var(--wg-muted) !important; pointer-events: none; font-size: 13px; }

/* Fields */
html body.wg-auth .wg-field { margin-bottom: 16px; }
html body.wg-auth .wg-label-row { display: flex; justify-content: space-between; align-items: baseline; }
html body.wg-auth .wg-input { position: relative; display: flex; align-items: center; background: var(--wg-field) !important; border: 1.5px solid transparent; border-radius: var(--wg-radius); transition: border-color .2s, background .2s, box-shadow .2s; }
html body.wg-auth .wg-input > i { position: absolute; left: 15px; color: var(--wg-muted) !important; font-size: 15px; pointer-events: none; }
html body.wg-auth .wg-input input { flex: 1; width: 100%; border: 0; background: transparent !important; padding: 14px 14px 14px 44px; font-size: 15px; color: var(--wg-ink) !important; outline: none; font-family: inherit; }
html body.wg-auth .wg-input input::placeholder { color: #B3ADBE; }
html body.wg-auth .wg-input:focus-within { background: #fff !important; border-color: var(--wg-pink) !important; box-shadow: 0 0 0 4px rgba(216,12,91,.12); }
html body.wg-auth .wg-input.is-invalid { border-color: #DC2626; background: #FEF2F2; }
html body.wg-auth .wg-eye { border: 0; background: transparent !important; color: var(--wg-muted) !important; padding: 0 15px; height: 48px; cursor: pointer; }
html body.wg-auth .wg-eye:hover { color: var(--wg-pink) !important; }
html body.wg-auth .wg-error { color: #DC2626; font-size: 12.5px; margin-top: 6px; }
html body.wg-auth .wg-link { font-size: 13px; font-weight: 700; color: var(--wg-pink) !important; text-decoration: none; }
html body.wg-auth .wg-link:hover { text-decoration: underline; }
html body.wg-auth .wg-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--wg-text) !important; margin: 4px 0 20px; cursor: pointer; }
html body.wg-auth .wg-check input { width: 18px; height: 18px; accent-color: var(--wg-pink) !important; }

/* Buttons */
html body.wg-auth .wg-btn, html body.wg-auth .btn-submit-auth {
    width: 100%; border: 0; border-radius: var(--wg-radius); padding: 15px 18px; font-size: 15.5px; font-weight: 800; color: #fff !important;
    background: var(--wg-grad) !important; background-size: 140% 100% !important; box-shadow: 0 12px 26px rgba(216,12,91,.28);
    transition: transform .15s, box-shadow .2s, background-position .4s; cursor: pointer; font-family: inherit; letter-spacing: .1px;
}
html body.wg-auth .wg-btn:hover, html body.wg-auth .btn-submit-auth:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(216,12,91,.34); background-position: 100% 0 !important; }
html body.wg-auth .wg-btn:disabled { opacity: .8; transform: none; }
html body.wg-auth .wg-btn .fa-arrow-right { margin-left: 6px; font-size: 13px; }
html body.wg-auth .wg-divider { display: flex; align-items: center; gap: 12px; color: var(--wg-muted) !important; font-size: 13px; margin: 24px 0 16px; }
html body.wg-auth .wg-divider::before, html body.wg-auth .wg-divider::after { content: ''; flex: 1; height: 1px; background: var(--wg-line); }
html body.wg-auth .wg-btn-outline { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px 18px; border-radius: var(--wg-radius);
    border: 1.5px solid #F2C5D6; background: #FFF6F9; color: var(--wg-pink) !important; font-weight: 800; font-size: 15px; text-decoration: none; transition: background .2s, border-color .2s; }
html body.wg-auth .wg-btn-outline:hover { background: #FFEAF1; border-color: var(--wg-pink) !important; color: var(--wg-pink) !important; }
html body.wg-auth .wg-register-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; color: var(--wg-muted) !important; }
html body.wg-auth .wg-register-row a { color: var(--wg-ink) !important; font-weight: 700; text-decoration: none; border-bottom: 1.5px solid #F2C5D6; }
html body.wg-auth .wg-register-row a:hover { color: var(--wg-pink) !important; border-color: var(--wg-pink) !important; }
html body.wg-auth .wg-secure { display: flex; gap: 8px; align-items: flex-start; margin: 22px 0 0; font-size: 12.5px; color: var(--wg-muted) !important; background: #F8F6FA; border-radius: 12px; padding: 10px 12px; }
html body.wg-auth .wg-secure i { color: #16A34A; margin-top: 2px; }
html body.wg-auth .wg-demo { margin-top: 14px; }

/* ---------- Existing auth pages (register, forgot, reset, verify, 2FA) inside the new layout ---------- */
html body.wg-auth .auth-shell { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 !important; min-height: 0 !important; background: transparent !important; }
html body.wg-auth .auth-shell.is-long { max-width: 620px; }
html body.wg-auth .auth-card { background: #fff !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: var(--wg-text) !important; max-width: none !important; width: 100% !important; }
html body.wg-auth .auth-card::before, html body.wg-auth .auth-card.has-accent::before { display: none !important; }
html body.wg-auth .auth-head { text-align: left !important; margin-bottom: 20px !important; }
html body.wg-auth .auth-head .auth-logo { display: none !important; }
html body.wg-auth .auth-title { font-size: 28px !important; font-weight: 800 !important; letter-spacing: -0.6px; color: var(--wg-ink) !important; margin: 0 0 6px !important; text-align: left !important; }
html body.wg-auth .auth-subtitle { color: var(--wg-muted) !important; font-size: 14.5px !important; text-align: left !important; }
html body.wg-auth .auth-role-badge, html body.wg-auth .auth-portal-features { display: none !important; }
html body.wg-auth .form-label { color: var(--wg-ink) !important; font-weight: 700 !important; font-size: 13px !important; }
html body.wg-auth .form-control, html body.wg-auth .form-select { background: var(--wg-field) !important; border: 1.5px solid transparent !important; border-radius: 12px !important; color: var(--wg-ink) !important; min-height: 48px; font-size: 15px; box-shadow: none !important; }
html body.wg-auth .form-control:focus, html body.wg-auth .form-select:focus { background: #fff !important; border-color: var(--wg-pink) !important; box-shadow: 0 0 0 4px rgba(216,12,91,.12) !important; }
html body.wg-auth .form-control.is-invalid { border-color: #DC2626 !important; }
html body.wg-auth .input-group-text { background: var(--wg-field) !important; border: 1.5px solid transparent !important; color: var(--wg-muted) !important; border-radius: 12px; }
html body.wg-auth .input-group > .form-control { border-left: 0 !important; }
html body.wg-auth .input-group:focus-within .input-group-text { background: #fff !important; border-color: var(--wg-pink) !important; }
html body.wg-auth .input-group:focus-within .form-control { border-color: var(--wg-pink) !important; }
html body.wg-auth .form-check-input:checked { background-color: var(--wg-pink) !important; border-color: var(--wg-pink) !important; }
html body.wg-auth a.text-primary, html body.wg-auth a.text-success, html body.wg-auth a.text-agent, html body.wg-auth .auth-card a:not(.btn):not(.wg-btn-outline):not(.portal-tile) { color: var(--wg-pink) !important; }
html body.wg-auth .alert { border-radius: 12px; }
html body.wg-auth .auth-divider { border-color: var(--wg-line) !important; background: var(--wg-line) !important; }
html body.wg-auth .auth-helper-text { color: var(--wg-muted) !important; }
/* old portal tiles (forgot / reset pages) */
html body.wg-auth .auth-portal-switch { background: var(--wg-field) !important; border: 0 !important; border-radius: 14px !important; padding: 5px !important; }
html body.wg-auth .portal-tile { color: var(--wg-text) !important; border-radius: 10px !important; }
html body.wg-auth .portal-tile.is-active { background: var(--wg-grad) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(216,12,91,.25) !important; }
html body.wg-auth .wg-signin-row { text-align: center; margin: 18px 0 0; font-size: 14.5px; color: var(--wg-text) !important; }
html body.wg-auth .wg-signin-row a { font-weight: 800; color: var(--wg-pink) !important; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    html body.wg-auth .wg-auth-split { grid-template-columns: 40% 1fr; }
    html body.wg-auth .wg-brand { padding: 36px 32px 28px; }
    html body.wg-auth .wg-visual { display: none; }
}
@media (max-width: 860px) {
    html body.wg-auth .wg-auth-split { display: block; }
    html body.wg-auth .wg-brand-col, html body.wg-auth .wg-brand { display: none; }
    html body.wg-auth .wg-auth-main { padding: 22px 16px 16px; background: linear-gradient(180deg, #FFF0F5 0, #fff 220px); }
    html body.wg-auth .wg-auth-mobile-logo { display: block; align-self: flex-start; margin-bottom: 22px; }
    html body.wg-auth .wg-auth-mobile-logo img { height: 38px; border-radius: 9px; box-shadow: 0 6px 16px rgba(216,12,91,.2); }
    html body.wg-auth .wg-auth-main > .auth-content { align-items: flex-start; }
    html body.wg-auth .wg-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    html body.wg-auth .wg-toast, html body.wg-auth .wg-brand-copy { animation: none !important; }
}

/* Dark-theme guards: the site's html[data-theme="dark"] rules must not repaint these pages. */
html body.wg-auth .wg-brand, html body.wg-auth .wg-brand * { color: inherit; }
html body.wg-auth .wg-brand { color: #fff !important; }
html body.wg-auth .wg-brand .wg-eyebrow { color: #FFE08A !important; }
html body.wg-auth .wg-brand li small, html body.wg-auth .wg-trust { color: rgba(255,255,255,.85) !important; }
html body.wg-auth .wg-brand .wg-ic { color: var(--wg-pink) !important; }
html body.wg-auth .wg-toast, html body.wg-auth .wg-toast b { color: var(--wg-ink) !important; }
html body.wg-auth .wg-toast i, html body.wg-auth .wg-toast small { color: #16A34A !important; }
html body.wg-auth .wg-auth-main h1, html body.wg-auth .wg-auth-main h2, html body.wg-auth .wg-auth-main h3, html body.wg-auth .wg-auth-main h4, html body.wg-auth .wg-auth-main h5 { color: var(--wg-ink) !important; }
html body.wg-auth .wg-input input, html body.wg-auth .wg-role-input { background: transparent !important; color: var(--wg-ink) !important; box-shadow: none !important; border: 0 !important; }
html body.wg-auth .wg-role-input option { color: #1F1430; background: #fff; }
html body.wg-auth .wg-auth-main p, html body.wg-auth .wg-auth-main label, html body.wg-auth .wg-auth-main small { color: inherit; }
html body.wg-auth .wg-auth-main { color: var(--wg-text) !important; }
html body.wg-auth .wg-check input { background: #fff !important; }

/* Light controls even when the site theme is dark */
html body.wg-auth { color-scheme: light; }
html body.wg-auth .wg-auth-split { align-items: stretch; }
html body.wg-auth .wg-brand-col { background: var(--wg-grad); position: relative; }
html body.wg-auth .wg-brand-col .wg-brand { background: transparent; }
html body.wg-auth .wg-card-head .wg-title { margin: 0 0 6px !important; line-height: 1.15 !important; }
html body.wg-auth .wg-card-head .wg-sub { margin: 0 !important; }
html body.wg-auth .auth-head { display: block !important; align-items: flex-start !important; }
html body.wg-auth .auth-head * { text-align: left !important; }
html body.wg-auth .alert-info, html body.wg-auth .alert-primary { background: #FFF6F9 !important; border: 1px solid #F6D3E0 !important; color: var(--wg-text) !important; border-radius: 12px !important; }
html body.wg-auth .alert-info * { color: var(--wg-text) !important; }
html body.wg-auth .alert-info i, html body.wg-auth .alert-info .fa-lightbulb { color: var(--wg-orange) !important; }
html body.wg-auth .form-check-input { background-color: #fff !important; border: 1.5px solid #D9CFE0 !important; }
html body.wg-auth .form-check-input:checked { background-color: var(--wg-pink) !important; border-color: var(--wg-pink) !important; }
html body.wg-auth .form-check-label, html body.wg-auth .form-check-label * { color: var(--wg-text) !important; }
html body.wg-auth .form-check-label a { color: var(--wg-pink) !important; }
html body.wg-auth .text-muted, html body.wg-auth small.text-muted { color: var(--wg-muted) !important; }
