/* ============================================================
   长龙压位 —— 登录页样式（独立于后台布局，仅登录页使用）
   主色沿用 logo 橙色 #e8500f
   ============================================================ */

:root {
    --brand: #e8500f;
    --brand-dark: #c94409;
    --brand-light: #fdeee6;
    --text-main: #1f2933;
    --text-sub: #6b7784;
    --line: #e6e9ef;
    --bg-card: #ffffff;
    --danger: #d93f3f;
    --warn: #b7791f;
}

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

html, body { height: 100%; }

.login-body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background: #f4f6f9;
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    display: flex;
    min-height: 100vh;
}

/* ---------- 左侧品牌区 ---------- */
.login-brand {
    width: 46%;
    min-width: 380px;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(150deg, #f26a1b 0%, var(--brand) 45%, var(--brand-dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
}

.login-brand::before {
    content: "";
    position: absolute;
    left: -100px;
    top: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

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

.brand-logo {
    height: 56px;
    display: block;
    margin-bottom: 28px;
    filter: brightness(0) invert(1);
}

.brand-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
}

.brand-en {
    margin-top: 8px;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}

.brand-points {
    list-style: none;
    position: relative;
    z-index: 1;
    margin: 40px 0 auto;
}

.brand-points li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, .95);
}

.brand-points li + li { border-top: 1px solid rgba(255, 255, 255, .16); }

.brand-points i {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    font-size: 15px;
    flex: 0 0 auto;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, .78);
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ---------- 右侧登录区 ---------- */
.login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 396px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 36px 34px 32px;
    box-shadow: 0 18px 50px rgba(24, 39, 59, .10);
    border: 1px solid var(--line);
}

.card-head { text-align: center; margin-bottom: 22px; }

.card-logo {
    height: 40px;
    margin: 0 auto 18px;
    display: block;
}

.login-title {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
}

.login-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-sub);
}

/* ---------- 提示条 ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.alert i { margin-top: 3px; flex: 0 0 auto; }

.alert-err {
    background: #fdeaea;
    border: 1px solid #f6c9c9;
    color: var(--danger);
}

.alert-warn {
    background: #fef6e7;
    border: 1px solid #f5dcaa;
    color: var(--warn);
}

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 16px; }

.field-label {
    display: block;
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 7px;
}

.field-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfc;
    transition: border-color .16s, box-shadow .16s, background .16s;
}

.field-input:focus-within {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232, 80, 15, .12);
}

.field-input i { color: #a3adb8; font-size: 14px; width: 16px; text-align: center; }

.field-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-main);
    height: 100%;
}

.field-input input::placeholder { color: #b3bcc6; }

.pwd-toggle {
    border: 0;
    background: transparent;
    color: #a3adb8;
    cursor: pointer;
    padding: 4px 2px;
    line-height: 1;
}

.pwd-toggle:hover { color: var(--brand); }

/* ---------- 登录按钮 ---------- */
.login-btn {
    width: 100%;
    height: 46px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s, box-shadow .16s, filter .16s;
    box-shadow: 0 8px 20px rgba(232, 80, 15, .26);
}

.login-btn:hover { filter: brightness(1.04); }
.login-btn:active { transform: translateY(1px); }

.login-btn .btn-normal,
.login-btn .btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn .btn-loading { display: none; }

.login-btn.htmx-request .btn-normal { display: none; }
.login-btn.htmx-request .btn-loading { display: flex; }

.login-copyright {
    margin-top: 26px;
    font-size: 12px;
    color: #9aa5b1;
    text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .login-shell { flex-direction: column; }

    .login-brand {
        width: 100%;
        min-width: 0;
        padding: 32px 28px 28px;
        gap: 16px;
    }

    .brand-logo { height: 44px; margin-bottom: 18px; }
    .brand-name { font-size: 24px; }
    .brand-points { display: none; }
    .brand-footer { margin-top: 12px; }

    .login-main { padding: 26px 18px 40px; }

    .login-card {
        padding: 26px 22px 24px;
        border-radius: 14px;
        box-shadow: 0 10px 28px rgba(24, 39, 59, .08);
    }
}
