/* --- Auth System Styles (Black & White Light Edition) --- */
:root {
    /* Monochrome Palette - Light Mode */
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #18181b; /* Zinc-900 */
    --text-secondary: #52525b; /* Zinc-600 */
    --text-tertiary: #71717a; /* Zinc-500 */
    
    --accent-black: #000000;
    --accent-hover: #27272a; /* Zinc-800 */
    
    --border-light: #e4e4e7; /* Zinc-200 */
    --border-hover: #d4d4d8; /* Zinc-300 */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Login Modal --- */
.login-overlay { 
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.4); /* Lighter overlay */
    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: var(--transition);
}
.login-overlay.active { opacity: 1; visibility: visible; }

.login-card { 
    width: 400px; 
    padding: 40px; 
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 24px; 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px); 
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.login-close-btn {
    position: absolute; top: 20px; right: 20px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    z-index: 2;
}
.login-close-btn:hover { 
    background: var(--border-light); 
    color: var(--text-primary); 
}

.login-logo {
    width: 64px; height: 64px;
    background: var(--accent-black);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.login-title { 
    font-size: 24px; font-weight: 700; 
    color: var(--text-primary);
    margin-bottom: 10px; 
    letter-spacing: -0.02em;
}

.login-desc { 
    font-size: 14px; 
    color: var(--text-secondary); 
    margin-bottom: 32px; 
    line-height: 1.5; 
    max-width: 280px;
}

.btn-google-login { 
    display: flex; align-items: center; justify-content: center; gap: 12px; 
    width: 100%; height: 48px; 
    background: #ffffff; 
    color: var(--text-primary); 
    border-radius: 12px; 
    font-size: 15px; font-weight: 600; 
    cursor: pointer; 
    border: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none; 
    box-shadow: var(--shadow-sm);
}
.btn-google-login:hover { 
    background: #f8f9fa;
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px); 
}

.login-divider {
    width: 100%; height: 1px; 
    background: var(--border-light); 
    margin: 28px 0;
}

.login-terms {
    font-size: 12px; color: var(--text-tertiary); line-height: 1.5; max-width: 260px;
}
.login-terms a { color: var(--text-secondary); text-decoration: none; transition: 0.2s; }
.login-terms a:hover { color: var(--text-primary); text-decoration: underline; }

.btn-google-login {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; height: 48px;
    background: #fff;
    color: #000;
    border-radius: 12px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    position: relative; z-index: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.btn-google-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(255,255,255,0.2);
    background: #f5f5f5;
}

.login-divider {
    width: 100%; height: 1px;
    margin: 28px 0;
    position: relative; z-index: 1;
}

.login-terms {
    font-size: 12px;  line-height: 1.5; max-width: 260px; position: relative; z-index: 1;
}
.login-terms a {  text-decoration: none; transition: 0.2s; }
.login-terms a:hover { text-decoration: underline; }

/* --- Refined User Widget & Menu (New) --- */
.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 {
    font-size: 12px; color: #9ca3af; margin-bottom: 12px; font-weight: 500;
}
.rum-user-row {
    display: flex; gap: 12px; align-items: center; margin-bottom: 16px;
}
.rum-avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    display: flex; align-items: center; justify-content: center;
    color: #2563eb; font-weight: 700; font-size: 18px;
}
.rum-info { display: flex; flex-direction: column; overflow: hidden; }
.rum-name { font-size: 15px; font-weight: 700; color: #111827; }
.rum-email { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

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

.rum-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    color: #374151;
    font-size: 14px; font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}
.rum-item:hover {
    background: #f9fafb;
    color: #111827;
}
.rum-icon { width: 18px; height: 18px; color: #6b7280; }
.rum-item:hover .rum-icon { color: #111827; }

.rum-item.upgrade { color: #111827; }
.rum-item.upgrade .rum-icon { color: #f59e0b; } /* Orange/Gold icon */

.rum-footer {
    margin-top: 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.rum-link {
    font-size: 11px; color: #9ca3af; text-decoration: underline; cursor: pointer;
}
.rum-link:hover { color: #6b7280; }

/* --- Nav Sign In Button --- */
.btn-primary-sm {
    background: #000; color: #fff;
    border: none; border-radius: 10px;
    padding: 0 20px; height: 30px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
}
.btn-primary-sm:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
