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

html, body {
    height: 100%;
}

body,
.zt8_user_page_full {
    background: transparent;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.zt8_user_page_embed {
    min-height: 0;
    justify-content: flex-start;
}

.zt8_user_wrapper {
    width: 100%;
    max-width: 420px;
}

body.zt8_user_page_embed .zt8_user_wrapper {
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
}

.zt8_user_logo {
    text-align: center;
    margin-bottom: 30px;
}

.zt8_user_logo_text {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #8B5A2B;
    margin-bottom: 4px;
}

.zt8_user_logo_sub {
    font-size: 14px;
    color: #999;
}

.zt8_user_tabs_inner {
    display: flex;
    margin-bottom: 20px;
    background: transparent;
    border-radius: 12px;
    padding: 3px;
    border: 1.5px solid #D4A574;
}

.zt8_user_tab_inner {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #8B5A2B;
    cursor: pointer;
    transition: all 0.25s;
}

.zt8_user_tab_inner:hover {
    background: rgba(212, 165, 116, 0.1);
}

.zt8_user_tab_inner.active {
    background: linear-gradient(135deg, #8B5A2B 0%, #D4A574 100%);
    color: #FFFFFF;
}

.zt8_user_form_inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.zt8_form_row_inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zt8_form_row_inner label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.zt8_form_row_inner input {
    width: 100%;
    padding: 15px 18px;
    font-size: 15px;
    border: 1.5px solid #D4A574;
    border-radius: 12px;
    background: #FFFFFF;
    box-sizing: border-box;
    transition: all 0.25s;
}

.zt8_form_row_inner input:focus {
    outline: none;
    border-color: #B8860B;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.zt8_form_row_inner input::placeholder {
    color: #B0B0B0;
}

.zt8_form_row_inner input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.zt8_user_remember_inner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    color: #6b5a48;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.zt8_user_remember_inner input {
    width: 16px;
    height: 16px;
    accent-color: #8B5A2B;
}

.zt8_user_remember_inner input:disabled {
    cursor: not-allowed;
}

.zt8_user_form_inner button {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, #8B5A2B 0%, #D4A574 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.3);
    transition: all 0.25s;
}

.zt8_user_form_inner button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.4);
}

.zt8_user_form_inner button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.zt8_user_message_inner {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 4px;
}

.zt8_user_message_inner.error {
    background: #FFF0F0;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
}

.zt8_user_message_inner.success {
    background: #E8F5E9;
    color: #388E3C;
    border: 1px solid #C8E6C9;
}

.zt8_wechat_login_link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid #cfe8d5;
    border-radius: 12px;
    background: #f4fff7;
    color: #16883a;
    text-decoration: none;
    font-weight: 700;
}

.zt8_wechat_login_link:hover {
    background: #ecfff1;
}

.zt8_profile_wechat_panel {
    position: relative;
}

.zt8_profile_bind_status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f4fff7;
    color: #16883a;
    border: 1px solid #cfe8d5;
    font-size: 13px;
    font-weight: 700;
}

.zt8_profile_bind_status.success {
    background: #edf7ff;
    color: #1769aa;
    border-color: #cfe7ff;
}

.zt8_weapp_login_box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.zt8_weapp_tabs {
    width: 100%;
    margin-bottom: 10px;
}

.zt8_weapp_head {
    width: 100%;
}

.zt8_weapp_login_box h1,
.zt8_weapp_title {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    color: #242529;
}

.zt8_weapp_login_box p,
.zt8_weapp_subtitle {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.7;
}

.zt8_weapp_scan_title {
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.25;
    color: #242529;
    font-weight: 700;
}

.zt8_weapp_qr_box {
    width: 210px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid #ead7c5;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.zt8_weapp_qr_expired {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    z-index: 10;
}

.zt8_weapp_qr_box img {
    width: 192px;
    height: 192px;
    display: block;
}

.zt8_weapp_qr_loading {
    color: #8b5a2b;
    font-size: 14px;
}

.zt8_weapp_status {
    min-height: 22px;
    color: #667085;
    font-size: 14px;
}

.zt8_weapp_status.success {
    color: #16883a;
}

.zt8_weapp_status.error {
    color: #d32f2f;
}

.zt8_weapp_refresh_btn {
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #8B5A2B 0%, #D4A574 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.zt8_weapp_back_link {
    color: #8b5a2b;
    text-decoration: none;
    font-weight: 700;
}

.zt8_weapp_secondary_btn {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

body.zt8_user_page_embed .zt8_weapp_login_box {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}

body.zt8_user_page_embed .zt8_weapp_refresh_btn,
body.zt8_user_page_embed .zt8_weapp_secondary_btn {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 520px) {
    body.zt8_user_page_embed .zt8_user_wrapper {
        padding: 0 14px;
    }

    body.zt8_user_page_embed .zt8_weapp_login_box {
        padding: 0;
    }

    body.zt8_user_page_embed .zt8_user_logo {
        margin-bottom: 14px;
    }

    body.zt8_user_page_embed .zt8_user_logo_text {
        font-size: 28px;
        margin-bottom: 2px;
    }

    body.zt8_user_page_embed .zt8_user_logo_sub {
        font-size: 13px;
    }
}
