
/* Sidebar Navigation - Moved to sidebar.css */

/* --- Login Modal --- */
.login-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.login-overlay.active { opacity: 1; visibility: visible; }

.login-card {
    width: auto; /* Adaptive width */
    height: 480px; /* Fixed height */
    padding: 0;
    background: #fff;
    border-radius: 12px;
    display: flex; flex-direction: row; 
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    transform: scale(0.95);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-overlay.active .login-card { transform: scale(1); }

.login-close-btn {
    position: absolute; top: 12px; right: 12px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: transparent;
    color: #999;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    z-index: 20;
}
.login-close-btn:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
}

/* Left Panel */
.login-left-panel {
    width: auto; /* Adaptive to image */
    height: 100%;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto; /* Do not grow or shrink */
}

/* Right Panel */
.login-right-panel {
    width: 400px; /* Fixed width for content */
    flex: 0 0 auto; /* Do not grow or shrink */
    background: #fff;
    display: flex; flex-direction: column; 
    padding: 40px 30px;
    align-items: center;
    justify-content: center;
}

.login-header {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.login-footer-p {
    font-size: 12px;
    color: #666; /* Use a slightly darker gray for readability */
    line-height: 1.6;
    margin: 4px 0;
}

.login-footer-p a {
    color: #1677ff; /* Link color */
    text-decoration: none;
}
.login-footer-p a:hover {
    text-decoration: underline;
}

/* QR Content */
.login-qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.login-tip {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

#wx-qr-container {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fafafa;
}

#wx-qr-img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: none;
}

#wx-qr-loading {
    color: #999;
    font-size: 12px;
}

.login-promotion {
    font-size: 14px;
    color: #1677ff;
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 500;
}
.login-promotion:hover {
    text-decoration: underline;
}

.login-note {
    font-size: 12px;
    color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        width: 90%;
        height: auto;
    }
    .login-left-panel {
        display: none; /* Hide image on mobile to save space */
    }
    .login-right-panel {
        padding: 30px 20px;
        width: 100%;
    }
}

/* --- Refined User Widget & Menu (Existing) --- */
.user-profile-widget {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    position: relative;
    border: 1px solid transparent;
}
.user-profile-widget:hover {
    background: #e5e7eb;
}
.user-profile-widget.active {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.up-avatar {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a5f3fc, #7dd3fc);
    display: flex; align-items: center; justify-content: center;
    color: #0e7490; font-weight: 700; font-size: 14px;
}
.up-info {
    flex: 1; display: flex; flex-direction: column; gap: 2px; overflow: hidden;
}
.up-name {
    font-size: 14px; font-weight: 600; color: #1f2937;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-role {
    font-size: 11px; color: #000000; display: flex; align-items: center; gap: 4px;
}
.up-chevron {
    color: #9ca3af; transition: transform 0.2s;
}
.user-profile-widget.active .up-chevron {
    transform: rotate(180deg);
}

/* Sidebar Upgrade Button */
.sidebar-upgrade-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b8b 0%, #ffe08a 40%, #6dd5c3 80%);
    color: #fff;
    border: none;
    border-radius: 10px; /* Pill shape */
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.sidebar-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Popup Menu Refined */
.refined-user-menu {
    position: absolute;
    left: 100%; bottom: 0; /* Position to the right of sidebar */
    margin-left: 17px;
    width: 260px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.05);
    padding: 16px;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0,0,0,0.06);
}
@media (max-width: 768px) {
    .refined-user-menu {
        left: 12px; bottom: 80px; /* Adjust for mobile if needed */
        margin-left: 0;
    }
}
.refined-user-menu.active {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}

.rum-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}
.rum-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: #e0f2fe; color: #0284c7;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700;
}
.rum-info { display: flex; flex-direction: column; }
.rum-name { font-size: 14px; font-weight: 600; color: #111; }
.rum-email { font-size: 11px; color: #6b7280; }

.rum-credits {
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.rum-credits-label { font-size: 12px; color: #6b7280; }
.rum-credits-val { font-size: 14px; font-weight: 700; color: #111; }

.rum-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border-radius: 8px;
    color: #374151; font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.rum-item:hover {
    background: #f3f4f6; color: #111;
}
.rum-item svg { color: #9ca3af; }
.rum-item:hover svg { color: #4b5563; }

.rum-divider { height: 1px; background: #f3f4f6; margin: 8px 0; }

.rum-logout { color: #ef4444; }
.rum-logout:hover { background: #fee2e2; color: #b91c1c; }
.rum-logout svg { color: #fca5a5; }
.rum-logout:hover svg { color: #ef4444; }
