/**
 * 宝武VPN登录页样式
 * 兼容 IE9+
 */

/* Reset */
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* HTML5 元素 IE8 兼容 */
header, main {
    display: block;
}

html,
body {
    height: 100%;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #eef4ff;
    min-height: 100%;
    min-height: 100vh;
}

/* 页面容器 - 使用 flex 实现垂直居中，IE 降级为 padding */
.page-wrapper {
    min-height: 100%;
    height: auto;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    padding: 70px 20px 50px;
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* 顶部Logo */
.header {
    position: absolute;
    top: 24px;
    left: 24px;
    margin-bottom: 0;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo-img {
    display: block;
    height: 36px;
    width: auto;
}

/* 主卡片 - 容器（比例在左侧安全指引区实现） */
.main-card {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    zoom: 1;
}

.main-card:after {
    content: "";
    display: table;
    clear: both;
}

.main-card-inner {
    width: 100%;
    display: table;
    table-layout: fixed;
}

/* 左侧面板 - 以宽度 720 为基准保持 4:3（IE9 兼容） */
.card-left {
    width: 720px;
    display: table-cell;
    vertical-align: top;
    background: #1848c4 url(../img/login-bg.png) no-repeat center;
    background-size: cover;
    position: relative;
}

.card-left:before {
    content: "";
    display: block;
    padding-top: 87.5%;
}

.card-left-inner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 68px 44px 36px 44px;
    z-index: 1;
}

/* 安全指引上下两段间距 */
.guide-section {
    margin-bottom: 68px;
}

.guide-section:last-child {
    margin-bottom: 0;
}

/* 第一段：标题居中、正白，内容浅白 */
.guide-section-top .guide-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 28px;
    line-height: 1.4;
}

.guide-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 10px;
}

.guide-section-top .guide-content {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 2;
    margin-bottom: 0;
}

/* 第二段：深蓝透明背景，浅白文字 */
.guide-section-bottom {
    background: rgba(8, 59, 125, 0.4);
    padding: 28px 24px;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    margin-top: 8px;
}

.guide-subtitle {
    font-size: 19px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.guide-steps p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 2;
    margin-bottom: 12px;
}

.guide-steps p:last-child {
    margin-bottom: 0;
}

/* 右侧面板 - 占满剩余空间，高度与左侧一致 */
.card-right {
    width: auto;
    display: table-cell;
    vertical-align: top;
    padding: 64px 40px 18px;
    overflow-y: auto;
    overflow-x: hidden;
}

.login-form-wrap {
    max-width: 100%;
}

/* 登录标题：欢迎登录灰色，宝武VPN深色对比 */
.login-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
}

.login-title-gray {
    color: #999;
    font-weight: normal;
}

.login-title-accent {
    color: #1a1a1a;
}


/* Tab栏 */
.tab-bar {
    margin-bottom: 24px;
}

.tab-item {
    display: inline-block;
    padding: 0 0 8px;
    margin-right: 32px;
    font-size: 14px;
    color: #999;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tab-item:hover {
    color: #666;
}

.tab-item.active {
    color: #1a1a1a;
    font-weight: bold;
    border-bottom-color: #1848c4;
}

/* 表单 */
.login-form {
    width: 100%;
}

.global-error {
    margin: 0 0 12px;
    font-size: 12px;
    color: #f5222d;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 16px;
}

.form-group .input-icon {
    position: absolute;
    left: 14px;
    top: 10px;
    margin-top: 0;
    width: 20px;
    height: 20px;
    display: block;
}

.form-group .input-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 44px;
    border: none;
    border-bottom: 1px solid #dcdfe6;
    border-radius: 0;
    font-size: 14px;
    color: #333;
    background: transparent;
}

.form-input:focus {
    outline: none;
    border-bottom-color: #1848c4;
}

.form-input::-webkit-input-placeholder {
    color: #c0c4cc;
}

.form-input::-moz-placeholder {
    color: #c0c4cc;
}

.form-input:-ms-input-placeholder {
    color: #c0c4cc;
}

.form-input::placeholder {
    color: #c0c4cc;
}

/* 表单校验错误样式 */
.form-input-error {
    border-bottom-color: #f5222d !important;
}

.field-error {
    position: absolute;
    left: 44px;
    bottom: -8px;
    font-size: 12px;
    color: #f5222d;
}

/* 短信验证码输入框 */
.form-group .btn-sms-code {
    position: absolute;
    right: 8px;
    top: 10px;
    margin-top: 0;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    color: #1848c4;
    background: transparent;
    border: none;
    cursor: pointer;
}

.form-group .btn-sms-code:hover {
    color: #2f7cff;
}

/* 验证码输入框 - 右侧显示验证码和刷新按钮 */
.form-group.form-group-captcha .form-input {
    padding-right: 120px;
}

.form-group.form-group-captcha .captcha-display {
    position: absolute;
    right: 52px;
    top: 10px;
    margin-top: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    letter-spacing: 2px;
}

.form-group.form-group-captcha .btn-refresh-captcha {
    position: absolute;
    right: 12px;
    top: 10px;
    margin-top: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.form-group.form-group-captcha .btn-refresh-captcha img {
    width: 100%;
    height: 100%;
    display: block;
}

.form-group.form-group-captcha .btn-refresh-captcha:hover img {
    opacity: 0.8;
}

.form-group.form-group-captcha img#numImg {
    cursor: pointer;
}

.icon-checked {
    display: none;
}

/* 短信登录码输入框 - 获取短信登录码按钮 */
.form-group.form-group-sms .form-input {
    padding-right: 130px;
}

.form-group .btn-sms-code {
    font-size: 12px;
}

.form-group.form-group-sms .btn-sms-code {
    padding: 0 10px;
    white-space: nowrap;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    height: 44px;
    margin-top: 12px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: #1561C4;
    border: none;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    cursor: pointer;
}

.btn-login:hover {
    background: #1a6fd4;
}

.btn-login:active {
    background: #1254ad;
}

/* 禁用状态的登录按钮（含短信登录） */
.btn-login[disabled],
.btn-login[disabled]:hover,
.btn-login[disabled]:active {
    background: #c0c4cc;
    cursor: not-allowed;
}

/* 响应式 - 窄屏时左右堆叠（避免两栏过窄） */
@media screen and (max-width: 820px) {
    .main-card {
        height: auto;
    }

    .main-card-inner {
        display: block;
    }

    .card-left,
    .card-right {
        width: 100%;
        height: auto;
        display: block;
    }

    .card-left {
        min-height: auto;
    }

    .card-left:before {
        display: none;
    }

    .card-right {
        min-height: auto;
        padding: 32px 18px;
    }

    .card-left-inner {
        position: static;
        padding: 68px 28px;
    }

    .guide-section-bottom {
        padding: 24px 20px;
    }
}

/* 高度适配：视口变矮时压缩留白 */
@media screen and (max-height: 860px) {
    .page-wrapper {
        padding: 64px 16px 40px;
    }

    .header {
        top: 16px;
        left: 16px;
    }

    .card-right {
        padding-top: 56px;
        padding-bottom: 18px;
    }

    .card-left-inner {
        padding-top: 68px;
    }
}

@media screen and (max-height: 780px) {
    .page-wrapper {
        padding: 48px 12px 28px;
    }

    .header {
        top: 12px;
        left: 12px;
    }

    .login-title {
        margin-bottom: 24px;
    }

    .tab-bar {
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .card-right {
        padding-top: 48px;
        padding-left: 36px;
        padding-right: 36px;
        padding-bottom: 18px;
    }

    .card-left-inner {
        padding-top: 68px;
        padding-right: 36px;
        padding-left: 36px;
        padding-bottom: 28px;
    }

    .guide-section {
        margin-bottom: 68px;
    }
}

/* 小于 720px：允许页面出现上下滚动条 */
@media screen and (max-height: 719px) {
    .page-wrapper {
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}
