/* Login Page Specifics */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    background: #fcfbf9;
    padding: 15px 15px;
    /* 40px 20px */
    position: relative;
    z-index: 1;
    margin-top: 60px;
    /* Header height offset */
}

@media (max-width: 768px) {
    .login-page {
        min-height: calc(100vh - 300px);
    }
}

.login-container {
    background: #ffffff;
    border-radius: 16px;
    /* 16px */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    padding: 15px;
    /* 48px */
    width: 100%;
    max-width: 400px;
    /* 400px */
    transition: transform 0.3s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 15px;
    /* 32px */
}

.login-logo {
    width: 48px;
    /* 48px */
    height: 48px;
    /* 48px */
    margin: 0 auto 15px;
    /* 16px */
    background: var(--primary);
    border-radius: 12px;
    /* 12px */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.login-tabs {
    display: flex;
    background: #f0f2f5;
    padding: 4px;
    /* 4px */
    border-radius: 12px;
    /* 12px */
    margin-bottom: 15px;
    /* 32px */
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    /* 12px */
    cursor: pointer;
    border-radius: 8px;
    /* 8px */
    font-size: 14px;
    /* 14px */
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-tab:hover {
    color: var(--text-main);
}

.login-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-form {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-form.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qrcode-container {
    text-align: center;
    padding: 10px 0;
    /* 10px -> 10px approx 10px. Better 12px (12px) for grid */
}

.qrcode-container img {
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px;
    /* 12px */
    background: var(--white);
    border-radius: 16px;
    /* 16px */
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 15px;
    /* 20px */
}

.form-input {
    height: 48px;
    /* 48px */
    border-radius: 12px;
    /* 12px */
    background: var(--gray-50);
    border: 1px solid transparent;
    transition: all 0.3s;
}

.form-input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-login {
    width: 100%;
    height: 48px;
    /* 48px */
    border-radius: 12px;
    /* 12px */
    font-size: 16px;
    /* 16px */
    margin-top: 15px;
    /* 24px */
}

/* Wechat login */
.wechat-login {
    text-align: center;
}

.wechat-qrcode-container {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.wechat-qrcode-img {
    width: 200px;
    height: 200px;
}

.code-qrcode-container {
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.code-qrcode-img {
    width: 160px;
    height: 160px;
}

.login-code-group {
    margin-top: 15px;
}

.login-code-flex {
    display: flex;
    gap: 8px;
}

.login-verify-btn {
    padding: 0 15px;
}

/* Modal specific styles */
body.is-modal {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh;
}

body.is-modal .header, 
body.is-modal .footer {
    display: none !important;
}

body.is-modal .login-page {
    min-height: 100vh !important;
    padding: 0 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

body.is-modal .login-page::before {
    display: none; /* Hide background pattern in modal */
}

body.is-modal .login-container {
    box-shadow: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    padding: 30px !important;
    max-width: none;
}
/* 默认不显示头和尾 */
body.hide-layout .header,
body.hide-layout .footer {
    display: none !important;
}
body.hide-layout .login-page {
    margin-top: 0 !important;
    min-height: 100vh !important;
}
