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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: #0a0c10;
    color: #111;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: #0a0c10 center / cover no-repeat;
    z-index: 0;
}

.login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: none;
}

.login-glow {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -40px;
    height: 180px;
    background: none;
    filter: blur(8px);
    pointer-events: none;
    z-index: 1;
}

.login-shell {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 40px;
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.brand-panel {
    color: #fff;
    padding: 24px 12px 24px 8px;
    max-width: 560px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #052e16;
    background: #eef6ff;
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.35);
}

.brand-text strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-text em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.4px;
}

.brand-title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 16px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.brand-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.5px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    justify-self: end;
    background: #fff;
    border-radius: 18px;
    padding: 36px 36px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.card-head h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.card-head p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 22px;
}

.login-mode {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2563eb;
    display: inline-block;
}

.field {
    margin-bottom: 14px;
}

.field .layui-input,
.field input.layui-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field .layui-input:focus,
.field input.layui-input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-wrap {
    position: relative;
}

.input-wrap .layui-input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
}

.toggle-pw:hover {
    color: #374151;
}

.toggle-pw svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    align-items: center;
}

.validateImg {
    width: 120px;
    height: 48px;
    border-radius: 10px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 18px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.remember .keep-login-icon.icon-nocheck,
.remember .keep-login-icon.icon-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    background: #fff;
    flex-shrink: 0;
}

.remember .keep-login-icon.icon-check {
    border-color: #2563eb;
    background: #2563eb;
}

.remember .keep-login-icon.icon-check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.login-btn:hover {
    background: #1d4ed8;
}

.login-btn:active {
    transform: translateY(1px);
}

.agree-row {
    margin-top: 16px;
}

.agree-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.5;
}

.agree-label input {
    margin-top: 2px;
    accent-color: #2563eb;
}

.agree-label .link-agree {
    color: #2563eb;
    text-decoration: none;
}

.agree-label .link-agree:hover {
    text-decoration: underline;
}

.demo {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.footer {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.72);
    width: 100%;
    text-align: center;
    line-height: 1.6;
    padding: 0 16px 18px;
    font-size: 12px;
}

.footer a,
.footer span {
    color: rgba(255, 255, 255, 0.72);
}

.padding-5 {
    padding: 0 6px !important;
}

@media (max-width: 960px) {
    body {
        overflow: auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
        width: min(440px, calc(100% - 32px));
        padding: 32px 0 88px;
        gap: 24px;
    }

    .brand-panel {
        text-align: center;
        max-width: none;
        padding: 8px 0 0;
    }

    .brand-logo {
        justify-content: center;
        margin-bottom: 20px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-desc {
        font-size: 13px;
    }

    .login-card {
        justify-self: center;
        padding: 28px 22px 22px;
    }
}

/* i9 Apple login shell */
.login-page { background: #f5f5f7; color: #1d1d1f; }
.login-bg { opacity: .08; background-color: #f5f5f7; }
.login-bg::after, .login-glow { display: none !important; }
.login-shell { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 72px; width: min(1080px, calc(100% - 64px)); }
.brand-panel { color: #1d1d1f; max-width: 500px; }
.brand-logo { gap: 12px; margin-bottom: 38px; }
.brand-logo-image { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; box-shadow: 0 8px 24px rgba(0, 122, 255, .12); }
.brand-text strong { color: #1d1d1f; font-size: 22px; }
.brand-text em { color: #6e6e73; }
.brand-title { color: #1d1d1f; text-shadow: none; font-size: clamp(30px, 3.2vw, 44px); }
.brand-desc { color: #6e6e73; }
.login-card { border: 1px solid #e5e5ea; border-radius: 16px; box-shadow: 0 18px 48px rgba(29, 29, 31, .1); }
.card-head h1, .login-mode { color: #1d1d1f; }
.login-mode { border-bottom-color: #007aff; }
.field .layui-input, .field input.layui-input { border-color: #e5e5ea; background: #f7f7f9; }
.field .layui-input:focus, .field input.layui-input:focus { border-color: #007aff; box-shadow: 0 0 0 3px rgba(0, 122, 255, .12); }
.login-btn { background: #007aff; box-shadow: 0 8px 18px rgba(0, 122, 255, .2); }
.login-btn:hover { background: #006ee6; }
.footer { color: #8e8e93; }
.footer a, .footer span { color: #6e6e73; }
@media (max-width: 760px) {
    .login-shell { display: flex; flex-direction: column; justify-content: center; gap: 20px; width: min(440px, calc(100% - 32px)); padding: 28px 0 64px; }
    .brand-panel { text-align: center; padding: 0; }
    .brand-logo { justify-content: center; margin-bottom: 16px; }
    .brand-logo-image { width: 64px; height: 64px; border-radius: 14px; }
    .brand-title { font-size: 26px; margin-bottom: 6px; }
    .brand-desc { font-size: 13px; }
    .login-card { max-width: none; padding: 26px 22px 22px; }
}
