@charset "UTF-8";

/* 后台登录页 */

:root {
    --login-bg: linear-gradient(145deg, #e8eef5 0%, #dce6f2 45%, #cfd9e8 100%);
    --login-card: #fff;
    --login-shadow: 0 12px 40px rgba(15, 35, 65, 0.12);
    --login-border: #e2e8f0;
    --login-text: #1e293b;
    --login-muted: #64748b;
    --login-primary: #2890ff;
    --login-primary-hover: #1a7ae0;
    --login-danger-bg: #fef2f2;
    --login-danger-border: #fecaca;
    --login-danger-text: #b91c1c;
    --login-info-bg: #eaf4ff;
    --login-info-border: #b3d9ff;
    --login-info-text: #1a7ae0;
    --login-radius: 12px;
    --login-input-radius: 8px;

    --font-size-boost: 0px;
    --font-size-12: calc(12px + var(--font-size-boost));
    --font-size-13: calc(13px + var(--font-size-boost));
    --font-size-14: calc(14px + var(--font-size-boost));
    --font-size-15: calc(15px + var(--font-size-boost));
    --font-size-20: calc(20px + var(--font-size-boost));
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body.login {
    margin: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: var(--font-size-14);
    line-height: 1.5;
    color: var(--login-text);
    background: var(--login-bg);
    -webkit-font-smoothing: antialiased;
}

/* 居中卡片 */
.login .content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 180px 16px 48px;
}

.login .content .logo {
    text-align: center;padding-bottom: 10px;
}

.login .content .logo a {
    display: inline-block;
    text-decoration: none;
}

.login .content .logo img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 8px 0;
}

/* 表单容器 */
.login .content .login-form,
.login .content .forget-form,
.login .content .register-form {
    margin: 0;
    padding: 28px 28px 28px;
    background: var(--login-card);
    border-radius: var(--login-radius);
    box-shadow: var(--login-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login .content .forget-form,
.login .content .register-form {
    display: none;
}

.login-form {
    padding-bottom: 0;
}

/* 消息条 */
.login .post-msg,
.login-form .post-msg {
    display: none;
    margin: 0 0 20px;
    padding: 10px 14px;
    font-size: var(--font-size-13);
    line-height: 1.45;
    border-radius: var(--login-input-radius);
    border: 1px solid transparent;
}

.login .post-msg span:empty::before {
    content: "\00a0";
}

.login .post-msg.alert-danger,
.login-form .post-msg.alert-danger {
    background: var(--login-danger-bg);
    border-color: var(--login-danger-border);
    color: var(--login-danger-text);
}

.login .post-msg.alert-info,
.login-form .post-msg.alert-info {
    background: var(--login-info-bg);
    border-color: var(--login-info-border);
    color: var(--login-info-text);
}

/* 表单行 */
.login .form-group {
    margin-bottom: 18px;
}

.login .form-group.text-center {
    text-align: center;
}

.login .control-label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--font-size-13);
    font-weight: 500;
    color: var(--login-muted);
}

.visible-ie8,
.visible-ie9 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.login .input-icon {
    position: relative;
}

.login .input-icon > .form-control {
    width: 100%;
}

.login .form-control,
.login input.form-control {
    display: block;
    width: 100%;
    height: 42px;
    padding: 8px 14px;
    font-size: var(--font-size-14);
    line-height: 1.45;
    color: var(--login-text);
    background-color: #f8fafc;
    border: 1px solid var(--login-border);
    border-radius: var(--login-input-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login .form-control:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(40, 144, 255, 0.18);
}

.login .form-control::placeholder {
    color: #94a3b8;
}

/* 验证码行：输入 + 按钮 */
.login .input-inline {
    width: 100%;
}

.login .input-group {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.login .input-group .form-control {
    flex: 1;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.login .input-group-btn {
    flex-shrink: 0;
}

.login .input-group-btn .btn {
    height: 42px;
    padding: 0 14px;
    line-height: 40px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    white-space: nowrap;
    font-size: var(--font-size-13);
}

.login .input-group .input-icon .form-control {
    border-radius: var(--login-input-radius);
}

/* 图形验证码行（桌面端 input-group） */
.login .form-group > .input-group {
    flex-wrap: wrap;
    gap: 0;
}

.login .form-group > .input-group > .input-icon {
    flex: 1;
    min-width: 120px;
}

.login .form-group > .input-group > .input-group-btn.fc-code {
    padding-left: 10px;
    align-self: center;
}

.login .fc-code img {
    display: block;
    vertical-align: middle;
    border-radius: 4px;
    cursor: pointer;
}

/* 按钮 */
.login .btn {
    display: inline-block;
    margin: 0;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--login-input-radius);
    font-size: var(--font-size-15);
    font-weight: 600;
    text-decoration: none;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.login .btn-block {
    display: block;
    width: 100%;
}

.login .btn.blue,
.login-form .form-actions .btn.blue {
    color: #fff;
    background-color: var(--login-primary);
    border-color: var(--login-primary);
    height: 46px;
    line-height: 44px;
    padding: 0 20px;
}

.login .btn.blue:hover,
.login-form .form-actions .btn.blue:hover {
    background-color: var(--login-primary-hover);
    border-color: var(--login-primary-hover);
    color: #fff;
}

.login .btn.blue:active {
    transform: translateY(1px);
}

.login .btn.default {
    color: var(--login-muted);
    background: #f1f5f9;
    border-color: var(--login-border);
}

.login .btn.default:hover {
    background: #e2e8f0;
    color: var(--login-text);
}

/* 提交区 */
.login .content .form-actions {
    clear: both;
    margin: 30px 0 20px 0;
    border: 0;
    background: transparent;
}

.login .content .form-actions.text-right {
    text-align: right;
}

.login .content .form-actions.text-right a {
    font-size: var(--font-size-13);
    color: var(--login-primary);
    text-decoration: none;
}

.login .content .form-actions.text-right a:hover {
    text-decoration: underline;
}

.login .content .form-actions .btn {
    margin-top: 0;
}

/* 模式单选：Metronic mt-radio */
.login .mt-radio-inline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 24px;
}

.login .mt-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: var(--font-size-13);
    color: var(--login-muted);
    user-select: none;
}

.login .mt-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.login .mt-radio > span {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    vertical-align: middle;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.login .mt-radio > span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: var(--login-primary);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* input 与 span 之间可有文本节点，用 ~ 选择其后 span */
.login .mt-radio input[type="radio"]:checked ~ span {
    border-color: var(--login-primary);
}

.login .mt-radio input[type="radio"]:checked ~ span::after {
    opacity: 1;
    transform: scale(1);
}

.login .mt-radio:hover > span {
    border-color: #94a3b8;
}

/* OAuth */
.login-oauth {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--login-border);
    text-align: center;
}

.login-oauth a {
    display: inline-block;
    margin: 0 8px;
    font-size: var(--font-size-20);
    color: var(--login-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.login-oauth a:hover {
    color: var(--login-primary);
}

.tooltip {
    position: absolute;
    z-index: 1030;
    display: block;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: var(--font-size-12);
    font-style: normal;
    font-weight: 400;
    line-height: 1.42857;
    text-align: left;
    text-align: start;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    opacity: 0;
    filter: alpha(opacity=0);
}

.tooltip.in {
    opacity: .9;
    filter: alpha(opacity=90);
}

.tooltip.top {
    margin-top: -3px;
    padding: 5px 0;
}

.tooltip.right {
    margin-left: 3px;
    padding: 0 5px;
}

.tooltip.bottom {
    margin-top: 3px;
    padding: 5px 0;
}

.tooltip.left {
    margin-left: -3px;
    padding: 0 5px;
}

.tooltip-inner {
    max-width: 200px;
    padding: 3px 8px;
    color: #fff;
    text-align: center;
    background-color: #000;
    border-radius: 4px;
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
}

.tooltip.top .tooltip-arrow {
    bottom: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
    border-top-color: #000;
}

.tooltip.top-left .tooltip-arrow,
.tooltip.top-right .tooltip-arrow {
    bottom: 0;
    margin-bottom: -5px;
    border-width: 5px 5px 0;
    border-top-color: #000;
}

.tooltip.top-left .tooltip-arrow {
    right: 5px;
}

.tooltip.top-right .tooltip-arrow {
    left: 5px;
}

.tooltip.right .tooltip-arrow {
    top: 50%;
    left: 0;
    margin-top: -5px;
    border-width: 5px 5px 5px 0;
    border-right-color: #000;
}

.tooltip.left .tooltip-arrow {
    top: 50%;
    right: 0;
    margin-top: -5px;
    border-width: 5px 0 5px 5px;
    border-left-color: #000;
}

.tooltip.bottom .tooltip-arrow,
.tooltip.bottom-left .tooltip-arrow,
.tooltip.bottom-right .tooltip-arrow {
    top: 0;
    border-width: 0 5px 5px;
    border-bottom-color: #000;
}

.tooltip.bottom .tooltip-arrow {
    left: 50%;
    margin-left: -5px;
}

.tooltip.bottom-left .tooltip-arrow {
    right: 5px;
    margin-top: -5px;
}

.tooltip.bottom-right .tooltip-arrow {
    left: 5px;
    margin-top: -5px;
}

/* 版权（若使用） */
.login .copyright {
    text-align: center;
    margin: 24px auto 0;
    padding: 12px 16px;
    font-size: var(--font-size-12);
    color: var(--login-muted);
}

/* 辅助 */
.login .text-center {
    text-align: center;
}

.login .text-right {
    text-align: right;
}

@media (max-width: 480px) {
    .login .content {
        padding-top: 40px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .login .content .login-form,
    .login .content .forget-form,
    .login .content .register-form {
        padding: 24px 20px 22px;
    }

    .login .content .form-actions {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .login .mt-radio-inline {
        flex-direction: column;
        gap: 12px;
    }
}

@media (min-width: 1920px) {
    :root {
        --font-size-boost: 2px;
    }
    .login .content {
        max-width: 550px;
        padding: 220px 16px 48px;
    }
    .login .form-group {
        margin-bottom: 28px;
    }
}
