:root {
    --login-ink: #1f2d3d;
    --login-ink-soft: #4a5a6a;
    --login-accent: #1c83c6;
    --login-accent-deep: #176fa8;
    --login-surface: #9fc9db;
    --login-card: #ffffff;
    --login-line: #c5d8e6;
    --login-muted: #6a8496;
    --login-danger: #ed5565;
    --login-font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
    --login-font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
    height: 100%;
}

body.login {
    min-height: 100%;
    height: auto;
    margin: 0;
    background: var(--login-surface) !important;
    color: var(--login-ink);
    font-family: var(--login-font-body);
    overflow-x: hidden;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 48px;
    box-sizing: border-box;
}

.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.login-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 85% 65% at 50% 35%, rgba(190, 225, 236, 0.95), transparent 60%),
        radial-gradient(ellipse 70% 50% at 12% 18%, rgba(100, 170, 205, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 50% at 88% 80%, rgba(70, 150, 200, 0.4), transparent 55%),
        linear-gradient(160deg, #a8d0e0 0%, #8fbfd6 45%, #6eafd0 100%);
}

.login-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(31, 45, 61, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 45, 61, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    animation: loginFloat 12s ease-in-out infinite;
}

.login-bg-orb-a {
    width: 340px;
    height: 340px;
    left: -80px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(80, 170, 215, 0.45), transparent 70%);
}

.login-bg-orb-b {
    width: 280px;
    height: 280px;
    right: -60px;
    top: 8%;
    background: radial-gradient(circle, rgba(40, 140, 200, 0.28), transparent 70%);
    animation-delay: -4s;
}

.login-bg-line {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: rotate(-6deg);
    animation: loginLine 8s ease-in-out infinite alternate;
}

@keyframes loginFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@keyframes loginLine {
    from { opacity: 0.35; transform: rotate(-6deg) translateY(0); }
    to { opacity: 0.7; transform: rotate(-6deg) translateY(-8px); }
}

@keyframes loginRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    animation: loginRise 0.7s ease-out both;
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
    animation: loginRise 0.8s ease-out 0.08s both;
}

.login-brand-mark {
    display: inline-block;
    font-family: var(--login-font-display);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--login-ink);
    line-height: 1.2;
    margin: 0;
    padding-left: 0.18em;
}

.login-card {
    background: var(--login-card);
    border: 1px solid rgba(31, 45, 61, 0.08);
    border-radius: 4px;
    padding: 32px 32px 28px;
    box-shadow: 0 12px 40px rgba(31, 45, 61, 0.08);
    animation: loginRise 0.85s ease-out 0.16s both;
}

.login-card-head {
    margin-bottom: 22px;
}

.login-card-head h2 {
    margin: 0 0 6px;
    font-family: var(--login-font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--login-ink);
}

.login-card-head p {
    margin: 0;
    font-size: 13px;
    color: var(--login-muted);
}

.login-field {
    margin-bottom: 16px;
}

.login-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--login-ink-soft);
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > i {
    position: absolute;
    left: 12px;
    top: 50%;
    margin-top: -7px;
    width: 14px;
    text-align: center;
    color: var(--login-muted);
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
}

.login-panel .form-control,
.login-card .form-control {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--login-line);
    border-radius: 3px;
    background: #fff;
    color: var(--login-ink);
    box-shadow: none;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card .form-control:focus {
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(28, 131, 198, 0.18);
    outline: none;
}

.login-card .form-control::placeholder {
    color: #8aa0b0;
}

.login-captcha-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.login-captcha-input {
    flex: 1 1 auto;
    min-width: 0;
}

.login-captcha-img {
    flex: 0 0 118px;
}

.login-captcha-img label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    height: 19px;
}

.login-captcha-link {
    display: block;
    height: 42px;
    border: 1px solid var(--login-line);
    border-radius: 3px;
    overflow: hidden;
    background: #f3f8fc;
    transition: border-color 0.2s ease;
}

.login-captcha-link:hover {
    border-color: var(--login-accent);
}

.login-captcha-link img {
    display: block;
    width: 100%;
    height: 40px;
    object-fit: cover;
}

.login-options {
    margin: 4px 0 18px;
}

.checkbox-custom {
    position: relative;
    padding: 0 0 0 26px;
    margin: 0;
    display: inline-block;
}

.checkbox-custom input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    z-index: 2;
    margin: -6px 0 0 0;
    top: 50%;
    left: 3px;
}

.checkbox-custom label:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -9px;
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 2px;
    border: 1px solid var(--login-line);
    background: #fff;
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    position: absolute;
    display: inline-block;
    font-family: 'FontAwesome';
    content: "\f00c";
    top: 50%;
    left: 2px;
    margin-top: -6px;
    font-size: 11px;
    line-height: 1;
    color: var(--login-accent);
}

.checkbox-custom label {
    cursor: pointer;
    line-height: 1.4;
    font-weight: normal;
    margin-bottom: 0;
    text-align: left;
    color: var(--login-ink-soft);
    font-size: 13px;
}

.login-submit,
.btn.login-submit,
.btn-primary.login-submit {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0;
    border: 1px solid #176fa8 !important;
    border-radius: 3px;
    background-color: #1c83c6 !important;
    background-image: none !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
    box-shadow: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.login-submit:hover,
.login-submit:focus,
.btn.login-submit:hover,
.btn.login-submit:focus,
.btn-primary.login-submit:hover,
.btn-primary.login-submit:focus {
    background-color: #176fa8 !important;
    border-color: #145f90 !important;
    color: #fff !important;
}

.login-submit:active,
.btn.login-submit:active,
.btn-primary.login-submit:active {
    background-color: #145f90 !important;
    border-color: #114f78 !important;
    transform: translateY(1px);
}

.login-footer-note {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--login-muted);
    letter-spacing: 0.04em;
    animation: loginRise 0.9s ease-out 0.24s both;
}

.layui-layer-content {
    color: #676a6c;
}

@media screen and (max-width: 480px) {
    .login-page {
        padding: 28px 16px 36px;
        align-items: flex-start;
        padding-top: 48px;
    }

    .login-brand-mark {
        font-size: 34px;
    }

    .login-card {
        padding: 24px 20px 22px;
    }

    .login-captcha-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .login-captcha-img {
        flex: none;
        width: 100%;
        margin-top: 12px;
    }

    .login-captcha-img label {
        display: none;
    }

    .login-captcha-link,
    .login-captcha-link img {
        height: 44px;
    }
}
