html {
    height: 100%;
}

body.signin {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    color: rgba(255, 255, 255, 0.92);
    background: #090614;
}

.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(1200px 700px at 18% 12%, rgba(143, 96, 223, 0.28), transparent 58%),
        radial-gradient(900px 600px at 86% 78%, rgba(107, 63, 160, 0.32), transparent 55%),
        linear-gradient(165deg, #12081f 0%, #1a0d32 42%, #0b0616 100%);
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.nebula--violet {
    width: 420px;
    height: 420px;
    left: -80px;
    top: -60px;
    background: rgba(143, 96, 223, 0.45);
    animation: nebula-float 12s ease-in-out infinite;
}

.nebula--gold {
    width: 360px;
    height: 360px;
    right: -40px;
    bottom: 40px;
    background: rgba(232, 195, 106, 0.16);
    animation: nebula-float 16s ease-in-out infinite reverse;
}

.constellation {
    position: absolute;
    right: 6%;
    top: 12%;
    width: 320px;
    height: 220px;
    opacity: 0.7;
    pointer-events: none;
    animation: constellation-glow 7s ease-in-out infinite;
}

.signinpanel {
    position: relative;
    z-index: 1;
    width: 420px;
    margin: 0 auto;
    padding: 4vh 16px 40px;
}

.brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand__badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3a2460, #1c1033);
    border: 1px solid rgba(232, 195, 106, 0.45);
    box-shadow: 0 0 24px rgba(143, 96, 223, 0.45);
}

.brand__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #fff;
    text-shadow: 0 0 24px rgba(143, 96, 223, 0.55);
}

.brand__sub {
    margin: 10px 0 0;
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(232, 195, 106, 0.82);
}

.signinpanel form {
    background: rgba(18, 10, 36, 0.62);
    border: 1px solid rgba(183, 148, 246, 0.28);
    border-radius: 18px;
    padding: 32px 28px 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.signinpanel .form-control {
    display: block;
    width: 100%;
    height: 44px !important;
    margin-top: 16px;
    padding: 8px 16px !important;
    border: 1px solid rgba(183, 148, 246, 0.28) !important;
    border-radius: 10px !important;
    background-color: rgba(255, 255, 255, 0.94) !important;
    color: #1a1a2e;
    box-shadow: none;
}

.signinpanel .form-control:first-child {
    margin-top: 0;
}

.signinpanel .uname {
    background: #fff url(../img/user.png) no-repeat 96% center;
}

.pwd-wrap {
    position: relative;
    margin-top: 16px;
}

.pwd-wrap .pword {
    margin-top: 0;
    padding-right: 42px !important;
    background: #fff;
}

.pwd-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    color: #888;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
}

.pwd-toggle.is-locked {
    background: url(../img/locked.png) center no-repeat;
}

.pwd-toggle.is-locked i {
    display: none;
}

.pwd-toggle.is-open {
    color: #8f60df;
}

.pwd-toggle:hover {
    color: #6b3fa0;
}

.signinpanel .code {
    margin: 0;
    background: #fff;
}

.signinpanel .form-control:focus,
.has-error .form-control:focus,
.has-success .form-control:focus,
.has-warning .form-control:focus {
    border-color: #8f60df !important;
    box-shadow: 0 0 0 3px rgba(143, 96, 223, 0.18) !important;
}

.slider-captcha {
    margin-top: 18px;
}

.slider-captcha__panel {
    position: relative;
    overflow: hidden;
    height: 160px;
    border-radius: 12px;
    background: #160c2e;
    border: 1px solid rgba(183, 148, 246, 0.28);
}

.slider-captcha__bg {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.slider-captcha__slice {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.slider-captcha__refresh {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #e8c36a;
    background: rgba(18, 10, 36, 0.62);
    line-height: 28px;
    text-align: center;
}

.slider-captcha__refresh:hover {
    color: #fff;
    background: rgba(143, 96, 223, 0.72);
}

.slider-captcha__track {
    position: relative;
    height: 42px;
    margin-top: 12px;
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(183, 148, 246, 0.28);
    overflow: hidden;
    user-select: none;
}

.slider-captcha__fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 100%;
    background: linear-gradient(90deg, rgba(143, 96, 223, 0.35), rgba(232, 195, 106, 0.28));
}

.slider-captcha__btn {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #6b3fa0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    text-align: center;
    line-height: 42px;
    cursor: grab;
    z-index: 2;
}

.slider-captcha__btn:active {
    cursor: grabbing;
}

.slider-captcha__text {
    display: block;
    line-height: 42px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.72);
}

.slider-captcha.is-ok .slider-captcha__track {
    border-color: rgba(232, 195, 106, 0.7);
}

.slider-captcha.is-ok .slider-captcha__btn {
    color: #fff;
    background: linear-gradient(135deg, #e8c36a, #c9a24a);
}

.slider-captcha.is-fail {
    animation: slider-shake 0.35s ease;
}

.signinpanel .btn {
    margin-top: 18px;
    height: 44px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    letter-spacing: 6px;
    color: #fff;
    background: linear-gradient(135deg, #b794f6 0%, #8f60df 52%, #6b3fa0 100%);
    box-shadow: 0 10px 24px rgba(143, 96, 223, 0.38);
}

.signinpanel .btn:hover,
.signinpanel .btn:focus {
    color: #fff;
    background: linear-gradient(135deg, #c4a4ff 0%, #9b70e8 52%, #7a4bb3 100%);
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    padding: 0 15px 0 25px;
    margin: 16px 0 0;
}

.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(183, 148, 246, 0.55);
    background: rgba(255, 255, 255, 0.92);
}

.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: #6b3fa0;
}

.checkbox-custom label {
    cursor: pointer;
    line-height: 1.2;
    font-weight: normal;
    margin-bottom: 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.82);
}

.login-foot {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 4px;
    color: rgba(232, 195, 106, 0.7);
}

@keyframes nebula-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
    50% { transform: translate(24px, 16px) scale(1.08); opacity: 1; }
}

@keyframes constellation-glow {
    0%, 100% { opacity: 0.45; transform: translateY(0); }
    50% { opacity: 0.85; transform: translateY(-8px); }
}

@keyframes slider-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@media screen and (max-width: 768px) {
    .signinpanel {
        width: 92%;
        max-width: 420px;
        padding-top: 6vh;
    }

    .brand__title {
        font-size: 26px;
        letter-spacing: 4px;
    }

    .constellation {
        width: 180px;
        height: 130px;
        top: 4%;
        right: 2%;
        opacity: 0.4;
    }
}
