:root {
    --login-deep: #023c2b;
    --login-green: #075b3a;
    --login-green-bright: #087849;
    --login-accent: #0d8a54;
    --login-gold: #d8ad2c;
    --login-ivory: #fcfcf8;
    --login-ink: #073b2e;
    --login-muted: #738078;
    --login-border: #d7dfdc;
}

html, body { min-height: 100%; }
body { margin: 0; background: var(--login-deep); }

.rda-auth-page {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 36px 24px;
    color: #17231f;
    background: var(--login-deep) url('../images/rda-login-map-bg.webp') center / cover no-repeat;
    font-family: 'Inter', sans-serif;
}

.rda-auth-page::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 50% 48%, transparent 18%, rgba(0, 24, 17, .32) 100%);
}

.rda-auth-ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rda-auth-orb { position: absolute; border-radius: 50%; filter: blur(2px); background: rgba(24, 147, 88, .11); animation: authFloat 18s ease-in-out infinite; }
.rda-auth-orb-one { width: 420px; height: 420px; right: 2%; top: -10%; }
.rda-auth-orb-two { width: 320px; height: 320px; left: -6%; bottom: -10%; animation-delay: -9s; }
.rda-auth-particle { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--login-gold); box-shadow: 0 0 18px 5px rgba(216, 173, 44, .42); animation: authPulse 4s ease-in-out infinite; }
.rda-auth-particle-one { left: 8%; top: 24%; }
.rda-auth-particle-two { right: 9%; top: 13%; animation-delay: -1.4s; }
.rda-auth-particle-three { right: 6%; bottom: 15%; animation-delay: -2.8s; }

.rda-auth-shell {
    width: min(1156px, calc(100vw - 48px));
    height: min(746px, calc(100vh - 72px));
    min-height: 660px;
    display: grid;
    grid-template-columns: 47.5% 52.5%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .66);
    border-radius: 30px;
    background: var(--login-ivory);
    box-shadow: 0 30px 80px rgba(0, 35, 24, .36), 0 8px 28px rgba(0, 26, 18, .2);
    animation: authShellIn .72s cubic-bezier(.16, 1, .3, 1) both;
}

.rda-auth-brand { position: relative; overflow: hidden; min-width: 0; background: #033f2d; color: #fff; }
.rda-auth-road-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; animation: authRoadDrift 18s ease-in-out infinite alternate; }
.rda-auth-brand-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 47, 34, .96) 0%, rgba(2, 63, 44, .6) 30%, rgba(0, 43, 30, .06) 58%, rgba(0, 42, 29, .82) 100%); }
.rda-auth-brand::after { content: ''; position: absolute; inset: 0; border-right: 1px solid rgba(216, 173, 44, .28); box-shadow: inset 0 0 70px rgba(0, 24, 17, .28); pointer-events: none; }

.rda-auth-brand-header { position: absolute; z-index: 2; top: 78px; left: 24px; right: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rda-auth-logo-frame { width: 108px; height: 108px; display: grid; place-items: center; border: 1px solid rgba(237, 201, 87, .88); border-radius: 28px; background: rgba(12, 116, 72, .72); box-shadow: 0 15px 34px rgba(0, 28, 20, .36), inset 0 0 24px rgba(255, 255, 255, .1); backdrop-filter: blur(8px); }
.rda-auth-logo-frame img { width: 78px; height: 78px; display: block; object-fit: contain; border-radius: 19px; box-shadow: 0 7px 18px rgba(0, 24, 17, .22); }
.rda-auth-brand-header h1 { margin: 18px 0 2px; color: #fff; font-size: clamp(1.72rem, 2.2vw, 2rem); line-height: 1.1; font-weight: 780; letter-spacing: -.045em; text-shadow: 0 3px 16px rgba(0, 26, 18, .36); }
.rda-auth-brand-header h1 span { color: #e2b941; }
.rda-auth-brand-header p { margin: 5px 0 0; color: rgba(255, 255, 255, .82); font-size: .95rem; font-weight: 450; }

.rda-auth-brand-footer { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 56px; text-align: center; }
.rda-auth-road-mark { display: flex; align-items: center; justify-content: center; gap: 12px; color: #e2b941; }
.rda-auth-road-mark span { width: 31%; max-width: 155px; height: 1px; background: rgba(216, 173, 44, .48); }
.rda-auth-road-mark i { width: 58px; height: 58px; display: grid; place-items: center; border: 2px solid #e2b941; border-radius: 50%; font-size: 1.45rem; background: rgba(1, 62, 43, .5); box-shadow: 0 0 24px rgba(216, 173, 44, .12); }
.rda-auth-brand-footer p { margin: 12px 0 0; font-size: .88rem; font-weight: 450; color: rgba(255, 255, 255, .92); }
.rda-auth-brand-footer strong { color: #e2b941; font-weight: 700; }

.rda-auth-form-panel { display: grid; place-items: center; min-width: 0; padding: 48px 64px 40px; background: linear-gradient(145deg, #fff 0%, var(--login-ivory) 68%, #f7f9f4 100%); }
.rda-auth-form-wrap { width: 100%; max-width: 474px; }
.rda-auth-security-label { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; color: #0b754b; font-size: .78rem; line-height: 1; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; }
.rda-auth-security-label i { display: grid; place-items: center; width: 30px; height: 30px; font-size: 1.35rem; }
.rda-auth-heading { margin-bottom: 31px; }
.rda-auth-heading h2 { margin: 0; color: var(--login-ink); font-size: clamp(2.25rem, 3.5vw, 3rem); line-height: 1.04; letter-spacing: -.055em; font-weight: 790; }
.rda-auth-heading p { margin: 12px 0 0; color: #7a808d; font-size: .98rem; }

.rda-auth-alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; margin: -12px 0 18px; border: 1px solid; border-radius: 12px; font-size: .82rem; line-height: 1.4; }
.rda-auth-alert-success { color: #11643f; border-color: #b7ddc8; background: #eff9f2; }
.rda-auth-alert-danger { color: #9f2933; border-color: #f0c0c4; background: #fff3f4; }
.rda-auth-alert i { margin-top: 1px; flex: 0 0 auto; }

.rda-auth-field { margin-bottom: 22px; }
.rda-auth-field label { display: block; margin: 0 0 9px; color: #0b7048; font-size: .71rem; line-height: 1; text-transform: uppercase; letter-spacing: .045em; font-weight: 800; }
.rda-auth-input-wrap { position: relative; }
.rda-auth-input-wrap > i { position: absolute; z-index: 1; left: 20px; top: 50%; transform: translateY(-50%); color: #138354; font-size: 1.2rem; pointer-events: none; transition: color .2s ease; }
.rda-auth-input-wrap input { width: 100%; height: 60px; padding: 0 52px 0 56px; border: 1.5px solid #cfd8da; border-radius: 14px; outline: 0; background: rgba(255, 255, 255, .88); color: #25312e; font: 500 .92rem/1 'Inter', sans-serif; box-shadow: 0 4px 10px rgba(7, 59, 46, .025); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.rda-auth-input-wrap input::placeholder { color: #9aa2ad; opacity: 1; }
.rda-auth-input-wrap input:hover { border-color: #abbdb5; background: #fff; }
.rda-auth-input-wrap input:focus { border-color: var(--login-gold); background: #fff; box-shadow: 0 0 0 4px rgba(216, 173, 44, .14), 0 8px 20px rgba(43, 52, 45, .07); }
.rda-auth-input-wrap:focus-within > i { color: #087849; }
.was-validated .rda-auth-input-wrap input:invalid { border-color: #c5424e; box-shadow: 0 0 0 4px rgba(197, 66, 78, .1); }
.rda-auth-password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #96a0ad; font-size: 1.05rem; cursor: pointer; transition: color .2s ease, background .2s ease; }
.rda-auth-password-toggle:hover { color: #087849; background: #eff7f2; }
.rda-auth-password-toggle:focus-visible { outline: 3px solid rgba(216, 173, 44, .38); outline-offset: 1px; }

.rda-auth-options { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 25px; }
.rda-auth-remember { display: inline-flex; align-items: center; gap: 9px; margin: 0; color: #394640; font-size: .82rem; font-weight: 500; cursor: pointer; }
.rda-auth-remember input { appearance: none; width: 19px; height: 19px; display: grid; place-content: center; margin: 0; border: 1.5px solid #9ea7a3; border-radius: 5px; background: #fff; cursor: pointer; }
.rda-auth-remember input::before { content: ''; width: 9px; height: 9px; border-radius: 2px; transform: scale(0); background: #fff; box-shadow: inset 1em 1em #fff; clip-path: polygon(14% 44%, 0 59%, 43% 100%, 100% 16%, 84% 0, 42% 62%); transition: transform .12s ease-in-out; }
.rda-auth-remember input:checked { border-color: #087849; background: #087849; }
.rda-auth-remember input:checked::before { transform: scale(1); }
.rda-auth-remember input:focus-visible { outline: 3px solid rgba(216, 173, 44, .34); outline-offset: 2px; }
.rda-auth-options a { color: #087147; font-size: .81rem; font-weight: 750; text-decoration: none; text-underline-offset: 3px; }
.rda-auth-options a:hover { color: #045a38; text-decoration: underline; }
.rda-auth-options a:focus-visible { outline: 3px solid rgba(216, 173, 44, .34); outline-offset: 4px; border-radius: 3px; }

.rda-auth-submit { width: 100%; height: 60px; position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; overflow: hidden; border: 0; border-radius: 14px; background: linear-gradient(135deg, #087849 0%, #034e35 100%); color: #fff; font: 760 .98rem/1 'Inter', sans-serif; box-shadow: 0 10px 24px rgba(3, 78, 53, .23); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.rda-auth-submit::before { content: ''; position: absolute; inset: 0; transform: translateX(-110%); background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .18) 50%, transparent 75%); transition: transform .65s ease; }
.rda-auth-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 15px 29px rgba(3, 78, 53, .31); filter: saturate(1.06); }
.rda-auth-submit:hover:not(:disabled)::before { transform: translateX(110%); }
.rda-auth-submit:hover:not(:disabled) .rda-auth-submit-arrow { transform: translateX(4px); }
.rda-auth-submit:active:not(:disabled) { transform: translateY(0); box-shadow: 0 8px 18px rgba(3, 78, 53, .23); }
.rda-auth-submit:focus-visible { outline: 4px solid rgba(216, 173, 44, .42); outline-offset: 3px; }
.rda-auth-submit:disabled { cursor: wait; opacity: .86; }
.rda-auth-submit-arrow { position: absolute; left: calc(50% + 64px); font-size: 1.12rem; transition: transform .2s ease; }
.rda-auth-submit-loading { display: none; align-items: center; gap: 9px; }
.rda-auth-submit.is-loading .rda-auth-submit-label, .rda-auth-submit.is-loading .rda-auth-submit-arrow { display: none; }
.rda-auth-submit.is-loading .rda-auth-submit-loading { display: inline-flex; }

.rda-auth-download { min-height: 80px; display: grid; grid-template-columns: 48px 1fr 38px; align-items: center; gap: 10px; margin-top: 20px; padding: 10px 16px; border: 1px solid #94c7a4; border-radius: 14px; background: #f6faf4; color: #17372b; text-decoration: none; box-shadow: 0 4px 12px rgba(8, 93, 57, .035); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.rda-auth-download:hover { color: #17372b; transform: translateY(-2px); border-color: #4f9f68; background: #f0f8ef; box-shadow: 0 10px 22px rgba(8, 93, 57, .1); }
.rda-auth-download:focus-visible { outline: 4px solid rgba(216, 173, 44, .38); outline-offset: 3px; }
.rda-auth-download-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #13904f; font-size: 1.65rem; }
.rda-auth-download-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rda-auth-download-copy strong { color: #153329; font-size: .85rem; font-weight: 780; }
.rda-auth-download-copy small { color: #79827e; font-size: .75rem; }
.rda-auth-download-arrow { justify-self: center; color: #0d8650; font-size: 1.28rem; transition: transform .2s ease; }
.rda-auth-download:hover .rda-auth-download-arrow { transform: translateY(3px); }
.rda-auth-footer { margin-top: 24px; color: #89918f; text-align: center; font-size: .72rem; }
.rda-auth-footer span { margin: 0 4px; }

@keyframes authShellIn { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes authFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(24px, -18px, 0); } }
@keyframes authPulse { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes authRoadDrift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.055) translate3d(-5px, -4px, 0); } }

@media (max-width: 1040px) {
    .rda-auth-shell { grid-template-columns: 44% 56%; }
    .rda-auth-form-panel { padding-inline: 44px; }
    .rda-auth-brand-header { top: 62px; }
    .rda-auth-logo-frame { width: 94px; height: 94px; border-radius: 24px; }
    .rda-auth-logo-frame img { width: 68px; height: 68px; }
    .rda-auth-brand-footer { bottom: 42px; }
}

@media (max-width: 760px) {
    .rda-auth-page { display: block; min-height: 100svh; overflow-y: auto; padding: 20px; }
    .rda-auth-shell { width: 100%; height: auto; min-height: 0; grid-template-columns: 1fr; border-radius: 24px; }
    .rda-auth-brand { min-height: 230px; }
    .rda-auth-road-image { object-position: center 61%; }
    .rda-auth-brand-shade { background: linear-gradient(180deg, rgba(1, 47, 34, .78), rgba(1, 47, 34, .24) 55%, rgba(0, 42, 29, .8)); }
    .rda-auth-brand-header { top: 22px; }
    .rda-auth-logo-frame { width: 76px; height: 76px; border-radius: 20px; }
    .rda-auth-logo-frame img { width: 58px; height: 58px; border-radius: 14px; }
    .rda-auth-brand-header h1 { margin-top: 10px; font-size: 1.42rem; }
    .rda-auth-brand-header p { margin-top: 2px; font-size: .78rem; }
    .rda-auth-brand-footer { left: 18px; right: 18px; bottom: 14px; }
    .rda-auth-road-mark { display: none; }
    .rda-auth-brand-footer p { margin: 0; font-size: .76rem; }
    .rda-auth-form-panel { padding: 34px 26px 28px; }
    .rda-auth-security-label { margin-bottom: 20px; }
    .rda-auth-heading { margin-bottom: 27px; }
    .rda-auth-heading h2 { font-size: 2.15rem; }
}

@media (max-width: 430px) {
    .rda-auth-page { padding: 12px; }
    .rda-auth-shell { border-radius: 21px; }
    .rda-auth-brand { min-height: 212px; }
    .rda-auth-form-panel { padding: 30px 20px 24px; }
    .rda-auth-security-label { font-size: .68rem; letter-spacing: .115em; }
    .rda-auth-heading h2 { font-size: 2rem; }
    .rda-auth-heading p { font-size: .88rem; }
    .rda-auth-input-wrap input { height: 56px; }
    .rda-auth-options { gap: 10px; }
    .rda-auth-options a, .rda-auth-remember { font-size: .77rem; }
    .rda-auth-submit { height: 56px; }
    .rda-auth-download { grid-template-columns: 42px 1fr 32px; min-height: 74px; padding-inline: 12px; }
    .rda-auth-download-copy strong { font-size: .78rem; }
    .rda-auth-footer { line-height: 1.5; }
}

@media (max-height: 760px) and (min-width: 761px) {
    .rda-auth-page { padding-block: 18px; overflow-y: auto; }
    .rda-auth-shell { height: auto; min-height: 630px; }
    .rda-auth-brand-header { top: 42px; }
    .rda-auth-brand-footer { bottom: 28px; }
    .rda-auth-form-panel { padding-block: 32px; }
    .rda-auth-security-label, .rda-auth-heading { margin-bottom: 20px; }
    .rda-auth-field { margin-bottom: 16px; }
    .rda-auth-download { margin-top: 14px; min-height: 70px; }
    .rda-auth-footer { margin-top: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .rda-auth-shell, .rda-auth-orb, .rda-auth-particle, .rda-auth-road-image { animation: none !important; }
    .rda-auth-submit, .rda-auth-submit::before, .rda-auth-submit-arrow, .rda-auth-download, .rda-auth-download-arrow { transition-duration: .01ms !important; }
}
