/* ============================================================
   维创尚科技 · 后台登录门户（深色科技风）
   仅作用于 /admin/login（body.is-login），不影响的控制台其余页面
   颜色 / 圆角 / 字体与前台品牌变量同源：青 #0796b8、蓝 #2f6bff、紫 #7a4df6
   无外部字体与 CDN，纯 CSS 装饰，离线可用
   ============================================================ */

body.admin-body.is-login {
    --auth-bg: #050a12;
    --auth-panel: #0b1420;
    --auth-text: #eef5ff;
    --auth-text-2: #a3b4c8;
    --auth-text-3: #8a9cb2;
    --auth-line: rgba(150, 192, 232, 0.16);
    --auth-cyan: #22d3ee;
    --auth-grad: linear-gradient(135deg, #07b6d5 0%, #2f6bff 56%, #7a4df6 100%);
    --auth-radius: 22px;

    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    overflow-x: hidden;
}

/* 关闭后台默认的浅色底噪，登录页背景由 .auth-bg 统一绘制 */
body.admin-body.is-login::before {
    display: none;
}

/* ---------- 舞台 ---------- */
.auth-stage {
    position: relative;
    z-index: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 468px);
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
    width: 100%;
    max-width: 1320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: clamp(32px, 4vh, 56px) clamp(24px, 4vw, 64px);
}

/* ---------- 装饰背景（纯 CSS，aria-hidden） ---------- */
.auth-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1100px 720px at 16% 6%, rgba(7, 182, 213, 0.16), transparent 62%),
        radial-gradient(900px 640px at 92% 96%, rgba(122, 77, 246, 0.15), transparent 60%),
        radial-gradient(760px 520px at 62% 16%, rgba(47, 107, 255, 0.10), transparent 64%),
        linear-gradient(180deg, #060b14 0%, #070d18 55%, #050a12 100%);
}

.auth-grid {
    position: absolute;
    inset: -12%;
    background-image:
        linear-gradient(rgba(120, 170, 220, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 220, 0.07) 1px, transparent 1px);
    background-size: 72px 72px;
    transform: perspective(700px) rotateX(48deg) scale(1.35);
    transform-origin: top center;
    -webkit-mask-image: radial-gradient(72% 62% at 38% 18%, #000 0%, transparent 78%);
    mask-image: radial-gradient(72% 62% at 38% 18%, #000 0%, transparent 78%);
    opacity: 0.55;
}

.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.5;
    animation: authFloat 18s ease-in-out infinite;
}

.auth-glow-a {
    top: -160px;
    left: -120px;
    width: 540px;
    height: 540px;
    background: radial-gradient(circle, #0ea5b7 0%, transparent 68%);
}

.auth-glow-b {
    right: -180px;
    bottom: -200px;
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, #7a4df6 0%, transparent 68%);
    animation-duration: 24s;
    animation-direction: reverse;
}

.auth-beam {
    position: absolute;
    top: -10%;
    bottom: -10%;
    left: 18%;
    width: 240px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.07), transparent);
    filter: blur(6px);
    animation: authSweep 16s ease-in-out infinite;
}

.auth-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.38), transparent);
    opacity: 0.5;
    animation: authScan 11s linear infinite;
}

@keyframes authFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(26px, 18px, 0); }
}

@keyframes authSweep {
    0%, 100% { transform: translateX(-18%); opacity: 0.5; }
    50% { transform: translateX(58%); opacity: 0.8; }
}

@keyframes authScan {
    0% { transform: translateY(-20vh); opacity: 0; }
    12% { opacity: 0.55; }
    88% { opacity: 0.55; }
    100% { transform: translateY(96vh); opacity: 0; }
}

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

/* ---------- 左栏：品牌 ---------- */
.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    min-height: calc(100dvh - clamp(64px, 8vh, 112px));
    animation: authRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-mark {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 15px;
    background: linear-gradient(160deg, #ffffff, #eef4fb);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 #fff;
}

.auth-mark img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.auth-lockup b {
    display: block;
    font-size: 15.5px;
    font-weight: 620;
    letter-spacing: 0.02em;
    color: #f4f9ff;
}

.auth-lockup em {
    display: block;
    margin-top: 3px;
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7d91a8;
}

.auth-pitch {
    max-width: 560px;
    margin: clamp(28px, 6vh, 64px) 0;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--auth-cyan);
}

.auth-eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, var(--auth-cyan), transparent);
}

.auth-pitch h1 {
    margin: 18px 0 16px;
    font-size: clamp(30px, 3.5vw, 48px);
    line-height: 1.16;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #f6faff;
}

.auth-pitch > p:not(.auth-eyebrow):not(.auth-meta) {
    max-width: 34em;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--auth-text-2);
}

.auth-pitch .auth-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 26px 0 0;
    font-size: 11.5px;
    letter-spacing: 0.1em;
    color: #8497ad;
}

.auth-meta span {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.auth-meta span::after {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.55);
}

.auth-meta span:last-child::after {
    display: none;
}

.auth-brand-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(150, 192, 232, 0.12);
    font-size: 11.5px;
    line-height: 1.7;
    color: #8a9cb2;
}

/* ---------- 右栏：登录卡 ---------- */
.auth-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    animation: authRise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.06s both;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: clamp(26px, 3vw, 38px) clamp(22px, 3vw, 36px) clamp(22px, 3vw, 30px);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background:
        linear-gradient(180deg, rgba(22, 35, 54, 0.82) 0%, rgba(10, 18, 29, 0.88) 100%);
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.55),
        0 2px 0 rgba(255, 255, 255, 0.04) inset,
        0 -18px 50px rgba(34, 211, 238, 0.05) inset;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.65), transparent);
}

.auth-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px 200px at 82% -12%, rgba(47, 107, 255, 0.16), transparent 70%);
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

.auth-card-head .auth-eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
    color: #67e8f9;
}

.auth-card-head h2 {
    margin: 12px 0 8px;
    font-size: clamp(22px, 2vw, 26px);
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: #f4f9ff;
}

.auth-card-head > p {
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--auth-text-2);
}

/* 提示横幅 */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.34);
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.10);
    font-size: 12.8px;
    line-height: 1.65;
    color: #fecaca;
}

.auth-alert svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-alert.is-lock {
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(245, 158, 11, 0.10);
    color: #fde68a;
}

.auth-alert.is-field {
    border-color: rgba(34, 211, 238, 0.32);
    background: rgba(14, 165, 183, 0.10);
    color: #bae6fd;
}

.auth-alert.is-success {
    border-color: rgba(52, 211, 153, 0.34);
    background: rgba(16, 185, 129, 0.10);
    color: #a7f3d0;
}

/* 表单 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 560;
    letter-spacing: 0.03em;
    color: #bfcedf;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid rgba(150, 192, 232, 0.22);
    border-radius: 12px;
    background: rgba(7, 13, 23, 0.72);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-input:hover {
    border-color: rgba(150, 192, 232, 0.34);
}

.auth-input:focus-within {
    border-color: rgba(34, 211, 238, 0.6);
    background: rgba(9, 17, 29, 0.9);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.auth-input.is-invalid {
    border-color: rgba(248, 113, 113, 0.65);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.auth-input input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 13px 14px;
    border: 0;
    outline: none;
    background: transparent;
    color: #eef5ff;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0.01em;
    caret-color: var(--auth-cyan);
}

.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: #eef5ff;
    -webkit-box-shadow: 0 0 0 1000px #0a1524 inset;
    caret-color: var(--auth-cyan);
}

.auth-eye {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    margin-right: 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8699af;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
}

.auth-eye:hover {
    color: var(--auth-cyan);
    background: rgba(34, 211, 238, 0.08);
}

.auth-eye svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-eye .icon-eye-off { display: none; }

.auth-input.is-visible .auth-eye .icon-eye { display: none; }
.auth-input.is-visible .auth-eye .icon-eye-off { display: block; }

.auth-field-note {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #fca5a5;
}

.auth-field-note[hidden] { display: none; }

.auth-caps {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: -4px 0 0;
    font-size: 12px;
    color: #fcd34d;
}

.auth-caps[hidden] { display: none; }

.auth-caps::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -2px;
    font-size: 12.5px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    color: var(--auth-text-2);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #0e9bb5;
    cursor: pointer;
}

.auth-help {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #67e8f9;
    text-decoration: none;
    border-bottom: 1px solid rgba(103, 232, 249, 0.28);
}

.auth-help:hover {
    color: #a5f3fc;
    border-bottom-color: rgba(165, 243, 252, 0.6);
}

/* 提交按钮 */
.auth-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    margin-top: 2px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--auth-grad);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 620;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow:
        0 16px 34px rgba(47, 107, 255, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover {
    filter: brightness(1.08);
    box-shadow:
        0 20px 40px rgba(47, 107, 255, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible {
    outline: 2px solid #a5f3fc;
    outline-offset: 3px;
}

.auth-submit[disabled] {
    cursor: progress;
    filter: saturate(0.9) brightness(0.95);
}

.auth-submit svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s ease;
}

.auth-submit:hover svg {
    transform: translateX(3px);
}

.auth-spin {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

.auth-submit.is-loading .auth-spin { display: block; }
.auth-submit.is-loading svg { display: none; }
.auth-submit.is-loading:hover svg { transform: none; }

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

.auth-hint {
    margin: -2px 0 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: #8fa2b8;
}

.auth-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(150, 192, 232, 0.12);
    font-size: 11.5px;
    line-height: 1.6;
    color: #8a9cb2;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: #a3b4c8;
    text-decoration: none;
}

.auth-back:hover { color: var(--auth-cyan); }

/* 卡片外的返回链接（小屏隐藏，卡内已有） */
.auth-out {
    margin: 0;
    font-size: 12px;
}

.auth-out a {
    color: #8a9cb2;
    text-decoration: none;
}

.auth-out a:hover { color: var(--auth-cyan); }

@media (min-width: 861px) {
    /* 桌面端一屏内不滚动，背景固定可避免留白与断层 */
    .auth-bg {
        position: fixed;
    }
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
    .auth-stage {
        grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
        gap: 32px;
        padding: 32px 28px;
    }

    .auth-brand {
        min-height: calc(100dvh - 64px);
    }

    .auth-pitch h1 {
        font-size: clamp(28px, 3.6vw, 38px);
    }
}

/* ---------- 手机：单列 ---------- */
@media (max-width: 860px) {
    .auth-stage {
        grid-template-columns: 1fr;
        justify-items: stretch;
        align-items: start;
        gap: 24px;
        min-height: 100vh;
        min-height: 100dvh;
        padding:
            max(22px, env(safe-area-inset-top)) 20px
            calc(28px + env(safe-area-inset-bottom));
    }

    .auth-brand {
        width: 100%;
        max-width: 520px;
        min-height: 0;
        margin: 0 auto;
        gap: 0;
    }

    .auth-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 13px;
    }

    .auth-mark img {
        width: 28px;
        height: 28px;
    }

    .auth-lockup b { font-size: 15px; }

    .auth-pitch {
        margin: 16px 0 0;
        max-width: none;
    }

    .auth-pitch h1 {
        margin: 12px 0 10px;
        font-size: clamp(24px, 6.6vw, 30px);
        line-height: 1.28;
    }

    .auth-pitch > p:not(.auth-eyebrow):not(.auth-meta) {
        font-size: 13px;
        line-height: 1.75;
    }

    .auth-pitch .auth-meta {
        margin-top: 16px;
        font-size: 11px;
    }

    .auth-brand-foot {
        display: none;
    }

    .auth-panel {
        justify-content: flex-start;
        gap: 14px;
        margin-top: 4px;
    }

    .auth-card {
        max-width: 520px;
        border-radius: 20px;
        box-shadow:
            0 22px 60px rgba(0, 0, 0, 0.5),
            0 2px 0 rgba(255, 255, 255, 0.04) inset;
    }

    .auth-grid {
        transform: none;
        inset: -20%;
        opacity: 0.4;
    }

    .auth-glow-a,
    .auth-glow-b {
        width: 380px;
        height: 380px;
        filter: blur(56px);
        opacity: 0.4;
    }

    .auth-scan { display: none; }
}

@media (max-width: 400px) {
    .auth-stage { padding-left: 16px; padding-right: 16px; }

    .auth-card {
        padding: 24px 18px 20px;
    }

    .auth-card-head > p { margin-bottom: 18px; }

    .auth-row { flex-wrap: wrap; gap: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-glow,
    .auth-beam,
    .auth-scan,
    .auth-brand,
    .auth-panel,
    .auth-spin {
        animation: none !important;
    }

    .auth-submit svg { transition: none; }
}

/* ---------- 图形验证码 / 二次验证 ---------- */
.auth-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-input-captcha {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-input-captcha input {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 600;
}

.auth-captcha-img {
    flex: 0 0 auto;
    width: auto;
    height: 48px;
    border: 1px solid rgba(150, 192, 232, 0.26);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-captcha-img:hover,
.auth-captcha-img:focus-visible {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
    outline: none;
}

.auth-captcha-refresh {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(150, 192, 232, 0.24);
    border-radius: 12px;
    background: rgba(9, 17, 29, 0.78);
    color: #9fd6ff;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.auth-captcha-refresh:hover,
.auth-captcha-refresh:focus-visible {
    border-color: rgba(34, 211, 238, 0.55);
    color: #e6f8ff;
    background: rgba(13, 26, 43, 0.9);
    outline: none;
}

.auth-captcha-refresh svg {
    width: 18px;
    height: 18px;
}

.auth-input-code input {
    letter-spacing: 0.28em;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.auth-account {
    color: #a9e2ff;
    font-weight: 600;
    word-break: break-all;
}

.auth-card-2fa {
    max-width: 468px;
}

@media (max-width: 400px) {
    .auth-captcha {
        gap: 8px;
    }

    .auth-captcha-img {
        height: 46px;
    }

    .auth-captcha-refresh {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }
}
