/* ============================================
 * scihot 登录页样式 — 借鉴 my_workbench 两栏布局
 * 蓝-紫渐变 #667eea → #764ba2
 * ============================================ */

/* 重置 + 基础 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 表单控件默认不继承字体,显式继承 */
input,
button,
select,
textarea {
    font-family: inherit;
}

/* 页面容器 */
.login-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 左半:渐变 banner */
.login-banner {
    flex: 0 0 40%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
}

.banner-inner {
    text-align: center;
}

.banner-brand {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    margin: 0 0 32px;
    opacity: 0.9;
}

.banner-hero {
    display: block;
    width: 100%;
    max-width: 356px;
    margin: 0 auto 32px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.banner-headline {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 14px;
}

.banner-subtitle {
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* 右半:表单区 */
.login-form-wrap {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: #f8fafc;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 40px;
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* 错误消息条 */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表单 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #94a3b8;
}

/* 显示/隐藏密码 */
.input-group:has(.password-toggle) input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.password-toggle i {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    font-size: 15px;
    color: inherit;
}

/* 隐藏浏览器内置密码 reveal(Edge/Chrome 91+),避免与自定义 eye 叠加 */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button,
input::-webkit-reveal {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

/* 记住我 */
.form-row {
    display: flex;
    align-items: center;
    margin-top: -4px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
}

/* 登录按钮 */
.login-button {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s, transform 0.05s;
}

.login-button:hover:not(:disabled) {
    opacity: 0.92;
}

.login-button:active:not(:disabled) {
    transform: translateY(1px);
}

.login-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 页脚备案 */
.login-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

.login-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
}

.login-footer a:hover {
    color: #64748b;
}

.login-footer .sep {
    margin: 0 6px;
    color: #cbd5e1;
}

.login-footer .beian-gongan {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.login-footer .beian-icon {
    height: 14px;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* ============================================
 * 响应式 — 移动端 <768px
 * ============================================ */
@media (max-width: 768px) {
    .login-page {
        flex-direction: column;
    }

    .login-banner {
        display: none;
    }

    .login-form-wrap {
        flex: 1;
        padding: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .login-card {
        max-width: 100%;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
}