/* =====================================================
   认证页面（登录 / 注册 / IP 验证）统一视觉
   设计原则：无渐变、无悬浮动效，克制的运营工具风格
   主题：颜色变量定义在 admin-theme.css（需在其后加载），
   跟随系统主题切换；未加载时使用回退默认值（午夜蓝）。
   ===================================================== */

/* 独立页面不引 Bootstrap，必须自带盒模型重置：
   否则 content-box 下 width:100% 叠加 padding/border 会溢出容器，
   输入框/按钮宽度参差不齐 */
body.auth-page,
body.auth-page *,
body.auth-page *::before,
body.auth-page *::after {
    box-sizing: border-box;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    background: #fff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ===== 左侧品牌区 ===== */
.auth-brand {
    width: 44%;
    min-width: 400px;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--auth-panel-item, #b9c6d6);
    background-color: var(--auth-panel-bg, #2b3a4d);
    background-image:
        linear-gradient(var(--auth-panel-grid, rgba(200, 214, 230, .07)) 1px, transparent 1px),
        linear-gradient(90deg, var(--auth-panel-grid, rgba(200, 214, 230, .07)) 1px, transparent 1px);
    background-size: 32px 32px;
    transition: background-color .25s ease;
}

.auth-brand-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--t-accent, #4a7fd4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--auth-panel-name, #eef2f7);
    letter-spacing: .2px;
}

.auth-brand-desc {
    font-size: .82rem;
    color: var(--auth-panel-desc, #adbccd);
    margin-top: 2px;
}

.auth-brand-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--auth-panel-title, #f4f7fa);
    line-height: 1.45;
    margin: 56px 0 0;
}

.auth-brand-features {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.auth-brand-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    color: var(--auth-panel-item, #b9c6d6);
    font-size: .9rem;
}

.auth-brand-features svg { color: var(--auth-panel-item-icon, #8fb0dd); flex-shrink: 0; }

.auth-brand-foot {
    font-size: .78rem;
    color: var(--auth-panel-foot, #93a3b8);
}

/* ===== 右侧表单区 ===== */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fff;
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.auth-sub {
    font-size: .9rem;
    color: #6b7280;
    margin: 0 0 30px;
    line-height: 1.5;
}

/* ===== 表单 ===== */
.auth-field { margin-bottom: 18px; }

.auth-field label {
    display: block;
    font-size: .84rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.auth-input-wrap { position: relative; }

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--t-input-border, #cfd6e0);
    border-radius: 8px;
    background: #fff;
    font-size: .95rem;
    color: #1f2937;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input::placeholder { color: #9aa4b2; }

.auth-input:focus {
    border-color: var(--t-accent, #4a7fd4);
    box-shadow: 0 0 0 3px var(--t-accent-ring, rgba(74, 127, 212, .14));
}

.auth-input--pad-right { padding-right: 44px; }

.auth-input--code {
    height: 52px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 10px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
}

.auth-pwd-toggle {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-pwd-toggle:hover { color: #475569; background: #f1f5f9; }

.auth-hint {
    font-size: .78rem;
    color: #94a3b8;
    margin: 5px 0 0;
}

/* ===== 主按钮 ===== */
.auth-btn {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border: none;
    border-radius: 8px;
    background: var(--t-accent, #4a7fd4);
    color: var(--t-on-accent, #fff);
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease;
}

.auth-btn:hover { background: var(--t-accent-hover, #3a6cc2); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ===== 提示条 ===== */
.auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: .86rem;
    line-height: 1.55;
    margin: 0 0 20px;
}

.auth-alert svg { flex-shrink: 0; margin-top: 2px; }

.auth-alert--error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-alert--info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ===== 链接与脚注 ===== */
.auth-alt {
    text-align: center;
    font-size: .86rem;
    color: #6b7280;
    margin: 22px 0 0;
}

.auth-alt a {
    color: var(--t-accent, #4a7fd4);
    font-weight: 500;
    text-decoration: none;
}

.auth-alt a:hover { text-decoration: underline; }

.auth-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    font-size: .78rem;
    color: #9aa4b2;
    margin: 28px 0 0;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .84rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 22px;
}

.auth-back:hover { color: var(--t-accent, #4a7fd4); }

/* ===== 验证码重发 ===== */
.auth-resend {
    text-align: center;
    font-size: .86rem;
    color: #6b7280;
    margin: 18px 0 0;
}

.auth-resend button {
    border: none;
    background: none;
    padding: 4px 6px;
    font-size: .86rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--t-accent, #4a7fd4);
    cursor: pointer;
}

.auth-resend button:disabled { color: #9aa4b2; cursor: default; }

/* ===== 移动端品牌条（< 768px 显示） ===== */
.auth-brand--mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
    background-color: var(--auth-panel-bg, #2b3a4d);
    color: var(--auth-panel-name, #eef2f7);
}

.auth-brand--mobile .auth-brand-mark { width: 32px; height: 32px; border-radius: 8px; }

.auth-brand--mobile .auth-brand-name { font-size: 1rem; }

.auth-brand--mobile .auth-brand-desc { display: none; }

@media (max-width: 767.98px) {
    .auth-shell { flex-direction: column; }
    .auth-brand { display: none; }
    .auth-brand--mobile { display: flex; }
    .auth-main { padding: 36px 20px; align-items: flex-start; padding-top: 32px; }
}

/* ===== 键盘可达性 ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 4px;
}
