body {
    background-image: radial-gradient(circle, rgba(160, 174, 192, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
}

.loading {
    position: relative;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 5;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #666;
    animation: spinner 0.8s linear infinite;
    z-index: 10;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(20px) rotate(-5deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, 10px) rotate(5deg); }
}

.qr-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qr-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.qr-box img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.qr-box img:hover {
    transform: scale(1.05);
}

.qr-refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    color: white;
}

.qr-box:hover .qr-refresh-overlay {
    opacity: 1;
}

.qr-refresh-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.qr-refresh-text {
    font-size: 0.9rem;
}

.qr-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #4285F4, transparent);
    box-shadow: 0 0 8px #4285F4;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.qr-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #555;
}

.status-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    color: #4285F4;
}

.status-text {
    font-size: 0.9rem;
}

.loading-dots {
    animation: dots 1.5s infinite;
    display: inline-block;
    min-width: 20px;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-link {
    color: #4285F4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #2B68CA;
    text-decoration: underline;
}

.footer-divider {
    color: #ccc;
    margin: 0 8px;
}

@media (max-width: 576px) {
    .qr-container {
        width: 180px;
        height: 180px;
    }

    .login-card {
        margin: 0 15px;
    }
}

#loginload {
    display: inline-block;
}

#qrcodeimg {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

#login[data-lock="true"] {
    background: rgba(52, 168, 83, 0.1);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

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

.login-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.type-logo {
    width: 18px;
    margin-top: -2px;
    padding-right: 4px;
}

/* 表单统一样式优化 */
.auth-bg .form-control {
    height: 48px;
    border-radius: 8px;
    border: 1px solid #e1e3ea;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.auth-bg .form-control:focus {
    border-color: #3699ff;
   /* box-shadow: 0 0 0 3px rgba(54, 153, 255, 0.1);*/
}

.auth-bg .form-control::placeholder {
    color: #a1a5b7;
}

.auth-bg .form-select {
    height: 48px;
    border-radius: 8px;
    border: 1px solid #e1e3ea;
    padding: 12px 16px;
    font-size: 14px;
}

.auth-bg .fv-row {
    margin-bottom: 20px;
}

.auth-bg .fv-row .d-flex {
    gap: 0px;
}

.auth-bg .fv-row .d-flex .form-control {
    flex: 1;
}

.auth-bg .fv-row .d-flex .btn,
.auth-bg .fv-row .d-flex .btn.btn-light {
    white-space: nowrap;
    min-width: 110px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #e1e3ea !important;
    background: #fff !important;
    
}

.auth-bg .fv-row .d-flex .btn:hover,
.auth-bg .fv-row .d-flex .btn.btn-light:hover {
    border-color: #3699ff !important;
    color: #3699ff;
    /*box-shadow: 0 0 0 3px rgba(54, 153, 255, 0.1);*/
}

.auth-bg .btn-primary {
    height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
}

.auth-bg .w-lg-500px {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px !important;
}

.auth-bg .text-center.mb-11 h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-bg .text-center.mb-11 .text-gray-500 {
    font-size: 14px;
}

.auth-bg .form-check-label {
    font-size: 13px;
}

.auth-bg .d-grid.mb-10 {
    margin-bottom: 24px;
}

/* 密码强度指示器优化 */
.auth-bg [data-kt-password-meter-control="highlight"] {
    margin-top: 8px;
}

.auth-bg [data-kt-password-meter-control="highlight"] > div {
    height: 4px;
    border-radius: 2px;
}

/* 移动端适配 - 认证页面 */
@media (max-width: 991px) {
    .auth-bg .d-flex.flex-lg-row {
        flex-direction: column !important;
    }
    
    .auth-bg .order-1.order-lg-2 {
        min-height: 120px !important;
        max-height: 160px !important;
        padding: 20px !important;
    }
    
    .auth-bg .order-1.order-lg-2 img.mx-auto {
        display: none !important;
    }
    
    .auth-bg .order-1.order-lg-2 h1,
    .auth-bg .order-1.order-lg-2 .text-white.fs-base {
        display: none !important;
    }
    
    .auth-bg .order-1.order-lg-2 .mb-0.mb-lg-12 img {
        height: 50px !important;
    }
    
    .auth-bg .order-2.order-lg-1 {
        padding: 0 !important;
    }
    
    .auth-bg .w-lg-500px {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 24px 20px !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08) !important;
        min-height: calc(100vh - 160px);
    }
    
    .auth-bg .form-control,
    .auth-bg .form-select {
        height: 48px !important;
        font-size: 15px !important;
    }
    
    .auth-bg .btn-primary {
        height: 48px !important;
        font-size: 16px !important;
    }
    
    .auth-bg .fv-row .d-flex .btn {
        height: 48px !important;
        min-width: 100px !important;
        font-size: 14px !important;
    }
    
    .auth-bg .text-center.mb-11 h1 {
        font-size: 22px !important;
    }
    
    .auth-bg .fv-row {
        margin-bottom: 16px !important;
    }
    
    .auth-bg .fv-row.mb-8 {
        margin-bottom: 16px !important;
    }
    
    .auth-bg .fv-row.mb-3 {
        margin-bottom: 12px !important;
    }
    
    .auth-bg .d-grid.mb-10 {
        margin-bottom: 20px !important;
    }
    
    .auth-bg .row.g-3.mb-9 {
        margin-bottom: 16px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
    }
    
    .auth-bg .row.g-3.mb-9 > div {
        flex: 1 !important;
        max-width: none !important;
        width: auto !important;
    }
    
    .auth-bg .row.g-3.mb-9 .btn {
        padding: 8px 6px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
    
    .auth-bg .row.g-3.mb-9 .btn img {
        height: 14px !important;
        margin-right: 4px !important;
    }
    
    .auth-bg .separator.my-14 {
        margin-top: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .auth-bg .d-flex.flex-stack.flex-wrap {
        margin-bottom: 16px !important;
    }
}