/* ==========================================
   认证页面共享样式 - 登录 / 注册 / 找回密码
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    background: linear-gradient(135deg, #1a3a6c 0%, #236DBD 40%, #0b77bf 100%);
    position: relative;
    overflow: hidden;
}

/* 背景装饰圆 */
body::before,
body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: #fff;
}

body::before {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
}

body::after {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -100px;
}

/* ====== 登录卡片 ====== */
.auth-card {
    width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 48px 40px 36px;
    position: relative;
    z-index: 1;
    animation: cardIn 0.6s ease-out;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 顶部标题区 */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #236DBD, #0b77bf);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.auth-desc {
    font-size: 14px;
    color: #999;
}

/* ====== 表单区域 ====== */
.auth-card .layui-form {
    width: 100% !important;
    margin: 0 !important;
}

.auth-card .layui-form-item {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

.auth-card .layui-form-item:last-child {
    margin-bottom: 0 !important;
}

/* 输入框容器 */
.auth-input-box {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #f8fafc;
    transition: all 0.3s;
    overflow: hidden;
}

.auth-input-box:focus-within {
    border-color: #236DBD;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(35, 109, 189, 0.1);
}

.auth-input-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    flex-shrink: 0;
    transition: color 0.3s;
}

.auth-input-box:focus-within .auth-input-icon {
    color: #236DBD;
}

.auth-input-box .layui-input {
    flex: 1;
    height: 44px !important;
    line-height: 44px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 12px 0 0 !important;
    font-size: 14px;
    border-radius: 0 !important;
}

.auth-input-box .layui-input:focus {
    box-shadow: none !important;
}

/* 密码可见切换 */
.auth-pwd-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #bbb;
    transition: color 0.2s;
    flex-shrink: 0;
}

.auth-pwd-toggle:hover {
    color: #236DBD;
}

/* 验证码行 */
.auth-captcha-row {
    display: flex;
    gap: 12px;
}

.auth-captcha-row .auth-input-box {
    flex: 1;
}

.auth-captcha-img {
    width: 120px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e0e6ed;
    cursor: pointer;
    object-fit: cover;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.auth-captcha-img:hover {
    opacity: 0.8;
}

/* 短信验证码按钮 */
.auth-sms-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #236DBD, #0b77bf);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.auth-sms-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(35, 109, 189, 0.3);
}

.auth-sms-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* 辅助文字 */
.auth-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    padding-left: 4px;
}

/* 记住密码 + 链接行 */
.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.auth-options-row .layui-form-checkbox[lay-skin="primary"] {
    margin: 0 !important;
    overflow: visible !important;
}

.auth-options-row .layui-form-checkbox[lay-skin="primary"] span {
    font-size: 13px;
    color: #666;
    padding: 0 !important;
}

.auth-options-row .layui-form-checkbox[lay-skin="primary"] i {
    width: 16px !important;
    height: 16px !important;
}

.auth-link {
    font-size: 13px;
    color: #236DBD;
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-link:hover {
    opacity: 0.7;
    text-decoration: none;
}

/* 提交按钮 */
.auth-btn {
    width: 100%;
    height: 46px !important;
    line-height: 46px !important;
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #236DBD, #0b77bf) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(35, 109, 189, 0.35);
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(35, 109, 189, 0.45);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 底部链接区 */
.auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.auth-footer-links a {
    font-size: 14px;
    color: #236DBD;
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-footer-links a:hover {
    opacity: 0.7;
}

/* 返回按钮 */
.auth-btn-secondary {
    width: 100%;
    height: 46px !important;
    line-height: 46px !important;
    border: 1px solid #dcdfe6 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #666 !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
}

.auth-btn-secondary:hover {
    border-color: #236DBD !important;
    color: #236DBD !important;
}

/* 测试提示 */
.auth-test-hint {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 8px 12px;
    color: #e53e3e;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ====== layui checkbox 样式覆盖 ====== */
.auth-card .layui-form-checked[lay-skin="primary"] i {
    border-color: #236DBD !important;
    background-color: #236DBD !important;
    color: #fff !important;
}

/* ====== 移动端适配 ====== */
@media screen and (max-width: 500px) {
    body {
        padding: 20px 16px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .auth-card {
        width: 100%;
        padding: 32px 24px 28px;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-captcha-img {
        width: 100px;
    }
}

/* ==========================================
   左右布局登录页改造：左侧 login.png 大图 + 右侧登录卡片（logo 在卡片内标题上方）
   仅对 login.html（body.login-page）生效，注册/找回密码页不受影响
   ========================================== */
body.login-page {
    justify-content: flex-end !important;
    padding-right: 7%;
}

/* 左侧：login.png 透明底原图 */
.login-left {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.login-left img {
    width: 600px;
    height: auto;
    display: block;
}

/* 卡片内 logo（位于系统名文字上方） */
.login-logo {
    text-align: center;
    margin-bottom: 16px;
}

.login-logo img {
    height: 56px;
    width: auto;
    display: inline-block;
}

body.login-page .auth-card {
    margin: 0;
}

/* 中屏：隐藏左侧图，登录卡片居中 */
@media screen and (max-width: 1100px) {
    body.login-page {
        justify-content: center !important;
        padding-right: 0;
    }

    .login-left {
        display: none;
    }

    .login-logo img {
        height: 44px;
    }
}
