/* +----------------------------------------------------------------------
 * | AD工具箱 · 登录页样式
 * | 说明：本文件位于 public/static/extra 下，不会被 think-plugs-static 覆盖
 * +--------------------------------------------------------------------*/

.auth-login {
    --auth-accent: #2563eb;
    --auth-accent-deep: #1d4ed8;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-field: #f8fafc;
    --auth-card: #ffffff;
    /* 输入框文字 / 占位符颜色（想更醒目就改这里） */
    --auth-input-text: #0b1220;
    --auth-input-ph: #64748b;
    position: fixed;
    inset: 0;
    z-index: 9;
    display: flex;
    padding: 24px;
    overflow: auto;
    background:
        radial-gradient(1100px 560px at 8% -12%, #16386b 0%, rgba(22, 56, 107, 0) 62%),
        radial-gradient(880px 480px at 96% 110%, #0b3a5e 0%, rgba(11, 58, 94, 0) 58%),
        linear-gradient(160deg, #070d18 0%, #0b1220 46%, #0a1120 100%);
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-login *,
.auth-login *::before,
.auth-login *::after {
    box-sizing: border-box;
}

/* 登录页不需要顶部加载进度条 */
.pace,
.pace-progress,
.pace-activity {
    display: none !important;
}

/* 背景网格纹理 */
.auth-login::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(72% 62% at 50% 42%, #000 0%, transparent 100%);
    mask-image: radial-gradient(72% 62% at 50% 42%, #000 0%, transparent 100%);
}

/* 卡片容器 */
.auth-login__shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 452px;
    width: 100%;
    max-width: 1016px;
    min-width: 0;
    margin: auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 50px 100px -32px rgba(2, 6, 23, .85),
        0 0 0 1px rgba(148, 163, 184, .14);
}

/* 左侧品牌面板 */
.auth-login__intro {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 46px 44px 38px;
    color: #e2e8f0;
    overflow: hidden;
    background: linear-gradient(155deg, #1d4ed8 0%, #1b3f9e 46%, #0d2a5b 100%);
}

.auth-login__intro::before,
.auth-login__intro::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-login__intro::before {
    top: -110px;
    right: -90px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 66%);
}

.auth-login__intro::after {
    left: -120px;
    bottom: -140px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle at 60% 40%, rgba(56, 189, 248, .28), rgba(56, 189, 248, 0) 68%);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .6px;
}

.auth-brand__name {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.auth-brand__name b {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: .4px;
}

.auth-brand__name i {
    font-style: normal;
    font-size: 10px;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: rgba(226, 232, 240, .66);
}

.auth-intro {
    position: relative;
    z-index: 1;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-intro h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.42;
    font-weight: 600;
    color: #fff;
    letter-spacing: .6px;
}

.auth-intro p {
    margin: 0;
    max-width: 22em;
    font-size: 13.5px;
    line-height: 1.95;
    color: rgba(226, 232, 240, .78);
}

.auth-intro ul {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.auth-intro li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(226, 232, 240, .9);
}

.auth-intro li svg {
    width: 16px;
    height: 16px;
    flex: none;
    opacity: .92;
}

.auth-intro__copy {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 11.5px;
    color: rgba(226, 232, 240, .52);
}

/* 右侧表单面板 */
.auth-login__card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    padding: 52px 48px 32px;
    background: var(--auth-card);
}

.auth-card__head h1 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .4px;
    color: var(--auth-ink);
}

.auth-card__head p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--auth-muted);
}

.auth-mini-brand {
    display: none;
    align-items: center;
    gap: 10px;
}

.auth-mini-brand .auth-mark {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-accent), #0ea5e9);
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .9);
    font-size: 13px;
}

.auth-mini-brand b {
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-ink);
    letter-spacing: .3px;
}

/* 表单 */
.auth-login__card form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field.verify {
    animation: authFieldIn .24s ease both;
}

.auth-label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2px;
    color: #475569;
}

.auth-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.auth-row .auth-input {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-field);
    transition: border-color .18s, background .18s, box-shadow .18s;
}

.auth-input:hover {
    border-color: #cbd5e1;
}

.auth-input:focus-within {
    border-color: var(--auth-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.auth-input > svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: #64748b;
    transition: color .18s;
}

.auth-input:focus-within > svg {
    color: var(--auth-accent);
}

.auth-input input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .3px;
    color: var(--auth-input-text);
    -webkit-text-fill-color: var(--auth-input-text) !important;
    caret-color: var(--auth-accent);
    appearance: none;
}

.auth-input input::placeholder {
    color: var(--auth-input-ph);
    font-weight: 400;
    letter-spacing: .3px;
    opacity: 1;
}

/* 浏览器自动填充：Chrome 会自己刷一层浅色底 + 锁死字色，
   深色登录页上就变成"灰底 + 看不见的字"。这里用 inset 阴影盖掉它的底色。 */
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus,
.auth-input input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-input-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--auth-field) inset !important;
    box-shadow: 0 0 0 1000px var(--auth-field) inset !important;
    background-color: var(--auth-field) !important;
    background-clip: padding-box !important;
    -webkit-background-clip: padding-box !important;
    caret-color: var(--auth-accent);
    transition: background-color 600000s 0s, color 600000s 0s !important;
}

.auth-input input.validate-error {
    color: #b91c1c;
    -webkit-text-fill-color: #b91c1c !important;
}

/* 验证码 */
.auth-captcha {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 48px;
    flex: none;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
}

.auth-captcha:hover {
    border-color: #cbd5e1;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

.auth-captcha img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 密码显示切换 */
.auth-eye {
    position: relative;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    background: transparent;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    transition: color .16s, background .16s;
}

.auth-eye:hover {
    color: #475569;
    background: #eef2f7;
}

.auth-eye:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.auth-eye svg {
    width: 18px;
    height: 18px;
    display: block;
}

.auth-eye .auth-eye__off {
    display: none;
}

.auth-eye.is-on .auth-eye__on {
    display: none;
}

.auth-eye.is-on .auth-eye__off {
    display: block;
}

/* 提交按钮 */
.auth-submit {
    position: relative;
    height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 1.2px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #0ea5e9 100%);
    box-shadow: 0 14px 26px -14px rgba(37, 99, 235, .9);
    transition: transform .16s, box-shadow .16s, filter .16s;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: saturate(1.06);
    box-shadow: 0 20px 32px -16px rgba(37, 99, 235, .95);
}

.auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .8);
}

.auth-submit:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

.auth-submit.submit-button-loading {
    cursor: progress;
    filter: saturate(.85);
    pointer-events: none;
}

.auth-submit.submit-button-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 15px;
    height: 15px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin .7s linear infinite;
}

/* 页脚 */
.auth-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    margin-top: auto;
    padding-top: 6px;
    font-size: 11.5px;
    line-height: 1.8;
    color: #94a3b8;
}

.auth-card__foot a {
    color: #64748b;
    text-decoration: none;
    transition: color .16s;
}

.auth-card__foot a:hover {
    color: var(--auth-accent);
    text-decoration: underline;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes authFieldIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* 响应式 */
@media (max-width: 960px) {
    .auth-login {
        padding: 18px;
    }

    .auth-login__shell {
        grid-template-columns: 1fr;
        max-width: 460px;
        border-radius: 20px;
    }

    .auth-login__intro {
        display: none;
    }

    .auth-login__card {
        padding: 40px 30px 28px;
        gap: 22px;
    }

    .auth-mini-brand {
        display: flex;
    }
}

@media (max-width: 420px) {
    .auth-login {
        padding: 12px;
    }

    .auth-login__card {
        padding: 32px 20px 22px;
    }

    .auth-card__head h1 {
        font-size: 21px;
    }

    .auth-captcha {
        width: 96px;
    }
}

/* 深色系统偏好 */
@media (prefers-color-scheme: dark) {
    .auth-login {
        color-scheme: dark;
        --auth-field: #111c33;
        --auth-input-text: #f8fafc;
        --auth-input-ph: #94a3b8;
    }

    .auth-login__card {
        background: #0f172a;
        box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .12);
    }

    .auth-card__head h1,
    .auth-mini-brand b {
        color: #e6edf7;
    }

    .auth-card__head p,
    .auth-label {
        color: #a8b6ca;
    }

    .auth-input {
        border-color: #1e293b;
        background: #111c33;
    }

    .auth-input:hover {
        border-color: #334155;
    }

    .auth-input:focus-within {
        border-color: #3b82f6;
        background: #0b1526;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
    }

    .auth-input input:-webkit-autofill,
    .auth-input input:-webkit-autofill:hover,
    .auth-input input:-webkit-autofill:focus {
        -webkit-text-fill-color: var(--auth-input-text) !important;
    }

    .auth-input input.validate-error {
        color: #fca5a5;
        -webkit-text-fill-color: #fca5a5 !important;
    }

    .auth-captcha {
        border-color: #1e293b;
        background: #111c33;
    }

    .auth-eye:hover {
        color: #cbd5e1;
        background: #1e293b;
    }

    .auth-card__foot,
    .auth-card__foot a {
        color: #7c8aa0;
    }
}
