:root {
    --rg-navy: #071526;
    --rg-navy-2: #0c1e36;
    --rg-ink: #101828;
    --rg-muted: #667085;
    --rg-line: #e4e7ec;
    --rg-bg: #f8fafc;
    --rg-danger: #b42318;
    --rg-ok: #067647;
}

* { box-sizing: border-box; }

html, body.rg-auth {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: Inter, "Segoe UI", sans-serif;
    color: var(--rg-ink);
    background: #fff;
}

.rg-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
}

.rg-hero {
    background:
        radial-gradient(900px 420px at 20% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
        linear-gradient(180deg, #0a1c34 0%, #071526 48%, #06101f 100%);
    color: #fff;
    padding: 32px 48px 28px;
    justify-content: space-between;
    gap: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.rg-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rg-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.rg-mark svg { width: 20px; height: 20px; }

.rg-hero-brand {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.rg-hero-copy { margin-top: 8px; max-width: 480px; flex: 0 0 auto; }

.rg-hero-copy h1 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-weight: 500;
}

.rg-hero-copy p {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
    font-size: 15px;
    line-height: 1.6;
    max-width: 440px;
}

.rg-map {
    margin: 0;
    border-radius: 18px;
    background: #06101c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    flex: 0 1 auto;
    height: clamp(180px, 34vh, 280px);
    align-self: stretch;
}

.rg-map-svg { width: 100%; height: 100%; display: block; }

.rg-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0;
    padding-top: 0;
    flex: 0 0 auto;
}

.rg-stats div {
    padding: 0 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.rg-stats div:first-child { padding-left: 0; border-left: 0; }

.rg-stats strong {
    display: block;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.rg-stats span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.62);
}

.rg-pane {
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.rg-pane-inner {
    width: min(520px, calc(100% - 72px));
    margin: 0 auto;
    padding: 8px 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.rg-pane-inner::before,
.rg-pane-inner::after {
    content: "";
    flex: 1 1 auto;
}

.rg-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rg-kicker svg { width: 16px; height: 16px; }

.rg-kicker i {
    width: 1px;
    height: 12px;
    background: #d0d5dd;
}

.rg-pane h2 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.rg-lead {
    margin: 0 0 32px;
    color: var(--rg-muted);
    font-size: 16px;
    line-height: 1.6;
}

.rg-field { margin-bottom: 20px; }

.rg-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.rg-field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.rg-forgot {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.rg-forgot:hover { text-decoration: underline; }

.rg-field input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--rg-line);
    border-radius: 10px;
    padding: 0 16px;
    font: inherit;
    font-size: 16px;
    color: var(--rg-ink);
    background: #fff;
    outline: none;
}

.rg-password input::-ms-reveal,
.rg-password input::-ms-clear,
.rg-password input::-webkit-credentials-auto-fill-button {
    display: none !important;
    width: 0;
    height: 0;
    visibility: hidden;
    pointer-events: none;
}

.rg-field input:focus {
    border-color: #0c1e36;
    box-shadow: 0 0 0 3px rgba(12, 30, 54, 0.08);
}

.rg-password { position: relative; }

.rg-password input { padding-right: 52px; }

.rg-eye {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #667085;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.rg-eye svg {
    width: 22px;
    height: 22px;
    display: block;
    flex: 0 0 auto;
}

.rg-eye .rg-eye-on,
.rg-eye.is-revealed .rg-eye-off {
    display: none !important;
}

.rg-eye.is-revealed .rg-eye-on {
    display: block !important;
}

.rg-btn {
    width: 100%;
    height: 56px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: #0c1b33;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.rg-btn:hover { background: #071018; }

.rg-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.rg-foot {
    text-align: center;
    color: #98a2b3;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 24px 16px;
    flex: 0 0 auto;
}

.rg-foot p { margin: 0; }

.rg-scoped {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px !important;
    color: #667085;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.rg-scoped svg { width: 14px; height: 14px; }

.rg-expired {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f2f4f7;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
}

.rg-expired strong, .rg-expired em {
    display: block;
    font-style: normal;
}

.rg-expired strong { font-size: 14px; margin-bottom: 2px; }

.rg-expired em {
    color: var(--rg-muted);
    font-size: 13px;
    line-height: 1.45;
}

.rg-expired-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff;
    color: #475467;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.rg-expired-icon svg { width: 16px; height: 16px; }

.rg-expired-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.rg-banner {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.45;
}

.rg-banner-bad { background: #fef3f2; color: var(--rg-danger); }

.rg-banner-ok { background: #ecfdf3; color: var(--rg-ok); }

.rg-verify h2 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.rg-verify .rg-lead {
    margin: 0 0 22px;
    color: #8b939e;
    font-size: 15px;
    line-height: 1.5;
}

.rg-otp {
    display: flex;
    gap: 8px;
    width: 100%;
}

.rg-otp-box {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0;
    border: 1px solid #e6e3dc;
    border-radius: 14px;
    text-align: center;
    font: inherit;
    font-size: 22px;
    font-weight: 600;
    background: #fff;
    color: var(--rg-ink);
}

.rg-otp-box:focus {
    outline: none;
    border-color: #1b2433;
    box-shadow: 0 0 0 3px rgba(27, 36, 51, 0.08);
}

.rg-resend {
    display: block;
    width: 100%;
    margin: 18px 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1a2230;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.rg-verify .rg-btn-pill {
    height: 48px;
    margin-top: 0;
    border-radius: 999px;
    background: #1b2433;
    font-size: 15px;
    font-weight: 600;
}

.rg-verify .rg-btn-pill:hover { background: #111826; }

.rg-verify .rg-btn-pill:disabled {
    opacity: 1;
    background: #9aa3ad;
    cursor: default;
}

.rg-back-link {
    display: block;
    width: 100%;
    margin-top: 16px;
    color: #9aa3ad;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.rg-back-link:hover { color: #1b2433; }

.rg-method-link {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6d7580;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.rg-method-link:hover { color: #1b2433; }

.rg-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, 0.45);
}

.rg-modal[hidden] { display: none !important; }

.rg-modal-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 18px;
    padding: 28px 22px 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.rg-modal-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.rg-modal-card > p,
.rg-modal-card form > p {
    margin: 0 0 18px;
    color: #7b8490;
    font-size: 14px;
    line-height: 1.5;
}

.rg-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.rg-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 18px;
}

.rg-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 14px;
    border: 1px solid #ece8e1;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.rg-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rg-method.is-selected {
    background: #f3faf6;
    border-color: #d9efe4;
}

.rg-method.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rg-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f2f3f5;
    color: #1b2433;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
}

.rg-method.is-selected .rg-method-icon {
    background: #1b2433;
    color: #fff;
}

.rg-method-icon svg { width: 18px; height: 18px; }

.rg-method-copy { flex: 1; min-width: 0; }

.rg-method-copy strong,
.rg-method-copy span { display: block; }

.rg-method-copy strong {
    color: #1a2230;
    font-size: 15px;
    font-weight: 700;
}

.rg-method-copy span {
    margin-top: 2px;
    color: #8b939e;
    font-size: 13px;
    font-weight: 500;
}

.rg-method-check {
    width: 22px;
    height: 22px;
    margin-left: auto;
    border-radius: 50%;
    border: 1.5px solid #d7dbe2;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
}

.rg-method.is-selected .rg-method-check {
    background: #1b2433;
    border-color: #1b2433;
    color: #fff;
}

.rg-method-check svg { width: 14px; height: 14px; }

.rg-modal-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: #152033;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.rg-modal-btn:hover { background: #111826; }

.rg-text-btn, .rg-text-link {
    display: inline-block;
    margin-top: 14px;
    margin-right: 16px;
    background: none;
    border: 0;
    padding: 0;
    color: #344054;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.rg-text-btn:hover, .rg-text-link:hover { text-decoration: underline; }

@media (max-width: 960px) {
    html, body.rg-auth { height: auto; overflow: auto; }
    .rg-page { height: auto; overflow: visible; }
    .rg-hero { height: auto; overflow: visible; padding: 24px; }
    .rg-hero-copy { margin-top: 20px; }
    .rg-hero-copy h1 { font-size: 24px; }
    .rg-map { min-height: 180px; flex: none; height: 180px; }
    .rg-pane { height: auto; overflow: visible; }
    .rg-pane-inner {
        width: min(440px, calc(100% - 40px));
        overflow: visible;
        justify-content: flex-start;
        padding: 28px 0;
    }
}
