/* ========== 登录页专用样式（2026-08 二代 MVC 版） ==========
   独立于 Cube.css 的登录页样式，供 Login.cshtml / MLogin.cshtml 加载（@res/cube-login.css）。
   设计语言：延续 ACE 主题主色 #2b7dbc，卡片白底、圆角、柔和阴影。
   与 API 版参考（Doc/UI设计/登录页-API版.html）保持一致，但仅覆盖 MVC 版功能：
   密码登录 + 用户名注册 + 第三方登录，无手机/邮箱验证码、无忘记密码。 */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #3a3f44;
    background: linear-gradient(160deg, #eef4fb 0%, #f0f2f5 45%, #e8eef6 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 16px;
}

/* 登录提示条（对应 LoginTip，可关闭） */
.login-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff8e6;
    border-bottom: 1px solid #f0e3b5;
    color: #8a6d3b;
    font-size: 13px;
    line-height: 40px;
    text-align: center;
    padding: 0 48px;
}
.login-tip .close-tip {
    position: absolute;
    right: 16px;
    top: 0;
    color: #b8a25e;
    cursor: pointer;
    font-size: 16px;
}

.login-wrapper { width: 100%; max-width: 440px; margin: 0 auto; }

/* ========== 登录卡片 ========== */
.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(43, 125, 188, .12), 0 2px 8px rgba(0, 0, 0, .06);
    overflow: hidden;
}

/* 品牌区 */
.brand {
    padding: 34px 32px 10px;
    text-align: center;
}
.brand-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2b7dbc, #1f5f8e);
    color: #fff;
    font-size: 34px;
    line-height: 64px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(43, 125, 188, .35);
    overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; }
.brand h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #262a2e;
}
.brand p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #999;
}

/* ========== Tab 切换（登录 / 注册） ========== */
.login-tabs {
    display: flex;
    margin: 22px 40px 0;
    border-bottom: 1px solid #eef1f4;
}
.login-tabs a {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #7a8087;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
    cursor: pointer;
}
.login-tabs a:hover { color: #2b7dbc; }
.login-tabs a.active {
    color: #2b7dbc;
    font-weight: 700;
    border-bottom-color: #2b7dbc;
}

/* ========== 面板 ========== */
/* 底部保留内边距，避免注册提交按钮紧贴卡片下沿 */
.tab-content .tab-pane { display: none; padding: 24px 40px 28px; }
/* Bootstrap .fade 默认 opacity:0（需 .in 才显示），Tab 切换仅加 .active 控制 display，
   故 .active 时必须强制 opacity:1，否则注册面板透明不可见 */
.tab-content .tab-pane.active { display: block; opacity: 1; }

/* 输入框：左侧图标 + 圆角 */
.cube-login .form-group { margin-bottom: 18px; position: relative; }
.input-icon { position: relative; }
.input-icon > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a8b3bf;
    font-size: 15px;
    transition: color .2s;
    pointer-events: none;
    z-index: 2;
}
.input-icon .form-control {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 40px;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    font-size: 14px;
    color: #3a3f44;
    background: #fafbfc;
    outline: none;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-icon .form-control:focus {
    border-color: #2b7dbc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 125, 188, .12);
}
.input-icon .form-control::placeholder { color: #b0b8c2; }

/* 密码可见切换 */
.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a8b3bf;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    z-index: 2;
}
.pwd-toggle:hover { color: #2b7dbc; }
.input-icon .form-control.has-toggle { padding-right: 40px; }

/* 记住我 + 协议链接 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}
.checkbox-custom {
    display: inline-flex;
    align-items: center;
    color: #6a6f75;
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.checkbox-custom input { display: none; }
.checkbox-custom .box {
    width: 16px;
    height: 16px;
    border: 1px solid #c6ced8;
    border-radius: 4px;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    background: #fff;
    transition: all .2s;
}
.checkbox-custom input:checked + .box {
    background: #2b7dbc;
    border-color: #2b7dbc;
}
.checkbox-custom input:checked + .box:after {
    content: "\f00c";
    font-family: FontAwesome;
}
.forgot-link {
    color: #2b7dbc;
    text-decoration: none;
    cursor: pointer;
}
.forgot-link:hover { text-decoration: underline; }

/* 主按钮 */
.btn-login {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #2b7dbc, #1f5f8e);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(43, 125, 188, .3);
    transition: all .2s;
    display: inline-block;
    line-height: 44px;
    text-align: center;
    text-decoration: none;
}
.btn-login:hover {
    box-shadow: 0 6px 16px rgba(43, 125, 188, .42);
    transform: translateY(-1px);
    color: #fff;
}
.btn-login:active { transform: translateY(0); }

/* 表单提示 */
.form-tip {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: -6px 0 14px;
}

/* 密码强度 / 字段校验提示 */
.field-tip {
    font-size: 12px;
    line-height: 1.6;
    margin: 6px 0 0;
    display: none;
}
.field-tip.show { display: block; }
.field-tip.ok { color: #3aa76d; }
.field-tip.error { color: #e14b4b; }
.input-icon input.error { border-color: #e14b4b; }
.input-icon input.ok { border-color: #3aa76d; }

/* ========== 第三方登录 ========== */
.third-party { padding: 22px 40px 30px; }
.divider {
    display: flex;
    align-items: center;
    color: #b0b8c2;
    font-size: 12px;
    margin-bottom: 18px;
}
.divider:before, .divider:after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eef1f4;
}
.divider span { padding: 0 14px; }

.oauth-icons {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.oauth-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    transition: transform .2s, box-shadow .2s;
}
.oauth-icon:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
}
.oauth-icon img { width: 100%; height: 100%; }
.oauth-icon i { color: #7a8087; font-size: 18px; }

/* ========== 页脚 ========== */
.login-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: #9aa5b1;
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .tab-content .tab-pane { padding: 20px 24px 24px; }
    .third-party { padding: 18px 24px 24px; }
    .brand { padding: 28px 20px 6px; }
    .login-tabs { margin: 18px 24px 0; }
    .oauth-icons { gap: 12px; }
    .login-tip { padding: 0 40px; line-height: 34px; font-size: 12px; }
}
