/* ===== User Menu & Environment Switcher ===== */
.env-switcher {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 2px;
}

.env-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.env-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.env-btn.active {
    background: var(--primary);
    color: white;
}

.env-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.user-menu {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    z-index: 1000;
}

.user-info {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.user-dropdown-tenant {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    color: var(--text);
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item.text-danger {
    color: var(--error);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.mobile-user-info {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
}

.mobile-user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
}

.mobile-user-tenant {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}
