/* 登录 / 忘记密码 / 重置密码 — 统一视觉 */
:root {
    --auth-primary: #1A4B8C;
    --auth-primary-hover: #2E7BD4;
    --auth-text: #111827;
    --auth-title: #0f2744;
    --auth-label: #1f2937;
    --auth-muted: #4b5563;
}

.auth-page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background-color: #1a3a5c;
    background-image: var(--auth-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.auth-page-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}

.auth-site-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 12px 16px 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.auth-site-footer p {
    margin: 0;
}

/* ICP 备案外链：可点击，视觉与页脚正文一致 */
.auth-site-footer .site-footer-icp-link,
.site-footer-icp-link {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: none;
}

.auth-site-footer .site-footer-icp-link:hover,
.auth-site-footer .site-footer-icp-link:focus,
.auth-site-footer .site-footer-icp-link:active,
.site-footer-icp-link:hover,
.site-footer-icp-link:focus,
.site-footer-icp-link:active {
    color: inherit;
    text-decoration: none;
}

/* 背景遮罩，保证白卡片可读 */
.auth-page-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 75, 140, 0.72) 0%,
        rgba(20, 50, 90, 0.55) 50%,
        rgba(15, 40, 75, 0.68) 100%
    );
    pointer-events: none;
}

.auth-page-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    color: var(--auth-text);
    -webkit-font-smoothing: auto;
}

/* 页面切换：仅进入时一次短淡入（避免离开+进入叠加显得闪两次） */
.auth-page-box--enter {
    animation: authBoxEnter 0.2s ease-out forwards;
}

@keyframes authBoxEnter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page-box--enter {
        animation: none;
    }
}

/* 品牌区（登录页） */
.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: var(--auth-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
}

.auth-brand-icon img {
    max-width: 44px;
    max-height: 44px;
    object-fit: contain;
}

.auth-brand-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--auth-title);
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.auth-brand-sub {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--auth-muted);
    line-height: 1.45;
}

.auth-page-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--auth-title);
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.auth-page-desc {
    font-size: 13px;
    color: var(--auth-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 表单 */
.auth-page-box .form-label {
    font-weight: 400;
    font-size: 14px;
    color: var(--auth-label);
    margin-bottom: 6px;
}

.auth-page-box .form-control {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 400;
    color: var(--auth-text);
    border: 1px solid #dce8f5;
    border-radius: 8px;
}

.auth-page-box .form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.auth-page-box .form-control:focus {
    border-color: var(--auth-primary-hover);
    box-shadow: 0 0 0 3px rgba(46, 123, 212, 0.15);
}

/* 覆盖 Bootstrap .btn 的 inline-block，用块级 + 文本居中，避免中文在 flex 里视觉偏位 */
.auth-page-box .btn.btn-primary {
    display: block;
    width: 100%;
    gap: 0;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    color: #fff;
    border-radius: 8px;
    -webkit-font-smoothing: auto;
}

.auth-page-box .btn-primary:hover,
.auth-page-box .btn-primary:focus {
    background: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
}

.auth-page-box .btn-primary:disabled {
    opacity: 0.55;
}

/* 页内链接：无下划线 */
.auth-text-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 13px;
}

.auth-text-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: none;
}

.auth-foot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-foot .auth-text-link {
    font-weight: 400;
    display: inline-block;
    text-align: center;
    letter-spacing: normal;
}

/* 悬浮提示（不占用卡片高度） */
.auth-toast-stack {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.auth-toast-stack .auth-flash {
    margin: 0;
    pointer-events: auto;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    animation: authToastIn 0.28s ease forwards;
}

@keyframes authToastIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* 卡片内静态说明（如 SMTP 未配置） */
.auth-page-box > .auth-flash--static {
    margin-bottom: 16px;
}

/* 提示条：无 ×，3 秒自动关闭 */
.auth-flash {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-flash i {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 15px;
}

.auth-flash--success {
    background: #ecfdf3;
    border: 1px solid #a7d7b3;
    color: #166534;
}

.auth-flash--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-flash--warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.auth-flash.is-hiding {
    opacity: 0;
    transition: opacity 0.35s ease;
}
