/**
 * Auth screens — homepage lavender theme (waves + sun/birds)
 */
body.rx-auth-modern {
    margin: 0;
    min-height: 100dvh;
    font-family: 'Manrope', system-ui, sans-serif;
    background: #e4dcf5;
    color: #14102e;
    -webkit-tap-highlight-color: transparent;
}

.rx-auth-screen {
    min-height: 100dvh;
    max-width: 430px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #f3eefc;
    box-shadow: 0 0 0 1px rgba(30, 10, 69, 0.06), 0 28px 70px rgba(30, 10, 69, 0.14);
}

.rx-auth-screen::before {
    content: none;
}

.rx-auth-waves {
    position: absolute;
    top: 0;
    right: 0;
    width: 62%;
    height: 42vh;
    max-height: 300px;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.rx-auth-waves .gx-blob {
    position: absolute;
    display: block;
}

.rx-auth-waves .gx-blob--a {
    top: -20%;
    right: -10%;
    width: 95%;
    height: 85%;
    border-radius: 62% 38% 48% 52% / 42% 58% 42% 58%;
    background: linear-gradient(145deg, #ddd6fe 0%, #a78bfa 45%, #7c3aed 100%);
    opacity: 0.55;
}

.rx-auth-waves .gx-blob--b {
    top: -8%;
    right: -18%;
    width: 100%;
    height: 95%;
    border-radius: 58% 42% 55% 45% / 48% 52% 38% 62%;
    background: linear-gradient(160deg, #c4b5fd 0%, #8b5cf6 42%, #5b21b6 100%);
}

.rx-auth-waves .gx-blob--c {
    top: 8%;
    right: -22%;
    width: 92%;
    height: 90%;
    border-radius: 52% 48% 42% 58% / 55% 40% 60% 45%;
    background: linear-gradient(170deg, #a78bfa 0%, #6d28d9 50%, #4c1d95 100%);
}

.rx-auth-waves .gx-blob--d {
    top: 22%;
    right: -26%;
    width: 85%;
    height: 88%;
    border-radius: 48% 52% 38% 62% / 50% 45% 55% 50%;
    background: linear-gradient(175deg, #7c3aed 0%, #4c1d95 55%, #2e1065 100%);
}

.rx-auth-hero {
    position: relative;
    z-index: 1;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.75rem 0;
    color: #14102e;
}

.rx-auth-hero h1 {
    margin: 0 0 0.65rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rx-auth-hero p {
    margin: 0;
    max-width: 16rem;
    font-size: 0.78rem;
    line-height: 1.55;
    font-weight: 600;
    color: #4a4668;
}

.rx-auth-card-wrap {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 1.35rem 1.25rem 2rem;
    margin-top: 0.5rem;
}

.rx-auth-card {
    position: relative;
    overflow: visible;
    background: #faf8ff;
    background-image: url('../assets/gx-card-scene.svg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 180px auto;
    border-radius: 1.75rem;
    border: 1px solid rgba(30, 10, 69, 0.08);
    padding: 1.35rem 1.25rem 1.35rem;
    box-shadow: 0 18px 48px rgba(76, 29, 149, 0.14), 0 4px 14px rgba(20, 20, 40, 0.06);
}

.rx-auth-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
    padding-bottom: 0.15rem;
}

.rx-auth-tabs a {
    position: relative;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: #9b97b0;
    padding-bottom: 0.45rem;
    transition: color 0.2s ease;
}

.rx-auth-tabs a.is-active {
    color: #5b3fe8;
}

.rx-auth-tabs a.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.rx-auth-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(76, 29, 149, 0.12);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rx-auth-field:focus-within {
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.rx-auth-field i {
    width: 1rem;
    text-align: center;
    color: #a78bfa;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rx-auth-field input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #14102e;
}

.rx-auth-field input::placeholder {
    color: #9b97b0;
    font-weight: 500;
}

.rx-auth-field button.rx-auth-eye {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #9b97b0;
    flex-shrink: 0;
}

.rx-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.15rem 0 0.25rem;
    font-size: 0.72rem;
}

.rx-auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.85rem;
    background: #ebe4f8;
    border: 1px solid rgba(124, 58, 237, 0.14);
    cursor: pointer;
    user-select: none;
}

.rx-auth-terms input {
    appearance: none;
    -webkit-appearance: none;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.1rem 0 0;
    flex-shrink: 0;
    border: 2px solid #c4b5fd;
    border-radius: 0.3rem;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rx-auth-terms input:checked {
    background: linear-gradient(135deg, #5b3fe8, #7c3aed);
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
}

.rx-auth-terms input:checked::after {
    content: '';
    position: absolute;
    left: 0.2rem;
    top: 0.02rem;
    width: 0.28rem;
    height: 0.52rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.rx-auth-terms span {
    font-size: 0.74rem;
    line-height: 1.45;
    font-weight: 600;
    color: #4a4668;
}

.rx-auth-terms a {
    color: #5b3fe8;
    font-weight: 800;
    text-decoration: none;
}

.rx-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #4a4668;
    font-weight: 600;
    cursor: pointer;
}

.rx-auth-check input {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: #7c3aed;
    cursor: pointer;
}

.rx-auth-link {
    color: #5b3fe8;
    font-weight: 700;
    text-decoration: none;
}

.rx-auth-fab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 3.15rem;
    margin-top: 1.15rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #4c1d95 0%, #5b3fe8 42%, #7c3aed 72%, #5e72e4 100%);
    box-shadow:
        0 14px 32px rgba(91, 63, 232, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.rx-auth-fab__waves {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.rx-auth-fab__waves span {
    position: absolute;
    display: block;
    border-radius: 55% 45% 48% 52% / 48% 52% 42% 58%;
}

.rx-auth-fab__waves span:nth-child(1) {
    top: -70%;
    right: -8%;
    width: 58%;
    height: 190%;
    background: linear-gradient(160deg, rgba(221, 214, 254, 0.45), rgba(167, 139, 250, 0.28));
    opacity: 0.85;
}

.rx-auth-fab__waves span:nth-child(2) {
    top: -55%;
    right: -14%;
    width: 48%;
    height: 180%;
    background: linear-gradient(170deg, rgba(196, 181, 253, 0.55), rgba(124, 58, 237, 0.35));
}

.rx-auth-fab__waves span:nth-child(3) {
    top: -35%;
    right: -18%;
    width: 40%;
    height: 170%;
    background: linear-gradient(175deg, rgba(139, 92, 246, 0.55), rgba(76, 29, 149, 0.45));
}

.rx-auth-fab__label,
.rx-auth-fab i {
    position: relative;
    z-index: 1;
}

.rx-auth-fab i {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.rx-auth-fab:hover {
    filter: brightness(1.05);
    box-shadow:
        0 18px 36px rgba(91, 63, 232, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.rx-auth-fab:hover i {
    transform: translateX(3px);
}

.rx-auth-fab:active {
    transform: scale(0.98);
}

.rx-auth-msg {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.4;
}

.rx-auth-msg.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.rx-auth-msg.is-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.rx-auth-msg.hidden {
    display: none;
}

.rx-auth-ref,
.rx-auth-ref-note {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
    background: #ebe4f8;
    border: 1px solid rgba(124, 58, 237, 0.16);
    font-size: 0.74rem;
    font-weight: 600;
    color: #4a4668;
}

.rx-auth-ref strong,
.rx-auth-ref-note strong {
    color: #5b3fe8;
}
