/* ========== new898 登录页 - 深色主题 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #1e2a3a;
    min-height: 100vh;
    overflow: hidden;
}

:root {
    --bg-deep:    #1e2a3a;
    --bg-panel:   #2a3a52;
    --bg-panel-2: #25334a;
    --border:     #34466a;
    --text:       #e8edf5;
    --text-muted: #9aa8be;
    --text-dim:   #6b7a93;
    --accent:     #4a8af4;
    --danger:     #ff4d4f;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===== 左侧品牌区 ===== */
.login-brand {
    flex: 1;
    background: linear-gradient(135deg, #1a2535 0%, #2a3a52 50%, #1a2535 100%);
    color: #fff;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 138, 244, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(82, 196, 26, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ff4d4f, #d4380d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(255, 77, 79, 0.3);
    font-size: 30px;
    font-weight: 800;
    color: #fff;
}

.brand-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a8d0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.brand-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 50px;
    letter-spacing: 1px;
}

.brand-features {
    list-style: none;
    margin-top: 30px;
}

.brand-features li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-features li i {
    color: #52c41a;
    font-size: 16px;
}

.brand-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* ===== 右侧登录表单 ===== */
.login-form-wrapper {
    width: 480px;
    background: var(--bg-deep);
    padding: 50px 50px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-left: 1px solid var(--border);
}

.login-form {
    width: 100%;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 26px;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 6px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 13px;
}

.form-group {
    margin-bottom: 18px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0 12px;
    background: var(--bg-panel);
    transition: all 0.25s;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    background: var(--bg-panel-2);
    box-shadow: 0 0 0 3px rgba(74, 138, 244, 0.15);
}

.input-wrapper.error {
    border-color: var(--danger);
    background: rgba(255, 77, 79, 0.08);
}

.input-wrapper i.fa-user,
.input-wrapper i.fa-lock,
.input-wrapper i.fa-shield {
    color: var(--text-dim);
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 10px;
    font-size: 14px;
    color: var(--text);
}

.input-wrapper input::placeholder {
    color: var(--text-dim);
}

.toggle-password {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.toggle-password:hover { color: var(--accent); }

.captcha-wrapper { padding-right: 4px; }

.captcha-box {
    width: 100px;
    height: 36px;
    background: linear-gradient(135deg, #2a3a52 0%, #1e2a3a 100%);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #4a8af4;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.captcha-box:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(74, 138, 244, 0.2);
}

.captcha-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, transparent 48%, rgba(74, 138, 244, 0.2) 49%, rgba(74, 138, 244, 0.2) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 77, 79, 0.2) 49%, rgba(255, 77, 79, 0.2) 51%, transparent 52%);
    background-size: 20px 20px;
    pointer-events: none;
}

#captchaText {
    position: relative;
    z-index: 1;
    font-style: italic;
    transform: skewX(-8deg);
}

.error-msg {
    display: block;
    color: var(--danger);
    font-size: 11px;
    margin-top: 4px;
    min-height: 14px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    margin-top: 6px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--text-muted);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--accent);
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.forgot-link:hover { color: #69a7ff; text-decoration: underline; }

.btn-login {
    width: 100%;
    height: 42px;
    background: linear-gradient(135deg, var(--accent) 0%, #1d39c4 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(74, 138, 244, 0.3);
    margin-top: 4px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(74, 138, 244, 0.4);
}

.btn-login:active { transform: translateY(0); }

.btn-login.loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-login.loading .btn-text::after {
    content: '...';
    animation: dots 1.2s steps(4) infinite;
    display: inline-block;
    width: 16px;
    text-align: left;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.form-tip {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(74, 138, 244, 0.1);
    border: 1px solid rgba(74, 138, 244, 0.3);
    border-radius: 4px;
    color: #69a7ff;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--text-dim);
    font-size: 11px;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
}

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

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-panel);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    font-size: 13px;
    color: var(--text);
    z-index: 9999;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
    border-left: 4px solid var(--accent);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-left-color: #52c41a; }
.toast.error   { border-left-color: var(--danger); }
.toast.warn    { border-left-color: #ffc53d; }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
    .login-brand { display: none; }
    .login-form-wrapper {
        width: 100%;
        padding: 40px 30px;
    }
}
