/* static/css/internal/login.css */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
                 "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   布局
   ============================================================ */
.login-page {
    display: flex;
    min-height: 100vh;
}

.brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* 背景装饰:几何图形 */
.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    pointer-events: none;
}
.brand-panel::before { width: 420px; height: 420px; top: -120px; right: -120px; }
.brand-panel::after  { width: 280px; height: 280px; bottom: -80px; left: -80px;  }

.brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.brand-logo {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, .12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    color: #fff;
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -.01em;
}

.brand-subtitle {
    font-size: 16px;
    margin: 0 0 36px;
    opacity: .85;
    letter-spacing: .04em;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    margin-bottom: 14px;
    opacity: .92;
}
.brand-features li svg { opacity: .85; }

/* ============================================================
   表单区
   ============================================================ */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
    min-width: 0;
}

.form-card {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 28px;
}
.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #0f172a;
    letter-spacing: -.01em;
}
.form-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* ============================================================
   表单字段
   ============================================================ */
.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap input {
    width: 100%;
    padding: 11px 38px 11px 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s, box-shadow .15s, background .15s;
    font-family: inherit;
}
.input-wrap input:hover {
    border-color: #cbd5e1;
}
.input-wrap input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input-wrap input::placeholder { color: #94a3b8; }

.input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
    transition: color .15s;
}
.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: #2563eb; }

.toggle-pwd {
    position: absolute;
    right: 6px;
    width: 32px; height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.toggle-pwd:hover { color: #2563eb; background: #f1f5f9; }
.toggle-pwd.active { color: #2563eb; }

/* 大写锁定提示 */
.input-wrap.caps-lock-on::after {
    content: "Caps Lock 已开启";
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #d97706;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
}

/* ============================================================
   选项行
   ============================================================ */
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -2px 0 22px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.checkbox input { display: none; }
.checkbox-box {
    width: 16px; height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    transition: all .15s;
    position: relative;
    flex-shrink: 0;
}
.checkbox input:checked + .checkbox-box {
    background: #2563eb;
    border-color: #2563eb;
}
.checkbox input:checked + .checkbox-box::after {
    content: "";
    position: absolute;
    top: 1px; left: 4px;
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-label { font-size: 13px; color: #64748b; }

.link {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .15s;
}
.link:hover { color: #1d4ed8; text-decoration: underline; }

/* ============================================================
   提交按钮
   ============================================================ */
.btn-submit {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .08s, box-shadow .15s;
    font-family: inherit;
    letter-spacing: .04em;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-submit:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}
.btn-submit:active:not(:disabled) { transform: translateY(1px); }
.btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn-submit.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint {
    margin: 14px 0 0;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

/* ============================================================
   告警条
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================================
   底部
   ============================================================ */
.form-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}
.form-footer .link { margin-left: 4px; }

.copyright {
    margin-top: 28px;
    font-size: 12px;
    color: #cbd5e1;
    text-align: center;
}

/* ============================================================
   响应式:移动端
   ============================================================ */
@media (max-width: 900px) {
    .brand-panel { display: none; }       /* 隐藏左侧品牌区 */
    .form-panel { background: #f1f5f9; }

    .form-card {
        background: #fff;
        padding: 32px 28px;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(15, 23, 42, .06);
    }

    .copyright { margin-top: 20px; }
}

@media (max-width: 480px) {
    .form-panel { padding: 24px 16px; }
    .form-card {
        padding: 28px 22px;
        border-radius: 14px;
    }
    .form-header h2 { font-size: 22px; }
    .brand-title { font-size: 26px; }
}

/* ============================================================
   减少动画(无障碍)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}