*,
*::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:
        linear-gradient(90deg, rgba(8, 10, 14, 0.78) 0%, rgba(8, 10, 14, 0.45) 42%, rgba(8, 10, 14, 0.55) 100%),
        linear-gradient(180deg, rgba(8, 10, 14, 0.35) 0%, transparent 35%, rgba(8, 10, 14, 0.65) 100%);
}

.login-glow {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -40px;
    height: 180px;
    background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.45) 0%, rgba(34, 197, 94, 0.12) 35%, transparent 70%);
    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: linear-gradient(145deg, #4ade80, #16a34a);
    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;
    }
}
