/* 登录页 / 注册页公共样式
   与后台内部页面（数据看板、用户管理等）同一套颜色与质感：
   深墨蓝左侧栏、白色内容区、1px 细边框、直角小圆角。 */

:root {
    --auth-bg: #eef1f5;
    --auth-sidebar: #1b2330;
    --auth-border: #d8dde3;
    --auth-primary: #2c4a6e;
    --auth-primary-hover: #223a57;
    --auth-text: #24292f;
    --auth-muted: #6b7480;
    --auth-danger: #a33d3d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background-color: var(--auth-bg);
    color: var(--auth-text);
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
}

.login-container {
    display: flex;
    width: 920px;
    max-width: 100%;
    min-height: 540px;
    background-color: #ffffff;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(20, 28, 38, 0.1);
}

/* ========== 左侧信息面板 ========== */
.login-left {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 44px;
    background-color: var(--auth-sidebar);
    border-right: 1px solid #111825;
    color: #ffffff;
}

.login-left .ai-badge {
    width: 44px;
    height: 44px;
    padding: 8px;
    margin-bottom: 24px;
    background-color: #2c3854;
    border-radius: 4px;
    object-fit: contain;
}

.login-left .title {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.login-left .subtitle {
    margin-bottom: 32px;
    color: #9aa4b2;
    font-size: 13px;
    line-height: 1.8;
}

.login-left .features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
}

.login-left .features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #b9c2cf;
    font-size: 13px;
    line-height: 1.6;
}

.login-left .features li::before {
    content: "";
    flex-shrink: 0;
    width: 4px;
    height: 4px;
    margin-top: 8px;
    background-color: #4a6b8f;
}

.login-meta {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid #2a3344;
    color: #7c8695;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* ========== 右侧表单面板 ========== */
.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 48px 52px;
    background-color: #ffffff;
}

.login-right .panel-title {
    color: var(--auth-text);
    font-size: 20px;
    font-weight: 600;
}

.login-right .panel-subtitle {
    margin: 8px 0 30px;
    color: var(--auth-muted);
    font-size: 13px;
}

/* 表单 */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 500;
}

.form-group label .required {
    margin-right: 4px;
    color: var(--auth-danger);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--auth-border);
    border-radius: 3px;
    background-color: #ffffff;
    color: var(--auth-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input-wrapper input::placeholder {
    color: #a4acb6;
}

.input-wrapper input:focus {
    border-color: var(--auth-primary);
}

.input-wrapper input[aria-invalid="true"] {
    border-color: var(--auth-danger);
}

/* 输入框下的小红字提示（默认隐藏） */
.field-error {
    margin-top: 6px;
    color: var(--auth-danger);
    font-size: 12px;
    line-height: 1.5;
}

.field-error[hidden] {
    display: none;
}

/* 记住账号 / 注册 / 忘记密码 */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 24px;
}

.form-options .remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-muted);
    font-size: 13px;
    cursor: pointer;
}

.form-options .remember input[type="checkbox"] {
    accent-color: var(--auth-primary);
}

.form-options-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-options-right .cut {
    color: var(--auth-border);
}

.form-options a {
    color: var(--auth-primary);
    font-size: 13px;
    text-decoration: none;
}

.form-options a:hover {
    text-decoration: underline;
}

/* 提交按钮 */
.btn-login {
    width: 100%;
    height: 42px;
    border: 1px solid var(--auth-primary);
    border-radius: 3px;
    background-color: var(--auth-primary);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-login:hover:not([disabled]) {
    background-color: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
}

.btn-login[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 页脚 */
.footer {
    margin-top: 18px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.footer span {
    margin: 0 6px;
}

.footer a {
    color: var(--auth-primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ========== 响应式 ========== */
@media (max-width: 780px) {
    .login-container {
        flex-direction: column;
        min-height: 0;
    }

    .login-left {
        flex: none;
        padding: 28px 24px;
        border-right: none;
        border-bottom: 1px solid #111825;
    }

    .login-left .features,
    .login-meta {
        display: none;
    }

    .login-left .subtitle {
        margin-bottom: 0;
    }

    .login-right {
        padding: 28px 24px;
    }
}

/* 忘记密码提示 */
.login-hint {
    margin: -10px 0 20px;
    padding: 8px 12px;
    border-left: 3px solid var(--auth-primary);
    background-color: #f5f7fb;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.7;
}

.login-hint[hidden] {
    display: none;
}
/* 轻提示（与后台内部页的 .toast 一致，登录/注册用） */
.toast {
    position: fixed;
    top: 28px;
    left: 50%;
    z-index: 200;
    max-width: 420px;
    padding: 10px 18px;
    transform: translate(-50%, -6px);
    background-color: #ffffff;
    border: 1px solid var(--auth-border);
    border-left: 3px solid var(--auth-primary);
    border-radius: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    color: var(--auth-text);
    font-size: 13px;
    line-height: 1.6;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.toast[hidden] {
    display: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast--success {
    border-left-color: #2f7d4f;
}

.toast--error {
    border-left-color: var(--auth-danger);
}
/* 备案号链接 */
.footer .icp-link {
    color: var(--auth-muted);
    text-decoration: none;
}

.footer .icp-link:hover {
    text-decoration: underline;
}
.footer-icp {
    margin-top: 4px;
}

.icp-link {
    white-space: nowrap;
}