/* =====================================================================
   admin-auth.css — 疾焰冲线登录页（Passport/SignIn）专属样式
   主题：白陶瓷场地、速度线、橙色赛道灯槽
   本页 Layout=null，仍会先加载 admin-shell.css 以共用细框与主按钮
   ===================================================================== */

/* --- 登录页变量（与外壳色板一致，单独写出以便本文件自明） --- */
:root {
    --auth-bg: #E9ECEF;
    --auth-line: #CDD3DA;
    --auth-text: #15181C;
    --auth-text-dim: #596169;
    --auth-accent: #FF6A00;
    --auth-accent-text: #B84A00;
    --auth-on-accent: #1A0D00;
}

/* --- 页面骨架：陶瓷底 + 速度线 --- */
.sp-auth-body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--auth-bg);
    background-image: url("../img/shell/speed-streaks.svg");
    background-size: 240px 160px;
    color: var(--auth-text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.sp-auth {
    display: flex;
    min-height: 100vh;
}

/* --- 左侧品牌视觉区：速度线场地 --- */
.sp-auth__visual {
    flex: 1 1 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, rgba(255, 106, 0, .16), rgba(255, 255, 255, .25) 42%, transparent 68%);
}

/* 再叠一层速度线，让左侧比右侧更密，仍是静态图 */
.sp-auth__visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/shell/speed-streaks.svg");
    background-size: 280px 180px;
    opacity: .9;
    pointer-events: none;
}

/* 品牌徽记：陶瓷牌，橙色投影 */
.sp-auth__visual .sp-auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 8px 28px rgba(255, 106, 0, .28);
}

.sp-auth__brand {
    position: relative;
    max-width: 460px;
}

.sp-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: var(--auth-accent-text);
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.sp-auth__brand h1 {
    margin: 0 0 14px;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.sp-auth__brand p {
    margin: 0;
    color: var(--auth-text-dim);
    line-height: 1.8;
    max-width: 400px;
}

/* --- 右侧登录面板 --- */
.sp-auth__panel {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #F3F5F8;
    border-left: 1px solid var(--auth-line);
}

/* 登录卡套面板细框。切片 32、显示边宽 14px，与外壳面板相同。 */
.sp-auth__card {
    width: 100%;
    max-width: 360px;
    padding: 18px 16px 16px;
    border-style: solid;
    border-color: var(--auth-line);
    border-width: 14px;
    border-image-source: url("../img/shell/panel-frame.svg");
    border-image-slice: 32;
    border-image-repeat: stretch;
    border-radius: 0;
    background-color: #FFFFFF;
    background-clip: padding-box;
    box-shadow: 0 14px 32px rgba(30, 40, 52, .16);
}

.sp-auth__card h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 600;
}

.sp-auth-sub {
    margin: 0 0 26px;
    color: var(--auth-text-dim);
    font-size: .9rem;
}

/* --- 表单控件：白底陶瓷槽 --- */
.sp-auth__card .form-label {
    color: var(--auth-text-dim);
    font-size: .85rem;
}

.sp-auth__card .form-control {
    background: #FFFFFF;
    border: 1px solid #98A2AD;
    color: var(--auth-text);
    border-radius: 8px;
    padding: .65rem .85rem;
    box-shadow: inset 0 1px 2px rgba(30, 40, 52, .06);
}

.sp-auth__card .form-control:focus {
    background: #FFFFFF;
    border-color: #D25400;
    color: var(--auth-text);
    box-shadow: 0 0 0 .2rem rgba(210, 84, 0, .28);
}

.sp-auth__card .form-control::placeholder {
    color: rgba(89, 97, 105, .72);
}

.sp-auth__card .form-check-input {
    background-color: #FFFFFF;
    border-color: #98A2AD;
}

.sp-auth__card .form-check-input:checked {
    background-color: #C44700;
    border-color: #C44700;
}

.sp-auth__card .form-check-label {
    color: var(--auth-text);
    font-size: .88rem;
}

/* 登录按钮的橙填充由 admin-shell.css 的 .sp-auth-body .btn-primary 绘制 */
.sp-auth__card .btn-primary {
    border-radius: 8px;
    padding: .65rem 1rem;
    letter-spacing: .02em;
}

.sp-auth__card .btn-primary:hover:not(:disabled) {
    filter: brightness(1.05);
}

/* 验证错误反馈（rpg-core 回填） */
.sp-auth__card .invalid-feedback {
    color: #C43848;
    font-size: .8rem;
}

/* --- 密码可见切换 --- */
.sp-auth-password {
    position: relative;
}

.sp-auth-password .form-control {
    padding-right: 44px;
}

.sp-auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--auth-text-dim);
    border-radius: 6px;
    cursor: pointer;
}

.sp-auth-password__toggle:hover {
    color: var(--auth-text);
    background: rgba(255, 106, 0, .08);
}

.sp-auth-password__toggle:focus-visible {
    outline: 2px solid #D25400;
    outline-offset: 2px;
}

/* --- 提示条（rpg-core 联动） --- */
.sp-tip {
    margin-top: 14px;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: .85rem;
    background: #F6F7F9;
    color: var(--auth-text);
}

.sp-tip--ok {
    color: #1F7A45;
    border: 1px solid rgba(31, 122, 69, .35);
    background: rgba(31, 122, 69, .08);
}

.sp-tip--error {
    color: #C43848;
    border: 1px solid rgba(196, 56, 72, .35);
    background: rgba(196, 56, 72, .08);
}

/* --- 提交中加载态 --- */
.sp-btn-loading {
    opacity: .7;
    pointer-events: none;
}

/* --- 窄屏适配：隐藏视觉区装饰，面板铺满 --- */
@media (max-width: 860px) {
    .sp-auth {
        flex-direction: column;
    }

    .sp-auth__visual {
        flex: 0 0 auto;
        padding: 36px 28px 20px;
    }

    .sp-auth__brand h1 {
        font-size: 1.8rem;
    }

    .sp-auth__panel {
        flex: 1 1 auto;
        border-left: none;
        border-top: 1px solid var(--auth-line);
    }
}

/* --- 登录验证码 --- */
/* 图形验证码行：输入框 + 图片并排 */
.sp-captcha {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

.sp-captcha .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.sp-captcha__img {
    flex: 0 0 auto;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--auth-line);
    background: #FFFFFF;
    cursor: pointer;
}

/* 点选验证码区：容器裁剪标记点，图片等比缩放铺满 */
.sp-captcha-click {
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--auth-line);
    overflow: hidden;
    background: #FFFFFF;
}

.sp-captcha-click img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

/* 点选标记点：序号圆点，点击可删除该点。深色字压在橙色上。 */
.sp-captcha__mark {
    position: absolute;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    background: var(--auth-accent);
    color: var(--auth-on-accent);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
}

/* 点选提示文案与刷新链接 */
.sp-captcha__tip {
    margin-left: .5rem;
    font-size: .78rem;
    color: var(--auth-accent-text);
}

.sp-captcha__refresh {
    padding: 0;
    margin-top: .25rem;
    font-size: .8rem;
    color: var(--auth-accent-text);
    text-decoration: none;
}

.sp-captcha__refresh:hover {
    color: #8C3800;
}

/* 高对比模式退回系统边框，不靠速度线表达结构 */
@media (forced-colors: active) {
    .sp-auth__card,
    .sp-auth-body,
    .sp-auth__visual::before {
        border-image: none;
        background-image: none;
    }

    .sp-auth__card {
        border: 1px solid CanvasText;
    }
}
