/* 登录页样式 — 按真站 /index.php/index/user/login 的 CDP computed style 逐项复刻
 *
 * 真站实测值：
 *   body      bg rgb(244,246,248) = #F4F6F8
 *   font      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", ...
 *   label     14px  rgb(97,97,97) = #616161
 *   input     340x33  13px  padding 6px 12px  border 1px solid rgb(210,214,222)=#d2d6de  radius 0  bg #fff
 *   button    340x43  16px  radius 5px  bg rgb(68,76,105)=#444C69  color #fff
 *   checkbox  13x13
 *   .login-main 430px   .user-section 460px
 */

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #f4f6f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue",
        "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #616161;
    line-height: 1.42857143;
}

/* 顶部导航占位（真站有 fixed-top navbar，登录卡片顶部 130px 起） */
.navbar {
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar-inner {
    max-width: 1170px;
    margin: 0 auto;
    height: 50px;
}

/* 外层容器：真站 .user-section = 460px，居中 */
.user-section {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 80px 15px 30px;
}

.login-main {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    /* 真站 .login-main 430px 而 #login-form 340px → 左右各 45px 内边距 */
    padding: 20px 45px 25px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* ---- 顶部 登录 / 注册 两个 tab ---- */
.login-tabs {
    list-style: none;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 24px;
}

.login-tabs li {
    font-size: 16px;
    color: #999;
}

.login-tabs li.active {
    color: #444c69;
    font-weight: 600;
}

.login-tabs a {
    color: #999;
    text-decoration: none;
}

.login-tabs a:hover {
    color: #444c69;
}

/* ---- 错误提示：真站用 Bootstrap .alert，放在表单上方 ---- */
.alert {
    margin: 0 0 15px;
    padding: 10px 12px;
    background: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    color: #a94442;
    font-size: 13px;
    word-break: break-all;
}

.form-group {
    margin-bottom: 15px;
}

.form-group > label {
    display: block;
    font-size: 14px;
    color: #616161;
    margin-bottom: 5px;
    font-weight: normal;
}

/* 输入框：340x33 / 13px / 0 圆角 / #d2d6de 边框 */
.form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 33px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.42857143;
    color: #555;
    background: #fff;
    border: 1px solid #d2d6de;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus {
    border-color: #444c69;
    box-shadow: 0 0 0 2px rgba(68, 76, 105, .12);
}

/* ---- 保持会话 + 忘记密码 同一行 ---- */
.keep-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.keep-row .keep {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #616161;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.keep-row .keep input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0 6px 0 0;
    vertical-align: middle;
}

.keep-row .forget {
    font-size: 14px;
    color: #3c8dbc;
    text-decoration: none;
}

.keep-row .forget:hover {
    text-decoration: underline;
}

/* ---- 提交按钮：340x43 / 16px / radius 5px / #444C69 ---- */
.btn-login {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 43px;
    padding: 0 12px;
    font-size: 16px;
    font-family: inherit;
    line-height: 43px;
    color: #fff;
    background-color: #444c69;
    border: 1px solid #444c69;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.btn-login:hover {
    background-color: #3a415c;
    border-color: #3a415c;
}

.btn-login:disabled {
    cursor: not-allowed;
}

.to-register {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.to-register a {
    color: #3c8dbc;
    text-decoration: none;
}

.to-register a:hover {
    text-decoration: underline;
}

/* ---------- 移动端 ---------- */
@media (max-width: 767px) {
    .user-section {
        padding: 70px 12px 24px;
        max-width: 100%;
    }

    .login-main {
        max-width: 100%;
        padding: 16px 16px 20px;
    }

    .login-tabs {
        gap: 18px;
        margin-bottom: 14px;
    }

    .login-tabs li {
        font-size: 15px;
    }
}
