* { box-sizing: border-box; }

body { margin: 0; }

.auth {
    --rx-orange: #e8452d;
    --rx-orange-deep: #c43620;
    --auth-ink: #f2f2f2;
    --auth-muted: rgba(242, 242, 242, 0.68);
    --auth-panel: #fbfbfb;
    --auth-ink-dark: #1a1a1a;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--auth-ink);
    background: #000;
    font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 480px at 15% 85%, rgba(232, 69, 45, 0.22), transparent 55%),
        radial-gradient(700px 420px at 90% 10%, rgba(232, 69, 45, 0.12), transparent 50%),
        linear-gradient(145deg, #000 0%, #0d0d0d 45%, #141414 100%);
}

.auth-grid {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(600px) rotateX(58deg) translateY(-12%);
    transform-origin: center top;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 78%);
    animation: auth-grid-drift 22s linear infinite;
}

.auth-orb { position: absolute; border-radius: 50%; }

.auth-orb-a {
    width: min(52vw, 520px);
    height: min(52vw, 520px);
    left: -8%;
    bottom: -18%;
    background: radial-gradient(circle at 35% 35%, rgba(232, 69, 45, 0.4), transparent 62%);
    animation: auth-orb-float 14s ease-in-out infinite;
}

.auth-orb-b {
    width: min(36vw, 380px);
    height: min(36vw, 380px);
    right: -4%;
    top: -10%;
    background: radial-gradient(circle at 40% 40%, rgba(232, 69, 45, 0.18), transparent 68%);
    animation: auth-orb-float 18s ease-in-out infinite reverse;
}

.auth-scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 26%;
    top: -30%;
    background: linear-gradient(to bottom, transparent, rgba(232, 69, 45, 0.08), transparent);
    animation: auth-scan 7.5s ease-in-out infinite;
}

.auth-frame {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-content: center;
    gap: clamp(2rem, 5vh, 3.5rem);
    width: min(1080px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: clamp(2rem, 6vh, 4rem) 0;
    grid-template-columns: 1.2fr 0.9fr;
}

.auth-hero { align-self: center; animation: auth-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }

.auth-logo {
    display: block;
    width: min(420px, 92%);
    height: auto;
    margin: 0 0 1.35rem;
    filter: drop-shadow(0 12px 28px rgba(232, 69, 45, 0.18));
}

.auth-product {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 650;
    letter-spacing: 0.28em;
    color: #fff;
}

.auth-desc {
    margin: 0.85rem 0 0;
    max-width: 22rem;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--auth-muted);
}

.auth-panel {
    align-self: center;
    background: var(--auth-panel);
    color: var(--auth-ink-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: clamp(1.5rem, 3vw, 2rem);
    animation: auth-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.auth-panel-title { margin: 0; font-size: 1.35rem; font-weight: 650; color: #111; }

.auth-panel-sub { margin: 0.35rem 0 1.35rem; color: #5d5d5d; font-size: 0.9rem; }

.auth-form { display: grid; gap: 1rem; }

.auth-field { display: grid; gap: 0.4rem; }

.auth-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #555;
}

.auth-input {
    width: 100%;
    border: 1px solid #d5d5d5;
    border-radius: 3px;
    background: #fff;
    padding: 0.82rem 0.9rem;
    font: inherit;
    font-size: 0.98rem;
    color: #1a1a1a;
    outline: none;
}

.auth-input:focus {
    border-color: var(--rx-orange);
    box-shadow: 0 0 0 3px rgba(232, 69, 45, 0.15);
}

.auth-error {
    padding: 0.65rem 0.75rem;
    border: 1px solid #f0c2bc;
    background: #fdf2f0;
    color: #9b2c1f;
    font-size: 0.88rem;
    border-radius: 3px;
}

.auth-submit {
    margin-top: 0.25rem;
    width: 100%;
    border: 0;
    border-radius: 3px;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, var(--rx-orange) 0%, var(--rx-orange-deep) 100%);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.auth-submit:hover { filter: brightness(1.05); }

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes auth-grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 56px 56px, 56px 56px; }
}

@keyframes auth-orb-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@keyframes auth-scan {
    0% { top: -30%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 0.7; }
    100% { top: 110%; opacity: 0; }
}

@media (max-width: 860px) {
    .auth-frame {
        grid-template-columns: 1fr;
        width: min(440px, calc(100% - 1.5rem));
        padding: 2rem 0 2.5rem;
        gap: 1.5rem;
    }

    .auth-logo { width: min(300px, 100%); }
    .auth-desc { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-grid, .auth-orb, .auth-scan, .auth-hero, .auth-panel { animation: none !important; }
}
