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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 40px 40px 32px;
    position: relative;
}

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.brand-title {
    font-size: 22px;
    font-weight: 600;
    color: #1f1f1f;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.brand-desc {
    font-size: 14px;
    color: #8c8c8c;
    font-weight: 400;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group:last-of-type {
    margin-bottom: 0;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #bfbfbf;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.login-form .form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #1f1f1f;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}

.login-form .form-control::placeholder {
    color: #bfbfbf;
}

.login-form .form-control:hover {
    border-color: #4096ff;
}

.login-form .form-control:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.input-wrap:focus-within .input-icon {
    color: #1677ff;
}

.form-options {
    margin-bottom: 24px !important;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.remember-me input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.remember-me .checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    margin-right: 8px;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}

.remember-me input:checked + .checkmark {
    background: #1677ff;
    border-color: #1677ff;
}

.remember-me input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me .label-text {
    font-size: 14px;
    color: #595959;
}

.btn-login {
    width: 100%;
    height: 44px;
    margin-top: 8px;
    border: none;
    border-radius: 6px;
    background: #1677ff;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
}

.btn-login:hover {
    background: #4096ff;
}

.btn-login:active {
    background: #0958d9;
}

.btn-login:disabled {
    background: #91caff;
    cursor: wait;
}

/* 登录中遮罩（仅覆盖登录卡片，避免全屏 blockUI 与标题重叠） */
.login-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: #595959;
    font-size: 14px;
    line-height: 1.5;
}

.login-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e8e8e8;
    border-top-color: #1677ff;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: #bfbfbf;
}

/* jquery validate */
label.error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #ff4d4f;
    position: static;
}

/* layer message */
body .layer-ext-moon-msg[type="dialog"] {
    min-width: 100px !important;
}

body .layer-ext-moon-msg {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    border-radius: 6px;
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 12px 25px;
    text-align: center;
}

@media screen and (max-width: 480px) {
    .login-card {
        padding: 32px 24px 24px;
    }

    .login-brand {
        margin-bottom: 28px;
    }

    .brand-title {
        font-size: 22px;
    }
}
