﻿:root {
    --hy-bg-0: #04111f;
    --hy-bg-1: #0a2740;
    --hy-bg-2: #0d3d5c;
    --hy-accent: #2ec4b6;
    --hy-accent-2: #3aa0ff;
    --hy-text: #f2f7fb;
    --hy-text-dim: rgba(242, 247, 251, 0.68);
    --hy-panel: rgba(8, 28, 48, 0.58);
    --hy-panel-border: rgba(255, 255, 255, 0.16);
    --hy-input: rgba(255, 255, 255, 0.92);
    --hy-input-text: #16324a;
    --hy-radius: 14px;
    --hy-font-display: "Sora", "Noto Sans SC", sans-serif;
    --hy-font-body: "Noto Sans SC", "Sora", sans-serif;
}

html {
    height: 100%;
}

body.login,
body.fixed-sidebar.full-height-layout.gray-bg.login {
    min-height: 100%;
    height: auto;
    margin: 0;
    color: var(--hy-text);
    font-family: var(--hy-font-body);
    background:
        radial-gradient(1200px 700px at 12% 18%, rgba(46, 196, 182, 0.18), transparent 55%),
        radial-gradient(900px 600px at 88% 82%, rgba(58, 160, 255, 0.16), transparent 50%),
        linear-gradient(145deg, var(--hy-bg-0) 0%, var(--hy-bg-1) 48%, var(--hy-bg-2) 100%) !important;
    background-attachment: fixed;
    overflow-x: hidden;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 48px 40px 0;
    box-sizing: border-box;
}

.login-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.login-grid {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(800px) rotateX(58deg) translateY(-12%);
    transform-origin: center top;
    animation: hy-grid-drift 28s linear infinite;
    opacity: 0.55;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 88%);
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.45;
}

.login-orb--a {
    width: 360px;
    height: 360px;
    left: -80px;
    top: 12%;
    background: radial-gradient(circle, rgba(46, 196, 182, 0.55) 0%, transparent 70%);
    animation: hy-float 12s ease-in-out infinite;
}

.login-orb--b {
    width: 420px;
    height: 420px;
    right: -100px;
    bottom: 8%;
    background: radial-gradient(circle, rgba(58, 160, 255, 0.42) 0%, transparent 70%);
    animation: hy-float 16s ease-in-out infinite reverse;
}

.login-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 120%, rgba(46, 196, 182, 0.18), transparent 70%);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: stretch;
    flex: 1 0 auto;
    align-content: center;
    animation: hy-rise 0.7s ease-out both;
}

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 12px 24px 8px;
}

.login-brand__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border: 1px solid rgba(46, 196, 182, 0.45);
    border-radius: 6px;
    color: var(--hy-accent);
    font-family: var(--hy-font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    margin-bottom: 22px;
    background: rgba(46, 196, 182, 0.08);
}

.login-brand__title {
    margin: 0;
    font-family: var(--hy-font-display);
    font-size: clamp(40px, 5.2vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.02em;
    color: var(--hy-text);
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.login-brand__desc {
    margin: 22px 0 0;
    max-width: 420px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--hy-text-dim);
}

.login-brand__points {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.login-brand__points li {
    position: relative;
    padding-left: 22px;
    color: rgba(242, 247, 251, 0.86);
    font-size: 14px;
    letter-spacing: 0.02em;
}

.login-brand__points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--hy-accent), var(--hy-accent-2));
}

.login-card {
    display: flex;
    align-items: center;
}

.login-form {
    width: 100%;
    padding: 36px 34px 32px;
    border-radius: calc(var(--hy-radius) + 4px);
    background: var(--hy-panel);
    border: 1px solid var(--hy-panel-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 50px rgba(2, 12, 24, 0.35);
    animation: hy-rise 0.85s ease-out 0.08s both;
}

.login-form__head {
    margin-bottom: 26px;
}

.login-form__head h2 {
    margin: 0;
    font-family: var(--hy-font-display);
    font-size: 28px;
    font-weight: 600;
    color: var(--hy-text);
}

.login-form__head p {
    margin: 8px 0 0;
    color: var(--hy-text-dim);
    font-size: 13px;
}

.login-field {
    position: relative;
    display: block;
    margin-bottom: 14px;
}

.login-field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6d879c;
    z-index: 2;
    pointer-events: none;
}

.login-panel .form-control,
.login-form .form-control {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 10px 14px 10px 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--hy-input);
    color: var(--hy-input-text);
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-form .form-control:focus {
    border-color: rgba(46, 196, 182, 0.7);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.18);
    outline: none;
}

.login-form .uname,
.login-form .pword,
.login-form .code {
    background-image: none;
}

.login-captcha {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 6px;
}

.login-field--captcha {
    margin-bottom: 0;
}

.login-captcha__img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease;
}

.login-captcha__img:hover {
    transform: translateY(-1px);
}

.login-captcha__img img {
    display: block;
    height: 34px;
    width: auto;
}

.login-form__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 18px;
}

.login-submit {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    color: #04111f;
    font-family: var(--hy-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    cursor: pointer;
    background: linear-gradient(135deg, #4fe0d0 0%, #2ec4b6 48%, #3aa0ff 100%);
    background-size: 160% 160%;
    transition: transform 0.2s ease, background-position 0.35s ease, filter 0.2s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    background-position: 100% 50%;
    filter: brightness(1.04);
}

.login-submit:active {
    transform: translateY(0);
}

.login-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 20px 16px 24px;
    border-top: 0;
    text-align: center;
    color: rgba(242, 247, 251, 0.55);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.login-footer a {
    color: rgba(242, 247, 251, 0.72);
}

/* 兼容旧结构类名，避免其它引用失效 */
.login-panel {
    width: auto;
    margin: 0;
}

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

.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: 18px;
    height: 17px;
    display: inline-block;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    position: absolute;
    display: inline-block;
    font-family: 'Glyphicons Halflings';
    content: "\e013";
    top: 42%;
    left: 3px;
    margin-top: -5px;
    font-size: 11px;
    line-height: 1;
    width: 16px;
    height: 16px;
    color: #e8fbff;
}

.checkbox-custom label {
    cursor: pointer;
    line-height: 1.2;
    font-weight: normal;
    margin-bottom: 0;
    text-align: left;
    color: var(--hy-text-dim);
}

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

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

@keyframes hy-grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 56px, 56px 0; }
}

@media screen and (max-width: 960px) {
    .login-page {
        padding: 32px 20px 0;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 28px;
        max-width: 460px;
    }

    .login-brand {
        padding: 0;
        text-align: left;
    }

    .login-brand__title {
        font-size: clamp(34px, 9vw, 44px);
    }

    .login-brand__points {
        display: none;
    }

    .login-form {
        padding: 28px 22px 24px;
    }
}

@media screen and (max-width: 420px) {
    .login-captcha {
        grid-template-columns: 1fr;
    }

    .login-captcha__img {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-grid,
    .login-orb,
    .login-shell,
    .login-form {
        animation: none !important;
    }
}
