/* Split-screen auth pages (register, login) */

/* ---------- Page shell ---------- */
body:has(.rg-page) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: #0b111d !important;
    font-family: "Manrope", "Poppins", system-ui, sans-serif;
}

body:has(.rg-page) .navbar,
body:has(.rg-page) .mobile-header,
body:has(.rg-page) .mobile-bottom-nav,
body:has(.rg-page) .mobile-fab,
body:has(.rg-page) .footer,
body:has(.rg-page) .live-chat-button,
body:has(.rg-page) #importantAlertBtn {
    display: none !important;
}

body:has(.rg-page) .content-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body:has(.rg-page) .content-container > .alert {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    width: min(560px, calc(100% - 2rem));
    margin: 0;
    padding: 0.85rem 2.75rem 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.88rem;
    background: #141c2e;
    color: #f4f0e8;
    border: 1px solid rgba(212, 184, 138, 0.3);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

body:has(.rg-page) .content-container > .alert-danger {
    border-color: rgba(224, 139, 139, 0.55);
    border-left: 3px solid #e08b8b;
}

body:has(.rg-page) .content-container > .alert-success {
    border-color: rgba(125, 202, 168, 0.5);
    border-left: 3px solid #7dcaa8;
}

body:has(.rg-page) .content-container > .alert .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.6;
}

.rg-page {
    --rg-bg: #0b111d;
    --rg-surface: #111827;
    --rg-surface-2: #182236;
    --rg-line: rgba(212, 184, 138, 0.16);
    --rg-line-strong: rgba(212, 184, 138, 0.32);
    --rg-gold: #d4b88a;
    --rg-gold-hi: #ead3a6;
    --rg-gold-lo: #b8955c;
    --rg-text: #f4f0e8;
    --rg-muted: #9aa3b4;
    --rg-faint: #6b7487;
    --rg-ok: #7dcaa8;
    --rg-bad: #e08b8b;
    --rg-warn: #e2c27a;

    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 46%) 1fr;
    color: var(--rg-text);
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.auth-ready .rg-page { opacity: 1; }

/* ---------- Brand panel ---------- */
.rg-brand {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(212, 184, 138, 0.14), transparent 55%),
        radial-gradient(90% 70% at 100% 100%, rgba(56, 89, 160, 0.22), transparent 60%),
        linear-gradient(160deg, #121a2b 0%, #0b111d 100%);
    border-right: 1px solid var(--rg-line);
    isolation: isolate;
}

.rg-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(212, 184, 138, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 184, 138, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}

.rg-brand-logo img {
    height: 56px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.rg-brand-body {
    margin: auto 0;
    padding: 2.5rem 0;
    max-width: 30rem;
}

.rg-brand h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.3rem, 3.4vw, 3.3rem);
    line-height: 1.08;
    margin: 0 0 1rem;
    color: var(--rg-text);
}

.rg-brand h2 em {
    font-style: italic;
    color: var(--rg-gold);
}

.rg-brand-lead {
    color: var(--rg-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0 0 2rem;
}

.rg-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.rg-features li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--rg-line);
    border-radius: 14px;
    background: rgba(13, 20, 34, 0.55);
    backdrop-filter: blur(6px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rg-features li:hover {
    border-color: var(--rg-line-strong);
    transform: translateX(3px);
}

.rg-features i {
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--rg-gold);
    background: linear-gradient(160deg, rgba(212, 184, 138, 0.16), rgba(212, 184, 138, 0.04));
    border: 1px solid var(--rg-line-strong);
    font-size: 0.9rem;
}

.rg-features strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rg-text);
}

.rg-features span {
    display: block;
    font-size: 0.8rem;
    color: var(--rg-muted);
    line-height: 1.4;
}

.rg-chart {
    position: absolute;
    right: -2rem;
    bottom: 3.5rem;
    width: 78%;
    max-width: 520px;
    z-index: -1;
    opacity: 0.55;
    pointer-events: none;
}

.rg-chart .line {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: rgDraw 2.4s 0.3s ease-out forwards;
}

@keyframes rgDraw { to { stroke-dashoffset: 0; } }

.rg-brand-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: var(--rg-faint);
    font-size: 0.76rem;
}

.rg-brand-foot span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.rg-brand-foot i { color: var(--rg-gold); opacity: 0.8; }

/* ---------- Form panel ---------- */
.rg-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem clamp(1.25rem, 3.5vw, 3rem);
    background:
        radial-gradient(70% 50% at 100% 0%, rgba(212, 184, 138, 0.06), transparent 60%),
        var(--rg-bg);
}

.rg-mobile-logo { display: none; }
.rg-mobile-logo img { height: 34px; width: auto; }

.rg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.rg-topbar-link {
    flex-shrink: 0;
    margin-top: 0.3rem;
    font-size: 0.76rem;
    white-space: nowrap;
    color: var(--rg-muted);
}

.rg-topbar-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    padding: 0.32rem 0.85rem;
    border: 1px solid var(--rg-line-strong);
    border-radius: 999px;
    color: var(--rg-gold);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.rg-topbar-link a:hover {
    background: rgba(212, 184, 138, 0.1);
    color: var(--rg-gold-hi);
}

.rg-form-wrap {
    width: 100%;
    max-width: 540px;
    margin: auto;
    padding: 0.75rem 0;
    animation: rgRise 0.5s ease-out both;
}

@keyframes rgRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.rg-head h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 2.2vw, 1.95rem);
    line-height: 1.1;
    margin: 0 0 0.2rem;
    color: var(--rg-text);
}

.rg-head p {
    margin: 0;
    color: var(--rg-muted);
    font-size: 0.82rem;
}

/* Progress steps */
.rg-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.85rem 0 0.75rem;
    padding: 0;
}

.rg-steps li {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--rg-faint);
    letter-spacing: 0.04em;
    transition: color 0.25s ease;
}

.rg-steps li::before {
    content: "";
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.rg-steps li.is-active { color: var(--rg-text); }
.rg-steps li.is-active::before { background: rgba(212, 184, 138, 0.45); }
.rg-steps li.is-done { color: var(--rg-gold); }
.rg-steps li.is-done::before { background: linear-gradient(90deg, var(--rg-gold-lo), var(--rg-gold-hi)); }

.rg-steps li span { display: inline-flex; align-items: center; gap: 0.4rem; }
.rg-steps li .fa-check { display: none; font-size: 0.65rem; }
.rg-steps li.is-done .fa-check { display: inline; }

.rg-section-note {
    margin-left: auto;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--rg-faint);
}

/* Sections */
.rg-section {
    padding: 0.75rem 0.9rem 0.85rem;
    margin-bottom: 0.55rem;
    border: 1px solid rgba(212, 184, 138, 0.2);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent), var(--rg-surface-2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rg-section:focus-within {
    border-color: var(--rg-line-strong);
    box-shadow: 0 0 0 3px rgba(212, 184, 138, 0.05);
}

.rg-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.55rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rg-muted);
}

.rg-section-num {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--rg-line-strong);
    color: var(--rg-gold);
    font-size: 0.62rem;
    letter-spacing: 0;
    transition: all 0.25s ease;
}

.rg-section.is-done .rg-section-num {
    background: var(--rg-gold);
    border-color: var(--rg-gold);
    color: #1a140c;
}

.rg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 0.7rem;
}

.rg-span { grid-column: 1 / -1; }

/* Fields */
.rg-field { display: flex; flex-direction: column; min-width: 0; }

.rg-field > label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #c3c9d4;
    margin-bottom: 0.25rem;
}

.rg-field > label small {
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--rg-faint);
    white-space: nowrap;
}

.rg-control {
    position: relative;
    display: flex;
    align-items: center;
}

.rg-control > .rg-ico {
    position: absolute;
    left: 0.8rem;
    font-size: 0.74rem;
    color: var(--rg-faint);
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.rg-control:focus-within > .rg-ico { color: var(--rg-gold); }

.rg-input {
    width: 100%;
    height: 38px;
    padding: 0 0.85rem 0 2.2rem;
    background: rgba(5, 9, 17, 0.55);
    border: 1px solid rgba(154, 163, 180, 0.2);
    border-radius: 9px;
    color: var(--rg-text);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rg-input::placeholder { color: var(--rg-faint); }

.rg-input:hover { border-color: rgba(212, 184, 138, 0.3); }

.rg-input:focus {
    outline: none;
    background: rgba(5, 9, 17, 0.8);
    border-color: rgba(212, 184, 138, 0.7);
    box-shadow: 0 0 0 3px rgba(212, 184, 138, 0.12);
}

.rg-input:-webkit-autofill,
.rg-input:-webkit-autofill:hover,
.rg-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--rg-text);
    -webkit-box-shadow: 0 0 0 1000px #0a101b inset;
    caret-color: var(--rg-text);
    transition: background-color 9999s ease-out 0s;
}

.rg-input.has-trailing { padding-right: 2.4rem; }

.rg-field.is-valid .rg-input { border-color: rgba(125, 202, 168, 0.55); }
.rg-field.is-invalid .rg-input,
.rg-field.has-error .rg-input { border-color: rgba(224, 139, 139, 0.7); }
.rg-field.has-error .rg-ico { color: var(--rg-bad); }

.rg-state {
    position: absolute;
    right: 0.8rem;
    font-size: 0.7rem;
    color: var(--rg-ok);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s ease;
    pointer-events: none;
}

.rg-field.is-valid .rg-state { opacity: 1; transform: none; }

.rg-eye {
    position: absolute;
    right: 0.3rem;
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    font-size: 0.78rem;
    background: transparent;
    color: var(--rg-faint);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    z-index: 3;
}

.rg-eye:hover,
.rg-eye:focus-visible {
    color: var(--rg-gold);
    background: rgba(212, 184, 138, 0.1);
    outline: none;
}

.rg-error {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--rg-bad);
    animation: rgShake 0.3s ease-out;
}

.rg-error i { font-size: 0.66rem; margin-top: 0.12rem; }

@keyframes rgShake {
    0%, 100% { transform: none; }
    30% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
}

/* Phone */
.rg-phone {
    display: flex;
    height: 38px;
    background: rgba(5, 9, 17, 0.55);
    border: 1px solid rgba(154, 163, 180, 0.2);
    border-radius: 9px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rg-phone:hover { border-color: rgba(212, 184, 138, 0.3); }

.rg-phone:focus-within {
    border-color: rgba(212, 184, 138, 0.7);
    box-shadow: 0 0 0 3px rgba(212, 184, 138, 0.12);
}

.rg-field.has-error .rg-phone { border-color: rgba(224, 139, 139, 0.7); }
.rg-field.is-valid .rg-phone { border-color: rgba(125, 202, 168, 0.55); }

.rg-dial {
    position: relative;
    flex-shrink: 0;
    width: 84px;
    border-right: 1px solid rgba(154, 163, 180, 0.18);
}

.rg-dial-shown {
    position: absolute;
    inset: 0 1.2rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rg-text);
    pointer-events: none;
}

.rg-dial-shown i { color: var(--rg-gold); font-size: 0.68rem; }

.rg-dial::after {
    content: "";
    position: absolute;
    right: 0.65rem;
    top: 50%;
    width: 0.32rem;
    height: 0.32rem;
    border-right: 1.5px solid var(--rg-gold);
    border-bottom: 1.5px solid var(--rg-gold);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.rg-dial select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

.rg-dial select option {
    color: #1a140c;
    background: #f4f0e8;
}

.rg-phone .rg-input {
    height: 100%;
    border: 0;
    border-radius: 0 9px 9px 0;
    background: transparent;
    padding-left: 0.75rem;
    box-shadow: none !important;
}

/* Password strength */
.rg-pwmeta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rg-strength {
    flex: 0 0 120px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    align-items: center;
    gap: 0.2rem;
}

.rg-strength .seg {
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease;
}

.rg-strength .label {
    min-width: 2.6rem;
    text-align: right;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--rg-faint);
}

.rg-strength[data-level="1"] .seg:nth-child(-n+1) { background: var(--rg-bad); }
.rg-strength[data-level="2"] .seg:nth-child(-n+2) { background: var(--rg-warn); }
.rg-strength[data-level="3"] .seg:nth-child(-n+3) { background: var(--rg-gold); }
.rg-strength[data-level="4"] .seg:nth-child(-n+4) { background: var(--rg-ok); }
.rg-strength[data-level="1"] .label { color: var(--rg-bad); }
.rg-strength[data-level="2"] .label { color: var(--rg-warn); }
.rg-strength[data-level="3"] .label { color: var(--rg-gold); }
.rg-strength[data-level="4"] .label { color: var(--rg-ok); }

.rg-rules {
    flex: 1;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.rg-rules li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(154, 163, 180, 0.18);
    font-size: 0.65rem;
    color: var(--rg-faint);
    transition: all 0.2s ease;
}

.rg-rules li i { font-size: 0.5rem; }
.rg-rules li .fa-check { display: none; }

.rg-rules li.ok {
    color: var(--rg-ok);
    border-color: rgba(125, 202, 168, 0.4);
    background: rgba(125, 202, 168, 0.07);
}

.rg-rules li.ok .fa-check { display: inline; }
.rg-rules li.ok .fa-circle { display: none; }

/* Terms */
.rg-terms {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--rg-line);
    border-radius: 10px;
    background: var(--rg-surface-2);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.rg-terms:hover { border-color: var(--rg-line-strong); }

.rg-terms input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.rg-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(212, 184, 138, 0.5);
    border-radius: 4px;
    background: rgba(5, 9, 17, 0.55);
    color: transparent;
    font-size: 0.55rem;
    transition: all 0.2s ease;
}

.rg-terms input:focus-visible + .rg-check { box-shadow: 0 0 0 4px rgba(212, 184, 138, 0.18); }

.rg-terms input:checked + .rg-check {
    background: linear-gradient(160deg, var(--rg-gold-hi), var(--rg-gold-lo));
    border-color: var(--rg-gold);
    color: #1a140c;
}

.rg-terms-text {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #c3c9d4;
}

.rg-terms-text a {
    color: var(--rg-gold);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 184, 138, 0.35);
}

.rg-terms-text a:hover { color: var(--rg-gold-hi); border-color: var(--rg-gold-hi); }

.rg-terms-wrap.is-invalid .rg-terms {
    border-color: rgba(224, 139, 139, 0.6);
    background: rgba(224, 139, 139, 0.05);
}

.rg-terms-wrap.is-invalid .rg-check { border-color: var(--rg-bad); }

/* Referral */
.rg-referral { margin-top: 0.5rem; }

.rg-referral-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--rg-muted);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rg-referral-toggle:hover,
.rg-referral-toggle[aria-expanded="true"] { color: var(--rg-gold); }

.rg-referral-toggle .chev { font-size: 0.65rem; transition: transform 0.25s ease; }
.rg-referral-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.rg-referral-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.rg-referral-body.is-open { grid-template-rows: 1fr; }
.rg-referral-body > div { overflow: hidden; }
.rg-referral-body .rg-field { padding-top: 0.45rem; }

#manual_referral_code {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 600;
}

#manual_referral_code::placeholder { letter-spacing: normal; font-weight: 400; text-transform: none; }

/* Submit */
.rg-actions { margin-top: 0.8rem; }

.rg-submit {
    position: relative;
    width: 100%;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--rg-gold-hi) 0%, var(--rg-gold) 55%, var(--rg-gold-lo) 100%);
    color: #1a140c;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(212, 184, 138, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.rg-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.rg-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(212, 184, 138, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rg-submit:hover::after { left: 120%; }
.rg-submit:active { transform: translateY(0); }
.rg-submit:focus-visible { outline: 2px solid var(--rg-gold-hi); outline-offset: 3px; }

.rg-submit .btn-icon { transition: transform 0.2s ease; }
.rg-submit:hover .btn-icon { transform: translateX(3px); }

.rg-submit:disabled {
    cursor: progress;
    opacity: 0.8;
    transform: none;
}

.rg-submit .btn-loading {
    align-items: center;
    gap: 0.6rem;
}

.rg-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 20, 12, 0.25);
    border-top-color: #1a140c;
    border-radius: 50%;
    animation: rgSpin 0.8s linear infinite;
}

@keyframes rgSpin { to { transform: rotate(360deg); } }

.rg-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.68rem;
    color: var(--rg-faint);
}

.rg-secure i { color: var(--rg-gold); opacity: 0.8; }

/* ---------- Login ---------- */
.rg-form-wrap--narrow { max-width: 400px; }

.rg-form-wrap--narrow .rg-head { margin-bottom: 1.1rem; }

.rg-form-wrap--narrow .rg-section { padding: 1rem 1rem 0.9rem; }

.rg-field--gap { margin-top: 0.75rem; }

.rg-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.rg-label-row label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #c3c9d4;
    margin: 0;
}

.rg-link-sm {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rg-gold);
    text-decoration: none;
}

.rg-link-sm:hover { color: var(--rg-gold-hi); }

.rg-remember {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.76rem;
    color: #c3c9d4;
    cursor: pointer;
    user-select: none;
}

.rg-remember input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.rg-remember input:focus-visible + .rg-check { box-shadow: 0 0 0 3px rgba(212, 184, 138, 0.18); }

.rg-remember input:checked + .rg-check {
    background: linear-gradient(160deg, var(--rg-gold-hi), var(--rg-gold-lo));
    border-color: var(--rg-gold);
    color: #1a140c;
}

.rg-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rg-faint);
}

.rg-divider::before,
.rg-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(154, 163, 180, 0.16);
}

.rg-google {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid rgba(154, 163, 180, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--rg-text);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rg-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 184, 138, 0.4);
    color: var(--rg-text);
}

.rg-google:focus-visible { outline: 2px solid var(--rg-gold-hi); outline-offset: 3px; }

.rg-switch {
    margin: 1.1rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--rg-muted);
}

.rg-switch a {
    margin-left: 0.25rem;
    color: var(--rg-gold);
    font-weight: 700;
    text-decoration: none;
}

.rg-switch a:hover { color: var(--rg-gold-hi); }

.rg-awards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(154, 163, 180, 0.1);
}

.rg-awards img {
    height: 46px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.rg-awards img:hover { opacity: 1; }

/* ---------- Password reset ---------- */
.rg-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--rg-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rg-back:hover { color: var(--rg-gold); }
.rg-back i { font-size: 0.7rem; transition: transform 0.2s ease; }
.rg-back:hover i { transform: translateX(-3px); }

.rg-howto {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin: -0.35rem 0 0.9rem;
    padding: 0;
}

.rg-howto li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--rg-muted);
}

.rg-howto span {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--rg-line-strong);
    color: var(--rg-gold);
    font-size: 0.6rem;
}

.rg-link-btn {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.rg-link-btn i { font-size: 0.62rem; margin-right: 0.15rem; }

.rg-captcha {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.rg-captcha-q {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--rg-line-strong);
    border-radius: 9px;
    background: rgba(212, 184, 138, 0.06);
    color: var(--rg-text);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    user-select: none;
}

.rg-captcha .rg-input {
    padding-left: 0.85rem;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.rg-field.has-error .rg-captcha .rg-input { border-color: rgba(224, 139, 139, 0.7); }

/* ---------- Captcha modal ---------- */
#captchaModal .modal-dialog { max-width: 420px; }

#captchaModal .modal-content {
    background: #111827;
    border: 1px solid rgba(212, 184, 138, 0.28);
    border-radius: 18px;
    color: #f4f0e8;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    font-family: "Manrope", "Poppins", sans-serif;
}

#captchaModal .modal-header,
#captchaModal .modal-footer {
    border-color: rgba(212, 184, 138, 0.14);
}

#captchaModal .modal-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 500;
}

#captchaModal .modal-title i { color: #d4b88a; font-size: 1rem; }
#captchaModal .modal-body p { color: #9aa3b4; font-size: 0.88rem; }

#captchaModal .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 1rem;
}

#captchaModal .btn-secondary {
    background: transparent;
    border: 1px solid rgba(154, 163, 180, 0.3);
    color: #c3c9d4;
}

#captchaModal .btn-outline-light {
    border-color: rgba(212, 184, 138, 0.4);
    color: #d4b88a;
}

#captchaModal .btn-primary {
    background: linear-gradient(180deg, #ead3a6, #c6a36a);
    border: 0;
    color: #1a140c;
}

#captchaModal .btn-primary:disabled { opacity: 0.45; }

#turnstile-container {
    width: 100%;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#turnstile-container .cf-turnstile,
#turnstile-container iframe { width: 300px !important; max-width: 100% !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .rg-brand { padding: 2rem 2.25rem; }
}

@media (max-width: 960px) {
    .rg-page { grid-template-columns: 1fr; }
    .rg-brand { display: none; }
    .rg-mobile-logo { display: block; }
    .rg-main { padding: 0.9rem 1.25rem; }
}

@media (max-width: 560px) {
    .rg-main { padding: 0.8rem 0.85rem; }
    .rg-topbar-link .rg-topbar-q { display: none; }
    .rg-grid { grid-template-columns: 1fr; gap: 0.55rem; }
    .rg-input { font-size: 16px; height: 40px; }
    .rg-phone { height: 40px; }
    .rg-pwmeta { flex-direction: column-reverse; align-items: stretch; gap: 0.4rem; }
    .rg-strength { flex-basis: auto; }
    #turnstile-container { transform: scale(0.94); transform-origin: center; }
}

@media (min-width: 961px) and (max-height: 800px) {
    .rg-main { padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .rg-head p,
    .rg-steps,
    .rg-secure { display: none; }
    .rg-head { margin-bottom: 0.6rem; }
    .rg-section { padding: 0.6rem 0.85rem 0.7rem; margin-bottom: 0.45rem; }
    .rg-section-title { margin-bottom: 0.4rem; }
    .rg-grid { gap: 0.45rem 0.7rem; }
    .rg-input, .rg-phone { height: 36px; }
    .rg-terms { padding: 0.45rem 0.8rem; }
    .rg-referral { margin-top: 0.4rem; }
    .rg-actions { margin-top: 0.55rem; }
    .rg-submit { height: 40px; }
    .rg-brand { padding: 1.75rem 2.5rem; }
    .rg-brand-body { padding: 1rem 0; }
    .rg-brand h2 { font-size: 2.2rem; margin: 0 0 0.6rem; }
    .rg-brand-lead { margin-bottom: 1.1rem; font-size: 0.88rem; }
    .rg-features { gap: 0.5rem; }
    .rg-features li { padding: 0.55rem 0.8rem; }
    .rg-features i { width: 2rem; height: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rg-page *, .rg-page *::before, .rg-page *::after {
        animation: none !important;
        transition: none !important;
    }
    .rg-chart .line { stroke-dashoffset: 0; }
}
